@datapos/datapos-development 0.3.261 → 0.3.263

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,22 +7732,22 @@ 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);
7750
+ const s = Bh(i);
7751
7751
  if (i === "app")
7752
7752
  se("7️⃣ Register module"), await Rh();
7753
7753
  else if (i === "engine")
@@ -7756,7 +7756,7 @@ async function ip() {
7756
7756
  se("7️⃣ Registration NOT required.");
7757
7757
  else {
7758
7758
  se("7️⃣ Register module"), await ys();
7759
- const a = t.id.slice(Math.max(0, t.id.lastIndexOf("-") + 1));
7759
+ const a = t.id.split("-").slice(2).join("-");
7760
7760
  await vs(`datapos-engine-eu/${s}/${a}`);
7761
7761
  }
7762
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.`);
@@ -7764,10 +7764,6 @@ async function ip() {
7764
7764
  console.error("❌ Error releasing project.", e), process.exit(1);
7765
7765
  }
7766
7766
  }
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
7767
  async function sp() {
7772
7768
  try {
7773
7769
  Le("Synchronise Project with GitHub");
@@ -7786,22 +7782,22 @@ function rp() {
7786
7782
  console.error("❌ Error testing project.", e), process.exit(1);
7787
7783
  }
7788
7784
  }
7789
- async function zh(e, t) {
7785
+ async function Dh(e, t) {
7790
7786
  se(`${e} Build project configuration`);
7791
7787
  const i = await Ce("config.json");
7792
7788
  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
7789
  }
7794
- async function Vh(e, t) {
7790
+ async function zh(e, t) {
7795
7791
  se(`${e} Build connector project configuration`);
7796
7792
  const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = dh.safeParse(i);
7797
7793
  if (!a.success) {
7798
7794
  console.log("❌ Configuration is invalid:"), console.table(a.error.issues);
7799
7795
  return;
7800
7796
  }
7801
- const o = wi(s), h = Bh(o);
7797
+ const o = wi(s), h = Fh(o);
7802
7798
  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
7799
  }
7804
- async function jh(e, t) {
7800
+ async function Vh(e, t) {
7805
7801
  se(`${e} Build context project configuration`);
7806
7802
  const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = Sh.safeParse(i);
7807
7803
  if (!a.success) {
@@ -7811,7 +7807,7 @@ async function jh(e, t) {
7811
7807
  const o = wi(s);
7812
7808
  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
7809
  }
7814
- async function Fh(e, t) {
7810
+ async function jh(e, t) {
7815
7811
  se(`${e} Build presenter project configuration`);
7816
7812
  const [i, s] = await Promise.all([Ce("config.json"), nt("src/index.ts")]), a = Mh.safeParse(i);
7817
7813
  if (!a.success) {
@@ -7829,13 +7825,13 @@ async function Ar(e, t, i = "./") {
7829
7825
  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
7826
  }
7831
7827
  }
7832
- function Bh(e) {
7828
+ function Fh(e) {
7833
7829
  let t = !1, i = !1;
7834
7830
  for (const s of e)
7835
7831
  Va.includes(s) && (t = !0), za.includes(s) && (i = !0);
7836
7832
  return t && i ? "bidirectional" : t ? "source" : i ? "destination" : "unknown";
7837
7833
  }
7838
- function $h(e) {
7834
+ function Bh(e) {
7839
7835
  switch (e) {
7840
7836
  case "engine":
7841
7837
  return "engine";
@@ -7851,6 +7847,10 @@ function $h(e) {
7851
7847
  return;
7852
7848
  }
7853
7849
  }
7850
+ function $h(e) {
7851
+ const t = e.name ?? "";
7852
+ 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";
7853
+ }
7854
7854
  const Uh = ["critical", "high", "moderate", "low", "unknown"], Zh = {
7855
7855
  critical: { color: "D32F2F", label: "critical" },
7856
7856
  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.263",
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>",