@datapos/datapos-development 0.3.261 → 0.3.262

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.
@@ -7732,42 +7732,27 @@ async function ip() {
7732
7732
  Le("Release Project");
7733
7733
  const e = await Ce("package.json"), t = await Ce("config.json");
7734
7734
  await Ar("1️⃣", e);
7735
- const i = Dh(e);
7735
+ const i = $h(e);
7736
7736
  switch (i) {
7737
7737
  case "connector":
7738
- await Vh("2️⃣", e);
7738
+ await zh("2️⃣", e);
7739
7739
  break;
7740
7740
  case "context":
7741
- await jh("2️⃣", e);
7741
+ await Vh("2️⃣", e);
7742
7742
  break;
7743
7743
  case "presenter":
7744
- await Fh("2️⃣", e);
7744
+ await jh("2️⃣", e);
7745
7745
  break;
7746
7746
  default:
7747
- await zh("2️⃣", e);
7747
+ await Dh("2️⃣", e);
7748
7748
  }
7749
7749
  await Ee("3️⃣ Bundle project", "vite", ["build"]), await Te("4️⃣ Stage changes", "git", ["add", "."]), await Te("5️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("6️⃣ Push changes", "git", ["push", "origin", "main:main"]);
7750
- const s = $h(i);
7751
- if (i === "app")
7752
- se("7️⃣ Register module"), await Rh();
7753
- else if (i === "engine")
7754
- se("7️⃣ Register module"), await ys(), await vs(`datapos-engine-eu/${s}`);
7755
- else if (s === void 0)
7756
- se("7️⃣ Registration NOT required.");
7757
- else {
7758
- se("7️⃣ Register module"), await ys();
7759
- const a = t.id.slice(Math.max(0, t.id.lastIndexOf("-") + 1));
7760
- await vs(`datapos-engine-eu/${s}/${a}`);
7761
- }
7762
- i === "connector" || i === "context" || i === "dev" || i === "presenter" || i === "shared" || i === "tool" ? await Ee("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"]) : se(`8️⃣ Publishing NOT required for package with type identifier of '${i}'.`), Fe(`Project version '${e.version}' released.`);
7750
+ const s = Bh(i);
7751
+ i === "app" ? (se("7️⃣ Register module"), await Rh()) : i === "engine" ? (se("7️⃣ Register module"), await ys(), await vs(`datapos-engine-eu/${s}`)) : s === void 0 ? se("7️⃣ Registration NOT required.") : (se("7️⃣ Register module"), await ys(), await vs(`datapos-engine-eu/${s}/${i}`)), i === "connector" || i === "context" || i === "dev" || i === "presenter" || i === "shared" || i === "tool" ? await Ee("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"]) : se(`8️⃣ Publishing NOT required for package with type identifier of '${i}'.`), Fe(`Project version '${e.version}' released.`);
7763
7752
  } catch (e) {
7764
7753
  console.error("❌ Error releasing project.", e), process.exit(1);
7765
7754
  }
7766
7755
  }
7767
- function Dh(e) {
7768
- const t = e.name ?? "";
7769
- return t === "datapos-app" ? "app" : t === "datapos-api" ? "api" : t === "datapos-engine" ? "engine" : t === "@datapos/datapos-development" ? "dev" : t.includes("datapos-connector") ? "connector" : t.includes("datapos-context") ? "context" : t.includes("datapos-presenter") ? "presenter" : t.includes("datapos-tool") ? "tool" : "other";
7770
- }
7771
7756
  async function sp() {
7772
7757
  try {
7773
7758
  Le("Synchronise Project with GitHub");
@@ -7786,22 +7771,22 @@ function rp() {
7786
7771
  console.error("❌ Error testing project.", e), process.exit(1);
7787
7772
  }
7788
7773
  }
7789
- async function zh(e, t) {
7774
+ async function Dh(e, t) {
7790
7775
  se(`${e} Build project configuration`);
7791
7776
  const i = await Ce("config.json");
7792
7777
  t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ot("config.json", i);
7793
7778
  }
7794
- async function Vh(e, t) {
7779
+ async function zh(e, t) {
7795
7780
  se(`${e} Build connector project configuration`);
7796
7781
  const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = dh.safeParse(i);
7797
7782
  if (!a.success) {
7798
7783
  console.log("❌ Configuration is invalid:"), console.table(a.error.issues);
7799
7784
  return;
7800
7785
  }
7801
- const o = wi(s), h = Bh(o);
7786
+ const o = wi(s), h = Fh(o);
7802
7787
  o.length > 0 ? (console.info(`ℹ️ Implements ${o.length} operations:`), console.table(o)) : 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 = o, i.usageId = h, await ot("config.json", i);
7803
7788
  }
7804
- async function jh(e, t) {
7789
+ async function Vh(e, t) {
7805
7790
  se(`${e} Build context project configuration`);
7806
7791
  const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = Sh.safeParse(i);
7807
7792
  if (!a.success) {
@@ -7811,7 +7796,7 @@ async function jh(e, t) {
7811
7796
  const o = wi(s);
7812
7797
  o.length > 0 ? (console.info(`ℹ️ Implements ${o.length} operations:`), console.table(o)) : 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 = o, await ot("config.json", i);
7813
7798
  }
7814
- async function Fh(e, t) {
7799
+ async function jh(e, t) {
7815
7800
  se(`${e} Build presenter project configuration`);
7816
7801
  const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = Mh.safeParse(i);
7817
7802
  if (!a.success) {
@@ -7829,13 +7814,13 @@ async function Ar(e, t, i = "./") {
7829
7814
  t.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, console.info(`Project version bumped from '${s}' to '${t.version}'.`), await ot(`${i}package.json`, t);
7830
7815
  }
7831
7816
  }
7832
- function Bh(e) {
7817
+ function Fh(e) {
7833
7818
  let t = !1, i = !1;
7834
7819
  for (const s of e)
7835
7820
  Va.includes(s) && (t = !0), za.includes(s) && (i = !0);
7836
7821
  return t && i ? "bidirectional" : t ? "source" : i ? "destination" : "unknown";
7837
7822
  }
7838
- function $h(e) {
7823
+ function Bh(e) {
7839
7824
  switch (e) {
7840
7825
  case "engine":
7841
7826
  return "engine";
@@ -7851,6 +7836,10 @@ function $h(e) {
7851
7836
  return;
7852
7837
  }
7853
7838
  }
7839
+ function $h(e) {
7840
+ const t = e.name ?? "";
7841
+ return t === "datapos-app" ? "app" : t === "datapos-api" ? "api" : t === "datapos-engine" ? "engine" : t === "@datapos/datapos-development" ? "dev" : t.includes("datapos-connector") ? "connector" : t.includes("datapos-context") ? "context" : t.includes("datapos-presenter") ? "presenter" : t.includes("datapos-tool") ? "tool" : "other";
7842
+ }
7854
7843
  const Uh = ["critical", "high", "moderate", "low", "unknown"], Zh = {
7855
7844
  critical: { color: "D32F2F", label: "critical" },
7856
7845
  high: { color: "EF6C00", label: "high" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-development",
3
- "version": "0.3.261",
3
+ "version": "0.3.262",
4
4
  "description": "A library of utilities for managing the Data Positioning repositories.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",