@dpuse/dpuse-development 0.3.543 → 0.3.546

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.
@@ -5720,7 +5720,7 @@ var On = [
5720
5720
  }
5721
5721
  ], kn = r(i);
5722
5722
  async function An(e, r) {
5723
- e !== void 0 && K(`${e} - clear(${r})`);
5723
+ e !== void 0 && q(`${e} - clear(${r})`);
5724
5724
  let i;
5725
5725
  try {
5726
5726
  i = await t.readdir(r, { withFileTypes: !0 });
@@ -5745,12 +5745,12 @@ async function jn(e, n) {
5745
5745
  }
5746
5746
  async function Mn(e, n, r = [], i) {
5747
5747
  let a = `${n} ${r.join(" ")}`;
5748
- e !== void 0 && K(`${e} - exec(${a})`);
5748
+ e !== void 0 && q(`${e} - exec(${a})`);
5749
5749
  let { stdout: o, stderr: s } = await kn(a);
5750
5750
  i === void 0 ? o.trim() && console.log(o.trim()) : await t.writeFile(i, o.trim(), "utf8"), s.trim() && console.error(s.trim());
5751
5751
  }
5752
5752
  async function Nn(e, t, n = [], r = !1, i = !1) {
5753
- return K(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
5753
+ return q(`${e} - spawn(${t} ${n.join(" ")})`), new Promise((e, o) => {
5754
5754
  a(t, n, {
5755
5755
  shell: i,
5756
5756
  stdio: "inherit"
@@ -5760,7 +5760,7 @@ async function Nn(e, t, n = [], r = !1, i = !1) {
5760
5760
  });
5761
5761
  }
5762
5762
  async function Pn(e, n, r = [], i, o = !1) {
5763
- return K(`${e} - spawn(${n} ${r.join(" ")}) > ${i}`), new Promise((e, s) => {
5763
+ return q(`${e} - spawn(${n} ${r.join(" ")}) > ${i}`), new Promise((e, s) => {
5764
5764
  let c = a(n, r, {
5765
5765
  shell: !1,
5766
5766
  stdio: [
@@ -5805,27 +5805,27 @@ function G(e) {
5805
5805
  let t = "─".repeat(Math.max(e.length + 60, 60));
5806
5806
  console.info(`\n${t}`), console.info(`▶️ ${e}`), console.info(`${t}`);
5807
5807
  }
5808
- function zn(e) {
5808
+ function K(e) {
5809
5809
  console.info(`\n✅ ${e}\n`);
5810
5810
  }
5811
- function K(e) {
5811
+ function q(e) {
5812
5812
  console.info(`\n${e}\n`);
5813
5813
  }
5814
- function Bn(e) {
5814
+ function zn(e) {
5815
5815
  let t = On.find((t) => e.startsWith(t.idPrefix));
5816
5816
  if (!t) throw Error(`Failed to locate module type configuration for identifier '${e}'.`);
5817
5817
  return t;
5818
5818
  }
5819
- async function Vn(e) {
5819
+ async function Bn(e) {
5820
5820
  return await t.stat(e);
5821
5821
  }
5822
- function Hn(e) {
5822
+ function Vn(e) {
5823
5823
  let t = k.extend(Dn()).parse(e, {
5824
5824
  ecmaVersion: "latest",
5825
5825
  sourceType: "module",
5826
5826
  locations: !0
5827
5827
  }), n = [];
5828
- return Un(t, (e) => {
5828
+ return Hn(t, (e) => {
5829
5829
  if (e.type !== "MethodDefinition") return;
5830
5830
  let t = e, r = t.key;
5831
5831
  if (r.type !== "Identifier") return;
@@ -5833,7 +5833,7 @@ function Hn(e) {
5833
5833
  i && i !== "constructor" && t.accessibility !== "private" && n.push(i);
5834
5834
  }), n;
5835
5835
  }
5836
- function Un(e, t) {
5836
+ function Hn(e, t) {
5837
5837
  t(e);
5838
5838
  for (let [n, r] of Object.entries(e)) {
5839
5839
  if ([
@@ -5846,41 +5846,41 @@ function Un(e, t) {
5846
5846
  let e = r;
5847
5847
  if (Array.isArray(e)) for (let n of e) {
5848
5848
  let e = n;
5849
- e && typeof e.type == "string" && Un(e, t);
5849
+ e && typeof e.type == "string" && Hn(e, t);
5850
5850
  }
5851
- else e && typeof e == "object" && typeof e.type == "string" && Un(e, t);
5851
+ else e && typeof e == "object" && typeof e.type == "string" && Hn(e, t);
5852
5852
  }
5853
5853
  }
5854
- function Wn(e, t, n, r) {
5854
+ function Un(e, t, n, r) {
5855
5855
  let i = e.indexOf(n), a = e.indexOf(r);
5856
5856
  if (i === -1 || a === -1) throw Error(`Markers ${n}-${r} not found in content.`);
5857
5857
  return `${e.slice(0, Math.max(0, i + n.length))}\n${t}\n${e.slice(Math.max(0, a))}`;
5858
5858
  }
5859
5859
  //#endregion
5860
5860
  //#region src/actions/auditDependencies.ts
5861
- async function Gn() {
5861
+ async function Wn() {
5862
5862
  try {
5863
- G("Audit Dependencies"), await Nn("1️⃣ Check using 'npm audit'", "npm", ["audit"]), zn("Dependencies audited.");
5863
+ G("Audit Dependencies"), await Nn("1️⃣ Check using 'npm audit'", "npm", ["audit"]), K("Dependencies audited.");
5864
5864
  } catch (e) {
5865
5865
  console.error("❌ Error auditing dependencies.", e), process.exit(1);
5866
5866
  }
5867
5867
  }
5868
5868
  //#endregion
5869
5869
  //#region src/actions/checkConfigFiles.ts
5870
- async function Kn(e = []) {
5870
+ async function Gn(e = []) {
5871
5871
  try {
5872
5872
  G("Update '@dpuse/dpuse' Dependencies");
5873
5873
  for (let t of e) {
5874
- if (t !== "development") continue;
5875
- let e = Bn((await W("config.json")).id), r = n.dirname(o(import.meta.url));
5876
- await qn(r, "../", ".editorconfig"), await qn(r, "../", ".gitattributes"), await qn(r, "../", e.isPublished ? ".gitignore_published" : ".gitignore_unpublished"), await qn(r, "../", ".markdownlint.json"), await qn(r, "../", "LICENSE");
5874
+ if (t === "development") continue;
5875
+ let e = zn((await W("config.json")).id), r = n.dirname(o(import.meta.url));
5876
+ await Kn(r, "../", ".editorconfig"), await Kn(r, "../", ".gitattributes"), await Kn(r, "../", e.isPublished ? ".gitignore_published" : ".gitignore_unpublished"), await Kn(r, "../", ".markdownlint.json"), await Kn(r, "../", "LICENSE");
5877
5877
  }
5878
- zn("'@dpuse/dpuse' dependencies updated.");
5878
+ K("'@dpuse/dpuse' dependencies updated.");
5879
5879
  } catch (e) {
5880
5880
  console.error("❌ Error updating '@dpuse/dpuse' dependencies.", e), process.exit(1);
5881
5881
  }
5882
5882
  }
5883
- async function qn(e, t, r) {
5883
+ async function Kn(e, t, r) {
5884
5884
  let i = await Fn(n.resolve(e, `${t}${r}`)), a = n.resolve(process.cwd(), r.split("_", 1)[0] ?? r), o;
5885
5885
  try {
5886
5886
  o = await Fn(a);
@@ -5895,21 +5895,21 @@ async function qn(e, t, r) {
5895
5895
  }
5896
5896
  //#endregion
5897
5897
  //#region src/actions/checkDependencies.ts
5898
- async function Jn() {
5898
+ async function qn() {
5899
5899
  try {
5900
5900
  G("Check Dependencies"), await Nn("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Nn("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", [
5901
5901
  "-i",
5902
5902
  "--dep",
5903
5903
  "dev,prod,peer,optional"
5904
- ]), zn("Dependencies checked.");
5904
+ ]), K("Dependencies checked.");
5905
5905
  } catch (e) {
5906
5906
  console.error("❌ Error checking dependencies.", e), process.exit(1);
5907
5907
  }
5908
5908
  }
5909
5909
  //#endregion
5910
5910
  //#region src/actions/documentDependencies.ts
5911
- var Yn = "<!-- DEPENDENCY_LICENSES_START -->", Xn = "<!-- DEPENDENCY_LICENSES_END -->", Zn = "<!-- DEPENDENCY_TREE_START -->", Qn = "<!-- DEPENDENCY_TREE_END -->";
5912
- async function $n(e = "MIT") {
5911
+ var Jn = "<!-- DEPENDENCY_LICENSES_START -->", Yn = "<!-- DEPENDENCY_LICENSES_END -->", Xn = "<!-- DEPENDENCY_TREE_START -->", Zn = "<!-- DEPENDENCY_TREE_END -->";
5912
+ async function Qn(e = "MIT") {
5913
5913
  try {
5914
5914
  G("Document Dependencies"), await An("1️⃣ Clear downloaded licenses", "licenses/downloads");
5915
5915
  let t = await W("package.json"), n = `${t.name ?? ""}@${t.version ?? ""}`;
@@ -5931,25 +5931,25 @@ async function $n(e = "MIT") {
5931
5931
  "--all",
5932
5932
  "--json",
5933
5933
  "--omit=dev"
5934
- ], "licenses/licenseTree.json"), await er("4️⃣"), zn("Dependencies documented.");
5934
+ ], "licenses/licenseTree.json"), await $n("4️⃣"), K("Dependencies documented.");
5935
5935
  } catch (e) {
5936
5936
  console.error("❌ Error documenting dependencies.", e), process.exit(1);
5937
5937
  }
5938
5938
  }
5939
- async function er(e) {
5940
- K(`${e} Insert licenses into 'README.md'`);
5939
+ async function $n(e) {
5940
+ q(`${e} Insert licenses into 'README.md'`);
5941
5941
  let [t, n] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), r = /* @__PURE__ */ new Map();
5942
- for (let [e, n] of Object.entries(t)) r.set(e, tr(e, n));
5942
+ for (let [e, n] of Object.entries(t)) r.set(e, er(e, n));
5943
5943
  await Promise.all(r.values().map(async (e) => {
5944
- let t = await nr(e.name, e.installedVersion);
5944
+ let t = await tr(e.name, e.installedVersion);
5945
5945
  e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
5946
5946
  }));
5947
5947
  let i = "|Name|Version|License(s)|Document|\n|-|:-:|-|-|\n";
5948
- for (let e of r.values()) i += rr(e);
5948
+ for (let e of r.values()) i += nr(e);
5949
5949
  let a = [];
5950
- n.dependencies != null && ir(n.dependencies, r, a, 0), await Rn("README.md", Wn(Wn(await Fn("./README.md"), i, Yn, Xn), a.join("\n"), Zn, Qn));
5950
+ n.dependencies != null && rr(n.dependencies, r, a, 0), await Rn("README.md", Un(Un(await Fn("./README.md"), i, Jn, Yn), a.join("\n"), Xn, Zn));
5951
5951
  }
5952
- function tr(e, t) {
5952
+ function er(e, t) {
5953
5953
  let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
5954
5954
  return {
5955
5955
  name: r,
@@ -5963,7 +5963,7 @@ function tr(e, t) {
5963
5963
  ...t.licenseFile != null && { licenseFileLink: t.licenseFile }
5964
5964
  };
5965
5965
  }
5966
- async function nr(e, t) {
5966
+ async function tr(e, t) {
5967
5967
  try {
5968
5968
  let n = await fetch(`https://registry.npmjs.org/${e.replace("/", "%2F")}`);
5969
5969
  if (n.ok) {
@@ -5981,25 +5981,25 @@ async function nr(e, t) {
5981
5981
  publishedDate: ""
5982
5982
  };
5983
5983
  }
5984
- function rr(e) {
5984
+ function nr(e) {
5985
5985
  let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
5986
5986
  return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
5987
5987
  }
5988
- function ir(e, t, n, r) {
5988
+ function rr(e, t, n, r) {
5989
5989
  let i = " ".repeat(r);
5990
5990
  for (let [a, o] of Object.entries(e)) {
5991
- let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = ar(s);
5992
- n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && ir(o.dependencies, t, n, r + 1);
5991
+ let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = ir(s);
5992
+ n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && rr(o.dependencies, t, n, r + 1);
5993
5993
  }
5994
5994
  }
5995
- function ar(e) {
5995
+ function ir(e) {
5996
5996
  if (e == null) return "";
5997
- let t = e.publishedDate ? or(e.publishedDate.split("T", 1)[0]) : "";
5997
+ let t = e.publishedDate ? ar(e.publishedDate.split("T", 1)[0]) : "";
5998
5998
  if (!(e.latestVersion !== "" && e.latestVersion !== e.installedVersion)) return t === "" ? "" : ` — ${t}`;
5999
- let n = e.latestPublishedDate ? or(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
5999
+ let n = e.latestPublishedDate ? ar(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6000
6000
  return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
6001
6001
  }
6002
- function or(e) {
6002
+ function ar(e) {
6003
6003
  if (e == null || e === "") return "n/a";
6004
6004
  let t = e.split("T", 1)[0];
6005
6005
  if (t == null || t === "") return "n/a";
@@ -6007,135 +6007,44 @@ function or(e) {
6007
6007
  return r.getDate() < n.getDate() && --i, i === 0 ? `this month: ${t}` : i === 1 ? `1 month ago: ${t}` : i <= 6 ? `${String(i)} months ago: ${t}` : `${String(i)} months ago: ${t} ⚠️`;
6008
6008
  }
6009
6009
  //#endregion
6010
- //#region src/actions/formatCode.ts
6011
- async function sr() {
6012
- try {
6013
- G("Format Code"), await Nn("1️⃣ Format", "prettier", [
6014
- "--write",
6015
- "*.json",
6016
- "*.md",
6017
- "*.ts",
6018
- ...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
6019
- ]), zn("Code formatted.");
6020
- } catch (e) {
6021
- console.error("❌ Error formatting code.", e), process.exit(1);
6022
- }
6023
- }
6024
- //#endregion
6025
- //#region src/actions/lintCode.ts
6026
- async function cr() {
6027
- try {
6028
- G("Lint Code"), await Nn("1️⃣ Lint", "eslint", ["."]), zn("Code linted.");
6029
- } catch (e) {
6030
- console.error("❌ Error linting code.", e), process.exit(1);
6031
- }
6032
- }
6033
- //#endregion
6034
- //#region src/utilities/cloudflare.ts
6035
- async function lr() {
6036
- let e = await W("config.json"), t = {
6037
- body: JSON.stringify(e),
6038
- headers: { "Content-Type": "application/json" },
6039
- method: "PUT"
6040
- }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
6041
- if (!n.ok) throw Error(await n.text());
6042
- }
6043
- async function ur(e, t) {
6044
- async function n(e, t, r) {
6045
- for (let i of r) {
6046
- let r = `${e}/${i}`, a = `${t}/${i}`;
6047
- (await Vn(r)).isDirectory() ? await n(r, a, await jn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Mn(void 0, `wrangler r2 object put "dpuse-sample-data-eu/${t}/${i}" --file="${e}/${i}" --jurisdiction=eu --remote`));
6048
- }
6049
- }
6050
- let r = await jn(`${e}/${t}/`);
6051
- await n(`${e}/${t}`, t, r);
6052
- }
6053
- async function dr(e) {
6054
- let t = e.id, n = {
6055
- body: JSON.stringify(e),
6056
- headers: { "Content-Type": "application/json" },
6057
- method: "PUT"
6058
- }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
6059
- if (!r.ok) throw Error(await r.text());
6060
- }
6061
- async function fr(e, t) {
6062
- let n = `v${e.version ?? "unknown"}`;
6063
- async function r(e, r = "") {
6064
- let i = await jn(e, { withFileTypes: !0 });
6065
- for (let a of i) {
6066
- if (a.isDirectory()) continue;
6067
- let i = `${e}/${a.name}`, o = r ? `${r}/${a.name}` : a.name, s = `${t}_${n}/${o}`.replaceAll("\\", "/"), c = a.name.endsWith(".css") ? "text/css" : "application/octet-stream", l = a.name.endsWith(".js") ? "application/javascript" : c;
6068
- console.info(`⚙️ Uploading '${o}' → '${s}'...`), await Mn(void 0, `wrangler r2 object put "${s}" --file="${i}" --content-type ${l} --jurisdiction=eu --remote`);
6069
- }
6070
- }
6071
- await r("dist");
6072
- }
6073
- //#endregion
6074
- //#region node_modules/valibot/dist/index.mjs
6075
- var pr, mr = {
6076
- lang: void 0,
6077
- message: void 0,
6078
- abortEarly: void 0,
6079
- abortPipeEarly: void 0
6080
- };
6081
- /* @__NO_SIDE_EFFECTS__ */
6082
- function hr(e) {
6083
- return !e && !pr ? mr : {
6084
- lang: e?.lang ?? pr?.lang,
6085
- message: e?.message,
6086
- abortEarly: e?.abortEarly ?? pr?.abortEarly,
6087
- abortPipeEarly: e?.abortPipeEarly ?? pr?.abortPipeEarly
6088
- };
6089
- }
6090
- /* @__NO_SIDE_EFFECTS__ */
6091
- function gr(e, t, n) {
6092
- let r = e["~run"]({ value: t }, /* @__PURE__ */ hr(n));
6093
- return {
6094
- typed: r.typed,
6095
- success: !r.issues,
6096
- output: r.value,
6097
- issues: r.issues
6098
- };
6099
- }
6100
- //#endregion
6101
6010
  //#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-DTtYL9IP.js
6102
- var _r, vr = {
6011
+ var or, sr = {
6103
6012
  lang: void 0,
6104
6013
  message: void 0,
6105
6014
  abortEarly: void 0,
6106
6015
  abortPipeEarly: void 0
6107
6016
  };
6108
6017
  /* @__NO_SIDE_EFFECTS__ */
6109
- function yr(e) {
6110
- return !e && !_r ? vr : {
6111
- lang: e?.lang ?? _r?.lang,
6018
+ function cr(e) {
6019
+ return !e && !or ? sr : {
6020
+ lang: e?.lang ?? or?.lang,
6112
6021
  message: e?.message,
6113
- abortEarly: e?.abortEarly ?? _r?.abortEarly,
6114
- abortPipeEarly: e?.abortPipeEarly ?? _r?.abortPipeEarly
6022
+ abortEarly: e?.abortEarly ?? or?.abortEarly,
6023
+ abortPipeEarly: e?.abortPipeEarly ?? or?.abortPipeEarly
6115
6024
  };
6116
6025
  }
6117
- var br;
6026
+ var lr;
6118
6027
  /* @__NO_SIDE_EFFECTS__ */
6119
- function xr(e) {
6120
- return br?.get(e);
6028
+ function ur(e) {
6029
+ return lr?.get(e);
6121
6030
  }
6122
- var Sr;
6031
+ var dr;
6123
6032
  /* @__NO_SIDE_EFFECTS__ */
6124
- function Cr(e) {
6125
- return Sr?.get(e);
6033
+ function fr(e) {
6034
+ return dr?.get(e);
6126
6035
  }
6127
- var wr;
6036
+ var pr;
6128
6037
  /* @__NO_SIDE_EFFECTS__ */
6129
- function Tr(e, t) {
6130
- return wr?.get(e)?.get(t);
6038
+ function mr(e, t) {
6039
+ return pr?.get(e)?.get(t);
6131
6040
  }
6132
6041
  /* @__NO_SIDE_EFFECTS__ */
6133
- function Er(e) {
6042
+ function hr(e) {
6134
6043
  let t = typeof e;
6135
6044
  return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
6136
6045
  }
6137
- function q(e, t, n, r, i) {
6138
- let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Er(a), c = {
6046
+ function J(e, t, n, r, i) {
6047
+ let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ hr(a), c = {
6139
6048
  kind: e.kind,
6140
6049
  type: e.type,
6141
6050
  input: a,
@@ -6148,50 +6057,50 @@ function q(e, t, n, r, i) {
6148
6057
  lang: r.lang,
6149
6058
  abortEarly: r.abortEarly,
6150
6059
  abortPipeEarly: r.abortPipeEarly
6151
- }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ Tr(e.reference, c.lang) ?? (l ? /* @__PURE__ */ Cr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ xr(c.lang);
6060
+ }, l = e.kind === "schema", u = i?.message ?? e.message ?? /* @__PURE__ */ mr(e.reference, c.lang) ?? (l ? /* @__PURE__ */ fr(c.lang) : null) ?? r.message ?? /* @__PURE__ */ ur(c.lang);
6152
6061
  u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
6153
6062
  }
6154
- var Dr = /* @__PURE__ */ new WeakMap();
6063
+ var gr = /* @__PURE__ */ new WeakMap();
6155
6064
  /* @__NO_SIDE_EFFECTS__ */
6156
- function J(e) {
6157
- let t = Dr.get(e);
6065
+ function Y(e) {
6066
+ let t = gr.get(e);
6158
6067
  return t || (t = {
6159
6068
  version: 1,
6160
6069
  vendor: "valibot",
6161
6070
  validate(t) {
6162
- return e["~run"]({ value: t }, /* @__PURE__ */ yr());
6071
+ return e["~run"]({ value: t }, /* @__PURE__ */ cr());
6163
6072
  }
6164
- }, Dr.set(e, t)), t;
6073
+ }, gr.set(e, t)), t;
6165
6074
  }
6166
6075
  /* @__NO_SIDE_EFFECTS__ */
6167
- function Or(e, t) {
6076
+ function _r(e, t) {
6168
6077
  return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
6169
6078
  }
6170
6079
  /* @__NO_SIDE_EFFECTS__ */
6171
- function kr(e, t) {
6080
+ function vr(e, t) {
6172
6081
  let n = [...new Set(e)];
6173
6082
  return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
6174
6083
  }
6175
6084
  /* @__NO_SIDE_EFFECTS__ */
6176
- function Ar(e, t, n) {
6085
+ function yr(e, t, n) {
6177
6086
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
6178
6087
  }
6179
6088
  /* @__NO_SIDE_EFFECTS__ */
6180
- function jr(e, t, n) {
6089
+ function br(e, t, n) {
6181
6090
  return typeof e.default == "function" ? e.default(t, n) : e.default;
6182
6091
  }
6183
6092
  /* @__NO_SIDE_EFFECTS__ */
6184
- function Y(e, t) {
6093
+ function X(e, t) {
6185
6094
  return {
6186
6095
  kind: "schema",
6187
6096
  type: "array",
6188
- reference: Y,
6097
+ reference: X,
6189
6098
  expects: "Array",
6190
6099
  async: !1,
6191
6100
  item: e,
6192
6101
  message: t,
6193
6102
  get "~standard"() {
6194
- return /* @__PURE__ */ J(this);
6103
+ return /* @__PURE__ */ Y(this);
6195
6104
  },
6196
6105
  "~run"(e, t) {
6197
6106
  let n = e.value;
@@ -6215,93 +6124,93 @@ function Y(e, t) {
6215
6124
  }
6216
6125
  a.typed || (e.typed = !1), e.value.push(a.value);
6217
6126
  }
6218
- } else q(this, "type", e, t);
6127
+ } else J(this, "type", e, t);
6219
6128
  return e;
6220
6129
  }
6221
6130
  };
6222
6131
  }
6223
6132
  /* @__NO_SIDE_EFFECTS__ */
6224
- function Mr(e) {
6133
+ function xr(e) {
6225
6134
  return {
6226
6135
  kind: "schema",
6227
6136
  type: "boolean",
6228
- reference: Mr,
6137
+ reference: xr,
6229
6138
  expects: "boolean",
6230
6139
  async: !1,
6231
6140
  message: e,
6232
6141
  get "~standard"() {
6233
- return /* @__PURE__ */ J(this);
6142
+ return /* @__PURE__ */ Y(this);
6234
6143
  },
6235
6144
  "~run"(e, t) {
6236
- return typeof e.value == "boolean" ? e.typed = !0 : q(this, "type", e, t), e;
6145
+ return typeof e.value == "boolean" ? e.typed = !0 : J(this, "type", e, t), e;
6237
6146
  }
6238
6147
  };
6239
6148
  }
6240
6149
  /* @__NO_SIDE_EFFECTS__ */
6241
- function Nr(e, t) {
6150
+ function Sr(e, t) {
6242
6151
  return {
6243
6152
  kind: "schema",
6244
6153
  type: "literal",
6245
- reference: Nr,
6246
- expects: /* @__PURE__ */ Er(e),
6154
+ reference: Sr,
6155
+ expects: /* @__PURE__ */ hr(e),
6247
6156
  async: !1,
6248
6157
  literal: e,
6249
6158
  message: t,
6250
6159
  get "~standard"() {
6251
- return /* @__PURE__ */ J(this);
6160
+ return /* @__PURE__ */ Y(this);
6252
6161
  },
6253
6162
  "~run"(e, t) {
6254
- return e.value === this.literal ? e.typed = !0 : q(this, "type", e, t), e;
6163
+ return e.value === this.literal ? e.typed = !0 : J(this, "type", e, t), e;
6255
6164
  }
6256
6165
  };
6257
6166
  }
6258
6167
  /* @__NO_SIDE_EFFECTS__ */
6259
- function X(e, t) {
6168
+ function Z(e, t) {
6260
6169
  return {
6261
6170
  kind: "schema",
6262
6171
  type: "nullable",
6263
- reference: X,
6172
+ reference: Z,
6264
6173
  expects: `(${e.expects} | null)`,
6265
6174
  async: !1,
6266
6175
  wrapped: e,
6267
6176
  default: t,
6268
6177
  get "~standard"() {
6269
- return /* @__PURE__ */ J(this);
6178
+ return /* @__PURE__ */ Y(this);
6270
6179
  },
6271
6180
  "~run"(e, t) {
6272
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ jr(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6181
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ br(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6273
6182
  }
6274
6183
  };
6275
6184
  }
6276
6185
  /* @__NO_SIDE_EFFECTS__ */
6277
- function Pr(e) {
6186
+ function Cr(e) {
6278
6187
  return {
6279
6188
  kind: "schema",
6280
6189
  type: "number",
6281
- reference: Pr,
6190
+ reference: Cr,
6282
6191
  expects: "number",
6283
6192
  async: !1,
6284
6193
  message: e,
6285
6194
  get "~standard"() {
6286
- return /* @__PURE__ */ J(this);
6195
+ return /* @__PURE__ */ Y(this);
6287
6196
  },
6288
6197
  "~run"(e, t) {
6289
- return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : q(this, "type", e, t), e;
6198
+ return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : J(this, "type", e, t), e;
6290
6199
  }
6291
6200
  };
6292
6201
  }
6293
6202
  /* @__NO_SIDE_EFFECTS__ */
6294
- function Z(e, t) {
6203
+ function Q(e, t) {
6295
6204
  return {
6296
6205
  kind: "schema",
6297
6206
  type: "object",
6298
- reference: Z,
6207
+ reference: Q,
6299
6208
  expects: "Object",
6300
6209
  async: !1,
6301
6210
  entries: e,
6302
6211
  message: t,
6303
6212
  get "~standard"() {
6304
- return /* @__PURE__ */ J(this);
6213
+ return /* @__PURE__ */ Y(this);
6305
6214
  },
6306
6215
  "~run"(e, t) {
6307
6216
  let n = e.value;
@@ -6310,7 +6219,7 @@ function Z(e, t) {
6310
6219
  for (let r in this.entries) {
6311
6220
  let i = this.entries[r];
6312
6221
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
6313
- let a = r in n ? n[r] : /* @__PURE__ */ jr(i), o = i["~run"]({ value: a }, t);
6222
+ let a = r in n ? n[r] : /* @__PURE__ */ br(i), o = i["~run"]({ value: a }, t);
6314
6223
  if (o.issues) {
6315
6224
  let i = {
6316
6225
  type: "object",
@@ -6326,8 +6235,8 @@ function Z(e, t) {
6326
6235
  }
6327
6236
  }
6328
6237
  o.typed || (e.typed = !1), e.value[r] = o.value;
6329
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Ar(i);
6330
- else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (q(this, "key", e, t, {
6238
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ yr(i);
6239
+ else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (J(this, "key", e, t, {
6331
6240
  input: void 0,
6332
6241
  expected: `"${r}"`,
6333
6242
  path: [{
@@ -6339,48 +6248,48 @@ function Z(e, t) {
6339
6248
  }]
6340
6249
  }), t.abortEarly)) break;
6341
6250
  }
6342
- } else q(this, "type", e, t);
6251
+ } else J(this, "type", e, t);
6343
6252
  return e;
6344
6253
  }
6345
6254
  };
6346
6255
  }
6347
6256
  /* @__NO_SIDE_EFFECTS__ */
6348
- function Q(e, t) {
6257
+ function wr(e, t) {
6349
6258
  return {
6350
6259
  kind: "schema",
6351
6260
  type: "optional",
6352
- reference: Q,
6261
+ reference: wr,
6353
6262
  expects: `(${e.expects} | undefined)`,
6354
6263
  async: !1,
6355
6264
  wrapped: e,
6356
6265
  default: t,
6357
6266
  get "~standard"() {
6358
- return /* @__PURE__ */ J(this);
6267
+ return /* @__PURE__ */ Y(this);
6359
6268
  },
6360
6269
  "~run"(e, t) {
6361
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ jr(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6270
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ br(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6362
6271
  }
6363
6272
  };
6364
6273
  }
6365
6274
  /* @__NO_SIDE_EFFECTS__ */
6366
- function Fr(e, t, n) {
6275
+ function Tr(e, t, n) {
6367
6276
  return {
6368
6277
  kind: "schema",
6369
6278
  type: "record",
6370
- reference: Fr,
6279
+ reference: Tr,
6371
6280
  expects: "Object",
6372
6281
  async: !1,
6373
6282
  key: e,
6374
6283
  value: t,
6375
6284
  message: n,
6376
6285
  get "~standard"() {
6377
- return /* @__PURE__ */ J(this);
6286
+ return /* @__PURE__ */ Y(this);
6378
6287
  },
6379
6288
  "~run"(e, t) {
6380
6289
  let n = e.value;
6381
6290
  if (n && typeof n == "object") {
6382
6291
  e.typed = !0, e.value = {};
6383
- for (let r in n) if (/* @__PURE__ */ Or(n, r)) {
6292
+ for (let r in n) if (/* @__PURE__ */ _r(n, r)) {
6384
6293
  let i = n[r], a = this.key["~run"]({ value: r }, t);
6385
6294
  if (a.issues) {
6386
6295
  let o = {
@@ -6413,7 +6322,7 @@ function Fr(e, t, n) {
6413
6322
  }
6414
6323
  (!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
6415
6324
  }
6416
- } else q(this, "type", e, t);
6325
+ } else J(this, "type", e, t);
6417
6326
  return e;
6418
6327
  }
6419
6328
  };
@@ -6428,32 +6337,32 @@ function $(e) {
6428
6337
  async: !1,
6429
6338
  message: e,
6430
6339
  get "~standard"() {
6431
- return /* @__PURE__ */ J(this);
6340
+ return /* @__PURE__ */ Y(this);
6432
6341
  },
6433
6342
  "~run"(e, t) {
6434
- return typeof e.value == "string" ? e.typed = !0 : q(this, "type", e, t), e;
6343
+ return typeof e.value == "string" ? e.typed = !0 : J(this, "type", e, t), e;
6435
6344
  }
6436
6345
  };
6437
6346
  }
6438
6347
  /* @__NO_SIDE_EFFECTS__ */
6439
- function Ir(e) {
6348
+ function Er(e) {
6440
6349
  let t;
6441
6350
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
6442
6351
  else t = n.issues;
6443
6352
  return t;
6444
6353
  }
6445
6354
  /* @__NO_SIDE_EFFECTS__ */
6446
- function Lr(e, t) {
6355
+ function Dr(e, t) {
6447
6356
  return {
6448
6357
  kind: "schema",
6449
6358
  type: "union",
6450
- reference: Lr,
6451
- expects: /* @__PURE__ */ kr(e.map((e) => e.expects), "|"),
6359
+ reference: Dr,
6360
+ expects: /* @__PURE__ */ vr(e.map((e) => e.expects), "|"),
6452
6361
  async: !1,
6453
6362
  options: e,
6454
6363
  message: t,
6455
6364
  get "~standard"() {
6456
- return /* @__PURE__ */ J(this);
6365
+ return /* @__PURE__ */ Y(this);
6457
6366
  },
6458
6367
  "~run"(e, t) {
6459
6368
  let n, r, i;
@@ -6469,24 +6378,24 @@ function Lr(e, t) {
6469
6378
  if (n) return n;
6470
6379
  if (r) {
6471
6380
  if (r.length === 1) return r[0];
6472
- q(this, "type", e, t, { issues: /* @__PURE__ */ Ir(r) }), e.typed = !0;
6381
+ J(this, "type", e, t, { issues: /* @__PURE__ */ Er(r) }), e.typed = !0;
6473
6382
  } else if (i?.length === 1) return i[0];
6474
- else q(this, "type", e, t, { issues: /* @__PURE__ */ Ir(i) });
6383
+ else J(this, "type", e, t, { issues: /* @__PURE__ */ Er(i) });
6475
6384
  return e;
6476
6385
  }
6477
6386
  };
6478
6387
  }
6479
- var Rr = (e) => /* @__PURE__ */ Lr(e.map((e) => /* @__PURE__ */ Nr(e))), zr = /* @__PURE__ */ Z({
6388
+ var Or = (e) => /* @__PURE__ */ Dr(e.map((e) => /* @__PURE__ */ Sr(e))), kr = /* @__PURE__ */ Q({
6480
6389
  en: /* @__PURE__ */ $(),
6481
6390
  es: /* @__PURE__ */ $()
6482
- }), Br = /* @__PURE__ */ Z({
6483
- en: /* @__PURE__ */ Q(/* @__PURE__ */ $()),
6484
- es: /* @__PURE__ */ Q(/* @__PURE__ */ $())
6485
- }), Vr = /* @__PURE__ */ Z({
6486
- en: /* @__PURE__ */ Q(/* @__PURE__ */ Y(/* @__PURE__ */ $())),
6487
- es: /* @__PURE__ */ Q(/* @__PURE__ */ Y(/* @__PURE__ */ $()))
6391
+ }), Ar = /* @__PURE__ */ Q({
6392
+ en: /* @__PURE__ */ wr(/* @__PURE__ */ $()),
6393
+ es: /* @__PURE__ */ wr(/* @__PURE__ */ $())
6394
+ }), jr = /* @__PURE__ */ Q({
6395
+ en: /* @__PURE__ */ wr(/* @__PURE__ */ X(/* @__PURE__ */ $())),
6396
+ es: /* @__PURE__ */ wr(/* @__PURE__ */ X(/* @__PURE__ */ $()))
6488
6397
  });
6489
- Rr([
6398
+ Or([
6490
6399
  "app",
6491
6400
  "connector",
6492
6401
  "connectorConnection",
@@ -6511,12 +6420,12 @@ Rr([
6511
6420
  "presenterPresentation",
6512
6421
  "tool"
6513
6422
  ]);
6514
- var Hr = Rr([
6423
+ var Mr = Or([
6515
6424
  "amber",
6516
6425
  "green",
6517
6426
  "red",
6518
6427
  "other"
6519
- ]), Ur = Rr([
6428
+ ]), Nr = Or([
6520
6429
  "alpha",
6521
6430
  "beta",
6522
6431
  "generalAvailability",
@@ -6526,31 +6435,31 @@ var Hr = Rr([
6526
6435
  "releaseCandidate",
6527
6436
  "unavailable",
6528
6437
  "underReview"
6529
- ]), Wr = /* @__PURE__ */ Z({
6530
- color: Hr,
6438
+ ]), Pr = /* @__PURE__ */ Q({
6439
+ color: Mr,
6531
6440
  label: /* @__PURE__ */ $()
6532
- }), Gr = /* @__PURE__ */ Z({
6441
+ }), Fr = /* @__PURE__ */ Q({
6533
6442
  id: /* @__PURE__ */ $(),
6534
- label: Br,
6535
- description: Vr,
6536
- icon: /* @__PURE__ */ X(/* @__PURE__ */ $()),
6537
- iconDark: /* @__PURE__ */ X(/* @__PURE__ */ $()),
6538
- iconNeutral: /* @__PURE__ */ X(/* @__PURE__ */ $()),
6539
- order: /* @__PURE__ */ Pr(),
6443
+ label: Ar,
6444
+ description: jr,
6445
+ icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6446
+ iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6447
+ iconNeutral: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6448
+ order: /* @__PURE__ */ Cr(),
6540
6449
  path: /* @__PURE__ */ $()
6541
- }), Kr = {
6450
+ }), Ir = {
6542
6451
  id: /* @__PURE__ */ $(),
6543
- label: Br,
6544
- description: Vr,
6545
- firstCreatedAt: /* @__PURE__ */ X(/* @__PURE__ */ Pr()),
6546
- icon: /* @__PURE__ */ X(/* @__PURE__ */ $()),
6547
- iconDark: /* @__PURE__ */ X(/* @__PURE__ */ $()),
6548
- iconNeutral: /* @__PURE__ */ X(/* @__PURE__ */ $()),
6549
- lastUpdatedAt: /* @__PURE__ */ X(/* @__PURE__ */ Pr()),
6550
- status: /* @__PURE__ */ X(Wr),
6551
- statusId: /* @__PURE__ */ X(Ur)
6452
+ label: Ar,
6453
+ description: jr,
6454
+ firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Cr()),
6455
+ icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6456
+ iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6457
+ iconNeutral: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6458
+ lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Cr()),
6459
+ status: /* @__PURE__ */ Z(Pr),
6460
+ statusId: /* @__PURE__ */ Z(Nr)
6552
6461
  };
6553
- ({ ...Kr }), Rr([
6462
+ ({ ...Ir }), Or([
6554
6463
  "app",
6555
6464
  "engine",
6556
6465
  "connector",
@@ -6560,32 +6469,32 @@ var Hr = Rr([
6560
6469
  ]);
6561
6470
  //#endregion
6562
6471
  //#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-CMPetJQa.js
6563
- var qr = {
6564
- ...Kr,
6472
+ var Lr = {
6473
+ ...Ir,
6565
6474
  version: /* @__PURE__ */ $()
6566
6475
  };
6567
- ({ ...qr });
6476
+ ({ ...Lr });
6568
6477
  //#endregion
6569
6478
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
6570
- var Jr = Rr([
6479
+ var Rr = Or([
6571
6480
  "application",
6572
6481
  "curatedDataset",
6573
6482
  "database",
6574
6483
  "fileStore"
6575
- ]), Yr = /* @__PURE__ */ Z({ label: zr }), Xr = /* @__PURE__ */ Z({
6576
- authMethodId: Rr([
6484
+ ]), zr = /* @__PURE__ */ Q({ label: kr }), Br = /* @__PURE__ */ Q({
6485
+ authMethodId: Or([
6577
6486
  "apiKey",
6578
6487
  "disabled",
6579
6488
  "oAuth2",
6580
6489
  "none"
6581
6490
  ]),
6582
- activeConnectionCount: /* @__PURE__ */ Q(/* @__PURE__ */ Pr()),
6583
- canDescribe: /* @__PURE__ */ Q(/* @__PURE__ */ Mr()),
6584
- id: /* @__PURE__ */ Q(/* @__PURE__ */ $()),
6585
- label: /* @__PURE__ */ Q(zr),
6586
- maxConnectionCount: /* @__PURE__ */ X(/* @__PURE__ */ Pr()),
6587
- params: /* @__PURE__ */ Q(/* @__PURE__ */ Y(/* @__PURE__ */ Fr(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6588
- }), Zr = Rr([
6491
+ activeConnectionCount: /* @__PURE__ */ wr(/* @__PURE__ */ Cr()),
6492
+ canDescribe: /* @__PURE__ */ wr(/* @__PURE__ */ xr()),
6493
+ id: /* @__PURE__ */ wr(/* @__PURE__ */ $()),
6494
+ label: /* @__PURE__ */ wr(kr),
6495
+ maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ Cr()),
6496
+ params: /* @__PURE__ */ wr(/* @__PURE__ */ X(/* @__PURE__ */ Tr(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6497
+ }), Vr = Or([
6589
6498
  "abortOperation",
6590
6499
  "auditObjectContent",
6591
6500
  "createObject",
@@ -6600,41 +6509,168 @@ var Jr = Rr([
6600
6509
  "retrieveChunks",
6601
6510
  "retrieveRecords",
6602
6511
  "upsertRecords"
6603
- ]), Qr = /* @__PURE__ */ Z({
6604
- ...qr,
6605
- typeId: /* @__PURE__ */ Nr("connector"),
6606
- category: /* @__PURE__ */ X(Yr),
6607
- categoryId: Jr,
6608
- implementations: /* @__PURE__ */ Fr(/* @__PURE__ */ $(), Xr),
6609
- operations: /* @__PURE__ */ Y(Zr),
6610
- vendorAccountURL: /* @__PURE__ */ X(/* @__PURE__ */ $()),
6611
- vendorDocumentationURL: /* @__PURE__ */ X(/* @__PURE__ */ $()),
6612
- vendorHomeURL: /* @__PURE__ */ X(/* @__PURE__ */ $())
6613
- }), $r = /* @__PURE__ */ Z({
6614
- ...Kr,
6615
- typeId: /* @__PURE__ */ Nr("contextModelGroup"),
6616
- modelRefs: /* @__PURE__ */ Y(Gr),
6617
- order: /* @__PURE__ */ Pr()
6618
- }), ei = Rr(["listContextFocuses"]), ti = /* @__PURE__ */ Z({
6619
- ...qr,
6620
- typeId: /* @__PURE__ */ Nr("context"),
6621
- models: /* @__PURE__ */ Y($r),
6622
- operations: /* @__PURE__ */ Y(ei)
6623
- }), ni = Rr([
6512
+ ]), Hr = /* @__PURE__ */ Q({
6513
+ ...Lr,
6514
+ typeId: /* @__PURE__ */ Sr("connector"),
6515
+ category: /* @__PURE__ */ Z(zr),
6516
+ categoryId: Rr,
6517
+ implementations: /* @__PURE__ */ Tr(/* @__PURE__ */ $(), Br),
6518
+ operations: /* @__PURE__ */ X(Vr),
6519
+ vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6520
+ vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6521
+ vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $())
6522
+ }), Ur = {
6523
+ abortOperation: "Abort Operation",
6524
+ auditObjectContent: "Audit Object Content",
6525
+ createObject: "Create Object",
6526
+ describeConnection: "Describe Connection",
6527
+ dropObject: "Drop Object",
6528
+ findObject: "Find Object",
6529
+ getReadableStream: "Get Readable Stream",
6530
+ getRecord: "Get Record",
6531
+ listNodes: "List Nodes",
6532
+ previewObject: "Preview Object",
6533
+ removeRecords: "Remove Records",
6534
+ retrieveChunks: "Retrieve Chunks",
6535
+ retrieveRecords: "Retrieve Records",
6536
+ upsertRecords: "Upsert Records"
6537
+ };
6538
+ function Wr(e) {
6539
+ let t = new Set(e), n = "| Operation | Supported |\n";
6540
+ n += "| --------- | --------- |\n";
6541
+ for (let e of Object.keys(Ur)) n += `| ${Ur[e]} | ${t.has(e) ? "✓" : ""} |\n`;
6542
+ return n;
6543
+ }
6544
+ //#endregion
6545
+ //#region src/actions/documentOperations.ts
6546
+ var Gr = "<!-- CONNECTOR_OPERATIONS_START -->", Kr = "<!-- CONNECTOR_OPERATIONS_END -->";
6547
+ async function qr() {
6548
+ try {
6549
+ G("Document Operations"), q("1️⃣ Insert operations table into 'README.md'");
6550
+ let e = Wr((await W("config.json")).operations ?? []);
6551
+ await Rn("README.md", Un(await Fn("./README.md"), e, Gr, Kr)), K("Operations documented.");
6552
+ } catch (e) {
6553
+ console.error("❌ Error documenting operations.", e), process.exit(1);
6554
+ }
6555
+ }
6556
+ //#endregion
6557
+ //#region src/actions/formatCode.ts
6558
+ async function Jr() {
6559
+ try {
6560
+ G("Format Code"), await Nn("1️⃣ Format", "prettier", [
6561
+ "--write",
6562
+ "*.json",
6563
+ "*.md",
6564
+ "*.ts",
6565
+ ...["app", "src"].filter((t) => e(t)).map((e) => `${e}/**`)
6566
+ ]), K("Code formatted.");
6567
+ } catch (e) {
6568
+ console.error("❌ Error formatting code.", e), process.exit(1);
6569
+ }
6570
+ }
6571
+ //#endregion
6572
+ //#region src/actions/lintCode.ts
6573
+ async function Yr() {
6574
+ try {
6575
+ G("Lint Code"), await Nn("1️⃣ Lint", "eslint", ["."]), K("Code linted.");
6576
+ } catch (e) {
6577
+ console.error("❌ Error linting code.", e), process.exit(1);
6578
+ }
6579
+ }
6580
+ //#endregion
6581
+ //#region src/utilities/cloudflare.ts
6582
+ async function Xr() {
6583
+ let e = await W("config.json"), t = {
6584
+ body: JSON.stringify(e),
6585
+ headers: { "Content-Type": "application/json" },
6586
+ method: "PUT"
6587
+ }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
6588
+ if (!n.ok) throw Error(await n.text());
6589
+ }
6590
+ async function Zr(e, t) {
6591
+ async function n(e, t, r) {
6592
+ for (let i of r) {
6593
+ let r = `${e}/${i}`, a = `${t}/${i}`;
6594
+ (await Bn(r)).isDirectory() ? await n(r, a, await jn(r)) : (console.info(`⚙️ Uploading '${e}/${i}'...`), await Mn(void 0, `wrangler r2 object put "dpuse-sample-data-eu/${t}/${i}" --file="${e}/${i}" --jurisdiction=eu --remote`));
6595
+ }
6596
+ }
6597
+ let r = await jn(`${e}/${t}/`);
6598
+ await n(`${e}/${t}`, t, r);
6599
+ }
6600
+ async function Qr(e) {
6601
+ let t = e.id, n = {
6602
+ body: JSON.stringify(e),
6603
+ headers: { "Content-Type": "application/json" },
6604
+ method: "PUT"
6605
+ }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
6606
+ if (!r.ok) throw Error(await r.text());
6607
+ }
6608
+ async function $r(e, t) {
6609
+ let n = `v${e.version ?? "unknown"}`;
6610
+ async function r(e, r = "") {
6611
+ let i = await jn(e, { withFileTypes: !0 });
6612
+ for (let a of i) {
6613
+ if (a.isDirectory()) continue;
6614
+ let i = `${e}/${a.name}`, o = r ? `${r}/${a.name}` : a.name, s = `${t}_${n}/${o}`.replaceAll("\\", "/"), c = a.name.endsWith(".css") ? "text/css" : "application/octet-stream", l = a.name.endsWith(".js") ? "application/javascript" : c;
6615
+ console.info(`⚙️ Uploading '${o}' → '${s}'...`), await Mn(void 0, `wrangler r2 object put "${s}" --file="${i}" --content-type ${l} --jurisdiction=eu --remote`);
6616
+ }
6617
+ }
6618
+ await r("dist");
6619
+ }
6620
+ //#endregion
6621
+ //#region node_modules/valibot/dist/index.mjs
6622
+ var ei, ti = {
6623
+ lang: void 0,
6624
+ message: void 0,
6625
+ abortEarly: void 0,
6626
+ abortPipeEarly: void 0
6627
+ };
6628
+ /* @__NO_SIDE_EFFECTS__ */
6629
+ function ni(e) {
6630
+ return !e && !ei ? ti : {
6631
+ lang: e?.lang ?? ei?.lang,
6632
+ message: e?.message,
6633
+ abortEarly: e?.abortEarly ?? ei?.abortEarly,
6634
+ abortPipeEarly: e?.abortPipeEarly ?? ei?.abortPipeEarly
6635
+ };
6636
+ }
6637
+ /* @__NO_SIDE_EFFECTS__ */
6638
+ function ri(e, t, n) {
6639
+ let r = e["~run"]({ value: t }, /* @__PURE__ */ ni(n));
6640
+ return {
6641
+ typed: r.typed,
6642
+ success: !r.issues,
6643
+ output: r.value,
6644
+ issues: r.issues
6645
+ };
6646
+ }
6647
+ //#endregion
6648
+ //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleContext.es.js
6649
+ var ii = /* @__PURE__ */ Q({
6650
+ ...Ir,
6651
+ typeId: /* @__PURE__ */ Sr("contextModelGroup"),
6652
+ modelRefs: /* @__PURE__ */ X(Fr),
6653
+ order: /* @__PURE__ */ Cr()
6654
+ }), ai = Or(["listContextFocuses"]), oi = /* @__PURE__ */ Q({
6655
+ ...Lr,
6656
+ typeId: /* @__PURE__ */ Sr("context"),
6657
+ models: /* @__PURE__ */ X(ii),
6658
+ operations: /* @__PURE__ */ X(ai)
6659
+ }), si = Or([
6624
6660
  "list",
6625
6661
  "render",
6626
6662
  "setColorMode"
6627
- ]), ri = /* @__PURE__ */ Z({
6628
- ...qr,
6629
- typeId: /* @__PURE__ */ Nr("presenter"),
6630
- presentations: /* @__PURE__ */ Y(Gr),
6631
- operations: /* @__PURE__ */ Y(ni)
6632
- }), ii = /* @__PURE__ */ new Set([
6663
+ ]), ci = /* @__PURE__ */ Q({
6664
+ ...Lr,
6665
+ typeId: /* @__PURE__ */ Sr("presenter"),
6666
+ presentations: /* @__PURE__ */ X(Fr),
6667
+ operations: /* @__PURE__ */ X(si)
6668
+ }), li = /* @__PURE__ */ new Set([
6633
6669
  "createObject",
6634
6670
  "dropObject",
6635
6671
  "removeRecords",
6636
6672
  "upsertRecords"
6637
- ]), ai = /* @__PURE__ */ new Set([
6673
+ ]), ui = /* @__PURE__ */ new Set([
6638
6674
  "auditObjectContent",
6639
6675
  "findObjectFolderPath",
6640
6676
  "getReadableStream",
@@ -6644,30 +6680,30 @@ var Jr = Rr([
6644
6680
  "retrieveChunks",
6645
6681
  "retrieveRecords"
6646
6682
  ]);
6647
- async function oi() {
6683
+ async function di() {
6648
6684
  try {
6649
- G("Build Project"), await Nn("1️⃣ Bundle project", "vite", ["build"]), zn("Project built.");
6685
+ G("Build Project"), await Nn("1️⃣ Bundle project", "vite", ["build"]), K("Project built.");
6650
6686
  } catch (e) {
6651
6687
  console.error("❌ Error building project.", e), process.exit(1);
6652
6688
  }
6653
6689
  }
6654
- async function si() {
6690
+ async function fi() {
6655
6691
  try {
6656
6692
  G("Release Project");
6657
6693
  let e = await W("package.json"), t = await W("config.json");
6658
- await gi("1️⃣", e);
6659
- let n = Bn(t.id);
6694
+ await xi("1️⃣", e);
6695
+ let n = zn(t.id);
6660
6696
  switch (n.typeId) {
6661
6697
  case "connector":
6662
- t = await li("2️⃣", e);
6698
+ t = await mi("2️⃣", e);
6663
6699
  break;
6664
6700
  case "context":
6665
- t = await ui("2️⃣", e);
6701
+ t = await hi("2️⃣", e);
6666
6702
  break;
6667
6703
  case "presenter":
6668
- t = await di("2️⃣", e);
6704
+ t = await gi("2️⃣", e);
6669
6705
  break;
6670
- default: t = await ci("2️⃣", e);
6706
+ default: t = await pi("2️⃣", e);
6671
6707
  }
6672
6708
  if (await Nn("3️⃣ Bundle project", "vite", ["build"]), await Mn("4️⃣ Stage changes", "git", ["add", "."]), await Mn("5️⃣ Commit changes", "git", [
6673
6709
  "commit",
@@ -6677,13 +6713,13 @@ async function si() {
6677
6713
  "push",
6678
6714
  "origin",
6679
6715
  "main:main"
6680
- ]), n.typeId === "app") K("7️⃣ Register module"), await lr();
6681
- else if (n.typeId === "engine") K("7️⃣ Register module"), await fr(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await dr(t);
6682
- else if (n.uploadGroupName === void 0) K("7️⃣ Registration NOT required.");
6716
+ ]), n.typeId === "app") q("7️⃣ Register module"), await Xr();
6717
+ else if (n.typeId === "engine") q("7️⃣ Register module"), await $r(e, `dpuse-engine-eu/${n.uploadGroupName ?? "unknown"}`), await Qr(t);
6718
+ else if (n.uploadGroupName === void 0) q("7️⃣ Registration NOT required.");
6683
6719
  else {
6684
- K("7️⃣ Register module");
6720
+ q("7️⃣ Register module");
6685
6721
  let r = t.id.split("-").slice(2).join("-");
6686
- await fr(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await dr(t);
6722
+ await $r(e, `dpuse-engine-eu/${n.uploadGroupName}/${r}`), await Qr(t);
6687
6723
  }
6688
6724
  if (n.isPublished) {
6689
6725
  let e = ".npmrc";
@@ -6696,59 +6732,59 @@ async function si() {
6696
6732
  } finally {
6697
6733
  await In(e);
6698
6734
  }
6699
- } else K(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
6700
- zn(`Project version '${e.version ?? "unknown"}' released.`);
6735
+ } else q(`8️⃣ Publishing NOT required for package with type identifier of '${n.typeId}'.`);
6736
+ K(`Project version '${e.version ?? "unknown"}' released.`);
6701
6737
  } catch (e) {
6702
6738
  console.error("❌ Error releasing project.", e), process.exit(1);
6703
6739
  }
6704
6740
  }
6705
- async function ci(e, t) {
6706
- K(`${e} Build project configuration`);
6741
+ async function pi(e, t) {
6742
+ q(`${e} Build project configuration`);
6707
6743
  let n = await W("config.json");
6708
6744
  return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), await Ln("config.json", n), n;
6709
6745
  }
6710
- async function li(e, t) {
6711
- K(`${e} Build connector project configuration`);
6712
- let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ gr(Qr, n);
6746
+ async function mi(e, t) {
6747
+ q(`${e} Build connector project configuration`);
6748
+ let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ ri(Hr, n);
6713
6749
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
6714
- let a = Hn(r);
6715
- return await pi(t, n, a, fi(a));
6750
+ let a = Vn(r);
6751
+ return await vi(t, n, a, _i(a));
6716
6752
  }
6717
- async function ui(e, t) {
6718
- K(`${e} Build context project configuration`);
6719
- let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ gr(ti, n);
6753
+ async function hi(e, t) {
6754
+ q(`${e} Build context project configuration`);
6755
+ let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ ri(oi, n);
6720
6756
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
6721
- return await pi(t, n, Hn(r));
6757
+ return await vi(t, n, Vn(r));
6722
6758
  }
6723
- async function di(e, t) {
6724
- K(`${e} Build presenter project configuration`);
6725
- let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ gr(ri, n);
6759
+ async function gi(e, t) {
6760
+ q(`${e} Build presenter project configuration`);
6761
+ let [n, r] = await Promise.all([W("config.json"), Fn("src/index.ts")]), i = /* @__PURE__ */ ri(ci, n);
6726
6762
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid.");
6727
- return await pi(t, n, Hn(r));
6763
+ return await vi(t, n, Vn(r));
6728
6764
  }
6729
- function fi(e) {
6765
+ function _i(e) {
6730
6766
  let t = !1, n = !1;
6731
- for (let r of e) ai.has(r) && (t = !0), ii.has(r) && (n = !0);
6767
+ for (let r of e) ui.has(r) && (t = !0), li.has(r) && (n = !0);
6732
6768
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
6733
6769
  }
6734
- async function pi(e, t, n, r) {
6770
+ async function vi(e, t, n, r) {
6735
6771
  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 Ln("config.json", t), t;
6736
6772
  }
6737
- async function mi() {
6773
+ async function yi() {
6738
6774
  try {
6739
6775
  G("Synchronise Project with GitHub");
6740
6776
  let e = await W("package.json"), t = await W("config.json");
6741
- switch (await gi("1️⃣", e), Bn(t.id).typeId) {
6777
+ switch (await xi("1️⃣", e), zn(t.id).typeId) {
6742
6778
  case "connector":
6743
- await li("2️⃣", e);
6779
+ await mi("2️⃣", e);
6744
6780
  break;
6745
6781
  case "context":
6746
- await ui("2️⃣", e);
6782
+ await hi("2️⃣", e);
6747
6783
  break;
6748
6784
  case "presenter":
6749
- await di("2️⃣", e);
6785
+ await gi("2️⃣", e);
6750
6786
  break;
6751
- default: await ci("2️⃣", e);
6787
+ default: await pi("2️⃣", e);
6752
6788
  }
6753
6789
  await Mn("3️⃣ Stage changes", "git", ["add", "."]), await Mn("4️⃣ Commit changes", "git", [
6754
6790
  "commit",
@@ -6758,20 +6794,20 @@ async function mi() {
6758
6794
  "push",
6759
6795
  "origin",
6760
6796
  "main:main"
6761
- ]), zn(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
6797
+ ]), K(`Project version '${e.version ?? "unknown"}' synchronised with GitHub.`);
6762
6798
  } catch (e) {
6763
6799
  console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
6764
6800
  }
6765
6801
  }
6766
- function hi() {
6802
+ function bi() {
6767
6803
  try {
6768
6804
  G("Test Project"), console.error("\n❌ No tests implemented.\n");
6769
6805
  } catch (e) {
6770
6806
  console.error("❌ Error testing project.", e), process.exit(1);
6771
6807
  }
6772
6808
  }
6773
- async function gi(e, t, n = "./") {
6774
- if (K(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
6809
+ async function xi(e, t, n = "./") {
6810
+ if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
6775
6811
  else {
6776
6812
  let e = t.version, n = t.version.split(".");
6777
6813
  t.version = `${n[0] ?? "unknown"}.${n[1] ?? "unknown"}.${String(Number(n[2]) + 1)}`, console.info(`Project version bumped from '${e}' to '${t.version}'.`);
@@ -6779,6 +6815,6 @@ async function gi(e, t, n = "./") {
6779
6815
  await Ln(`${n}package.json`, t);
6780
6816
  }
6781
6817
  //#endregion
6782
- export { Gn as auditDependencies, oi as buildProject, Kn as checkConfigFiles, Jn as checkDependencies, $n as documentDependencies, sr as formatCode, cr as lintCode, si as releaseProject, mi as syncProjectWithGitHub, hi as testProject, ur as uploadDirectoryToR2 };
6818
+ export { Wn as auditDependencies, di as buildProject, Gn as checkConfigFiles, qn as checkDependencies, Qn as documentDependencies, qr as documentOperations, Jr as formatCode, Yr as lintCode, fi as releaseProject, yi as syncProjectWithGitHub, bi as testProject, Zr as uploadDirectoryToR2 };
6783
6819
 
6784
6820
  //# sourceMappingURL=dpuse-development.es.js.map