@datapos/datapos-development 0.3.389 → 0.3.390

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.
@@ -156,11 +156,11 @@ function Re(e, t) {
156
156
  };
157
157
  }
158
158
  // @__NO_SIDE_EFFECTS__
159
- function X(e, t) {
159
+ function z(e, t) {
160
160
  return {
161
161
  kind: "schema",
162
162
  type: "nullable",
163
- reference: X,
163
+ reference: z,
164
164
  expects: `(${e.expects} | null)`,
165
165
  async: !1,
166
166
  wrapped: e,
@@ -444,21 +444,21 @@ const $e = (e) => /* @__PURE__ */ bt(e.map((t) => /* @__PURE__ */ Re(t))), Os =
444
444
  label: oi,
445
445
  description: oi,
446
446
  firstCreatedAt: /* @__PURE__ */ F(/* @__PURE__ */ me()),
447
- icon: /* @__PURE__ */ X(/* @__PURE__ */ I()),
448
- iconDark: /* @__PURE__ */ X(/* @__PURE__ */ I()),
449
- lastUpdatedAt: /* @__PURE__ */ X(/* @__PURE__ */ me()),
450
- status: /* @__PURE__ */ X(Bs),
447
+ icon: /* @__PURE__ */ z(/* @__PURE__ */ I()),
448
+ iconDark: /* @__PURE__ */ z(/* @__PURE__ */ I()),
449
+ lastUpdatedAt: /* @__PURE__ */ z(/* @__PURE__ */ me()),
450
+ status: /* @__PURE__ */ z(Bs),
451
451
  statusId: Rs,
452
452
  typeId: /* @__PURE__ */ Re("connector"),
453
453
  version: /* @__PURE__ */ I(),
454
- category: /* @__PURE__ */ X(Us),
454
+ category: /* @__PURE__ */ z(Us),
455
455
  categoryId: Ds,
456
456
  implementations: /* @__PURE__ */ qt(/* @__PURE__ */ I(), qs),
457
457
  operations: /* @__PURE__ */ Oe(Ms),
458
458
  usageId: Vs,
459
- vendorAccountURL: /* @__PURE__ */ X(/* @__PURE__ */ I()),
460
- vendorDocumentationURL: /* @__PURE__ */ X(/* @__PURE__ */ I()),
461
- vendorHomeURL: /* @__PURE__ */ X(/* @__PURE__ */ I())
459
+ vendorAccountURL: /* @__PURE__ */ z(/* @__PURE__ */ I()),
460
+ vendorDocumentationURL: /* @__PURE__ */ z(/* @__PURE__ */ I()),
461
+ vendorHomeURL: /* @__PURE__ */ z(/* @__PURE__ */ I())
462
462
  }), $t = (e) => /* @__PURE__ */ bt(e.map((t) => /* @__PURE__ */ Re(t))), lt = /* @__PURE__ */ J({
463
463
  "en-au": /* @__PURE__ */ F(/* @__PURE__ */ I()),
464
464
  "en-gb": /* @__PURE__ */ F(/* @__PURE__ */ I()),
@@ -483,10 +483,10 @@ const $e = (e) => /* @__PURE__ */ bt(e.map((t) => /* @__PURE__ */ Re(t))), Os =
483
483
  label: lt,
484
484
  description: lt,
485
485
  firstCreatedAt: /* @__PURE__ */ F(/* @__PURE__ */ me()),
486
- icon: /* @__PURE__ */ X(/* @__PURE__ */ I()),
487
- iconDark: /* @__PURE__ */ X(/* @__PURE__ */ I()),
488
- lastUpdatedAt: /* @__PURE__ */ X(/* @__PURE__ */ me()),
489
- status: /* @__PURE__ */ X(Ws),
486
+ icon: /* @__PURE__ */ z(/* @__PURE__ */ I()),
487
+ iconDark: /* @__PURE__ */ z(/* @__PURE__ */ I()),
488
+ lastUpdatedAt: /* @__PURE__ */ z(/* @__PURE__ */ me()),
489
+ status: /* @__PURE__ */ z(Ws),
490
490
  statusId: Ks
491
491
  }, zs = /* @__PURE__ */ J({
492
492
  id: /* @__PURE__ */ I(),
@@ -531,10 +531,10 @@ const $e = (e) => /* @__PURE__ */ bt(e.map((t) => /* @__PURE__ */ Re(t))), Os =
531
531
  label: ft,
532
532
  description: ft,
533
533
  firstCreatedAt: /* @__PURE__ */ F(/* @__PURE__ */ me()),
534
- icon: /* @__PURE__ */ X(/* @__PURE__ */ I()),
535
- iconDark: /* @__PURE__ */ X(/* @__PURE__ */ I()),
536
- lastUpdatedAt: /* @__PURE__ */ X(/* @__PURE__ */ me()),
537
- status: /* @__PURE__ */ X(er),
534
+ icon: /* @__PURE__ */ z(/* @__PURE__ */ I()),
535
+ iconDark: /* @__PURE__ */ z(/* @__PURE__ */ I()),
536
+ lastUpdatedAt: /* @__PURE__ */ z(/* @__PURE__ */ me()),
537
+ status: /* @__PURE__ */ z(er),
538
538
  statusId: Ys
539
539
  }, ir = /* @__PURE__ */ J({
540
540
  id: /* @__PURE__ */ I(),
@@ -5650,7 +5650,7 @@ function Zt(e) {
5650
5650
  }
5651
5651
  async function de(e, t, s = [], a) {
5652
5652
  const n = `${t} ${s.join(" ")}`;
5653
- e !== void 0 && z(`${e} - exec(${n})`);
5653
+ e !== void 0 && X(`${e} - exec(${n})`);
5654
5654
  const { stdout: p, stderr: f } = await ia(n);
5655
5655
  a === void 0 ? p.trim() && console.log(p.trim()) : await he.writeFile(a, p.trim(), "utf8"), f.trim() && console.error(f.trim());
5656
5656
  }
@@ -5658,7 +5658,6 @@ async function ra(e, t) {
5658
5658
  return he.readdir(e, t);
5659
5659
  }
5660
5660
  async function ei() {
5661
- z("Load environment variables"), (await import("dotenv")).config();
5662
5661
  }
5663
5662
  function Ce(e) {
5664
5663
  const t = "\x1B[36m", s = "\x1B[0m", a = "─".repeat(Math.max(e.length + 60, 60));
@@ -5670,7 +5669,7 @@ function Ie(e) {
5670
5669
  ✅ ${e}
5671
5670
  `);
5672
5671
  }
5673
- function z(e) {
5672
+ function X(e) {
5674
5673
  console.info(`
5675
5674
  ${e}
5676
5675
  `);
@@ -5689,7 +5688,7 @@ async function aa(e) {
5689
5688
  }
5690
5689
  }
5691
5690
  async function be(e, t, s = [], a = !1) {
5692
- return z(`${e} - spawn(${t} ${s.join(" ")})`), new Promise((n, p) => {
5691
+ return X(`${e} - spawn(${t} ${s.join(" ")})`), new Promise((n, p) => {
5693
5692
  bs(t, s, { stdio: "inherit" }).on("close", (x) => {
5694
5693
  x === 0 || a ? n() : p(new Error(`${t} exited with code ${x}`));
5695
5694
  });
@@ -5791,13 +5790,13 @@ async function La() {
5791
5790
  t = await ua("2️⃣", e);
5792
5791
  }
5793
5792
  if (await be("3️⃣ Bundle project", "vite", ["build"]), await de("4️⃣ Stage changes", "git", ["add", "."]), await de("5️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await de("6️⃣ Push changes", "git", ["push", "origin", "main:main"]), s.typeId === "app")
5794
- z("7️⃣ Register module"), await na();
5793
+ X("7️⃣ Register module"), await na();
5795
5794
  else if (s.typeId === "engine")
5796
- z("7️⃣ Register module"), await Si(e, `datapos-engine-eu/${s.uploadGroupName}`), await bi(t);
5795
+ X("7️⃣ Register module"), await Si(e, `datapos-engine-eu/${s.uploadGroupName}`), await bi(t);
5797
5796
  else if (s.uploadGroupName === void 0)
5798
- z("7️⃣ Registration NOT required.");
5797
+ X("7️⃣ Registration NOT required.");
5799
5798
  else {
5800
- z("7️⃣ Register module");
5799
+ X("7️⃣ Register module");
5801
5800
  const a = t.id.split("-").slice(2).join("-");
5802
5801
  await Si(e, `datapos-engine-eu/${s.uploadGroupName}/${a}`), await bi(t);
5803
5802
  }
@@ -5810,7 +5809,7 @@ async function La() {
5810
5809
  await aa(a);
5811
5810
  }
5812
5811
  } else
5813
- z(`8️⃣ Publishing NOT required for package with type identifier of '${s.typeId}'.`);
5812
+ X(`8️⃣ Publishing NOT required for package with type identifier of '${s.typeId}'.`);
5814
5813
  Ie(`Project version '${e.version}' released.`);
5815
5814
  } catch (e) {
5816
5815
  console.error("❌ Error releasing project.", e), process.exit(1);
@@ -5820,7 +5819,7 @@ async function Oa() {
5820
5819
  try {
5821
5820
  Ce("Synchronise Project with GitHub");
5822
5821
  const e = await ae("package.json");
5823
- z("Bump project version"), await cs("1️⃣", e), await de("2️⃣ Stage changes", "git", ["add", "."]), await de("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await de("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), Ie(`Project version '${e.version}' synchronised with GitHub.`);
5822
+ X("Bump project version"), await cs("1️⃣", e), await de("2️⃣ Stage changes", "git", ["add", "."]), await de("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await de("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), Ie(`Project version '${e.version}' synchronised with GitHub.`);
5824
5823
  } catch (e) {
5825
5824
  console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
5826
5825
  }
@@ -5835,12 +5834,12 @@ function Ra() {
5835
5834
  }
5836
5835
  }
5837
5836
  async function ua(e, t) {
5838
- z(`${e} Build project configuration`);
5837
+ X(`${e} Build project configuration`);
5839
5838
  const s = await ae("config.json");
5840
5839
  return t.name != null && (s.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (s.version = t.version), await He("config.json", s), s;
5841
5840
  }
5842
5841
  async function ha(e, t) {
5843
- z(`${e} Build connector project configuration`);
5842
+ X(`${e} Build connector project configuration`);
5844
5843
  const [s, a] = await Promise.all([ae("config.json"), Me("src/index.ts")]), n = /* @__PURE__ */ Ht(Hs, s);
5845
5844
  if (!n.success)
5846
5845
  throw console.error("❌ Configuration is invalid:"), console.table(n.issues), new Error("Configuration is invalid.");
@@ -5848,7 +5847,7 @@ async function ha(e, t) {
5848
5847
  return p.length > 0 ? (console.info(`ℹ️ Implements ${p.length} operations:`), console.table(p)) : console.warn("⚠️ Implements no operations."), f === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${f}' usage.`), t.name != null && (s.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (s.version = t.version), s.operations = p, s.usageId = f, await He("config.json", s), s;
5849
5848
  }
5850
5849
  async function ca(e, t) {
5851
- z(`${e} Build context project configuration`);
5850
+ X(`${e} Build context project configuration`);
5852
5851
  const [s, a] = await Promise.all([ae("config.json"), Me("src/index.ts")]), n = /* @__PURE__ */ Ht(Qs, s);
5853
5852
  if (!n.success)
5854
5853
  throw console.error("❌ Configuration is invalid:"), console.table(n.issues), new Error("Configuration is invalid.");
@@ -5856,7 +5855,7 @@ async function ca(e, t) {
5856
5855
  return p.length > 0 ? (console.info(`ℹ️ Implements ${p.length} operations:`), console.table(p)) : console.warn("⚠️ Implements no operations."), t.name != null && (s.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (s.version = t.version), s.operations = p, await He("config.json", s), s;
5857
5856
  }
5858
5857
  async function pa(e, t) {
5859
- z(`${e} Build presenter project configuration`);
5858
+ X(`${e} Build presenter project configuration`);
5860
5859
  const [s, a] = await Promise.all([ae("config.json"), Me("src/index.ts")]), n = /* @__PURE__ */ Ht(sr, s);
5861
5860
  if (!n.success)
5862
5861
  throw console.error("❌ Configuration is invalid:"), console.table(n.issues), new Error("Configuration is invalid.");
@@ -5864,7 +5863,7 @@ async function pa(e, t) {
5864
5863
  return p.length > 0 ? (console.info(`ℹ️ Implements ${p.length} operations:`), console.table(p)) : console.warn("⚠️ Implements no operations."), t.name != null && (s.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (s.version = t.version), s.operations = p, await He("config.json", s), s;
5865
5864
  }
5866
5865
  async function cs(e, t, s = "./") {
5867
- if (z(`${e} Bump project version`), t.version == null)
5866
+ if (X(`${e} Bump project version`), t.version == null)
5868
5867
  t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await He(`${s}package.json`, t);
5869
5868
  else {
5870
5869
  const a = t.version, n = t.version.split(".");
@@ -5904,7 +5903,7 @@ async function Da() {
5904
5903
  }
5905
5904
  }
5906
5905
  async function ya(e) {
5907
- z(`${e} Insert OWASP Badge(s) into 'README.md'`);
5906
+ X(`${e} Insert OWASP Badge(s) into 'README.md'`);
5908
5907
  const t = await ae("dependency-check-reports/dependency-check-report.json"), s = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
5909
5908
  for (const f of t.dependencies)
5910
5909
  if (f.vulnerabilities != null)
@@ -5950,7 +5949,7 @@ async function Va(e = [], t = !0) {
5950
5949
  "license-report-recursive",
5951
5950
  ["--only=prod,peer", "--output=tree", "--recurse", "--department.value=n/a", "--licensePeriod.value=n/a", "--material.value=n/a", "--relatedTo.value=n/a"],
5952
5951
  "licenses/licenseTree.json"
5953
- ), await de("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...s])) : (z("3️⃣ Skip 'licenses/licenseTree.json' file generate"), z("4️⃣ Skip 'licenses/licenseTree.json' file check")), await sa("licenses/downloads"), await de("5️⃣ Download license files", "license-downloader", [
5952
+ ), await de("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...s])) : (X("3️⃣ Skip 'licenses/licenseTree.json' file generate"), X("4️⃣ Skip 'licenses/licenseTree.json' file check")), await sa("licenses/downloads"), await de("5️⃣ Download license files", "license-downloader", [
5954
5953
  "--source",
5955
5954
  "licenses/licenses.json",
5956
5955
  "--licDir",
@@ -5964,7 +5963,7 @@ async function Va(e = [], t = !0) {
5964
5963
  }
5965
5964
  }
5966
5965
  async function ba(e, t) {
5967
- z(`${e} Insert licenses into 'README.md'`);
5966
+ X(`${e} Insert licenses into 'README.md'`);
5968
5967
  const s = await ae("licenses/licenses.json"), a = await ae("licenses/downloads/licenses.ext.json");
5969
5968
  let n = [];
5970
5969
  t && (n = await ae("licenses/licenseTree.json"));
@@ -6006,7 +6005,7 @@ function Sa(e) {
6006
6005
  }
6007
6006
  async function Fa() {
6008
6007
  try {
6009
- Ce("Format Code"), await be("1️⃣ Format", "prettier", ["--write", "*.json", "*.md", "*.ts", "src/**"]), Ie("Code formatted.");
6008
+ Ce("Format Code"), await be("1️⃣ Format", "prettier", ["--write", "*.json", "*.md", "*.ts", "app/**", "src/**"]), Ie("Code formatted.");
6010
6009
  } catch (e) {
6011
6010
  console.error("❌ Error formatting code.", e), process.exit(1);
6012
6011
  }