@dpuse/dpuse-development 0.3.669 → 0.3.671

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_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";
@@ -6207,43 +6207,43 @@ function Lr(e) {
6207
6207
  }
6208
6208
  //#endregion
6209
6209
  //#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-dBVLwQIt.js
6210
- var Rr, zr = {
6210
+ var Lr, Rr = {
6211
6211
  lang: void 0,
6212
6212
  message: void 0,
6213
6213
  abortEarly: void 0,
6214
6214
  abortPipeEarly: void 0
6215
6215
  };
6216
6216
  /* @__NO_SIDE_EFFECTS__ */
6217
- function Br(e) {
6218
- return !e && !Rr ? zr : {
6219
- lang: e?.lang ?? Rr?.lang,
6217
+ function zr(e) {
6218
+ return !e && !Lr ? Rr : {
6219
+ lang: e?.lang ?? Lr?.lang,
6220
6220
  message: e?.message,
6221
- abortEarly: e?.abortEarly ?? Rr?.abortEarly,
6222
- abortPipeEarly: e?.abortPipeEarly ?? Rr?.abortPipeEarly
6221
+ abortEarly: e?.abortEarly ?? Lr?.abortEarly,
6222
+ abortPipeEarly: e?.abortPipeEarly ?? Lr?.abortPipeEarly
6223
6223
  };
6224
6224
  }
6225
- var Vr;
6225
+ var Br;
6226
6226
  /* @__NO_SIDE_EFFECTS__ */
6227
- function Hr(e) {
6228
- return Vr?.get(e);
6227
+ function Vr(e) {
6228
+ return Br?.get(e);
6229
6229
  }
6230
- var Ur;
6230
+ var Hr;
6231
6231
  /* @__NO_SIDE_EFFECTS__ */
6232
- function Wr(e) {
6233
- return Ur?.get(e);
6232
+ function Ur(e) {
6233
+ return Hr?.get(e);
6234
6234
  }
6235
- var Gr;
6235
+ var Wr;
6236
6236
  /* @__NO_SIDE_EFFECTS__ */
6237
- function Kr(e, t) {
6238
- return Gr?.get(e)?.get(t);
6237
+ function Gr(e, t) {
6238
+ return Wr?.get(e)?.get(t);
6239
6239
  }
6240
6240
  /* @__NO_SIDE_EFFECTS__ */
6241
- function qr(e) {
6241
+ function Kr(e) {
6242
6242
  let t = typeof e;
6243
6243
  return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
6244
6244
  }
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 = {
6245
+ function qr(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__ */ Kr(a), c = {
6247
6247
  kind: e.kind,
6248
6248
  type: e.type,
6249
6249
  input: a,
@@ -6256,7 +6256,7 @@ function Y(e, t, n, r, i) {
6256
6256
  lang: r.lang,
6257
6257
  abortEarly: r.abortEarly,
6258
6258
  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);
6259
+ }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ Gr(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Ur(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Vr(c.lang);
6260
6260
  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
6261
  }
6262
6262
  var Jr = /* @__PURE__ */ new WeakMap();
@@ -6267,7 +6267,7 @@ function X(e) {
6267
6267
  version: 1,
6268
6268
  vendor: "valibot",
6269
6269
  validate(t) {
6270
- return e["~run"]({ value: t }, /* @__PURE__ */ Br());
6270
+ return e["~run"]({ value: t }, /* @__PURE__ */ zr());
6271
6271
  }
6272
6272
  }, Jr.set(e, t)), t;
6273
6273
  }
@@ -6323,7 +6323,7 @@ function $r(e, t) {
6323
6323
  }
6324
6324
  a.typed || (e.typed = !1), e.value.push(a.value);
6325
6325
  }
6326
- } else Y(this, "type", e, t);
6326
+ } else qr(this, "type", e, t);
6327
6327
  return e;
6328
6328
  }
6329
6329
  };
@@ -6341,7 +6341,7 @@ function ei(e) {
6341
6341
  return /* @__PURE__ */ X(this);
6342
6342
  },
6343
6343
  "~run"(e, t) {
6344
- return typeof e.value == "boolean" ? e.typed = !0 : Y(this, "type", e, t), e;
6344
+ return typeof e.value == "boolean" ? e.typed = !0 : qr(this, "type", e, t), e;
6345
6345
  }
6346
6346
  };
6347
6347
  }
@@ -6351,7 +6351,7 @@ function ti(e, t) {
6351
6351
  kind: "schema",
6352
6352
  type: "literal",
6353
6353
  reference: ti,
6354
- expects: /* @__PURE__ */ qr(e),
6354
+ expects: /* @__PURE__ */ Kr(e),
6355
6355
  async: !1,
6356
6356
  literal: e,
6357
6357
  message: t,
@@ -6359,7 +6359,7 @@ function ti(e, t) {
6359
6359
  return /* @__PURE__ */ X(this);
6360
6360
  },
6361
6361
  "~run"(e, t) {
6362
- return e.value === this.literal ? e.typed = !0 : Y(this, "type", e, t), e;
6362
+ return e.value === this.literal ? e.typed = !0 : qr(this, "type", e, t), e;
6363
6363
  }
6364
6364
  };
6365
6365
  }
@@ -6394,7 +6394,7 @@ function ni(e) {
6394
6394
  return /* @__PURE__ */ X(this);
6395
6395
  },
6396
6396
  "~run"(e, t) {
6397
- return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : Y(this, "type", e, t), e;
6397
+ return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : qr(this, "type", e, t), e;
6398
6398
  }
6399
6399
  };
6400
6400
  }
@@ -6435,7 +6435,7 @@ function Q(e, t) {
6435
6435
  }
6436
6436
  o.typed || (e.typed = !1), e.value[r] = o.value;
6437
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, {
6438
+ else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (qr(this, "key", e, t, {
6439
6439
  input: void 0,
6440
6440
  expected: `"${r}"`,
6441
6441
  path: [{
@@ -6447,7 +6447,7 @@ function Q(e, t) {
6447
6447
  }]
6448
6448
  }), t.abortEarly)) break;
6449
6449
  }
6450
- } else Y(this, "type", e, t);
6450
+ } else qr(this, "type", e, t);
6451
6451
  return e;
6452
6452
  }
6453
6453
  };
@@ -6521,7 +6521,7 @@ function ii(e, t, n) {
6521
6521
  }
6522
6522
  (!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
6523
6523
  }
6524
- } else Y(this, "type", e, t);
6524
+ } else qr(this, "type", e, t);
6525
6525
  return e;
6526
6526
  }
6527
6527
  };
@@ -6539,7 +6539,7 @@ function $(e) {
6539
6539
  return /* @__PURE__ */ X(this);
6540
6540
  },
6541
6541
  "~run"(e, t) {
6542
- return typeof e.value == "string" ? e.typed = !0 : Y(this, "type", e, t), e;
6542
+ return typeof e.value == "string" ? e.typed = !0 : qr(this, "type", e, t), e;
6543
6543
  }
6544
6544
  };
6545
6545
  }
@@ -6577,9 +6577,9 @@ function oi(e, t) {
6577
6577
  if (n) return n;
6578
6578
  if (r) {
6579
6579
  if (r.length === 1) return r[0];
6580
- Y(this, "type", e, t, { issues: /* @__PURE__ */ ai(r) }), e.typed = !0;
6580
+ qr(this, "type", e, t, { issues: /* @__PURE__ */ ai(r) }), e.typed = !0;
6581
6581
  } else if (i?.length === 1) return i[0];
6582
- else Y(this, "type", e, t, { issues: /* @__PURE__ */ ai(i) });
6582
+ else qr(this, "type", e, t, { issues: /* @__PURE__ */ ai(i) });
6583
6583
  return e;
6584
6584
  }
6585
6585
  };
@@ -6770,40 +6770,79 @@ var Di = "<!-- CONNECTOR_ACTIONS_START -->", Oi = "<!-- CONNECTOR_ACTIONS_END --
6770
6770
  }, ji = "The table below lists all connector actions and highlights those supported by this connector.";
6771
6771
  async function Mi() {
6772
6772
  try {
6773
- G("Document Actions"), q("1️⃣ Insert actions description and table into 'README.md'");
6773
+ K("Document Actions"), J("1️⃣ Insert actions description and table into 'README.md'");
6774
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");
6775
+ await zn("README.md", Wn(await G("./README.md"), r, Di, Oi)), q("Actions documented");
6776
6776
  } catch (e) {
6777
6777
  console.error("❌ Error documenting actions", e), process.exit(1);
6778
6778
  }
6779
6779
  }
6780
6780
  //#endregion
6781
+ //#region src/actions/documentUsage.ts
6782
+ var Ni = "<!-- USAGE_START -->", Pi = "<!-- USAGE_END -->";
6783
+ async function Fi() {
6784
+ try {
6785
+ K("Document Usage"), J("1️⃣ Insert usage content into 'README.md'");
6786
+ let e = await W("package.json"), t = Ii(e), n = zi(t, Li(t), Ri(e.engines?.node), Ri(e.engines?.npm));
6787
+ await zn("README.md", Wn(await G("./README.md"), n, Ni, Pi)), q("Usage documented");
6788
+ } catch (e) {
6789
+ console.error("❌ Error documenting usage", e), process.exit(1);
6790
+ }
6791
+ }
6792
+ function Ii(e) {
6793
+ let t = e.repository, n = typeof t == "string" ? t : t?.url;
6794
+ if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
6795
+ return n.replace(/^git\+/, "");
6796
+ }
6797
+ function Li(e) {
6798
+ return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
6799
+ }
6800
+ function Ri(e) {
6801
+ if (e == null) throw Error("package.json 'engines' field is required to document usage.");
6802
+ let t = /\d+(?:\.\d+)*/.exec(e);
6803
+ if (t == null) throw Error(`Unable to parse engine version from '${e}'.`);
6804
+ return t[0];
6805
+ }
6806
+ function zi(e, t, n, r) {
6807
+ 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.
6808
+
6809
+ 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.
6810
+
6811
+ \`\`\`bash
6812
+ git clone ${e}
6813
+ cd ${t}
6814
+ npm install
6815
+ \`\`\`
6816
+
6817
+ _Requires [Node.js](https://nodejs.org/) ${n} or later and [npm](https://www.npmjs.com/) ${r} or later._`;
6818
+ }
6819
+ //#endregion
6781
6820
  //#region src/actions/formatCode.ts
6782
- async function Ni() {
6821
+ async function Bi() {
6783
6822
  try {
6784
- G("Format Code"), await Fn("1️⃣ Format", "prettier", [
6823
+ K("Format Code"), await Fn("1️⃣ Format", "prettier", [
6785
6824
  "--write",
6786
6825
  "*.json",
6787
6826
  "*.md",
6788
6827
  "*.ts",
6789
6828
  ...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
6790
- ]), K("Code formatted");
6829
+ ]), q("Code formatted");
6791
6830
  } catch (e) {
6792
6831
  console.error("❌ Error formatting code", e), process.exit(1);
6793
6832
  }
6794
6833
  }
6795
6834
  //#endregion
6796
6835
  //#region src/actions/lintCode.ts
6797
- async function Pi() {
6836
+ async function Vi() {
6798
6837
  try {
6799
- G("Lint Code"), await Fn("1️⃣ Lint", "eslint", ["."]), K("Code linted");
6838
+ K("Lint Code"), await Fn("1️⃣ Lint", "eslint", ["."]), q("Code linted");
6800
6839
  } catch (e) {
6801
6840
  console.error("❌ Error linting code", e), process.exit(1);
6802
6841
  }
6803
6842
  }
6804
6843
  //#endregion
6805
6844
  //#region src/utilities/cloudflare.ts
6806
- async function Fi() {
6845
+ async function Hi() {
6807
6846
  let e = await W("config.json"), t = {
6808
6847
  body: JSON.stringify(e),
6809
6848
  headers: { "Content-Type": "application/json" },
@@ -6811,11 +6850,11 @@ async function Fi() {
6811
6850
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
6812
6851
  if (!n.ok) throw Error(await n.text());
6813
6852
  }
6814
- async function Ii(e, t) {
6853
+ async function Ui(e, t) {
6815
6854
  async function n(e, t, r) {
6816
6855
  for (let i of r) {
6817
6856
  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", [
6857
+ (await Vn(r)).isDirectory() ? await n(r, a, await Nn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Pn(void 0, "wrangler", [
6819
6858
  "r2",
6820
6859
  "object",
6821
6860
  "put",
@@ -6829,7 +6868,7 @@ async function Ii(e, t) {
6829
6868
  let r = await Nn(`${e}/${t}/`);
6830
6869
  await n(`${e}/${t}`, t, r);
6831
6870
  }
6832
- async function Li(e) {
6871
+ async function Wi(e) {
6833
6872
  let t = e.id, n = {
6834
6873
  body: JSON.stringify(e),
6835
6874
  headers: { "Content-Type": "application/json" },
@@ -6837,7 +6876,7 @@ async function Li(e) {
6837
6876
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
6838
6877
  if (!r.ok) throw Error(await r.text());
6839
6878
  }
6840
- async function Ri(e, t) {
6879
+ async function Gi(e, t) {
6841
6880
  let n = `v${e.version ?? "unknown"}`;
6842
6881
  async function r(e, r = "") {
6843
6882
  let i = await Nn(e, { withFileTypes: !0 });
@@ -6861,24 +6900,24 @@ async function Ri(e, t) {
6861
6900
  }
6862
6901
  //#endregion
6863
6902
  //#region node_modules/valibot/dist/index.mjs
6864
- var zi, Bi = {
6903
+ var Ki, qi = {
6865
6904
  lang: void 0,
6866
6905
  message: void 0,
6867
6906
  abortEarly: void 0,
6868
6907
  abortPipeEarly: void 0
6869
6908
  };
6870
6909
  /* @__NO_SIDE_EFFECTS__ */
6871
- function Vi(e) {
6872
- return !e && !zi ? Bi : {
6873
- lang: e?.lang ?? zi?.lang,
6910
+ function Ji(e) {
6911
+ return !e && !Ki ? qi : {
6912
+ lang: e?.lang ?? Ki?.lang,
6874
6913
  message: e?.message,
6875
- abortEarly: e?.abortEarly ?? zi?.abortEarly,
6876
- abortPipeEarly: e?.abortPipeEarly ?? zi?.abortPipeEarly
6914
+ abortEarly: e?.abortEarly ?? Ki?.abortEarly,
6915
+ abortPipeEarly: e?.abortPipeEarly ?? Ki?.abortPipeEarly
6877
6916
  };
6878
6917
  }
6879
6918
  /* @__NO_SIDE_EFFECTS__ */
6880
- function Hi(e, t, n) {
6881
- let r = e["~run"]({ value: t }, /* @__PURE__ */ Vi(n));
6919
+ function Yi(e, t, n) {
6920
+ let r = e["~run"]({ value: t }, /* @__PURE__ */ Ji(n));
6882
6921
  return {
6883
6922
  typed: r.typed,
6884
6923
  success: !r.issues,
@@ -6888,69 +6927,69 @@ function Hi(e, t, n) {
6888
6927
  }
6889
6928
  //#endregion
6890
6929
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleContext.es.js
6891
- var Ui = /* @__PURE__ */ Q({
6930
+ var Xi = /* @__PURE__ */ Q({
6892
6931
  typeId: /* @__PURE__ */ ti("contextArea"),
6893
6932
  ...hi,
6894
6933
  modelRefs: /* @__PURE__ */ $r(mi),
6895
6934
  order: /* @__PURE__ */ ni()
6896
- }), Wi = si(["listContextFocuses"]), Gi = /* @__PURE__ */ Q({
6935
+ }), Zi = si(["listContextFocuses"]), Qi = /* @__PURE__ */ Q({
6897
6936
  typeId: /* @__PURE__ */ ti("context"),
6898
6937
  ...gi,
6899
- actionNames: /* @__PURE__ */ $r(Wi),
6900
- models: /* @__PURE__ */ $r(Ui)
6901
- }), Ki = si([
6938
+ actionNames: /* @__PURE__ */ $r(Zi),
6939
+ models: /* @__PURE__ */ $r(Xi)
6940
+ }), $i = si([
6902
6941
  "list",
6903
6942
  "render",
6904
6943
  "setColorMode"
6905
- ]), qi = /* @__PURE__ */ Q({
6944
+ ]), ea = /* @__PURE__ */ Q({
6906
6945
  typeId: /* @__PURE__ */ ti("presenter"),
6907
6946
  ...gi,
6908
- actionNames: /* @__PURE__ */ $r(Ki),
6947
+ actionNames: /* @__PURE__ */ $r($i),
6909
6948
  presentations: /* @__PURE__ */ $r(mi)
6910
6949
  });
6911
6950
  //#endregion
6912
6951
  //#region src/actions/manageProject.ts
6913
- async function Ji() {
6952
+ async function ta() {
6914
6953
  try {
6915
- G("Build Project"), await Fn("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
6954
+ K("Build Project"), await Fn("1️⃣ Bundle project", "vite", ["build"]), q("Project built");
6916
6955
  } catch (e) {
6917
6956
  console.error("❌ Error building project", e), process.exit(1);
6918
6957
  }
6919
6958
  }
6920
- async function Yi() {
6959
+ async function na() {
6921
6960
  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");
6961
+ K("Publish Project");
6962
+ let e = await W("package.json"), t = await W("config.json"), n = Bn(t.id);
6963
+ if (n.typeId === "app") J("1️⃣ Register module"), await Hi();
6964
+ else if (n.typeId === "engine") J("1️⃣ Register module"), await Gi(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Wi(t);
6965
+ else if (n.uploadGroupName === void 0) J("1️⃣ Publishing NOT required");
6927
6966
  else {
6928
- q("1️⃣ Register module");
6967
+ J("1️⃣ Register module");
6929
6968
  let r = t.id.split("-").slice(2).join("-");
6930
- await Ri(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Li(t);
6969
+ await Gi(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Wi(t);
6931
6970
  }
6932
- K(`Project version '${e.version ?? "unknown"}' published.`);
6971
+ q(`Project version '${e.version ?? "unknown"}' published.`);
6933
6972
  } catch (e) {
6934
6973
  console.error("❌ Error publishing project", e), process.exit(1);
6935
6974
  }
6936
6975
  }
6937
- async function Xi() {
6976
+ async function ra() {
6938
6977
  try {
6939
- G("Release Project");
6978
+ K("Release Project");
6940
6979
  let e = await W("package.json"), t = await W("config.json");
6941
- await ia("1️⃣ ", e);
6942
- let n = Vn(t.id);
6980
+ await da("1️⃣ ", e);
6981
+ let n = Bn(t.id);
6943
6982
  switch (n.typeId) {
6944
6983
  case "connector":
6945
- t = await Qi("2️⃣ ", e);
6984
+ t = await aa("2️⃣ ", e);
6946
6985
  break;
6947
6986
  case "context":
6948
- t = await $i("2️⃣ ", e);
6987
+ t = await oa("2️⃣ ", e);
6949
6988
  break;
6950
6989
  case "presenter":
6951
- t = await ea("2️⃣ ", e);
6990
+ t = await sa("2️⃣ ", e);
6952
6991
  break;
6953
- default: t = await Zi("2️⃣ ", e);
6992
+ default: t = await ia("2️⃣ ", e);
6954
6993
  }
6955
6994
  if (await Fn("3️⃣ Bundle project", "vite", ["build"]), await Pn("4️⃣ Stage changes", "git", ["add", "."]), await Pn("5️⃣ Commit changes", "git", [
6956
6995
  "commit",
@@ -6960,73 +6999,73 @@ async function Xi() {
6960
6999
  "push",
6961
7000
  "origin",
6962
7001
  "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");
7002
+ ]), n.typeId === "app") J("7️⃣ Register module"), await Hi();
7003
+ else if (n.typeId === "engine") J("7️⃣ Register module"), await Gi(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Wi(t);
7004
+ else if (n.uploadGroupName === void 0) J("7️⃣ Registration NOT required");
6966
7005
  else {
6967
- q("7️⃣ Register module");
7006
+ J("7️⃣ Register module");
6968
7007
  let r = t.id.split("-").slice(2).join("-");
6969
- await Ri(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Li(t);
7008
+ await Gi(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Wi(t);
6970
7009
  }
6971
7010
  if (n.publishedTo === "npm") {
6972
7011
  let e = ".npmrc";
6973
7012
  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", [
7013
+ 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
7014
  "publish",
6976
7015
  "--access",
6977
7016
  "public"
6978
7017
  ]);
6979
7018
  } finally {
6980
- await Rn(e);
7019
+ await Ln(e);
6981
7020
  }
6982
- } else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
6983
- K(`Project version '${e.version ?? "unknown"}' released.`);
7021
+ } else J(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
7022
+ q(`Project version '${e.version ?? "unknown"}' released.`);
6984
7023
  } catch (e) {
6985
7024
  console.error("❌ Error releasing project", e), process.exit(1);
6986
7025
  }
6987
7026
  }
6988
- async function Zi(e, t) {
6989
- q(`${e} Build project configuration`);
7027
+ async function ia(e, t) {
7028
+ J(`${e} Build project configuration`);
6990
7029
  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;
7030
+ return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await Rn("config.json", n), n;
6992
7031
  }
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);
7032
+ async function aa(e, t) {
7033
+ J(`${e} Build connector project configuration`);
7034
+ let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ Yi(xi, n);
6996
7035
  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));
7036
+ let a = Hn(r);
7037
+ return await ca(t, n, a, Ti(a));
6999
7038
  }
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);
7039
+ async function oa(e, t) {
7040
+ J(`${e} Build context project configuration`);
7041
+ let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ Yi(Qi, n);
7003
7042
  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));
7043
+ return await ca(t, n, Hn(r));
7005
7044
  }
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);
7045
+ async function sa(e, t) {
7046
+ J(`${e} Build presenter project configuration`);
7047
+ let [n, r] = await Promise.all([W("config.json"), G("src/index.ts")]), i = /* @__PURE__ */ Yi(ea, n);
7009
7048
  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));
7049
+ return await ca(t, n, Hn(r));
7011
7050
  }
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;
7051
+ async function ca(e, t, n, r) {
7052
+ 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
7053
  }
7015
- async function na() {
7054
+ async function la() {
7016
7055
  try {
7017
- G("Synchronise Project with GitHub");
7056
+ K("Synchronise Project with GitHub");
7018
7057
  let e = await W("package.json"), t = await W("config.json");
7019
- switch (await ia("1️⃣ ", e), Vn(t.id).typeId) {
7058
+ switch (await da("1️⃣ ", e), Bn(t.id).typeId) {
7020
7059
  case "connector":
7021
- await Qi("2️⃣ ", e);
7060
+ await aa("2️⃣ ", e);
7022
7061
  break;
7023
7062
  case "context":
7024
- await $i("2️⃣ ", e);
7063
+ await oa("2️⃣ ", e);
7025
7064
  break;
7026
7065
  case "presenter":
7027
- await ea("2️⃣ ", e);
7066
+ await sa("2️⃣ ", e);
7028
7067
  break;
7029
- default: await Zi("2️⃣ ", e);
7068
+ default: await ia("2️⃣ ", e);
7030
7069
  }
7031
7070
  await Pn("3️⃣ Stage changes", "git", ["add", "."]), await Pn("4️⃣ Commit changes", "git", [
7032
7071
  "commit",
@@ -7036,27 +7075,27 @@ async function na() {
7036
7075
  "push",
7037
7076
  "origin",
7038
7077
  "main:main"
7039
- ]), K(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
7078
+ ]), q(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
7040
7079
  } catch (e) {
7041
7080
  console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
7042
7081
  }
7043
7082
  }
7044
- function ra() {
7083
+ function ua() {
7045
7084
  try {
7046
- G("Test Project"), console.error("\n❌ No tests implemented.\n");
7085
+ K("Test Project"), console.error("\n❌ No tests implemented.\n");
7047
7086
  } catch (e) {
7048
7087
  console.error("❌ Error testing project", e), process.exit(1);
7049
7088
  }
7050
7089
  }
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}'.`);
7090
+ async function da(e, t, n = "./") {
7091
+ if (J(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
7053
7092
  else {
7054
7093
  let e = t.version, n = t.version.split(".");
7055
7094
  t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
7056
7095
  }
7057
- await zn(`${n}package.json`, t);
7096
+ await Rn(`${n}package.json`, t);
7058
7097
  }
7059
7098
  //#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 };
7099
+ export { Gn as auditDependencies, ta as buildProject, Kn as checkConfigFiles, Qn as checkDependencies, Mi as documentActions, ir as documentBundleSizes, Er as documentDependencies, Fi as documentUsage, Bi as formatCode, Vi as lintCode, na as publishProject, ra as releaseProject, la as syncProjectWithGitHub, ua as testProject, Ui as uploadDirectoryToR2 };
7061
7100
 
7062
7101
  //# sourceMappingURL=dpuse-development.es.js.map