@dpuse/dpuse-development 0.3.753 → 0.3.754

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.
@@ -5908,37 +5908,35 @@ async function er() {
5908
5908
  try {
5909
5909
  G("Check configuration files"), q("1️⃣ Check individual files");
5910
5910
  let e = await W("config.json"), t = await W("package.json"), r = t.private === !0, i = Gn(e.id), a = n.dirname(o(import.meta.url));
5911
- await J(a, ".editorconfig"), await tr(i, a), await J(a, ".gitignore", [".gitignore_default"]), await J(a, ".markdownlint.json"), await J(a, ".ncurc.json"), await nr(i, a), await J(a, "LICENSE"), await ir(i, a), await ar(i, a), await or(i, a), await cr(i, a), rr(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 sr(i, a), await J(a, "SECURITY.md", [], (t) => t.replaceAll($n, () => e.id))), K("Configuration files checked");
5911
+ await J(a, ".editorconfig"), await J(a, ".gitattributes"), await J(a, ".gitignore", [".gitignore_default"]), await J(a, ".markdownlint.json"), await J(a, ".ncurc.json"), await tr(i, a), await J(a, "LICENSE"), await rr(i, a), await ir(i, a), await ar(i, a), await sr(i, a), nr(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 or(i, a), await J(a, "SECURITY.md", [], (t) => t.replaceAll($n, () => e.id))), K("Configuration files checked");
5912
5912
  } catch (e) {
5913
5913
  console.error("❌ Error checking configuration files", e), process.exit(1);
5914
5914
  }
5915
5915
  }
5916
5916
  async function tr(e, t) {
5917
- ["development"].includes(e.typeId) ? console.info("ℹ️ File '.gitattributes' is UNIQUE to this project") : await J(t, ".gitattributes", [".gitattributes_default"]);
5918
- }
5919
- async function nr(e, t) {
5920
5917
  ["github", "kb"].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is NOT required by this project") : [
5921
5918
  "app",
5922
5919
  "api",
5923
5920
  "development",
5924
5921
  "eslint"
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"]);
5922
+ ].includes(e.typeId) ? console.info("⚠️ File 'eslint.config.js' is UNIQUE to this project") : await J(t, "eslint.config.js", ["eslint.config.default.js"]);
5926
5923
  }
5927
- function rr(e, t) {
5928
- ["app", "development"].includes(e.typeId) ? console.info("ℹ️ File '.prettierrc.json' is UNIQUE to this project") : t.prettier === Qn ? console.info(`ℹ️ Prettier configuration is '${Qn}'`) : console.info(`⚠️ Prettier configuration is NOT '${Qn}'`);
5924
+ function nr(e, t) {
5925
+ e.typeId === "development" ? console.info("ℹ️ File '.prettierrc.json' is the template") : e.typeId === "app" ? console.info("⚠️ File '.prettierrc.json' is UNIQUE to this project") : t.prettier === Qn ? console.info(`ℹ️ Prettier configuration is '${Qn}'`) : console.info(`❌ Prettier configuration is NOT '${Qn}'`);
5929
5926
  }
5930
- async function ir(e, t) {
5927
+ async function rr(e, t) {
5931
5928
  ["github"].includes(e.typeId) ? console.info("ℹ️ File 'tsconfig.json' is NOT required by this project") : [
5932
5929
  "connector",
5930
+ "development",
5933
5931
  "engine",
5934
5932
  "shared",
5935
5933
  "tool"
5936
- ].includes(e.typeId) ? await J(t, "tsconfig.json", ["tsconfig.default.json"]) : console.info("ℹ️ File 'tsconfig.json' is UNIQUE to this project");
5934
+ ].includes(e.typeId) ? await J(t, "tsconfig.json") : console.info("⚠️ File 'tsconfig.json' is UNIQUE to this project");
5937
5935
  }
5938
- async function ar(e, t) {
5936
+ async function ir(e, t) {
5939
5937
  ["github"].includes(e.typeId) ? console.info("ℹ️ File 'tsconfig.scripts.json' is NOT required by this project") : await J(t, "tsconfig.scripts.json");
5940
5938
  }
5941
- async function or(e, t) {
5939
+ async function ar(e, t) {
5942
5940
  if ([
5943
5941
  "eslint",
5944
5942
  "github",
@@ -5950,16 +5948,16 @@ async function or(e, t) {
5950
5948
  "development",
5951
5949
  "engine",
5952
5950
  "shared"
5953
- ].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is UNIQUE to this project");
5951
+ ].includes(e.typeId)) console.info("⚠️ File 'vite.config.ts' is UNIQUE to this project");
5954
5952
  else {
5955
5953
  let n;
5956
5954
  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);
5957
5955
  }
5958
5956
  }
5959
- async function sr(e, t) {
5957
+ async function or(e, t) {
5960
5958
  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
5959
  }
5962
- async function cr(e, t) {
5960
+ async function sr(e, t) {
5963
5961
  [
5964
5962
  "app",
5965
5963
  "api",
@@ -5976,7 +5974,7 @@ async function J(e, t, r = [], i = (e) => e) {
5976
5974
  if (e.code !== "ENOENT") throw e;
5977
5975
  }
5978
5976
  if (s === void 0) {
5979
- console.info(`⚠️ File '${t}' is MISSING`);
5977
+ console.info(`❌ File '${t}' is MISSING`);
5980
5978
  return;
5981
5979
  }
5982
5980
  for (let r of o) {
@@ -5986,11 +5984,11 @@ async function J(e, t, r = [], i = (e) => e) {
5986
5984
  return;
5987
5985
  }
5988
5986
  }
5989
- console.info(`⚠️ File '${t.split("_", 1)[0] ?? t}' is NOT the same`);
5987
+ console.info(`❌ File '${t.split("_", 1)[0] ?? t}' is NOT the same`);
5990
5988
  }
5991
5989
  //#endregion
5992
5990
  //#region src/actions/checkDependencies.ts
5993
- async function lr() {
5991
+ async function cr() {
5994
5992
  try {
5995
5993
  G("Check Dependencies"), await U("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), q("2️⃣ Check using 'npm-check-updates'");
5996
5994
  let e = {};
@@ -6010,7 +6008,7 @@ async function lr() {
6010
6008
  "--prefer-online",
6011
6009
  "--no-strict-allow-scripts"
6012
6010
  ]);
6013
- let t = await ur();
6011
+ let t = await lr();
6014
6012
  t.length > 0 ? await U("4️⃣ Move install-script pins to installed versions", "npm", [
6015
6013
  "install-scripts",
6016
6014
  "approve",
@@ -6024,85 +6022,85 @@ async function lr() {
6024
6022
  console.error("❌ Error checking dependencies", e), process.exit(1);
6025
6023
  }
6026
6024
  }
6027
- async function ur() {
6025
+ async function lr() {
6028
6026
  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("@")));
6029
6027
  return [...new Set(t)];
6030
6028
  }
6031
6029
  //#endregion
6032
6030
  //#region src/actions/documentBundleSizes.ts
6033
- var dr = "<!-- BUNDLE_START -->", fr = "<!-- BUNDLE_END -->", pr = "&nbsp;&nbsp;&nbsp;&nbsp;", mr = 20, hr = "This report is updated each time the project is built, 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._", gr = "(bundler output, whitespace & JSON)", _r = `${gr} = 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 vr(e) {
6031
+ var ur = "<!-- BUNDLE_START -->", dr = "<!-- BUNDLE_END -->", fr = "&nbsp;&nbsp;&nbsp;&nbsp;", pr = 20, mr = "This report is updated each time the project is built, 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._", hr = "(bundler output, whitespace & JSON)", gr = `${hr} = 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.`;
6032
+ async function _r(e) {
6035
6033
  try {
6036
6034
  G("Document Bundle Sizes"), q("1️⃣ Read bundle analysis report");
6037
6035
  let t = await W("./bundle-analysis-reports/sonda/index.json");
6038
- q("2️⃣ Insert table into 'README.md'"), await Un(`## Bundle Analysis\n\n${hr}\n\n${yr(t, e?.moduleLevel ?? !1)}\n\n${_r}`, dr, fr), K("Bundle sizes documented");
6036
+ q("2️⃣ Insert table into 'README.md'"), await Un(`## Bundle Analysis\n\n${mr}\n\n${vr(t, e?.moduleLevel ?? !1)}\n\n${gr}`, ur, dr), K("Bundle sizes documented");
6039
6037
  } catch (e) {
6040
6038
  console.error("❌ Error documenting bundle sizes", e), process.exit(1);
6041
6039
  }
6042
6040
  }
6043
- function yr(e, t) {
6044
- let n = Er(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, Ar(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
6041
+ function vr(e, t) {
6042
+ let n = Tr(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, kr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
6045
6043
  for (let [e, o] of i) {
6046
- let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? br(e, o, wr(i), r, t) : xr(e, o, i, r, t);
6044
+ let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? yr(e, o, Cr(i), r, t) : br(e, o, i, r, t);
6047
6045
  a.push(...s);
6048
6046
  }
6049
6047
  return a.join("\n");
6050
6048
  }
6051
- function br(e, t, n, r, i) {
6049
+ function yr(e, t, n, r, i) {
6052
6050
  let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
6053
- if (s.size === 1) return [`| ${e} → ${Cr(a, Tr(s))} | ${jr(t)} · ${Mr(c)} |`];
6054
- let l = [`| ${e} → ${a} | ${jr(t)} · ${Mr(c)} |`];
6055
- return i || l.push(...Sr(s, pr, r)), l;
6051
+ if (s.size === 1) return [`| ${e} → ${Sr(a, wr(s))} | ${Ar(t)} · ${jr(c)} |`];
6052
+ let l = [`| ${e} → ${a} | ${Ar(t)} · ${jr(c)} |`];
6053
+ return i || l.push(...xr(s, fr, r)), l;
6056
6054
  }
6057
- function xr(e, t, n, r, i) {
6058
- let a = [`| ${e} | ${jr(t)} |`];
6055
+ function br(e, t, n, r, i) {
6056
+ let a = [`| ${e} | ${Ar(t)} |`];
6059
6057
  for (let [e, { sizes: t, files: o }] of n) {
6060
6058
  let n = r > 0 ? t.uncompressed / r * 100 : 0;
6061
6059
  if (o.size === 1) {
6062
- let t = Tr(o);
6063
- a.push(`| ${pr}${Cr(e, t)} | ${Mr(n)} |`);
6060
+ let t = wr(o);
6061
+ a.push(`| ${fr}${Sr(e, t)} | ${jr(n)} |`);
6064
6062
  continue;
6065
6063
  }
6066
- a.push(`| ${pr}${e} | ${Mr(n)} |`), i || a.push(...Sr(o, `${pr}${pr}`, r));
6064
+ a.push(`| ${fr}${e} | ${jr(n)} |`), i || a.push(...xr(o, `${fr}${fr}`, r));
6067
6065
  }
6068
6066
  return a;
6069
6067
  }
6070
- function Sr(e, t, n) {
6071
- return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${Mr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
6068
+ function xr(e, t, n) {
6069
+ return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${jr(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
6072
6070
  }
6073
- function Cr(e, t) {
6071
+ function Sr(e, t) {
6074
6072
  return t === "" ? e : `${e} → ${t}`;
6075
6073
  }
6076
- function wr(e) {
6074
+ function Cr(e) {
6077
6075
  let [t] = e;
6078
6076
  if (t === void 0) throw Error("Expected exactly one entry");
6079
6077
  return t;
6080
6078
  }
6081
- function Tr(e) {
6079
+ function wr(e) {
6082
6080
  let [t] = e.keys();
6083
6081
  if (t === void 0) throw Error("Expected exactly one file");
6084
6082
  return t;
6085
6083
  }
6086
- function Er(e) {
6087
- let t = Dr(e.dependencies), n = /* @__PURE__ */ new Map();
6084
+ function Tr(e) {
6085
+ let t = Er(e.dependencies), n = /* @__PURE__ */ new Map();
6088
6086
  for (let r of e.resources) {
6089
6087
  if (r.kind !== "chunk" || !r.parent) continue;
6090
- let { group: e, file: i } = Or(r.name, t), a = Ar(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
6088
+ let { group: e, file: i } = Dr(r.name, t), a = kr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
6091
6089
  n.set(r.parent, o);
6092
6090
  let s = o.get(e) ?? {
6093
- sizes: Nr(),
6091
+ sizes: Mr(),
6094
6092
  files: /* @__PURE__ */ new Map()
6095
6093
  };
6096
- o.set(e, s), Pr(s.sizes, a);
6097
- let c = s.files.get(i) ?? Nr();
6098
- s.files.set(i, c), Pr(c, a);
6094
+ o.set(e, s), Nr(s.sizes, a);
6095
+ let c = s.files.get(i) ?? Mr();
6096
+ s.files.set(i, c), Nr(c, a);
6099
6097
  }
6100
6098
  return n;
6101
6099
  }
6102
- function Dr(e) {
6100
+ function Er(e) {
6103
6101
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
6104
6102
  }
6105
- function Or(e, t) {
6103
+ function Dr(e, t) {
6106
6104
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
6107
6105
  if (n) {
6108
6106
  let [t, r] = n;
@@ -6112,53 +6110,53 @@ function Or(e, t) {
6112
6110
  };
6113
6111
  }
6114
6112
  return e === "[unassigned]" ? {
6115
- group: gr,
6113
+ group: hr,
6116
6114
  file: ""
6117
6115
  } : e.startsWith("\0") ? {
6118
6116
  group: "(runtime)",
6119
6117
  file: e.slice(1)
6120
6118
  } : {
6121
6119
  group: e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? "wasm" : "src",
6122
- file: kr(e)
6120
+ file: Or(e)
6123
6121
  };
6124
6122
  }
6125
- function kr(e) {
6123
+ function Or(e) {
6126
6124
  return e.split("/").at(-1) ?? e;
6127
6125
  }
6128
- function Ar(e) {
6126
+ function kr(e) {
6129
6127
  return {
6130
6128
  uncompressed: e.uncompressed,
6131
6129
  gzip: e.gzip ?? 0
6132
6130
  };
6133
6131
  }
6134
- function jr(e) {
6135
- return `${Fr(e.uncompressed)} · gzip ${Fr(e.gzip)}`;
6132
+ function Ar(e) {
6133
+ return `${Pr(e.uncompressed)} · gzip ${Pr(e.gzip)}`;
6136
6134
  }
6137
- function Mr(e) {
6138
- let t = Math.round(e / 100 * mr);
6139
- return `\`${"█".repeat(t)}${"░".repeat(mr - t)}\` ${e.toFixed(1)}%`;
6135
+ function jr(e) {
6136
+ let t = Math.round(e / 100 * pr);
6137
+ return `\`${"█".repeat(t)}${"░".repeat(pr - t)}\` ${e.toFixed(1)}%`;
6140
6138
  }
6141
- function Nr() {
6139
+ function Mr() {
6142
6140
  return {
6143
6141
  uncompressed: 0,
6144
6142
  gzip: 0
6145
6143
  };
6146
6144
  }
6147
- function Pr(e, t) {
6145
+ function Nr(e, t) {
6148
6146
  e.uncompressed += t.uncompressed, e.gzip += t.gzip;
6149
6147
  }
6150
- function Fr(e) {
6148
+ function Pr(e) {
6151
6149
  return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
6152
6150
  }
6153
6151
  //#endregion
6154
6152
  //#region src/actions/documentDependencies.ts
6155
- var Ir = "<!-- DEPENDENCY_LICENSES_START -->", Lr = "<!-- DEPENDENCY_LICENSES_END -->", Rr = "## Dependency Licenses", zr = "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 Br(e = "MIT") {
6153
+ var Fr = "<!-- DEPENDENCY_LICENSES_START -->", Ir = "<!-- DEPENDENCY_LICENSES_END -->", Lr = "## Dependency Licenses", Rr = "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.";
6154
+ async function zr(e = "MIT") {
6157
6155
  try {
6158
6156
  G("Document Dependencies");
6159
6157
  let t = await W("package.json");
6160
6158
  if (t.name === "@dpuse/dpuse-development" || t.name === "@dpuse/eslint-config-dpuse") {
6161
- await Vr(t.name), K("Dependencies documented");
6159
+ await Br(t.name), K("Dependencies documented");
6162
6160
  return;
6163
6161
  }
6164
6162
  await In("1️⃣ Clear downloaded licenses", "licenses/downloads"), q("2️⃣ Identify production licenses"), await new Promise((n, r) => {
@@ -6181,36 +6179,36 @@ async function Br(e = "MIT") {
6181
6179
  "--all",
6182
6180
  "--json",
6183
6181
  "--omit=dev"
6184
- ], "licenses/licenseTree.json"), await Hr("4️⃣ ", e), K("Dependencies documented");
6182
+ ], "licenses/licenseTree.json"), await Vr("4️⃣ ", e), K("Dependencies documented");
6185
6183
  } catch (e) {
6186
6184
  console.error("❌ Error documenting dependencies", e), process.exit(1);
6187
6185
  }
6188
6186
  }
6189
- async function Vr(e) {
6190
- q(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`), await Un(`${Rr}\n\n${`> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`}`, Ir, Lr);
6187
+ async function Br(e) {
6188
+ q(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`), await Un(`${Lr}\n\n${`> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`}`, Fr, Ir);
6191
6189
  }
6192
- async function Hr(e, t) {
6190
+ async function Vr(e, t) {
6193
6191
  q(`${e} Insert licenses into 'README.md'`);
6194
6192
  let [n, r] = await Promise.all([W("licenses/licenses.json"), W("licenses/licenseTree.json")]), i = /* @__PURE__ */ new Map();
6195
- for (let [e, t] of Object.entries(n)) i.set(e, Gr(e, t));
6193
+ for (let [e, t] of Object.entries(n)) i.set(e, Wr(e, t));
6196
6194
  await Promise.all(i.values().map(async (e) => {
6197
- let t = await Kr(e.name, e.installedVersion);
6195
+ let t = await Gr(e.name, e.installedVersion);
6198
6196
  e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
6199
6197
  }));
6200
- let a = `${Ur(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
6201
- for (let e of i.values()) a += qr(e);
6198
+ let a = `${Hr(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
6199
+ for (let e of i.values()) a += Kr(e);
6202
6200
  let o = [];
6203
- r.dependencies != null && Jr(r.dependencies, i, o, 0);
6204
- let s = `${zr}\n\n${o.join("\n")}`;
6205
- await Un(`${Rr}\n\n${a.trimEnd()}\n\n### Dependency Tree\n\n${s}`, Ir, Lr);
6201
+ r.dependencies != null && qr(r.dependencies, i, o, 0);
6202
+ let s = `${Rr}\n\n${o.join("\n")}`;
6203
+ await Un(`${Lr}\n\n${a.trimEnd()}\n\n### Dependency Tree\n\n${s}`, Fr, Ir);
6206
6204
  }
6207
- function Ur(e) {
6208
- return `License data is updated each time \`npm run document\` is run, 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 ${Wr(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.`;
6205
+ function Hr(e) {
6206
+ return `License data is updated each time \`npm run document\` is run, 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 ${Ur(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.`;
6209
6207
  }
6210
- function Wr(e) {
6208
+ function Ur(e) {
6211
6209
  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))}`;
6212
6210
  }
6213
- function Gr(e, t) {
6211
+ function Wr(e, t) {
6214
6212
  let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
6215
6213
  return {
6216
6214
  name: r,
@@ -6224,7 +6222,7 @@ function Gr(e, t) {
6224
6222
  ...t.licenseFile != null && { licenseFileLink: t.licenseFile }
6225
6223
  };
6226
6224
  }
6227
- async function Kr(e, t) {
6225
+ async function Gr(e, t) {
6228
6226
  try {
6229
6227
  let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
6230
6228
  if (n.ok) {
@@ -6242,25 +6240,25 @@ async function Kr(e, t) {
6242
6240
  publishedDate: ""
6243
6241
  };
6244
6242
  }
6245
- function qr(e) {
6243
+ function Kr(e) {
6246
6244
  let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
6247
6245
  return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
6248
6246
  }
6249
- function Jr(e, t, n, r) {
6247
+ function qr(e, t, n, r) {
6250
6248
  let i = " ".repeat(r);
6251
6249
  for (let [a, o] of Object.entries(e)) {
6252
- let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Yr(s);
6253
- n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && Jr(o.dependencies, t, n, r + 1);
6250
+ let e = o.version ?? "", s = t.get(`${a}@${e}`), c = s == null ? a : `[${a}](${s.repository})`, l = Jr(s);
6251
+ n.push(`${i}- **${c}** ${e}${l}`), o.dependencies != null && qr(o.dependencies, t, n, r + 1);
6254
6252
  }
6255
6253
  }
6256
- function Yr(e) {
6254
+ function Jr(e) {
6257
6255
  if (e == null) return "";
6258
- let t = e.publishedDate ? Xr(e.publishedDate.split("T", 1)[0]) : "";
6256
+ let t = e.publishedDate ? Yr(e.publishedDate.split("T", 1)[0]) : "";
6259
6257
  if (e.latestVersion === "" || e.latestVersion === e.installedVersion) return t === "" ? "" : ` — ${t}`;
6260
- let n = e.latestPublishedDate ? Xr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6258
+ let n = e.latestPublishedDate ? Yr(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
6261
6259
  return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
6262
6260
  }
6263
- function Xr(e) {
6261
+ function Yr(e) {
6264
6262
  if (e == null || e === "") return "n/a";
6265
6263
  let t = e.split("T", 1)[0];
6266
6264
  if (t == null || t === "") return "n/a";
@@ -6269,39 +6267,39 @@ function Xr(e) {
6269
6267
  }
6270
6268
  //#endregion
6271
6269
  //#region src/actions/documentGovernance.ts
6272
- var Zr = "<!-- GOVERNANCE_START -->", Qr = "<!-- GOVERNANCE_END -->", $r = {
6270
+ var Xr = "<!-- GOVERNANCE_START -->", Zr = "<!-- GOVERNANCE_END -->", Qr = {
6273
6271
  "Branch-Protection": 3,
6274
6272
  "Code-Review": 0,
6275
6273
  Contributors: 0
6276
- }, ei = /* @__PURE__ */ new Set(["CII-Best-Practices"]), ti = "coverage/coverage-final.json", ni = "coverage/coverage-summary.json", ri = 80, ii = {
6274
+ }, $r = /* @__PURE__ */ new Set(["CII-Best-Practices"]), ei = "coverage/coverage-final.json", ti = "coverage/coverage-summary.json", ni = 80, ri = {
6277
6275
  actions: "GitHub Actions",
6278
6276
  "javascript-typescript": "JavaScript/TypeScript",
6279
6277
  rust: "Rust"
6280
- }, ai = {
6278
+ }, ii = {
6281
6279
  A: "brightgreen",
6282
6280
  B: "green",
6283
6281
  C: "yellow",
6284
6282
  D: "orange",
6285
6283
  F: "red"
6286
- }, oi = `${jn}/health.json`, si = r(i);
6287
- async function ci() {
6284
+ }, ai = `${jn}/health.json`, oi = r(i);
6285
+ async function si() {
6288
6286
  try {
6289
6287
  G("Document Governance");
6290
- let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = await li(e), r = await ui(e, n === void 0 ? [] : ["--coverage", ti]), { owner: i, repo: a } = Kn(e, "document governance");
6288
+ let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = await ci(e), r = await li(e, n === void 0 ? [] : ["--coverage", ei]), { owner: i, repo: a } = Kn(e, "document governance");
6291
6289
  q("4️⃣ Read security checks and settings");
6292
- let o = await fi(i, a, e);
6290
+ let o = await di(i, a, e);
6293
6291
  q("5️⃣ Look up OpenSSF Best Practices badge and Scorecard results");
6294
- let [s, c] = await Promise.all([mi(`https://github.com/${i}/${a}`), hi(`github.com/${i}/${a}`)]);
6295
- q("6️⃣ Insert governance content into 'README.md'"), await Un(xi(i, a, _i(e), vi(t.firstCreatedAt), {
6292
+ let [s, c] = await Promise.all([pi(`https://github.com/${i}/${a}`), mi(`github.com/${i}/${a}`)]);
6293
+ q("6️⃣ Insert governance content into 'README.md'"), await Un(bi(i, a, gi(e), _i(t.firstCreatedAt), {
6296
6294
  coveragePercent: n,
6297
6295
  fallowHealth: r,
6298
6296
  securitySettings: o
6299
- }, s, c), Zr, Qr), K("Governance documented");
6297
+ }, s, c), Xr, Zr), K("Governance documented");
6300
6298
  } catch (e) {
6301
6299
  console.error("❌ Error documenting governance", e), process.exit(1);
6302
6300
  }
6303
6301
  }
6304
- async function li(e) {
6302
+ async function ci(e) {
6305
6303
  if (e.devDependencies?.["@vitest/coverage-v8"] == null) {
6306
6304
  q("1️⃣ Test coverage NOT measured, as '@vitest/coverage-v8' is not installed");
6307
6305
  return;
@@ -6311,10 +6309,10 @@ async function li(e) {
6311
6309
  "--passWithNoTests",
6312
6310
  "--coverage"
6313
6311
  ]);
6314
- let t = await Vn(ni);
6312
+ let t = await Vn(ti);
6315
6313
  return t === null ? void 0 : JSON.parse(t).total.lines.pct;
6316
6314
  }
6317
- async function ui(e, t) {
6315
+ async function li(e, t) {
6318
6316
  if (e.devDependencies?.fallow == null) {
6319
6317
  q("2️⃣ Code health NOT measured, as Fallow is not installed"), q("3️⃣ Code health report NOT required");
6320
6318
  return;
@@ -6325,32 +6323,32 @@ async function ui(e, t) {
6325
6323
  "--format",
6326
6324
  "json",
6327
6325
  ...t
6328
- ], oi), await zn("3️⃣ Write code health report", "fallow", ["--format", "markdown"], Nn, !0);
6329
- let n = await W(oi);
6330
- return await di(n), n;
6326
+ ], ai), await zn("3️⃣ Write code health report", "fallow", ["--format", "markdown"], Nn, !0);
6327
+ let n = await W(ai);
6328
+ return await ui(n), n;
6331
6329
  }
6332
- async function di(e) {
6330
+ async function ui(e) {
6333
6331
  let { score: t, grade: n } = e.health_score;
6334
6332
  await Hn(Mn, {
6335
6333
  schemaVersion: 1,
6336
6334
  label: "fallow",
6337
6335
  message: `${n} (${String(Math.round(t))})`,
6338
- color: ai[n] ?? "lightgrey"
6336
+ color: ii[n] ?? "lightgrey"
6339
6337
  });
6340
6338
  }
6341
- async function fi(e, t, n) {
6339
+ async function di(e, t, n) {
6342
6340
  let [r, i, a] = await Promise.all([
6343
6341
  Vn(".github/workflows/ci.yml"),
6344
6342
  Vn(".github/workflows/codeql.yml"),
6345
6343
  Vn(".github/dependabot.yml")
6346
6344
  ]), [o, s, c, l] = await Promise.all([
6347
- pi(`repos/${e}/${t}`),
6348
- pi(`repos/${e}/${t}/private-vulnerability-reporting`),
6349
- pi(`repos/${e}/${t}/vulnerability-alerts`),
6350
- pi(`repos/${e}/${t}/commits/main/check-runs?per_page=100`)
6345
+ fi(`repos/${e}/${t}`),
6346
+ fi(`repos/${e}/${t}/private-vulnerability-reporting`),
6347
+ fi(`repos/${e}/${t}/vulnerability-alerts`),
6348
+ fi(`repos/${e}/${t}/commits/main/check-runs?per_page=100`)
6351
6349
  ]), 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;
6352
6350
  return {
6353
- codeQLLanguages: (i ?? "").matchAll(/- language: ([\w-]+)/g).map(([, e = ""]) => ii[e] ?? e).toArray(),
6351
+ codeQLLanguages: (i ?? "").matchAll(/- language: ([\w-]+)/g).map(([, e = ""]) => ri[e] ?? e).toArray(),
6354
6352
  codeQLQueries: /queries: ([\w-]+)/.exec(i ?? "")?.[1],
6355
6353
  dependabotAlerts: c !== void 0,
6356
6354
  dependabotSecurityUpdates: d("dependabot_security_updates"),
@@ -6366,37 +6364,37 @@ async function fi(e, t, n) {
6366
6364
  testsInCI: r?.includes("npm test") ?? !1
6367
6365
  };
6368
6366
  }
6369
- async function pi(e) {
6367
+ async function fi(e) {
6370
6368
  try {
6371
- let { stdout: t } = await si("gh", ["api", e]);
6369
+ let { stdout: t } = await oi("gh", ["api", e]);
6372
6370
  return t;
6373
6371
  } catch (e) {
6374
6372
  if (String(e.stderr).includes("HTTP 404")) return;
6375
6373
  throw e;
6376
6374
  }
6377
6375
  }
6378
- async function mi(e) {
6376
+ async function pi(e) {
6379
6377
  let t = await fetch(`https://www.bestpractices.dev/projects.json?url=${encodeURIComponent(e)}`);
6380
6378
  if (!t.ok) throw Error(`OpenSSF Best Practices lookup failed with status ${String(t.status)}.`);
6381
6379
  return (await t.json()).find((t) => t.repo_url === e)?.id;
6382
6380
  }
6383
- async function hi(e) {
6381
+ async function mi(e) {
6384
6382
  let t = await fetch(`https://api.scorecard.dev/projects/${e}`);
6385
6383
  if (t.status !== 404) {
6386
6384
  if (!t.ok) throw Error(`OpenSSF Scorecard lookup failed with status ${String(t.status)}.`);
6387
6385
  return await t.json();
6388
6386
  }
6389
6387
  }
6390
- function gi(e) {
6391
- return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || ei.has(e) || $r[e] !== void 0 && t >= $r[e]);
6388
+ function hi(e) {
6389
+ return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || $r.has(e) || Qr[e] !== void 0 && t >= Qr[e]);
6392
6390
  }
6393
- function _i(e) {
6391
+ function gi(e) {
6394
6392
  let t = e.author, n = typeof t == "string" ? t : t?.name;
6395
6393
  if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
6396
6394
  let r = n.indexOf("<"), i = r === -1 ? -1 : n.indexOf(">", r);
6397
6395
  return i === -1 ? n.trim() : [n.slice(0, r).trim(), n.slice(i + 1).trim()].filter((e) => e !== "").join(" ");
6398
6396
  }
6399
- function vi(e) {
6397
+ function _i(e) {
6400
6398
  let t = (/* @__PURE__ */ new Date()).getFullYear();
6401
6399
  if (e == null) return String(t);
6402
6400
  let n = new Date(e).getFullYear();
@@ -6405,7 +6403,7 @@ function vi(e) {
6405
6403
  function Y(e, t = "On") {
6406
6404
  return e === void 0 ? "❔ Unknown" : e ? `✅ ${t}` : "❌ Off";
6407
6405
  }
6408
- function yi(e, t) {
6406
+ function vi(e, t) {
6409
6407
  return t.length === 0 ? "" : `### ${e}
6410
6408
 
6411
6409
  |Check or setting|Status|What it does|
@@ -6414,7 +6412,7 @@ ${t.map((e) => `|${e.join("|")}|`).join("\n")}
6414
6412
 
6415
6413
  `;
6416
6414
  }
6417
- function bi(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i }) {
6415
+ function yi(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i }) {
6418
6416
  let a = `https://github.com/${e}/${t}`, o = [[
6419
6417
  `[SonarCloud](https://sonarcloud.io/summary/new_code?id=${e}_${t})`,
6420
6418
  Y(i.sonarCloud),
@@ -6454,11 +6452,11 @@ function bi(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i })
6454
6452
  "Fuzz testing: many random inputs per test to find edge cases, run with the unit tests."
6455
6453
  ]];
6456
6454
  if (n !== void 0) {
6457
- let e = n >= ri ? "✅" : "⚠️";
6455
+ let e = n >= ni ? "✅" : "⚠️";
6458
6456
  l.push([
6459
6457
  "Test coverage",
6460
6458
  `${e} ${n.toFixed(1)}% of lines`,
6461
- `Share of source lines the unit tests run. The target is ${String(ri)}%.`
6459
+ `Share of source lines the unit tests run. The target is ${String(ni)}%.`
6462
6460
  ]);
6463
6461
  }
6464
6462
  let u = [
@@ -6490,13 +6488,13 @@ function bi(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i })
6490
6488
  ];
6491
6489
  return `This section is updated each time \`npm run document\` is run. Settings come from the repository's workflow files and GitHub, and test coverage and the Fallow score are measured at the same time.
6492
6490
 
6493
- ${yi("Testing", l)}${yi("Code Quality", o)}${yi("Security Analysis", c)}${yi("Dependencies", u)}`;
6491
+ ${vi("Testing", l)}${vi("Code Quality", o)}${vi("Security Analysis", c)}${vi("Dependencies", u)}`;
6494
6492
  }
6495
- function xi(e, t, n, r, i, a, o) {
6496
- let s = `https://github.com/${e}/${t}`, c = `github.com/${e}/${t}`, l = `https://www.bestpractices.dev/projects/${String(a)}`, u = o !== void 0 && gi(o) ? "\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." : "", d = a === void 0 ? "" : `[![OpenSSF Best Practices](${l}/badge)](${l})\n`, f = i.securitySettings.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${s}/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.";
6493
+ function bi(e, t, n, r, i, a, o) {
6494
+ let s = `https://github.com/${e}/${t}`, c = `github.com/${e}/${t}`, l = `https://www.bestpractices.dev/projects/${String(a)}`, u = o !== void 0 && hi(o) ? "\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." : "", d = a === void 0 ? "" : `[![OpenSSF Best Practices](${l}/badge)](${l})\n`, f = i.securitySettings.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${s}/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.";
6497
6495
  return `## Quality & Security
6498
6496
 
6499
- ${bi(e, t, i)}### OpenSSF 🚧
6497
+ ${yi(e, t, i)}### OpenSSF 🚧
6500
6498
 
6501
6499
  ${d}[![OpenSSF Scorecard](https://api.scorecard.dev/projects/${c}/badge)](https://scorecard.dev/viewer/?uri=${c})
6502
6500
 
@@ -6520,28 +6518,28 @@ This project is licensed under the MIT License, permitting free use, modificatio
6520
6518
  }
6521
6519
  //#endregion
6522
6520
  //#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-DT3mO5rS.js
6523
- var Si = {
6521
+ var xi = {
6524
6522
  lang: void 0,
6525
6523
  message: void 0,
6526
6524
  abortEarly: void 0,
6527
6525
  abortPipeEarly: void 0
6528
6526
  };
6529
6527
  /* @__NO_SIDE_EFFECTS__ */
6530
- function Ci(e) {
6528
+ function Si(e) {
6531
6529
  return e ? {
6532
6530
  lang: e?.lang ?? void 0,
6533
6531
  message: e?.message,
6534
6532
  abortEarly: e?.abortEarly ?? void 0,
6535
6533
  abortPipeEarly: e?.abortPipeEarly ?? void 0
6536
- } : Si;
6534
+ } : xi;
6537
6535
  }
6538
6536
  /* @__NO_SIDE_EFFECTS__ */
6539
- function wi(e) {
6537
+ function Ci(e) {
6540
6538
  let t = typeof e;
6541
6539
  return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
6542
6540
  }
6543
6541
  function X(e, t, n, r, i) {
6544
- let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ wi(a), c = {
6542
+ let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ Ci(a), c = {
6545
6543
  kind: e.kind,
6546
6544
  type: e.type,
6547
6545
  input: a,
@@ -6558,39 +6556,39 @@ function X(e, t, n, r, i) {
6558
6556
  u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
6559
6557
  }
6560
6558
  /* @__NO_SIDE_EFFECTS__ */
6561
- function Ti(e, t) {
6559
+ function wi(e, t) {
6562
6560
  return e === t || Number.isNaN(e) && Number.isNaN(t);
6563
6561
  }
6564
6562
  /* @__NO_SIDE_EFFECTS__ */
6565
- function Ei(e, t) {
6563
+ function Ti(e, t) {
6566
6564
  return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
6567
6565
  }
6568
6566
  /* @__NO_SIDE_EFFECTS__ */
6569
- function Di(e, t) {
6567
+ function Ei(e, t) {
6570
6568
  let n = [...new Set(e)];
6571
6569
  return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
6572
6570
  }
6573
- function Oi(e) {
6571
+ function Di(e) {
6574
6572
  return e["~standard"] = {
6575
6573
  version: 1,
6576
6574
  vendor: "valibot",
6577
- validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ Ci())
6575
+ validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ Si())
6578
6576
  }, e;
6579
6577
  }
6580
6578
  /* @__NO_SIDE_EFFECTS__ */
6581
- function ki(e, t, n) {
6579
+ function Oi(e, t, n) {
6582
6580
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
6583
6581
  }
6584
6582
  /* @__NO_SIDE_EFFECTS__ */
6585
- function Ai(e, t, n) {
6583
+ function ki(e, t, n) {
6586
6584
  return typeof e.default == "function" ? e.default(t, n) : e.default;
6587
6585
  }
6588
6586
  /* @__NO_SIDE_EFFECTS__ */
6589
- function ji(e, t) {
6590
- return Oi({
6587
+ function Ai(e, t) {
6588
+ return Di({
6591
6589
  kind: "schema",
6592
6590
  type: "array",
6593
- reference: ji,
6591
+ reference: Ai,
6594
6592
  expects: "Array",
6595
6593
  async: !1,
6596
6594
  item: e,
@@ -6623,11 +6621,11 @@ function ji(e, t) {
6623
6621
  });
6624
6622
  }
6625
6623
  /* @__NO_SIDE_EFFECTS__ */
6626
- function Mi(e) {
6627
- return Oi({
6624
+ function ji(e) {
6625
+ return Di({
6628
6626
  kind: "schema",
6629
6627
  type: "boolean",
6630
- reference: Mi,
6628
+ reference: ji,
6631
6629
  expects: "boolean",
6632
6630
  async: !1,
6633
6631
  message: e,
@@ -6637,23 +6635,23 @@ function Mi(e) {
6637
6635
  });
6638
6636
  }
6639
6637
  /* @__NO_SIDE_EFFECTS__ */
6640
- function Ni(e, t) {
6641
- return Oi({
6638
+ function Mi(e, t) {
6639
+ return Di({
6642
6640
  kind: "schema",
6643
6641
  type: "literal",
6644
- reference: Ni,
6645
- expects: /* @__PURE__ */ wi(e),
6642
+ reference: Mi,
6643
+ expects: /* @__PURE__ */ Ci(e),
6646
6644
  async: !1,
6647
6645
  literal: e,
6648
6646
  message: t,
6649
6647
  "~run"(e, t) {
6650
- return /* @__PURE__ */ Ti(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
6648
+ return /* @__PURE__ */ wi(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
6651
6649
  }
6652
6650
  });
6653
6651
  }
6654
6652
  /* @__NO_SIDE_EFFECTS__ */
6655
6653
  function Z(e, t) {
6656
- return Oi({
6654
+ return Di({
6657
6655
  kind: "schema",
6658
6656
  type: "nullable",
6659
6657
  reference: Z,
@@ -6662,16 +6660,16 @@ function Z(e, t) {
6662
6660
  wrapped: e,
6663
6661
  default: t,
6664
6662
  "~run"(e, t) {
6665
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ Ai(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6663
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ ki(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6666
6664
  }
6667
6665
  });
6668
6666
  }
6669
6667
  /* @__NO_SIDE_EFFECTS__ */
6670
- function Pi(e) {
6671
- return Oi({
6668
+ function Ni(e) {
6669
+ return Di({
6672
6670
  kind: "schema",
6673
6671
  type: "number",
6674
- reference: Pi,
6672
+ reference: Ni,
6675
6673
  expects: "number",
6676
6674
  async: !1,
6677
6675
  message: e,
@@ -6681,26 +6679,26 @@ function Pi(e) {
6681
6679
  });
6682
6680
  }
6683
6681
  /* @__NO_SIDE_EFFECTS__ */
6684
- function Fi(e, t) {
6685
- return Oi({
6682
+ function Pi(e, t) {
6683
+ return Di({
6686
6684
  kind: "schema",
6687
6685
  type: "optional",
6688
- reference: Fi,
6686
+ reference: Pi,
6689
6687
  expects: `(${e.expects} | undefined)`,
6690
6688
  async: !1,
6691
6689
  wrapped: e,
6692
6690
  default: t,
6693
6691
  "~run"(e, t) {
6694
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ Ai(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6692
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ ki(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6695
6693
  }
6696
6694
  });
6697
6695
  }
6698
6696
  /* @__NO_SIDE_EFFECTS__ */
6699
- function Ii(e, t, n) {
6700
- return Oi({
6697
+ function Fi(e, t, n) {
6698
+ return Di({
6701
6699
  kind: "schema",
6702
6700
  type: "record",
6703
- reference: Ii,
6701
+ reference: Fi,
6704
6702
  expects: "Object",
6705
6703
  async: !1,
6706
6704
  key: e,
@@ -6710,7 +6708,7 @@ function Ii(e, t, n) {
6710
6708
  let n = e.value;
6711
6709
  if (n && typeof n == "object") {
6712
6710
  e.typed = !0, e.value = {};
6713
- for (let r in n) if (/* @__PURE__ */ Ei(n, r)) {
6711
+ for (let r in n) if (/* @__PURE__ */ Ti(n, r)) {
6714
6712
  let i = n[r], a = this.key["~run"]({ value: r }, t);
6715
6713
  if (a.issues) {
6716
6714
  let o = {
@@ -6750,7 +6748,7 @@ function Ii(e, t, n) {
6750
6748
  }
6751
6749
  /* @__NO_SIDE_EFFECTS__ */
6752
6750
  function Q(e, t) {
6753
- return Oi({
6751
+ return Di({
6754
6752
  kind: "schema",
6755
6753
  type: "strict_object",
6756
6754
  reference: Q,
@@ -6765,7 +6763,7 @@ function Q(e, t) {
6765
6763
  for (let r in this.entries) {
6766
6764
  let i = this.entries[r];
6767
6765
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
6768
- let a = r in n ? n[r] : /* @__PURE__ */ Ai(i), o = i["~run"]({ value: a }, t);
6766
+ let a = r in n ? n[r] : /* @__PURE__ */ ki(i), o = i["~run"]({ value: a }, t);
6769
6767
  if (o.issues) {
6770
6768
  let i = {
6771
6769
  type: "object",
@@ -6781,7 +6779,7 @@ function Q(e, t) {
6781
6779
  }
6782
6780
  }
6783
6781
  o.typed || (e.typed = !1), e.value[r] = o.value;
6784
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ ki(i);
6782
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ Oi(i);
6785
6783
  else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (X(this, "key", e, t, {
6786
6784
  input: void 0,
6787
6785
  expected: `"${r}"`,
@@ -6817,7 +6815,7 @@ function Q(e, t) {
6817
6815
  }
6818
6816
  /* @__NO_SIDE_EFFECTS__ */
6819
6817
  function $(e) {
6820
- return Oi({
6818
+ return Di({
6821
6819
  kind: "schema",
6822
6820
  type: "string",
6823
6821
  reference: $,
@@ -6830,19 +6828,19 @@ function $(e) {
6830
6828
  });
6831
6829
  }
6832
6830
  /* @__NO_SIDE_EFFECTS__ */
6833
- function Li(e) {
6831
+ function Ii(e) {
6834
6832
  let t;
6835
6833
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
6836
6834
  else t = n.issues;
6837
6835
  return t;
6838
6836
  }
6839
6837
  /* @__NO_SIDE_EFFECTS__ */
6840
- function Ri(e, t) {
6841
- return Oi({
6838
+ function Li(e, t) {
6839
+ return Di({
6842
6840
  kind: "schema",
6843
6841
  type: "union",
6844
- reference: Ri,
6845
- expects: /* @__PURE__ */ Di(e.map((e) => e.expects), "|"),
6842
+ reference: Li,
6843
+ expects: /* @__PURE__ */ Ei(e.map((e) => e.expects), "|"),
6846
6844
  async: !1,
6847
6845
  options: e,
6848
6846
  message: t,
@@ -6861,29 +6859,29 @@ function Ri(e, t) {
6861
6859
  if (n) return n;
6862
6860
  if (r) {
6863
6861
  if (r.length === 1) return r[0];
6864
- X(this, "type", e, t, { issues: /* @__PURE__ */ Li(r) }), e.typed = !0;
6862
+ X(this, "type", e, t, { issues: /* @__PURE__ */ Ii(r) }), e.typed = !0;
6865
6863
  } else if (i?.length === 1) return i[0];
6866
- else X(this, "type", e, t, { issues: /* @__PURE__ */ Li(i) });
6864
+ else X(this, "type", e, t, { issues: /* @__PURE__ */ Ii(i) });
6867
6865
  return e;
6868
6866
  }
6869
6867
  });
6870
6868
  }
6871
- var zi = /* @__PURE__ */ Q({
6869
+ var Ri = /* @__PURE__ */ Q({
6872
6870
  en: /* @__PURE__ */ $(),
6873
6871
  es: /* @__PURE__ */ $()
6874
- }), Bi = {
6872
+ }), zi = {
6875
6873
  id: /* @__PURE__ */ $(),
6876
6874
  label: /* @__PURE__ */ Q({
6877
- en: /* @__PURE__ */ Fi(/* @__PURE__ */ $()),
6878
- es: /* @__PURE__ */ Fi(/* @__PURE__ */ $())
6875
+ en: /* @__PURE__ */ Pi(/* @__PURE__ */ $()),
6876
+ es: /* @__PURE__ */ Pi(/* @__PURE__ */ $())
6879
6877
  }),
6880
6878
  description: /* @__PURE__ */ Q({
6881
- en: /* @__PURE__ */ Fi(/* @__PURE__ */ $()),
6882
- es: /* @__PURE__ */ Fi(/* @__PURE__ */ $())
6879
+ en: /* @__PURE__ */ Pi(/* @__PURE__ */ $()),
6880
+ es: /* @__PURE__ */ Pi(/* @__PURE__ */ $())
6883
6881
  }),
6884
6882
  icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6885
6883
  iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $())
6886
- }, Vi = (e) => /* @__PURE__ */ Ri(e.map((e) => /* @__PURE__ */ Ni(e))), Hi = Vi([
6884
+ }, Bi = (e) => /* @__PURE__ */ Li(e.map((e) => /* @__PURE__ */ Mi(e))), Vi = Bi([
6887
6885
  "app",
6888
6886
  "connector",
6889
6887
  "connectorConnection",
@@ -6905,33 +6903,33 @@ var zi = /* @__PURE__ */ Q({
6905
6903
  "presenter",
6906
6904
  "presenterPresentation",
6907
6905
  "tool"
6908
- ]), Ui = Vi([
6906
+ ]), Hi = Bi([
6909
6907
  "danger",
6910
6908
  "success",
6911
6909
  "warning"
6912
- ]), Wi = Vi([
6910
+ ]), Ui = Bi([
6913
6911
  "alpha",
6914
6912
  "beta",
6915
6913
  "releaseCandidate",
6916
6914
  "generalAvailability"
6917
- ]), Gi = /* @__PURE__ */ Q({
6918
- color: Ui,
6915
+ ]), Wi = /* @__PURE__ */ Q({
6916
+ color: Hi,
6919
6917
  label: /* @__PURE__ */ $()
6920
- }), Ki = {
6921
- ...Bi,
6922
- typeId: Hi
6923
- }, qi = /* @__PURE__ */ Q({
6924
- ...Ki,
6925
- order: /* @__PURE__ */ Pi(),
6918
+ }), Gi = {
6919
+ ...zi,
6920
+ typeId: Vi
6921
+ }, Ki = /* @__PURE__ */ Q({
6922
+ ...Gi,
6923
+ order: /* @__PURE__ */ Ni(),
6926
6924
  path: /* @__PURE__ */ $()
6927
- }), Ji = {
6928
- ...Ki,
6929
- firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Pi()),
6930
- lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Pi()),
6931
- status: /* @__PURE__ */ Z(Gi),
6932
- statusId: /* @__PURE__ */ Z(Wi)
6925
+ }), qi = {
6926
+ ...Gi,
6927
+ firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Ni()),
6928
+ lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ Ni()),
6929
+ status: /* @__PURE__ */ Z(Wi),
6930
+ statusId: /* @__PURE__ */ Z(Ui)
6933
6931
  };
6934
- ({ ...Ji }), Vi([
6932
+ ({ ...qi }), Bi([
6935
6933
  "app",
6936
6934
  "engine",
6937
6935
  "connector",
@@ -6941,17 +6939,17 @@ var zi = /* @__PURE__ */ Q({
6941
6939
  ]);
6942
6940
  //#endregion
6943
6941
  //#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-aYmFWSrn.js
6944
- var Yi = {
6945
- ...Ji,
6942
+ var Ji = {
6943
+ ...qi,
6946
6944
  vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6947
6945
  vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6948
6946
  vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6949
6947
  version: /* @__PURE__ */ $()
6950
6948
  };
6951
- ({ ...Yi });
6949
+ ({ ...Ji });
6952
6950
  //#endregion
6953
6951
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
6954
- var Xi = Vi([
6952
+ var Yi = Bi([
6955
6953
  "abortOperation",
6956
6954
  "auditObjectContent",
6957
6955
  "createObject",
@@ -6967,39 +6965,39 @@ var Xi = Vi([
6967
6965
  "retrieveChunks",
6968
6966
  "retrieveRecords",
6969
6967
  "upsertRecords"
6970
- ]), Zi = Vi([
6968
+ ]), Xi = Bi([
6971
6969
  "application",
6972
6970
  "curatedDataset",
6973
6971
  "database",
6974
6972
  "fileStore"
6975
- ]), Qi = /* @__PURE__ */ Q({ label: zi }), $i = Vi([
6973
+ ]), Zi = /* @__PURE__ */ Q({ label: Ri }), Qi = Bi([
6976
6974
  "bidirectional",
6977
6975
  "destination",
6978
6976
  "source",
6979
6977
  "unknown"
6980
- ]), ea = /* @__PURE__ */ Q({ label: zi }), ta = /* @__PURE__ */ Q({
6981
- authMethodId: Vi([
6978
+ ]), $i = /* @__PURE__ */ Q({ label: Ri }), ea = /* @__PURE__ */ Q({
6979
+ authMethodId: Bi([
6982
6980
  "apiKey",
6983
6981
  "disabled",
6984
6982
  "oAuth2",
6985
6983
  "none"
6986
6984
  ]),
6987
- activeConnectionCount: /* @__PURE__ */ Fi(/* @__PURE__ */ Pi()),
6988
- canDescribe: /* @__PURE__ */ Fi(/* @__PURE__ */ Mi()),
6989
- id: /* @__PURE__ */ Fi(/* @__PURE__ */ $()),
6990
- label: /* @__PURE__ */ Fi(zi),
6991
- maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ Pi()),
6992
- params: /* @__PURE__ */ Fi(/* @__PURE__ */ ji(/* @__PURE__ */ Ii(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6993
- }), na = /* @__PURE__ */ Q({
6994
- ...Yi,
6995
- typeId: /* @__PURE__ */ Ni("connector"),
6996
- actionNames: /* @__PURE__ */ ji(Xi),
6997
- category: /* @__PURE__ */ Z(Qi),
6998
- categoryId: Zi,
6999
- implementations: /* @__PURE__ */ Ii(/* @__PURE__ */ $(), ta),
7000
- usage: /* @__PURE__ */ Z(ea),
7001
- usageId: /* @__PURE__ */ Z($i)
7002
- }), ra = {
6985
+ activeConnectionCount: /* @__PURE__ */ Pi(/* @__PURE__ */ Ni()),
6986
+ canDescribe: /* @__PURE__ */ Pi(/* @__PURE__ */ ji()),
6987
+ id: /* @__PURE__ */ Pi(/* @__PURE__ */ $()),
6988
+ label: /* @__PURE__ */ Pi(Ri),
6989
+ maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ Ni()),
6990
+ params: /* @__PURE__ */ Pi(/* @__PURE__ */ Ai(/* @__PURE__ */ Fi(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6991
+ }), ta = /* @__PURE__ */ Q({
6992
+ ...Ji,
6993
+ typeId: /* @__PURE__ */ Mi("connector"),
6994
+ actionNames: /* @__PURE__ */ Ai(Yi),
6995
+ category: /* @__PURE__ */ Z(Zi),
6996
+ categoryId: Xi,
6997
+ implementations: /* @__PURE__ */ Fi(/* @__PURE__ */ $(), ea),
6998
+ usage: /* @__PURE__ */ Z($i),
6999
+ usageId: /* @__PURE__ */ Z(Qi)
7000
+ }), na = {
7003
7001
  abortOperation: "Abort Operation",
7004
7002
  auditObjectContent: "Audit Object Content",
7005
7003
  createObject: "Create Object",
@@ -7015,12 +7013,12 @@ var Xi = Vi([
7015
7013
  retrieveChunks: "Retrieve Chunks",
7016
7014
  retrieveRecords: "Retrieve Records",
7017
7015
  upsertRecords: "Upsert Records"
7018
- }, ia = /* @__PURE__ */ new Set([
7016
+ }, ra = /* @__PURE__ */ new Set([
7019
7017
  "createObject",
7020
7018
  "dropObject",
7021
7019
  "removeRecords",
7022
7020
  "upsertRecords"
7023
- ]), aa = /* @__PURE__ */ new Set([
7021
+ ]), ia = /* @__PURE__ */ new Set([
7024
7022
  "auditObjectContent",
7025
7023
  "findObject",
7026
7024
  "getInfo",
@@ -7031,57 +7029,57 @@ var Xi = Vi([
7031
7029
  "retrieveChunks",
7032
7030
  "retrieveRecords"
7033
7031
  ]);
7034
- function oa(e) {
7032
+ function aa(e) {
7035
7033
  let t = !1, n = !1;
7036
- for (let r of e) aa.has(r) && (t = !0), ia.has(r) && (n = !0);
7034
+ for (let r of e) ia.has(r) && (t = !0), ra.has(r) && (n = !0);
7037
7035
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
7038
7036
  }
7039
- function sa(e) {
7037
+ function oa(e) {
7040
7038
  let t = new Set(e), n = "|Action|Supported|\n";
7041
7039
  n += "|:----|:-------:|\n";
7042
- for (let e of Object.keys(ra)) n += `| ${ra[e]} | ${t.has(e) ? "✓" : ""} |\n`;
7040
+ for (let e of Object.keys(na)) n += `| ${na[e]} | ${t.has(e) ? "✓" : ""} |\n`;
7043
7041
  return n;
7044
7042
  }
7045
7043
  //#endregion
7046
7044
  //#region src/actions/documentActions.ts
7047
- var ca = "<!-- CONNECTOR_ACTIONS_START -->", la = "<!-- CONNECTOR_ACTIONS_END -->", ua = "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.", da = {
7045
+ var sa = "<!-- CONNECTOR_ACTIONS_START -->", ca = "<!-- CONNECTOR_ACTIONS_END -->", la = "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.", ua = {
7048
7046
  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.",
7049
7047
  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.",
7050
7048
  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.",
7051
7049
  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."
7052
- }, fa = "The table below lists all connector actions and highlights those supported by this connector.";
7053
- async function pa() {
7050
+ }, da = "The table below lists all connector actions and highlights those supported by this connector.";
7051
+ async function fa() {
7054
7052
  try {
7055
7053
  G("Document Actions"), q("1️⃣ Insert actions description and table into 'README.md'");
7056
- let e = (await W("config.json")).actionNames ?? [], t = oa(e), n = sa(e);
7057
- await Un(`${ua}\n\n${da[t]} ${fa}\n\n${n}`, ca, la), K("Actions documented");
7054
+ let e = (await W("config.json")).actionNames ?? [], t = aa(e), n = oa(e);
7055
+ await Un(`${la}\n\n${ua[t]} ${da}\n\n${n}`, sa, ca), K("Actions documented");
7058
7056
  } catch (e) {
7059
7057
  console.error("❌ Error documenting actions", e), process.exit(1);
7060
7058
  }
7061
7059
  }
7062
7060
  //#endregion
7063
7061
  //#region src/actions/documentOpening.ts
7064
- var ma = "<!-- OPENING_START -->", ha = "<!-- OPENING_END -->";
7065
- async function ga() {
7062
+ var pa = "<!-- OPENING_START -->", ma = "<!-- OPENING_END -->";
7063
+ async function ha() {
7066
7064
  try {
7067
7065
  G("Document Opening"), q("1️⃣ Insert opening content into 'README.md'");
7068
7066
  let e = await W("package.json"), t = await W("config.json"), { owner: n, repo: r } = Kn(e, "document opening");
7069
- await Un(ya(n, r, _a(e), va(t), e.devDependencies?.fallow != null), ma, ha), K("Opening documented");
7067
+ await Un(va(n, r, ga(e), _a(t), e.devDependencies?.fallow != null), pa, ma), K("Opening documented");
7070
7068
  } catch (e) {
7071
7069
  console.error("❌ Error documenting opening", e), process.exit(1);
7072
7070
  }
7073
7071
  }
7074
- function _a(e) {
7072
+ function ga(e) {
7075
7073
  let t = e.license;
7076
7074
  if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
7077
7075
  return t;
7078
7076
  }
7079
- function va(e) {
7077
+ function _a(e) {
7080
7078
  let t = e.description.en;
7081
7079
  if (t == null || t.length === 0) throw Error("config.json 'description.en' field is required to document opening.");
7082
7080
  return t;
7083
7081
  }
7084
- function ya(e, t, n, r, i) {
7082
+ function va(e, t, n, r, i) {
7085
7083
  let a = `https://github.com/${e}/${t}`, o = n.replaceAll("-", "--"), s = encodeURIComponent(`https://raw.githubusercontent.com/${e}/${t}/main/${Mn}`);
7086
7084
  return `[![License: ${n}](https://img.shields.io/badge/License-${o}-blue.svg)](./LICENSE)
7087
7085
  [![DPUse version](https://img.shields.io/github/v/release/${e}/${t}?color=f6821f&label=DPUse)](${a}/releases/latest)
@@ -7109,12 +7107,12 @@ ${r}`;
7109
7107
  }
7110
7108
  //#endregion
7111
7109
  //#region src/actions/documentUsage.ts
7112
- var ba = "<!-- USAGE_START -->", xa = "<!-- USAGE_END -->", Sa = /* @__PURE__ */ new Set([
7110
+ var ya = "<!-- USAGE_START -->", ba = "<!-- USAGE_END -->", xa = /* @__PURE__ */ new Set([
7113
7111
  "connector",
7114
7112
  "context",
7115
7113
  "cookbook",
7116
7114
  "presenter"
7117
- ]), Ca = [
7115
+ ]), Sa = [
7118
7116
  ["build", "Builds the project."],
7119
7117
  ["build:ts", "Builds the TypeScript source."],
7120
7118
  ["test", "Runs the tests."],
@@ -7134,35 +7132,35 @@ var ba = "<!-- USAGE_START -->", xa = "<!-- USAGE_END -->", Sa = /* @__PURE__ */
7134
7132
  ["sync", "Bumps the version, then commits and pushes to GitHub."],
7135
7133
  ["release", "Bumps the version, commits and pushes, and creates a GitHub release."],
7136
7134
  ["publish", "Registers the released version with DPUse."]
7137
- ], wa = /* @__PURE__ */ new Set(["development", "eslint"]), Ta = "> [!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", Ea = "Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.";
7138
- async function Da() {
7135
+ ], Ca = /* @__PURE__ */ new Set(["development", "eslint"]), wa = "> [!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", Ta = "Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.";
7136
+ async function Ea() {
7139
7137
  try {
7140
7138
  G("Document Usage"), q("1️⃣ Insert usage content into 'README.md'");
7141
- let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = Oa(e), r = ka(n), i = Aa(e.engines?.node), a = Aa(e.engines?.npm), o = Aa(e.devDependencies?.typescript);
7142
- await Un(Pa(ja(Gn(t.id), e.name), n, r, i, a, o, Ma(e)), ba, xa), K("Usage documented");
7139
+ let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = Da(e), r = Oa(n), i = ka(e.engines?.node), a = ka(e.engines?.npm), o = ka(e.devDependencies?.typescript);
7140
+ await Un(Na(Aa(Gn(t.id), e.name), n, r, i, a, o, ja(e)), ya, ba), K("Usage documented");
7143
7141
  } catch (e) {
7144
7142
  console.error("❌ Error documenting usage", e), process.exit(1);
7145
7143
  }
7146
7144
  }
7147
- function Oa(e) {
7145
+ function Da(e) {
7148
7146
  let t = e.repository, n = typeof t == "string" ? t : t?.url;
7149
7147
  if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
7150
7148
  return n.replace(/^git\+/, "");
7151
7149
  }
7152
- function ka(e) {
7150
+ function Oa(e) {
7153
7151
  return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
7154
7152
  }
7155
- function Aa(e) {
7153
+ function ka(e) {
7156
7154
  if (e == null) throw Error("package.json version range is required to document usage.");
7157
7155
  let t = /\d+(?:\.\d+)*/.exec(e);
7158
7156
  if (t == null) throw Error(`Unable to parse version from '${e}'.`);
7159
7157
  return t[0];
7160
7158
  }
7161
- function ja(e, t) {
7159
+ function Aa(e, t) {
7162
7160
  let { typeId: n } = e;
7163
- if (Sa.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.
7161
+ if (xa.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.
7164
7162
 
7165
- 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. ${Ea}`;
7163
+ 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. ${Ta}`;
7166
7164
  if (e.publishedTo === "npm") {
7167
7165
  if (t == null || t === "") throw Error("package.json 'name' field is required to document usage.");
7168
7166
  return `This package is published to the [public npm registry](https://www.npmjs.com/package/${t}). Install it with:
@@ -7171,18 +7169,18 @@ You may view or clone this repository for your own purposes, such as building a
7171
7169
  npm install ${t}
7172
7170
  \`\`\`
7173
7171
 
7174
- ${wa.has(n) ? Ta : ""}To work on the source instead, clone this repository. ${Ea}`;
7172
+ ${Ca.has(n) ? wa : ""}To work on the source instead, clone this repository. ${Ta}`;
7175
7173
  }
7176
- return `You may view or clone this repository for your own purposes. ${Ea}`;
7174
+ return `You may view or clone this repository for your own purposes. ${Ta}`;
7177
7175
  }
7178
- function Ma(e) {
7179
- 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 = Ca.filter(([e]) => i(e)).map(([e, t]) => `|\`${Na(e)}\`|${t}|`);
7176
+ function ja(e) {
7177
+ 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 = Sa.filter(([e]) => i(e)).map(([e, t]) => `|\`${Ma(e)}\`|${t}|`);
7180
7178
  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")}`;
7181
7179
  }
7182
- function Na(e) {
7180
+ function Ma(e) {
7183
7181
  return e === "test" ? "npm test" : `npm run ${e}`;
7184
7182
  }
7185
- function Pa(e, t, n, r, i, a, o) {
7183
+ function Na(e, t, n, r, i, a, o) {
7186
7184
  return `## Usage
7187
7185
 
7188
7186
  ${e}
@@ -7197,7 +7195,7 @@ _Requires [Node.js](https://nodejs.org/) ${r} or later, [npm](https://www.npmjs.
7197
7195
  }
7198
7196
  //#endregion
7199
7197
  //#region src/actions/formatCode.ts
7200
- async function Fa() {
7198
+ async function Pa() {
7201
7199
  try {
7202
7200
  G("Format Code"), await U("1️⃣ Format", "prettier", [
7203
7201
  "--write",
@@ -7216,7 +7214,7 @@ async function Fa() {
7216
7214
  }
7217
7215
  //#endregion
7218
7216
  //#region src/actions/lintCode.ts
7219
- async function Ia() {
7217
+ async function Fa() {
7220
7218
  try {
7221
7219
  G("Lint Code"), await U("1️⃣ Lint", "eslint", ["."]), K("Code linted");
7222
7220
  } catch (e) {
@@ -7225,7 +7223,7 @@ async function Ia() {
7225
7223
  }
7226
7224
  //#endregion
7227
7225
  //#region src/utilities/cloudflare.ts
7228
- async function La() {
7226
+ async function Ia() {
7229
7227
  let e = await W("config.json"), t = {
7230
7228
  body: JSON.stringify(e),
7231
7229
  headers: { "Content-Type": "application/json" },
@@ -7233,7 +7231,7 @@ async function La() {
7233
7231
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
7234
7232
  if (!n.ok) throw Error(await n.text());
7235
7233
  }
7236
- async function Ra(e, t) {
7234
+ async function La(e, t) {
7237
7235
  async function n(e, t, r) {
7238
7236
  for (let i of r) {
7239
7237
  let r = `${e}/${i}`, a = `${t}/${i}`;
@@ -7251,7 +7249,7 @@ async function Ra(e, t) {
7251
7249
  let r = await Ln(`${e}/${t}/`);
7252
7250
  await n(`${e}/${t}`, t, r);
7253
7251
  }
7254
- async function za(e) {
7252
+ async function Ra(e) {
7255
7253
  let t = e.id, n = {
7256
7254
  body: JSON.stringify(e),
7257
7255
  headers: { "Content-Type": "application/json" },
@@ -7259,7 +7257,7 @@ async function za(e) {
7259
7257
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
7260
7258
  if (!r.ok) throw Error(await r.text());
7261
7259
  }
7262
- async function Ba(e, t) {
7260
+ async function za(e, t) {
7263
7261
  let n = `v${e.version ?? "unknown"}`;
7264
7262
  async function r(e, r = "") {
7265
7263
  let i = await Ln(e, { withFileTypes: !0 });
@@ -7283,24 +7281,24 @@ async function Ba(e, t) {
7283
7281
  }
7284
7282
  //#endregion
7285
7283
  //#region node_modules/valibot/dist/index.mjs
7286
- var Va = {
7284
+ var Ba = {
7287
7285
  lang: void 0,
7288
7286
  message: void 0,
7289
7287
  abortEarly: void 0,
7290
7288
  abortPipeEarly: void 0
7291
7289
  };
7292
7290
  /* @__NO_SIDE_EFFECTS__ */
7293
- function Ha(e) {
7291
+ function Va(e) {
7294
7292
  return e ? {
7295
7293
  lang: e?.lang ?? void 0,
7296
7294
  message: e?.message,
7297
7295
  abortEarly: e?.abortEarly ?? void 0,
7298
7296
  abortPipeEarly: e?.abortPipeEarly ?? void 0
7299
- } : Va;
7297
+ } : Ba;
7300
7298
  }
7301
7299
  /* @__NO_SIDE_EFFECTS__ */
7302
- function Ua(e, t, n) {
7303
- let r = e["~run"]({ value: t }, /* @__PURE__ */ Ha(n));
7300
+ function Ha(e, t, n) {
7301
+ let r = e["~run"]({ value: t }, /* @__PURE__ */ Va(n));
7304
7302
  return {
7305
7303
  typed: r.typed,
7306
7304
  success: !r.issues,
@@ -7310,21 +7308,21 @@ function Ua(e, t, n) {
7310
7308
  }
7311
7309
  //#endregion
7312
7310
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModulePresenter.es.js
7313
- var Wa = Vi([
7311
+ var Ua = Bi([
7314
7312
  "list",
7315
7313
  "render",
7316
7314
  "setColorMode"
7317
- ]), Ga = /* @__PURE__ */ Q({
7318
- ...Yi,
7319
- typeId: /* @__PURE__ */ Ni("presenter"),
7320
- actionNames: /* @__PURE__ */ ji(Wa),
7321
- presentations: /* @__PURE__ */ ji(qi)
7322
- }), Ka = [
7315
+ ]), Wa = /* @__PURE__ */ Q({
7316
+ ...Ji,
7317
+ typeId: /* @__PURE__ */ Mi("presenter"),
7318
+ actionNames: /* @__PURE__ */ Ai(Ua),
7319
+ presentations: /* @__PURE__ */ Ai(Ki)
7320
+ }), Ga = [
7323
7321
  "1️⃣ ",
7324
7322
  "2️⃣ ",
7325
7323
  "3️⃣ ",
7326
7324
  "4️⃣ "
7327
- ], qa = [{
7325
+ ], Ka = [{
7328
7326
  id: "unit",
7329
7327
  label: "Run unit tests",
7330
7328
  command: "vitest",
@@ -7337,36 +7335,36 @@ var Wa = Vi([
7337
7335
  arguments: ["test", "--pass-with-no-tests"],
7338
7336
  configFileName: "playwright.config.ts"
7339
7337
  }];
7340
- async function Ja() {
7338
+ async function qa() {
7341
7339
  try {
7342
7340
  G("Build Project"), await U("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
7343
7341
  } catch (e) {
7344
7342
  console.error("❌ Error building project", e), process.exit(1);
7345
7343
  }
7346
7344
  }
7347
- async function Ya() {
7345
+ async function Ja() {
7348
7346
  try {
7349
7347
  G("Publish Project");
7350
7348
  let e = await W("package.json"), t = await W("config.json");
7351
- await io("1️⃣ ", e, t, Gn(t.id)), K(`Project version '${e.version ?? "unknown"}' published.`);
7349
+ await ro("1️⃣ ", e, t, Gn(t.id)), K(`Project version '${e.version ?? "unknown"}' published.`);
7352
7350
  } catch (e) {
7353
7351
  console.error("❌ Error publishing project", e), process.exit(1);
7354
7352
  }
7355
7353
  }
7356
- async function Xa() {
7354
+ async function Ya() {
7357
7355
  try {
7358
7356
  G("Release Project");
7359
7357
  let e = await W("package.json"), t = await W("config.json");
7360
- await ro("1️⃣ ", e);
7358
+ await no("1️⃣ ", e);
7361
7359
  let n = Gn(t.id);
7362
7360
  switch (n.typeId) {
7363
7361
  case "connector":
7364
- t = await Qa("2️⃣ ", e);
7362
+ t = await Za("2️⃣ ", e);
7365
7363
  break;
7366
7364
  case "presenter":
7367
- t = await $a("2️⃣ ", e);
7365
+ t = await Qa("2️⃣ ", e);
7368
7366
  break;
7369
- default: t = await Za("2️⃣ ", e);
7367
+ default: t = await Xa("2️⃣ ", e);
7370
7368
  }
7371
7369
  await U("3️⃣ Bundle project", "vite", ["build"]), await Rn("4️⃣ Stage changes", "git", ["add", "."]), await Rn("5️⃣ Commit changes", "git", [
7372
7370
  "commit",
@@ -7376,7 +7374,7 @@ async function Xa() {
7376
7374
  "push",
7377
7375
  "origin",
7378
7376
  "main:main"
7379
- ]), await io("7️⃣ ", e, t, n), n.publishedTo === "npm" ? await U("8️⃣ Create GitHub release", "gh", [
7377
+ ]), await ro("7️⃣ ", e, t, n), n.publishedTo === "npm" ? await U("8️⃣ Create GitHub release", "gh", [
7380
7378
  "release",
7381
7379
  "create",
7382
7380
  `v${e.version ?? "unknown"}`,
@@ -7389,39 +7387,39 @@ async function Xa() {
7389
7387
  console.error("❌ Error releasing project", e), process.exit(1);
7390
7388
  }
7391
7389
  }
7392
- async function Za(e, t) {
7390
+ async function Xa(e, t) {
7393
7391
  q(`${e} Build project configuration`);
7394
7392
  let n = await W("config.json");
7395
7393
  return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await Vn("logo.svg"), n.iconDark ??= await Vn("logoDark.svg"), await Hn("config.json", n), n;
7396
7394
  }
7397
- async function Qa(e, t) {
7395
+ async function Za(e, t) {
7398
7396
  q(`${e} Build connector project configuration`);
7399
- let [n, r] = await Promise.all([W("config.json"), Bn("src/index.ts")]), i = /* @__PURE__ */ Ua(na, n);
7397
+ let [n, r] = await Promise.all([W("config.json"), Bn("src/index.ts")]), i = /* @__PURE__ */ Ha(ta, n);
7400
7398
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7401
7399
  let a = Jn(r);
7402
- return await eo(t, n, a, oa(a));
7400
+ return await $a(t, n, a, aa(a));
7403
7401
  }
7404
- async function $a(e, t) {
7402
+ async function Qa(e, t) {
7405
7403
  q(`${e} Build presenter project configuration`);
7406
- let [n, r] = await Promise.all([W("config.json"), Bn("src/index.ts")]), i = /* @__PURE__ */ Ua(Ga, n);
7404
+ let [n, r] = await Promise.all([W("config.json"), Bn("src/index.ts")]), i = /* @__PURE__ */ Ha(Wa, n);
7407
7405
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7408
- return await eo(t, n, Jn(r));
7406
+ return await $a(t, n, Jn(r));
7409
7407
  }
7410
- async function eo(e, t, n, r) {
7408
+ async function $a(e, t, n, r) {
7411
7409
  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 Hn("config.json", t), t;
7412
7410
  }
7413
- async function to() {
7411
+ async function eo() {
7414
7412
  try {
7415
7413
  G("Synchronise Project with GitHub");
7416
7414
  let e = await W("package.json"), t = await W("config.json");
7417
- switch (await ro("1️⃣ ", e), Gn(t.id).typeId) {
7415
+ switch (await no("1️⃣ ", e), Gn(t.id).typeId) {
7418
7416
  case "connector":
7419
- await Qa("2️⃣ ", e);
7417
+ await Za("2️⃣ ", e);
7420
7418
  break;
7421
7419
  case "presenter":
7422
- await $a("2️⃣ ", e);
7420
+ await Qa("2️⃣ ", e);
7423
7421
  break;
7424
- default: await Za("2️⃣ ", e);
7422
+ default: await Xa("2️⃣ ", e);
7425
7423
  }
7426
7424
  await Rn("3️⃣ Stage changes", "git", ["add", "."]), await Rn("4️⃣ Commit changes", "git", [
7427
7425
  "commit",
@@ -7436,14 +7434,14 @@ async function to() {
7436
7434
  console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
7437
7435
  }
7438
7436
  }
7439
- async function no(e = ["unit"], t = !1) {
7437
+ async function to(e = ["unit"], t = !1) {
7440
7438
  try {
7441
7439
  G("Test Project");
7442
7440
  let n = 0;
7443
- for (let r of qa) {
7441
+ for (let r of Ka) {
7444
7442
  if (!e.includes(r.id) || await Vn(r.configFileName) === null) continue;
7445
7443
  let i = t && r.id === "unit" ? ["--coverage"] : [];
7446
- await U(`${Ka[n] ?? ""} ${r.label}`, r.command, [...r.arguments, ...i]), n += 1;
7444
+ await U(`${Ga[n] ?? ""} ${r.label}`, r.command, [...r.arguments, ...i]), n += 1;
7447
7445
  }
7448
7446
  if (n === 0) {
7449
7447
  console.warn("\n⚠️ No tests configured for this project.\n");
@@ -7454,7 +7452,7 @@ async function no(e = ["unit"], t = !1) {
7454
7452
  console.error("❌ Error testing project", e), process.exit(1);
7455
7453
  }
7456
7454
  }
7457
- async function ro(e, t, n = "./") {
7455
+ async function no(e, t, n = "./") {
7458
7456
  if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
7459
7457
  else {
7460
7458
  let e = t.version, n = t.version.split(".");
@@ -7462,17 +7460,15 @@ async function ro(e, t, n = "./") {
7462
7460
  }
7463
7461
  await Hn(`${n}package.json`, t);
7464
7462
  }
7465
- async function io(e, t, n, r) {
7466
- if (r.typeId === "app") q(`${e} Register module`), await La();
7467
- else if (r.typeId === "engine") q(`${e} Register module`), await Ba(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await za(n);
7463
+ async function ro(e, t, n, r) {
7464
+ if (r.typeId === "app") q(`${e} Register module`), await Ia();
7465
+ else if (r.typeId === "engine") q(`${e} Register module`), await za(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await Ra(n);
7468
7466
  else if (r.uploadGroupName === void 0) q(`${e} Registration NOT required`);
7469
7467
  else {
7470
7468
  q(`${e} Register module`);
7471
7469
  let i = n.id.split("-").slice(2).join("-");
7472
- await Ba(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await za(n);
7470
+ await za(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await Ra(n);
7473
7471
  }
7474
7472
  }
7475
7473
  //#endregion
7476
- export { Zn as auditDependencies, Ja as buildProject, er as checkConfigFiles, lr as checkDependencies, pa as documentActions, vr as documentBundleSizes, Br as documentDependencies, ci as documentGovernance, ga as documentOpening, Da as documentUsage, Fa as formatCode, Ia as lintCode, Ya as publishProject, Xa as releaseProject, to as syncProjectWithGitHub, no as testProject, Ra as uploadDirectoryToR2 };
7477
-
7478
- //# sourceMappingURL=dpuse-development.es.js.map
7474
+ export { Zn as auditDependencies, qa as buildProject, er as checkConfigFiles, cr as checkDependencies, fa as documentActions, _r as documentBundleSizes, zr as documentDependencies, si as documentGovernance, ha as documentOpening, Ea as documentUsage, Pa as formatCode, Fa as lintCode, Ja as publishProject, Ya as releaseProject, eo as syncProjectWithGitHub, to as testProject, La as uploadDirectoryToR2 };