@dpuse/dpuse-development 0.3.639 → 0.3.641

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.
@@ -5795,10 +5795,17 @@ async function W(e) {
5795
5795
  async function Ln(e) {
5796
5796
  return await t.readFile(e, "utf8");
5797
5797
  }
5798
- async function Rn(e, n) {
5799
- await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
5798
+ async function Rn(e) {
5799
+ try {
5800
+ await t.unlink(e);
5801
+ } catch (e) {
5802
+ if (e.code !== "ENOENT") throw e;
5803
+ }
5800
5804
  }
5801
5805
  async function zn(e, n) {
5806
+ await t.writeFile(e, JSON.stringify(n, void 0, 4), "utf8");
5807
+ }
5808
+ async function Bn(e, n) {
5802
5809
  await t.writeFile(e, n, "utf8");
5803
5810
  }
5804
5811
  function G(e) {
@@ -5811,21 +5818,21 @@ function K(e) {
5811
5818
  function q(e) {
5812
5819
  console.info(`\n${e}\n`);
5813
5820
  }
5814
- function Bn(e) {
5821
+ function Vn(e) {
5815
5822
  let t = An.find((t) => e.startsWith(t.idPrefix));
5816
5823
  if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
5817
5824
  return t;
5818
5825
  }
5819
- async function Vn(e) {
5826
+ async function Hn(e) {
5820
5827
  return await t.stat(e);
5821
5828
  }
5822
- function Hn(e) {
5829
+ function Un(e) {
5823
5830
  let t = k.extend(kn()).parse(e, {
5824
5831
  ecmaVersion: "latest",
5825
5832
  sourceType: "module",
5826
5833
  locations: !0
5827
5834
  }), n = [];
5828
- return Un(t, (e) => {
5835
+ return Wn(t, (e) => {
5829
5836
  if (e.type !== "MethodDefinition") return;
5830
5837
  let t = e, r = t.key;
5831
5838
  if (r.type !== "Identifier") return;
@@ -5833,7 +5840,7 @@ function Hn(e) {
5833
5840
  i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
5834
5841
  }), n;
5835
5842
  }
5836
- function Un(e, t) {
5843
+ function Wn(e, t) {
5837
5844
  t(e);
5838
5845
  for (let [n, r] of Object.entries(e)) {
5839
5846
  if ([
@@ -5846,19 +5853,19 @@ function Un(e, t) {
5846
5853
  let e = r;
5847
5854
  if (Array.isArray(e)) for (let n of e) {
5848
5855
  let e = n;
5849
- e && typeof e.type == "string" && Un(e, t);
5856
+ e && typeof e.type == "string" && Wn(e, t);
5850
5857
  }
5851
- else e && typeof e == "object" && typeof e.type == "string" && Un(e, t);
5858
+ else e && typeof e == "object" && typeof e.type == "string" && Wn(e, t);
5852
5859
  }
5853
5860
  }
5854
- function Wn(e, t, n, r) {
5861
+ function Gn(e, t, n, r) {
5855
5862
  let i = e.indexOf(n), a = e.indexOf(r);
5856
5863
  if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
5857
5864
  return `${e.slice(0, Math.max(0, i + n.length))}\n${t}\n${e.slice(Math.max(0, a))}`;
5858
5865
  }
5859
5866
  //#endregion
5860
5867
  //#region src/actions/auditDependencies.ts
5861
- async function Gn() {
5868
+ async function Kn() {
5862
5869
  try {
5863
5870
  G("Audit Dependencies"), await Fn("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited");
5864
5871
  } catch (e) {
@@ -5867,10 +5874,10 @@ async function Gn() {
5867
5874
  }
5868
5875
  //#endregion
5869
5876
  //#region src/actions/checkConfigFiles.ts
5870
- async function Kn() {
5877
+ async function qn() {
5871
5878
  try {
5872
5879
  G("Check configuration files"), q("1️⃣ Check individual files");
5873
- let e = Bn((await W("config.json")).id), t = n.dirname(o(import.meta.url));
5880
+ let e = Vn((await W("config.json")).id), t = n.dirname(o(import.meta.url));
5874
5881
  if (await J(t, ".editorconfig"), await J(t, ".gitattributes"), await J(t, ".gitignore", [e.publishedTo === "npm" ? ".gitignore_published" : ".gitignore_unpublished"]), await J(t, ".markdownlint.json"), await J(t, ".ncurc.json"), ["eslint"].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is NOT required by this project") : await J(t, "eslint.config.js", ["eslint.config.default.js"]), await J(t, "LICENSE"), await J(t, "tsconfig.scripts.json"), ["eslint", "kb"].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is NOT required by this project");
5875
5882
  else if ([
5876
5883
  "app",
@@ -5905,7 +5912,7 @@ async function J(e, t, r = []) {
5905
5912
  }
5906
5913
  //#endregion
5907
5914
  //#region src/actions/checkDependencies.ts
5908
- async function qn() {
5915
+ async function Jn() {
5909
5916
  try {
5910
5917
  G("Check Dependencies"), await Fn("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), q("2️⃣ Check using 'npm-check-updates'"), await s({
5911
5918
  interactive: !0,
@@ -5919,78 +5926,78 @@ async function qn() {
5919
5926
  }
5920
5927
  //#endregion
5921
5928
  //#region src/actions/documentBundleSizes.ts
5922
- var Jn = "<!-- BUNDLE_START -->", Yn = "<!-- BUNDLE_END -->", Xn = "&nbsp;&nbsp;&nbsp;&nbsp;", Zn = 20;
5923
- async function Qn(e) {
5929
+ var Yn = "<!-- BUNDLE_START -->", Xn = "<!-- BUNDLE_END -->", Zn = "&nbsp;&nbsp;&nbsp;&nbsp;", Qn = 20;
5930
+ async function $n(e) {
5924
5931
  try {
5925
5932
  G("Document Bundle Sizes"), q("1️⃣ Read bundle analysis report");
5926
5933
  let t = await W("./bundle-analysis-reports/sonda/index.json");
5927
5934
  q("2️⃣ Insert table into 'README.md'");
5928
- let n = $n(t, e?.moduleLevel ?? !1);
5929
- await zn("README.md", Wn(await Ln("./README.md"), `\n${n}\n`, Jn, Yn)), K("Bundle sizes documented");
5935
+ let n = er(t, e?.moduleLevel ?? !1);
5936
+ await Bn("README.md", Gn(await Ln("./README.md"), `\n${n}\n`, Yn, Xn)), K("Bundle sizes documented");
5930
5937
  } catch (e) {
5931
5938
  console.error("❌ Error documenting bundle sizes", e), process.exit(1);
5932
5939
  }
5933
5940
  }
5934
- function $n(e, t) {
5935
- let n = ar(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, lr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
5941
+ function er(e, t) {
5942
+ let n = or(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, ur(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
5936
5943
  for (let [e, o] of i) {
5937
- let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? er(e, o, rr(i), r, t) : tr(e, o, i, r, t);
5944
+ let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? tr(e, o, ir(i), r, t) : nr(e, o, i, r, t);
5938
5945
  a.push(...s);
5939
5946
  }
5940
5947
  return a.join("\n");
5941
5948
  }
5942
- function er(e, t, n, r, i) {
5949
+ function tr(e, t, n, r, i) {
5943
5950
  let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
5944
- if (s.size === 1) return [`| ${e} → ${a} → ${ir(s)} | ${ur(t)} · ${dr(c)} |`];
5945
- let l = [`| ${e} → ${a} | ${ur(t)} · ${dr(c)} |`];
5946
- return i || l.push(...nr(s, Xn, r)), l;
5951
+ if (s.size === 1) return [`| ${e} → ${a} → ${ar(s)} | ${dr(t)} · ${fr(c)} |`];
5952
+ let l = [`| ${e} → ${a} | ${dr(t)} · ${fr(c)} |`];
5953
+ return i || l.push(...rr(s, Zn, r)), l;
5947
5954
  }
5948
- function tr(e, t, n, r, i) {
5949
- let a = [`| ${e} | ${ur(t)} |`];
5955
+ function nr(e, t, n, r, i) {
5956
+ let a = [`| ${e} | ${dr(t)} |`];
5950
5957
  for (let [e, { sizes: t, files: o }] of n) {
5951
5958
  let n = r > 0 ? t.uncompressed / r * 100 : 0;
5952
5959
  if (o.size === 1) {
5953
- let t = ir(o);
5954
- a.push(`| ${Xn}${e} → ${t} | ${dr(n)} |`);
5960
+ let t = ar(o);
5961
+ a.push(`| ${Zn}${e} → ${t} | ${fr(n)} |`);
5955
5962
  continue;
5956
5963
  }
5957
- a.push(`| ${Xn}${e} | ${dr(n)} |`), i || a.push(...nr(o, `${Xn}${Xn}`, r));
5964
+ a.push(`| ${Zn}${e} | ${fr(n)} |`), i || a.push(...rr(o, `${Zn}${Zn}`, r));
5958
5965
  }
5959
5966
  return a;
5960
5967
  }
5961
- function nr(e, t, n) {
5962
- return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${dr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
5968
+ function rr(e, t, n) {
5969
+ return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${fr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
5963
5970
  }
5964
- function rr(e) {
5971
+ function ir(e) {
5965
5972
  let [t] = e;
5966
5973
  if (t === void 0) throw Error("Expected exactly one entry");
5967
5974
  return t;
5968
5975
  }
5969
- function ir(e) {
5976
+ function ar(e) {
5970
5977
  let [t] = e.keys();
5971
5978
  if (t === void 0) throw Error("Expected exactly one file");
5972
5979
  return t;
5973
5980
  }
5974
- function ar(e) {
5975
- let t = or(e.dependencies), n = /* @__PURE__ */ new Map();
5981
+ function or(e) {
5982
+ let t = sr(e.dependencies), n = /* @__PURE__ */ new Map();
5976
5983
  for (let r of e.resources) {
5977
5984
  if (r.kind !== "chunk" || !r.parent) continue;
5978
- let { group: e, file: i } = sr(r.name, t), a = lr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
5985
+ let { group: e, file: i } = cr(r.name, t), a = ur(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
5979
5986
  n.set(r.parent, o);
5980
5987
  let s = o.get(e) ?? {
5981
- sizes: fr(),
5988
+ sizes: pr(),
5982
5989
  files: /* @__PURE__ */ new Map()
5983
5990
  };
5984
- o.set(e, s), pr(s.sizes, a);
5985
- let c = s.files.get(i) ?? fr();
5986
- s.files.set(i, c), pr(c, a);
5991
+ o.set(e, s), mr(s.sizes, a);
5992
+ let c = s.files.get(i) ?? pr();
5993
+ s.files.set(i, c), mr(c, a);
5987
5994
  }
5988
5995
  return n;
5989
5996
  }
5990
- function or(e) {
5997
+ function sr(e) {
5991
5998
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
5992
5999
  }
5993
- function sr(e, t) {
6000
+ function cr(e, t) {
5994
6001
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
5995
6002
  if (n) {
5996
6003
  let [t, r] = n;
@@ -6007,49 +6014,49 @@ function sr(e, t) {
6007
6014
  file: e.slice(1)
6008
6015
  } : e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? {
6009
6016
  group: "wasm",
6010
- file: cr(e)
6017
+ file: lr(e)
6011
6018
  } : {
6012
6019
  group: "src",
6013
- file: cr(e)
6020
+ file: lr(e)
6014
6021
  };
6015
6022
  }
6016
- function cr(e) {
6023
+ function lr(e) {
6017
6024
  return e.split("/").at(-1) ?? e;
6018
6025
  }
6019
- function lr(e) {
6026
+ function ur(e) {
6020
6027
  return {
6021
6028
  uncompressed: e.uncompressed,
6022
6029
  brotli: e.brotli ?? 0
6023
6030
  };
6024
6031
  }
6025
- function ur(e) {
6026
- return `${mr(e.uncompressed)} · brotli ${mr(e.brotli)}`;
6027
- }
6028
6032
  function dr(e) {
6029
- let t = Math.round(e / 100 * Zn);
6030
- return `\`${"█".repeat(t)}${"░".repeat(Zn - t)}\` ${e.toFixed(1)}%`;
6033
+ return `${hr(e.uncompressed)} · brotli ${hr(e.brotli)}`;
6034
+ }
6035
+ function fr(e) {
6036
+ let t = Math.round(e / 100 * Qn);
6037
+ return `\`${"█".repeat(t)}${"░".repeat(Qn - t)}\` ${e.toFixed(1)}%`;
6031
6038
  }
6032
- function fr() {
6039
+ function pr() {
6033
6040
  return {
6034
6041
  uncompressed: 0,
6035
6042
  brotli: 0
6036
6043
  };
6037
6044
  }
6038
- function pr(e, t) {
6045
+ function mr(e, t) {
6039
6046
  e.uncompressed += t.uncompressed, e.brotli += t.brotli;
6040
6047
  }
6041
- function mr(e) {
6048
+ function hr(e) {
6042
6049
  return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
6043
6050
  }
6044
6051
  //#endregion
6045
6052
  //#region src/actions/documentDependencies.ts
6046
- var hr = "<!-- DEPENDENCY_LICENSES_START -->", gr = "<!-- DEPENDENCY_LICENSES_END -->", _r = "<!-- DEPENDENCY_TREE_START -->", vr = "<!-- DEPENDENCY_TREE_END -->";
6047
- async function yr(e = "MIT") {
6053
+ var gr = "<!-- DEPENDENCY_LICENSES_START -->", _r = "<!-- DEPENDENCY_LICENSES_END -->", vr = "<!-- DEPENDENCY_TREE_START -->", yr = "<!-- DEPENDENCY_TREE_END -->";
6054
+ async function br(e = "MIT") {
6048
6055
  try {
6049
6056
  G("Document Dependencies");
6050
6057
  let t = await W("package.json");
6051
6058
  if (t.name === "@dpuse/dpuse-development") {
6052
- await br(), K("Dependencies documented");
6059
+ await xr(), K("Dependencies documented");
6053
6060
  return;
6054
6061
  }
6055
6062
  await Mn("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
@@ -6071,30 +6078,30 @@ async function yr(e = "MIT") {
6071
6078
  "--all",
6072
6079
  "--json",
6073
6080
  "--omit=dev"
6074
- ], "licenses/licenseTree.json"), await xr("4️⃣ "), K("Dependencies documented");
6081
+ ], "licenses/licenseTree.json"), await Sr("4️⃣ "), K("Dependencies documented");
6075
6082
  } catch (e) {
6076
6083
  console.error("❌ Error documenting dependencies", e), process.exit(1);
6077
6084
  }
6078
6085
  }
6079
- async function br() {
6086
+ async function xr() {
6080
6087
  q("1️⃣ Skip: @dpuse/dpuse-development is a development-only tool and is never part of a production release");
6081
6088
  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";
6082
- await zn("README.md", Wn(Wn(await Ln("./README.md"), e, hr, gr), e, _r, vr));
6089
+ await Bn("README.md", Gn(Gn(await Ln("./README.md"), e, gr, _r), e, vr, yr));
6083
6090
  }
6084
- async function xr(e) {
6091
+ async function Sr(e) {
6085
6092
  q(`${e} Insert licenses into 'README.md'`);
6086
6093
  let [t, n] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), r = /* @__PURE__ */ new Map();
6087
- for (let [e, n] of Object.entries(t)) r.set(e, Sr(e, n));
6094
+ for (let [e, n] of Object.entries(t)) r.set(e, Cr(e, n));
6088
6095
  await Promise.all(r.values().map(async (e) => {
6089
- let t = await Cr(e.name, e.installedVersion);
6096
+ let t = await wr(e.name, e.installedVersion);
6090
6097
  e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
6091
6098
  }));
6092
6099
  let i = "|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n";
6093
- for (let e of r.values()) i += wr(e);
6100
+ for (let e of r.values()) i += Tr(e);
6094
6101
  let a = [];
6095
- n.dependencies != null && Tr(n.dependencies, r, a, 0), await zn("README.md", Wn(Wn(await Ln("./README.md"), i, hr, gr), a.join("\n"), _r, vr));
6102
+ n.dependencies != null && Er(n.dependencies, r, a, 0), await Bn("README.md", Gn(Gn(await Ln("./README.md"), i, gr, _r), a.join("\n"), vr, yr));
6096
6103
  }
6097
- function Sr(e, t) {
6104
+ function Cr(e, t) {
6098
6105
  let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
6099
6106
  return {
6100
6107
  name: r,
@@ -6108,7 +6115,7 @@ function Sr(e, t) {
6108
6115
  ...t.licenseFile != null && { licenseFileLink: t.licenseFile }
6109
6116
  };
6110
6117
  }
6111
- async function Cr(e, t) {
6118
+ async function wr(e, t) {
6112
6119
  try {
6113
6120
  let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
6114
6121
  if (n.ok) {
@@ -6126,25 +6133,25 @@ async function Cr(e, t) {
6126
6133
  publishedDate: ""
6127
6134
  };
6128
6135
  }
6129
- function wr(e) {
6136
+ function Tr(e) {
6130
6137
  let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
6131
6138
  return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
6132
6139
  }
6133
- function Tr(e, t, n, r) {
6140
+ function Er(e, t, n, r) {
6134
6141
  let i = " ".repeat(r);
6135
6142
  for (let [a, o] of Object.entries(e)) {
6136
- let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Er(s);
6137
- n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Tr(o.dependencies, t, n, r + 1);
6143
+ let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Dr(s);
6144
+ n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Er(o.dependencies, t, n, r + 1);
6138
6145
  }
6139
6146
  }
6140
- function Er(e) {
6147
+ function Dr(e) {
6141
6148
  if (e == null) return "";
6142
- let t = e.publishedDate ? Dr(e.publishedDate.split("T", 1)[0]) : "";
6149
+ let t = e.publishedDate ? Or(e.publishedDate.split("T", 1)[0]) : "";
6143
6150
  if (!(e.latestVersion !== "" && e.latestVersion !== e.installedVersion)) return t === "" ? "" : ` — ${t}`;
6144
- let n = e.latestPublishedDate ? Dr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6151
+ let n = e.latestPublishedDate ? Or(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6145
6152
  return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
6146
6153
  }
6147
- function Dr(e) {
6154
+ function Or(e) {
6148
6155
  if (e == null || e === "") return "n/a";
6149
6156
  let t = e.split("T", 1)[0];
6150
6157
  if (t == null || t === "") return "n/a";
@@ -6153,43 +6160,43 @@ function Dr(e) {
6153
6160
  }
6154
6161
  //#endregion
6155
6162
  //#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-dBVLwQIt.js
6156
- var Or, kr = {
6163
+ var kr, Ar = {
6157
6164
  lang: void 0,
6158
6165
  message: void 0,
6159
6166
  abortEarly: void 0,
6160
6167
  abortPipeEarly: void 0
6161
6168
  };
6162
6169
  /* @__NO_SIDE_EFFECTS__ */
6163
- function Ar(e) {
6164
- return !e && !Or ? kr : {
6165
- lang: e?.lang ?? Or?.lang,
6170
+ function jr(e) {
6171
+ return !e && !kr ? Ar : {
6172
+ lang: e?.lang ?? kr?.lang,
6166
6173
  message: e?.message,
6167
- abortEarly: e?.abortEarly ?? Or?.abortEarly,
6168
- abortPipeEarly: e?.abortPipeEarly ?? Or?.abortPipeEarly
6174
+ abortEarly: e?.abortEarly ?? kr?.abortEarly,
6175
+ abortPipeEarly: e?.abortPipeEarly ?? kr?.abortPipeEarly
6169
6176
  };
6170
6177
  }
6171
- var jr;
6178
+ var Mr;
6172
6179
  /* @__NO_SIDE_EFFECTS__ */
6173
- function Mr(e) {
6174
- return jr?.get(e);
6180
+ function Nr(e) {
6181
+ return Mr?.get(e);
6175
6182
  }
6176
- var Nr;
6183
+ var Pr;
6177
6184
  /* @__NO_SIDE_EFFECTS__ */
6178
- function Pr(e) {
6179
- return Nr?.get(e);
6185
+ function Fr(e) {
6186
+ return Pr?.get(e);
6180
6187
  }
6181
- var Fr;
6188
+ var Ir;
6182
6189
  /* @__NO_SIDE_EFFECTS__ */
6183
- function Ir(e, t) {
6184
- return Fr?.get(e)?.get(t);
6190
+ function Lr(e, t) {
6191
+ return Ir?.get(e)?.get(t);
6185
6192
  }
6186
6193
  /* @__NO_SIDE_EFFECTS__ */
6187
- function Lr(e) {
6194
+ function Rr(e) {
6188
6195
  let t = typeof e;
6189
6196
  return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
6190
6197
  }
6191
6198
  function Y(e, t, n, r, i) {
6192
- let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Lr(a), c = {
6199
+ let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Rr(a), c = {
6193
6200
  kind: e.kind,
6194
6201
  type: e.type,
6195
6202
  input: a,
@@ -6202,44 +6209,44 @@ function Y(e, t, n, r, i) {
6202
6209
  lang: r.lang,
6203
6210
  abortEarly: r.abortEarly,
6204
6211
  abortPipeEarly: r.abortPipeEarly
6205
- }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ Ir(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Pr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Mr(c.lang);
6212
+ }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ Lr(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Fr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ Nr(c.lang);
6206
6213
  u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
6207
6214
  }
6208
- var Rr = /* @__PURE__ */ new WeakMap();
6215
+ var zr = /* @__PURE__ */ new WeakMap();
6209
6216
  /* @__NO_SIDE_EFFECTS__ */
6210
6217
  function X(e) {
6211
- let t = Rr.get(e);
6218
+ let t = zr.get(e);
6212
6219
  return t || (t = {
6213
6220
  version: 1,
6214
6221
  vendor: "valibot",
6215
6222
  validate(t) {
6216
- return e["~run"]({ value: t }, /* @__PURE__ */ Ar());
6223
+ return e["~run"]({ value: t }, /* @__PURE__ */ jr());
6217
6224
  }
6218
- }, Rr.set(e, t)), t;
6225
+ }, zr.set(e, t)), t;
6219
6226
  }
6220
6227
  /* @__NO_SIDE_EFFECTS__ */
6221
- function zr(e, t) {
6228
+ function Br(e, t) {
6222
6229
  return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
6223
6230
  }
6224
6231
  /* @__NO_SIDE_EFFECTS__ */
6225
- function Br(e, t) {
6232
+ function Vr(e, t) {
6226
6233
  let n = [...new Set(e)];
6227
6234
  return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
6228
6235
  }
6229
6236
  /* @__NO_SIDE_EFFECTS__ */
6230
- function Vr(e, t, n) {
6237
+ function Hr(e, t, n) {
6231
6238
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
6232
6239
  }
6233
6240
  /* @__NO_SIDE_EFFECTS__ */
6234
- function Hr(e, t, n) {
6241
+ function Ur(e, t, n) {
6235
6242
  return typeof e.default == "function" ? e.default(t, n) : e.default;
6236
6243
  }
6237
6244
  /* @__NO_SIDE_EFFECTS__ */
6238
- function Ur(e, t) {
6245
+ function Wr(e, t) {
6239
6246
  return {
6240
6247
  kind: "schema",
6241
6248
  type: "array",
6242
- reference: Ur,
6249
+ reference: Wr,
6243
6250
  expects: "Array",
6244
6251
  async: !1,
6245
6252
  item: e,
@@ -6275,11 +6282,11 @@ function Ur(e, t) {
6275
6282
  };
6276
6283
  }
6277
6284
  /* @__NO_SIDE_EFFECTS__ */
6278
- function Wr(e) {
6285
+ function Gr(e) {
6279
6286
  return {
6280
6287
  kind: "schema",
6281
6288
  type: "boolean",
6282
- reference: Wr,
6289
+ reference: Gr,
6283
6290
  expects: "boolean",
6284
6291
  async: !1,
6285
6292
  message: e,
@@ -6292,12 +6299,12 @@ function Wr(e) {
6292
6299
  };
6293
6300
  }
6294
6301
  /* @__NO_SIDE_EFFECTS__ */
6295
- function Gr(e, t) {
6302
+ function Kr(e, t) {
6296
6303
  return {
6297
6304
  kind: "schema",
6298
6305
  type: "literal",
6299
- reference: Gr,
6300
- expects: /* @__PURE__ */ Lr(e),
6306
+ reference: Kr,
6307
+ expects: /* @__PURE__ */ Rr(e),
6301
6308
  async: !1,
6302
6309
  literal: e,
6303
6310
  message: t,
@@ -6323,16 +6330,16 @@ function Z(e, t) {
6323
6330
  return /* @__PURE__ */ X(this);
6324
6331
  },
6325
6332
  "~run"(e, t) {
6326
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ Hr(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6333
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ Ur(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6327
6334
  }
6328
6335
  };
6329
6336
  }
6330
6337
  /* @__NO_SIDE_EFFECTS__ */
6331
- function Kr(e) {
6338
+ function qr(e) {
6332
6339
  return {
6333
6340
  kind: "schema",
6334
6341
  type: "number",
6335
- reference: Kr,
6342
+ reference: qr,
6336
6343
  expects: "number",
6337
6344
  async: !1,
6338
6345
  message: e,
@@ -6364,7 +6371,7 @@ function Q(e, t) {
6364
6371
  for (let r in this.entries) {
6365
6372
  let i = this.entries[r];
6366
6373
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
6367
- let a = r in n ? n[r] : /* @__PURE__ */ Hr(i), o = i["~run"]({ value: a }, t);
6374
+ let a = r in n ? n[r] : /* @__PURE__ */ Ur(i), o = i["~run"]({ value: a }, t);
6368
6375
  if (o.issues) {
6369
6376
  let i = {
6370
6377
  type: "object",
@@ -6380,7 +6387,7 @@ function Q(e, t) {
6380
6387
  }
6381
6388
  }
6382
6389
  o.typed || (e.typed = !1), e.value[r] = o.value;
6383
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Vr(i);
6390
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Hr(i);
6384
6391
  else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (Y(this, "key", e, t, {
6385
6392
  input: void 0,
6386
6393
  expected: `"${r}"`,
@@ -6399,11 +6406,11 @@ function Q(e, t) {
6399
6406
  };
6400
6407
  }
6401
6408
  /* @__NO_SIDE_EFFECTS__ */
6402
- function qr(e, t) {
6409
+ function Jr(e, t) {
6403
6410
  return {
6404
6411
  kind: "schema",
6405
6412
  type: "optional",
6406
- reference: qr,
6413
+ reference: Jr,
6407
6414
  expects: `(${e.expects} | undefined)`,
6408
6415
  async: !1,
6409
6416
  wrapped: e,
@@ -6412,16 +6419,16 @@ function qr(e, t) {
6412
6419
  return /* @__PURE__ */ X(this);
6413
6420
  },
6414
6421
  "~run"(e, t) {
6415
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ Hr(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6422
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ Ur(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6416
6423
  }
6417
6424
  };
6418
6425
  }
6419
6426
  /* @__NO_SIDE_EFFECTS__ */
6420
- function Jr(e, t, n) {
6427
+ function Yr(e, t, n) {
6421
6428
  return {
6422
6429
  kind: "schema",
6423
6430
  type: "record",
6424
- reference: Jr,
6431
+ reference: Yr,
6425
6432
  expects: "Object",
6426
6433
  async: !1,
6427
6434
  key: e,
@@ -6434,7 +6441,7 @@ function Jr(e, t, n) {
6434
6441
  let n = e.value;
6435
6442
  if (n && typeof n == "object") {
6436
6443
  e.typed = !0, e.value = {};
6437
- for (let r in n) if (/* @__PURE__ */ zr(n, r)) {
6444
+ for (let r in n) if (/* @__PURE__ */ Br(n, r)) {
6438
6445
  let i = n[r], a = this.key["~run"]({ value: r }, t);
6439
6446
  if (a.issues) {
6440
6447
  let o = {
@@ -6490,19 +6497,19 @@ function $(e) {
6490
6497
  };
6491
6498
  }
6492
6499
  /* @__NO_SIDE_EFFECTS__ */
6493
- function Yr(e) {
6500
+ function Xr(e) {
6494
6501
  let t;
6495
6502
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
6496
6503
  else t = n.issues;
6497
6504
  return t;
6498
6505
  }
6499
6506
  /* @__NO_SIDE_EFFECTS__ */
6500
- function Xr(e, t) {
6507
+ function Zr(e, t) {
6501
6508
  return {
6502
6509
  kind: "schema",
6503
6510
  type: "union",
6504
- reference: Xr,
6505
- expects: /* @__PURE__ */ Br(e.map((e) => e.expects), "|"),
6511
+ reference: Zr,
6512
+ expects: /* @__PURE__ */ Vr(e.map((e) => e.expects), "|"),
6506
6513
  async: !1,
6507
6514
  options: e,
6508
6515
  message: t,
@@ -6523,24 +6530,24 @@ function Xr(e, t) {
6523
6530
  if (n) return n;
6524
6531
  if (r) {
6525
6532
  if (r.length === 1) return r[0];
6526
- Y(this, "type", e, t, { issues: /* @__PURE__ */ Yr(r) }), e.typed = !0;
6533
+ Y(this, "type", e, t, { issues: /* @__PURE__ */ Xr(r) }), e.typed = !0;
6527
6534
  } else if (i?.length === 1) return i[0];
6528
- else Y(this, "type", e, t, { issues: /* @__PURE__ */ Yr(i) });
6535
+ else Y(this, "type", e, t, { issues: /* @__PURE__ */ Xr(i) });
6529
6536
  return e;
6530
6537
  }
6531
6538
  };
6532
6539
  }
6533
- var Zr = (e) => /* @__PURE__ */ Xr(e.map((e) => /* @__PURE__ */ Gr(e))), Qr = /* @__PURE__ */ Q({
6540
+ var Qr = (e) => /* @__PURE__ */ Zr(e.map((e) => /* @__PURE__ */ Kr(e))), $r = /* @__PURE__ */ Q({
6534
6541
  en: /* @__PURE__ */ $(),
6535
6542
  es: /* @__PURE__ */ $()
6536
- }), $r = /* @__PURE__ */ Q({
6537
- en: /* @__PURE__ */ qr(/* @__PURE__ */ Ur(/* @__PURE__ */ $())),
6538
- es: /* @__PURE__ */ qr(/* @__PURE__ */ Ur(/* @__PURE__ */ $()))
6539
6543
  }), ei = /* @__PURE__ */ Q({
6540
- en: /* @__PURE__ */ qr(/* @__PURE__ */ $()),
6541
- es: /* @__PURE__ */ qr(/* @__PURE__ */ $())
6544
+ en: /* @__PURE__ */ Jr(/* @__PURE__ */ Wr(/* @__PURE__ */ $())),
6545
+ es: /* @__PURE__ */ Jr(/* @__PURE__ */ Wr(/* @__PURE__ */ $()))
6546
+ }), ti = /* @__PURE__ */ Q({
6547
+ en: /* @__PURE__ */ Jr(/* @__PURE__ */ $()),
6548
+ es: /* @__PURE__ */ Jr(/* @__PURE__ */ $())
6542
6549
  });
6543
- Zr([
6550
+ Qr([
6544
6551
  "app",
6545
6552
  "connection",
6546
6553
  "connector",
@@ -6565,12 +6572,12 @@ Zr([
6565
6572
  "presenterPresentation",
6566
6573
  "tool"
6567
6574
  ]);
6568
- var ti = Zr([
6575
+ var ni = Qr([
6569
6576
  "amber",
6570
6577
  "green",
6571
6578
  "red",
6572
6579
  "other"
6573
- ]), ni = Zr([
6580
+ ]), ri = Qr([
6574
6581
  "alpha",
6575
6582
  "beta",
6576
6583
  "generalAvailability",
@@ -6580,31 +6587,31 @@ var ti = Zr([
6580
6587
  "releaseCandidate",
6581
6588
  "unavailable",
6582
6589
  "underReview"
6583
- ]), ri = /* @__PURE__ */ Q({
6584
- color: ti,
6590
+ ]), ii = /* @__PURE__ */ Q({
6591
+ color: ni,
6585
6592
  label: /* @__PURE__ */ $()
6586
- }), ii = /* @__PURE__ */ Q({
6593
+ }), ai = /* @__PURE__ */ Q({
6587
6594
  id: /* @__PURE__ */ $(),
6588
- label: ei,
6589
- description: $r,
6595
+ label: ti,
6596
+ description: ei,
6590
6597
  icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6591
6598
  iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6592
6599
  iconNeutral: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6593
- order: /* @__PURE__ */ Kr(),
6600
+ order: /* @__PURE__ */ qr(),
6594
6601
  path: /* @__PURE__ */ $()
6595
- }), ai = {
6602
+ }), oi = {
6596
6603
  id: /* @__PURE__ */ $(),
6597
- label: ei,
6598
- description: $r,
6599
- firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Kr()),
6604
+ label: ti,
6605
+ description: ei,
6606
+ firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ qr()),
6600
6607
  icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6601
6608
  iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6602
6609
  iconNeutral: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6603
- lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Kr()),
6604
- status: /* @__PURE__ */ Z(ri),
6605
- statusId: /* @__PURE__ */ Z(ni)
6610
+ lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ qr()),
6611
+ status: /* @__PURE__ */ Z(ii),
6612
+ statusId: /* @__PURE__ */ Z(ri)
6606
6613
  };
6607
- ({ ...ai }), Zr([
6614
+ ({ ...oi }), Qr([
6608
6615
  "app",
6609
6616
  "engine",
6610
6617
  "connector",
@@ -6615,14 +6622,14 @@ var ti = Zr([
6615
6622
  ]);
6616
6623
  //#endregion
6617
6624
  //#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-CUHmgYLu.js
6618
- var oi = {
6619
- ...ai,
6625
+ var si = {
6626
+ ...oi,
6620
6627
  version: /* @__PURE__ */ $()
6621
6628
  };
6622
- ({ ...oi });
6629
+ ({ ...si });
6623
6630
  //#endregion
6624
6631
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
6625
- var si = Zr([
6632
+ var ci = Qr([
6626
6633
  "abortOperation",
6627
6634
  "auditObjectContent",
6628
6635
  "createObject",
@@ -6637,35 +6644,35 @@ var si = Zr([
6637
6644
  "retrieveChunks",
6638
6645
  "retrieveRecords",
6639
6646
  "upsertRecords"
6640
- ]), ci = Zr([
6647
+ ]), li = Qr([
6641
6648
  "application",
6642
6649
  "curatedDataset",
6643
6650
  "database",
6644
6651
  "fileStore"
6645
- ]), li = /* @__PURE__ */ Q({ label: Qr }), ui = /* @__PURE__ */ Q({
6646
- authMethodId: Zr([
6652
+ ]), ui = /* @__PURE__ */ Q({ label: $r }), di = /* @__PURE__ */ Q({
6653
+ authMethodId: Qr([
6647
6654
  "apiKey",
6648
6655
  "disabled",
6649
6656
  "oAuth2",
6650
6657
  "none"
6651
6658
  ]),
6652
- activeConnectionCount: /* @__PURE__ */ qr(/* @__PURE__ */ Kr()),
6653
- canDescribe: /* @__PURE__ */ qr(/* @__PURE__ */ Wr()),
6654
- id: /* @__PURE__ */ qr(/* @__PURE__ */ $()),
6655
- label: /* @__PURE__ */ qr(Qr),
6656
- maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ Kr()),
6657
- params: /* @__PURE__ */ qr(/* @__PURE__ */ Ur(/* @__PURE__ */ Jr(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6658
- }), di = /* @__PURE__ */ Q({
6659
- typeId: /* @__PURE__ */ Gr("connector"),
6660
- ...oi,
6661
- actionNames: /* @__PURE__ */ Ur(si),
6662
- category: /* @__PURE__ */ Z(li),
6663
- categoryId: ci,
6664
- implementations: /* @__PURE__ */ Jr(/* @__PURE__ */ $(), ui),
6659
+ activeConnectionCount: /* @__PURE__ */ Jr(/* @__PURE__ */ qr()),
6660
+ canDescribe: /* @__PURE__ */ Jr(/* @__PURE__ */ Gr()),
6661
+ id: /* @__PURE__ */ Jr(/* @__PURE__ */ $()),
6662
+ label: /* @__PURE__ */ Jr($r),
6663
+ maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ qr()),
6664
+ params: /* @__PURE__ */ Jr(/* @__PURE__ */ Wr(/* @__PURE__ */ Yr(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6665
+ }), fi = /* @__PURE__ */ Q({
6666
+ typeId: /* @__PURE__ */ Kr("connector"),
6667
+ ...si,
6668
+ actionNames: /* @__PURE__ */ Wr(ci),
6669
+ category: /* @__PURE__ */ Z(ui),
6670
+ categoryId: li,
6671
+ implementations: /* @__PURE__ */ Yr(/* @__PURE__ */ $(), di),
6665
6672
  vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6666
6673
  vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6667
6674
  vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $())
6668
- }), fi = {
6675
+ }), pi = {
6669
6676
  abortOperation: "Abort Operation",
6670
6677
  auditObjectContent: "Audit Object Content",
6671
6678
  createObject: "Create Object",
@@ -6681,27 +6688,27 @@ var si = Zr([
6681
6688
  retrieveRecords: "Retrieve Records",
6682
6689
  upsertRecords: "Upsert Records"
6683
6690
  };
6684
- function pi(e) {
6691
+ function mi(e) {
6685
6692
  let t = new Set(e), n = "|Action|Supported|\n";
6686
6693
  n += "|:----|:-------:|\n";
6687
- for (let e of Object.keys(fi)) n += `| ${fi[e]} | ${t.has(e) ? "✓" : ""} |\n`;
6694
+ for (let e of Object.keys(pi)) n += `| ${pi[e]} | ${t.has(e) ? "✓" : ""} |\n`;
6688
6695
  return n;
6689
6696
  }
6690
6697
  //#endregion
6691
6698
  //#region src/actions/documentActions.ts
6692
- var mi = "<!-- CONNECTOR_ACTIONS_START -->", hi = "<!-- CONNECTOR_ACTIONS_END -->";
6693
- async function gi() {
6699
+ var hi = "<!-- CONNECTOR_ACTIONS_START -->", gi = "<!-- CONNECTOR_ACTIONS_END -->";
6700
+ async function _i() {
6694
6701
  try {
6695
6702
  G("Document Actions"), q("1️⃣ Insert actions table into 'README.md'");
6696
- let e = pi((await W("config.json")).actionNames ?? []);
6697
- await zn("README.md", Wn(await Ln("./README.md"), e, mi, hi)), K("Actions documented");
6703
+ let e = mi((await W("config.json")).actionNames ?? []);
6704
+ await Bn("README.md", Gn(await Ln("./README.md"), e, hi, gi)), K("Actions documented");
6698
6705
  } catch (e) {
6699
6706
  console.error("❌ Error documenting actions", e), process.exit(1);
6700
6707
  }
6701
6708
  }
6702
6709
  //#endregion
6703
6710
  //#region src/actions/formatCode.ts
6704
- async function _i() {
6711
+ async function vi() {
6705
6712
  try {
6706
6713
  G("Format Code"), await Fn("1️⃣ Format", "prettier", [
6707
6714
  "--write",
@@ -6716,7 +6723,7 @@ async function _i() {
6716
6723
  }
6717
6724
  //#endregion
6718
6725
  //#region src/actions/lintCode.ts
6719
- async function vi() {
6726
+ async function yi() {
6720
6727
  try {
6721
6728
  G("Lint Code"), await Fn("1️⃣ Lint", "eslint", ["."]), K("Code linted");
6722
6729
  } catch (e) {
@@ -6725,7 +6732,7 @@ async function vi() {
6725
6732
  }
6726
6733
  //#endregion
6727
6734
  //#region src/utilities/cloudflare.ts
6728
- async function yi() {
6735
+ async function bi() {
6729
6736
  let e = await W("config.json"), t = {
6730
6737
  body: JSON.stringify(e),
6731
6738
  headers: { "Content-Type": "application/json" },
@@ -6733,11 +6740,11 @@ async function yi() {
6733
6740
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
6734
6741
  if (!n.ok) throw Error(await n.text());
6735
6742
  }
6736
- async function bi(e, t) {
6743
+ async function xi(e, t) {
6737
6744
  async function n(e, t, r) {
6738
6745
  for (let i of r) {
6739
6746
  let r = `${e}/${i}`, a = `${t}/${i}`;
6740
- (await Vn(r)).isDirectory() ? await n(r, a, await Nn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Pn(void 0, "wrangler", [
6747
+ (await Hn(r)).isDirectory() ? await n(r, a, await Nn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Pn(void 0, "wrangler", [
6741
6748
  "r2",
6742
6749
  "object",
6743
6750
  "put",
@@ -6751,7 +6758,7 @@ async function bi(e, t) {
6751
6758
  let r = await Nn(`${e}/${t}/`);
6752
6759
  await n(`${e}/${t}`, t, r);
6753
6760
  }
6754
- async function xi(e) {
6761
+ async function Si(e) {
6755
6762
  let t = e.id, n = {
6756
6763
  body: JSON.stringify(e),
6757
6764
  headers: { "Content-Type": "application/json" },
@@ -6759,7 +6766,7 @@ async function xi(e) {
6759
6766
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
6760
6767
  if (!r.ok) throw Error(await r.text());
6761
6768
  }
6762
- async function Si(e, t) {
6769
+ async function Ci(e, t) {
6763
6770
  let n = `v${e.version ?? "unknown"}`;
6764
6771
  async function r(e, r = "") {
6765
6772
  let i = await Nn(e, { withFileTypes: !0 });
@@ -6783,24 +6790,24 @@ async function Si(e, t) {
6783
6790
  }
6784
6791
  //#endregion
6785
6792
  //#region node_modules/valibot/dist/index.mjs
6786
- var Ci, wi = {
6793
+ var wi, Ti = {
6787
6794
  lang: void 0,
6788
6795
  message: void 0,
6789
6796
  abortEarly: void 0,
6790
6797
  abortPipeEarly: void 0
6791
6798
  };
6792
6799
  /* @__NO_SIDE_EFFECTS__ */
6793
- function Ti(e) {
6794
- return !e && !Ci ? wi : {
6795
- lang: e?.lang ?? Ci?.lang,
6800
+ function Ei(e) {
6801
+ return !e && !wi ? Ti : {
6802
+ lang: e?.lang ?? wi?.lang,
6796
6803
  message: e?.message,
6797
- abortEarly: e?.abortEarly ?? Ci?.abortEarly,
6798
- abortPipeEarly: e?.abortPipeEarly ?? Ci?.abortPipeEarly
6804
+ abortEarly: e?.abortEarly ?? wi?.abortEarly,
6805
+ abortPipeEarly: e?.abortPipeEarly ?? wi?.abortPipeEarly
6799
6806
  };
6800
6807
  }
6801
6808
  /* @__NO_SIDE_EFFECTS__ */
6802
- function Ei(e, t, n) {
6803
- let r = e["~run"]({ value: t }, /* @__PURE__ */ Ti(n));
6809
+ function Di(e, t, n) {
6810
+ let r = e["~run"]({ value: t }, /* @__PURE__ */ Ei(n));
6804
6811
  return {
6805
6812
  typed: r.typed,
6806
6813
  success: !r.issues,
@@ -6810,31 +6817,31 @@ function Ei(e, t, n) {
6810
6817
  }
6811
6818
  //#endregion
6812
6819
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleContext.es.js
6813
- var Di = /* @__PURE__ */ Q({
6814
- typeId: /* @__PURE__ */ Gr("contextArea"),
6815
- ...ai,
6816
- modelRefs: /* @__PURE__ */ Ur(ii),
6817
- order: /* @__PURE__ */ Kr()
6818
- }), Oi = Zr(["listContextFocuses"]), ki = /* @__PURE__ */ Q({
6819
- typeId: /* @__PURE__ */ Gr("context"),
6820
+ var Oi = /* @__PURE__ */ Q({
6821
+ typeId: /* @__PURE__ */ Kr("contextArea"),
6820
6822
  ...oi,
6821
- actionNames: /* @__PURE__ */ Ur(Oi),
6822
- models: /* @__PURE__ */ Ur(Di)
6823
- }), Ai = Zr([
6823
+ modelRefs: /* @__PURE__ */ Wr(ai),
6824
+ order: /* @__PURE__ */ qr()
6825
+ }), ki = Qr(["listContextFocuses"]), Ai = /* @__PURE__ */ Q({
6826
+ typeId: /* @__PURE__ */ Kr("context"),
6827
+ ...si,
6828
+ actionNames: /* @__PURE__ */ Wr(ki),
6829
+ models: /* @__PURE__ */ Wr(Oi)
6830
+ }), ji = Qr([
6824
6831
  "list",
6825
6832
  "render",
6826
6833
  "setColorMode"
6827
- ]), ji = /* @__PURE__ */ Q({
6828
- typeId: /* @__PURE__ */ Gr("presenter"),
6829
- ...oi,
6830
- actionNames: /* @__PURE__ */ Ur(Ai),
6831
- presentations: /* @__PURE__ */ Ur(ii)
6832
- }), Mi = /* @__PURE__ */ new Set([
6834
+ ]), Mi = /* @__PURE__ */ Q({
6835
+ typeId: /* @__PURE__ */ Kr("presenter"),
6836
+ ...si,
6837
+ actionNames: /* @__PURE__ */ Wr(ji),
6838
+ presentations: /* @__PURE__ */ Wr(ai)
6839
+ }), Ni = /* @__PURE__ */ new Set([
6833
6840
  "createObject",
6834
6841
  "dropObject",
6835
6842
  "removeRecords",
6836
6843
  "upsertRecords"
6837
- ]), Ni = /* @__PURE__ */ new Set([
6844
+ ]), Pi = /* @__PURE__ */ new Set([
6838
6845
  "auditObjectContent",
6839
6846
  "findObjectFolderPath",
6840
6847
  "getReadableStream",
@@ -6844,47 +6851,47 @@ var Di = /* @__PURE__ */ Q({
6844
6851
  "retrieveChunks",
6845
6852
  "retrieveRecords"
6846
6853
  ]);
6847
- async function Pi() {
6854
+ async function Fi() {
6848
6855
  try {
6849
6856
  G("Build Project"), await Fn("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
6850
6857
  } catch (e) {
6851
6858
  console.error("❌ Error building project", e), process.exit(1);
6852
6859
  }
6853
6860
  }
6854
- async function Fi() {
6861
+ async function Ii() {
6855
6862
  try {
6856
6863
  G("Publish Project");
6857
- let e = await W("package.json"), t = await W("config.json"), n = Bn(t.id);
6858
- if (n.typeId === "app") q("1️⃣ Register module"), await yi();
6859
- else if (n.typeId === "engine") q("1️⃣ Register module"), await Si(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await xi(t);
6864
+ let e = await W("package.json"), t = await W("config.json"), n = Vn(t.id);
6865
+ if (n.typeId === "app") q("1️⃣ Register module"), await bi();
6866
+ else if (n.typeId === "engine") q("1️⃣ Register module"), await Ci(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Si(t);
6860
6867
  else if (n.uploadGroupName === void 0) q("1️⃣ Publishing NOT required");
6861
6868
  else {
6862
6869
  q("1️⃣ Register module");
6863
6870
  let r = t.id.split("-").slice(2).join("-");
6864
- await Si(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await xi(t);
6871
+ await Ci(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Si(t);
6865
6872
  }
6866
6873
  K(`Project version '${e.version ?? "unknown"}' published.`);
6867
6874
  } catch (e) {
6868
6875
  console.error("❌ Error publishing project", e), process.exit(1);
6869
6876
  }
6870
6877
  }
6871
- async function Ii() {
6878
+ async function Li() {
6872
6879
  try {
6873
6880
  G("Release Project");
6874
6881
  let e = await W("package.json"), t = await W("config.json");
6875
- await Gi("1️⃣ ", e);
6876
- let n = Bn(t.id);
6882
+ await Ki("1️⃣ ", e);
6883
+ let n = Vn(t.id);
6877
6884
  switch (n.typeId) {
6878
6885
  case "connector":
6879
- t = await Ri("2️⃣ ", e);
6886
+ t = await zi("2️⃣ ", e);
6880
6887
  break;
6881
6888
  case "context":
6882
- t = await zi("2️⃣ ", e);
6889
+ t = await Bi("2️⃣ ", e);
6883
6890
  break;
6884
6891
  case "presenter":
6885
- t = await Bi("2️⃣ ", e);
6892
+ t = await Vi("2️⃣ ", e);
6886
6893
  break;
6887
- default: t = await Li("2️⃣ ", e);
6894
+ default: t = await Ri("2️⃣ ", e);
6888
6895
  }
6889
6896
  if (await Fn("3️⃣ Bundle project", "vite", ["build"]), await Pn("4️⃣ Stage changes", "git", ["add", "."]), await Pn("5️⃣ Commit changes", "git", [
6890
6897
  "commit",
@@ -6894,74 +6901,78 @@ async function Ii() {
6894
6901
  "push",
6895
6902
  "origin",
6896
6903
  "main:main"
6897
- ]), n.typeId === "app") q("7️⃣ Register module"), await yi();
6898
- else if (n.typeId === "engine") q("7️⃣ Register module"), await Si(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await xi(t);
6904
+ ]), n.typeId === "app") q("7️⃣ Register module"), await bi();
6905
+ else if (n.typeId === "engine") q("7️⃣ Register module"), await Ci(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Si(t);
6899
6906
  else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required");
6900
6907
  else {
6901
6908
  q("7️⃣ Register module");
6902
6909
  let r = t.id.split("-").slice(2).join("-");
6903
- await Si(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await xi(t);
6910
+ await Ci(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Si(t);
6904
6911
  }
6905
- if (n.publishedTo === "npm") try {
6906
- await zn(".npmrc", `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Fn("8️⃣ Publish to npm", "npm", [
6907
- "publish",
6908
- "--access",
6909
- "public"
6910
- ]);
6911
- } finally {}
6912
- else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
6912
+ if (n.publishedTo === "npm") {
6913
+ let e = ".npmrc";
6914
+ try {
6915
+ await Bn(e, `registry=https://registry.npmjs.org/\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Fn("8️⃣ Publish to npm", "npm", [
6916
+ "publish",
6917
+ "--access",
6918
+ "public"
6919
+ ]);
6920
+ } finally {
6921
+ await Rn(e);
6922
+ }
6923
+ } else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
6913
6924
  K(`Project version '${e.version ?? "unknown"}' released.`);
6914
6925
  } catch (e) {
6915
6926
  console.error("❌ Error releasing project", e), process.exit(1);
6916
6927
  }
6917
6928
  }
6918
- async function Li(e, t) {
6929
+ async function Ri(e, t) {
6919
6930
  q(`${e} Build project configuration`);
6920
6931
  let n = await W("config.json");
6921
- return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await Rn("config.json", n), n;
6932
+ return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await zn("config.json", n), n;
6922
6933
  }
6923
- async function Ri(e, t) {
6934
+ async function zi(e, t) {
6924
6935
  q(`${e} Build connector project configuration`);
6925
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Ei(di, n);
6936
+ let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Di(fi, n);
6926
6937
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
6927
- let a = Hn(r);
6928
- return await Hi(t, n, a, Vi(a));
6938
+ let a = Un(r);
6939
+ return await Ui(t, n, a, Hi(a));
6929
6940
  }
6930
- async function zi(e, t) {
6941
+ async function Bi(e, t) {
6931
6942
  q(`${e} Build context project configuration`);
6932
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Ei(ki, n);
6943
+ let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Di(Ai, n);
6933
6944
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
6934
- return await Hi(t, n, Hn(r));
6945
+ return await Ui(t, n, Un(r));
6935
6946
  }
6936
- async function Bi(e, t) {
6947
+ async function Vi(e, t) {
6937
6948
  q(`${e} Build presenter project configuration`);
6938
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Ei(ji, n);
6949
+ let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Di(Mi, n);
6939
6950
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
6940
- return await Hi(t, n, Hn(r));
6951
+ return await Ui(t, n, Un(r));
6941
6952
  }
6942
- function Vi(e) {
6953
+ function Hi(e) {
6943
6954
  let t = !1, n = !1;
6944
- for (let r of e) Ni.has(r) && (t = !0), Mi.has(r) && (n = !0);
6955
+ for (let r of e) Pi.has(r) && (t = !0), Ni.has(r) && (n = !0);
6945
6956
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
6946
6957
  }
6947
- async function Hi(e, t, n, r) {
6948
- return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations"), r === "unknown" ? console.warn("⚠️ No usage identified") : console.info(`ℹ️ Supports '${r ?? "unknown"}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await Rn("config.json", t), t;
6958
+ async function Ui(e, t, n, r) {
6959
+ return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations"), r === "unknown" ? console.warn("⚠️ No usage identified") : console.info(`ℹ️ Supports '${r ?? "unknown"}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.operations = n, t.usageId = r ?? "unknown", await zn("config.json", t), t;
6949
6960
  }
6950
- async function Ui() {
6961
+ async function Wi() {
6951
6962
  try {
6952
6963
  G("Synchronise Project with GitHub");
6953
6964
  let e = await W("package.json"), t = await W("config.json");
6954
- switch (await Gi("1️⃣ ", e), Bn(t.id).typeId) {
6965
+ switch (await Ki("1️⃣ ", e), Vn(t.id).typeId) {
6955
6966
  case "connector":
6956
- await Ri("2️⃣ ", e);
6967
+ await zi("2️⃣ ", e);
6957
6968
  break;
6958
6969
  case "context":
6959
- await zi("2️⃣ ", e);
6970
+ await Bi("2️⃣ ", e);
6960
6971
  break;
6961
6972
  case "presenter":
6962
- await Bi("2️⃣ ", e);
6973
+ await Vi("2️⃣ ", e);
6963
6974
  break;
6964
- default: await Li("2️⃣ ", e);
6975
+ default: await Ri("2️⃣ ", e);
6965
6976
  }
6966
6977
  await Pn("3️⃣ Stage changes", "git", ["add", "."]), await Pn("4️⃣ Commit changes", "git", [
6967
6978
  "commit",
@@ -6976,22 +6987,22 @@ async function Ui() {
6976
6987
  console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
6977
6988
  }
6978
6989
  }
6979
- function Wi() {
6990
+ function Gi() {
6980
6991
  try {
6981
6992
  G("Test Project"), console.error("\n❌ No tests implemented.\n");
6982
6993
  } catch (e) {
6983
6994
  console.error("❌ Error testing project", e), process.exit(1);
6984
6995
  }
6985
6996
  }
6986
- async function Gi(e, t, n = "./") {
6997
+ async function Ki(e, t, n = "./") {
6987
6998
  if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
6988
6999
  else {
6989
7000
  let e = t.version, n = t.version.split(".");
6990
7001
  t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
6991
7002
  }
6992
- await Rn(`${n}package.json`, t);
7003
+ await zn(`${n}package.json`, t);
6993
7004
  }
6994
7005
  //#endregion
6995
- export { Gn as auditDependencies, Pi as buildProject, Kn as checkConfigFiles, qn as checkDependencies, gi as documentActions, Qn as documentBundleSizes, yr as documentDependencies, _i as formatCode, vi as lintCode, Fi as publishProject, Ii as releaseProject, Ui as syncProjectWithGitHub, Wi as testProject, bi as uploadDirectoryToR2 };
7006
+ export { Kn as auditDependencies, Fi as buildProject, qn as checkConfigFiles, Jn as checkDependencies, _i as documentActions, $n as documentBundleSizes, br as documentDependencies, vi as formatCode, yi as lintCode, Ii as publishProject, Li as releaseProject, Wi as syncProjectWithGitHub, Gi as testProject, xi as uploadDirectoryToR2 };
6996
7007
 
6997
7008
  //# sourceMappingURL=dpuse-development.es.js.map