@datapos/datapos-development 0.3.76 → 0.3.79

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.
@@ -119,7 +119,7 @@ const et = nn(() => {
119
119
  return !1;
120
120
  }
121
121
  });
122
- function N(n) {
122
+ function F(n) {
123
123
  if (L(n) === !1)
124
124
  return !1;
125
125
  const t = n.constructor;
@@ -129,7 +129,7 @@ function N(n) {
129
129
  return !(L(e) === !1 || Object.prototype.hasOwnProperty.call(e, "isPrototypeOf") === !1);
130
130
  }
131
131
  function En(n) {
132
- return N(n) ? { ...n } : Array.isArray(n) ? [...n] : n;
132
+ return F(n) ? { ...n } : Array.isArray(n) ? [...n] : n;
133
133
  }
134
134
  const ot = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
135
135
  function B(n) {
@@ -186,7 +186,7 @@ function st(n, t) {
186
186
  return O(n, o);
187
187
  }
188
188
  function at(n, t) {
189
- if (!N(t))
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;
192
192
  if (e && e.length > 0)
@@ -201,7 +201,7 @@ function at(n, t) {
201
201
  return O(n, o);
202
202
  }
203
203
  function ct(n, t) {
204
- if (!N(t))
204
+ if (!F(t))
205
205
  throw new Error("Invalid input to safeExtend: expected a plain object");
206
206
  const e = {
207
207
  ...n._zod.def,
@@ -291,13 +291,13 @@ function Sn(n, t) {
291
291
  return (o = e).path ?? (o.path = []), e.path.unshift(n), e;
292
292
  });
293
293
  }
294
- function J(n) {
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 = J(n.inst?._zod.def?.error?.(n)) ?? J(t?.error?.(n)) ?? J(e.customError?.(n)) ?? J(e.localeError?.(n)) ?? "Invalid input";
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;
@@ -305,7 +305,7 @@ function j(n, t, e) {
305
305
  function on(n) {
306
306
  return Array.isArray(n) ? "array" : typeof n == "string" ? "string" : "unknown";
307
307
  }
308
- function F(...n) {
308
+ function C(...n) {
309
309
  const [t, e, o] = n;
310
310
  return typeof t == "string" ? {
311
311
  message: t,
@@ -1113,7 +1113,7 @@ function Y(n, t) {
1113
1113
  return { valid: !0, data: n };
1114
1114
  if (n instanceof Date && t instanceof Date && +n == +t)
1115
1115
  return { valid: !0, data: n };
1116
- if (N(n) && N(t)) {
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
1119
  const s = Y(n[i], t[i]);
@@ -1249,13 +1249,13 @@ const Me = /* @__PURE__ */ a("$ZodCatch", (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) => D(s, t.in, o)) : D(i, t.in, o);
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) => D(i, t.out, o)) : D(r, t.out, o);
1255
+ return r instanceof Promise ? r.then((i) => R(i, t.out, o)) : R(r, t.out, o);
1256
1256
  };
1257
1257
  });
1258
- function D(n, t, e) {
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
1261
  const Ke = /* @__PURE__ */ a("$ZodReadonly", (n, t) => {
@@ -1289,7 +1289,7 @@ function _n(n, t, e, o) {
1289
1289
  continue: !o._zod.def.abort
1290
1290
  // params: inst._zod.def.params,
1291
1291
  };
1292
- o._zod.def.params && (r.params = o._zod.def.params), t.issues.push(F(r));
1292
+ o._zod.def.params && (r.params = o._zod.def.params), t.issues.push(C(r));
1293
1293
  }
1294
1294
  }
1295
1295
  class He {
@@ -1329,7 +1329,7 @@ class He {
1329
1329
  function qe() {
1330
1330
  return new He();
1331
1331
  }
1332
- const R = /* @__PURE__ */ qe();
1332
+ const U = /* @__PURE__ */ qe();
1333
1333
  function Ye(n, t) {
1334
1334
  return new n({
1335
1335
  type: "string",
@@ -1651,23 +1651,23 @@ function Po(n, t) {
1651
1651
  suffix: n
1652
1652
  });
1653
1653
  }
1654
- function C(n) {
1654
+ function J(n) {
1655
1655
  return new oe({
1656
1656
  check: "overwrite",
1657
1657
  tx: n
1658
1658
  });
1659
1659
  }
1660
1660
  function Ao(n) {
1661
- return C((t) => t.normalize(n));
1661
+ return J((t) => t.normalize(n));
1662
1662
  }
1663
1663
  function Io() {
1664
- return C((n) => n.trim());
1664
+ return J((n) => n.trim());
1665
1665
  }
1666
1666
  function To() {
1667
- return C((n) => n.toLowerCase());
1667
+ return J((n) => n.toLowerCase());
1668
1668
  }
1669
1669
  function No() {
1670
- return C((n) => n.toUpperCase());
1670
+ return J((n) => n.toUpperCase());
1671
1671
  }
1672
1672
  function Fo(n, t, e) {
1673
1673
  return new n({
@@ -1690,10 +1690,10 @@ function Co(n, t, e) {
1690
1690
  function Jo(n) {
1691
1691
  const t = Do((e) => (e.addIssue = (o) => {
1692
1692
  if (typeof o == "string")
1693
- e.issues.push(F(o, e.value, t._zod.def));
1693
+ e.issues.push(C(o, e.value, t._zod.def));
1694
1694
  else {
1695
1695
  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(F(r));
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(C(r));
1697
1697
  }
1698
1698
  }, n(e.value, e)));
1699
1699
  return t;
@@ -1765,25 +1765,25 @@ const Go = (n, t) => {
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) => Ho(n, e, o, { callee: n.parse }), n.safeParse = (e, o) => Yo(n, e, o), n.parseAsync = async (e, o) => qo(n, e, o, { callee: n.parseAsync }), n.safeParseAsync = async (e, o) => Xo(n, e, o), n.spa = n.safeParseAsync, n.encode = (e, o) => Qo(n, e, o), n.decode = (e, o) => nr(n, e, o), n.encodeAsync = async (e, o) => tr(n, e, o), n.decodeAsync = async (e, o) => er(n, e, o), n.safeEncode = (e, o) => or(n, e, o), n.safeDecode = (e, o) => rr(n, e, o), n.safeEncodeAsync = async (e, o) => ir(n, e, o), n.safeDecodeAsync = async (e, o) => sr(n, e, o), n.refine = (e, o) => n.check(Hr(e, o)), n.superRefine = (e) => n.check(qr(e)), n.overwrite = (e) => n.check(C(e)), n.optional = () => bn(n), n.nullable = () => kn(n), n.nullish = () => bn(kn(n)), n.nonoptional = (e) => Vr(n, e), n.array = () => Er(n), n.or = (e) => Ar([n, e]), n.and = (e) => Tr(n, e), n.transform = (e) => $n(n, Fr(e)), n.default = (e) => Dr(n, e), n.prefault = (e) => Ur(n, e), n.catch = (e) => Wr(n, e), n.pipe = (e) => $n(n, e), n.readonly = () => Kr(n), n.describe = (e) => {
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) => 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
1769
  const o = n.clone();
1770
- return R.add(o, { description: e }), o;
1770
+ return U.add(o, { description: e }), o;
1771
1771
  }, Object.defineProperty(n, "description", {
1772
1772
  get() {
1773
- return R.get(n)?.description;
1773
+ return U.get(n)?.description;
1774
1774
  },
1775
1775
  configurable: !0
1776
1776
  }), n.meta = (...e) => {
1777
1777
  if (e.length === 0)
1778
- return R.get(n);
1778
+ return U.get(n);
1779
1779
  const o = n.clone();
1780
- return R.add(o, e[0]), o;
1780
+ return U.add(o, e[0]), o;
1781
1781
  }, n.isOptional = () => n.safeParse(void 0).success, n.isNullable = () => n.safeParse(null).success, n)), Vn = /* @__PURE__ */ a("_ZodString", (n, t) => {
1782
1782
  an.init(n, t), w.init(n, t);
1783
1783
  const e = n._zod.bag;
1784
1784
  n.format = e.format ?? null, n.minLength = e.minimum ?? null, n.maxLength = e.maximum ?? null, n.regex = (...o) => n.check(Oo(...o)), n.includes = (...o) => n.check(Eo(...o)), n.startsWith = (...o) => n.check(So(...o)), n.endsWith = (...o) => n.check(Po(...o)), n.min = (...o) => n.check(M(...o)), n.max = (...o) => n.check(Rn(...o)), n.length = (...o) => n.check(Un(...o)), n.nonempty = (...o) => n.check(M(1, ...o)), n.lowercase = (o) => n.check(xo(o)), n.uppercase = (o) => n.check(jo(o)), n.trim = () => n.check(Io()), n.normalize = (...o) => n.check(Ao(...o)), n.toLowerCase = () => n.check(To()), n.toUpperCase = () => n.check(No());
1785
1785
  }), ar = /* @__PURE__ */ a("ZodString", (n, t) => {
1786
- an.init(n, t), Vn.init(n, t), n.email = (e) => n.check(Xe(cr, e)), n.url = (e) => n.check(oo(ur, e)), n.jwt = (e) => n.check(_o($r, e)), n.emoji = (e) => n.check(ro(dr, e)), n.guid = (e) => n.check(wn(zn, e)), n.uuid = (e) => n.check(Qe(U, e)), n.uuidv4 = (e) => n.check(no(U, e)), n.uuidv6 = (e) => n.check(to(U, e)), n.uuidv7 = (e) => n.check(eo(U, e)), n.nanoid = (e) => n.check(io(fr, e)), n.guid = (e) => n.check(wn(zn, e)), n.cuid = (e) => n.check(so(lr, e)), n.cuid2 = (e) => n.check(ao(pr, e)), n.ulid = (e) => n.check(co(hr, e)), n.base64 = (e) => n.check(go(zr, e)), n.base64url = (e) => n.check(vo(br, e)), n.xid = (e) => n.check(uo(mr, e)), n.ksuid = (e) => n.check(fo(gr, e)), n.ipv4 = (e) => n.check(lo(vr, e)), n.ipv6 = (e) => n.check(po(yr, e)), n.cidrv4 = (e) => n.check(ho(_r, e)), n.cidrv6 = (e) => n.check(mo(wr, e)), n.e164 = (e) => n.check(yo(kr, e)), n.datetime = (e) => n.check(Uo(e)), n.date = (e) => n.check(Lo(e)), n.time = (e) => n.check(Mo(e)), n.duration = (e) => n.check(Ko(e));
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));
1787
1787
  });
1788
1788
  function A(n) {
1789
1789
  return Ye(ar, n);
@@ -1794,7 +1794,7 @@ const y = /* @__PURE__ */ a("ZodStringFormat", (n, t) => {
1794
1794
  ce.init(n, t), y.init(n, t);
1795
1795
  }), zn = /* @__PURE__ */ a("ZodGUID", (n, t) => {
1796
1796
  se.init(n, t), y.init(n, t);
1797
- }), U = /* @__PURE__ */ a("ZodUUID", (n, t) => {
1797
+ }), V = /* @__PURE__ */ a("ZodUUID", (n, t) => {
1798
1798
  ae.init(n, t), y.init(n, t);
1799
1799
  }), ur = /* @__PURE__ */ a("ZodURL", (n, t) => {
1800
1800
  ue.init(n, t), y.init(n, t);
@@ -1922,10 +1922,10 @@ const Nr = /* @__PURE__ */ a("ZodTransform", (n, t) => {
1922
1922
  throw new On(n.constructor.name);
1923
1923
  e.addIssue = (i) => {
1924
1924
  if (typeof i == "string")
1925
- e.issues.push(F(i, e.value, t));
1925
+ e.issues.push(C(i, e.value, t));
1926
1926
  else {
1927
1927
  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(F(s));
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(C(s));
1929
1929
  }
1930
1930
  };
1931
1931
  const r = t.transform(e.value, e);
@@ -2041,7 +2041,7 @@ const Zn = Ln({
2041
2041
  statusId: X(),
2042
2042
  typeId: Wn(["app", "engine", "connector", "context", "informer", "presenter"]),
2043
2043
  version: A()
2044
- }), V = Xn(qn);
2044
+ }), N = Xn(qn);
2045
2045
  async function ei() {
2046
2046
  try {
2047
2047
  console.info("🚀 Building configuration...");
@@ -2162,7 +2162,7 @@ async function fi() {
2162
2162
  try {
2163
2163
  console.info("🚀 Synchronising with GitHub....");
2164
2164
  const n = JSON.parse(await h.readFile("package.json", "utf8"));
2165
- await V("git add ."), await V(`git commit -m "v${n.version}"`), await V("git push origin main:main"), console.info(`✅ Synchronised version ${n.version} with GitHub.`);
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
  }
@@ -2178,7 +2178,7 @@ async function li(n, t) {
2178
2178
  await e(u, d, p);
2179
2179
  } else {
2180
2180
  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 V(p);
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
  }
@@ -2214,12 +2214,13 @@ async function hi(n, t) {
2214
2214
  if (u.isDirectory())
2215
2215
  await r(d, l);
2216
2216
  else {
2217
- const p = `${t}/${o}/${l}`.replace(/\\/g, "/"), m = u.name.endsWith(".js") ? "application/javascript" : u.name.endsWith(".css") ? "text/css" : "application/octet-stream";
2217
+ 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`);
2218
+ if (z) throw new Error(z);
2218
2219
  console.info(`✅ Uploaded ${l} → ${p}`);
2219
2220
  }
2220
2221
  }
2221
2222
  }
2222
- await r("dist"), console.info("🎉 All files uploaded to R2.");
2223
+ await r("dist"), console.info(" Module uploaded to R2.");
2223
2224
  } catch (e) {
2224
2225
  console.error("❌ Error uploading module to R2.", e);
2225
2226
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-development",
3
- "version": "0.3.76",
3
+ "version": "0.3.79",
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>",