@datapos/datapos-development 0.3.373 → 0.3.377

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/README.md CHANGED
@@ -16,6 +16,7 @@ A collection of utilities for managing Data Positioning projects.
16
16
  Install as a development dependency:
17
17
 
18
18
  ```bash
19
+ cd datapos-development
19
20
  npm install --save-dev @datapos/datapos-development
20
21
  ```
21
22
 
@@ -7808,27 +7808,28 @@ async function yl() {
7808
7808
  async function vl() {
7809
7809
  try {
7810
7810
  Re("Release Project"), await Di();
7811
- const e = await fe("package.json"), t = await fe("config.json");
7811
+ const e = await fe("package.json");
7812
+ let t = await fe("config.json");
7812
7813
  await Os("1️⃣", e);
7813
7814
  const i = Hh.find((r) => t.id.startsWith(r.idPrefix));
7814
7815
  if (!i) throw new Error(`Failed to locate module type configuration for identifier '${t.id}'.`);
7815
7816
  switch (i.typeId) {
7816
7817
  case "connector":
7817
- await Wh("2️⃣", e);
7818
+ t = await Wh("2️⃣", e);
7818
7819
  break;
7819
7820
  case "context":
7820
- await Kh("2️⃣", e);
7821
+ t = await Kh("2️⃣", e);
7821
7822
  break;
7822
7823
  case "presenter":
7823
- await Xh("2️⃣", e);
7824
+ t = await Xh("2️⃣", e);
7824
7825
  break;
7825
7826
  default:
7826
- await Gh("2️⃣", e);
7827
+ t = await Gh("2️⃣", e);
7827
7828
  }
7828
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")
7829
7830
  re("7️⃣ Register module"), await qh();
7830
7831
  else if (i.typeId === "engine")
7831
- re("7️⃣ Register module"), await kr(t), await Sr(e, `datapos-engine-eu/${i.uploadGroupName}`);
7832
+ re("7️⃣ Register module"), console.log(1111, t), await kr(t), await Sr(e, `datapos-engine-eu/${i.uploadGroupName}`);
7832
7833
  else if (i.uploadGroupName === void 0)
7833
7834
  re("7️⃣ Registration NOT required.");
7834
7835
  else {
@@ -7872,37 +7873,31 @@ function gl() {
7872
7873
  async function Gh(e, t) {
7873
7874
  re(`${e} Build project configuration`);
7874
7875
  const i = await fe("config.json");
7875
- 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;
7876
7877
  }
7877
7878
  async function Wh(e, t) {
7878
7879
  re(`${e} Build connector project configuration`);
7879
7880
  const [i, r] = await Promise.all([fe("config.json"), Xe("src/index.ts")]), n = wc.safeParse(i);
7880
- if (!n.success) {
7881
- console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
7882
- return;
7883
- }
7881
+ if (!n.success)
7882
+ throw console.log("❌ Configuration is invalid:"), console.table(n.error.issues), new Error("Configuration is invalid.");
7884
7883
  const u = Ri(r), h = Jh(u);
7885
- 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;
7886
7885
  }
7887
7886
  async function Kh(e, t) {
7888
7887
  re(`${e} Build context project configuration`);
7889
7888
  const [i, r] = await Promise.all([fe("config.json"), Xe("src/index.ts")]), n = Lc.safeParse(i);
7890
- if (!n.success) {
7891
- console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
7892
- return;
7893
- }
7889
+ if (!n.success)
7890
+ throw console.log("❌ Configuration is invalid:"), console.table(n.error.issues), new Error("Configuration is invalid.");
7894
7891
  const u = Ri(r);
7895
- 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;
7896
7893
  }
7897
7894
  async function Xh(e, t) {
7898
7895
  re(`${e} Build presenter project configuration`);
7899
7896
  const [i, r] = await Promise.all([fe("config.json"), Xe("src/index.ts")]), n = Bc.safeParse(i);
7900
- if (!n.success) {
7901
- console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
7902
- return;
7903
- }
7897
+ if (!n.success)
7898
+ throw console.log("❌ Configuration is invalid:"), console.table(n.error.issues), new Error("Configuration is invalid.");
7904
7899
  const u = Ri(r);
7905
- 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;
7906
7901
  }
7907
7902
  async function Os(e, t, i = "./") {
7908
7903
  if (re(`${e} Bump project version`), t.version == null)