@dpuse/dpuse-development 0.3.617 → 0.3.618

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.
@@ -5862,22 +5862,22 @@ function qn(e, t, n, r) {
5862
5862
  //#region src/actions/auditDependencies.ts
5863
5863
  async function Jn() {
5864
5864
  try {
5865
- G("Audit Dependencies"), await Ln("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited.");
5865
+ G("Audit Dependencies"), await Ln("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited");
5866
5866
  } catch (e) {
5867
- console.error("❌ Error auditing dependencies.", e), process.exit(1);
5867
+ console.error("❌ Error auditing dependencies", e), process.exit(1);
5868
5868
  }
5869
5869
  }
5870
5870
  //#endregion
5871
5871
  //#region src/actions/checkConfigFiles.ts
5872
5872
  async function Yn() {
5873
5873
  try {
5874
- G("Check configuration files.");
5874
+ G("Check configuration files"), q("1️⃣ Check individual files");
5875
5875
  let e = Un((await W("config.json")).id), t = n.dirname(o(import.meta.url));
5876
5876
  await Xn(t, ".editorconfig"), await Xn(t, ".gitattributes"), await Xn(t, ".gitignore", e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"), await Xn(t, ".markdownlint.json"), await Xn(t, ".ncurc.json"), await Xn(t, "LICENSE"), await Xn(t, "tsconfig.scripts.json");
5877
5877
  let r = e.typeId === "tool" ? "vite.config.tool.ts" : "vite.config.default.ts";
5878
- await Xn(t, "vite.config.ts", e.typeId === "development" ? void 0 : r), await Xn(t, "vitest.config.ts"), K("Configuration files checked.");
5878
+ await Xn(t, "vite.config.ts", e.typeId === "development" ? void 0 : r), await Xn(t, "vitest.config.ts"), K("Configuration files checked");
5879
5879
  } catch (e) {
5880
- console.error("❌ Error checking configuration files.", e), process.exit(1);
5880
+ console.error("❌ Error checking configuration files", e), process.exit(1);
5881
5881
  }
5882
5882
  }
5883
5883
  async function Xn(e, t, r) {
@@ -5903,9 +5903,9 @@ async function Zn() {
5903
5903
  upgrade: !0,
5904
5904
  dep: "dev,prod,peer,optional",
5905
5905
  install: "never"
5906
- }), await Ln("3️⃣ Install updated dependencies", "npm", ["install", "--prefer-online"]), K("Dependencies checked.");
5906
+ }), await Ln("3️⃣ Install updated dependencies", "npm", ["install", "--prefer-online"]), K("Dependencies checked");
5907
5907
  } catch (e) {
5908
- console.error("❌ Error checking dependencies.", e), process.exit(1);
5908
+ console.error("❌ Error checking dependencies", e), process.exit(1);
5909
5909
  }
5910
5910
  }
5911
5911
  //#endregion
@@ -5917,9 +5917,9 @@ async function ir(e) {
5917
5917
  let t = await W("./bundle-analysis-reports/rollup-visualiser/index.json");
5918
5918
  q("2️⃣ Insert table into 'README.md'");
5919
5919
  let n = await or(t, await ar(), e?.moduleLevel ?? !1);
5920
- await Hn("README.md", qn(await zn("./README.md"), `\n${n}\n`, er, tr)), K("Bundle sizes documented.");
5920
+ await Hn("README.md", qn(await zn("./README.md"), `\n${n}\n`, er, tr)), K("Bundle sizes documented");
5921
5921
  } catch (e) {
5922
- console.error("❌ Error documenting bundle sizes.", e), process.exit(1);
5922
+ console.error("❌ Error documenting bundle sizes", e), process.exit(1);
5923
5923
  }
5924
5924
  }
5925
5925
  async function ar() {
@@ -5972,12 +5972,12 @@ async function or(e, t, n) {
5972
5972
  }
5973
5973
  function sr(e) {
5974
5974
  let [t] = e;
5975
- if (t === void 0) throw Error("Expected exactly one entry.");
5975
+ if (t === void 0) throw Error("Expected exactly one entry");
5976
5976
  return t;
5977
5977
  }
5978
5978
  function cr(e) {
5979
5979
  let [t] = e.keys();
5980
- if (t === void 0) throw Error("Expected exactly one file.");
5980
+ if (t === void 0) throw Error("Expected exactly one file");
5981
5981
  return t;
5982
5982
  }
5983
5983
  async function lr(e) {
@@ -6066,7 +6066,7 @@ async function Cr(e = "MIT") {
6066
6066
  G("Document Dependencies");
6067
6067
  let t = await W("package.json");
6068
6068
  if (t.name === "@dpuse/dpuse-development") {
6069
- await wr(), K("Dependencies documented.");
6069
+ await wr(), K("Dependencies documented");
6070
6070
  return;
6071
6071
  }
6072
6072
  await Pn("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
@@ -6088,14 +6088,14 @@ async function Cr(e = "MIT") {
6088
6088
  "--all",
6089
6089
  "--json",
6090
6090
  "--omit=dev"
6091
- ], "licenses/licenseTree.json"), await Tr("4️⃣ "), K("Dependencies documented.");
6091
+ ], "licenses/licenseTree.json"), await Tr("4️⃣ "), K("Dependencies documented");
6092
6092
  } catch (e) {
6093
- console.error("❌ Error documenting dependencies.", e), process.exit(1);
6093
+ console.error("❌ Error documenting dependencies", e), process.exit(1);
6094
6094
  }
6095
6095
  }
6096
6096
  async function wr() {
6097
6097
  q("1️⃣ Skip: @dpuse/dpuse-development is a development-only tool and is never part of a production release");
6098
- let e = "⚠️ Dependency licenses are not documented here: @dpuse/dpuse-development is a development-only tool and is never part of a production release.";
6098
+ let e = "⚠️ Dependency licenses are not documented here: @dpuse/dpuse-development is a development-only tool and is never part of a production release";
6099
6099
  await Hn("README.md", qn(qn(await zn("./README.md"), e, yr, br), e, xr, Sr));
6100
6100
  }
6101
6101
  async function Tr(e) {
@@ -6711,9 +6711,9 @@ async function yi() {
6711
6711
  try {
6712
6712
  G("Document Actions"), q("1️⃣ Insert actions table into 'README.md'");
6713
6713
  let e = gi((await W("config.json")).actionNames ?? []);
6714
- await Hn("README.md", qn(await zn("./README.md"), e, _i, vi)), K("Actions documented.");
6714
+ await Hn("README.md", qn(await zn("./README.md"), e, _i, vi)), K("Actions documented");
6715
6715
  } catch (e) {
6716
- console.error("❌ Error documenting actions.", e), process.exit(1);
6716
+ console.error("❌ Error documenting actions", e), process.exit(1);
6717
6717
  }
6718
6718
  }
6719
6719
  //#endregion
@@ -6726,18 +6726,18 @@ async function bi() {
6726
6726
  "*.md",
6727
6727
  "*.ts",
6728
6728
  ...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
6729
- ]), K("Code formatted.");
6729
+ ]), K("Code formatted");
6730
6730
  } catch (e) {
6731
- console.error("❌ Error formatting code.", e), process.exit(1);
6731
+ console.error("❌ Error formatting code", e), process.exit(1);
6732
6732
  }
6733
6733
  }
6734
6734
  //#endregion
6735
6735
  //#region src/actions/lintCode.ts
6736
6736
  async function xi() {
6737
6737
  try {
6738
- G("Lint Code"), await Ln("1️⃣ Lint", "eslint", ["."]), K("Code linted.");
6738
+ G("Lint Code"), await Ln("1️⃣ Lint", "eslint", ["."]), K("Code linted");
6739
6739
  } catch (e) {
6740
- console.error("❌ Error linting code.", e), process.exit(1);
6740
+ console.error("❌ Error linting code", e), process.exit(1);
6741
6741
  }
6742
6742
  }
6743
6743
  //#endregion
@@ -6863,9 +6863,9 @@ var Ai = /* @__PURE__ */ Q({
6863
6863
  ]);
6864
6864
  async function Li() {
6865
6865
  try {
6866
- G("Build Project"), await Ln("1️⃣ Bundle project", "vite", ["build"]), K("Project built.");
6866
+ G("Build Project"), await Ln("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
6867
6867
  } catch (e) {
6868
- console.error("❌ Error building project.", e), process.exit(1);
6868
+ console.error("❌ Error building project", e), process.exit(1);
6869
6869
  }
6870
6870
  }
6871
6871
  async function Ri() {
@@ -6896,7 +6896,7 @@ async function Ri() {
6896
6896
  "main:main"
6897
6897
  ]), n.typeId === "app") q("7️⃣ Register module"), await Si();
6898
6898
  else if (n.typeId === "engine") q("7️⃣ Register module"), await Ti(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await wi(t);
6899
- else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required.");
6899
+ else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required");
6900
6900
  else {
6901
6901
  q("7️⃣ Register module");
6902
6902
  let r = t.id.split("-").slice(2).join("-");
@@ -6916,7 +6916,7 @@ async function Ri() {
6916
6916
  } else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
6917
6917
  K(`Project version '${e.version ?? "unknown"}' released.`);
6918
6918
  } catch (e) {
6919
- console.error("❌ Error releasing project.", e), process.exit(1);
6919
+ console.error("❌ Error releasing project", e), process.exit(1);
6920
6920
  }
6921
6921
  }
6922
6922
  async function zi(e, t) {
@@ -6927,20 +6927,20 @@ async function zi(e, t) {
6927
6927
  async function Bi(e, t) {
6928
6928
  q(`${e} Build connector project configuration`);
6929
6929
  let [n, r] = await Promise.all([W("config.json"), zn("src/index.ts")]), i = /* @__PURE__ */ ki(mi, n);
6930
- if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
6930
+ if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
6931
6931
  let a = Gn(r);
6932
6932
  return await Wi(t, n, a, Ui(a));
6933
6933
  }
6934
6934
  async function Vi(e, t) {
6935
6935
  q(`${e} Build context project configuration`);
6936
6936
  let [n, r] = await Promise.all([W("config.json"), zn("src/index.ts")]), i = /* @__PURE__ */ ki(Mi, n);
6937
- if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
6937
+ if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
6938
6938
  return await Wi(t, n, Gn(r));
6939
6939
  }
6940
6940
  async function Hi(e, t) {
6941
6941
  q(`${e} Build presenter project configuration`);
6942
6942
  let [n, r] = await Promise.all([W("config.json"), zn("src/index.ts")]), i = /* @__PURE__ */ ki(Pi, n);
6943
- if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
6943
+ if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
6944
6944
  return await Wi(t, n, Gn(r));
6945
6945
  }
6946
6946
  function Ui(e) {
@@ -6949,7 +6949,7 @@ function Ui(e) {
6949
6949
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
6950
6950
  }
6951
6951
  async function Wi(e, t, n, r) {
6952
- return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations."), r === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${r ?? "unknown"}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await Vn("config.json", t), t;
6952
+ return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations"), r === "unknown" ? console.warn("⚠️ No usage identified") : console.info(`ℹ️ Supports '${r ?? "unknown"}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await Vn("config.json", t), t;
6953
6953
  }
6954
6954
  async function Gi() {
6955
6955
  try {
@@ -6957,7 +6957,7 @@ async function Gi() {
6957
6957
  let e = await W("package.json"), t = await W("config.json"), n = Un(t.id);
6958
6958
  if (n.typeId === "app") q("1️⃣ Register module"), await Si();
6959
6959
  else if (n.typeId === "engine") q("1️⃣ Register module"), await Ti(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await wi(t);
6960
- else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required.");
6960
+ else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required");
6961
6961
  else {
6962
6962
  q("1️⃣ Register module");
6963
6963
  let r = t.id.split("-").slice(2).join("-");
@@ -6965,7 +6965,7 @@ async function Gi() {
6965
6965
  }
6966
6966
  K(`Project version '${e.version ?? "unknown"}' published.`);
6967
6967
  } catch (e) {
6968
- console.error("❌ Error publishing project.", e), process.exit(1);
6968
+ console.error("❌ Error publishing project", e), process.exit(1);
6969
6969
  }
6970
6970
  }
6971
6971
  async function Ki() {
@@ -6994,14 +6994,14 @@ async function Ki() {
6994
6994
  "main:main"
6995
6995
  ]), K(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
6996
6996
  } catch (e) {
6997
- console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
6997
+ console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
6998
6998
  }
6999
6999
  }
7000
7000
  function qi() {
7001
7001
  try {
7002
7002
  G("Test Project"), console.error("\n❌ No tests implemented.\n");
7003
7003
  } catch (e) {
7004
- console.error("❌ Error testing project.", e), process.exit(1);
7004
+ console.error("❌ Error testing project", e), process.exit(1);
7005
7005
  }
7006
7006
  }
7007
7007
  async function Ji(e, t, n = "./") {