@datapos/datapos-development 0.3.77 → 0.3.80

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.
@@ -1,7 +1,8 @@
1
1
  import { exec as qn } from "child_process";
2
+ import { promises as h } from "fs";
2
3
  import { nanoid as Yn } from "nanoid";
3
4
  import { promisify as Xn } from "util";
4
- const h = {}, Qn = ["createObject", "dropObject", "removeRecords", "upsertRecords"], nt = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
5
+ const Qn = ["createObject", "dropObject", "removeRecords", "upsertRecords"], nt = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
5
6
  function a(n, t, e) {
6
7
  function o(c, u) {
7
8
  var d;
@@ -290,13 +291,13 @@ function Sn(n, t) {
290
291
  return (o = e).path ?? (o.path = []), e.path.unshift(n), e;
291
292
  });
292
293
  }
293
- function D(n) {
294
+ function R(n) {
294
295
  return typeof n == "string" ? n : n?.message;
295
296
  }
296
297
  function j(n, t, e) {
297
298
  const o = { ...n, path: n.path ?? [] };
298
299
  if (!n.message) {
299
- const r = D(n.inst?._zod.def?.error?.(n)) ?? D(t?.error?.(n)) ?? D(e.customError?.(n)) ?? D(e.localeError?.(n)) ?? "Invalid input";
300
+ const r = R(n.inst?._zod.def?.error?.(n)) ?? R(t?.error?.(n)) ?? R(e.customError?.(n)) ?? R(e.localeError?.(n)) ?? "Invalid input";
300
301
  o.message = r;
301
302
  }
302
303
  return delete o.inst, delete o.continue, t?.reportInput || delete o.input, o;
@@ -400,7 +401,7 @@ const rn = (n) => (t, e, o, r) => {
400
401
  function Tt() {
401
402
  return new RegExp(It, "u");
402
403
  }
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}$`);
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])$/, Rt = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Tn = /^[A-Za-z0-9_-]*$/, Dt = /^(?=.{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}$`);
404
405
  function Fn(n) {
405
406
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
406
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+)?)?`;
@@ -725,7 +726,7 @@ const ie = {
725
726
  code: "invalid_format",
726
727
  format: "url",
727
728
  note: "Invalid hostname",
728
- pattern: Rt.source,
729
+ pattern: Dt.source,
729
730
  input: e.value,
730
731
  inst: n,
731
732
  continue: !t.abort
@@ -833,7 +834,7 @@ function Cn(n) {
833
834
  }
834
835
  }
835
836
  const Ze = /* @__PURE__ */ a("$ZodBase64", (n, t) => {
836
- t.pattern ?? (t.pattern = Dt), v.init(n, t), n._zod.onattach.push((e) => {
837
+ t.pattern ?? (t.pattern = Rt), v.init(n, t), n._zod.onattach.push((e) => {
837
838
  e._zod.bag.contentEncoding = "base64";
838
839
  }), n._zod.check = (e) => {
839
840
  Cn(e.value) || e.issues.push({
@@ -942,7 +943,7 @@ function Jn(n) {
942
943
  optionalKeys: new Set(e)
943
944
  };
944
945
  }
945
- function Dn(n, t, e, o, r, i) {
946
+ function Rn(n, t, e, o, r, i) {
946
947
  const s = [], c = r.keySet, u = r.catchall._zod, d = u.def.type;
947
948
  for (const l of Object.keys(t)) {
948
949
  if (c.has(l))
@@ -1004,7 +1005,7 @@ const Te = /* @__PURE__ */ a("$ZodObject", (n, t) => {
1004
1005
  const m = l[p]._zod.run({ value: u[p], issues: [] }, c);
1005
1006
  m instanceof Promise ? d.push(m.then((z) => W(z, s, p, u))) : W(m, s, p, u);
1006
1007
  }
1007
- return r ? Dn(d, u, s, c, e.value, n) : d.length ? Promise.all(d).then(() => s) : s;
1008
+ return r ? Rn(d, u, s, c, e.value, n) : d.length ? Promise.all(d).then(() => s) : s;
1008
1009
  };
1009
1010
  }), Ne = /* @__PURE__ */ a("$ZodObjectJIT", (n, t) => {
1010
1011
  Te.init(n, t);
@@ -1050,7 +1051,7 @@ const Te = /* @__PURE__ */ a("$ZodObject", (n, t) => {
1050
1051
  n._zod.parse = (p, m) => {
1051
1052
  l ?? (l = o.value);
1052
1053
  const z = p.value;
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({
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({
1054
1055
  expected: "object",
1055
1056
  code: "invalid_type",
1056
1057
  input: z,
@@ -1162,7 +1163,7 @@ const Je = /* @__PURE__ */ a("$ZodEnum", (n, t) => {
1162
1163
  inst: n
1163
1164
  }), r;
1164
1165
  };
1165
- }), De = /* @__PURE__ */ a("$ZodTransform", (n, t) => {
1166
+ }), Re = /* @__PURE__ */ a("$ZodTransform", (n, t) => {
1166
1167
  _.init(n, t), n._zod.parse = (e, o) => {
1167
1168
  if (o.direction === "backward")
1168
1169
  throw new On(n.constructor.name);
@@ -1177,7 +1178,7 @@ const Je = /* @__PURE__ */ a("$ZodEnum", (n, t) => {
1177
1178
  function mn(n, t) {
1178
1179
  return n.issues.length && t === void 0 ? { issues: [], value: void 0 } : n;
1179
1180
  }
1180
- const Re = /* @__PURE__ */ a("$ZodOptional", (n, t) => {
1181
+ const De = /* @__PURE__ */ a("$ZodOptional", (n, t) => {
1181
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", () => {
1182
1183
  const e = t.innerType._zod.pattern;
1183
1184
  return e ? new RegExp(`^(${en(e.source)})?$`) : void 0;
@@ -1248,13 +1249,13 @@ const Me = /* @__PURE__ */ a("$ZodCatch", (n, t) => {
1248
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) => {
1249
1250
  if (o.direction === "backward") {
1250
1251
  const i = t.out._zod.run(e, o);
1251
- return i instanceof Promise ? i.then((s) => R(s, t.in, o)) : R(i, t.in, o);
1252
+ return i instanceof Promise ? i.then((s) => D(s, t.in, o)) : D(i, t.in, o);
1252
1253
  }
1253
1254
  const r = t.in._zod.run(e, o);
1254
- return r instanceof Promise ? r.then((i) => R(i, t.out, o)) : R(r, t.out, o);
1255
+ return r instanceof Promise ? r.then((i) => D(i, t.out, o)) : D(r, t.out, o);
1255
1256
  };
1256
1257
  });
1257
- function R(n, t, e) {
1258
+ function D(n, t, e) {
1258
1259
  return n.issues.length ? (n.aborted = !0, n) : t._zod.run({ value: n.value, issues: n.issues }, e);
1259
1260
  }
1260
1261
  const Ke = /* @__PURE__ */ a("$ZodReadonly", (n, t) => {
@@ -1583,7 +1584,7 @@ function Zo(n, t) {
1583
1584
  ...f(t)
1584
1585
  });
1585
1586
  }
1586
- function Rn(n, t) {
1587
+ function Dn(n, t) {
1587
1588
  return new Gt({
1588
1589
  check: "max_length",
1589
1590
  ...f(t),
@@ -1687,7 +1688,7 @@ function Co(n, t, e) {
1687
1688
  });
1688
1689
  }
1689
1690
  function Jo(n) {
1690
- const t = Do((e) => (e.addIssue = (o) => {
1691
+ const t = Ro((e) => (e.addIssue = (o) => {
1691
1692
  if (typeof o == "string")
1692
1693
  e.issues.push(C(o, e.value, t._zod.def));
1693
1694
  else {
@@ -1697,18 +1698,18 @@ function Jo(n) {
1697
1698
  }, n(e.value, e)));
1698
1699
  return t;
1699
1700
  }
1700
- function Do(n, t) {
1701
+ function Ro(n, t) {
1701
1702
  const e = new $({
1702
1703
  check: "custom",
1703
1704
  ...f(t)
1704
1705
  });
1705
1706
  return e._zod.check = n, e;
1706
1707
  }
1707
- const Ro = /* @__PURE__ */ a("ZodISODateTime", (n, t) => {
1708
+ const Do = /* @__PURE__ */ a("ZodISODateTime", (n, t) => {
1708
1709
  ve.init(n, t), y.init(n, t);
1709
1710
  });
1710
1711
  function Uo(n) {
1711
- return wo(Ro, n);
1712
+ return wo(Do, n);
1712
1713
  }
1713
1714
  const Vo = /* @__PURE__ */ a("ZodISODate", (n, t) => {
1714
1715
  ye.init(n, t), y.init(n, t);
@@ -1764,7 +1765,7 @@ const Go = (n, t) => {
1764
1765
  ...t.checks ?? [],
1765
1766
  ...e.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
1766
1767
  ]
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) => {
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(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) => Rr(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) => {
1768
1769
  const o = n.clone();
1769
1770
  return U.add(o, { description: e }), o;
1770
1771
  }, Object.defineProperty(n, "description", {
@@ -1780,7 +1781,7 @@ const Go = (n, t) => {
1780
1781
  }, n.isOptional = () => n.safeParse(void 0).success, n.isNullable = () => n.safeParse(null).success, n)), Vn = /* @__PURE__ */ a("_ZodString", (n, t) => {
1781
1782
  an.init(n, t), w.init(n, t);
1782
1783
  const e = n._zod.bag;
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());
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(Dn(...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());
1784
1785
  }), ar = /* @__PURE__ */ a("ZodString", (n, t) => {
1785
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(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));
1786
1787
  });
@@ -1840,7 +1841,7 @@ function xr(n) {
1840
1841
  return Zo(Or, n);
1841
1842
  }
1842
1843
  const jr = /* @__PURE__ */ a("ZodArray", (n, t) => {
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;
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(Dn(e, o)), n.length = (e, o) => n.check(Un(e, o)), n.unwrap = () => n.element;
1844
1845
  });
1845
1846
  function Er(n, t) {
1846
1847
  return Fo(jr, n, t);
@@ -1916,7 +1917,7 @@ function Wn(n, t) {
1916
1917
  });
1917
1918
  }
1918
1919
  const Nr = /* @__PURE__ */ a("ZodTransform", (n, t) => {
1919
- De.init(n, t), w.init(n, t), n._zod.parse = (e, o) => {
1920
+ Re.init(n, t), w.init(n, t), n._zod.parse = (e, o) => {
1920
1921
  if (o.direction === "backward")
1921
1922
  throw new On(n.constructor.name);
1922
1923
  e.addIssue = (i) => {
@@ -1938,7 +1939,7 @@ function Fr(n) {
1938
1939
  });
1939
1940
  }
1940
1941
  const Mn = /* @__PURE__ */ a("ZodOptional", (n, t) => {
1941
- Re.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
1942
+ De.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
1942
1943
  });
1943
1944
  function bn(n) {
1944
1945
  return new Mn({
@@ -1958,7 +1959,7 @@ function kn(n) {
1958
1959
  const Jr = /* @__PURE__ */ a("ZodDefault", (n, t) => {
1959
1960
  Ve.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType, n.removeDefault = n.unwrap;
1960
1961
  });
1961
- function Dr(n, t) {
1962
+ function Rr(n, t) {
1962
1963
  return new Jr({
1963
1964
  type: "default",
1964
1965
  innerType: n,
@@ -1967,11 +1968,11 @@ function Dr(n, t) {
1967
1968
  }
1968
1969
  });
1969
1970
  }
1970
- const Rr = /* @__PURE__ */ a("ZodPrefault", (n, t) => {
1971
+ const Dr = /* @__PURE__ */ a("ZodPrefault", (n, t) => {
1971
1972
  Le.init(n, t), w.init(n, t), n.unwrap = () => n._zod.def.innerType;
1972
1973
  });
1973
1974
  function Ur(n, t) {
1974
- return new Rr({
1975
+ return new Dr({
1975
1976
  type: "prefault",
1976
1977
  innerType: n,
1977
1978
  get defaultValue() {
@@ -2041,7 +2042,7 @@ const Zn = Ln({
2041
2042
  typeId: Wn(["app", "engine", "connector", "context", "informer", "presenter"]),
2042
2043
  version: A()
2043
2044
  }), N = Xn(qn);
2044
- async function ti() {
2045
+ async function ei() {
2045
2046
  try {
2046
2047
  console.info("🚀 Building configuration...");
2047
2048
  const n = JSON.parse(await h.readFile("package.json", "utf8")), t = JSON.parse(await h.readFile("config.json", "utf8"));
@@ -2050,7 +2051,7 @@ async function ti() {
2050
2051
  console.error("❌ Error building configuration.", n);
2051
2052
  }
2052
2053
  }
2053
- async function ei(n) {
2054
+ async function oi(n) {
2054
2055
  try {
2055
2056
  console.info(`🚀 Building public directory index for identifier '${n}'...`);
2056
2057
  const t = {};
@@ -2084,7 +2085,7 @@ async function ei(n) {
2084
2085
  console.error("❌ Error building public directory index.", t);
2085
2086
  }
2086
2087
  }
2087
- async function oi() {
2088
+ async function ri() {
2088
2089
  try {
2089
2090
  console.info("🚀 Building connector configuration...");
2090
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");
@@ -2100,7 +2101,7 @@ async function oi() {
2100
2101
  console.error("❌ Error building connector configuration.", n);
2101
2102
  }
2102
2103
  }
2103
- async function ri() {
2104
+ async function ii() {
2104
2105
  try {
2105
2106
  console.info("🚀 Building context configuration...");
2106
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]);
@@ -2109,7 +2110,7 @@ async function ri() {
2109
2110
  console.error("❌ Error building context configuration.", n);
2110
2111
  }
2111
2112
  }
2112
- async function ii() {
2113
+ async function si() {
2113
2114
  try {
2114
2115
  console.info("🚀 Building informer configuration...");
2115
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]);
@@ -2118,7 +2119,7 @@ async function ii() {
2118
2119
  console.error("❌ Error building informer configuration.", n);
2119
2120
  }
2120
2121
  }
2121
- async function si() {
2122
+ async function ai() {
2122
2123
  try {
2123
2124
  console.info("🚀 Building presenter configuration...");
2124
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]);
@@ -2127,7 +2128,7 @@ async function si() {
2127
2128
  console.error("❌ Error building context configuration.", n);
2128
2129
  }
2129
2130
  }
2130
- async function ai() {
2131
+ async function ci() {
2131
2132
  try {
2132
2133
  console.info("🚀 Bumping version...");
2133
2134
  const n = JSON.parse(await h.readFile("package.json", "utf8"));
@@ -2140,10 +2141,10 @@ async function ai() {
2140
2141
  console.error("❌ Error bumping package version.", n);
2141
2142
  }
2142
2143
  }
2143
- function ci(n) {
2144
+ function ui(n) {
2144
2145
  console.error(`❌ ${n} script not implemented.`);
2145
2146
  }
2146
- async function ui() {
2147
+ async function di() {
2147
2148
  try {
2148
2149
  console.info("🚀 Sending deployment notice...");
2149
2150
  const n = JSON.parse(await h.readFile("config.json", "utf8")), t = {
@@ -2157,7 +2158,7 @@ async function ui() {
2157
2158
  console.error("❌ Error sending deployment notice.", n);
2158
2159
  }
2159
2160
  }
2160
- async function di() {
2161
+ async function fi() {
2161
2162
  try {
2162
2163
  console.info("🚀 Synchronising with GitHub....");
2163
2164
  const n = JSON.parse(await h.readFile("package.json", "utf8"));
@@ -2166,7 +2167,7 @@ async function di() {
2166
2167
  console.error("❌ Error synchronising with GitHub.", n);
2167
2168
  }
2168
2169
  }
2169
- async function fi(n, t) {
2170
+ async function li(n, t) {
2170
2171
  try {
2171
2172
  console.info("🚀 Uploading directory to R2....");
2172
2173
  async function e(r, i, s) {
@@ -2176,7 +2177,7 @@ async function fi(n, t) {
2176
2177
  const p = await h.readdir(u);
2177
2178
  await e(u, d, p);
2178
2179
  } else {
2179
- console.info(`⚙️ Uploading '${r}/${c}'.`);
2180
+ console.info(`⚙️ Uploading '${r}/${c}'...`);
2180
2181
  const p = `wrangler r2 object put "datapos-sample-data-eu/${i}/${c}" --file="${r}/${c}" --jurisdiction=eu --remote`, m = await N(p);
2181
2182
  if (m.stderr) throw new Error(m.stderr);
2182
2183
  }
@@ -2188,7 +2189,7 @@ async function fi(n, t) {
2188
2189
  console.error("❌ Error uploading directory to R2.", e);
2189
2190
  }
2190
2191
  }
2191
- async function li() {
2192
+ async function pi() {
2192
2193
  try {
2193
2194
  console.info("🚀 Uploading module configuration....");
2194
2195
  const n = JSON.parse(await h.readFile("config.json", "utf8")), t = n.id, e = {
@@ -2202,40 +2203,41 @@ async function li() {
2202
2203
  console.error("❌ Error uploading module configuration.", n);
2203
2204
  }
2204
2205
  }
2205
- async function pi(n, t) {
2206
+ async function hi(n) {
2206
2207
  try {
2207
2208
  console.info("🚀 Uploading module to R2...");
2208
- const o = `v${JSON.parse(await h.readFile("package.json", "utf8")).version}`;
2209
- async function r(i, s = "") {
2210
- const c = await h.readdir(i, { withFileTypes: !0 });
2211
- for (const u of c) {
2212
- const d = `${i}/${u.name}`, l = s ? `${s}/${u.name}` : u.name;
2213
- if (u.isDirectory())
2214
- await r(d, l);
2209
+ const e = `v${JSON.parse(await h.readFile("package.json", "utf8")).version}`;
2210
+ async function o(r, i = "") {
2211
+ const s = await h.readdir(r, { withFileTypes: !0 });
2212
+ for (const c of s) {
2213
+ const u = `${r}/${c.name}`, d = i ? `${i}/${c.name}` : c.name;
2214
+ if (c.isDirectory())
2215
+ await o(u, d);
2215
2216
  else {
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
- console.info(`✅ Uploaded ${l} ${p}`);
2217
+ const l = `${n}/${e}/${d}`.replace(/\\/g, "/"), p = c.name.endsWith(".js") ? "application/javascript" : c.name.endsWith(".css") ? "text/css" : "application/octet-stream";
2218
+ console.info(`⚙️ Uploading '${d}' → '${l}'...`);
2219
+ const { stderr: m } = await N(`wrangler r2 object put "${l}" --file="${u}" --content-type ${p} --jurisdiction=eu --remote`);
2220
+ if (m) throw new Error(m);
2219
2221
  }
2220
2222
  }
2221
2223
  }
2222
- await r("dist"), console.info("✅ Module uploaded to R2.");
2223
- } catch (e) {
2224
- console.error("❌ Error uploading module to R2.", e);
2224
+ await o("dist"), console.info("✅ Module uploaded to R2.");
2225
+ } catch (t) {
2226
+ console.error("❌ Error uploading module to R2.", t);
2225
2227
  }
2226
2228
  }
2227
2229
  export {
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
2230
+ ei as buildConfig,
2231
+ ri as buildConnectorConfig,
2232
+ ii as buildContextConfig,
2233
+ si as buildInformerConfig,
2234
+ ai as buildPresenterConfig,
2235
+ oi as buildPublicDirectoryIndex,
2236
+ ci as bumpVersion,
2237
+ ui as echoScriptNotImplemented,
2238
+ di as sendDeploymentNotice,
2239
+ fi as syncWithGitHub,
2240
+ li as uploadDirectoryToR2,
2241
+ pi as uploadModuleConfigToDO,
2242
+ hi as uploadModuleToR2
2241
2243
  };
@@ -13,5 +13,5 @@ declare function sendDeploymentNotice(): Promise<void>;
13
13
  declare function syncWithGitHub(): Promise<void>;
14
14
  declare function uploadDirectoryToR2(sourceDirectory: string, uploadDirectory: string): Promise<void>;
15
15
  declare function uploadModuleConfigToDO(): Promise<void>;
16
- declare function uploadModuleToR2(distDir: string, presenterDir: string): Promise<void>;
16
+ declare function uploadModuleToR2(uploadDirPath: string): Promise<void>;
17
17
  export { buildConfig, buildConnectorConfig, buildContextConfig, buildInformerConfig, buildPresenterConfig, buildPublicDirectoryIndex, bumpVersion, echoScriptNotImplemented, sendDeploymentNotice, syncWithGitHub, uploadDirectoryToR2, uploadModuleConfigToDO, uploadModuleToR2 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-development",
3
- "version": "0.3.77",
3
+ "version": "0.3.80",
4
4
  "description": "A TypeScript library of utilities for managing the Data Positioning repositories.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",