@datapos/datapos-development 0.3.76 → 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 +62 -62
- 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,
|
|
@@ -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]);
|
|
@@ -1249,13 +1248,13 @@ const Me = /* @__PURE__ */ a("$ZodCatch", (n, t) => {
|
|
|
1249
1248
|
_.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
1249
|
if (o.direction === "backward") {
|
|
1251
1250
|
const i = t.out._zod.run(e, o);
|
|
1252
|
-
return i instanceof Promise ? i.then((s) =>
|
|
1251
|
+
return i instanceof Promise ? i.then((s) => R(s, t.in, o)) : R(i, t.in, o);
|
|
1253
1252
|
}
|
|
1254
1253
|
const r = t.in._zod.run(e, o);
|
|
1255
|
-
return r instanceof Promise ? r.then((i) =>
|
|
1254
|
+
return r instanceof Promise ? r.then((i) => R(i, t.out, o)) : R(r, t.out, o);
|
|
1256
1255
|
};
|
|
1257
1256
|
});
|
|
1258
|
-
function
|
|
1257
|
+
function R(n, t, e) {
|
|
1259
1258
|
return n.issues.length ? (n.aborted = !0, n) : t._zod.run({ value: n.value, issues: n.issues }, e);
|
|
1260
1259
|
}
|
|
1261
1260
|
const Ke = /* @__PURE__ */ a("$ZodReadonly", (n, t) => {
|
|
@@ -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",
|
|
@@ -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({
|
|
@@ -1690,10 +1689,10 @@ function Co(n, t, e) {
|
|
|
1690
1689
|
function Jo(n) {
|
|
1691
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;
|
|
@@ -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
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);
|
|
@@ -1922,10 +1921,10 @@ const Nr = /* @__PURE__ */ a("ZodTransform", (n, t) => {
|
|
|
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);
|
|
@@ -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("dist"), console.info("
|
|
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