@dpuse/dpuse-development 0.3.692 → 0.3.694

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.
@@ -5796,16 +5796,24 @@ async function W(e) {
5796
5796
  return await t.readFile(e, "utf8");
5797
5797
  }
5798
5798
  async function Rn(e) {
5799
+ try {
5800
+ return await t.readFile(e, "utf8");
5801
+ } catch (e) {
5802
+ if (e.code === "ENOENT") return null;
5803
+ throw e;
5804
+ }
5805
+ }
5806
+ async function zn(e) {
5799
5807
  try {
5800
5808
  await t.unlink(e);
5801
5809
  } catch (e) {
5802
5810
  if (e.code !== "ENOENT") throw e;
5803
5811
  }
5804
5812
  }
5805
- async function zn(e, n) {
5813
+ async function Bn(e, n) {
5806
5814
  await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
5807
5815
  }
5808
- async function Bn(e, n) {
5816
+ async function Vn(e, n) {
5809
5817
  await t.writeFile(e, n, "utf8");
5810
5818
  }
5811
5819
  function G(e) {
@@ -5818,21 +5826,21 @@ function K(e) {
5818
5826
  function q(e) {
5819
5827
  console.info(`\n${e}\n`);
5820
5828
  }
5821
- function Vn(e) {
5829
+ function Hn(e) {
5822
5830
  let t = jn.find((t) => e.startsWith(t.idPrefix));
5823
5831
  if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
5824
5832
  return t;
5825
5833
  }
5826
- async function Hn(e) {
5834
+ async function Un(e) {
5827
5835
  return await t.stat(e);
5828
5836
  }
5829
- function Un(e) {
5837
+ function Wn(e) {
5830
5838
  let t = k.extend(An()).parse(e, {
5831
5839
  ecmaVersion: "latest",
5832
5840
  sourceType: "module",
5833
5841
  locations: !0
5834
5842
  }), n = [];
5835
- return Wn(t, (e) => {
5843
+ return Gn(t, (e) => {
5836
5844
  if (e.type !== "MethodDefinition") return;
5837
5845
  let t = e, r = t.key;
5838
5846
  if (r.type !== "Identifier") return;
@@ -5840,7 +5848,7 @@ function Un(e) {
5840
5848
  i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
5841
5849
  }), n;
5842
5850
  }
5843
- function Wn(e, t) {
5851
+ function Gn(e, t) {
5844
5852
  t(e);
5845
5853
  for (let [n, r] of Object.entries(e)) {
5846
5854
  if ([
@@ -5853,12 +5861,12 @@ function Wn(e, t) {
5853
5861
  let e = r;
5854
5862
  if (Array.isArray(e)) for (let n of e) {
5855
5863
  let e = n;
5856
- e && typeof e.type == "string" && Wn(e, t);
5864
+ e && typeof e.type == "string" && Gn(e, t);
5857
5865
  }
5858
- else e && typeof e == "object" && typeof e.type == "string" && Wn(e, t);
5866
+ else e && typeof e == "object" && typeof e.type == "string" && Gn(e, t);
5859
5867
  }
5860
5868
  }
5861
- function Gn(e, t, n, r) {
5869
+ function Kn(e, t, n, r) {
5862
5870
  let i = e.indexOf(n), a = e.indexOf(r);
5863
5871
  if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
5864
5872
  let o = t.trim();
@@ -5866,7 +5874,7 @@ function Gn(e, t, n, r) {
5866
5874
  }
5867
5875
  //#endregion
5868
5876
  //#region src/actions/auditDependencies.ts
5869
- async function Kn() {
5877
+ async function qn() {
5870
5878
  try {
5871
5879
  G("Audit Dependencies"), await In("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited");
5872
5880
  } catch (e) {
@@ -5875,19 +5883,19 @@ async function Kn() {
5875
5883
  }
5876
5884
  //#endregion
5877
5885
  //#region src/actions/checkConfigFiles.ts
5878
- async function qn() {
5886
+ async function Jn() {
5879
5887
  try {
5880
5888
  G("Check configuration files"), q("1️⃣ Check individual files");
5881
- let e = Vn((await U("config.json")).id), t = n.dirname(o(import.meta.url));
5882
- await J(t, ".editorconfig"), await Jn(e, t), await J(t, ".gitignore", [e.publishedTo === "npm" ? ".gitignore_npm_published" : ".gitignore_default"]), await J(t, ".markdownlint.json"), await J(t, ".ncurc.json"), await Yn(e, t), await J(t, "LICENSE"), await Xn(e, t), await J(t, "tsconfig.scripts.json"), await Zn(e, t), await Qn(e, t), K("Configuration files checked");
5889
+ let e = Hn((await U("config.json")).id), t = n.dirname(o(import.meta.url));
5890
+ await J(t, ".editorconfig"), await Yn(e, t), await J(t, ".gitignore", [e.publishedTo === "npm" ? ".gitignore_npm_published" : ".gitignore_default"]), await J(t, ".markdownlint.json"), await J(t, ".ncurc.json"), await Xn(e, t), await J(t, "LICENSE"), await Zn(e, t), await J(t, "tsconfig.scripts.json"), await Qn(e, t), await $n(e, t), K("Configuration files checked");
5883
5891
  } catch (e) {
5884
5892
  console.error("❌ Error checking configuration files", e), process.exit(1);
5885
5893
  }
5886
5894
  }
5887
- async function Jn(e, t) {
5895
+ async function Yn(e, t) {
5888
5896
  ["development"].includes(e.typeId) ? console.info("ℹ️ File '.gitattributes' is UNIQUE to this project") : await J(t, ".gitattributes", [".gitattributes_default"]);
5889
5897
  }
5890
- async function Yn(e, t) {
5898
+ async function Xn(e, t) {
5891
5899
  [
5892
5900
  "app",
5893
5901
  "api",
@@ -5895,7 +5903,7 @@ async function Yn(e, t) {
5895
5903
  "eslint"
5896
5904
  ].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is UNIQUE to this project") : await J(t, "eslint.config.js", ["eslint.config.default.js"]);
5897
5905
  }
5898
- async function Xn(e, t) {
5906
+ async function Zn(e, t) {
5899
5907
  [
5900
5908
  "connector",
5901
5909
  "engine",
@@ -5903,7 +5911,7 @@ async function Xn(e, t) {
5903
5911
  "tool"
5904
5912
  ].includes(e.typeId) ? await J(t, "tsconfig.json", ["tsconfig.default.json"]) : console.info("ℹ️ File 'tsconfig.json' is UNIQUE to this project");
5905
5913
  }
5906
- async function Zn(e, t) {
5914
+ async function Qn(e, t) {
5907
5915
  if (["eslint", "kb"].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is NOT required by this project");
5908
5916
  else if ([
5909
5917
  "app",
@@ -5917,7 +5925,7 @@ async function Zn(e, t) {
5917
5925
  n = e.typeId === "connector" ? ["vite.config.default.ts", "vite.config.wasm.ts"] : e.typeId === "tool" ? ["vite.config.tool.ts"] : ["vite.config.default.ts"], await J(t, "vite.config.ts", n);
5918
5926
  }
5919
5927
  }
5920
- async function Qn(e, t) {
5928
+ async function $n(e, t) {
5921
5929
  [
5922
5930
  "app",
5923
5931
  "api",
@@ -5943,7 +5951,7 @@ async function J(e, t, r = []) {
5943
5951
  }
5944
5952
  //#endregion
5945
5953
  //#region src/actions/checkDependencies.ts
5946
- async function $n() {
5954
+ async function er() {
5947
5955
  try {
5948
5956
  G("Check Dependencies"), await In("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), q("2️⃣ Check using 'npm-check-updates'");
5949
5957
  let e = {};
@@ -5965,78 +5973,78 @@ async function $n() {
5965
5973
  }
5966
5974
  //#endregion
5967
5975
  //#region src/actions/documentBundleSizes.ts
5968
- var er = "<!-- BUNDLE_START -->", tr = "<!-- BUNDLE_END -->", nr = "&nbsp;&nbsp;&nbsp;&nbsp;", rr = 20, ir = "The Bundle Analysis Report is generated automatically on each release using [Sonda](https://sonda.dev/), which analyses final source maps to reveal the actual effects of tree-shaking and minification rather than relying on pre-build estimates.\n\n_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._";
5969
- async function ar(e) {
5976
+ var tr = "<!-- BUNDLE_START -->", nr = "<!-- BUNDLE_END -->", rr = "&nbsp;&nbsp;&nbsp;&nbsp;", ir = 20, ar = "The Bundle Analysis Report is generated automatically on each release using [Sonda](https://sonda.dev/), which analyses final source maps to reveal the actual effects of tree-shaking and minification rather than relying on pre-build estimates.\n\n_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._";
5977
+ async function or(e) {
5970
5978
  try {
5971
5979
  G("Document Bundle Sizes"), q("1️⃣ Read bundle analysis report");
5972
5980
  let t = await U("./bundle-analysis-reports/sonda/index.json");
5973
5981
  q("2️⃣ Insert table into 'README.md'");
5974
- let n = or(t, e?.moduleLevel ?? !1);
5975
- await Bn("README.md", Gn(await W("./README.md"), `\n${ir}\n\n${n}\n`, er, tr)), K("Bundle sizes documented");
5982
+ let n = sr(t, e?.moduleLevel ?? !1);
5983
+ await Vn("README.md", Kn(await W("./README.md"), `\n${ar}\n\n${n}\n`, tr, nr)), K("Bundle sizes documented");
5976
5984
  } catch (e) {
5977
5985
  console.error("❌ Error documenting bundle sizes", e), process.exit(1);
5978
5986
  }
5979
5987
  }
5980
- function or(e, t) {
5981
- let n = fr(e), r = n.values().flatMap((e) => e.values().toArray()).reduce((e, t) => e + t.sizes.uncompressed, 0), i = e.resources.filter((e) => e.kind === "asset").map((e) => [e.name, gr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
5988
+ function sr(e, t) {
5989
+ let n = pr(e), r = n.values().flatMap((e) => e.values().toArray()).reduce((e, t) => e + t.sizes.uncompressed, 0), i = e.resources.filter((e) => e.kind === "asset").map((e) => [e.name, _r(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
5982
5990
  for (let [e, o] of i) {
5983
- let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? sr(e, o, ur(i), r, t) : cr(e, o, i, r, t);
5991
+ let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? cr(e, o, dr(i), r, t) : lr(e, o, i, r, t);
5984
5992
  a.push(...s);
5985
5993
  }
5986
5994
  return a.join("\n");
5987
5995
  }
5988
- function sr(e, t, n, r, i) {
5996
+ function cr(e, t, n, r, i) {
5989
5997
  let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
5990
- if (s.size === 1) return [`| ${e} → ${a} → ${dr(s)} | ${_r(t)} · ${vr(c)} |`];
5991
- let l = [`| ${e} → ${a} | ${_r(t)} · ${vr(c)} |`];
5992
- return i || l.push(...lr(s, nr, r)), l;
5998
+ if (s.size === 1) return [`| ${e} → ${a} → ${fr(s)} | ${vr(t)} · ${yr(c)} |`];
5999
+ let l = [`| ${e} → ${a} | ${vr(t)} · ${yr(c)} |`];
6000
+ return i || l.push(...ur(s, rr, r)), l;
5993
6001
  }
5994
- function cr(e, t, n, r, i) {
5995
- let a = [`| ${e} | ${_r(t)} |`];
6002
+ function lr(e, t, n, r, i) {
6003
+ let a = [`| ${e} | ${vr(t)} |`];
5996
6004
  for (let [e, { sizes: t, files: o }] of n) {
5997
6005
  let n = r > 0 ? t.uncompressed / r * 100 : 0;
5998
6006
  if (o.size === 1) {
5999
- let t = dr(o);
6000
- a.push(`| ${nr}${e} → ${t} | ${vr(n)} |`);
6007
+ let t = fr(o);
6008
+ a.push(`| ${rr}${e} → ${t} | ${yr(n)} |`);
6001
6009
  continue;
6002
6010
  }
6003
- a.push(`| ${nr}${e} | ${vr(n)} |`), i || a.push(...lr(o, `${nr}${nr}`, r));
6011
+ a.push(`| ${rr}${e} | ${yr(n)} |`), i || a.push(...ur(o, `${rr}${rr}`, r));
6004
6012
  }
6005
6013
  return a;
6006
6014
  }
6007
- function lr(e, t, n) {
6008
- return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${vr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
6015
+ function ur(e, t, n) {
6016
+ return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${yr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
6009
6017
  }
6010
- function ur(e) {
6018
+ function dr(e) {
6011
6019
  let [t] = e;
6012
6020
  if (t === void 0) throw Error("Expected exactly one entry");
6013
6021
  return t;
6014
6022
  }
6015
- function dr(e) {
6023
+ function fr(e) {
6016
6024
  let [t] = e.keys();
6017
6025
  if (t === void 0) throw Error("Expected exactly one file");
6018
6026
  return t;
6019
6027
  }
6020
- function fr(e) {
6021
- let t = pr(e.dependencies), n = /* @__PURE__ */ new Map();
6028
+ function pr(e) {
6029
+ let t = mr(e.dependencies), n = /* @__PURE__ */ new Map();
6022
6030
  for (let r of e.resources) {
6023
6031
  if (r.kind !== "chunk" || !r.parent) continue;
6024
- let { group: e, file: i } = mr(r.name, t), a = gr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
6032
+ let { group: e, file: i } = hr(r.name, t), a = _r(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
6025
6033
  n.set(r.parent, o);
6026
6034
  let s = o.get(e) ?? {
6027
- sizes: yr(),
6035
+ sizes: br(),
6028
6036
  files: /* @__PURE__ */ new Map()
6029
6037
  };
6030
- o.set(e, s), br(s.sizes, a);
6031
- let c = s.files.get(i) ?? yr();
6032
- s.files.set(i, c), br(c, a);
6038
+ o.set(e, s), xr(s.sizes, a);
6039
+ let c = s.files.get(i) ?? br();
6040
+ s.files.set(i, c), xr(c, a);
6033
6041
  }
6034
6042
  return n;
6035
6043
  }
6036
- function pr(e) {
6044
+ function mr(e) {
6037
6045
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
6038
6046
  }
6039
- function mr(e, t) {
6047
+ function hr(e, t) {
6040
6048
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
6041
6049
  if (n) {
6042
6050
  let [t, r] = n;
@@ -6053,49 +6061,49 @@ function mr(e, t) {
6053
6061
  file: e.slice(1)
6054
6062
  } : e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? {
6055
6063
  group: "wasm",
6056
- file: hr(e)
6064
+ file: gr(e)
6057
6065
  } : {
6058
6066
  group: "src",
6059
- file: hr(e)
6067
+ file: gr(e)
6060
6068
  };
6061
6069
  }
6062
- function hr(e) {
6070
+ function gr(e) {
6063
6071
  return e.split("/").at(-1) ?? e;
6064
6072
  }
6065
- function gr(e) {
6073
+ function _r(e) {
6066
6074
  return {
6067
6075
  uncompressed: e.uncompressed,
6068
6076
  brotli: e.brotli ?? 0
6069
6077
  };
6070
6078
  }
6071
- function _r(e) {
6072
- return `${xr(e.uncompressed)} · brotli ${xr(e.brotli)}`;
6073
- }
6074
6079
  function vr(e) {
6075
- let t = Math.round(e / 100 * rr);
6076
- return `\`${"█".repeat(t)}${"░".repeat(rr - t)}\` ${e.toFixed(1)}%`;
6080
+ return `${Sr(e.uncompressed)} · brotli ${Sr(e.brotli)}`;
6081
+ }
6082
+ function yr(e) {
6083
+ let t = Math.round(e / 100 * ir);
6084
+ return `\`${"█".repeat(t)}${"░".repeat(ir - t)}\` ${e.toFixed(1)}%`;
6077
6085
  }
6078
- function yr() {
6086
+ function br() {
6079
6087
  return {
6080
6088
  uncompressed: 0,
6081
6089
  brotli: 0
6082
6090
  };
6083
6091
  }
6084
- function br(e, t) {
6092
+ function xr(e, t) {
6085
6093
  e.uncompressed += t.uncompressed, e.brotli += t.brotli;
6086
6094
  }
6087
- function xr(e) {
6095
+ function Sr(e) {
6088
6096
  return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
6089
6097
  }
6090
6098
  //#endregion
6091
6099
  //#region src/actions/documentDependencies.ts
6092
- var Sr = "<!-- DEPENDENCY_LICENSES_START -->", Cr = "<!-- DEPENDENCY_LICENSES_END -->", wr = "<!-- DEPENDENCY_TREE_START -->", Tr = "<!-- DEPENDENCY_TREE_END -->", Er = "The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are simply mature and stable, requiring no active development.";
6093
- async function Dr(e = "MIT") {
6100
+ var Cr = "<!-- DEPENDENCY_LICENSES_START -->", wr = "<!-- DEPENDENCY_LICENSES_END -->", Tr = "<!-- DEPENDENCY_TREE_START -->", Er = "<!-- DEPENDENCY_TREE_END -->", Dr = "The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are simply mature and stable, requiring no active development.";
6101
+ async function Or(e = "MIT") {
6094
6102
  try {
6095
6103
  G("Document Dependencies");
6096
6104
  let t = await U("package.json");
6097
6105
  if (t.name === "@dpuse/dpuse-development" || t.name === "@dpuse/eslint-config-dpuse") {
6098
- await Or(t.name), K("Dependencies documented");
6106
+ await kr(t.name), K("Dependencies documented");
6099
6107
  return;
6100
6108
  }
6101
6109
  await Nn("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
@@ -6117,38 +6125,38 @@ async function Dr(e = "MIT") {
6117
6125
  "--all",
6118
6126
  "--json",
6119
6127
  "--omit=dev"
6120
- ], "licenses/licenseTree.json"), await kr("4️⃣ ", e), K("Dependencies documented");
6128
+ ], "licenses/licenseTree.json"), await Ar("4️⃣ ", e), K("Dependencies documented");
6121
6129
  } catch (e) {
6122
6130
  console.error("❌ Error documenting dependencies", e), process.exit(1);
6123
6131
  }
6124
6132
  }
6125
- async function Or(e) {
6133
+ async function kr(e) {
6126
6134
  q(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`);
6127
6135
  let t = `> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`;
6128
- await Bn("README.md", Gn(Gn(await W("./README.md"), t, Sr, Cr), "", wr, Tr));
6136
+ await Vn("README.md", Kn(Kn(await W("./README.md"), t, Cr, wr), "", Tr, Er));
6129
6137
  }
6130
- async function kr(e, t) {
6138
+ async function Ar(e, t) {
6131
6139
  q(`${e} Insert licenses into 'README.md'`);
6132
6140
  let [n, r] = await Promise.all([U("licenses/licenses.json"), U("licenses/licenseTree.json")]), i = /* @__PURE__ */ new Map();
6133
- for (let [e, t] of Object.entries(n)) i.set(e, Mr(e, t));
6141
+ for (let [e, t] of Object.entries(n)) i.set(e, Nr(e, t));
6134
6142
  await Promise.all(i.values().map(async (e) => {
6135
- let t = await Nr(e.name, e.installedVersion);
6143
+ let t = await Pr(e.name, e.installedVersion);
6136
6144
  e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
6137
6145
  }));
6138
- let a = `${Ar(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
6139
- for (let e of i.values()) a += Pr(e);
6146
+ let a = `${jr(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
6147
+ for (let e of i.values()) a += Fr(e);
6140
6148
  let o = [];
6141
- r.dependencies != null && Fr(r.dependencies, i, o, 0);
6142
- let s = `${Er}\n\n${o.join("\n")}`;
6143
- await Bn("README.md", Gn(Gn(await W("./README.md"), a, Sr, Cr), s, wr, Tr));
6144
- }
6145
- function Ar(e) {
6146
- return `License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use ${jr(e.split(";"))} — all permissive, commercially-friendly licenses. Users of the uploaded library are covered by these checks; developers cloning this repository should independently verify development dependencies.`;
6149
+ r.dependencies != null && Ir(r.dependencies, i, o, 0);
6150
+ let s = `${Dr}\n\n${o.join("\n")}`;
6151
+ await Vn("README.md", Kn(Kn(await W("./README.md"), a, Cr, wr), s, Tr, Er));
6147
6152
  }
6148
6153
  function jr(e) {
6154
+ return `License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use ${Mr(e.split(";"))} — all permissive, commercially-friendly licenses. Users of the uploaded library are covered by these checks; developers cloning this repository should independently verify development dependencies.`;
6155
+ }
6156
+ function Mr(e) {
6149
6157
  return e.length === 1 ? e[0] ?? "" : e.length === 2 ? `${String(e[0])} or ${String(e[1])}` : `${e.slice(0, -1).join(", ")}, or ${String(e.at(-1))}`;
6150
6158
  }
6151
- function Mr(e, t) {
6159
+ function Nr(e, t) {
6152
6160
  let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
6153
6161
  return {
6154
6162
  name: r,
@@ -6162,7 +6170,7 @@ function Mr(e, t) {
6162
6170
  ...t.licenseFile != null && { licenseFileLink: t.licenseFile }
6163
6171
  };
6164
6172
  }
6165
- async function Nr(e, t) {
6173
+ async function Pr(e, t) {
6166
6174
  try {
6167
6175
  let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
6168
6176
  if (n.ok) {
@@ -6180,44 +6188,44 @@ async function Nr(e, t) {
6180
6188
  publishedDate: ""
6181
6189
  };
6182
6190
  }
6183
- function Pr(e) {
6191
+ function Fr(e) {
6184
6192
  let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
6185
6193
  return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
6186
6194
  }
6187
- function Fr(e, t, n, r) {
6195
+ function Ir(e, t, n, r) {
6188
6196
  let i = " ".repeat(r);
6189
6197
  for (let [a, o] of Object.entries(e)) {
6190
- let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Ir(s);
6191
- n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Fr(o.dependencies, t, n, r + 1);
6198
+ let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Lr(s);
6199
+ n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Ir(o.dependencies, t, n, r + 1);
6192
6200
  }
6193
6201
  }
6194
- function Ir(e) {
6202
+ function Lr(e) {
6195
6203
  if (e == null) return "";
6196
- let t = e.publishedDate ? Lr(e.publishedDate.split("T", 1)[0]) : "";
6204
+ let t = e.publishedDate ? Rr(e.publishedDate.split("T", 1)[0]) : "";
6197
6205
  if (!(e.latestVersion !== "" && e.latestVersion !== e.installedVersion)) return t === "" ? "" : ` — ${t}`;
6198
- let n = e.latestPublishedDate ? Lr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6206
+ let n = e.latestPublishedDate ? Rr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6199
6207
  return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
6200
6208
  }
6201
- function Lr(e) {
6209
+ function Rr(e) {
6202
6210
  if (e == null || e === "") return "n/a";
6203
6211
  let t = e.split("T", 1)[0];
6204
6212
  if (t == null || t === "") return "n/a";
6205
6213
  let n = new Date(t), r = /* @__PURE__ */ new Date(), i = (r.getFullYear() - n.getFullYear()) * 12 + (r.getMonth() - n.getMonth());
6206
- return r.getDate() < n.getDate() && --i, i === 0 ? `this month: ${t}` : i === 1 ? `1 month ago: ${t}` : i <= 6 ? `${String(i)} months ago: ${t}` : `${String(i)} months ago: ${t} ⚠️ `;
6214
+ return r.getDate() < n.getDate() && --i, i === 0 ? `this month: ${t}` : i === 1 ? `**1** month ago: ${t}` : i <= 6 ? `**${String(i)}** months ago: ${t}` : `**${String(i)}** months ago: ${t} ⚠️ `;
6207
6215
  }
6208
6216
  //#endregion
6209
6217
  //#region src/actions/documentGovernance.ts
6210
- var Rr = "<!-- GOVERNANCE_START -->", zr = "<!-- GOVERNANCE_END -->";
6211
- async function Br() {
6218
+ var zr = "<!-- GOVERNANCE_START -->", Br = "<!-- GOVERNANCE_END -->";
6219
+ async function Vr() {
6212
6220
  try {
6213
6221
  G("Document Governance"), q("1️⃣ Insert governance content into 'README.md'");
6214
- let [e, t] = await Promise.all([U("package.json"), U("config.json")]), { owner: n, repo: r } = Vr(e), i = Wr(n, r, Hr(e), Ur(t.firstCreatedAt));
6215
- await Bn("README.md", Gn(await W("./README.md"), i, Rr, zr)), K("Governance documented");
6222
+ let [e, t] = await Promise.all([U("package.json"), U("config.json")]), { owner: n, repo: r } = Hr(e), i = Gr(n, r, Ur(e), Wr(t.firstCreatedAt));
6223
+ await Vn("README.md", Kn(await W("./README.md"), i, zr, Br)), K("Governance documented");
6216
6224
  } catch (e) {
6217
6225
  console.error("❌ Error documenting governance", e), process.exit(1);
6218
6226
  }
6219
6227
  }
6220
- function Vr(e) {
6228
+ function Hr(e) {
6221
6229
  let t = e.repository, n = typeof t == "string" ? t : t?.url;
6222
6230
  if (n == null || n === "") throw Error("package.json 'repository' field is required to document governance.");
6223
6231
  let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
@@ -6227,18 +6235,18 @@ function Vr(e) {
6227
6235
  repo: i[2]
6228
6236
  };
6229
6237
  }
6230
- function Hr(e) {
6238
+ function Ur(e) {
6231
6239
  let t = e.author, n = typeof t == "string" ? t : t?.name;
6232
6240
  if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
6233
6241
  return n.replace(/\s*<[^>]*>\s*/, "").trim();
6234
6242
  }
6235
- function Ur(e) {
6243
+ function Wr(e) {
6236
6244
  let t = (/* @__PURE__ */ new Date()).getFullYear();
6237
6245
  if (e == null) return String(t);
6238
6246
  let n = new Date(e).getFullYear();
6239
6247
  return n === t ? String(t) : `${String(n)}-present`;
6240
6248
  }
6241
- function Wr(e, t, n, r) {
6249
+ function Gr(e, t, n, r) {
6242
6250
  let i = `https://github.com/${e}/${t}`, a = `github.com/${e}/${t}`;
6243
6251
  return `## Security & Quality
6244
6252
 
@@ -6285,43 +6293,43 @@ This project is licensed under the MIT License, permitting free use, modificatio
6285
6293
  }
6286
6294
  //#endregion
6287
6295
  //#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-DzuoA1f0.js
6288
- var Gr, Kr = {
6296
+ var Kr, qr = {
6289
6297
  lang: void 0,
6290
6298
  message: void 0,
6291
6299
  abortEarly: void 0,
6292
6300
  abortPipeEarly: void 0
6293
6301
  };
6294
6302
  /* @__NO_SIDE_EFFECTS__ */
6295
- function qr(e) {
6296
- return !e && !Gr ? Kr : {
6297
- lang: e?.lang ?? Gr?.lang,
6303
+ function Jr(e) {
6304
+ return !e && !Kr ? qr : {
6305
+ lang: e?.lang ?? Kr?.lang,
6298
6306
  message: e?.message,
6299
- abortEarly: e?.abortEarly ?? Gr?.abortEarly,
6300
- abortPipeEarly: e?.abortPipeEarly ?? Gr?.abortPipeEarly
6307
+ abortEarly: e?.abortEarly ?? Kr?.abortEarly,
6308
+ abortPipeEarly: e?.abortPipeEarly ?? Kr?.abortPipeEarly
6301
6309
  };
6302
6310
  }
6303
- var Jr;
6311
+ var Yr;
6304
6312
  /* @__NO_SIDE_EFFECTS__ */
6305
- function Yr(e) {
6306
- return Jr?.get(e);
6313
+ function Xr(e) {
6314
+ return Yr?.get(e);
6307
6315
  }
6308
- var Xr;
6316
+ var Zr;
6309
6317
  /* @__NO_SIDE_EFFECTS__ */
6310
- function Zr(e) {
6311
- return Xr?.get(e);
6318
+ function Qr(e) {
6319
+ return Zr?.get(e);
6312
6320
  }
6313
- var Qr;
6321
+ var $r;
6314
6322
  /* @__NO_SIDE_EFFECTS__ */
6315
- function $r(e, t) {
6316
- return Qr?.get(e)?.get(t);
6323
+ function ei(e, t) {
6324
+ return $r?.get(e)?.get(t);
6317
6325
  }
6318
6326
  /* @__NO_SIDE_EFFECTS__ */
6319
- function ei(e) {
6327
+ function ti(e) {
6320
6328
  let t = typeof e;
6321
6329
  return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
6322
6330
  }
6323
- function ti(e, t, n, r, i) {
6324
- let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ ei(a), c = {
6331
+ function ni(e, t, n, r, i) {
6332
+ let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ ti(a), c = {
6325
6333
  kind: e.kind,
6326
6334
  type: e.type,
6327
6335
  input: a,
@@ -6334,44 +6342,44 @@ function ti(e, t, n, r, i) {
6334
6342
  lang: r.lang,
6335
6343
  abortEarly: r.abortEarly,
6336
6344
  abortPipeEarly: r.abortPipeEarly
6337
- }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ $r(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Zr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Yr(c.lang);
6345
+ }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ ei(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Qr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Xr(c.lang);
6338
6346
  u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
6339
6347
  }
6340
- var ni = /* @__PURE__ */ new WeakMap();
6348
+ var ri = /* @__PURE__ */ new WeakMap();
6341
6349
  /* @__NO_SIDE_EFFECTS__ */
6342
6350
  function Y(e) {
6343
- let t = ni.get(e);
6351
+ let t = ri.get(e);
6344
6352
  return t || (t = {
6345
6353
  version: 1,
6346
6354
  vendor: "valibot",
6347
6355
  validate(t) {
6348
- return e["~run"]({ value: t }, /* @__PURE__ */ qr());
6356
+ return e["~run"]({ value: t }, /* @__PURE__ */ Jr());
6349
6357
  }
6350
- }, ni.set(e, t)), t;
6358
+ }, ri.set(e, t)), t;
6351
6359
  }
6352
6360
  /* @__NO_SIDE_EFFECTS__ */
6353
- function ri(e, t) {
6361
+ function ii(e, t) {
6354
6362
  return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
6355
6363
  }
6356
6364
  /* @__NO_SIDE_EFFECTS__ */
6357
- function ii(e, t) {
6365
+ function ai(e, t) {
6358
6366
  let n = [...new Set(e)];
6359
6367
  return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
6360
6368
  }
6361
6369
  /* @__NO_SIDE_EFFECTS__ */
6362
- function ai(e, t, n) {
6370
+ function oi(e, t, n) {
6363
6371
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
6364
6372
  }
6365
6373
  /* @__NO_SIDE_EFFECTS__ */
6366
- function oi(e, t, n) {
6374
+ function si(e, t, n) {
6367
6375
  return typeof e.default == "function" ? e.default(t, n) : e.default;
6368
6376
  }
6369
6377
  /* @__NO_SIDE_EFFECTS__ */
6370
- function si(e, t) {
6378
+ function ci(e, t) {
6371
6379
  return {
6372
6380
  kind: "schema",
6373
6381
  type: "array",
6374
- reference: si,
6382
+ reference: ci,
6375
6383
  expects: "Array",
6376
6384
  async: !1,
6377
6385
  item: e,
@@ -6401,17 +6409,17 @@ function si(e, t) {
6401
6409
  }
6402
6410
  a.typed || (e.typed = !1), e.value.push(a.value);
6403
6411
  }
6404
- } else ti(this, "type", e, t);
6412
+ } else ni(this, "type", e, t);
6405
6413
  return e;
6406
6414
  }
6407
6415
  };
6408
6416
  }
6409
6417
  /* @__NO_SIDE_EFFECTS__ */
6410
- function ci(e) {
6418
+ function li(e) {
6411
6419
  return {
6412
6420
  kind: "schema",
6413
6421
  type: "boolean",
6414
- reference: ci,
6422
+ reference: li,
6415
6423
  expects: "boolean",
6416
6424
  async: !1,
6417
6425
  message: e,
@@ -6419,17 +6427,17 @@ function ci(e) {
6419
6427
  return /* @__PURE__ */ Y(this);
6420
6428
  },
6421
6429
  "~run"(e, t) {
6422
- return typeof e.value == "boolean" ? e.typed = !0 : ti(this, "type", e, t), e;
6430
+ return typeof e.value == "boolean" ? e.typed = !0 : ni(this, "type", e, t), e;
6423
6431
  }
6424
6432
  };
6425
6433
  }
6426
6434
  /* @__NO_SIDE_EFFECTS__ */
6427
- function li(e, t) {
6435
+ function ui(e, t) {
6428
6436
  return {
6429
6437
  kind: "schema",
6430
6438
  type: "literal",
6431
- reference: li,
6432
- expects: /* @__PURE__ */ ei(e),
6439
+ reference: ui,
6440
+ expects: /* @__PURE__ */ ti(e),
6433
6441
  async: !1,
6434
6442
  literal: e,
6435
6443
  message: t,
@@ -6437,7 +6445,7 @@ function li(e, t) {
6437
6445
  return /* @__PURE__ */ Y(this);
6438
6446
  },
6439
6447
  "~run"(e, t) {
6440
- return e.value === this.literal ? e.typed = !0 : ti(this, "type", e, t), e;
6448
+ return e.value === this.literal ? e.typed = !0 : ni(this, "type", e, t), e;
6441
6449
  }
6442
6450
  };
6443
6451
  }
@@ -6455,16 +6463,16 @@ function X(e, t) {
6455
6463
  return /* @__PURE__ */ Y(this);
6456
6464
  },
6457
6465
  "~run"(e, t) {
6458
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ oi(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6466
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ si(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6459
6467
  }
6460
6468
  };
6461
6469
  }
6462
6470
  /* @__NO_SIDE_EFFECTS__ */
6463
- function ui(e) {
6471
+ function di(e) {
6464
6472
  return {
6465
6473
  kind: "schema",
6466
6474
  type: "number",
6467
- reference: ui,
6475
+ reference: di,
6468
6476
  expects: "number",
6469
6477
  async: !1,
6470
6478
  message: e,
@@ -6472,7 +6480,7 @@ function ui(e) {
6472
6480
  return /* @__PURE__ */ Y(this);
6473
6481
  },
6474
6482
  "~run"(e, t) {
6475
- return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : ti(this, "type", e, t), e;
6483
+ return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : ni(this, "type", e, t), e;
6476
6484
  }
6477
6485
  };
6478
6486
  }
@@ -6496,7 +6504,7 @@ function Z(e, t) {
6496
6504
  for (let r in this.entries) {
6497
6505
  let i = this.entries[r];
6498
6506
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
6499
- let a = r in n ? n[r] : /* @__PURE__ */ oi(i), o = i["~run"]({ value: a }, t);
6507
+ let a = r in n ? n[r] : /* @__PURE__ */ si(i), o = i["~run"]({ value: a }, t);
6500
6508
  if (o.issues) {
6501
6509
  let i = {
6502
6510
  type: "object",
@@ -6512,8 +6520,8 @@ function Z(e, t) {
6512
6520
  }
6513
6521
  }
6514
6522
  o.typed || (e.typed = !1), e.value[r] = o.value;
6515
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ai(i);
6516
- else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (ti(this, "key", e, t, {
6523
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ oi(i);
6524
+ else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (ni(this, "key", e, t, {
6517
6525
  input: void 0,
6518
6526
  expected: `"${r}"`,
6519
6527
  path: [{
@@ -6525,17 +6533,17 @@ function Z(e, t) {
6525
6533
  }]
6526
6534
  }), t.abortEarly)) break;
6527
6535
  }
6528
- } else ti(this, "type", e, t);
6536
+ } else ni(this, "type", e, t);
6529
6537
  return e;
6530
6538
  }
6531
6539
  };
6532
6540
  }
6533
6541
  /* @__NO_SIDE_EFFECTS__ */
6534
- function di(e, t) {
6542
+ function fi(e, t) {
6535
6543
  return {
6536
6544
  kind: "schema",
6537
6545
  type: "optional",
6538
- reference: di,
6546
+ reference: fi,
6539
6547
  expects: `(${e.expects} | undefined)`,
6540
6548
  async: !1,
6541
6549
  wrapped: e,
@@ -6544,16 +6552,16 @@ function di(e, t) {
6544
6552
  return /* @__PURE__ */ Y(this);
6545
6553
  },
6546
6554
  "~run"(e, t) {
6547
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ oi(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6555
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ si(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6548
6556
  }
6549
6557
  };
6550
6558
  }
6551
6559
  /* @__NO_SIDE_EFFECTS__ */
6552
- function fi(e, t, n) {
6560
+ function pi(e, t, n) {
6553
6561
  return {
6554
6562
  kind: "schema",
6555
6563
  type: "record",
6556
- reference: fi,
6564
+ reference: pi,
6557
6565
  expects: "Object",
6558
6566
  async: !1,
6559
6567
  key: e,
@@ -6566,7 +6574,7 @@ function fi(e, t, n) {
6566
6574
  let n = e.value;
6567
6575
  if (n && typeof n == "object") {
6568
6576
  e.typed = !0, e.value = {};
6569
- for (let r in n) if (/* @__PURE__ */ ri(n, r)) {
6577
+ for (let r in n) if (/* @__PURE__ */ ii(n, r)) {
6570
6578
  let i = n[r], a = this.key["~run"]({ value: r }, t);
6571
6579
  if (a.issues) {
6572
6580
  let o = {
@@ -6599,7 +6607,7 @@ function fi(e, t, n) {
6599
6607
  }
6600
6608
  (!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
6601
6609
  }
6602
- } else ti(this, "type", e, t);
6610
+ } else ni(this, "type", e, t);
6603
6611
  return e;
6604
6612
  }
6605
6613
  };
@@ -6617,24 +6625,24 @@ function Q(e) {
6617
6625
  return /* @__PURE__ */ Y(this);
6618
6626
  },
6619
6627
  "~run"(e, t) {
6620
- return typeof e.value == "string" ? e.typed = !0 : ti(this, "type", e, t), e;
6628
+ return typeof e.value == "string" ? e.typed = !0 : ni(this, "type", e, t), e;
6621
6629
  }
6622
6630
  };
6623
6631
  }
6624
6632
  /* @__NO_SIDE_EFFECTS__ */
6625
- function pi(e) {
6633
+ function mi(e) {
6626
6634
  let t;
6627
6635
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
6628
6636
  else t = n.issues;
6629
6637
  return t;
6630
6638
  }
6631
6639
  /* @__NO_SIDE_EFFECTS__ */
6632
- function mi(e, t) {
6640
+ function hi(e, t) {
6633
6641
  return {
6634
6642
  kind: "schema",
6635
6643
  type: "union",
6636
- reference: mi,
6637
- expects: /* @__PURE__ */ ii(e.map((e) => e.expects), "|"),
6644
+ reference: hi,
6645
+ expects: /* @__PURE__ */ ai(e.map((e) => e.expects), "|"),
6638
6646
  async: !1,
6639
6647
  options: e,
6640
6648
  message: t,
@@ -6655,22 +6663,22 @@ function mi(e, t) {
6655
6663
  if (n) return n;
6656
6664
  if (r) {
6657
6665
  if (r.length === 1) return r[0];
6658
- ti(this, "type", e, t, { issues: /* @__PURE__ */ pi(r) }), e.typed = !0;
6666
+ ni(this, "type", e, t, { issues: /* @__PURE__ */ mi(r) }), e.typed = !0;
6659
6667
  } else if (i?.length === 1) return i[0];
6660
- else ti(this, "type", e, t, { issues: /* @__PURE__ */ pi(i) });
6668
+ else ni(this, "type", e, t, { issues: /* @__PURE__ */ mi(i) });
6661
6669
  return e;
6662
6670
  }
6663
6671
  };
6664
6672
  }
6665
- var $ = (e) => /* @__PURE__ */ mi(e.map((e) => /* @__PURE__ */ li(e))), hi = /* @__PURE__ */ Z({
6673
+ var $ = (e) => /* @__PURE__ */ hi(e.map((e) => /* @__PURE__ */ ui(e))), gi = /* @__PURE__ */ Z({
6666
6674
  en: /* @__PURE__ */ Q(),
6667
6675
  es: /* @__PURE__ */ Q()
6668
- }), gi = /* @__PURE__ */ Z({
6669
- en: /* @__PURE__ */ di(/* @__PURE__ */ si(/* @__PURE__ */ Q())),
6670
- es: /* @__PURE__ */ di(/* @__PURE__ */ si(/* @__PURE__ */ Q()))
6671
6676
  }), _i = /* @__PURE__ */ Z({
6672
- en: /* @__PURE__ */ di(/* @__PURE__ */ Q()),
6673
- es: /* @__PURE__ */ di(/* @__PURE__ */ Q())
6677
+ en: /* @__PURE__ */ fi(/* @__PURE__ */ ci(/* @__PURE__ */ Q())),
6678
+ es: /* @__PURE__ */ fi(/* @__PURE__ */ ci(/* @__PURE__ */ Q()))
6679
+ }), vi = /* @__PURE__ */ Z({
6680
+ en: /* @__PURE__ */ fi(/* @__PURE__ */ Q()),
6681
+ es: /* @__PURE__ */ fi(/* @__PURE__ */ Q())
6674
6682
  });
6675
6683
  $([
6676
6684
  "app",
@@ -6697,12 +6705,12 @@ $([
6697
6705
  "presenterPresentation",
6698
6706
  "tool"
6699
6707
  ]);
6700
- var vi = $([
6708
+ var yi = $([
6701
6709
  "amber",
6702
6710
  "green",
6703
6711
  "red",
6704
6712
  "other"
6705
- ]), yi = $([
6713
+ ]), bi = $([
6706
6714
  "alpha",
6707
6715
  "beta",
6708
6716
  "generalAvailability",
@@ -6712,29 +6720,29 @@ var vi = $([
6712
6720
  "releaseCandidate",
6713
6721
  "unavailable",
6714
6722
  "underReview"
6715
- ]), bi = /* @__PURE__ */ Z({
6716
- color: vi,
6723
+ ]), xi = /* @__PURE__ */ Z({
6724
+ color: yi,
6717
6725
  label: /* @__PURE__ */ Q()
6718
- }), xi = /* @__PURE__ */ Z({
6726
+ }), Si = /* @__PURE__ */ Z({
6719
6727
  id: /* @__PURE__ */ Q(),
6720
- label: _i,
6721
- description: gi,
6728
+ label: vi,
6729
+ description: _i,
6722
6730
  icon: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
6723
6731
  iconDark: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
6724
- order: /* @__PURE__ */ ui(),
6732
+ order: /* @__PURE__ */ di(),
6725
6733
  path: /* @__PURE__ */ Q()
6726
- }), Si = {
6734
+ }), Ci = {
6727
6735
  id: /* @__PURE__ */ Q(),
6728
- label: _i,
6729
- description: gi,
6730
- firstCreatedAt: /* @__PURE__ */ X(/* @__PURE__ */ ui()),
6736
+ label: vi,
6737
+ description: _i,
6738
+ firstCreatedAt: /* @__PURE__ */ X(/* @__PURE__ */ di()),
6731
6739
  icon: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
6732
6740
  iconDark: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
6733
- lastUpdatedAt: /* @__PURE__ */ X(/* @__PURE__ */ ui()),
6734
- status: /* @__PURE__ */ X(bi),
6735
- statusId: /* @__PURE__ */ X(yi)
6741
+ lastUpdatedAt: /* @__PURE__ */ X(/* @__PURE__ */ di()),
6742
+ status: /* @__PURE__ */ X(xi),
6743
+ statusId: /* @__PURE__ */ X(bi)
6736
6744
  };
6737
- ({ ...Si }), $([
6745
+ ({ ...Ci }), $([
6738
6746
  "app",
6739
6747
  "engine",
6740
6748
  "connector",
@@ -6745,14 +6753,14 @@ var vi = $([
6745
6753
  ]);
6746
6754
  //#endregion
6747
6755
  //#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-COF8ocp_.js
6748
- var Ci = {
6749
- ...Si,
6756
+ var wi = {
6757
+ ...Ci,
6750
6758
  version: /* @__PURE__ */ Q()
6751
6759
  };
6752
- ({ ...Ci });
6760
+ ({ ...wi });
6753
6761
  //#endregion
6754
6762
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
6755
- var wi = $([
6763
+ var Ti = $([
6756
6764
  "abortOperation",
6757
6765
  "auditObjectContent",
6758
6766
  "createObject",
@@ -6768,41 +6776,41 @@ var wi = $([
6768
6776
  "retrieveChunks",
6769
6777
  "retrieveRecords",
6770
6778
  "upsertRecords"
6771
- ]), Ti = $([
6779
+ ]), Ei = $([
6772
6780
  "application",
6773
6781
  "curatedDataset",
6774
6782
  "database",
6775
6783
  "fileStore"
6776
- ]), Ei = /* @__PURE__ */ Z({ label: hi }), Di = $([
6784
+ ]), Di = /* @__PURE__ */ Z({ label: gi }), Oi = $([
6777
6785
  "bidirectional",
6778
6786
  "destination",
6779
6787
  "source"
6780
- ]), Oi = /* @__PURE__ */ Z({ label: hi }), ki = /* @__PURE__ */ Z({
6788
+ ]), ki = /* @__PURE__ */ Z({ label: gi }), Ai = /* @__PURE__ */ Z({
6781
6789
  authMethodId: $([
6782
6790
  "apiKey",
6783
6791
  "disabled",
6784
6792
  "oAuth2",
6785
6793
  "none"
6786
6794
  ]),
6787
- activeConnectionCount: /* @__PURE__ */ di(/* @__PURE__ */ ui()),
6788
- canDescribe: /* @__PURE__ */ di(/* @__PURE__ */ ci()),
6789
- id: /* @__PURE__ */ di(/* @__PURE__ */ Q()),
6790
- label: /* @__PURE__ */ di(hi),
6791
- maxConnectionCount: /* @__PURE__ */ X(/* @__PURE__ */ ui()),
6792
- params: /* @__PURE__ */ di(/* @__PURE__ */ si(/* @__PURE__ */ fi(/* @__PURE__ */ Q(), /* @__PURE__ */ Q())))
6793
- }), Ai = /* @__PURE__ */ Z({
6794
- typeId: /* @__PURE__ */ li("connector"),
6795
- ...Ci,
6796
- actionNames: /* @__PURE__ */ si(wi),
6797
- category: /* @__PURE__ */ X(Ei),
6798
- categoryId: Ti,
6799
- implementations: /* @__PURE__ */ fi(/* @__PURE__ */ Q(), ki),
6800
- usage: /* @__PURE__ */ X(Oi),
6801
- usageId: /* @__PURE__ */ X(Di),
6795
+ activeConnectionCount: /* @__PURE__ */ fi(/* @__PURE__ */ di()),
6796
+ canDescribe: /* @__PURE__ */ fi(/* @__PURE__ */ li()),
6797
+ id: /* @__PURE__ */ fi(/* @__PURE__ */ Q()),
6798
+ label: /* @__PURE__ */ fi(gi),
6799
+ maxConnectionCount: /* @__PURE__ */ X(/* @__PURE__ */ di()),
6800
+ params: /* @__PURE__ */ fi(/* @__PURE__ */ ci(/* @__PURE__ */ pi(/* @__PURE__ */ Q(), /* @__PURE__ */ Q())))
6801
+ }), ji = /* @__PURE__ */ Z({
6802
+ typeId: /* @__PURE__ */ ui("connector"),
6803
+ ...wi,
6804
+ actionNames: /* @__PURE__ */ ci(Ti),
6805
+ category: /* @__PURE__ */ X(Di),
6806
+ categoryId: Ei,
6807
+ implementations: /* @__PURE__ */ pi(/* @__PURE__ */ Q(), Ai),
6808
+ usage: /* @__PURE__ */ X(ki),
6809
+ usageId: /* @__PURE__ */ X(Oi),
6802
6810
  vendorAccountURL: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
6803
6811
  vendorDocumentationURL: /* @__PURE__ */ X(/* @__PURE__ */ Q()),
6804
6812
  vendorHomeURL: /* @__PURE__ */ X(/* @__PURE__ */ Q())
6805
- }), ji = {
6813
+ }), Mi = {
6806
6814
  abortOperation: "Abort Operation",
6807
6815
  auditObjectContent: "Audit Object Content",
6808
6816
  createObject: "Create Object",
@@ -6818,12 +6826,12 @@ var wi = $([
6818
6826
  retrieveChunks: "Retrieve Chunks",
6819
6827
  retrieveRecords: "Retrieve Records",
6820
6828
  upsertRecords: "Upsert Records"
6821
- }, Mi = /* @__PURE__ */ new Set([
6829
+ }, Ni = /* @__PURE__ */ new Set([
6822
6830
  "createObject",
6823
6831
  "dropObject",
6824
6832
  "removeRecords",
6825
6833
  "upsertRecords"
6826
- ]), Ni = /* @__PURE__ */ new Set([
6834
+ ]), Pi = /* @__PURE__ */ new Set([
6827
6835
  "auditObjectContent",
6828
6836
  "findObject",
6829
6837
  "getInfo",
@@ -6834,47 +6842,47 @@ var wi = $([
6834
6842
  "retrieveChunks",
6835
6843
  "retrieveRecords"
6836
6844
  ]);
6837
- function Pi(e) {
6845
+ function Fi(e) {
6838
6846
  let t = !1, n = !1;
6839
- for (let r of e) Ni.has(r) && (t = !0), Mi.has(r) && (n = !0);
6847
+ for (let r of e) Pi.has(r) && (t = !0), Ni.has(r) && (n = !0);
6840
6848
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
6841
6849
  }
6842
- function Fi(e) {
6850
+ function Ii(e) {
6843
6851
  let t = new Set(e), n = "|Action|Supported|\n";
6844
6852
  n += "|:----|:-------:|\n";
6845
- for (let e of Object.keys(ji)) n += `| ${ji[e]} | ${t.has(e) ? "✓" : ""} |\n`;
6853
+ for (let e of Object.keys(Mi)) n += `| ${Mi[e]} | ${t.has(e) ? "✓" : ""} |\n`;
6846
6854
  return n;
6847
6855
  }
6848
6856
  //#endregion
6849
6857
  //#region src/actions/documentActions.ts
6850
- var Ii = "<!-- CONNECTOR_ACTIONS_START -->", Li = "<!-- CONNECTOR_ACTIONS_END -->", Ri = "Connectors conform to a unified interface contract by implementing a specific subset of standard actions. These standardised actions allow the DPUse application to interact with any underlying data source in the same way, enabling Connectors to be built independently and loaded dynamically at runtime.", zi = {
6858
+ var Li = "<!-- CONNECTOR_ACTIONS_START -->", Ri = "<!-- CONNECTOR_ACTIONS_END -->", zi = "Connectors conform to a unified interface contract by implementing a specific subset of standard actions. These standardised actions allow the DPUse application to interact with any underlying data source in the same way, enabling Connectors to be built independently and loaded dynamically at runtime.", Bi = {
6851
6859
  source: "This connector is a Source connector that supports only read actions. Connectors can also function as a Destination (write-only) or Bidirectional (read/write), depending on the actions they support.",
6852
6860
  destination: "This connector is a Destination connector that supports only write actions. Connectors can also function as a Source (read-only) or Bidirectional (read/write), depending on the actions they support.",
6853
6861
  bidirectional: "This connector is a Bidirectional connector that supports both read and write actions. Connectors can also function as a Source (read-only) or Destination (write-only), depending on the actions they support.",
6854
6862
  unknown: "This connector does not yet implement any read or write actions, so its type cannot be determined. Connectors function as a Source (read-only), a Destination (write-only), or Bidirectional (read/write), depending on the actions they support."
6855
- }, Bi = "The table below lists all connector actions and highlights those supported by this connector.";
6856
- async function Vi() {
6863
+ }, Vi = "The table below lists all connector actions and highlights those supported by this connector.";
6864
+ async function Hi() {
6857
6865
  try {
6858
6866
  G("Document Actions"), q("1️⃣ Insert actions description and table into 'README.md'");
6859
- let e = (await U("config.json")).actionNames ?? [], t = Pi(e), n = Fi(e), r = `${Ri}\n\n${zi[t]} ${Bi}\n\n${n}`;
6860
- await Bn("README.md", Gn(await W("./README.md"), r, Ii, Li)), K("Actions documented");
6867
+ let e = (await U("config.json")).actionNames ?? [], t = Fi(e), n = Ii(e), r = `${zi}\n\n${Bi[t]} ${Vi}\n\n${n}`;
6868
+ await Vn("README.md", Kn(await W("./README.md"), r, Li, Ri)), K("Actions documented");
6861
6869
  } catch (e) {
6862
6870
  console.error("❌ Error documenting actions", e), process.exit(1);
6863
6871
  }
6864
6872
  }
6865
6873
  //#endregion
6866
6874
  //#region src/actions/documentOpening.ts
6867
- var Hi = "<!-- OPENING_START -->", Ui = "<!-- OPENING_END -->";
6868
- async function Wi() {
6875
+ var Ui = "<!-- OPENING_START -->", Wi = "<!-- OPENING_END -->";
6876
+ async function Gi() {
6869
6877
  try {
6870
6878
  G("Document Opening"), q("1️⃣ Insert opening content into 'README.md'");
6871
- let e = await U("package.json"), t = await U("config.json"), { owner: n, repo: r } = Gi(e), i = Ji(n, r, Ki(e), qi(t));
6872
- await Bn("README.md", Gn(await W("./README.md"), i, Hi, Ui)), K("Opening documented");
6879
+ let e = await U("package.json"), t = await U("config.json"), { owner: n, repo: r } = Ki(e), i = Yi(n, r, qi(e), Ji(t));
6880
+ await Vn("README.md", Kn(await W("./README.md"), i, Ui, Wi)), K("Opening documented");
6873
6881
  } catch (e) {
6874
6882
  console.error("❌ Error documenting opening", e), process.exit(1);
6875
6883
  }
6876
6884
  }
6877
- function Gi(e) {
6885
+ function Ki(e) {
6878
6886
  let t = e.repository, n = typeof t == "string" ? t : t?.url;
6879
6887
  if (n == null || n === "") throw Error("package.json 'repository' field is required to document opening.");
6880
6888
  let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
@@ -6884,17 +6892,17 @@ function Gi(e) {
6884
6892
  repo: i[2]
6885
6893
  };
6886
6894
  }
6887
- function Ki(e) {
6895
+ function qi(e) {
6888
6896
  let t = e.license;
6889
6897
  if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
6890
6898
  return t;
6891
6899
  }
6892
- function qi(e) {
6900
+ function Ji(e) {
6893
6901
  let t = e.description.en;
6894
6902
  if (t == null || t.length === 0) throw Error("config.json 'description.en' field is required to document opening.");
6895
6903
  return t.join("\n\n");
6896
6904
  }
6897
- function Ji(e, t, n, r) {
6905
+ function Yi(e, t, n, r) {
6898
6906
  let i = `https://github.com/${e}/${t}`;
6899
6907
  return `[![License: ${n}](https://img.shields.io/badge/License-${n.replace(/-/g, "--")}-blue.svg)](./LICENSE)
6900
6908
  [![DPUse version](https://img.shields.io/github/v/release/${e}/${t}?color=f6821f&label=DPUse)](${i}/releases/latest)
@@ -6914,31 +6922,31 @@ ${r}`;
6914
6922
  }
6915
6923
  //#endregion
6916
6924
  //#region src/actions/documentUsage.ts
6917
- var Yi = "<!-- USAGE_START -->", Xi = "<!-- USAGE_END -->";
6918
- async function Zi() {
6925
+ var Xi = "<!-- USAGE_START -->", Zi = "<!-- USAGE_END -->";
6926
+ async function Qi() {
6919
6927
  try {
6920
6928
  G("Document Usage"), q("1️⃣ Insert usage content into 'README.md'");
6921
- let e = await U("package.json"), t = Qi(e), n = ta(t, $i(t), ea(e.engines?.node), ea(e.engines?.npm), ea(e.devDependencies?.typescript));
6922
- await Bn("README.md", Gn(await W("./README.md"), n, Yi, Xi)), K("Usage documented");
6929
+ let e = await U("package.json"), t = $i(e), n = na(t, ea(t), ta(e.engines?.node), ta(e.engines?.npm), ta(e.devDependencies?.typescript));
6930
+ await Vn("README.md", Kn(await W("./README.md"), n, Xi, Zi)), K("Usage documented");
6923
6931
  } catch (e) {
6924
6932
  console.error("❌ Error documenting usage", e), process.exit(1);
6925
6933
  }
6926
6934
  }
6927
- function Qi(e) {
6935
+ function $i(e) {
6928
6936
  let t = e.repository, n = typeof t == "string" ? t : t?.url;
6929
6937
  if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
6930
6938
  return n.replace(/^git\+/, "");
6931
6939
  }
6932
- function $i(e) {
6940
+ function ea(e) {
6933
6941
  return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
6934
6942
  }
6935
- function ea(e) {
6943
+ function ta(e) {
6936
6944
  if (e == null) throw Error("package.json version range is required to document usage.");
6937
6945
  let t = /\d+(?:\.\d+)*/.exec(e);
6938
6946
  if (t == null) throw Error(`Unable to parse version from '${e}'.`);
6939
6947
  return t[0];
6940
6948
  }
6941
- function ta(e, t, n, r, i) {
6949
+ function na(e, t, n, r, i) {
6942
6950
  return `This connector is automatically uploaded to the DPUse Engine cloud once released and becomes instantly available to all new browser app instances, with existing instances notified of the update.
6943
6951
 
6944
6952
  You may view or clone this repository for your own purposes, such as building a new, similar connector, though there is currently no process to accept third-party connectors into DPUse at this stage. Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.
@@ -6953,7 +6961,7 @@ _Requires [Node.js](https://nodejs.org/) ${n} or later, [npm](https://www.npmjs.
6953
6961
  }
6954
6962
  //#endregion
6955
6963
  //#region src/actions/formatCode.ts
6956
- async function na() {
6964
+ async function ra() {
6957
6965
  try {
6958
6966
  G("Format Code"), await In("1️⃣ Format", "prettier", [
6959
6967
  "--write",
@@ -6968,7 +6976,7 @@ async function na() {
6968
6976
  }
6969
6977
  //#endregion
6970
6978
  //#region src/actions/lintCode.ts
6971
- async function ra() {
6979
+ async function ia() {
6972
6980
  try {
6973
6981
  G("Lint Code"), await In("1️⃣ Lint", "eslint", ["."]), K("Code linted");
6974
6982
  } catch (e) {
@@ -6977,7 +6985,7 @@ async function ra() {
6977
6985
  }
6978
6986
  //#endregion
6979
6987
  //#region src/utilities/cloudflare.ts
6980
- async function ia() {
6988
+ async function aa() {
6981
6989
  let e = await U("config.json"), t = {
6982
6990
  body: JSON.stringify(e),
6983
6991
  headers: { "Content-Type": "application/json" },
@@ -6985,11 +6993,11 @@ async function ia() {
6985
6993
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
6986
6994
  if (!n.ok) throw Error(await n.text());
6987
6995
  }
6988
- async function aa(e, t) {
6996
+ async function oa(e, t) {
6989
6997
  async function n(e, t, r) {
6990
6998
  for (let i of r) {
6991
6999
  let r = `${e}/${i}`, a = `${t}/${i}`;
6992
- (await Hn(r)).isDirectory() ? await n(r, a, await Pn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Fn(void 0, "wrangler", [
7000
+ (await Un(r)).isDirectory() ? await n(r, a, await Pn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Fn(void 0, "wrangler", [
6993
7001
  "r2",
6994
7002
  "object",
6995
7003
  "put",
@@ -7003,7 +7011,7 @@ async function aa(e, t) {
7003
7011
  let r = await Pn(`${e}/${t}/`);
7004
7012
  await n(`${e}/${t}`, t, r);
7005
7013
  }
7006
- async function oa(e) {
7014
+ async function sa(e) {
7007
7015
  let t = e.id, n = {
7008
7016
  body: JSON.stringify(e),
7009
7017
  headers: { "Content-Type": "application/json" },
@@ -7011,7 +7019,7 @@ async function oa(e) {
7011
7019
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
7012
7020
  if (!r.ok) throw Error(await r.text());
7013
7021
  }
7014
- async function sa(e, t) {
7022
+ async function ca(e, t) {
7015
7023
  let n = `v${e.version ?? "unknown"}`;
7016
7024
  async function r(e, r = "") {
7017
7025
  let i = await Pn(e, { withFileTypes: !0 });
@@ -7035,24 +7043,24 @@ async function sa(e, t) {
7035
7043
  }
7036
7044
  //#endregion
7037
7045
  //#region node_modules/valibot/dist/index.mjs
7038
- var ca, la = {
7046
+ var la, ua = {
7039
7047
  lang: void 0,
7040
7048
  message: void 0,
7041
7049
  abortEarly: void 0,
7042
7050
  abortPipeEarly: void 0
7043
7051
  };
7044
7052
  /* @__NO_SIDE_EFFECTS__ */
7045
- function ua(e) {
7046
- return !e && !ca ? la : {
7047
- lang: e?.lang ?? ca?.lang,
7053
+ function da(e) {
7054
+ return !e && !la ? ua : {
7055
+ lang: e?.lang ?? la?.lang,
7048
7056
  message: e?.message,
7049
- abortEarly: e?.abortEarly ?? ca?.abortEarly,
7050
- abortPipeEarly: e?.abortPipeEarly ?? ca?.abortPipeEarly
7057
+ abortEarly: e?.abortEarly ?? la?.abortEarly,
7058
+ abortPipeEarly: e?.abortPipeEarly ?? la?.abortPipeEarly
7051
7059
  };
7052
7060
  }
7053
7061
  /* @__NO_SIDE_EFFECTS__ */
7054
- function da(e, t, n) {
7055
- let r = e["~run"]({ value: t }, /* @__PURE__ */ ua(n));
7062
+ function fa(e, t, n) {
7063
+ let r = e["~run"]({ value: t }, /* @__PURE__ */ da(n));
7056
7064
  return {
7057
7065
  typed: r.typed,
7058
7066
  success: !r.issues,
@@ -7062,69 +7070,69 @@ function da(e, t, n) {
7062
7070
  }
7063
7071
  //#endregion
7064
7072
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleContext.es.js
7065
- var fa = /* @__PURE__ */ Z({
7066
- typeId: /* @__PURE__ */ li("contextArea"),
7067
- ...Si,
7068
- modelRefs: /* @__PURE__ */ si(xi),
7069
- order: /* @__PURE__ */ ui()
7070
- }), pa = $(["listContextFocuses"]), ma = /* @__PURE__ */ Z({
7071
- typeId: /* @__PURE__ */ li("context"),
7073
+ var pa = /* @__PURE__ */ Z({
7074
+ typeId: /* @__PURE__ */ ui("contextArea"),
7072
7075
  ...Ci,
7073
- actionNames: /* @__PURE__ */ si(pa),
7074
- models: /* @__PURE__ */ si(fa)
7075
- }), ha = $([
7076
+ modelRefs: /* @__PURE__ */ ci(Si),
7077
+ order: /* @__PURE__ */ di()
7078
+ }), ma = $(["listContextFocuses"]), ha = /* @__PURE__ */ Z({
7079
+ typeId: /* @__PURE__ */ ui("context"),
7080
+ ...wi,
7081
+ actionNames: /* @__PURE__ */ ci(ma),
7082
+ models: /* @__PURE__ */ ci(pa)
7083
+ }), ga = $([
7076
7084
  "list",
7077
7085
  "render",
7078
7086
  "setColorMode"
7079
- ]), ga = /* @__PURE__ */ Z({
7080
- typeId: /* @__PURE__ */ li("presenter"),
7081
- ...Ci,
7082
- actionNames: /* @__PURE__ */ si(ha),
7083
- presentations: /* @__PURE__ */ si(xi)
7087
+ ]), _a = /* @__PURE__ */ Z({
7088
+ typeId: /* @__PURE__ */ ui("presenter"),
7089
+ ...wi,
7090
+ actionNames: /* @__PURE__ */ ci(ga),
7091
+ presentations: /* @__PURE__ */ ci(Si)
7084
7092
  });
7085
7093
  //#endregion
7086
7094
  //#region src/actions/manageProject.ts
7087
- async function _a() {
7095
+ async function va() {
7088
7096
  try {
7089
7097
  G("Build Project"), await In("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
7090
7098
  } catch (e) {
7091
7099
  console.error("❌ Error building project", e), process.exit(1);
7092
7100
  }
7093
7101
  }
7094
- async function va() {
7102
+ async function ya() {
7095
7103
  try {
7096
7104
  G("Publish Project");
7097
- let e = await U("package.json"), t = await U("config.json"), n = Vn(t.id);
7098
- if (n.typeId === "app") q("1️⃣ Register module"), await ia();
7099
- else if (n.typeId === "engine") q("1️⃣ Register module"), await sa(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await oa(t);
7105
+ let e = await U("package.json"), t = await U("config.json"), n = Hn(t.id);
7106
+ if (n.typeId === "app") q("1️⃣ Register module"), await aa();
7107
+ else if (n.typeId === "engine") q("1️⃣ Register module"), await ca(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await sa(t);
7100
7108
  else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required");
7101
7109
  else {
7102
7110
  q("1️⃣ Register module");
7103
7111
  let r = t.id.split("-").slice(2).join("-");
7104
- await sa(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await oa(t);
7112
+ await ca(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await sa(t);
7105
7113
  }
7106
7114
  K(`Project version '${e.version ?? "unknown"}' published.`);
7107
7115
  } catch (e) {
7108
7116
  console.error("❌ Error publishing project", e), process.exit(1);
7109
7117
  }
7110
7118
  }
7111
- async function ya() {
7119
+ async function ba() {
7112
7120
  try {
7113
7121
  G("Release Project");
7114
7122
  let e = await U("package.json"), t = await U("config.json");
7115
- await Da("1️⃣ ", e);
7116
- let n = Vn(t.id);
7123
+ await Oa("1️⃣ ", e);
7124
+ let n = Hn(t.id);
7117
7125
  switch (n.typeId) {
7118
7126
  case "connector":
7119
- t = await xa("2️⃣ ", e);
7127
+ t = await Sa("2️⃣ ", e);
7120
7128
  break;
7121
7129
  case "context":
7122
- t = await Sa("2️⃣ ", e);
7130
+ t = await Ca("2️⃣ ", e);
7123
7131
  break;
7124
7132
  case "presenter":
7125
- t = await Ca("2️⃣ ", e);
7133
+ t = await wa("2️⃣ ", e);
7126
7134
  break;
7127
- default: t = await ba("2️⃣ ", e);
7135
+ default: t = await xa("2️⃣ ", e);
7128
7136
  }
7129
7137
  if (await In("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
7130
7138
  "commit",
@@ -7134,24 +7142,24 @@ async function ya() {
7134
7142
  "push",
7135
7143
  "origin",
7136
7144
  "main:main"
7137
- ]), n.typeId === "app") q("7️⃣ Register module"), await ia();
7138
- else if (n.typeId === "engine") q("7️⃣ Register module"), await sa(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await oa(t);
7145
+ ]), n.typeId === "app") q("7️⃣ Register module"), await aa();
7146
+ else if (n.typeId === "engine") q("7️⃣ Register module"), await ca(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await sa(t);
7139
7147
  else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required");
7140
7148
  else {
7141
7149
  q("7️⃣ Register module");
7142
7150
  let r = t.id.split("-").slice(2).join("-");
7143
- await sa(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await oa(t);
7151
+ await ca(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await sa(t);
7144
7152
  }
7145
7153
  if (n.publishedTo === "npm") {
7146
7154
  let e = ".npmrc";
7147
7155
  try {
7148
- await Bn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await In("8️⃣ Publish to npm", "npm", [
7156
+ await Vn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await In("8️⃣ Publish to npm", "npm", [
7149
7157
  "publish",
7150
7158
  "--access",
7151
7159
  "public"
7152
7160
  ]);
7153
7161
  } finally {
7154
- await Rn(e);
7162
+ await zn(e);
7155
7163
  }
7156
7164
  } else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
7157
7165
  K(`Project version '${e.version ?? "unknown"}' released.`);
@@ -7159,48 +7167,48 @@ async function ya() {
7159
7167
  console.error("❌ Error releasing project", e), process.exit(1);
7160
7168
  }
7161
7169
  }
7162
- async function ba(e, t) {
7170
+ async function xa(e, t) {
7163
7171
  q(`${e} Build project configuration`);
7164
7172
  let n = await U("config.json");
7165
- return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await zn("config.json", n), n;
7173
+ return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await Rn("logo.svg"), n.iconDark ??= await Rn("logoDark.svg"), await Bn("config.json", n), n;
7166
7174
  }
7167
- async function xa(e, t) {
7175
+ async function Sa(e, t) {
7168
7176
  q(`${e} Build connector project configuration`);
7169
- let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ da(Ai, n);
7177
+ let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ fa(ji, n);
7170
7178
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7171
- let a = Un(r);
7172
- return await wa(t, n, a, Pi(a));
7179
+ let a = Wn(r);
7180
+ return await Ta(t, n, a, Fi(a));
7173
7181
  }
7174
- async function Sa(e, t) {
7182
+ async function Ca(e, t) {
7175
7183
  q(`${e} Build context project configuration`);
7176
- let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ da(ma, n);
7184
+ let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ fa(ha, n);
7177
7185
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7178
- return await wa(t, n, Un(r));
7186
+ return await Ta(t, n, Wn(r));
7179
7187
  }
7180
- async function Ca(e, t) {
7188
+ async function wa(e, t) {
7181
7189
  q(`${e} Build presenter project configuration`);
7182
- let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ da(ga, n);
7190
+ let [n, r] = await Promise.all([U("config.json"), W("src/index.ts")]), i = /* @__PURE__ */ fa(_a, n);
7183
7191
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7184
- return await wa(t, n, Un(r));
7192
+ return await Ta(t, n, Wn(r));
7185
7193
  }
7186
- async function wa(e, t, n, r) {
7187
- 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") : r && console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.actionNames = n, r !== void 0 && (t.usageId = r), await zn("config.json", t), t;
7194
+ async function Ta(e, t, n, r) {
7195
+ 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") : r && console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.actionNames = n, r !== void 0 && (t.usageId = r), await Bn("config.json", t), t;
7188
7196
  }
7189
- async function Ta() {
7197
+ async function Ea() {
7190
7198
  try {
7191
7199
  G("Synchronise Project with GitHub");
7192
7200
  let e = await U("package.json"), t = await U("config.json");
7193
- switch (await Da("1️⃣ ", e), Vn(t.id).typeId) {
7201
+ switch (await Oa("1️⃣ ", e), Hn(t.id).typeId) {
7194
7202
  case "connector":
7195
- await xa("2️⃣ ", e);
7203
+ await Sa("2️⃣ ", e);
7196
7204
  break;
7197
7205
  case "context":
7198
- await Sa("2️⃣ ", e);
7206
+ await Ca("2️⃣ ", e);
7199
7207
  break;
7200
7208
  case "presenter":
7201
- await Ca("2️⃣ ", e);
7209
+ await wa("2️⃣ ", e);
7202
7210
  break;
7203
- default: await ba("2️⃣ ", e);
7211
+ default: await xa("2️⃣ ", e);
7204
7212
  }
7205
7213
  await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
7206
7214
  "commit",
@@ -7215,22 +7223,22 @@ async function Ta() {
7215
7223
  console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
7216
7224
  }
7217
7225
  }
7218
- function Ea() {
7226
+ function Da() {
7219
7227
  try {
7220
7228
  G("Test Project"), console.error("\n❌ No tests implemented.\n");
7221
7229
  } catch (e) {
7222
7230
  console.error("❌ Error testing project", e), process.exit(1);
7223
7231
  }
7224
7232
  }
7225
- async function Da(e, t, n = "./") {
7233
+ async function Oa(e, t, n = "./") {
7226
7234
  if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
7227
7235
  else {
7228
7236
  let e = t.version, n = t.version.split(".");
7229
7237
  t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
7230
7238
  }
7231
- await zn(`${n}package.json`, t);
7239
+ await Bn(`${n}package.json`, t);
7232
7240
  }
7233
7241
  //#endregion
7234
- export { Kn as auditDependencies, _a as buildProject, qn as checkConfigFiles, $n as checkDependencies, Vi as documentActions, ar as documentBundleSizes, Dr as documentDependencies, Br as documentGovernance, Wi as documentOpening, Zi as documentUsage, na as formatCode, ra as lintCode, va as publishProject, ya as releaseProject, Ta as syncProjectWithGitHub, Ea as testProject, aa as uploadDirectoryToR2 };
7242
+ export { qn as auditDependencies, va as buildProject, Jn as checkConfigFiles, er as checkDependencies, Hi as documentActions, or as documentBundleSizes, Or as documentDependencies, Vr as documentGovernance, Gi as documentOpening, Qi as documentUsage, ra as formatCode, ia as lintCode, ya as publishProject, ba as releaseProject, Ea as syncProjectWithGitHub, Da as testProject, oa as uploadDirectoryToR2 };
7235
7243
 
7236
7244
  //# sourceMappingURL=dpuse-development.es.js.map