@dpuse/dpuse-development 0.3.670 → 0.3.673

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.
@@ -5728,7 +5728,7 @@ var An = [
5728
5728
  }
5729
5729
  ], jn = r(i);
5730
5730
  async function Mn(e, r) {
5731
- e !== void 0 && q(`${e} - clear(${r})`);
5731
+ e !== void 0 && J(`${e} - clear(${r})`);
5732
5732
  let i;
5733
5733
  try {
5734
5734
  i = await t.readdir(r, { withFileTypes: !0 });
@@ -5752,12 +5752,12 @@ async function Nn(e, n) {
5752
5752
  return t.readdir(e, n);
5753
5753
  }
5754
5754
  async function Pn(e, n, r, i) {
5755
- e !== void 0 && q(`${e} - exec(${n} ${r.join(" ")})`);
5755
+ e !== void 0 && J(`${e} - exec(${n} ${r.join(" ")})`);
5756
5756
  let { stdout: a, stderr: o } = await jn(n, r);
5757
5757
  i === void 0 ? a.trim() && console.log(a.trim()) : await t.writeFile(i, a.trim(), "utf8"), o.trim() && console.error(o.trim());
5758
5758
  }
5759
5759
  async function Fn(e, t, n, r = !1, i = !1) {
5760
- return q(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
5760
+ return J(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
5761
5761
  a(t, n, {
5762
5762
  shell: i,
5763
5763
  stdio: "inherit"
@@ -5767,7 +5767,7 @@ async function Fn(e, t, n, r = !1, i = !1) {
5767
5767
  });
5768
5768
  }
5769
5769
  async function In(e, n, r, i, o = !1) {
5770
- return q(`${e} - spawn(${n} ${r.join(" ")}) > ${i}`), new Promise((e, s) => {
5770
+ return J(`${e} - spawn(${n} ${r.join(" ")}) > ${i}`), new Promise((e, s) => {
5771
5771
  let c = a(n, r, {
5772
5772
  shell: !1,
5773
5773
  stdio: [
@@ -5792,47 +5792,47 @@ async function In(e, n, r, i, o = !1) {
5792
5792
  async function W(e) {
5793
5793
  return JSON.parse(await t.readFile(e, "utf8"));
5794
5794
  }
5795
- async function Ln(e) {
5795
+ async function G(e) {
5796
5796
  return await t.readFile(e, "utf8");
5797
5797
  }
5798
- async function Rn(e) {
5798
+ async function Ln(e) {
5799
5799
  try {
5800
5800
  await t.unlink(e);
5801
5801
  } catch (e) {
5802
5802
  if (e.code !== "ENOENT") throw e;
5803
5803
  }
5804
5804
  }
5805
- async function zn(e, n) {
5805
+ async function Rn(e, n) {
5806
5806
  await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
5807
5807
  }
5808
- async function Bn(e, n) {
5808
+ async function zn(e, n) {
5809
5809
  await t.writeFile(e, n, "utf8");
5810
5810
  }
5811
- function G(e) {
5811
+ function K(e) {
5812
5812
  let t = "────────────────────────────────────────────────────────────────────────────────";
5813
5813
  console.info(`\n${t}`), console.info(`▶️ ${e}`), console.info(`${t}`);
5814
5814
  }
5815
- function K(e) {
5815
+ function q(e) {
5816
5816
  console.info(`\n✅ ${e}\n`);
5817
5817
  }
5818
- function q(e) {
5818
+ function J(e) {
5819
5819
  console.info(`\n${e}\n`);
5820
5820
  }
5821
- function Vn(e) {
5821
+ function Bn(e) {
5822
5822
  let t = An.find((t) => e.startsWith(t.idPrefix));
5823
5823
  if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
5824
5824
  return t;
5825
5825
  }
5826
- async function Hn(e) {
5826
+ async function Vn(e) {
5827
5827
  return await t.stat(e);
5828
5828
  }
5829
- function Un(e) {
5829
+ function Hn(e) {
5830
5830
  let t = k.extend(kn()).parse(e, {
5831
5831
  ecmaVersion: "latest",
5832
5832
  sourceType: "module",
5833
5833
  locations: !0
5834
5834
  }), n = [];
5835
- return Wn(t, (e) => {
5835
+ return Un(t, (e) => {
5836
5836
  if (e.type !== "MethodDefinition") return;
5837
5837
  let t = e, r = t.key;
5838
5838
  if (r.type !== "Identifier") return;
@@ -5840,7 +5840,7 @@ function Un(e) {
5840
5840
  i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
5841
5841
  }), n;
5842
5842
  }
5843
- function Wn(e, t) {
5843
+ function Un(e, t) {
5844
5844
  t(e);
5845
5845
  for (let [n, r] of Object.entries(e)) {
5846
5846
  if ([
@@ -5853,12 +5853,12 @@ function Wn(e, t) {
5853
5853
  let e = r;
5854
5854
  if (Array.isArray(e)) for (let n of e) {
5855
5855
  let e = n;
5856
- e && typeof e.type == "string" && Wn(e, t);
5856
+ e && typeof e.type == "string" && Un(e, t);
5857
5857
  }
5858
- else e && typeof e == "object" && typeof e.type == "string" && Wn(e, t);
5858
+ else e && typeof e == "object" && typeof e.type == "string" && Un(e, t);
5859
5859
  }
5860
5860
  }
5861
- function Gn(e, t, n, r) {
5861
+ function Wn(e, t, n, r) {
5862
5862
  let i = e.indexOf(n), a = e.indexOf(r);
5863
5863
  if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
5864
5864
  let o = t.trim();
@@ -5866,44 +5866,44 @@ function Gn(e, t, n, r) {
5866
5866
  }
5867
5867
  //#endregion
5868
5868
  //#region src/actions/auditDependencies.ts
5869
- async function Kn() {
5869
+ async function Gn() {
5870
5870
  try {
5871
- G("Audit Dependencies"), await Fn("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited");
5871
+ K("Audit Dependencies"), await Fn("1️⃣ Check using 'npm audit'", "npm", ["audit"]), q("Dependencies audited");
5872
5872
  } catch (e) {
5873
5873
  console.error("❌ Error auditing dependencies", e), process.exit(1);
5874
5874
  }
5875
5875
  }
5876
5876
  //#endregion
5877
5877
  //#region src/actions/checkConfigFiles.ts
5878
- async function qn() {
5878
+ async function Kn() {
5879
5879
  try {
5880
- G("Check configuration files"), q("1️⃣ Check individual files");
5881
- let e = Vn((await W("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");
5880
+ K("Check configuration files"), J("1️⃣ Check individual files");
5881
+ let e = Bn((await W("config.json")).id), t = n.dirname(o(import.meta.url));
5882
+ await Y(t, ".editorconfig"), await qn(e, t), await Y(t, ".gitignore", [e.publishedTo === "npm" ? ".gitignore_npm_published" : ".gitignore_default"]), await Y(t, ".markdownlint.json"), await Y(t, ".ncurc.json"), await Jn(e, t), await Y(t, "LICENSE"), await Yn(e, t), await Y(t, "tsconfig.scripts.json"), await Xn(e, t), await Zn(e, t), q("Configuration files checked");
5883
5883
  } catch (e) {
5884
5884
  console.error("❌ Error checking configuration files", e), process.exit(1);
5885
5885
  }
5886
5886
  }
5887
- async function Jn(e, t) {
5888
- ["development"].includes(e.typeId) ? console.info("ℹ️ File '.gitattributes' is UNIQUE to this project") : await J(t, ".gitattributes", [".gitattributes_default"]);
5887
+ async function qn(e, t) {
5888
+ ["development"].includes(e.typeId) ? console.info("ℹ️ File '.gitattributes' is UNIQUE to this project") : await Y(t, ".gitattributes", [".gitattributes_default"]);
5889
5889
  }
5890
- async function Yn(e, t) {
5890
+ async function Jn(e, t) {
5891
5891
  [
5892
5892
  "app",
5893
5893
  "api",
5894
5894
  "development",
5895
5895
  "eslint"
5896
- ].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is UNIQUE to this project") : await J(t, "eslint.config.js", ["eslint.config.default.js"]);
5896
+ ].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is UNIQUE to this project") : await Y(t, "eslint.config.js", ["eslint.config.default.js"]);
5897
5897
  }
5898
- async function Xn(e, t) {
5898
+ async function Yn(e, t) {
5899
5899
  [
5900
5900
  "connector",
5901
5901
  "engine",
5902
5902
  "shared",
5903
5903
  "tool"
5904
- ].includes(e.typeId) ? await J(t, "tsconfig.json", ["tsconfig.default.json"]) : console.info("ℹ️ File 'tsconfig.json' is UNIQUE to this project");
5904
+ ].includes(e.typeId) ? await Y(t, "tsconfig.json", ["tsconfig.default.json"]) : console.info("ℹ️ File 'tsconfig.json' is UNIQUE to this project");
5905
5905
  }
5906
- async function Zn(e, t) {
5906
+ async function Xn(e, t) {
5907
5907
  if (["eslint", "kb"].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is NOT required by this project");
5908
5908
  else if ([
5909
5909
  "app",
@@ -5914,26 +5914,26 @@ async function Zn(e, t) {
5914
5914
  ].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is UNIQUE to this project");
5915
5915
  else {
5916
5916
  let n;
5917
- 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);
5917
+ n = e.typeId === "connector" ? ["vite.config.default.ts", "vite.config.wasm.ts"] : e.typeId === "tool" ? ["vite.config.tool.ts"] : ["vite.config.default.ts"], await Y(t, "vite.config.ts", n);
5918
5918
  }
5919
5919
  }
5920
- async function Qn(e, t) {
5920
+ async function Zn(e, t) {
5921
5921
  [
5922
5922
  "app",
5923
5923
  "api",
5924
5924
  "eslint",
5925
5925
  "kb"
5926
- ].includes(e.typeId) ? console.info("ℹ️ File 'vitest.config.ts' is NOT required by this project") : await J(t, "vitest.config.ts");
5926
+ ].includes(e.typeId) ? console.info("ℹ️ File 'vitest.config.ts' is NOT required by this project") : await Y(t, "vitest.config.ts");
5927
5927
  }
5928
- async function J(e, t, r = []) {
5928
+ async function Y(e, t, r = []) {
5929
5929
  let i = n.resolve(process.cwd(), t), a = r.length > 0 ? r : [t], o;
5930
5930
  try {
5931
- o = await Ln(i);
5931
+ o = await G(i);
5932
5932
  } catch (e) {
5933
5933
  if (e.code !== "ENOENT") throw e;
5934
5934
  }
5935
5935
  for (let r of a) {
5936
- let i = await Ln(n.resolve(e, `../${r}`));
5936
+ let i = await G(n.resolve(e, `../${r}`));
5937
5937
  if (o === i) {
5938
5938
  console.info(`ℹ️ File '${t.split("_", 1)[0] ?? t}' is the same as '${r}'`);
5939
5939
  return;
@@ -5943,9 +5943,9 @@ async function J(e, t, r = []) {
5943
5943
  }
5944
5944
  //#endregion
5945
5945
  //#region src/actions/checkDependencies.ts
5946
- async function $n() {
5946
+ async function Qn() {
5947
5947
  try {
5948
- G("Check Dependencies"), await Fn("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), q("2️⃣ Check using 'npm-check-updates'");
5948
+ K("Check Dependencies"), await Fn("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), J("2️⃣ Check using 'npm-check-updates'");
5949
5949
  let e = {};
5950
5950
  try {
5951
5951
  e = await W(n.resolve(process.cwd(), ".ncurc.json"));
@@ -5958,85 +5958,85 @@ async function $n() {
5958
5958
  dep: "dev,prod,peer,optional",
5959
5959
  install: "never",
5960
5960
  ...e
5961
- }), await Fn("3️⃣ Install updated dependencies", "npm", ["install", "--prefer-online"]), K("Dependencies checked");
5961
+ }), await Fn("3️⃣ Install updated dependencies", "npm", ["install", "--prefer-online"]), q("Dependencies checked");
5962
5962
  } catch (e) {
5963
5963
  console.error("❌ Error checking dependencies", e), process.exit(1);
5964
5964
  }
5965
5965
  }
5966
5966
  //#endregion
5967
5967
  //#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) {
5968
+ var $n = "<!-- BUNDLE_START -->", er = "<!-- BUNDLE_END -->", tr = "&nbsp;&nbsp;&nbsp;&nbsp;", nr = 20, rr = "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 ir(e) {
5970
5970
  try {
5971
- G("Document Bundle Sizes"), q("1️⃣ Read bundle analysis report");
5971
+ K("Document Bundle Sizes"), J("1️⃣ Read bundle analysis report");
5972
5972
  let t = await W("./bundle-analysis-reports/sonda/index.json");
5973
- q("2️⃣ Insert table into 'README.md'");
5974
- let n = or(t, e?.moduleLevel ?? !1);
5975
- await Bn("README.md", Gn(await Ln("./README.md"), `\n${ir}\n\n${n}\n`, er, tr)), K("Bundle sizes documented");
5973
+ J("2️⃣ Insert table into 'README.md'");
5974
+ let n = ar(t, e?.moduleLevel ?? !1);
5975
+ await zn("README.md", Wn(await G("./README.md"), `\n${rr}\n\n${n}\n`, $n, er)), q("Bundle sizes documented");
5976
5976
  } catch (e) {
5977
5977
  console.error("❌ Error documenting bundle sizes", e), process.exit(1);
5978
5978
  }
5979
5979
  }
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|", "|:------ |:-----------|"];
5980
+ function ar(e, t) {
5981
+ let n = dr(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, hr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
5982
5982
  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);
5983
+ let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? or(e, o, lr(i), r, t) : sr(e, o, i, r, t);
5984
5984
  a.push(...s);
5985
5985
  }
5986
5986
  return a.join("\n");
5987
5987
  }
5988
- function sr(e, t, n, r, i) {
5988
+ function or(e, t, n, r, i) {
5989
5989
  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;
5990
+ if (s.size === 1) return [`| ${e} → ${a} → ${ur(s)} | ${gr(t)} · ${_r(c)} |`];
5991
+ let l = [`| ${e} → ${a} | ${gr(t)} · ${_r(c)} |`];
5992
+ return i || l.push(...cr(s, tr, r)), l;
5993
5993
  }
5994
- function cr(e, t, n, r, i) {
5995
- let a = [`| ${e} | ${_r(t)} |`];
5994
+ function sr(e, t, n, r, i) {
5995
+ let a = [`| ${e} | ${gr(t)} |`];
5996
5996
  for (let [e, { sizes: t, files: o }] of n) {
5997
5997
  let n = r > 0 ? t.uncompressed / r * 100 : 0;
5998
5998
  if (o.size === 1) {
5999
- let t = dr(o);
6000
- a.push(`| ${nr}${e} → ${t} | ${vr(n)} |`);
5999
+ let t = ur(o);
6000
+ a.push(`| ${tr}${e} → ${t} | ${_r(n)} |`);
6001
6001
  continue;
6002
6002
  }
6003
- a.push(`| ${nr}${e} | ${vr(n)} |`), i || a.push(...lr(o, `${nr}${nr}`, r));
6003
+ a.push(`| ${tr}${e} | ${_r(n)} |`), i || a.push(...cr(o, `${tr}${tr}`, r));
6004
6004
  }
6005
6005
  return a;
6006
6006
  }
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)} |`);
6007
+ function cr(e, t, n) {
6008
+ return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${_r(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
6009
6009
  }
6010
- function ur(e) {
6010
+ function lr(e) {
6011
6011
  let [t] = e;
6012
6012
  if (t === void 0) throw Error("Expected exactly one entry");
6013
6013
  return t;
6014
6014
  }
6015
- function dr(e) {
6015
+ function ur(e) {
6016
6016
  let [t] = e.keys();
6017
6017
  if (t === void 0) throw Error("Expected exactly one file");
6018
6018
  return t;
6019
6019
  }
6020
- function fr(e) {
6021
- let t = pr(e.dependencies), n = /* @__PURE__ */ new Map();
6020
+ function dr(e) {
6021
+ let t = fr(e.dependencies), n = /* @__PURE__ */ new Map();
6022
6022
  for (let r of e.resources) {
6023
6023
  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();
6024
+ let { group: e, file: i } = pr(r.name, t), a = hr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
6025
6025
  n.set(r.parent, o);
6026
6026
  let s = o.get(e) ?? {
6027
- sizes: yr(),
6027
+ sizes: vr(),
6028
6028
  files: /* @__PURE__ */ new Map()
6029
6029
  };
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);
6030
+ o.set(e, s), yr(s.sizes, a);
6031
+ let c = s.files.get(i) ?? vr();
6032
+ s.files.set(i, c), yr(c, a);
6033
6033
  }
6034
6034
  return n;
6035
6035
  }
6036
- function pr(e) {
6036
+ function fr(e) {
6037
6037
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
6038
6038
  }
6039
- function mr(e, t) {
6039
+ function pr(e, t) {
6040
6040
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
6041
6041
  if (n) {
6042
6042
  let [t, r] = n;
@@ -6053,52 +6053,52 @@ function mr(e, t) {
6053
6053
  file: e.slice(1)
6054
6054
  } : e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? {
6055
6055
  group: "wasm",
6056
- file: hr(e)
6056
+ file: mr(e)
6057
6057
  } : {
6058
6058
  group: "src",
6059
- file: hr(e)
6059
+ file: mr(e)
6060
6060
  };
6061
6061
  }
6062
- function hr(e) {
6062
+ function mr(e) {
6063
6063
  return e.split("/").at(-1) ?? e;
6064
6064
  }
6065
- function gr(e) {
6065
+ function hr(e) {
6066
6066
  return {
6067
6067
  uncompressed: e.uncompressed,
6068
6068
  brotli: e.brotli ?? 0
6069
6069
  };
6070
6070
  }
6071
- function _r(e) {
6072
- return `${xr(e.uncompressed)} · brotli ${xr(e.brotli)}`;
6071
+ function gr(e) {
6072
+ return `${br(e.uncompressed)} · brotli ${br(e.brotli)}`;
6073
6073
  }
6074
- function vr(e) {
6075
- let t = Math.round(e / 100 * rr);
6076
- return `\`${"█".repeat(t)}${"░".repeat(rr - t)}\` ${e.toFixed(1)}%`;
6074
+ function _r(e) {
6075
+ let t = Math.round(e / 100 * nr);
6076
+ return `\`${"█".repeat(t)}${"░".repeat(nr - t)}\` ${e.toFixed(1)}%`;
6077
6077
  }
6078
- function yr() {
6078
+ function vr() {
6079
6079
  return {
6080
6080
  uncompressed: 0,
6081
6081
  brotli: 0
6082
6082
  };
6083
6083
  }
6084
- function br(e, t) {
6084
+ function yr(e, t) {
6085
6085
  e.uncompressed += t.uncompressed, e.brotli += t.brotli;
6086
6086
  }
6087
- function xr(e) {
6087
+ function br(e) {
6088
6088
  return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
6089
6089
  }
6090
6090
  //#endregion
6091
6091
  //#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") {
6092
+ var xr = "<!-- DEPENDENCY_LICENSES_START -->", Sr = "<!-- DEPENDENCY_LICENSES_END -->", Cr = "<!-- DEPENDENCY_TREE_START -->", wr = "<!-- DEPENDENCY_TREE_END -->", Tr = "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 Er(e = "MIT") {
6094
6094
  try {
6095
- G("Document Dependencies");
6095
+ K("Document Dependencies");
6096
6096
  let t = await W("package.json");
6097
6097
  if (t.name === "@dpuse/dpuse-development") {
6098
- await Or(), K("Dependencies documented");
6098
+ await Dr(), q("Dependencies documented");
6099
6099
  return;
6100
6100
  }
6101
- await Mn("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
6101
+ await Mn("1️⃣ Clear downloaded licenses", "licenses/downloads"), J("2️⃣ Identify production licenses"), await new Promise((n, r) => {
6102
6102
  c({
6103
6103
  start: process.cwd(),
6104
6104
  production: !0,
@@ -6117,38 +6117,38 @@ async function Dr(e = "MIT") {
6117
6117
  "--all",
6118
6118
  "--json",
6119
6119
  "--omit=dev"
6120
- ], "licenses/licenseTree.json"), await kr("4️⃣ ", e), K("Dependencies documented");
6120
+ ], "licenses/licenseTree.json"), await Or("4️⃣ ", e), q("Dependencies documented");
6121
6121
  } catch (e) {
6122
6122
  console.error("❌ Error documenting dependencies", e), process.exit(1);
6123
6123
  }
6124
6124
  }
6125
- async function Or() {
6126
- q("1️⃣ Skip: @dpuse/dpuse-development is a development-only tool and is never part of a production release");
6125
+ async function Dr() {
6126
+ J("1️⃣ Skip: @dpuse/dpuse-development is a development-only tool and is never part of a production release");
6127
6127
  let e = "> [!WARNING]\n> Dependency licenses are not documented here: @dpuse/dpuse-development is a development-only tool and is never part of a production release";
6128
- await Bn("README.md", Gn(Gn(await Ln("./README.md"), e, Sr, Cr), e, wr, Tr));
6128
+ await zn("README.md", Wn(Wn(await G("./README.md"), e, xr, Sr), e, Cr, wr));
6129
6129
  }
6130
- async function kr(e, t) {
6131
- q(`${e} Insert licenses into 'README.md'`);
6130
+ async function Or(e, t) {
6131
+ J(`${e} Insert licenses into 'README.md'`);
6132
6132
  let [n, r] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), i = /* @__PURE__ */ new Map();
6133
- for (let [e, t] of Object.entries(n)) i.set(e, Mr(e, t));
6133
+ for (let [e, t] of Object.entries(n)) i.set(e, jr(e, t));
6134
6134
  await Promise.all(i.values().map(async (e) => {
6135
- let t = await Nr(e.name, e.installedVersion);
6135
+ let t = await Mr(e.name, e.installedVersion);
6136
6136
  e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
6137
6137
  }));
6138
- let a = `${Ar(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
6139
- for (let e of i.values()) a += Pr(e);
6138
+ let a = `${kr(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
6139
+ for (let e of i.values()) a += Nr(e);
6140
6140
  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 Ln("./README.md"), a, Sr, Cr), s, wr, Tr));
6141
+ r.dependencies != null && Pr(r.dependencies, i, o, 0);
6142
+ let s = `${Tr}\n\n${o.join("\n")}`;
6143
+ await zn("README.md", Wn(Wn(await G("./README.md"), a, xr, Sr), s, Cr, wr));
6144
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. Developers cloning this repository should independently verify development dependencies; users of the uploaded library are covered by these checks.`;
6145
+ function kr(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 ${Ar(e.split(";"))} — all permissive, commercially-friendly licenses. Developers cloning this repository should independently verify development dependencies; users of the uploaded library are covered by these checks.`;
6147
6147
  }
6148
- function jr(e) {
6148
+ function Ar(e) {
6149
6149
  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
6150
  }
6151
- function Mr(e, t) {
6151
+ function jr(e, t) {
6152
6152
  let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
6153
6153
  return {
6154
6154
  name: r,
@@ -6162,7 +6162,7 @@ function Mr(e, t) {
6162
6162
  ...t.licenseFile != null && { licenseFileLink: t.licenseFile }
6163
6163
  };
6164
6164
  }
6165
- async function Nr(e, t) {
6165
+ async function Mr(e, t) {
6166
6166
  try {
6167
6167
  let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
6168
6168
  if (n.ok) {
@@ -6180,25 +6180,25 @@ async function Nr(e, t) {
6180
6180
  publishedDate: ""
6181
6181
  };
6182
6182
  }
6183
- function Pr(e) {
6183
+ function Nr(e) {
6184
6184
  let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
6185
6185
  return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
6186
6186
  }
6187
- function Fr(e, t, n, r) {
6187
+ function Pr(e, t, n, r) {
6188
6188
  let i = " ".repeat(r);
6189
6189
  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);
6190
+ let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Fr(s);
6191
+ n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Pr(o.dependencies, t, n, r + 1);
6192
6192
  }
6193
6193
  }
6194
- function Ir(e) {
6194
+ function Fr(e) {
6195
6195
  if (e == null) return "";
6196
- let t = e.publishedDate ? Lr(e.publishedDate.split("T", 1)[0]) : "";
6196
+ let t = e.publishedDate ? Ir(e.publishedDate.split("T", 1)[0]) : "";
6197
6197
  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} ❗`;
6198
+ let n = e.latestPublishedDate ? Ir(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6199
6199
  return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
6200
6200
  }
6201
- function Lr(e) {
6201
+ function Ir(e) {
6202
6202
  if (e == null || e === "") return "n/a";
6203
6203
  let t = e.split("T", 1)[0];
6204
6204
  if (t == null || t === "") return "n/a";
@@ -6206,44 +6206,120 @@ function Lr(e) {
6206
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} ⚠️ `;
6207
6207
  }
6208
6208
  //#endregion
6209
+ //#region src/actions/documentGovernance.ts
6210
+ var Lr = "<!-- GOVERNANCE_START -->", Rr = "<!-- GOVERNANCE_END -->";
6211
+ async function zr() {
6212
+ try {
6213
+ K("Document Governance"), J("1️⃣ Insert governance content into 'README.md'");
6214
+ let [e, t] = await Promise.all([W("package.json"), W("config.json")]), { owner: n, repo: r } = Br(e), i = Ur(n, r, Vr(e), Hr(t.firstCreatedAt));
6215
+ await zn("README.md", Wn(await G("./README.md"), i, Lr, Rr)), q("Governance documented");
6216
+ } catch (e) {
6217
+ console.error("❌ Error documenting governance", e), process.exit(1);
6218
+ }
6219
+ }
6220
+ function Br(e) {
6221
+ let t = e.repository, n = typeof t == "string" ? t : t?.url;
6222
+ if (n == null || n === "") throw Error("package.json 'repository' field is required to document governance.");
6223
+ let r = n.replace(/^git\+/, "").replace(/\.git$/, ""), i = /github\.com[/:]([^/]+)\/([^/]+)$/.exec(r);
6224
+ if (i?.[1] == null || i[2] == null) throw Error(`Unable to parse GitHub owner/repo from '${n}'.`);
6225
+ return {
6226
+ owner: i[1],
6227
+ repo: i[2]
6228
+ };
6229
+ }
6230
+ function Vr(e) {
6231
+ let t = e.author, n = typeof t == "string" ? t : t?.name;
6232
+ if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
6233
+ return n.replace(/\s*<[^>]*>\s*/, "").trim();
6234
+ }
6235
+ function Hr(e) {
6236
+ let t = (/* @__PURE__ */ new Date()).getFullYear();
6237
+ if (e == null) return String(t);
6238
+ let n = new Date(e).getFullYear();
6239
+ return n === t ? String(t) : `${String(n)}-present`;
6240
+ }
6241
+ function Ur(e, t, n, r) {
6242
+ let i = `https://github.com/${e}/${t}`, a = `github.com/${e}/${t}`;
6243
+ return `### CodeQL
6244
+
6245
+ [CodeQL](${i}/security/code-scanning) static analysis runs on every push to \`main\` and on a weekly schedule, scanning TypeScript, JavaScript, Rust, and GitHub Actions workflow files for security vulnerabilities and coding errors.
6246
+
6247
+ ### SonarCloud
6248
+
6249
+ [SonarCloud](https://sonarcloud.io/summary/new_code?id=${e}_${t}) performs continuous code quality and security analysis on every push, detecting bugs, code smells, and security vulnerabilities in the TypeScript source.
6250
+
6251
+ ### Vulnerability Scanning
6252
+
6253
+ Two complementary tools continuously monitor dependencies for known vulnerabilities:
6254
+
6255
+ - **[GitHub Dependabot](https://docs.github.com/en/code-security/dependabot)** automatically raises pull requests to update vulnerable dependencies, drawing on the GitHub Advisory Database which combines NVD and npm-specific advisories.
6256
+ - **npm audit** runs on every push to \`main\` via the CI workflow, failing the build if any high or critical severity vulnerabilities are detected.
6257
+
6258
+ ### Supply Chain Security
6259
+
6260
+ [Socket.dev](https://socket.dev) monitors all dependencies for supply chain risk — detecting malicious packages, dependency confusion, typosquatting, and suspicious behaviour that may not yet have a CVE.
6261
+
6262
+ ### Reporting Vulnerabilities
6263
+
6264
+ Please do not open public GitHub issues for security vulnerabilities. Use [GitHub private vulnerability reporting](${i}/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.
6265
+
6266
+ ### OpenSSF 🚧
6267
+
6268
+ [![OpenSSF Scorecard](https://api.scorecard.dev/projects/${a}/badge)](https://scorecard.dev/viewer/?uri=${a})
6269
+
6270
+ This project is working towards the [OpenSSF Best Practices](https://www.bestpractices.dev) Passing badge, a self-certification covering security policy, vulnerability reporting, build processes, code quality, and more. Currently the [OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=${a}) provides an independent automated assessment of the project's security practices and is an ongoing area of improvement.
6271
+
6272
+ ## Contributing
6273
+
6274
+ This repository is maintained solely by its owner and does not, at present, accept external contributions into the canonical repo. Its source is published openly under the MIT License — every DPUse project is fully open source except DPUse Engine, which remains closed and proprietary.
6275
+
6276
+ For security vulnerabilities, see [Reporting Vulnerabilities](#reporting-vulnerabilities). For bugs, inconsistencies, or other feedback, [open a GitHub issue](${i}/issues) — feedback is read, but responses and fixes are at the maintainer's discretion.
6277
+
6278
+ ## License
6279
+
6280
+ This project is licensed under the MIT License, permitting free use, modification, and distribution.
6281
+
6282
+ [MIT](./LICENSE) © ${r} ${n}`;
6283
+ }
6284
+ //#endregion
6209
6285
  //#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-dBVLwQIt.js
6210
- var Rr, zr = {
6286
+ var Wr, Gr = {
6211
6287
  lang: void 0,
6212
6288
  message: void 0,
6213
6289
  abortEarly: void 0,
6214
6290
  abortPipeEarly: void 0
6215
6291
  };
6216
6292
  /* @__NO_SIDE_EFFECTS__ */
6217
- function Br(e) {
6218
- return !e && !Rr ? zr : {
6219
- lang: e?.lang ?? Rr?.lang,
6293
+ function Kr(e) {
6294
+ return !e && !Wr ? Gr : {
6295
+ lang: e?.lang ?? Wr?.lang,
6220
6296
  message: e?.message,
6221
- abortEarly: e?.abortEarly ?? Rr?.abortEarly,
6222
- abortPipeEarly: e?.abortPipeEarly ?? Rr?.abortPipeEarly
6297
+ abortEarly: e?.abortEarly ?? Wr?.abortEarly,
6298
+ abortPipeEarly: e?.abortPipeEarly ?? Wr?.abortPipeEarly
6223
6299
  };
6224
6300
  }
6225
- var Vr;
6301
+ var qr;
6226
6302
  /* @__NO_SIDE_EFFECTS__ */
6227
- function Hr(e) {
6228
- return Vr?.get(e);
6303
+ function Jr(e) {
6304
+ return qr?.get(e);
6229
6305
  }
6230
- var Ur;
6306
+ var Yr;
6231
6307
  /* @__NO_SIDE_EFFECTS__ */
6232
- function Wr(e) {
6233
- return Ur?.get(e);
6308
+ function Xr(e) {
6309
+ return Yr?.get(e);
6234
6310
  }
6235
- var Gr;
6311
+ var Zr;
6236
6312
  /* @__NO_SIDE_EFFECTS__ */
6237
- function Kr(e, t) {
6238
- return Gr?.get(e)?.get(t);
6313
+ function Qr(e, t) {
6314
+ return Zr?.get(e)?.get(t);
6239
6315
  }
6240
6316
  /* @__NO_SIDE_EFFECTS__ */
6241
- function qr(e) {
6317
+ function $r(e) {
6242
6318
  let t = typeof e;
6243
6319
  return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
6244
6320
  }
6245
- function Y(e, t, n, r, i) {
6246
- let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ qr(a), c = {
6321
+ function X(e, t, n, r, i) {
6322
+ let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ $r(a), c = {
6247
6323
  kind: e.kind,
6248
6324
  type: e.type,
6249
6325
  input: a,
@@ -6256,50 +6332,50 @@ function Y(e, t, n, r, i) {
6256
6332
  lang: r.lang,
6257
6333
  abortEarly: r.abortEarly,
6258
6334
  abortPipeEarly: r.abortPipeEarly
6259
- }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ Kr(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Wr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Hr(c.lang);
6335
+ }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ Qr(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Xr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Jr(c.lang);
6260
6336
  u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
6261
6337
  }
6262
- var Jr = /* @__PURE__ */ new WeakMap();
6338
+ var ei = /* @__PURE__ */ new WeakMap();
6263
6339
  /* @__NO_SIDE_EFFECTS__ */
6264
- function X(e) {
6265
- let t = Jr.get(e);
6340
+ function ti(e) {
6341
+ let t = ei.get(e);
6266
6342
  return t || (t = {
6267
6343
  version: 1,
6268
6344
  vendor: "valibot",
6269
6345
  validate(t) {
6270
- return e["~run"]({ value: t }, /* @__PURE__ */ Br());
6346
+ return e["~run"]({ value: t }, /* @__PURE__ */ Kr());
6271
6347
  }
6272
- }, Jr.set(e, t)), t;
6348
+ }, ei.set(e, t)), t;
6273
6349
  }
6274
6350
  /* @__NO_SIDE_EFFECTS__ */
6275
- function Yr(e, t) {
6351
+ function ni(e, t) {
6276
6352
  return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
6277
6353
  }
6278
6354
  /* @__NO_SIDE_EFFECTS__ */
6279
- function Xr(e, t) {
6355
+ function ri(e, t) {
6280
6356
  let n = [...new Set(e)];
6281
6357
  return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
6282
6358
  }
6283
6359
  /* @__NO_SIDE_EFFECTS__ */
6284
- function Zr(e, t, n) {
6360
+ function ii(e, t, n) {
6285
6361
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
6286
6362
  }
6287
6363
  /* @__NO_SIDE_EFFECTS__ */
6288
- function Qr(e, t, n) {
6364
+ function ai(e, t, n) {
6289
6365
  return typeof e.default == "function" ? e.default(t, n) : e.default;
6290
6366
  }
6291
6367
  /* @__NO_SIDE_EFFECTS__ */
6292
- function $r(e, t) {
6368
+ function oi(e, t) {
6293
6369
  return {
6294
6370
  kind: "schema",
6295
6371
  type: "array",
6296
- reference: $r,
6372
+ reference: oi,
6297
6373
  expects: "Array",
6298
6374
  async: !1,
6299
6375
  item: e,
6300
6376
  message: t,
6301
6377
  get "~standard"() {
6302
- return /* @__PURE__ */ X(this);
6378
+ return /* @__PURE__ */ ti(this);
6303
6379
  },
6304
6380
  "~run"(e, t) {
6305
6381
  let n = e.value;
@@ -6323,43 +6399,43 @@ function $r(e, t) {
6323
6399
  }
6324
6400
  a.typed || (e.typed = !1), e.value.push(a.value);
6325
6401
  }
6326
- } else Y(this, "type", e, t);
6402
+ } else X(this, "type", e, t);
6327
6403
  return e;
6328
6404
  }
6329
6405
  };
6330
6406
  }
6331
6407
  /* @__NO_SIDE_EFFECTS__ */
6332
- function ei(e) {
6408
+ function si(e) {
6333
6409
  return {
6334
6410
  kind: "schema",
6335
6411
  type: "boolean",
6336
- reference: ei,
6412
+ reference: si,
6337
6413
  expects: "boolean",
6338
6414
  async: !1,
6339
6415
  message: e,
6340
6416
  get "~standard"() {
6341
- return /* @__PURE__ */ X(this);
6417
+ return /* @__PURE__ */ ti(this);
6342
6418
  },
6343
6419
  "~run"(e, t) {
6344
- return typeof e.value == "boolean" ? e.typed = !0 : Y(this, "type", e, t), e;
6420
+ return typeof e.value == "boolean" ? e.typed = !0 : X(this, "type", e, t), e;
6345
6421
  }
6346
6422
  };
6347
6423
  }
6348
6424
  /* @__NO_SIDE_EFFECTS__ */
6349
- function ti(e, t) {
6425
+ function ci(e, t) {
6350
6426
  return {
6351
6427
  kind: "schema",
6352
6428
  type: "literal",
6353
- reference: ti,
6354
- expects: /* @__PURE__ */ qr(e),
6429
+ reference: ci,
6430
+ expects: /* @__PURE__ */ $r(e),
6355
6431
  async: !1,
6356
6432
  literal: e,
6357
6433
  message: t,
6358
6434
  get "~standard"() {
6359
- return /* @__PURE__ */ X(this);
6435
+ return /* @__PURE__ */ ti(this);
6360
6436
  },
6361
6437
  "~run"(e, t) {
6362
- return e.value === this.literal ? e.typed = !0 : Y(this, "type", e, t), e;
6438
+ return e.value === this.literal ? e.typed = !0 : X(this, "type", e, t), e;
6363
6439
  }
6364
6440
  };
6365
6441
  }
@@ -6374,27 +6450,27 @@ function Z(e, t) {
6374
6450
  wrapped: e,
6375
6451
  default: t,
6376
6452
  get "~standard"() {
6377
- return /* @__PURE__ */ X(this);
6453
+ return /* @__PURE__ */ ti(this);
6378
6454
  },
6379
6455
  "~run"(e, t) {
6380
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ Qr(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6456
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ ai(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6381
6457
  }
6382
6458
  };
6383
6459
  }
6384
6460
  /* @__NO_SIDE_EFFECTS__ */
6385
- function ni(e) {
6461
+ function li(e) {
6386
6462
  return {
6387
6463
  kind: "schema",
6388
6464
  type: "number",
6389
- reference: ni,
6465
+ reference: li,
6390
6466
  expects: "number",
6391
6467
  async: !1,
6392
6468
  message: e,
6393
6469
  get "~standard"() {
6394
- return /* @__PURE__ */ X(this);
6470
+ return /* @__PURE__ */ ti(this);
6395
6471
  },
6396
6472
  "~run"(e, t) {
6397
- return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : Y(this, "type", e, t), e;
6473
+ return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : X(this, "type", e, t), e;
6398
6474
  }
6399
6475
  };
6400
6476
  }
@@ -6409,7 +6485,7 @@ function Q(e, t) {
6409
6485
  entries: e,
6410
6486
  message: t,
6411
6487
  get "~standard"() {
6412
- return /* @__PURE__ */ X(this);
6488
+ return /* @__PURE__ */ ti(this);
6413
6489
  },
6414
6490
  "~run"(e, t) {
6415
6491
  let n = e.value;
@@ -6418,7 +6494,7 @@ function Q(e, t) {
6418
6494
  for (let r in this.entries) {
6419
6495
  let i = this.entries[r];
6420
6496
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
6421
- let a = r in n ? n[r] : /* @__PURE__ */ Qr(i), o = i["~run"]({ value: a }, t);
6497
+ let a = r in n ? n[r] : /* @__PURE__ */ ai(i), o = i["~run"]({ value: a }, t);
6422
6498
  if (o.issues) {
6423
6499
  let i = {
6424
6500
  type: "object",
@@ -6434,8 +6510,8 @@ function Q(e, t) {
6434
6510
  }
6435
6511
  }
6436
6512
  o.typed || (e.typed = !1), e.value[r] = o.value;
6437
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Zr(i);
6438
- else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (Y(this, "key", e, t, {
6513
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ii(i);
6514
+ else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (X(this, "key", e, t, {
6439
6515
  input: void 0,
6440
6516
  expected: `"${r}"`,
6441
6517
  path: [{
@@ -6447,48 +6523,48 @@ function Q(e, t) {
6447
6523
  }]
6448
6524
  }), t.abortEarly)) break;
6449
6525
  }
6450
- } else Y(this, "type", e, t);
6526
+ } else X(this, "type", e, t);
6451
6527
  return e;
6452
6528
  }
6453
6529
  };
6454
6530
  }
6455
6531
  /* @__NO_SIDE_EFFECTS__ */
6456
- function ri(e, t) {
6532
+ function ui(e, t) {
6457
6533
  return {
6458
6534
  kind: "schema",
6459
6535
  type: "optional",
6460
- reference: ri,
6536
+ reference: ui,
6461
6537
  expects: `(${e.expects} | undefined)`,
6462
6538
  async: !1,
6463
6539
  wrapped: e,
6464
6540
  default: t,
6465
6541
  get "~standard"() {
6466
- return /* @__PURE__ */ X(this);
6542
+ return /* @__PURE__ */ ti(this);
6467
6543
  },
6468
6544
  "~run"(e, t) {
6469
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ Qr(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6545
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ ai(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6470
6546
  }
6471
6547
  };
6472
6548
  }
6473
6549
  /* @__NO_SIDE_EFFECTS__ */
6474
- function ii(e, t, n) {
6550
+ function di(e, t, n) {
6475
6551
  return {
6476
6552
  kind: "schema",
6477
6553
  type: "record",
6478
- reference: ii,
6554
+ reference: di,
6479
6555
  expects: "Object",
6480
6556
  async: !1,
6481
6557
  key: e,
6482
6558
  value: t,
6483
6559
  message: n,
6484
6560
  get "~standard"() {
6485
- return /* @__PURE__ */ X(this);
6561
+ return /* @__PURE__ */ ti(this);
6486
6562
  },
6487
6563
  "~run"(e, t) {
6488
6564
  let n = e.value;
6489
6565
  if (n && typeof n == "object") {
6490
6566
  e.typed = !0, e.value = {};
6491
- for (let r in n) if (/* @__PURE__ */ Yr(n, r)) {
6567
+ for (let r in n) if (/* @__PURE__ */ ni(n, r)) {
6492
6568
  let i = n[r], a = this.key["~run"]({ value: r }, t);
6493
6569
  if (a.issues) {
6494
6570
  let o = {
@@ -6521,7 +6597,7 @@ function ii(e, t, n) {
6521
6597
  }
6522
6598
  (!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
6523
6599
  }
6524
- } else Y(this, "type", e, t);
6600
+ } else X(this, "type", e, t);
6525
6601
  return e;
6526
6602
  }
6527
6603
  };
@@ -6536,32 +6612,32 @@ function $(e) {
6536
6612
  async: !1,
6537
6613
  message: e,
6538
6614
  get "~standard"() {
6539
- return /* @__PURE__ */ X(this);
6615
+ return /* @__PURE__ */ ti(this);
6540
6616
  },
6541
6617
  "~run"(e, t) {
6542
- return typeof e.value == "string" ? e.typed = !0 : Y(this, "type", e, t), e;
6618
+ return typeof e.value == "string" ? e.typed = !0 : X(this, "type", e, t), e;
6543
6619
  }
6544
6620
  };
6545
6621
  }
6546
6622
  /* @__NO_SIDE_EFFECTS__ */
6547
- function ai(e) {
6623
+ function fi(e) {
6548
6624
  let t;
6549
6625
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
6550
6626
  else t = n.issues;
6551
6627
  return t;
6552
6628
  }
6553
6629
  /* @__NO_SIDE_EFFECTS__ */
6554
- function oi(e, t) {
6630
+ function pi(e, t) {
6555
6631
  return {
6556
6632
  kind: "schema",
6557
6633
  type: "union",
6558
- reference: oi,
6559
- expects: /* @__PURE__ */ Xr(e.map((e) => e.expects), "|"),
6634
+ reference: pi,
6635
+ expects: /* @__PURE__ */ ri(e.map((e) => e.expects), "|"),
6560
6636
  async: !1,
6561
6637
  options: e,
6562
6638
  message: t,
6563
6639
  get "~standard"() {
6564
- return /* @__PURE__ */ X(this);
6640
+ return /* @__PURE__ */ ti(this);
6565
6641
  },
6566
6642
  "~run"(e, t) {
6567
6643
  let n, r, i;
@@ -6577,24 +6653,24 @@ function oi(e, t) {
6577
6653
  if (n) return n;
6578
6654
  if (r) {
6579
6655
  if (r.length === 1) return r[0];
6580
- Y(this, "type", e, t, { issues: /* @__PURE__ */ ai(r) }), e.typed = !0;
6656
+ X(this, "type", e, t, { issues: /* @__PURE__ */ fi(r) }), e.typed = !0;
6581
6657
  } else if (i?.length === 1) return i[0];
6582
- else Y(this, "type", e, t, { issues: /* @__PURE__ */ ai(i) });
6658
+ else X(this, "type", e, t, { issues: /* @__PURE__ */ fi(i) });
6583
6659
  return e;
6584
6660
  }
6585
6661
  };
6586
6662
  }
6587
- var si = (e) => /* @__PURE__ */ oi(e.map((e) => /* @__PURE__ */ ti(e))), ci = /* @__PURE__ */ Q({
6663
+ var mi = (e) => /* @__PURE__ */ pi(e.map((e) => /* @__PURE__ */ ci(e))), hi = /* @__PURE__ */ Q({
6588
6664
  en: /* @__PURE__ */ $(),
6589
6665
  es: /* @__PURE__ */ $()
6590
- }), li = /* @__PURE__ */ Q({
6591
- en: /* @__PURE__ */ ri(/* @__PURE__ */ $r(/* @__PURE__ */ $())),
6592
- es: /* @__PURE__ */ ri(/* @__PURE__ */ $r(/* @__PURE__ */ $()))
6593
- }), ui = /* @__PURE__ */ Q({
6594
- en: /* @__PURE__ */ ri(/* @__PURE__ */ $()),
6595
- es: /* @__PURE__ */ ri(/* @__PURE__ */ $())
6666
+ }), gi = /* @__PURE__ */ Q({
6667
+ en: /* @__PURE__ */ ui(/* @__PURE__ */ oi(/* @__PURE__ */ $())),
6668
+ es: /* @__PURE__ */ ui(/* @__PURE__ */ oi(/* @__PURE__ */ $()))
6669
+ }), _i = /* @__PURE__ */ Q({
6670
+ en: /* @__PURE__ */ ui(/* @__PURE__ */ $()),
6671
+ es: /* @__PURE__ */ ui(/* @__PURE__ */ $())
6596
6672
  });
6597
- si([
6673
+ mi([
6598
6674
  "app",
6599
6675
  "connection",
6600
6676
  "connector",
@@ -6619,12 +6695,12 @@ si([
6619
6695
  "presenterPresentation",
6620
6696
  "tool"
6621
6697
  ]);
6622
- var di = si([
6698
+ var vi = mi([
6623
6699
  "amber",
6624
6700
  "green",
6625
6701
  "red",
6626
6702
  "other"
6627
- ]), fi = si([
6703
+ ]), yi = mi([
6628
6704
  "alpha",
6629
6705
  "beta",
6630
6706
  "generalAvailability",
@@ -6634,31 +6710,31 @@ var di = si([
6634
6710
  "releaseCandidate",
6635
6711
  "unavailable",
6636
6712
  "underReview"
6637
- ]), pi = /* @__PURE__ */ Q({
6638
- color: di,
6713
+ ]), bi = /* @__PURE__ */ Q({
6714
+ color: vi,
6639
6715
  label: /* @__PURE__ */ $()
6640
- }), mi = /* @__PURE__ */ Q({
6716
+ }), xi = /* @__PURE__ */ Q({
6641
6717
  id: /* @__PURE__ */ $(),
6642
- label: ui,
6643
- description: li,
6718
+ label: _i,
6719
+ description: gi,
6644
6720
  icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6645
6721
  iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6646
6722
  iconNeutral: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6647
- order: /* @__PURE__ */ ni(),
6723
+ order: /* @__PURE__ */ li(),
6648
6724
  path: /* @__PURE__ */ $()
6649
- }), hi = {
6725
+ }), Si = {
6650
6726
  id: /* @__PURE__ */ $(),
6651
- label: ui,
6652
- description: li,
6653
- firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ ni()),
6727
+ label: _i,
6728
+ description: gi,
6729
+ firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ li()),
6654
6730
  icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6655
6731
  iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6656
6732
  iconNeutral: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6657
- lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ ni()),
6658
- status: /* @__PURE__ */ Z(pi),
6659
- statusId: /* @__PURE__ */ Z(fi)
6733
+ lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ li()),
6734
+ status: /* @__PURE__ */ Z(bi),
6735
+ statusId: /* @__PURE__ */ Z(yi)
6660
6736
  };
6661
- ({ ...hi }), si([
6737
+ ({ ...Si }), mi([
6662
6738
  "app",
6663
6739
  "engine",
6664
6740
  "connector",
@@ -6669,14 +6745,14 @@ var di = si([
6669
6745
  ]);
6670
6746
  //#endregion
6671
6747
  //#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-CUHmgYLu.js
6672
- var gi = {
6673
- ...hi,
6748
+ var Ci = {
6749
+ ...Si,
6674
6750
  version: /* @__PURE__ */ $()
6675
6751
  };
6676
- ({ ...gi });
6752
+ ({ ...Ci });
6677
6753
  //#endregion
6678
6754
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
6679
- var _i = si([
6755
+ var wi = mi([
6680
6756
  "abortOperation",
6681
6757
  "auditObjectContent",
6682
6758
  "createObject",
@@ -6691,35 +6767,35 @@ var _i = si([
6691
6767
  "retrieveChunks",
6692
6768
  "retrieveRecords",
6693
6769
  "upsertRecords"
6694
- ]), vi = si([
6770
+ ]), Ti = mi([
6695
6771
  "application",
6696
6772
  "curatedDataset",
6697
6773
  "database",
6698
6774
  "fileStore"
6699
- ]), yi = /* @__PURE__ */ Q({ label: ci }), bi = /* @__PURE__ */ Q({
6700
- authMethodId: si([
6775
+ ]), Ei = /* @__PURE__ */ Q({ label: hi }), Di = /* @__PURE__ */ Q({
6776
+ authMethodId: mi([
6701
6777
  "apiKey",
6702
6778
  "disabled",
6703
6779
  "oAuth2",
6704
6780
  "none"
6705
6781
  ]),
6706
- activeConnectionCount: /* @__PURE__ */ ri(/* @__PURE__ */ ni()),
6707
- canDescribe: /* @__PURE__ */ ri(/* @__PURE__ */ ei()),
6708
- id: /* @__PURE__ */ ri(/* @__PURE__ */ $()),
6709
- label: /* @__PURE__ */ ri(ci),
6710
- maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ ni()),
6711
- params: /* @__PURE__ */ ri(/* @__PURE__ */ $r(/* @__PURE__ */ ii(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6712
- }), xi = /* @__PURE__ */ Q({
6713
- typeId: /* @__PURE__ */ ti("connector"),
6714
- ...gi,
6715
- actionNames: /* @__PURE__ */ $r(_i),
6716
- category: /* @__PURE__ */ Z(yi),
6717
- categoryId: vi,
6718
- implementations: /* @__PURE__ */ ii(/* @__PURE__ */ $(), bi),
6782
+ activeConnectionCount: /* @__PURE__ */ ui(/* @__PURE__ */ li()),
6783
+ canDescribe: /* @__PURE__ */ ui(/* @__PURE__ */ si()),
6784
+ id: /* @__PURE__ */ ui(/* @__PURE__ */ $()),
6785
+ label: /* @__PURE__ */ ui(hi),
6786
+ maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ li()),
6787
+ params: /* @__PURE__ */ ui(/* @__PURE__ */ oi(/* @__PURE__ */ di(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6788
+ }), Oi = /* @__PURE__ */ Q({
6789
+ typeId: /* @__PURE__ */ ci("connector"),
6790
+ ...Ci,
6791
+ actionNames: /* @__PURE__ */ oi(wi),
6792
+ category: /* @__PURE__ */ Z(Ei),
6793
+ categoryId: Ti,
6794
+ implementations: /* @__PURE__ */ di(/* @__PURE__ */ $(), Di),
6719
6795
  vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6720
6796
  vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6721
6797
  vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $())
6722
- }), Si = {
6798
+ }), ki = {
6723
6799
  abortOperation: "Abort Operation",
6724
6800
  auditObjectContent: "Audit Object Content",
6725
6801
  createObject: "Create Object",
@@ -6734,12 +6810,12 @@ var _i = si([
6734
6810
  retrieveChunks: "Retrieve Chunks",
6735
6811
  retrieveRecords: "Retrieve Records",
6736
6812
  upsertRecords: "Upsert Records"
6737
- }, Ci = /* @__PURE__ */ new Set([
6813
+ }, Ai = /* @__PURE__ */ new Set([
6738
6814
  "createObject",
6739
6815
  "dropObject",
6740
6816
  "removeRecords",
6741
6817
  "upsertRecords"
6742
- ]), wi = /* @__PURE__ */ new Set([
6818
+ ]), ji = /* @__PURE__ */ new Set([
6743
6819
  "auditObjectContent",
6744
6820
  "findObject",
6745
6821
  "getReadableStream",
@@ -6749,61 +6825,100 @@ var _i = si([
6749
6825
  "retrieveChunks",
6750
6826
  "retrieveRecords"
6751
6827
  ]);
6752
- function Ti(e) {
6828
+ function Mi(e) {
6753
6829
  let t = !1, n = !1;
6754
- for (let r of e) wi.has(r) && (t = !0), Ci.has(r) && (n = !0);
6830
+ for (let r of e) ji.has(r) && (t = !0), Ai.has(r) && (n = !0);
6755
6831
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
6756
6832
  }
6757
- function Ei(e) {
6833
+ function Ni(e) {
6758
6834
  let t = new Set(e), n = "|Action|Supported|\n";
6759
6835
  n += "|:----|:-------:|\n";
6760
- for (let e of Object.keys(Si)) n += `| ${Si[e]} | ${t.has(e) ? "✓" : ""} |\n`;
6836
+ for (let e of Object.keys(ki)) n += `| ${ki[e]} | ${t.has(e) ? "✓" : ""} |\n`;
6761
6837
  return n;
6762
6838
  }
6763
6839
  //#endregion
6764
6840
  //#region src/actions/documentActions.ts
6765
- var Di = "<!-- CONNECTOR_ACTIONS_START -->", Oi = "<!-- CONNECTOR_ACTIONS_END -->", ki = "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.", Ai = {
6841
+ var Pi = "<!-- CONNECTOR_ACTIONS_START -->", Fi = "<!-- CONNECTOR_ACTIONS_END -->", Ii = "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.", Li = {
6766
6842
  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.",
6767
6843
  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.",
6768
6844
  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.",
6769
6845
  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."
6770
- }, ji = "The table below lists all connector actions and highlights those supported by this connector.";
6771
- async function Mi() {
6846
+ }, Ri = "The table below lists all connector actions and highlights those supported by this connector.";
6847
+ async function zi() {
6772
6848
  try {
6773
- G("Document Actions"), q("1️⃣ Insert actions description and table into 'README.md'");
6774
- let e = (await W("config.json")).actionNames ?? [], t = Ti(e), n = Ei(e), r = `${ki}\n\n${Ai[t]} ${ji}\n\n${n}`;
6775
- await Bn("README.md", Gn(await Ln("./README.md"), r, Di, Oi)), K("Actions documented");
6849
+ K("Document Actions"), J("1️⃣ Insert actions description and table into 'README.md'");
6850
+ let e = (await W("config.json")).actionNames ?? [], t = Mi(e), n = Ni(e), r = `${Ii}\n\n${Li[t]} ${Ri}\n\n${n}`;
6851
+ await zn("README.md", Wn(await G("./README.md"), r, Pi, Fi)), q("Actions documented");
6776
6852
  } catch (e) {
6777
6853
  console.error("❌ Error documenting actions", e), process.exit(1);
6778
6854
  }
6779
6855
  }
6780
6856
  //#endregion
6857
+ //#region src/actions/documentUsage.ts
6858
+ var Bi = "<!-- USAGE_START -->", Vi = "<!-- USAGE_END -->";
6859
+ async function Hi() {
6860
+ try {
6861
+ K("Document Usage"), J("1️⃣ Insert usage content into 'README.md'");
6862
+ let e = await W("package.json"), t = Ui(e), n = Ki(t, Wi(t), Gi(e.engines?.node), Gi(e.engines?.npm));
6863
+ await zn("README.md", Wn(await G("./README.md"), n, Bi, Vi)), q("Usage documented");
6864
+ } catch (e) {
6865
+ console.error("❌ Error documenting usage", e), process.exit(1);
6866
+ }
6867
+ }
6868
+ function Ui(e) {
6869
+ let t = e.repository, n = typeof t == "string" ? t : t?.url;
6870
+ if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
6871
+ return n.replace(/^git\+/, "");
6872
+ }
6873
+ function Wi(e) {
6874
+ return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
6875
+ }
6876
+ function Gi(e) {
6877
+ if (e == null) throw Error("package.json 'engines' field is required to document usage.");
6878
+ let t = /\d+(?:\.\d+)*/.exec(e);
6879
+ if (t == null) throw Error(`Unable to parse engine version from '${e}'.`);
6880
+ return t[0];
6881
+ }
6882
+ function Ki(e, t, n, r) {
6883
+ 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.
6884
+
6885
+ 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.
6886
+
6887
+ \`\`\`bash
6888
+ git clone ${e}
6889
+ cd ${t}
6890
+ npm install
6891
+ \`\`\`
6892
+
6893
+ _Requires [Node.js](https://nodejs.org/) ${n} or later and [npm](https://www.npmjs.com/) ${r} or later._`;
6894
+ }
6895
+ //#endregion
6781
6896
  //#region src/actions/formatCode.ts
6782
- async function Ni() {
6897
+ async function qi() {
6783
6898
  try {
6784
- G("Format Code"), await Fn("1️⃣ Format", "prettier", [
6899
+ K("Format Code"), await Fn("1️⃣ Format", "prettier", [
6785
6900
  "--write",
6786
6901
  "*.json",
6787
6902
  "*.md",
6788
6903
  "*.ts",
6789
6904
  ...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
6790
- ]), K("Code formatted");
6905
+ ]), q("Code formatted");
6791
6906
  } catch (e) {
6792
6907
  console.error("❌ Error formatting code", e), process.exit(1);
6793
6908
  }
6794
6909
  }
6795
6910
  //#endregion
6796
6911
  //#region src/actions/lintCode.ts
6797
- async function Pi() {
6912
+ async function Ji() {
6798
6913
  try {
6799
- G("Lint Code"), await Fn("1️⃣ Lint", "eslint", ["."]), K("Code linted");
6914
+ K("Lint Code"), await Fn("1️⃣ Lint", "eslint", ["."]), q("Code linted");
6800
6915
  } catch (e) {
6801
6916
  console.error("❌ Error linting code", e), process.exit(1);
6802
6917
  }
6803
6918
  }
6804
6919
  //#endregion
6805
6920
  //#region src/utilities/cloudflare.ts
6806
- async function Fi() {
6921
+ async function Yi() {
6807
6922
  let e = await W("config.json"), t = {
6808
6923
  body: JSON.stringify(e),
6809
6924
  headers: { "Content-Type": "application/json" },
@@ -6811,11 +6926,11 @@ async function Fi() {
6811
6926
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
6812
6927
  if (!n.ok) throw Error(await n.text());
6813
6928
  }
6814
- async function Ii(e, t) {
6929
+ async function Xi(e, t) {
6815
6930
  async function n(e, t, r) {
6816
6931
  for (let i of r) {
6817
6932
  let r = `${e}/${i}`, a = `${t}/${i}`;
6818
- (await Hn(r)).isDirectory() ? await n(r, a, await Nn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Pn(void 0, "wrangler", [
6933
+ (await Vn(r)).isDirectory() ? await n(r, a, await Nn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Pn(void 0, "wrangler", [
6819
6934
  "r2",
6820
6935
  "object",
6821
6936
  "put",
@@ -6829,7 +6944,7 @@ async function Ii(e, t) {
6829
6944
  let r = await Nn(`${e}/${t}/`);
6830
6945
  await n(`${e}/${t}`, t, r);
6831
6946
  }
6832
- async function Li(e) {
6947
+ async function Zi(e) {
6833
6948
  let t = e.id, n = {
6834
6949
  body: JSON.stringify(e),
6835
6950
  headers: { "Content-Type": "application/json" },
@@ -6837,7 +6952,7 @@ async function Li(e) {
6837
6952
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
6838
6953
  if (!r.ok) throw Error(await r.text());
6839
6954
  }
6840
- async function Ri(e, t) {
6955
+ async function Qi(e, t) {
6841
6956
  let n = `v${e.version ?? "unknown"}`;
6842
6957
  async function r(e, r = "") {
6843
6958
  let i = await Nn(e, { withFileTypes: !0 });
@@ -6861,24 +6976,24 @@ async function Ri(e, t) {
6861
6976
  }
6862
6977
  //#endregion
6863
6978
  //#region node_modules/valibot/dist/index.mjs
6864
- var zi, Bi = {
6979
+ var $i, ea = {
6865
6980
  lang: void 0,
6866
6981
  message: void 0,
6867
6982
  abortEarly: void 0,
6868
6983
  abortPipeEarly: void 0
6869
6984
  };
6870
6985
  /* @__NO_SIDE_EFFECTS__ */
6871
- function Vi(e) {
6872
- return !e && !zi ? Bi : {
6873
- lang: e?.lang ?? zi?.lang,
6986
+ function ta(e) {
6987
+ return !e && !$i ? ea : {
6988
+ lang: e?.lang ?? $i?.lang,
6874
6989
  message: e?.message,
6875
- abortEarly: e?.abortEarly ?? zi?.abortEarly,
6876
- abortPipeEarly: e?.abortPipeEarly ?? zi?.abortPipeEarly
6990
+ abortEarly: e?.abortEarly ?? $i?.abortEarly,
6991
+ abortPipeEarly: e?.abortPipeEarly ?? $i?.abortPipeEarly
6877
6992
  };
6878
6993
  }
6879
6994
  /* @__NO_SIDE_EFFECTS__ */
6880
- function Hi(e, t, n) {
6881
- let r = e["~run"]({ value: t }, /* @__PURE__ */ Vi(n));
6995
+ function na(e, t, n) {
6996
+ let r = e["~run"]({ value: t }, /* @__PURE__ */ ta(n));
6882
6997
  return {
6883
6998
  typed: r.typed,
6884
6999
  success: !r.issues,
@@ -6888,69 +7003,69 @@ function Hi(e, t, n) {
6888
7003
  }
6889
7004
  //#endregion
6890
7005
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleContext.es.js
6891
- var Ui = /* @__PURE__ */ Q({
6892
- typeId: /* @__PURE__ */ ti("contextArea"),
6893
- ...hi,
6894
- modelRefs: /* @__PURE__ */ $r(mi),
6895
- order: /* @__PURE__ */ ni()
6896
- }), Wi = si(["listContextFocuses"]), Gi = /* @__PURE__ */ Q({
6897
- typeId: /* @__PURE__ */ ti("context"),
6898
- ...gi,
6899
- actionNames: /* @__PURE__ */ $r(Wi),
6900
- models: /* @__PURE__ */ $r(Ui)
6901
- }), Ki = si([
7006
+ var ra = /* @__PURE__ */ Q({
7007
+ typeId: /* @__PURE__ */ ci("contextArea"),
7008
+ ...Si,
7009
+ modelRefs: /* @__PURE__ */ oi(xi),
7010
+ order: /* @__PURE__ */ li()
7011
+ }), ia = mi(["listContextFocuses"]), aa = /* @__PURE__ */ Q({
7012
+ typeId: /* @__PURE__ */ ci("context"),
7013
+ ...Ci,
7014
+ actionNames: /* @__PURE__ */ oi(ia),
7015
+ models: /* @__PURE__ */ oi(ra)
7016
+ }), oa = mi([
6902
7017
  "list",
6903
7018
  "render",
6904
7019
  "setColorMode"
6905
- ]), qi = /* @__PURE__ */ Q({
6906
- typeId: /* @__PURE__ */ ti("presenter"),
6907
- ...gi,
6908
- actionNames: /* @__PURE__ */ $r(Ki),
6909
- presentations: /* @__PURE__ */ $r(mi)
7020
+ ]), sa = /* @__PURE__ */ Q({
7021
+ typeId: /* @__PURE__ */ ci("presenter"),
7022
+ ...Ci,
7023
+ actionNames: /* @__PURE__ */ oi(oa),
7024
+ presentations: /* @__PURE__ */ oi(xi)
6910
7025
  });
6911
7026
  //#endregion
6912
7027
  //#region src/actions/manageProject.ts
6913
- async function Ji() {
7028
+ async function ca() {
6914
7029
  try {
6915
- G("Build Project"), await Fn("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
7030
+ K("Build Project"), await Fn("1️⃣ Bundle project", "vite", ["build"]), q("Project built");
6916
7031
  } catch (e) {
6917
7032
  console.error("❌ Error building project", e), process.exit(1);
6918
7033
  }
6919
7034
  }
6920
- async function Yi() {
7035
+ async function la() {
6921
7036
  try {
6922
- G("Publish Project");
6923
- let e = await W("package.json"), t = await W("config.json"), n = Vn(t.id);
6924
- if (n.typeId === "app") q("1️⃣ Register module"), await Fi();
6925
- else if (n.typeId === "engine") q("1️⃣ Register module"), await Ri(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Li(t);
6926
- else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required");
7037
+ K("Publish Project");
7038
+ let e = await W("package.json"), t = await W("config.json"), n = Bn(t.id);
7039
+ if (n.typeId === "app") J("1️⃣ Register module"), await Yi();
7040
+ else if (n.typeId === "engine") J("1️⃣ Register module"), await Qi(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Zi(t);
7041
+ else if (n.uploadGroupName === void 0) J("1️⃣ Publishing NOT required");
6927
7042
  else {
6928
- q("1️⃣ Register module");
7043
+ J("1️⃣ Register module");
6929
7044
  let r = t.id.split("-").slice(2).join("-");
6930
- await Ri(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Li(t);
7045
+ await Qi(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Zi(t);
6931
7046
  }
6932
- K(`Project version '${e.version ?? "unknown"}' published.`);
7047
+ q(`Project version '${e.version ?? "unknown"}' published.`);
6933
7048
  } catch (e) {
6934
7049
  console.error("❌ Error publishing project", e), process.exit(1);
6935
7050
  }
6936
7051
  }
6937
- async function Xi() {
7052
+ async function ua() {
6938
7053
  try {
6939
- G("Release Project");
7054
+ K("Release Project");
6940
7055
  let e = await W("package.json"), t = await W("config.json");
6941
- await ia("1️⃣ ", e);
6942
- let n = Vn(t.id);
7056
+ await va("1️⃣ ", e);
7057
+ let n = Bn(t.id);
6943
7058
  switch (n.typeId) {
6944
7059
  case "connector":
6945
- t = await Qi("2️⃣ ", e);
7060
+ t = await fa("2️⃣ ", e);
6946
7061
  break;
6947
7062
  case "context":
6948
- t = await $i("2️⃣ ", e);
7063
+ t = await pa("2️⃣ ", e);
6949
7064
  break;
6950
7065
  case "presenter":
6951
- t = await ea("2️⃣ ", e);
7066
+ t = await ma("2️⃣ ", e);
6952
7067
  break;
6953
- default: t = await Zi("2️⃣ ", e);
7068
+ default: t = await da("2️⃣ ", e);
6954
7069
  }
6955
7070
  if (await Fn("3️⃣ Bundle project", "vite", ["build"]), await Pn("4️⃣ Stage changes", "git", ["add", "."]), await Pn("5️⃣ Commit changes", "git", [
6956
7071
  "commit",
@@ -6960,73 +7075,73 @@ async function Xi() {
6960
7075
  "push",
6961
7076
  "origin",
6962
7077
  "main:main"
6963
- ]), n.typeId === "app") q("7️⃣ Register module"), await Fi();
6964
- else if (n.typeId === "engine") q("7️⃣ Register module"), await Ri(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Li(t);
6965
- else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required");
7078
+ ]), n.typeId === "app") J("7️⃣ Register module"), await Yi();
7079
+ else if (n.typeId === "engine") J("7️⃣ Register module"), await Qi(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Zi(t);
7080
+ else if (n.uploadGroupName === void 0) J("7️⃣ Registration NOT required");
6966
7081
  else {
6967
- q("7️⃣ Register module");
7082
+ J("7️⃣ Register module");
6968
7083
  let r = t.id.split("-").slice(2).join("-");
6969
- await Ri(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Li(t);
7084
+ await Qi(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Zi(t);
6970
7085
  }
6971
7086
  if (n.publishedTo === "npm") {
6972
7087
  let e = ".npmrc";
6973
7088
  try {
6974
- await Bn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Fn("8️⃣ Publish to npm", "npm", [
7089
+ await zn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Fn("8️⃣ Publish to npm", "npm", [
6975
7090
  "publish",
6976
7091
  "--access",
6977
7092
  "public"
6978
7093
  ]);
6979
7094
  } finally {
6980
- await Rn(e);
7095
+ await Ln(e);
6981
7096
  }
6982
- } else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
6983
- K(`Project version '${e.version ?? "unknown"}' released.`);
7097
+ } else J(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
7098
+ q(`Project version '${e.version ?? "unknown"}' released.`);
6984
7099
  } catch (e) {
6985
7100
  console.error("❌ Error releasing project", e), process.exit(1);
6986
7101
  }
6987
7102
  }
6988
- async function Zi(e, t) {
6989
- q(`${e} Build project configuration`);
7103
+ async function da(e, t) {
7104
+ J(`${e} Build project configuration`);
6990
7105
  let n = await W("config.json");
6991
- return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await zn("config.json", n), n;
7106
+ return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await Rn("config.json", n), n;
6992
7107
  }
6993
- async function Qi(e, t) {
6994
- q(`${e} Build connector project configuration`);
6995
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Hi(xi, n);
7108
+ async function fa(e, t) {
7109
+ J(`${e} Build connector project configuration`);
7110
+ let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ na(Oi, n);
6996
7111
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
6997
- let a = Un(r);
6998
- return await ta(t, n, a, Ti(a));
7112
+ let a = Hn(r);
7113
+ return await ha(t, n, a, Mi(a));
6999
7114
  }
7000
- async function $i(e, t) {
7001
- q(`${e} Build context project configuration`);
7002
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Hi(Gi, n);
7115
+ async function pa(e, t) {
7116
+ J(`${e} Build context project configuration`);
7117
+ let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ na(aa, n);
7003
7118
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7004
- return await ta(t, n, Un(r));
7119
+ return await ha(t, n, Hn(r));
7005
7120
  }
7006
- async function ea(e, t) {
7007
- q(`${e} Build presenter project configuration`);
7008
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Hi(qi, n);
7121
+ async function ma(e, t) {
7122
+ J(`${e} Build presenter project configuration`);
7123
+ let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ na(sa, n);
7009
7124
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7010
- return await ta(t, n, Un(r));
7125
+ return await ha(t, n, Hn(r));
7011
7126
  }
7012
- async function ta(e, t, n, r) {
7013
- 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, await zn("config.json", t), t;
7127
+ async function ha(e, t, n, r) {
7128
+ 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, await Rn("config.json", t), t;
7014
7129
  }
7015
- async function na() {
7130
+ async function ga() {
7016
7131
  try {
7017
- G("Synchronise Project with GitHub");
7132
+ K("Synchronise Project with GitHub");
7018
7133
  let e = await W("package.json"), t = await W("config.json");
7019
- switch (await ia("1️⃣ ", e), Vn(t.id).typeId) {
7134
+ switch (await va("1️⃣ ", e), Bn(t.id).typeId) {
7020
7135
  case "connector":
7021
- await Qi("2️⃣ ", e);
7136
+ await fa("2️⃣ ", e);
7022
7137
  break;
7023
7138
  case "context":
7024
- await $i("2️⃣ ", e);
7139
+ await pa("2️⃣ ", e);
7025
7140
  break;
7026
7141
  case "presenter":
7027
- await ea("2️⃣ ", e);
7142
+ await ma("2️⃣ ", e);
7028
7143
  break;
7029
- default: await Zi("2️⃣ ", e);
7144
+ default: await da("2️⃣ ", e);
7030
7145
  }
7031
7146
  await Pn("3️⃣ Stage changes", "git", ["add", "."]), await Pn("4️⃣ Commit changes", "git", [
7032
7147
  "commit",
@@ -7036,27 +7151,27 @@ async function na() {
7036
7151
  "push",
7037
7152
  "origin",
7038
7153
  "main:main"
7039
- ]), K(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
7154
+ ]), q(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
7040
7155
  } catch (e) {
7041
7156
  console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
7042
7157
  }
7043
7158
  }
7044
- function ra() {
7159
+ function _a() {
7045
7160
  try {
7046
- G("Test Project"), console.error("\n❌ No tests implemented.\n");
7161
+ K("Test Project"), console.error("\n❌ No tests implemented.\n");
7047
7162
  } catch (e) {
7048
7163
  console.error("❌ Error testing project", e), process.exit(1);
7049
7164
  }
7050
7165
  }
7051
- async function ia(e, t, n = "./") {
7052
- if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
7166
+ async function va(e, t, n = "./") {
7167
+ if (J(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
7053
7168
  else {
7054
7169
  let e = t.version, n = t.version.split(".");
7055
7170
  t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
7056
7171
  }
7057
- await zn(`${n}package.json`, t);
7172
+ await Rn(`${n}package.json`, t);
7058
7173
  }
7059
7174
  //#endregion
7060
- export { Kn as auditDependencies, Ji as buildProject, qn as checkConfigFiles, $n as checkDependencies, Mi as documentActions, ar as documentBundleSizes, Dr as documentDependencies, Ni as formatCode, Pi as lintCode, Yi as publishProject, Xi as releaseProject, na as syncProjectWithGitHub, ra as testProject, Ii as uploadDirectoryToR2 };
7175
+ export { Gn as auditDependencies, ca as buildProject, Kn as checkConfigFiles, Qn as checkDependencies, zi as documentActions, ir as documentBundleSizes, Er as documentDependencies, zr as documentGovernance, Hi as documentUsage, qi as formatCode, Ji as lintCode, la as publishProject, ua as releaseProject, ga as syncProjectWithGitHub, _a as testProject, Xi as uploadDirectoryToR2 };
7061
7176
 
7062
7177
  //# sourceMappingURL=dpuse-development.es.js.map