@datapos/datapos-development 0.3.376 → 0.3.378
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.
|
@@ -7766,13 +7766,12 @@ async function qh() {
|
|
|
7766
7766
|
if (!i.ok) throw new Error(await i.text());
|
|
7767
7767
|
}
|
|
7768
7768
|
async function kr(e) {
|
|
7769
|
-
console.log(2222, e);
|
|
7770
7769
|
const t = e.id, i = {
|
|
7771
7770
|
body: JSON.stringify(e),
|
|
7772
7771
|
headers: { "Content-Type": "application/json" },
|
|
7773
7772
|
method: "PUT"
|
|
7774
7773
|
}, r = await fetch(`https://api.datapos.app/states/${t}`, i);
|
|
7775
|
-
if (
|
|
7774
|
+
if (!r.ok) throw new Error(await r.text());
|
|
7776
7775
|
}
|
|
7777
7776
|
async function Sr(e, t) {
|
|
7778
7777
|
const i = `v${e.version}`;
|
|
@@ -7809,22 +7808,23 @@ async function yl() {
|
|
|
7809
7808
|
async function vl() {
|
|
7810
7809
|
try {
|
|
7811
7810
|
Re("Release Project"), await Di();
|
|
7812
|
-
const e = await fe("package.json")
|
|
7811
|
+
const e = await fe("package.json");
|
|
7812
|
+
let t = await fe("config.json");
|
|
7813
7813
|
await Os("1️⃣", e);
|
|
7814
7814
|
const i = Hh.find((r) => t.id.startsWith(r.idPrefix));
|
|
7815
7815
|
if (!i) throw new Error(`Failed to locate module type configuration for identifier '${t.id}'.`);
|
|
7816
7816
|
switch (i.typeId) {
|
|
7817
7817
|
case "connector":
|
|
7818
|
-
await Wh("2️⃣", e);
|
|
7818
|
+
t = await Wh("2️⃣", e);
|
|
7819
7819
|
break;
|
|
7820
7820
|
case "context":
|
|
7821
|
-
await Kh("2️⃣", e);
|
|
7821
|
+
t = await Kh("2️⃣", e);
|
|
7822
7822
|
break;
|
|
7823
7823
|
case "presenter":
|
|
7824
|
-
await Xh("2️⃣", e);
|
|
7824
|
+
t = await Xh("2️⃣", e);
|
|
7825
7825
|
break;
|
|
7826
7826
|
default:
|
|
7827
|
-
await Gh("2️⃣", e);
|
|
7827
|
+
t = await Gh("2️⃣", e);
|
|
7828
7828
|
}
|
|
7829
7829
|
if (await Ie("3️⃣ Bundle project", "vite", ["build"]), await Se("4️⃣ Stage changes", "git", ["add", "."]), await Se("5️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Se("6️⃣ Push changes", "git", ["push", "origin", "main:main"]), i.typeId === "app")
|
|
7830
7830
|
re("7️⃣ Register module"), await qh();
|
|
@@ -7833,9 +7833,9 @@ async function vl() {
|
|
|
7833
7833
|
else if (i.uploadGroupName === void 0)
|
|
7834
7834
|
re("7️⃣ Registration NOT required.");
|
|
7835
7835
|
else {
|
|
7836
|
-
re("7️⃣ Register module")
|
|
7836
|
+
re("7️⃣ Register module");
|
|
7837
7837
|
const r = t.id.split("-").slice(2).join("-");
|
|
7838
|
-
await Sr(e, `datapos-engine-eu/${i.uploadGroupName}/${r}`);
|
|
7838
|
+
await Sr(e, `datapos-engine-eu/${i.uploadGroupName}/${r}`), await kr(t);
|
|
7839
7839
|
}
|
|
7840
7840
|
if (i.publish) {
|
|
7841
7841
|
const r = ".npmrc";
|
|
@@ -7873,37 +7873,31 @@ function gl() {
|
|
|
7873
7873
|
async function Gh(e, t) {
|
|
7874
7874
|
re(`${e} Build project configuration`);
|
|
7875
7875
|
const i = await fe("config.json");
|
|
7876
|
-
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ct("config.json", i);
|
|
7876
|
+
return t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ct("config.json", i), i;
|
|
7877
7877
|
}
|
|
7878
7878
|
async function Wh(e, t) {
|
|
7879
7879
|
re(`${e} Build connector project configuration`);
|
|
7880
7880
|
const [i, r] = await Promise.all([fe("config.json"), Xe("src/index.ts")]), n = wc.safeParse(i);
|
|
7881
|
-
if (!n.success)
|
|
7882
|
-
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7883
|
-
return;
|
|
7884
|
-
}
|
|
7881
|
+
if (!n.success)
|
|
7882
|
+
throw console.log("❌ Configuration is invalid:"), console.table(n.error.issues), new Error("Configuration is invalid.");
|
|
7885
7883
|
const u = Ri(r), h = Jh(u);
|
|
7886
|
-
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), h === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${h}' usage.`), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, i.usageId = h, await ct("config.json", i);
|
|
7884
|
+
return u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), h === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${h}' usage.`), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, i.usageId = h, await ct("config.json", i), i;
|
|
7887
7885
|
}
|
|
7888
7886
|
async function Kh(e, t) {
|
|
7889
7887
|
re(`${e} Build context project configuration`);
|
|
7890
7888
|
const [i, r] = await Promise.all([fe("config.json"), Xe("src/index.ts")]), n = Lc.safeParse(i);
|
|
7891
|
-
if (!n.success)
|
|
7892
|
-
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7893
|
-
return;
|
|
7894
|
-
}
|
|
7889
|
+
if (!n.success)
|
|
7890
|
+
throw console.log("❌ Configuration is invalid:"), console.table(n.error.issues), new Error("Configuration is invalid.");
|
|
7895
7891
|
const u = Ri(r);
|
|
7896
|
-
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ct("config.json", i);
|
|
7892
|
+
return u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ct("config.json", i), i;
|
|
7897
7893
|
}
|
|
7898
7894
|
async function Xh(e, t) {
|
|
7899
7895
|
re(`${e} Build presenter project configuration`);
|
|
7900
7896
|
const [i, r] = await Promise.all([fe("config.json"), Xe("src/index.ts")]), n = Bc.safeParse(i);
|
|
7901
|
-
if (!n.success)
|
|
7902
|
-
console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
|
|
7903
|
-
return;
|
|
7904
|
-
}
|
|
7897
|
+
if (!n.success)
|
|
7898
|
+
throw console.log("❌ Configuration is invalid:"), console.table(n.error.issues), new Error("Configuration is invalid.");
|
|
7905
7899
|
const u = Ri(r);
|
|
7906
|
-
u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ct("config.json", i);
|
|
7900
|
+
return u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ct("config.json", i), i;
|
|
7907
7901
|
}
|
|
7908
7902
|
async function Os(e, t, i = "./") {
|
|
7909
7903
|
if (re(`${e} Bump project version`), t.version == null)
|