@dpuse/dpuse-development 0.3.638 → 0.3.639

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