@dpuse/dpuse-development 0.3.750 → 0.3.751

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.
@@ -5903,19 +5903,20 @@ async function Jn() {
5903
5903
  }
5904
5904
  //#endregion
5905
5905
  //#region src/actions/checkConfigFiles.ts
5906
- async function Yn() {
5906
+ var Yn = "@dpuse/dpuse-development/prettierrc", Xn = "dpuse-development";
5907
+ async function Zn() {
5907
5908
  try {
5908
5909
  G("Check configuration files"), q("1️⃣ Check individual files");
5909
- let e = Hn((await W("config.json")).id), t = n.dirname(o(import.meta.url));
5910
- await J(t, ".editorconfig"), await Xn(e, t), await J(t, ".gitignore", [".gitignore_default"]), await J(t, ".markdownlint.json"), await J(t, ".ncurc.json"), await Zn(e, t), await J(t, "LICENSE"), await Qn(e, t), await $n(e, t), await er(e, t), await tr(e, t), K("Configuration files checked");
5910
+ let e = await W("config.json"), t = await W("package.json"), r = t.private === !0, i = Hn(e.id), a = n.dirname(o(import.meta.url));
5911
+ await J(a, ".editorconfig"), await Qn(i, a), await J(a, ".gitignore", [".gitignore_default"]), await J(a, ".markdownlint.json"), await J(a, ".ncurc.json"), await $n(i, a), await J(a, "LICENSE"), await tr(i, a), await nr(i, a), await rr(i, a), await ar(i, a), er(i, t), await J(a, ".github/dependabot.yml", [r ? ".github/dependabot.private.yml" : ".github/dependabot.yml"]), r ? console.info("ℹ️ GitHub workflows and file 'SECURITY.md' are NOT required by this project") : (await ir(i, a), await J(a, "SECURITY.md", [], (t) => t.replaceAll(Xn, () => e.id))), K("Configuration files checked");
5911
5912
  } catch (e) {
5912
5913
  console.error("❌ Error checking configuration files", e), process.exit(1);
5913
5914
  }
5914
5915
  }
5915
- async function Xn(e, t) {
5916
+ async function Qn(e, t) {
5916
5917
  ["development"].includes(e.typeId) ? console.info("ℹ️ File '.gitattributes' is UNIQUE to this project") : await J(t, ".gitattributes", [".gitattributes_default"]);
5917
5918
  }
5918
- async function Zn(e, t) {
5919
+ async function $n(e, t) {
5919
5920
  ["github", "kb"].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is NOT required by this project") : [
5920
5921
  "app",
5921
5922
  "api",
@@ -5923,7 +5924,10 @@ async function Zn(e, t) {
5923
5924
  "eslint"
5924
5925
  ].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is UNIQUE to this project") : await J(t, "eslint.config.js", ["eslint.config.default.js"]);
5925
5926
  }
5926
- async function Qn(e, t) {
5927
+ function er(e, t) {
5928
+ ["app", "development"].includes(e.typeId) ? console.info("ℹ️ File '.prettierrc.json' is UNIQUE to this project") : t.prettier === Yn ? console.info(`ℹ️ Prettier configuration is '${Yn}'`) : console.info(`⚠️ Prettier configuration is NOT '${Yn}'`);
5929
+ }
5930
+ async function tr(e, t) {
5927
5931
  ["github"].includes(e.typeId) ? console.info("ℹ️ File 'tsconfig.json' is NOT required by this project") : [
5928
5932
  "connector",
5929
5933
  "engine",
@@ -5931,10 +5935,10 @@ async function Qn(e, t) {
5931
5935
  "tool"
5932
5936
  ].includes(e.typeId) ? await J(t, "tsconfig.json", ["tsconfig.default.json"]) : console.info("ℹ️ File 'tsconfig.json' is UNIQUE to this project");
5933
5937
  }
5934
- async function $n(e, t) {
5938
+ async function nr(e, t) {
5935
5939
  ["github"].includes(e.typeId) ? console.info("ℹ️ File 'tsconfig.scripts.json' is NOT required by this project") : await J(t, "tsconfig.scripts.json");
5936
5940
  }
5937
- async function er(e, t) {
5941
+ async function rr(e, t) {
5938
5942
  if ([
5939
5943
  "eslint",
5940
5944
  "github",
@@ -5952,7 +5956,10 @@ async function er(e, t) {
5952
5956
  n = e.typeId === "connector" ? ["vite.config.default.ts", "vite.config.wasm.ts"] : e.typeId === "tool" ? ["vite.config.tool.ts"] : ["vite.config.default.ts"], await J(t, "vite.config.ts", n);
5953
5957
  }
5954
5958
  }
5955
- async function tr(e, t) {
5959
+ async function ir(e, t) {
5960
+ await J(t, ".github/workflows/ci.yml"), await J(t, ".github/workflows/codeql.yml"), await J(t, ".github/workflows/publish.yml", [e.publishedTo === "npm" ? ".github/workflows/publish.yml" : ".github/publish.cloudflare.yml"]), await J(t, ".github/workflows/scorecard.yml");
5961
+ }
5962
+ async function ar(e, t) {
5956
5963
  [
5957
5964
  "app",
5958
5965
  "api",
@@ -5961,16 +5968,20 @@ async function tr(e, t) {
5961
5968
  "kb"
5962
5969
  ].includes(e.typeId) ? console.info("ℹ️ File 'vitest.config.ts' is NOT required by this project") : await J(t, "vitest.config.ts");
5963
5970
  }
5964
- async function J(e, t, r = []) {
5965
- let i = n.resolve(process.cwd(), t), a = r.length > 0 ? r : [t], o;
5971
+ async function J(e, t, r = [], i = (e) => e) {
5972
+ let a = n.resolve(process.cwd(), t), o = r.length > 0 ? r : [t], s;
5966
5973
  try {
5967
- o = await Ln(i);
5974
+ s = await Ln(a);
5968
5975
  } catch (e) {
5969
5976
  if (e.code !== "ENOENT") throw e;
5970
5977
  }
5971
- for (let r of a) {
5972
- let i = await Ln(n.resolve(e, `../${r}`));
5973
- if (o === i) {
5978
+ if (s === void 0) {
5979
+ console.info(`⚠️ File '${t}' is MISSING`);
5980
+ return;
5981
+ }
5982
+ for (let r of o) {
5983
+ let a = i(await Ln(n.resolve(e, `../${r}`)));
5984
+ if (s === a) {
5974
5985
  console.info(`ℹ️ File '${t.split("_", 1)[0] ?? t}' is the same as '${r}'`);
5975
5986
  return;
5976
5987
  }
@@ -5979,7 +5990,7 @@ async function J(e, t, r = []) {
5979
5990
  }
5980
5991
  //#endregion
5981
5992
  //#region src/actions/checkDependencies.ts
5982
- async function nr() {
5993
+ async function or() {
5983
5994
  try {
5984
5995
  G("Check Dependencies"), await U("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), q("2️⃣ Check using 'npm-check-updates'");
5985
5996
  let e = {};
@@ -5999,7 +6010,7 @@ async function nr() {
5999
6010
  "--prefer-online",
6000
6011
  "--no-strict-allow-scripts"
6001
6012
  ]);
6002
- let t = await rr();
6013
+ let t = await sr();
6003
6014
  t.length > 0 ? await U("4️⃣ Move install-script pins to installed versions", "npm", [
6004
6015
  "install-scripts",
6005
6016
  "approve",
@@ -6013,85 +6024,85 @@ async function nr() {
6013
6024
  console.error("❌ Error checking dependencies", e), process.exit(1);
6014
6025
  }
6015
6026
  }
6016
- async function rr() {
6027
+ async function sr() {
6017
6028
  let { allowScripts: e = {} } = await W(n.resolve(process.cwd(), "package.json")), t = Object.entries(e).filter(([e, t]) => t && e.lastIndexOf("@") > 0).map(([e]) => e.slice(0, e.lastIndexOf("@")));
6018
6029
  return [...new Set(t)];
6019
6030
  }
6020
6031
  //#endregion
6021
6032
  //#region src/actions/documentBundleSizes.ts
6022
- var ir = "<!-- BUNDLE_START -->", ar = "<!-- BUNDLE_END -->", or = "&nbsp;&nbsp;&nbsp;&nbsp;", sr = 20, cr = "The Bundle Analysis Report is generated automatically on each release using [Sonda](https://sonda.dev/), which analyses final source maps to reveal the actual effects of tree-shaking and minification rather than relying on pre-build estimates.\n\n_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._", lr = "(bundler output, whitespace & JSON)", ur = `${lr} = bytes Sonda can't trace to a source file: whitespace (indentation and line breaks), code the bundler generates (region comments, the combined import/export lines, its small runtime helper and wrappers), and imported JSON such as \`config.json\`, which the bundler doesn't map. The JSON and the generated code are real bytes that ship; the whitespace mostly disappears once compressed.`;
6023
- async function dr(e) {
6033
+ var cr = "<!-- BUNDLE_START -->", lr = "<!-- BUNDLE_END -->", ur = "&nbsp;&nbsp;&nbsp;&nbsp;", dr = 20, fr = "The Bundle Analysis Report is generated automatically on each release using [Sonda](https://sonda.dev/), which analyses final source maps to reveal the actual effects of tree-shaking and minification rather than relying on pre-build estimates.\n\n_Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._", pr = "(bundler output, whitespace & JSON)", mr = `${pr} = bytes Sonda can't trace to a source file: whitespace (indentation and line breaks), code the bundler generates (region comments, the combined import/export lines, its small runtime helper and wrappers), and imported JSON such as \`config.json\`, which the bundler doesn't map. The JSON and the generated code are real bytes that ship; the whitespace mostly disappears once compressed.`;
6034
+ async function hr(e) {
6024
6035
  try {
6025
6036
  G("Document Bundle Sizes"), q("1️⃣ Read bundle analysis report");
6026
6037
  let t = await W("./bundle-analysis-reports/sonda/index.json");
6027
- q("2️⃣ Insert table into 'README.md'"), await Bn(`## Bundle Analysis\n\n${cr}\n\n${fr(t, e?.moduleLevel ?? !1)}\n\n${ur}`, ir, ar), K("Bundle sizes documented");
6038
+ q("2️⃣ Insert table into 'README.md'"), await Bn(`## Bundle Analysis\n\n${fr}\n\n${gr(t, e?.moduleLevel ?? !1)}\n\n${mr}`, cr, lr), K("Bundle sizes documented");
6028
6039
  } catch (e) {
6029
6040
  console.error("❌ Error documenting bundle sizes", e), process.exit(1);
6030
6041
  }
6031
6042
  }
6032
- function fr(e, t) {
6033
- let n = yr(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, Cr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
6043
+ function gr(e, t) {
6044
+ let n = Cr(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, Dr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
6034
6045
  for (let [e, o] of i) {
6035
- let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? pr(e, o, _r(i), r, t) : mr(e, o, i, r, t);
6046
+ let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? _r(e, o, xr(i), r, t) : vr(e, o, i, r, t);
6036
6047
  a.push(...s);
6037
6048
  }
6038
6049
  return a.join("\n");
6039
6050
  }
6040
- function pr(e, t, n, r, i) {
6051
+ function _r(e, t, n, r, i) {
6041
6052
  let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
6042
- if (s.size === 1) return [`| ${e} → ${gr(a, vr(s))} | ${wr(t)} · ${Tr(c)} |`];
6043
- let l = [`| ${e} → ${a} | ${wr(t)} · ${Tr(c)} |`];
6044
- return i || l.push(...hr(s, or, r)), l;
6053
+ if (s.size === 1) return [`| ${e} → ${br(a, Sr(s))} | ${Or(t)} · ${kr(c)} |`];
6054
+ let l = [`| ${e} → ${a} | ${Or(t)} · ${kr(c)} |`];
6055
+ return i || l.push(...yr(s, ur, r)), l;
6045
6056
  }
6046
- function mr(e, t, n, r, i) {
6047
- let a = [`| ${e} | ${wr(t)} |`];
6057
+ function vr(e, t, n, r, i) {
6058
+ let a = [`| ${e} | ${Or(t)} |`];
6048
6059
  for (let [e, { sizes: t, files: o }] of n) {
6049
6060
  let n = r > 0 ? t.uncompressed / r * 100 : 0;
6050
6061
  if (o.size === 1) {
6051
- let t = vr(o);
6052
- a.push(`| ${or}${gr(e, t)} | ${Tr(n)} |`);
6062
+ let t = Sr(o);
6063
+ a.push(`| ${ur}${br(e, t)} | ${kr(n)} |`);
6053
6064
  continue;
6054
6065
  }
6055
- a.push(`| ${or}${e} | ${Tr(n)} |`), i || a.push(...hr(o, `${or}${or}`, r));
6066
+ a.push(`| ${ur}${e} | ${kr(n)} |`), i || a.push(...yr(o, `${ur}${ur}`, r));
6056
6067
  }
6057
6068
  return a;
6058
6069
  }
6059
- function hr(e, t, n) {
6060
- return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${Tr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
6070
+ function yr(e, t, n) {
6071
+ return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${kr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
6061
6072
  }
6062
- function gr(e, t) {
6073
+ function br(e, t) {
6063
6074
  return t === "" ? e : `${e} → ${t}`;
6064
6075
  }
6065
- function _r(e) {
6076
+ function xr(e) {
6066
6077
  let [t] = e;
6067
6078
  if (t === void 0) throw Error("Expected exactly one entry");
6068
6079
  return t;
6069
6080
  }
6070
- function vr(e) {
6081
+ function Sr(e) {
6071
6082
  let [t] = e.keys();
6072
6083
  if (t === void 0) throw Error("Expected exactly one file");
6073
6084
  return t;
6074
6085
  }
6075
- function yr(e) {
6076
- let t = br(e.dependencies), n = /* @__PURE__ */ new Map();
6086
+ function Cr(e) {
6087
+ let t = wr(e.dependencies), n = /* @__PURE__ */ new Map();
6077
6088
  for (let r of e.resources) {
6078
6089
  if (r.kind !== "chunk" || !r.parent) continue;
6079
- let { group: e, file: i } = xr(r.name, t), a = Cr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
6090
+ let { group: e, file: i } = Tr(r.name, t), a = Dr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
6080
6091
  n.set(r.parent, o);
6081
6092
  let s = o.get(e) ?? {
6082
- sizes: Er(),
6093
+ sizes: Ar(),
6083
6094
  files: /* @__PURE__ */ new Map()
6084
6095
  };
6085
- o.set(e, s), Dr(s.sizes, a);
6086
- let c = s.files.get(i) ?? Er();
6087
- s.files.set(i, c), Dr(c, a);
6096
+ o.set(e, s), jr(s.sizes, a);
6097
+ let c = s.files.get(i) ?? Ar();
6098
+ s.files.set(i, c), jr(c, a);
6088
6099
  }
6089
6100
  return n;
6090
6101
  }
6091
- function br(e) {
6102
+ function wr(e) {
6092
6103
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
6093
6104
  }
6094
- function xr(e, t) {
6105
+ function Tr(e, t) {
6095
6106
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
6096
6107
  if (n) {
6097
6108
  let [t, r] = n;
@@ -6101,53 +6112,53 @@ function xr(e, t) {
6101
6112
  };
6102
6113
  }
6103
6114
  return e === "[unassigned]" ? {
6104
- group: lr,
6115
+ group: pr,
6105
6116
  file: ""
6106
6117
  } : e.startsWith("\0") ? {
6107
6118
  group: "(runtime)",
6108
6119
  file: e.slice(1)
6109
6120
  } : {
6110
6121
  group: e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? "wasm" : "src",
6111
- file: Sr(e)
6122
+ file: Er(e)
6112
6123
  };
6113
6124
  }
6114
- function Sr(e) {
6125
+ function Er(e) {
6115
6126
  return e.split("/").at(-1) ?? e;
6116
6127
  }
6117
- function Cr(e) {
6128
+ function Dr(e) {
6118
6129
  return {
6119
6130
  uncompressed: e.uncompressed,
6120
6131
  gzip: e.gzip ?? 0
6121
6132
  };
6122
6133
  }
6123
- function wr(e) {
6124
- return `${Or(e.uncompressed)} · gzip ${Or(e.gzip)}`;
6134
+ function Or(e) {
6135
+ return `${Mr(e.uncompressed)} · gzip ${Mr(e.gzip)}`;
6125
6136
  }
6126
- function Tr(e) {
6127
- let t = Math.round(e / 100 * sr);
6128
- return `\`${"█".repeat(t)}${"░".repeat(sr - t)}\` ${e.toFixed(1)}%`;
6137
+ function kr(e) {
6138
+ let t = Math.round(e / 100 * dr);
6139
+ return `\`${"█".repeat(t)}${"░".repeat(dr - t)}\` ${e.toFixed(1)}%`;
6129
6140
  }
6130
- function Er() {
6141
+ function Ar() {
6131
6142
  return {
6132
6143
  uncompressed: 0,
6133
6144
  gzip: 0
6134
6145
  };
6135
6146
  }
6136
- function Dr(e, t) {
6147
+ function jr(e, t) {
6137
6148
  e.uncompressed += t.uncompressed, e.gzip += t.gzip;
6138
6149
  }
6139
- function Or(e) {
6150
+ function Mr(e) {
6140
6151
  return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
6141
6152
  }
6142
6153
  //#endregion
6143
6154
  //#region src/actions/documentDependencies.ts
6144
- var kr = "<!-- DEPENDENCY_LICENSES_START -->", Ar = "<!-- DEPENDENCY_LICENSES_END -->", jr = "## Dependency Licenses", Mr = "The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are mature and stable (have limited or no dependencies), so they require no active development.";
6145
- async function Nr(e = "MIT") {
6155
+ var Nr = "<!-- DEPENDENCY_LICENSES_START -->", Pr = "<!-- DEPENDENCY_LICENSES_END -->", Fr = "## Dependency Licenses", Ir = "The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. Packages flagged ❗ have a newer version available; ⚠️ indicates a package that hasn't been updated in the last 6 months or longer. Neither flag necessarily indicates a problem: we let new releases stabilise before upgrading, and some packages are mature and stable (have limited or no dependencies), so they require no active development.";
6156
+ async function Lr(e = "MIT") {
6146
6157
  try {
6147
6158
  G("Document Dependencies");
6148
6159
  let t = await W("package.json");
6149
6160
  if (t.name === "@dpuse/dpuse-development" || t.name === "@dpuse/eslint-config-dpuse") {
6150
- await Pr(t.name), K("Dependencies documented");
6161
+ await Rr(t.name), K("Dependencies documented");
6151
6162
  return;
6152
6163
  }
6153
6164
  await Nn("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
@@ -6170,36 +6181,36 @@ async function Nr(e = "MIT") {
6170
6181
  "--all",
6171
6182
  "--json",
6172
6183
  "--omit=dev"
6173
- ], "licenses/licenseTree.json"), await Fr("4️⃣ ", e), K("Dependencies documented");
6184
+ ], "licenses/licenseTree.json"), await zr("4️⃣ ", e), K("Dependencies documented");
6174
6185
  } catch (e) {
6175
6186
  console.error("❌ Error documenting dependencies", e), process.exit(1);
6176
6187
  }
6177
6188
  }
6178
- async function Pr(e) {
6179
- q(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`), await Bn(`${jr}\n\n${`> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`}`, kr, Ar);
6189
+ async function Rr(e) {
6190
+ q(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`), await Bn(`${Fr}\n\n${`> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`}`, Nr, Pr);
6180
6191
  }
6181
- async function Fr(e, t) {
6192
+ async function zr(e, t) {
6182
6193
  q(`${e} Insert licenses into 'README.md'`);
6183
6194
  let [n, r] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), i = /* @__PURE__ */ new Map();
6184
- for (let [e, t] of Object.entries(n)) i.set(e, Rr(e, t));
6195
+ for (let [e, t] of Object.entries(n)) i.set(e, Hr(e, t));
6185
6196
  await Promise.all(i.values().map(async (e) => {
6186
- let t = await zr(e.name, e.installedVersion);
6197
+ let t = await Ur(e.name, e.installedVersion);
6187
6198
  e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
6188
6199
  }));
6189
- let a = `${Ir(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
6190
- for (let e of i.values()) a += Br(e);
6200
+ let a = `${Br(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
6201
+ for (let e of i.values()) a += Wr(e);
6191
6202
  let o = [];
6192
- r.dependencies != null && Vr(r.dependencies, i, o, 0);
6193
- let s = `${Mr}\n\n${o.join("\n")}`;
6194
- await Bn(`${jr}\n\n${a.trimEnd()}\n\n### Dependency Tree\n\n${s}`, kr, Ar);
6203
+ r.dependencies != null && Gr(r.dependencies, i, o, 0);
6204
+ let s = `${Ir}\n\n${o.join("\n")}`;
6205
+ await Bn(`${Fr}\n\n${a.trimEnd()}\n\n### Dependency Tree\n\n${s}`, Nr, Pr);
6195
6206
  }
6196
- function Ir(e) {
6197
- return `License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use ${Lr(e.split(";"))} — all permissive, commercially-friendly licenses. Users of the uploaded library are covered by these checks; developers cloning this repository should independently verify development dependencies.`;
6207
+ function Br(e) {
6208
+ return `License data is collected automatically on each release using [license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn). The following table lists all production dependencies. These dependencies (including transitive ones) have been checked and confirmed to use ${Vr(e.split(";"))} — all permissive, commercially-friendly licenses. Users of the uploaded library are covered by these checks; developers cloning this repository should independently verify development dependencies.`;
6198
6209
  }
6199
- function Lr(e) {
6210
+ function Vr(e) {
6200
6211
  return e.length === 1 ? e[0] ?? "" : e.length === 2 ? `${String(e[0])} or ${String(e[1])}` : `${e.slice(0, -1).join(", ")}, or ${String(e.at(-1))}`;
6201
6212
  }
6202
- function Rr(e, t) {
6213
+ function Hr(e, t) {
6203
6214
  let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
6204
6215
  return {
6205
6216
  name: r,
@@ -6213,7 +6224,7 @@ function Rr(e, t) {
6213
6224
  ...t.licenseFile != null && { licenseFileLink: t.licenseFile }
6214
6225
  };
6215
6226
  }
6216
- async function zr(e, t) {
6227
+ async function Ur(e, t) {
6217
6228
  try {
6218
6229
  let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
6219
6230
  if (n.ok) {
@@ -6231,25 +6242,25 @@ async function zr(e, t) {
6231
6242
  publishedDate: ""
6232
6243
  };
6233
6244
  }
6234
- function Br(e) {
6245
+ function Wr(e) {
6235
6246
  let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
6236
6247
  return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
6237
6248
  }
6238
- function Vr(e, t, n, r) {
6249
+ function Gr(e, t, n, r) {
6239
6250
  let i = " ".repeat(r);
6240
6251
  for (let [a, o] of Object.entries(e)) {
6241
- let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Hr(s);
6242
- n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Vr(o.dependencies, t, n, r + 1);
6252
+ let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Kr(s);
6253
+ n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Gr(o.dependencies, t, n, r + 1);
6243
6254
  }
6244
6255
  }
6245
- function Hr(e) {
6256
+ function Kr(e) {
6246
6257
  if (e == null) return "";
6247
- let t = e.publishedDate ? Ur(e.publishedDate.split("T", 1)[0]) : "";
6258
+ let t = e.publishedDate ? qr(e.publishedDate.split("T", 1)[0]) : "";
6248
6259
  if (e.latestVersion === "" || e.latestVersion === e.installedVersion) return t === "" ? "" : ` — ${t}`;
6249
- let n = e.latestPublishedDate ? Ur(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6260
+ let n = e.latestPublishedDate ? qr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6250
6261
  return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
6251
6262
  }
6252
- function Ur(e) {
6263
+ function qr(e) {
6253
6264
  if (e == null || e === "") return "n/a";
6254
6265
  let t = e.split("T", 1)[0];
6255
6266
  if (t == null || t === "") return "n/a";
@@ -6258,35 +6269,35 @@ function Ur(e) {
6258
6269
  }
6259
6270
  //#endregion
6260
6271
  //#region src/actions/documentGovernance.ts
6261
- var Wr = "<!-- GOVERNANCE_START -->", Gr = "<!-- GOVERNANCE_END -->", Kr = {
6272
+ var Jr = "<!-- GOVERNANCE_START -->", Yr = "<!-- GOVERNANCE_END -->", Xr = {
6262
6273
  "Branch-Protection": 3,
6263
6274
  "Code-Review": 0,
6264
6275
  Contributors: 0
6265
- }, qr = /* @__PURE__ */ new Set(["CII-Best-Practices"]), Jr = {
6276
+ }, Zr = /* @__PURE__ */ new Set(["CII-Best-Practices"]), Qr = {
6266
6277
  actions: "GitHub Actions",
6267
6278
  "javascript-typescript": "JavaScript/TypeScript",
6268
6279
  rust: "Rust"
6269
- }, Yr = "code-health-reports/fallow", Xr = {
6280
+ }, $r = "code-health-reports/fallow", ei = {
6270
6281
  A: "brightgreen",
6271
6282
  B: "green",
6272
6283
  C: "yellow",
6273
6284
  D: "orange",
6274
6285
  F: "red"
6275
- }, Zr = `${Yr}/health.json`, Qr = `${Yr}/index.md`, $r = r(i);
6276
- async function ei() {
6286
+ }, ti = `${$r}/health.json`, ni = `${$r}/index.md`, ri = r(i);
6287
+ async function ii() {
6277
6288
  try {
6278
6289
  G("Document Governance");
6279
- let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = await ti(e), { owner: r, repo: i } = Un(e, "document governance");
6290
+ let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = await ai(e), { owner: r, repo: i } = Un(e, "document governance");
6280
6291
  q("3️⃣ Read security checks and settings");
6281
- let a = await ri(r, i, e);
6292
+ let a = await si(r, i, e);
6282
6293
  q("4️⃣ Look up OpenSSF Best Practices badge and Scorecard results");
6283
- let [o, s] = await Promise.all([ai(`https://github.com/${r}/${i}`), oi(`github.com/${r}/${i}`)]);
6284
- q("5️⃣ Insert governance content into 'README.md'"), await Bn(di(r, i, ci(e), li(t.firstCreatedAt), n, o, a, s), Wr, Gr), K("Governance documented");
6294
+ let [o, s] = await Promise.all([li(`https://github.com/${r}/${i}`), ui(`github.com/${r}/${i}`)]);
6295
+ q("5️⃣ Insert governance content into 'README.md'"), await Bn(hi(r, i, fi(e), pi(t.firstCreatedAt), n, o, a, s), Jr, Yr), K("Governance documented");
6285
6296
  } catch (e) {
6286
6297
  console.error("❌ Error documenting governance", e), process.exit(1);
6287
6298
  }
6288
6299
  }
6289
- async function ti(e) {
6300
+ async function ai(e) {
6290
6301
  if (e.devDependencies?.fallow == null) {
6291
6302
  q("1️⃣ Code health NOT measured, as Fallow is not installed"), q("2️⃣ Code health report NOT required");
6292
6303
  return;
@@ -6296,15 +6307,15 @@ async function ti(e) {
6296
6307
  "--report-only",
6297
6308
  "--format",
6298
6309
  "json"
6299
- ], Zr), await In("2️⃣ Write code health report", "fallow", ["--format", "markdown"], Qr, !0), await W(Zr);
6310
+ ], ti), await In("2️⃣ Write code health report", "fallow", ["--format", "markdown"], ni, !0), await W(ti);
6300
6311
  }
6301
- function ni(e) {
6312
+ function oi(e) {
6302
6313
  let { score: t, grade: n } = e.health_score, { functions_above_threshold: r, functions_analyzed: i, average_maintainability: a } = e.summary, o = e.vital_signs;
6303
6314
  return `### Code Health
6304
6315
 
6305
- [![Fallow code health](${`https://img.shields.io/badge/fallow-${encodeURIComponent(`${n} (${String(Math.round(t))})`).replaceAll("-", "--").replaceAll("(", "%28").replaceAll(")", "%29")}-${Xr[n] ?? "lightgrey"}`})](./${Qr})
6316
+ [![Fallow code health](${`https://img.shields.io/badge/fallow-${encodeURIComponent(`${n} (${String(Math.round(t))})`).replaceAll("-", "--").replaceAll("(", "%28").replaceAll(")", "%29")}-${ei[n] ?? "lightgrey"}`})](./${ni})
6306
6317
 
6307
- [Fallow](https://github.com/fallow-rs/fallow) analyses the TypeScript source on each release for unused code, duplication, complexity, and dependency hygiene. See the [full Fallow report](./${Qr}) for every finding.
6318
+ [Fallow](https://github.com/fallow-rs/fallow) analyses the TypeScript source on each release for unused code, duplication, complexity, and dependency hygiene. See the [full Fallow report](./${ni}) for every finding.
6308
6319
 
6309
6320
  |Measure|Value|
6310
6321
  |:-|-:|
@@ -6320,19 +6331,19 @@ function ni(e) {
6320
6331
 
6321
6332
  `;
6322
6333
  }
6323
- async function ri(e, t, n) {
6334
+ async function si(e, t, n) {
6324
6335
  let [r, i, a] = await Promise.all([
6325
6336
  Rn(".github/workflows/ci.yml"),
6326
6337
  Rn(".github/workflows/codeql.yml"),
6327
6338
  Rn(".github/dependabot.yml")
6328
6339
  ]), [o, s, c, l] = await Promise.all([
6329
- ii(`repos/${e}/${t}`),
6330
- ii(`repos/${e}/${t}/private-vulnerability-reporting`),
6331
- ii(`repos/${e}/${t}/vulnerability-alerts`),
6332
- ii(`repos/${e}/${t}/commits/main/check-runs?per_page=100`)
6340
+ ci(`repos/${e}/${t}`),
6341
+ ci(`repos/${e}/${t}/private-vulnerability-reporting`),
6342
+ ci(`repos/${e}/${t}/vulnerability-alerts`),
6343
+ ci(`repos/${e}/${t}/commits/main/check-runs?per_page=100`)
6333
6344
  ]), u = o === void 0 ? void 0 : JSON.parse(o).security_and_analysis, d = (e) => u?.[e] === void 0 ? void 0 : u[e].status === "enabled", f = new Set((l === void 0 ? [] : JSON.parse(l).check_runs).map((e) => e.app?.slug)), p = a?.match(/package-ecosystem:/g)?.length ?? 0, m = a?.match(/open-pull-requests-limit: 0\b/g)?.length ?? 0;
6334
6345
  return {
6335
- codeQLLanguages: (i ?? "").matchAll(/- language: ([\w-]+)/g).map(([, e = ""]) => Jr[e] ?? e).toArray(),
6346
+ codeQLLanguages: (i ?? "").matchAll(/- language: ([\w-]+)/g).map(([, e = ""]) => Qr[e] ?? e).toArray(),
6336
6347
  dependabotAlerts: c !== void 0,
6337
6348
  dependabotSecurityUpdates: d("dependabot_security_updates"),
6338
6349
  dependabotVersionUpdates: p > m,
@@ -6347,37 +6358,37 @@ async function ri(e, t, n) {
6347
6358
  testsInCI: r?.includes("npm test") ?? !1
6348
6359
  };
6349
6360
  }
6350
- async function ii(e) {
6361
+ async function ci(e) {
6351
6362
  try {
6352
- let { stdout: t } = await $r("gh", ["api", e]);
6363
+ let { stdout: t } = await ri("gh", ["api", e]);
6353
6364
  return t;
6354
6365
  } catch (e) {
6355
6366
  if (String(e.stderr).includes("HTTP 404")) return;
6356
6367
  throw e;
6357
6368
  }
6358
6369
  }
6359
- async function ai(e) {
6370
+ async function li(e) {
6360
6371
  let t = await fetch(`https://www.bestpractices.dev/projects.json?url=${encodeURIComponent(e)}`);
6361
6372
  if (!t.ok) throw Error(`OpenSSF Best Practices lookup failed with status ${String(t.status)}.`);
6362
6373
  return (await t.json()).find((t) => t.repo_url === e)?.id;
6363
6374
  }
6364
- async function oi(e) {
6375
+ async function ui(e) {
6365
6376
  let t = await fetch(`https://api.scorecard.dev/projects/${e}`);
6366
6377
  if (t.status !== 404) {
6367
6378
  if (!t.ok) throw Error(`OpenSSF Scorecard lookup failed with status ${String(t.status)}.`);
6368
6379
  return await t.json();
6369
6380
  }
6370
6381
  }
6371
- function si(e) {
6372
- return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || qr.has(e) || Kr[e] !== void 0 && t >= Kr[e]);
6382
+ function di(e) {
6383
+ return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || Zr.has(e) || Xr[e] !== void 0 && t >= Xr[e]);
6373
6384
  }
6374
- function ci(e) {
6385
+ function fi(e) {
6375
6386
  let t = e.author, n = typeof t == "string" ? t : t?.name;
6376
6387
  if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
6377
6388
  let r = n.indexOf("<"), i = r === -1 ? -1 : n.indexOf(">", r);
6378
6389
  return (i === -1 ? n : n.slice(0, r).trimEnd() + n.slice(i + 1).trimStart()).trim();
6379
6390
  }
6380
- function li(e) {
6391
+ function pi(e) {
6381
6392
  let t = (/* @__PURE__ */ new Date()).getFullYear();
6382
6393
  if (e == null) return String(t);
6383
6394
  let n = new Date(e).getFullYear();
@@ -6386,7 +6397,7 @@ function li(e) {
6386
6397
  function Y(e, t = "On") {
6387
6398
  return e === void 0 ? "❔ Unknown" : e ? `✅ ${t}` : "❌ Off";
6388
6399
  }
6389
- function ui(e, t, n) {
6400
+ function mi(e, t, n) {
6390
6401
  let r = `https://github.com/${e}/${t}`, i = Y(n.codeQLLanguages.length > 0, n.codeQLLanguages.join(", "));
6391
6402
  return `### Checks & Settings
6392
6403
 
@@ -6459,11 +6470,11 @@ ${[
6459
6470
 
6460
6471
  `;
6461
6472
  }
6462
- function di(e, t, n, r, i, a, o, s) {
6463
- let c = `https://github.com/${e}/${t}`, l = `github.com/${e}/${t}`, u = `https://www.bestpractices.dev/projects/${String(a)}`, d = s !== void 0 && si(s) ? "\n\n> [!NOTE]\n> Apart from the Best Practices badge above, the remaining Scorecard gaps need multi-person review or a pull-request workflow, which this solo-maintained project doesn't use." : "", f = a === void 0 ? "" : `[![OpenSSF Best Practices](${u}/badge)](${u})\n`, p = o.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${c}/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.` : "See [SECURITY.md](./SECURITY.md) for how to report one privately, the full disclosure policy, and expected response times.";
6473
+ function hi(e, t, n, r, i, a, o, s) {
6474
+ let c = `https://github.com/${e}/${t}`, l = `github.com/${e}/${t}`, u = `https://www.bestpractices.dev/projects/${String(a)}`, d = s !== void 0 && di(s) ? "\n\n> [!NOTE]\n> Apart from the Best Practices badge above, the remaining Scorecard gaps need multi-person review or a pull-request workflow, which this solo-maintained project doesn't use." : "", f = a === void 0 ? "" : `[![OpenSSF Best Practices](${u}/badge)](${u})\n`, p = o.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${c}/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.` : "See [SECURITY.md](./SECURITY.md) for how to report one privately, the full disclosure policy, and expected response times.";
6464
6475
  return `## Security & Quality
6465
6476
 
6466
- ${ui(e, t, o)}${i === void 0 ? "" : ni(i)}### Reporting Vulnerabilities
6477
+ ${mi(e, t, o)}${i === void 0 ? "" : oi(i)}### Reporting Vulnerabilities
6467
6478
 
6468
6479
  Please do not open public GitHub issues for security vulnerabilities. ${p}
6469
6480
 
@@ -6487,28 +6498,28 @@ This project is licensed under the MIT License, permitting free use, modificatio
6487
6498
  }
6488
6499
  //#endregion
6489
6500
  //#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-DT3mO5rS.js
6490
- var fi = {
6501
+ var gi = {
6491
6502
  lang: void 0,
6492
6503
  message: void 0,
6493
6504
  abortEarly: void 0,
6494
6505
  abortPipeEarly: void 0
6495
6506
  };
6496
6507
  /* @__NO_SIDE_EFFECTS__ */
6497
- function pi(e) {
6508
+ function _i(e) {
6498
6509
  return e ? {
6499
6510
  lang: e?.lang ?? void 0,
6500
6511
  message: e?.message,
6501
6512
  abortEarly: e?.abortEarly ?? void 0,
6502
6513
  abortPipeEarly: e?.abortPipeEarly ?? void 0
6503
- } : fi;
6514
+ } : gi;
6504
6515
  }
6505
6516
  /* @__NO_SIDE_EFFECTS__ */
6506
- function mi(e) {
6517
+ function vi(e) {
6507
6518
  let t = typeof e;
6508
6519
  return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
6509
6520
  }
6510
6521
  function X(e, t, n, r, i) {
6511
- let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ mi(a), c = {
6522
+ let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ vi(a), c = {
6512
6523
  kind: e.kind,
6513
6524
  type: e.type,
6514
6525
  input: a,
@@ -6525,39 +6536,39 @@ function X(e, t, n, r, i) {
6525
6536
  u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
6526
6537
  }
6527
6538
  /* @__NO_SIDE_EFFECTS__ */
6528
- function hi(e, t) {
6539
+ function yi(e, t) {
6529
6540
  return e === t || Number.isNaN(e) && Number.isNaN(t);
6530
6541
  }
6531
6542
  /* @__NO_SIDE_EFFECTS__ */
6532
- function gi(e, t) {
6543
+ function bi(e, t) {
6533
6544
  return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
6534
6545
  }
6535
6546
  /* @__NO_SIDE_EFFECTS__ */
6536
- function _i(e, t) {
6547
+ function xi(e, t) {
6537
6548
  let n = [...new Set(e)];
6538
6549
  return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
6539
6550
  }
6540
- function vi(e) {
6551
+ function Si(e) {
6541
6552
  return e["~standard"] = {
6542
6553
  version: 1,
6543
6554
  vendor: "valibot",
6544
- validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ pi())
6555
+ validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ _i())
6545
6556
  }, e;
6546
6557
  }
6547
6558
  /* @__NO_SIDE_EFFECTS__ */
6548
- function yi(e, t, n) {
6559
+ function Ci(e, t, n) {
6549
6560
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
6550
6561
  }
6551
6562
  /* @__NO_SIDE_EFFECTS__ */
6552
- function bi(e, t, n) {
6563
+ function wi(e, t, n) {
6553
6564
  return typeof e.default == "function" ? e.default(t, n) : e.default;
6554
6565
  }
6555
6566
  /* @__NO_SIDE_EFFECTS__ */
6556
- function xi(e, t) {
6557
- return vi({
6567
+ function Ti(e, t) {
6568
+ return Si({
6558
6569
  kind: "schema",
6559
6570
  type: "array",
6560
- reference: xi,
6571
+ reference: Ti,
6561
6572
  expects: "Array",
6562
6573
  async: !1,
6563
6574
  item: e,
@@ -6590,11 +6601,11 @@ function xi(e, t) {
6590
6601
  });
6591
6602
  }
6592
6603
  /* @__NO_SIDE_EFFECTS__ */
6593
- function Si(e) {
6594
- return vi({
6604
+ function Ei(e) {
6605
+ return Si({
6595
6606
  kind: "schema",
6596
6607
  type: "boolean",
6597
- reference: Si,
6608
+ reference: Ei,
6598
6609
  expects: "boolean",
6599
6610
  async: !1,
6600
6611
  message: e,
@@ -6604,23 +6615,23 @@ function Si(e) {
6604
6615
  });
6605
6616
  }
6606
6617
  /* @__NO_SIDE_EFFECTS__ */
6607
- function Ci(e, t) {
6608
- return vi({
6618
+ function Di(e, t) {
6619
+ return Si({
6609
6620
  kind: "schema",
6610
6621
  type: "literal",
6611
- reference: Ci,
6612
- expects: /* @__PURE__ */ mi(e),
6622
+ reference: Di,
6623
+ expects: /* @__PURE__ */ vi(e),
6613
6624
  async: !1,
6614
6625
  literal: e,
6615
6626
  message: t,
6616
6627
  "~run"(e, t) {
6617
- return /* @__PURE__ */ hi(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
6628
+ return /* @__PURE__ */ yi(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
6618
6629
  }
6619
6630
  });
6620
6631
  }
6621
6632
  /* @__NO_SIDE_EFFECTS__ */
6622
6633
  function Z(e, t) {
6623
- return vi({
6634
+ return Si({
6624
6635
  kind: "schema",
6625
6636
  type: "nullable",
6626
6637
  reference: Z,
@@ -6629,16 +6640,16 @@ function Z(e, t) {
6629
6640
  wrapped: e,
6630
6641
  default: t,
6631
6642
  "~run"(e, t) {
6632
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ bi(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6643
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ wi(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6633
6644
  }
6634
6645
  });
6635
6646
  }
6636
6647
  /* @__NO_SIDE_EFFECTS__ */
6637
- function wi(e) {
6638
- return vi({
6648
+ function Oi(e) {
6649
+ return Si({
6639
6650
  kind: "schema",
6640
6651
  type: "number",
6641
- reference: wi,
6652
+ reference: Oi,
6642
6653
  expects: "number",
6643
6654
  async: !1,
6644
6655
  message: e,
@@ -6648,26 +6659,26 @@ function wi(e) {
6648
6659
  });
6649
6660
  }
6650
6661
  /* @__NO_SIDE_EFFECTS__ */
6651
- function Ti(e, t) {
6652
- return vi({
6662
+ function ki(e, t) {
6663
+ return Si({
6653
6664
  kind: "schema",
6654
6665
  type: "optional",
6655
- reference: Ti,
6666
+ reference: ki,
6656
6667
  expects: `(${e.expects} | undefined)`,
6657
6668
  async: !1,
6658
6669
  wrapped: e,
6659
6670
  default: t,
6660
6671
  "~run"(e, t) {
6661
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ bi(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6672
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ wi(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6662
6673
  }
6663
6674
  });
6664
6675
  }
6665
6676
  /* @__NO_SIDE_EFFECTS__ */
6666
- function Ei(e, t, n) {
6667
- return vi({
6677
+ function Ai(e, t, n) {
6678
+ return Si({
6668
6679
  kind: "schema",
6669
6680
  type: "record",
6670
- reference: Ei,
6681
+ reference: Ai,
6671
6682
  expects: "Object",
6672
6683
  async: !1,
6673
6684
  key: e,
@@ -6677,7 +6688,7 @@ function Ei(e, t, n) {
6677
6688
  let n = e.value;
6678
6689
  if (n && typeof n == "object") {
6679
6690
  e.typed = !0, e.value = {};
6680
- for (let r in n) if (/* @__PURE__ */ gi(n, r)) {
6691
+ for (let r in n) if (/* @__PURE__ */ bi(n, r)) {
6681
6692
  let i = n[r], a = this.key["~run"]({ value: r }, t);
6682
6693
  if (a.issues) {
6683
6694
  let o = {
@@ -6717,7 +6728,7 @@ function Ei(e, t, n) {
6717
6728
  }
6718
6729
  /* @__NO_SIDE_EFFECTS__ */
6719
6730
  function Q(e, t) {
6720
- return vi({
6731
+ return Si({
6721
6732
  kind: "schema",
6722
6733
  type: "strict_object",
6723
6734
  reference: Q,
@@ -6732,7 +6743,7 @@ function Q(e, t) {
6732
6743
  for (let r in this.entries) {
6733
6744
  let i = this.entries[r];
6734
6745
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
6735
- let a = r in n ? n[r] : /* @__PURE__ */ bi(i), o = i["~run"]({ value: a }, t);
6746
+ let a = r in n ? n[r] : /* @__PURE__ */ wi(i), o = i["~run"]({ value: a }, t);
6736
6747
  if (o.issues) {
6737
6748
  let i = {
6738
6749
  type: "object",
@@ -6748,7 +6759,7 @@ function Q(e, t) {
6748
6759
  }
6749
6760
  }
6750
6761
  o.typed || (e.typed = !1), e.value[r] = o.value;
6751
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ yi(i);
6762
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Ci(i);
6752
6763
  else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (X(this, "key", e, t, {
6753
6764
  input: void 0,
6754
6765
  expected: `"${r}"`,
@@ -6784,7 +6795,7 @@ function Q(e, t) {
6784
6795
  }
6785
6796
  /* @__NO_SIDE_EFFECTS__ */
6786
6797
  function $(e) {
6787
- return vi({
6798
+ return Si({
6788
6799
  kind: "schema",
6789
6800
  type: "string",
6790
6801
  reference: $,
@@ -6797,19 +6808,19 @@ function $(e) {
6797
6808
  });
6798
6809
  }
6799
6810
  /* @__NO_SIDE_EFFECTS__ */
6800
- function Di(e) {
6811
+ function ji(e) {
6801
6812
  let t;
6802
6813
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
6803
6814
  else t = n.issues;
6804
6815
  return t;
6805
6816
  }
6806
6817
  /* @__NO_SIDE_EFFECTS__ */
6807
- function Oi(e, t) {
6808
- return vi({
6818
+ function Mi(e, t) {
6819
+ return Si({
6809
6820
  kind: "schema",
6810
6821
  type: "union",
6811
- reference: Oi,
6812
- expects: /* @__PURE__ */ _i(e.map((e) => e.expects), "|"),
6822
+ reference: Mi,
6823
+ expects: /* @__PURE__ */ xi(e.map((e) => e.expects), "|"),
6813
6824
  async: !1,
6814
6825
  options: e,
6815
6826
  message: t,
@@ -6828,29 +6839,29 @@ function Oi(e, t) {
6828
6839
  if (n) return n;
6829
6840
  if (r) {
6830
6841
  if (r.length === 1) return r[0];
6831
- X(this, "type", e, t, { issues: /* @__PURE__ */ Di(r) }), e.typed = !0;
6842
+ X(this, "type", e, t, { issues: /* @__PURE__ */ ji(r) }), e.typed = !0;
6832
6843
  } else if (i?.length === 1) return i[0];
6833
- else X(this, "type", e, t, { issues: /* @__PURE__ */ Di(i) });
6844
+ else X(this, "type", e, t, { issues: /* @__PURE__ */ ji(i) });
6834
6845
  return e;
6835
6846
  }
6836
6847
  });
6837
6848
  }
6838
- var ki = /* @__PURE__ */ Q({
6849
+ var Ni = /* @__PURE__ */ Q({
6839
6850
  en: /* @__PURE__ */ $(),
6840
6851
  es: /* @__PURE__ */ $()
6841
- }), Ai = {
6852
+ }), Pi = {
6842
6853
  id: /* @__PURE__ */ $(),
6843
6854
  label: /* @__PURE__ */ Q({
6844
- en: /* @__PURE__ */ Ti(/* @__PURE__ */ $()),
6845
- es: /* @__PURE__ */ Ti(/* @__PURE__ */ $())
6855
+ en: /* @__PURE__ */ ki(/* @__PURE__ */ $()),
6856
+ es: /* @__PURE__ */ ki(/* @__PURE__ */ $())
6846
6857
  }),
6847
6858
  description: /* @__PURE__ */ Q({
6848
- en: /* @__PURE__ */ Ti(/* @__PURE__ */ $()),
6849
- es: /* @__PURE__ */ Ti(/* @__PURE__ */ $())
6859
+ en: /* @__PURE__ */ ki(/* @__PURE__ */ $()),
6860
+ es: /* @__PURE__ */ ki(/* @__PURE__ */ $())
6850
6861
  }),
6851
6862
  icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6852
6863
  iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $())
6853
- }, ji = (e) => /* @__PURE__ */ Oi(e.map((e) => /* @__PURE__ */ Ci(e))), Mi = ji([
6864
+ }, Fi = (e) => /* @__PURE__ */ Mi(e.map((e) => /* @__PURE__ */ Di(e))), Ii = Fi([
6854
6865
  "app",
6855
6866
  "connector",
6856
6867
  "connectorConnection",
@@ -6872,33 +6883,33 @@ var ki = /* @__PURE__ */ Q({
6872
6883
  "presenter",
6873
6884
  "presenterPresentation",
6874
6885
  "tool"
6875
- ]), Ni = ji([
6886
+ ]), Li = Fi([
6876
6887
  "danger",
6877
6888
  "success",
6878
6889
  "warning"
6879
- ]), Pi = ji([
6890
+ ]), Ri = Fi([
6880
6891
  "alpha",
6881
6892
  "beta",
6882
6893
  "releaseCandidate",
6883
6894
  "generalAvailability"
6884
- ]), Fi = /* @__PURE__ */ Q({
6885
- color: Ni,
6895
+ ]), zi = /* @__PURE__ */ Q({
6896
+ color: Li,
6886
6897
  label: /* @__PURE__ */ $()
6887
- }), Ii = {
6888
- ...Ai,
6889
- typeId: Mi
6890
- }, Li = /* @__PURE__ */ Q({
6891
- ...Ii,
6892
- order: /* @__PURE__ */ wi(),
6898
+ }), Bi = {
6899
+ ...Pi,
6900
+ typeId: Ii
6901
+ }, Vi = /* @__PURE__ */ Q({
6902
+ ...Bi,
6903
+ order: /* @__PURE__ */ Oi(),
6893
6904
  path: /* @__PURE__ */ $()
6894
- }), Ri = {
6895
- ...Ii,
6896
- firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ wi()),
6897
- lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ wi()),
6898
- status: /* @__PURE__ */ Z(Fi),
6899
- statusId: /* @__PURE__ */ Z(Pi)
6905
+ }), Hi = {
6906
+ ...Bi,
6907
+ firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Oi()),
6908
+ lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Oi()),
6909
+ status: /* @__PURE__ */ Z(zi),
6910
+ statusId: /* @__PURE__ */ Z(Ri)
6900
6911
  };
6901
- ({ ...Ri }), ji([
6912
+ ({ ...Hi }), Fi([
6902
6913
  "app",
6903
6914
  "engine",
6904
6915
  "connector",
@@ -6908,17 +6919,17 @@ var ki = /* @__PURE__ */ Q({
6908
6919
  ]);
6909
6920
  //#endregion
6910
6921
  //#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-aYmFWSrn.js
6911
- var zi = {
6912
- ...Ri,
6922
+ var Ui = {
6923
+ ...Hi,
6913
6924
  vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6914
6925
  vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6915
6926
  vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6916
6927
  version: /* @__PURE__ */ $()
6917
6928
  };
6918
- ({ ...zi });
6929
+ ({ ...Ui });
6919
6930
  //#endregion
6920
6931
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
6921
- var Bi = ji([
6932
+ var Wi = Fi([
6922
6933
  "abortOperation",
6923
6934
  "auditObjectContent",
6924
6935
  "createObject",
@@ -6934,39 +6945,39 @@ var Bi = ji([
6934
6945
  "retrieveChunks",
6935
6946
  "retrieveRecords",
6936
6947
  "upsertRecords"
6937
- ]), Vi = ji([
6948
+ ]), Gi = Fi([
6938
6949
  "application",
6939
6950
  "curatedDataset",
6940
6951
  "database",
6941
6952
  "fileStore"
6942
- ]), Hi = /* @__PURE__ */ Q({ label: ki }), Ui = ji([
6953
+ ]), Ki = /* @__PURE__ */ Q({ label: Ni }), qi = Fi([
6943
6954
  "bidirectional",
6944
6955
  "destination",
6945
6956
  "source",
6946
6957
  "unknown"
6947
- ]), Wi = /* @__PURE__ */ Q({ label: ki }), Gi = /* @__PURE__ */ Q({
6948
- authMethodId: ji([
6958
+ ]), Ji = /* @__PURE__ */ Q({ label: Ni }), Yi = /* @__PURE__ */ Q({
6959
+ authMethodId: Fi([
6949
6960
  "apiKey",
6950
6961
  "disabled",
6951
6962
  "oAuth2",
6952
6963
  "none"
6953
6964
  ]),
6954
- activeConnectionCount: /* @__PURE__ */ Ti(/* @__PURE__ */ wi()),
6955
- canDescribe: /* @__PURE__ */ Ti(/* @__PURE__ */ Si()),
6956
- id: /* @__PURE__ */ Ti(/* @__PURE__ */ $()),
6957
- label: /* @__PURE__ */ Ti(ki),
6958
- maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ wi()),
6959
- params: /* @__PURE__ */ Ti(/* @__PURE__ */ xi(/* @__PURE__ */ Ei(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6960
- }), Ki = /* @__PURE__ */ Q({
6961
- ...zi,
6962
- typeId: /* @__PURE__ */ Ci("connector"),
6963
- actionNames: /* @__PURE__ */ xi(Bi),
6964
- category: /* @__PURE__ */ Z(Hi),
6965
- categoryId: Vi,
6966
- implementations: /* @__PURE__ */ Ei(/* @__PURE__ */ $(), Gi),
6967
- usage: /* @__PURE__ */ Z(Wi),
6968
- usageId: /* @__PURE__ */ Z(Ui)
6969
- }), qi = {
6965
+ activeConnectionCount: /* @__PURE__ */ ki(/* @__PURE__ */ Oi()),
6966
+ canDescribe: /* @__PURE__ */ ki(/* @__PURE__ */ Ei()),
6967
+ id: /* @__PURE__ */ ki(/* @__PURE__ */ $()),
6968
+ label: /* @__PURE__ */ ki(Ni),
6969
+ maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ Oi()),
6970
+ params: /* @__PURE__ */ ki(/* @__PURE__ */ Ti(/* @__PURE__ */ Ai(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6971
+ }), Xi = /* @__PURE__ */ Q({
6972
+ ...Ui,
6973
+ typeId: /* @__PURE__ */ Di("connector"),
6974
+ actionNames: /* @__PURE__ */ Ti(Wi),
6975
+ category: /* @__PURE__ */ Z(Ki),
6976
+ categoryId: Gi,
6977
+ implementations: /* @__PURE__ */ Ai(/* @__PURE__ */ $(), Yi),
6978
+ usage: /* @__PURE__ */ Z(Ji),
6979
+ usageId: /* @__PURE__ */ Z(qi)
6980
+ }), Zi = {
6970
6981
  abortOperation: "Abort Operation",
6971
6982
  auditObjectContent: "Audit Object Content",
6972
6983
  createObject: "Create Object",
@@ -6982,12 +6993,12 @@ var Bi = ji([
6982
6993
  retrieveChunks: "Retrieve Chunks",
6983
6994
  retrieveRecords: "Retrieve Records",
6984
6995
  upsertRecords: "Upsert Records"
6985
- }, Ji = /* @__PURE__ */ new Set([
6996
+ }, Qi = /* @__PURE__ */ new Set([
6986
6997
  "createObject",
6987
6998
  "dropObject",
6988
6999
  "removeRecords",
6989
7000
  "upsertRecords"
6990
- ]), Yi = /* @__PURE__ */ new Set([
7001
+ ]), $i = /* @__PURE__ */ new Set([
6991
7002
  "auditObjectContent",
6992
7003
  "findObject",
6993
7004
  "getInfo",
@@ -6998,57 +7009,57 @@ var Bi = ji([
6998
7009
  "retrieveChunks",
6999
7010
  "retrieveRecords"
7000
7011
  ]);
7001
- function Xi(e) {
7012
+ function ea(e) {
7002
7013
  let t = !1, n = !1;
7003
- for (let r of e) Yi.has(r) && (t = !0), Ji.has(r) && (n = !0);
7014
+ for (let r of e) $i.has(r) && (t = !0), Qi.has(r) && (n = !0);
7004
7015
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
7005
7016
  }
7006
- function Zi(e) {
7017
+ function ta(e) {
7007
7018
  let t = new Set(e), n = "|Action|Supported|\n";
7008
7019
  n += "|:----|:-------:|\n";
7009
- for (let e of Object.keys(qi)) n += `| ${qi[e]} | ${t.has(e) ? "✓" : ""} |\n`;
7020
+ for (let e of Object.keys(Zi)) n += `| ${Zi[e]} | ${t.has(e) ? "✓" : ""} |\n`;
7010
7021
  return n;
7011
7022
  }
7012
7023
  //#endregion
7013
7024
  //#region src/actions/documentActions.ts
7014
- var Qi = "<!-- CONNECTOR_ACTIONS_START -->", $i = "<!-- CONNECTOR_ACTIONS_END -->", ea = "Connectors conform to a unified interface contract by implementing a specific subset of standard actions. These standardised actions allow the DPUse application to interact with any underlying data source in the same way, enabling Connectors to be built independently and loaded dynamically at runtime.", ta = {
7025
+ var na = "<!-- CONNECTOR_ACTIONS_START -->", ra = "<!-- CONNECTOR_ACTIONS_END -->", ia = "Connectors conform to a unified interface contract by implementing a specific subset of standard actions. These standardised actions allow the DPUse application to interact with any underlying data source in the same way, enabling Connectors to be built independently and loaded dynamically at runtime.", aa = {
7015
7026
  source: "This connector is a Source connector that supports only read actions. Connectors can also function as a Destination (write-only) or Bidirectional (read/write), depending on the actions they support.",
7016
7027
  destination: "This connector is a Destination connector that supports only write actions. Connectors can also function as a Source (read-only) or Bidirectional (read/write), depending on the actions they support.",
7017
7028
  bidirectional: "This connector is a Bidirectional connector that supports both read and write actions. Connectors can also function as a Source (read-only) or Destination (write-only), depending on the actions they support.",
7018
7029
  unknown: "This connector does not yet implement any read or write actions, so its type cannot be determined. Connectors function as a Source (read-only), a Destination (write-only), or Bidirectional (read/write), depending on the actions they support."
7019
- }, na = "The table below lists all connector actions and highlights those supported by this connector.";
7020
- async function ra() {
7030
+ }, oa = "The table below lists all connector actions and highlights those supported by this connector.";
7031
+ async function sa() {
7021
7032
  try {
7022
7033
  G("Document Actions"), q("1️⃣ Insert actions description and table into 'README.md'");
7023
- let e = (await W("config.json")).actionNames ?? [], t = Xi(e), n = Zi(e);
7024
- await Bn(`${ea}\n\n${ta[t]} ${na}\n\n${n}`, Qi, $i), K("Actions documented");
7034
+ let e = (await W("config.json")).actionNames ?? [], t = ea(e), n = ta(e);
7035
+ await Bn(`${ia}\n\n${aa[t]} ${oa}\n\n${n}`, na, ra), K("Actions documented");
7025
7036
  } catch (e) {
7026
7037
  console.error("❌ Error documenting actions", e), process.exit(1);
7027
7038
  }
7028
7039
  }
7029
7040
  //#endregion
7030
7041
  //#region src/actions/documentOpening.ts
7031
- var ia = "<!-- OPENING_START -->", aa = "<!-- OPENING_END -->";
7032
- async function oa() {
7042
+ var ca = "<!-- OPENING_START -->", la = "<!-- OPENING_END -->";
7043
+ async function ua() {
7033
7044
  try {
7034
7045
  G("Document Opening"), q("1️⃣ Insert opening content into 'README.md'");
7035
7046
  let e = await W("package.json"), t = await W("config.json"), { owner: n, repo: r } = Un(e, "document opening");
7036
- await Bn(la(n, r, sa(e), ca(t)), ia, aa), K("Opening documented");
7047
+ await Bn(pa(n, r, da(e), fa(t)), ca, la), K("Opening documented");
7037
7048
  } catch (e) {
7038
7049
  console.error("❌ Error documenting opening", e), process.exit(1);
7039
7050
  }
7040
7051
  }
7041
- function sa(e) {
7052
+ function da(e) {
7042
7053
  let t = e.license;
7043
7054
  if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
7044
7055
  return t;
7045
7056
  }
7046
- function ca(e) {
7057
+ function fa(e) {
7047
7058
  let t = e.description.en;
7048
7059
  if (t == null || t.length === 0) throw Error("config.json 'description.en' field is required to document opening.");
7049
7060
  return t;
7050
7061
  }
7051
- function la(e, t, n, r) {
7062
+ function pa(e, t, n, r) {
7052
7063
  let i = `https://github.com/${e}/${t}`;
7053
7064
  return `[![License: ${n}](https://img.shields.io/badge/License-${n.replaceAll("-", "--")}-blue.svg)](./LICENSE)
7054
7065
  [![DPUse version](https://img.shields.io/github/v/release/${e}/${t}?color=f6821f&label=DPUse)](${i}/releases/latest)
@@ -7076,12 +7087,12 @@ ${r}`;
7076
7087
  }
7077
7088
  //#endregion
7078
7089
  //#region src/actions/documentUsage.ts
7079
- var ua = "<!-- USAGE_START -->", da = "<!-- USAGE_END -->", fa = /* @__PURE__ */ new Set([
7090
+ var ma = "<!-- USAGE_START -->", ha = "<!-- USAGE_END -->", ga = /* @__PURE__ */ new Set([
7080
7091
  "connector",
7081
7092
  "context",
7082
7093
  "cookbook",
7083
7094
  "presenter"
7084
- ]), pa = [
7095
+ ]), _a = [
7085
7096
  ["build", "Builds the project."],
7086
7097
  ["build:ts", "Builds the TypeScript source."],
7087
7098
  ["test", "Runs the tests."],
@@ -7101,35 +7112,35 @@ var ua = "<!-- USAGE_START -->", da = "<!-- USAGE_END -->", fa = /* @__PURE__ */
7101
7112
  ["sync", "Bumps the version, then commits and pushes to GitHub."],
7102
7113
  ["release", "Bumps the version, commits and pushes, and creates a GitHub release."],
7103
7114
  ["publish", "Registers the released version with DPUse."]
7104
- ], ma = /* @__PURE__ */ new Set(["development", "eslint"]), ha = "> [!WARNING]\n> This project is currently published to npm, but is not designed for general use. It is custom built for the DPUse CI/CD process. You are welcome to clone and customise it for your own purposes, but you will need to adapt it to your own project structure and tooling.\n\n", ga = "Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.";
7105
- async function _a() {
7115
+ ], va = /* @__PURE__ */ new Set(["development", "eslint"]), ya = "> [!WARNING]\n> This project is currently published to npm, but is not designed for general use. It is custom built for the DPUse CI/CD process. You are welcome to clone and customise it for your own purposes, but you will need to adapt it to your own project structure and tooling.\n\n", ba = "Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.";
7116
+ async function xa() {
7106
7117
  try {
7107
7118
  G("Document Usage"), q("1️⃣ Insert usage content into 'README.md'");
7108
- let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = va(e), r = ya(n), i = ba(e.engines?.node), a = ba(e.engines?.npm), o = ba(e.devDependencies?.typescript);
7109
- await Bn(wa(xa(Hn(t.id), e.name), n, r, i, a, o, Sa(e)), ua, da), K("Usage documented");
7119
+ let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = Sa(e), r = Ca(n), i = wa(e.engines?.node), a = wa(e.engines?.npm), o = wa(e.devDependencies?.typescript);
7120
+ await Bn(Oa(Ta(Hn(t.id), e.name), n, r, i, a, o, Ea(e)), ma, ha), K("Usage documented");
7110
7121
  } catch (e) {
7111
7122
  console.error("❌ Error documenting usage", e), process.exit(1);
7112
7123
  }
7113
7124
  }
7114
- function va(e) {
7125
+ function Sa(e) {
7115
7126
  let t = e.repository, n = typeof t == "string" ? t : t?.url;
7116
7127
  if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
7117
7128
  return n.replace(/^git\+/, "");
7118
7129
  }
7119
- function ya(e) {
7130
+ function Ca(e) {
7120
7131
  return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
7121
7132
  }
7122
- function ba(e) {
7133
+ function wa(e) {
7123
7134
  if (e == null) throw Error("package.json version range is required to document usage.");
7124
7135
  let t = /\d+(?:\.\d+)*/.exec(e);
7125
7136
  if (t == null) throw Error(`Unable to parse version from '${e}'.`);
7126
7137
  return t[0];
7127
7138
  }
7128
- function xa(e, t) {
7139
+ function Ta(e, t) {
7129
7140
  let { typeId: n } = e;
7130
- if (fa.has(n)) return `This ${n} is automatically uploaded to the DPUse Engine cloud once released and becomes instantly available to all new browser app instances, with existing instances notified of the update.
7141
+ if (ga.has(n)) return `This ${n} is automatically uploaded to the DPUse Engine cloud once released and becomes instantly available to all new browser app instances, with existing instances notified of the update.
7131
7142
 
7132
- You may view or clone this repository for your own purposes, such as building a new, similar ${n}, though there is currently no process to accept third-party ${n}s into DPUse at this stage. ${ga}`;
7143
+ You may view or clone this repository for your own purposes, such as building a new, similar ${n}, though there is currently no process to accept third-party ${n}s into DPUse at this stage. ${ba}`;
7133
7144
  if (e.publishedTo === "npm") {
7134
7145
  if (t == null || t === "") throw Error("package.json 'name' field is required to document usage.");
7135
7146
  return `This package is published to the [public npm registry](https://www.npmjs.com/package/${t}). Install it with:
@@ -7138,18 +7149,18 @@ You may view or clone this repository for your own purposes, such as building a
7138
7149
  npm install ${t}
7139
7150
  \`\`\`
7140
7151
 
7141
- ${ma.has(n) ? ha : ""}To work on the source instead, clone this repository. ${ga}`;
7152
+ ${va.has(n) ? ya : ""}To work on the source instead, clone this repository. ${ba}`;
7142
7153
  }
7143
- return `You may view or clone this repository for your own purposes. ${ga}`;
7154
+ return `You may view or clone this repository for your own purposes. ${ba}`;
7144
7155
  }
7145
- function Sa(e) {
7146
- let t = e.scripts ?? {}, n = e.name === "@dpuse/dpuse-development", r = new Set(Object.keys(t).filter((e) => n ? t[e]?.includes("dpuse-development.es.js") : t[e]?.includes("@dpuse/dpuse-development"))), i = (e) => r.has(e) || (t[e] ?? "").matchAll(/npm run ([\w:]+)/g).some(([, e = ""]) => r.has(e)), a = pa.filter(([e]) => i(e)).map(([e, t]) => `|\`${Ca(e)}\`|${t}|`);
7156
+ function Ea(e) {
7157
+ let t = e.scripts ?? {}, n = e.name === "@dpuse/dpuse-development", r = new Set(Object.keys(t).filter((e) => n ? t[e]?.includes("dpuse-development.es.js") : t[e]?.includes("@dpuse/dpuse-development"))), i = (e) => r.has(e) || (t[e] ?? "").matchAll(/npm run ([\w:]+)/g).some(([, e = ""]) => r.has(e)), a = _a.filter(([e]) => i(e)).map(([e, t]) => `|\`${Da(e)}\`|${t}|`);
7147
7158
  return a.length === 0 ? "" : `\n\n${n ? "This repository provides these commands to every DPUse project, and uses them itself:" : "Repository tasks run through npm scripts provided by [@dpuse/dpuse-development](https://github.com/dpuse/dpuse-development):"}\n\n|Command|What it does|\n|:-|:-|\n${a.join("\n")}`;
7148
7159
  }
7149
- function Ca(e) {
7160
+ function Da(e) {
7150
7161
  return e === "test" ? "npm test" : `npm run ${e}`;
7151
7162
  }
7152
- function wa(e, t, n, r, i, a, o) {
7163
+ function Oa(e, t, n, r, i, a, o) {
7153
7164
  return `## Usage
7154
7165
 
7155
7166
  ${e}
@@ -7164,7 +7175,7 @@ _Requires [Node.js](https://nodejs.org/) ${r} or later, [npm](https://www.npmjs.
7164
7175
  }
7165
7176
  //#endregion
7166
7177
  //#region src/actions/formatCode.ts
7167
- async function Ta() {
7178
+ async function ka() {
7168
7179
  try {
7169
7180
  G("Format Code"), await U("1️⃣ Format", "prettier", [
7170
7181
  "--write",
@@ -7179,7 +7190,7 @@ async function Ta() {
7179
7190
  }
7180
7191
  //#endregion
7181
7192
  //#region src/actions/lintCode.ts
7182
- async function Ea() {
7193
+ async function Aa() {
7183
7194
  try {
7184
7195
  G("Lint Code"), await U("1️⃣ Lint", "eslint", ["."]), K("Code linted");
7185
7196
  } catch (e) {
@@ -7188,7 +7199,7 @@ async function Ea() {
7188
7199
  }
7189
7200
  //#endregion
7190
7201
  //#region src/utilities/cloudflare.ts
7191
- async function Da() {
7202
+ async function ja() {
7192
7203
  let e = await W("config.json"), t = {
7193
7204
  body: JSON.stringify(e),
7194
7205
  headers: { "Content-Type": "application/json" },
@@ -7196,7 +7207,7 @@ async function Da() {
7196
7207
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
7197
7208
  if (!n.ok) throw Error(await n.text());
7198
7209
  }
7199
- async function Oa(e, t) {
7210
+ async function Ma(e, t) {
7200
7211
  async function n(e, t, r) {
7201
7212
  for (let i of r) {
7202
7213
  let r = `${e}/${i}`, a = `${t}/${i}`;
@@ -7214,7 +7225,7 @@ async function Oa(e, t) {
7214
7225
  let r = await Pn(`${e}/${t}/`);
7215
7226
  await n(`${e}/${t}`, t, r);
7216
7227
  }
7217
- async function ka(e) {
7228
+ async function Na(e) {
7218
7229
  let t = e.id, n = {
7219
7230
  body: JSON.stringify(e),
7220
7231
  headers: { "Content-Type": "application/json" },
@@ -7222,7 +7233,7 @@ async function ka(e) {
7222
7233
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
7223
7234
  if (!r.ok) throw Error(await r.text());
7224
7235
  }
7225
- async function Aa(e, t) {
7236
+ async function Pa(e, t) {
7226
7237
  let n = `v${e.version ?? "unknown"}`;
7227
7238
  async function r(e, r = "") {
7228
7239
  let i = await Pn(e, { withFileTypes: !0 });
@@ -7246,24 +7257,24 @@ async function Aa(e, t) {
7246
7257
  }
7247
7258
  //#endregion
7248
7259
  //#region node_modules/valibot/dist/index.mjs
7249
- var ja = {
7260
+ var Fa = {
7250
7261
  lang: void 0,
7251
7262
  message: void 0,
7252
7263
  abortEarly: void 0,
7253
7264
  abortPipeEarly: void 0
7254
7265
  };
7255
7266
  /* @__NO_SIDE_EFFECTS__ */
7256
- function Ma(e) {
7267
+ function Ia(e) {
7257
7268
  return e ? {
7258
7269
  lang: e?.lang ?? void 0,
7259
7270
  message: e?.message,
7260
7271
  abortEarly: e?.abortEarly ?? void 0,
7261
7272
  abortPipeEarly: e?.abortPipeEarly ?? void 0
7262
- } : ja;
7273
+ } : Fa;
7263
7274
  }
7264
7275
  /* @__NO_SIDE_EFFECTS__ */
7265
- function Na(e, t, n) {
7266
- let r = e["~run"]({ value: t }, /* @__PURE__ */ Ma(n));
7276
+ function La(e, t, n) {
7277
+ let r = e["~run"]({ value: t }, /* @__PURE__ */ Ia(n));
7267
7278
  return {
7268
7279
  typed: r.typed,
7269
7280
  success: !r.issues,
@@ -7273,21 +7284,21 @@ function Na(e, t, n) {
7273
7284
  }
7274
7285
  //#endregion
7275
7286
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModulePresenter.es.js
7276
- var Pa = ji([
7287
+ var Ra = Fi([
7277
7288
  "list",
7278
7289
  "render",
7279
7290
  "setColorMode"
7280
- ]), Fa = /* @__PURE__ */ Q({
7281
- ...zi,
7282
- typeId: /* @__PURE__ */ Ci("presenter"),
7283
- actionNames: /* @__PURE__ */ xi(Pa),
7284
- presentations: /* @__PURE__ */ xi(Li)
7285
- }), Ia = [
7291
+ ]), za = /* @__PURE__ */ Q({
7292
+ ...Ui,
7293
+ typeId: /* @__PURE__ */ Di("presenter"),
7294
+ actionNames: /* @__PURE__ */ Ti(Ra),
7295
+ presentations: /* @__PURE__ */ Ti(Vi)
7296
+ }), Ba = [
7286
7297
  "1️⃣ ",
7287
7298
  "2️⃣ ",
7288
7299
  "3️⃣ ",
7289
7300
  "4️⃣ "
7290
- ], La = [{
7301
+ ], Va = [{
7291
7302
  id: "unit",
7292
7303
  label: "Run unit tests",
7293
7304
  command: "vitest",
@@ -7300,36 +7311,36 @@ var Pa = ji([
7300
7311
  arguments: ["test", "--pass-with-no-tests"],
7301
7312
  configFileName: "playwright.config.ts"
7302
7313
  }];
7303
- async function Ra() {
7314
+ async function Ha() {
7304
7315
  try {
7305
7316
  G("Build Project"), await U("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
7306
7317
  } catch (e) {
7307
7318
  console.error("❌ Error building project", e), process.exit(1);
7308
7319
  }
7309
7320
  }
7310
- async function za() {
7321
+ async function Ua() {
7311
7322
  try {
7312
7323
  G("Publish Project");
7313
7324
  let e = await W("package.json"), t = await W("config.json");
7314
- await Ja("1️⃣ ", e, t, Hn(t.id)), K(`Project version '${e.version ?? "unknown"}' published.`);
7325
+ await Qa("1️⃣ ", e, t, Hn(t.id)), K(`Project version '${e.version ?? "unknown"}' published.`);
7315
7326
  } catch (e) {
7316
7327
  console.error("❌ Error publishing project", e), process.exit(1);
7317
7328
  }
7318
7329
  }
7319
- async function Ba() {
7330
+ async function Wa() {
7320
7331
  try {
7321
7332
  G("Release Project");
7322
7333
  let e = await W("package.json"), t = await W("config.json");
7323
- await qa("1️⃣ ", e);
7334
+ await Za("1️⃣ ", e);
7324
7335
  let n = Hn(t.id);
7325
7336
  switch (n.typeId) {
7326
7337
  case "connector":
7327
- t = await Ha("2️⃣ ", e);
7338
+ t = await Ka("2️⃣ ", e);
7328
7339
  break;
7329
7340
  case "presenter":
7330
- t = await Ua("2️⃣ ", e);
7341
+ t = await qa("2️⃣ ", e);
7331
7342
  break;
7332
- default: t = await Va("2️⃣ ", e);
7343
+ default: t = await Ga("2️⃣ ", e);
7333
7344
  }
7334
7345
  await U("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
7335
7346
  "commit",
@@ -7339,7 +7350,7 @@ async function Ba() {
7339
7350
  "push",
7340
7351
  "origin",
7341
7352
  "main:main"
7342
- ]), await Ja("7️⃣ ", e, t, n), n.publishedTo === "npm" ? await U("8️⃣ Create GitHub release", "gh", [
7353
+ ]), await Qa("7️⃣ ", e, t, n), n.publishedTo === "npm" ? await U("8️⃣ Create GitHub release", "gh", [
7343
7354
  "release",
7344
7355
  "create",
7345
7356
  `v${e.version ?? "unknown"}`,
@@ -7352,39 +7363,39 @@ async function Ba() {
7352
7363
  console.error("❌ Error releasing project", e), process.exit(1);
7353
7364
  }
7354
7365
  }
7355
- async function Va(e, t) {
7366
+ async function Ga(e, t) {
7356
7367
  q(`${e} Build project configuration`);
7357
7368
  let n = await W("config.json");
7358
7369
  return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await Rn("logo.svg"), n.iconDark ??= await Rn("logoDark.svg"), await zn("config.json", n), n;
7359
7370
  }
7360
- async function Ha(e, t) {
7371
+ async function Ka(e, t) {
7361
7372
  q(`${e} Build connector project configuration`);
7362
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Na(Ki, n);
7373
+ let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ La(Xi, n);
7363
7374
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7364
7375
  let a = Gn(r);
7365
- return await Wa(t, n, a, Xi(a));
7376
+ return await Ja(t, n, a, ea(a));
7366
7377
  }
7367
- async function Ua(e, t) {
7378
+ async function qa(e, t) {
7368
7379
  q(`${e} Build presenter project configuration`);
7369
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Na(Fa, n);
7380
+ let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ La(za, n);
7370
7381
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7371
- return await Wa(t, n, Gn(r));
7382
+ return await Ja(t, n, Gn(r));
7372
7383
  }
7373
- async function Wa(e, t, n, r) {
7384
+ async function Ja(e, t, n, r) {
7374
7385
  return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations"), r === "unknown" ? console.warn("⚠️ No usage identified") : r && console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.actionNames = n, r !== void 0 && (t.usageId = r), await zn("config.json", t), t;
7375
7386
  }
7376
- async function Ga() {
7387
+ async function Ya() {
7377
7388
  try {
7378
7389
  G("Synchronise Project with GitHub");
7379
7390
  let e = await W("package.json"), t = await W("config.json");
7380
- switch (await qa("1️⃣ ", e), Hn(t.id).typeId) {
7391
+ switch (await Za("1️⃣ ", e), Hn(t.id).typeId) {
7381
7392
  case "connector":
7382
- await Ha("2️⃣ ", e);
7393
+ await Ka("2️⃣ ", e);
7383
7394
  break;
7384
7395
  case "presenter":
7385
- await Ua("2️⃣ ", e);
7396
+ await qa("2️⃣ ", e);
7386
7397
  break;
7387
- default: await Va("2️⃣ ", e);
7398
+ default: await Ga("2️⃣ ", e);
7388
7399
  }
7389
7400
  await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
7390
7401
  "commit",
@@ -7399,14 +7410,14 @@ async function Ga() {
7399
7410
  console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
7400
7411
  }
7401
7412
  }
7402
- async function Ka(e = ["unit"], t = !1) {
7413
+ async function Xa(e = ["unit"], t = !1) {
7403
7414
  try {
7404
7415
  G("Test Project");
7405
7416
  let n = 0;
7406
- for (let r of La) {
7417
+ for (let r of Va) {
7407
7418
  if (!e.includes(r.id) || await Rn(r.configFileName) === null) continue;
7408
7419
  let i = t && r.id === "unit" ? ["--coverage"] : [];
7409
- await U(`${Ia[n] ?? ""} ${r.label}`, r.command, [...r.arguments, ...i]), n += 1;
7420
+ await U(`${Ba[n] ?? ""} ${r.label}`, r.command, [...r.arguments, ...i]), n += 1;
7410
7421
  }
7411
7422
  if (n === 0) {
7412
7423
  console.warn("\n⚠️ No tests configured for this project.\n");
@@ -7417,7 +7428,7 @@ async function Ka(e = ["unit"], t = !1) {
7417
7428
  console.error("❌ Error testing project", e), process.exit(1);
7418
7429
  }
7419
7430
  }
7420
- async function qa(e, t, n = "./") {
7431
+ async function Za(e, t, n = "./") {
7421
7432
  if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
7422
7433
  else {
7423
7434
  let e = t.version, n = t.version.split(".");
@@ -7425,17 +7436,17 @@ async function qa(e, t, n = "./") {
7425
7436
  }
7426
7437
  await zn(`${n}package.json`, t);
7427
7438
  }
7428
- async function Ja(e, t, n, r) {
7429
- if (r.typeId === "app") q(`${e} Register module`), await Da();
7430
- else if (r.typeId === "engine") q(`${e} Register module`), await Aa(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await ka(n);
7439
+ async function Qa(e, t, n, r) {
7440
+ if (r.typeId === "app") q(`${e} Register module`), await ja();
7441
+ else if (r.typeId === "engine") q(`${e} Register module`), await Pa(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await Na(n);
7431
7442
  else if (r.uploadGroupName === void 0) q(`${e} Registration NOT required`);
7432
7443
  else {
7433
7444
  q(`${e} Register module`);
7434
7445
  let i = n.id.split("-").slice(2).join("-");
7435
- await Aa(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await ka(n);
7446
+ await Pa(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await Na(n);
7436
7447
  }
7437
7448
  }
7438
7449
  //#endregion
7439
- export { Jn as auditDependencies, Ra as buildProject, Yn as checkConfigFiles, nr as checkDependencies, ra as documentActions, dr as documentBundleSizes, Nr as documentDependencies, ei as documentGovernance, oa as documentOpening, _a as documentUsage, Ta as formatCode, Ea as lintCode, za as publishProject, Ba as releaseProject, Ga as syncProjectWithGitHub, Ka as testProject, Oa as uploadDirectoryToR2 };
7450
+ export { Jn as auditDependencies, Ha as buildProject, Zn as checkConfigFiles, or as checkDependencies, sa as documentActions, hr as documentBundleSizes, Lr as documentDependencies, ii as documentGovernance, ua as documentOpening, xa as documentUsage, ka as formatCode, Aa as lintCode, Ua as publishProject, Wa as releaseProject, Ya as syncProjectWithGitHub, Xa as testProject, Ma as uploadDirectoryToR2 };
7440
7451
 
7441
7452
  //# sourceMappingURL=dpuse-development.es.js.map