@dpuse/dpuse-development 0.3.801 → 0.3.806

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.
@@ -1,71 +1,72 @@
1
- import { A as e, C as t, D as n, E as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, k as h, l as g, m as _, n as ee, o as te, p as v, r as ne, s as re, t as ie, u as y, v as b, w as x, x as S, y as C } from "./utilities-Bo8LfncX.js";
2
- import { existsSync as ae } from "node:fs";
3
- import w from "node:path";
4
- import { promisify as oe } from "node:util";
5
- import { execFile as se } from "node:child_process";
6
- import { fileURLToPath as ce } from "node:url";
7
- import { run as le } from "npm-check-updates";
8
- import { init as ue } from "license-checker-rseidelsohn";
1
+ import { A as e, C as t, D as n, E as r, S as i, T as a, _ as o, a as s, b as c, c as l, d as u, f as d, g as f, h as p, i as m, k as h, l as g, m as _, n as ee, o as te, p as v, r as y, s as ne, t as re, u as b, v as x, w as S, x as C, y as w } from "./utilities-Bo8LfncX.js";
2
+ import { existsSync as ie } from "node:fs";
3
+ import T from "node:path";
4
+ import { promisify as ae } from "node:util";
5
+ import { execFile as oe } from "node:child_process";
6
+ import { fileURLToPath as se } from "node:url";
7
+ import { run as ce } from "npm-check-updates";
8
+ import { init as le } from "license-checker-rseidelsohn";
9
9
  //#region src/actions/auditDependencies.ts
10
- async function de() {
10
+ async function ue() {
11
11
  try {
12
- f("Audit Dependencies"), await x("1️⃣ Check shipped dependencies for any vulnerability", "npm", ["audit", "--omit=dev"]), await x("2️⃣ Check all dependencies for high or critical vulnerabilities", "npm", ["audit", "--audit-level=high"]), o("Dependencies audited");
12
+ f("Audit Dependencies"), await S("1️⃣ Check shipped dependencies for any vulnerability", "npm", ["audit", "--omit=dev"]), await S("2️⃣ Check all dependencies for high or critical vulnerabilities", "npm", ["audit", "--audit-level=high"]), o("Dependencies audited");
13
13
  } catch (e) {
14
14
  console.error("❌ Error auditing dependencies", e), process.exit(1);
15
15
  }
16
16
  }
17
17
  //#endregion
18
18
  //#region src/actions/buildProject.ts
19
- var T = "build:wasm";
20
- async function fe() {
19
+ var E = "build:wasm";
20
+ async function de() {
21
21
  try {
22
- f("Build Project"), await E("1️⃣ ", await c("package.json")), o("Project built");
22
+ f("Build Project"), await D("1️⃣ ", await c("package.json")), o("Project built");
23
23
  } catch (e) {
24
24
  console.error("❌ Error building project", e), process.exit(1);
25
25
  }
26
26
  }
27
- async function E(e, t) {
28
- t.scripts?.[T] != null && await x(`${e} Build WebAssembly`, "npm", ["run", T]), await x(`${e} Bundle project`, "vite", ["build"]);
27
+ async function D(e, t) {
28
+ t.scripts?.[E] != null && await S(`${e} Build WebAssembly`, "npm", ["run", E]), await S(`${e} Bundle project`, "vite", ["build"]);
29
29
  }
30
30
  //#endregion
31
31
  //#region src/actions/checkConfigFiles.ts
32
- var D = "@dpuse/dpuse-development/prettierrc", pe = "dpuse-development";
33
- async function me() {
32
+ var O = "@dpuse/dpuse-development/prettierrc", fe = "dpuse-development";
33
+ async function pe() {
34
34
  try {
35
- f("Check configuration files"), b("1️⃣ Check individual files");
36
- let e = await c("config.json"), t = await c("package.json"), n = t.private === !0, r = _(e.id), a = w.dirname(ce(import.meta.url));
37
- await O(a, ".editorconfig"), await O(a, ".gitattributes"), await O(a, ".gitignore", [".gitignore_default"]), await O(a, ".markdownlint.json"), await O(a, ".ncurc.json"), await he(r, a), await O(a, "LICENSE"), await _e(r, a), await ve(r, a), await ye(r, a), await xe(r, a), ge(r, t);
35
+ f("Check configuration files"), x("1️⃣ Check individual files");
36
+ let e = await c("config.json"), t = await c("package.json"), n = t.private === !0, r = _(e.id), a = T.dirname(se(import.meta.url));
37
+ await k(a, ".editorconfig"), await k(a, ".gitattributes"), await k(a, ".gitignore", [".gitignore_default"]), await k(a, ".markdownlint.json"), await k(a, ".ncurc.json"), await me(r, a), await k(a, "LICENSE"), await ge(r, a), await _e(r, a), await ve(r, a), await be(r, a), he(r, t);
38
38
  let s = await i(l) !== null;
39
- s && await O(a, "rust-toolchain.toml"), await O(a, ".github/dependabot.yml", [`.github/dependabot${n ? ".private" : ""}${s ? ".rust" : ""}.yml`]), n ? console.info("ℹ️ GitHub workflows and file 'SECURITY.md' are NOT required by this project") : (await be(a), await O(a, "SECURITY.md", [], (t) => t.replaceAll(pe, () => e.id))), o("Configuration files checked");
39
+ s && await k(a, "rust-toolchain.toml"), await k(a, ".github/dependabot.yml", [`.github/dependabot${n ? ".private" : ""}${s ? ".rust" : ""}.yml`]), n ? console.info("ℹ️ GitHub workflows and file 'SECURITY.md' are NOT required by this project") : (await ye(a), await k(a, "SECURITY.md", [], (t) => t.replaceAll(fe, () => e.id))), o("Configuration files checked");
40
40
  } catch (e) {
41
41
  console.error("❌ Error checking configuration files", e), process.exit(1);
42
42
  }
43
43
  }
44
- async function he(e, t) {
44
+ async function me(e, t) {
45
45
  ["github", "kb"].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is NOT required by this project") : [
46
46
  "app",
47
47
  "api",
48
48
  "development",
49
49
  "eslint"
50
- ].includes(e.typeId) ? console.info("⚠️ File 'eslint.config.js' is UNIQUE to this project") : await O(t, "eslint.config.js", ["eslint.config.default.js"]);
50
+ ].includes(e.typeId) ? console.info("⚠️ File 'eslint.config.js' is UNIQUE to this project") : await k(t, "eslint.config.js", ["eslint.config.default.js"]);
51
51
  }
52
- function ge(e, t) {
53
- 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 === D ? console.info(`ℹ️ Prettier configuration is '${D}'`) : console.info(`❌ Prettier configuration is NOT '${D}'`);
52
+ function he(e, t) {
53
+ 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 === O ? console.info(`ℹ️ Prettier configuration is '${O}'`) : console.info(`❌ Prettier configuration is NOT '${O}'`);
54
54
  }
55
- async function _e(e, t) {
55
+ async function ge(e, t) {
56
56
  ["github"].includes(e.typeId) ? console.info("ℹ️ File 'tsconfig.json' is NOT required by this project") : [
57
57
  "connector",
58
+ "cookbook",
58
59
  "development",
59
60
  "engine",
60
61
  "presenter",
61
62
  "shared",
62
63
  "tool"
63
- ].includes(e.typeId) ? await O(t, "tsconfig.json") : console.info("⚠️ File 'tsconfig.json' is UNIQUE to this project");
64
+ ].includes(e.typeId) ? await k(t, "tsconfig.json") : console.info("⚠️ File 'tsconfig.json' is UNIQUE to this project");
64
65
  }
65
- async function ve(e, t) {
66
- ["github"].includes(e.typeId) ? console.info("ℹ️ File 'scripts/tsconfig.json' is NOT required by this project") : await O(t, "scripts/tsconfig.json");
66
+ async function _e(e, t) {
67
+ ["github"].includes(e.typeId) ? console.info("ℹ️ File 'scripts/tsconfig.json' is NOT required by this project") : await k(t, "scripts/tsconfig.json");
67
68
  }
68
- async function ye(e, t) {
69
+ async function ve(e, t) {
69
70
  if ([
70
71
  "eslint",
71
72
  "github",
@@ -91,25 +92,25 @@ async function ye(e, t) {
91
92
  break;
92
93
  default: n = ["vite.config.default.ts"];
93
94
  }
94
- await O(t, "vite.config.ts", n);
95
+ await k(t, "vite.config.ts", n);
95
96
  }
96
97
  }
97
- async function be(e) {
98
- await O(e, ".github/workflows/ci.yml"), await O(e, ".github/workflows/codeql.yml"), await O(e, ".github/workflows/publish.yml"), await O(e, ".github/workflows/scorecard.yml");
98
+ async function ye(e) {
99
+ await k(e, ".github/workflows/ci.yml"), await k(e, ".github/workflows/codeql.yml"), await k(e, ".github/workflows/publish.yml"), await k(e, ".github/workflows/scorecard.yml");
99
100
  }
100
- async function xe(e, t) {
101
+ async function be(e, t) {
101
102
  [
102
103
  "app",
103
104
  "api",
104
105
  "eslint",
105
106
  "github",
106
107
  "kb"
107
- ].includes(e.typeId) ? console.info("ℹ️ File 'vitest.config.ts' is NOT required by this project") : await O(t, "vitest.config.ts");
108
+ ].includes(e.typeId) ? console.info("ℹ️ File 'vitest.config.ts' is NOT required by this project") : await k(t, "vitest.config.ts");
108
109
  }
109
- async function O(e, t, n = [], r = (e) => e) {
110
- let i = w.resolve(process.cwd(), t), a = n.length > 0 ? n : [t], o;
110
+ async function k(e, t, n = [], r = (e) => e) {
111
+ let i = T.resolve(process.cwd(), t), a = n.length > 0 ? n : [t], o;
111
112
  try {
112
- o = await S(i);
113
+ o = await C(i);
113
114
  } catch (e) {
114
115
  if (e.code !== "ENOENT") throw e;
115
116
  }
@@ -118,7 +119,7 @@ async function O(e, t, n = [], r = (e) => e) {
118
119
  return;
119
120
  }
120
121
  for (let n of a) {
121
- let i = w.resolve(e, `../${n}`), a = r(await S(i));
122
+ let i = T.resolve(e, `../${n}`), a = r(await C(i));
122
123
  if (o === a) {
123
124
  console.info(`ℹ️ File '${t}' is the same as '${n}'`);
124
125
  return;
@@ -128,43 +129,43 @@ async function O(e, t, n = [], r = (e) => e) {
128
129
  }
129
130
  //#endregion
130
131
  //#region src/actions/checkDependencies.ts
131
- async function Se() {
132
+ async function xe() {
132
133
  try {
133
- f("Check Dependencies"), await x("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), b("2️⃣ Check using 'npm-check-updates'");
134
+ f("Check Dependencies"), await S("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), x("2️⃣ Check using 'npm-check-updates'");
134
135
  let e = {};
135
136
  try {
136
- e = await c(w.resolve(process.cwd(), ".ncurc.json"));
137
+ e = await c(T.resolve(process.cwd(), ".ncurc.json"));
137
138
  } catch (e) {
138
139
  if (e.code !== "ENOENT") throw e;
139
140
  }
140
- await le({
141
+ await ce({
141
142
  interactive: !0,
142
143
  upgrade: !0,
143
144
  dep: "dev,prod,peer,optional",
144
145
  install: "never",
145
146
  ...e
146
- }), await x("3️⃣ Install updated dependencies", "npm", [
147
+ }), await S("3️⃣ Install updated dependencies", "npm", [
147
148
  "install",
148
149
  "--prefer-online",
149
150
  "--no-strict-allow-scripts",
150
151
  "--no-audit",
151
152
  "--no-fund"
152
- ]), await x("4️⃣ Fix vulnerabilities where a compatible upgrade exists", "npm", [
153
+ ]), await S("4️⃣ Fix vulnerabilities where a compatible upgrade exists", "npm", [
153
154
  "audit",
154
155
  "fix",
155
156
  "--no-strict-allow-scripts",
156
157
  "--no-fund"
157
158
  ], !0);
158
- let t = await Ce();
159
- t.length > 0 ? await x("5️⃣ Move install-script pins to installed versions", "npm", [
159
+ let t = await Se();
160
+ t.length > 0 ? await S("5️⃣ Move install-script pins to installed versions", "npm", [
160
161
  "install-scripts",
161
162
  "approve",
162
163
  ...t
163
- ]) : b("5️⃣ No pinned install-script approvals to move"), process.platform === "darwin" ? await x("6️⃣ Remove unused install-script entries", "npm", ["install-scripts", "prune"]) : b("6️⃣ Skipped removing unused install-script entries (macOS only)"), t.length > 0 && await x("7️⃣ Run install scripts skipped in steps 3 and 4", "npm", [
164
+ ]) : x("5️⃣ No pinned install-script approvals to move"), process.platform === "darwin" ? await S("6️⃣ Remove unused install-script entries", "npm", ["install-scripts", "prune"]) : x("6️⃣ Skipped removing unused install-script entries (macOS only)"), t.length > 0 && await S("7️⃣ Run install scripts skipped in steps 3 and 4", "npm", [
164
165
  "rebuild",
165
166
  ...t,
166
167
  "--no-strict-allow-scripts"
167
- ]), await x("8️⃣ Confirm every install script is reviewed", "npm", [
168
+ ]), await S("8️⃣ Confirm every install script is reviewed", "npm", [
168
169
  "install",
169
170
  "--strict-allow-scripts",
170
171
  "--no-audit",
@@ -174,56 +175,56 @@ async function Se() {
174
175
  console.error("❌ Error checking dependencies", e), process.exit(1);
175
176
  }
176
177
  }
177
- async function Ce() {
178
- let { allowScripts: e = {} } = await c(w.resolve(process.cwd(), "package.json")), t = Object.entries(e).filter(([e, t]) => t && e.lastIndexOf("@") > 0).map(([e]) => e.slice(0, e.lastIndexOf("@")));
178
+ async function Se() {
179
+ let { allowScripts: e = {} } = await c(T.resolve(process.cwd(), "package.json")), t = Object.entries(e).filter(([e, t]) => t && e.lastIndexOf("@") > 0).map(([e]) => e.slice(0, e.lastIndexOf("@")));
179
180
  return [...new Set(t)];
180
181
  }
181
182
  //#endregion
182
183
  //#region src/actions/checkProject.ts
183
- async function we() {
184
- await me(), await Se();
184
+ async function Ce() {
185
+ await pe(), await xe();
185
186
  }
186
187
  //#endregion
187
188
  //#region src/actions/documentActions.ts
188
- var Te = "<!-- CONNECTOR_ACTIONS_START -->", Ee = "<!-- CONNECTOR_ACTIONS_END -->", De = "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.", Oe = {
189
+ var we = "<!-- CONNECTOR_ACTIONS_START -->", Te = "<!-- CONNECTOR_ACTIONS_END -->", Ee = "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.", De = {
189
190
  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.",
190
191
  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.",
191
192
  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.",
192
193
  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."
193
- }, ke = "The table below lists all connector actions and highlights those supported by this connector.";
194
- async function Ae() {
194
+ }, Oe = "The table below lists all connector actions and highlights those supported by this connector.";
195
+ async function ke() {
195
196
  try {
196
- f("Document Actions"), b("1️⃣ Insert actions description and table into 'README.md'");
197
- let t = (await c("config.json")).actionNames ?? [], r = h(t), i = e(t), a = `${De}\n\n${Oe[r]} ${ke}\n\n${i}`;
198
- await n(a, Te, Ee), o("Actions documented");
197
+ f("Document Actions"), x("1️⃣ Insert actions description and table into 'README.md'");
198
+ let t = (await c("config.json")).actionNames ?? [], r = h(t), i = e(t), a = `${Ee}\n\n${De[r]} ${Oe}\n\n${i}`;
199
+ await n(a, we, Te), o("Actions documented");
199
200
  } catch (e) {
200
201
  console.error("❌ Error documenting actions", e), process.exit(1);
201
202
  }
202
203
  }
203
204
  //#endregion
204
205
  //#region src/actions/documentContributingLicense.ts
205
- async function je() {
206
+ async function Ae() {
206
207
  try {
207
208
  f("Document Contributing & License");
208
- let [e, r] = await Promise.all([c("package.json"), c("config.json")]), { owner: i, repo: a } = t(e, "document contributing and license"), s = Me(e), l = Ne(r.firstCreatedAt);
209
- b("1️⃣ Insert contributing and license content into 'README.md'"), await C(), await n(Pe(i, a, s, l), ee, ie), o("Contributing & license documented");
209
+ let [e, r] = await Promise.all([c("package.json"), c("config.json")]), { owner: i, repo: a } = t(e, "document contributing and license"), s = je(e), l = Me(r.firstCreatedAt);
210
+ x("1️⃣ Insert contributing and license content into 'README.md'"), await w(), await n(Ne(i, a, s, l), ee, re), o("Contributing & license documented");
210
211
  } catch (e) {
211
212
  console.error("❌ Error documenting contributing and license", e), process.exit(1);
212
213
  }
213
214
  }
214
- function Me(e) {
215
+ function je(e) {
215
216
  let t = e.author, n = typeof t == "string" ? t : t?.name;
216
217
  if (n == null || n === "") throw Error("package.json 'author' field is required to document contributing and license.");
217
218
  let r = n.indexOf("<"), i = r === -1 ? -1 : n.indexOf(">", r);
218
219
  return i === -1 ? n.trim() : [n.slice(0, r).trim(), n.slice(i + 1).trim()].filter((e) => e !== "").join(" ");
219
220
  }
220
- function Ne(e) {
221
+ function Me(e) {
221
222
  let t = (/* @__PURE__ */ new Date()).getFullYear();
222
223
  if (e == null) return String(t);
223
224
  let n = new Date(e).getFullYear();
224
225
  return n === t ? String(t) : `${String(n)}-present`;
225
226
  }
226
- function Pe(e, t, n, r) {
227
+ function Ne(e, t, n, r) {
227
228
  return `## Contributing
228
229
 
229
230
  This repository is maintained solely by its owner and does not, at present, accept external contributions into the canonical repo. Its source is published openly under the MIT License — every DPUse project is fully open source except DPUse Engine, which remains closed and proprietary.
@@ -238,18 +239,18 @@ This project is licensed under the MIT License, permitting free use, modificatio
238
239
  }
239
240
  //#endregion
240
241
  //#region src/actions/documentDependencies.ts
241
- var k = "<!-- DEPENDENCY_LICENSES_START -->", A = "<!-- DEPENDENCY_LICENSES_END -->", j = "## Dependency Licenses", Fe = "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.";
242
- async function Ie(e = "MIT") {
242
+ var A = "<!-- DEPENDENCY_LICENSES_START -->", j = "<!-- DEPENDENCY_LICENSES_END -->", M = "## Dependency Licenses", Pe = "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.";
243
+ async function Fe(e = "MIT") {
243
244
  try {
244
245
  f("Document Dependencies");
245
246
  let t = await c("package.json");
246
247
  if (t.name === "@dpuse/dpuse-development" || t.name === "@dpuse/eslint-config-dpuse") {
247
- await Le(t.name), o("Dependencies documented");
248
+ await Ie(t.name), o("Dependencies documented");
248
249
  return;
249
250
  }
250
251
  await u("1️⃣ Clear downloaded licenses", "licenses/downloads");
251
- let n = await ze();
252
- b("2️⃣ Identify production licenses"), await new Promise((r, i) => {
252
+ let n = await Re();
253
+ x("2️⃣ Identify production licenses"), await new Promise((r, i) => {
253
254
  let a = {
254
255
  start: process.cwd(),
255
256
  production: !0,
@@ -261,7 +262,7 @@ async function Ie(e = "MIT") {
261
262
  excludePackages: [t.name ?? "", ...n].join(";"),
262
263
  out: "licenses/licenses.json"
263
264
  };
264
- ue(a, (e) => {
265
+ le(a, (e) => {
265
266
  e == null ? r() : i(e);
266
267
  });
267
268
  }), await a("3️⃣ Identify transitive dependencies", "npm", [
@@ -269,32 +270,32 @@ async function Ie(e = "MIT") {
269
270
  "--all",
270
271
  "--json",
271
272
  "--omit=dev"
272
- ], "licenses/licenseTree.json"), await Re("4️⃣ ", e, new Set(n)), o("Dependencies documented");
273
+ ], "licenses/licenseTree.json"), await Le("4️⃣ ", e, new Set(n)), o("Dependencies documented");
273
274
  } catch (e) {
274
275
  console.error("❌ Error documenting dependencies", e), process.exit(1);
275
276
  }
276
277
  }
277
- async function Le(e) {
278
- b(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`);
278
+ async function Ie(e) {
279
+ x(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`);
279
280
  let t = `> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`;
280
- await n(`${j}\n\n${t}`, k, A);
281
+ await n(`${M}\n\n${t}`, A, j);
281
282
  }
282
- async function Re(e, t, r) {
283
- b(`${e} Insert licenses into 'README.md'`);
283
+ async function Le(e, t, r) {
284
+ x(`${e} Insert licenses into 'README.md'`);
284
285
  let [i, a] = await Promise.all([c("licenses/licenses.json"), c("licenses/licenseTree.json")]), o = /* @__PURE__ */ new Map();
285
- for (let [e, t] of Object.entries(i)) o.set(e, He(e, t));
286
+ for (let [e, t] of Object.entries(i)) o.set(e, Ve(e, t));
286
287
  await Promise.all(o.values().map(async (e) => {
287
- let t = await Ue(e.name, e.installedVersion);
288
+ let t = await He(e.name, e.installedVersion);
288
289
  e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
289
290
  }));
290
- let s = `${Be(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
291
- for (let e of o.values()) s += We(e);
291
+ let s = `${ze(t)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
292
+ for (let e of o.values()) s += Ue(e);
292
293
  let l = [];
293
- a.dependencies != null && M(a.dependencies, o, r, l, 0);
294
- let u = `${Fe}\n\n${l.join("\n")}`;
295
- await n(`${j}\n\n${s.trimEnd()}\n\n### Dependency Tree\n\n${u}`, k, A);
294
+ a.dependencies != null && We(a.dependencies, o, r, l, 0);
295
+ let u = `${Pe}\n\n${l.join("\n")}`;
296
+ await n(`${M}\n\n${s.trimEnd()}\n\n### Dependency Tree\n\n${u}`, A, j);
296
297
  }
297
- async function ze() {
298
+ async function Re() {
298
299
  let e = await i("package-lock.json"), t = e === null ? {} : JSON.parse(e).packages ?? {}, n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
299
300
  for (let [e, i] of Object.entries(t)) {
300
301
  if (e === "" || i.version === void 0) continue;
@@ -303,13 +304,13 @@ async function ze() {
303
304
  }
304
305
  return r.values().filter((e) => !n.has(e)).toArray();
305
306
  }
306
- function Be(e) {
307
- 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 ${Ve(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.`;
307
+ function ze(e) {
308
+ 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 ${Be(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.`;
308
309
  }
309
- function Ve(e) {
310
+ function Be(e) {
310
311
  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))}`;
311
312
  }
312
- function He(e, t) {
313
+ function Ve(e, t) {
313
314
  let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
314
315
  return {
315
316
  name: r,
@@ -323,7 +324,7 @@ function He(e, t) {
323
324
  ...t.licenseFile != null && { licenseFileLink: t.licenseFile }
324
325
  };
325
326
  }
326
- async function Ue(e, t) {
327
+ async function He(e, t) {
327
328
  try {
328
329
  let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
329
330
  if (n.ok) {
@@ -341,27 +342,27 @@ async function Ue(e, t) {
341
342
  publishedDate: ""
342
343
  };
343
344
  }
344
- function We(e) {
345
+ function Ue(e) {
345
346
  let t = e.licenseFileLink == null || e.licenseFileLink === "" ? "⚠️ No license file" : `[LICENSE](licenses/${e.licenseFileLink})`;
346
347
  return `|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${t}|\n`;
347
348
  }
348
- function M(e, t, n, r, i) {
349
+ function We(e, t, n, r, i) {
349
350
  let a = " ".repeat(i);
350
351
  for (let [o, s] of Object.entries(e)) {
351
352
  let e = s.version ?? "";
352
353
  if (n.has(`${o}@${e}`)) continue;
353
354
  let c = t.get(`${o}@${e}`), l = c == null ? o : `[${o}](${c.repository})`, u = Ge(c);
354
- r.push(`${a}- **${l}** ${e}${u}`), s.dependencies != null && M(s.dependencies, t, n, r, i + 1);
355
+ r.push(`${a}- **${l}** ${e}${u}`), s.dependencies != null && We(s.dependencies, t, n, r, i + 1);
355
356
  }
356
357
  }
357
358
  function Ge(e) {
358
359
  if (e == null) return "";
359
- let t = e.publishedDate ? N(e.publishedDate.split("T", 1)[0]) : "";
360
+ let t = e.publishedDate ? Ke(e.publishedDate.split("T", 1)[0]) : "";
360
361
  if (e.latestVersion === "" || e.latestVersion === e.installedVersion) return t === "" ? "" : ` — ${t}`;
361
- let n = e.latestPublishedDate ? N(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
362
+ let n = e.latestPublishedDate ? Ke(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `**latest**: ${e.latestVersion} ❗` : `**latest**: ${e.latestVersion} — ${n} ❗`;
362
363
  return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
363
364
  }
364
- function N(e) {
365
+ function Ke(e) {
365
366
  if (e == null || e === "") return "n/a";
366
367
  let t = e.split("T", 1)[0];
367
368
  if (t == null || t === "") return "n/a";
@@ -370,31 +371,31 @@ function N(e) {
370
371
  }
371
372
  //#endregion
372
373
  //#region src/actions/documentOpening.ts
373
- var Ke = "<!-- OPENING_START -->", qe = "<!-- OPENING_END -->";
374
- async function Je() {
374
+ var qe = "<!-- OPENING_START -->", Je = "<!-- OPENING_END -->";
375
+ async function Ye() {
375
376
  try {
376
- f("Document Opening"), b("1️⃣ Insert opening content into 'README.md'");
377
- let e = await c("package.json"), r = await c("config.json"), { owner: i, repo: a } = t(e, "document opening"), s = Ye(e), l = Ze(r), u = Qe(i, a, s, _(r.id).publishedTo === "npm" ? Xe(e) : void 0, e.description, l);
378
- await n(u, Ke, qe), o("Opening documented");
377
+ f("Document Opening"), x("1️⃣ Insert opening content into 'README.md'");
378
+ let e = await c("package.json"), r = await c("config.json"), { owner: i, repo: a } = t(e, "document opening"), s = Xe(e), l = Qe(r), u = $e(i, a, s, _(r.id).publishedTo === "npm" ? Ze(e) : void 0, e.description, l);
379
+ await n(u, qe, Je), o("Opening documented");
379
380
  } catch (e) {
380
381
  console.error("❌ Error documenting opening", e), process.exit(1);
381
382
  }
382
383
  }
383
- function Ye(e) {
384
+ function Xe(e) {
384
385
  let t = e.license;
385
386
  if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
386
387
  return t;
387
388
  }
388
- function Xe(e) {
389
+ function Ze(e) {
389
390
  let t = e.name;
390
391
  if (t == null || t === "") throw Error("package.json 'name' field is required to document opening.");
391
392
  return t;
392
393
  }
393
- function Ze(e) {
394
- let t = e.description.en, n = (Array.isArray(t) ? t : [t]).filter((e) => typeof e == "string" && e !== "");
395
- return n.length === 0 ? void 0 : n.join("\n\n");
394
+ function Qe(e) {
395
+ let t = e.description.en?.trim();
396
+ return t === void 0 || t === "" ? void 0 : t;
396
397
  }
397
- function Qe(e, t, n, r, i, a) {
398
+ function $e(e, t, n, r, i, a) {
398
399
  let o = `https://github.com/${e}/${t}`;
399
400
  return `[![License: ${n}](https://img.shields.io/badge/License-${n.replaceAll("-", "--")}-blue.svg)](./LICENSE)
400
401
  [![DPUse version](https://img.shields.io/github/v/release/${e}/${t}?color=f6821f&label=DPUse)](${o}/releases/latest)${r === void 0 ? "" : `\n[![npm version](https://img.shields.io/npm/v/${r}?color=cb3837&label=npm)](https://www.npmjs.com/package/${r})`}
@@ -416,71 +417,71 @@ In addition, DPUse provides [Tools](https://www.dpuse.app) used by the applicati
416
417
  }
417
418
  //#endregion
418
419
  //#region src/actions/documentQualitySecurity.ts
419
- var P = {
420
+ var N = {
420
421
  "Branch-Protection": 3,
421
422
  "Code-Review": 0,
422
423
  Contributors: 0
423
- }, $e = /* @__PURE__ */ new Set(["CII-Best-Practices"]), et = "coverage/coverage-final.json", tt = "coverage/coverage-summary.json", F = 80, nt = 60, I = "code-health-reports/vitest/badge.json", rt = {
424
+ }, et = /* @__PURE__ */ new Set(["CII-Best-Practices"]), tt = "coverage/coverage-final.json", nt = "coverage/coverage-summary.json", P = 80, rt = 60, F = "code-health-reports/vitest/badge.json", it = {
424
425
  actions: "GitHub Actions",
425
426
  "javascript-typescript": "JavaScript/TypeScript",
426
427
  rust: "Rust"
427
- }, it = {
428
+ }, at = {
428
429
  A: "brightgreen",
429
430
  B: "green",
430
431
  C: "yellow",
431
432
  D: "orange",
432
433
  F: "red"
433
- }, L = `${m}/health.json`, at = oe(se);
434
- async function ot() {
434
+ }, I = `${m}/health.json`, ot = ae(oe);
435
+ async function st() {
435
436
  try {
436
437
  f("Document Quality & Security");
437
- let e = await c("package.json"), r = await st(e), i = await lt(e, r === void 0 ? [] : ["--coverage", et]), { owner: a, repo: s } = t(e, "document quality and security");
438
- b("4️⃣ Read security checks and settings");
439
- let l = await dt(a, s, e);
440
- b("5️⃣ Look up OpenSSF Best Practices badge and Scorecard results");
441
- let [u, d] = await Promise.all([ft(`https://github.com/${a}/${s}`), pt(`github.com/${a}/${s}`)]);
442
- b("6️⃣ Insert quality and security content into 'README.md'");
443
- let p = gt(a, s, {
438
+ let e = await c("package.json"), r = await ct(e), i = await ut(e, r === void 0 ? [] : ["--coverage", tt]), { owner: a, repo: s } = t(e, "document quality and security");
439
+ x("4️⃣ Read security checks and settings");
440
+ let l = await ft(a, s, e);
441
+ x("5️⃣ Look up OpenSSF Best Practices badge and Scorecard results");
442
+ let [u, d] = await Promise.all([pt(`https://github.com/${a}/${s}`), mt(`github.com/${a}/${s}`)]);
443
+ x("6️⃣ Insert quality and security content into 'README.md'");
444
+ let p = _t(a, s, {
444
445
  coveragePercent: r,
445
446
  fallowHealth: i,
446
447
  securitySettings: l
447
448
  }, u, d);
448
- await C(), await n(p, re, te), o("Quality & security documented");
449
+ await w(), await n(p, ne, te), o("Quality & security documented");
449
450
  } catch (e) {
450
451
  console.error("❌ Error documenting quality and security", e), process.exit(1);
451
452
  }
452
453
  }
453
- async function st(e) {
454
+ async function ct(e) {
454
455
  if (e.devDependencies?.["@vitest/coverage-v8"] == null) {
455
- b("1️⃣ Test coverage NOT measured, as '@vitest/coverage-v8' is not installed");
456
+ x("1️⃣ Test coverage NOT measured, as '@vitest/coverage-v8' is not installed");
456
457
  return;
457
458
  }
458
- await x("1️⃣ Measure test coverage", "vitest", [
459
+ await S("1️⃣ Measure test coverage", "vitest", [
459
460
  "run",
460
461
  "--passWithNoTests",
461
462
  "--coverage"
462
463
  ]);
463
- let t = await i(tt);
464
+ let t = await i(nt);
464
465
  if (t === null) return;
465
466
  let n = JSON.parse(t).total.lines.pct;
466
- return await ct(n), n;
467
+ return await lt(n), n;
467
468
  }
468
- async function ct(e) {
469
+ async function lt(e) {
469
470
  let t = [
470
471
  "red",
471
472
  "yellow",
472
473
  "brightgreen"
473
- ], n = Number(e >= nt) + Number(e >= F);
474
- await r(I, {
474
+ ], n = Number(e >= rt) + Number(e >= P);
475
+ await r(F, {
475
476
  schemaVersion: 1,
476
477
  label: "coverage",
477
478
  message: `${e.toFixed(1)}%`,
478
479
  color: t[n]
479
480
  });
480
481
  }
481
- async function lt(e, t) {
482
+ async function ut(e, t) {
482
483
  if (e.devDependencies?.fallow == null) {
483
- b("2️⃣ Code health NOT measured, as Fallow is not installed"), b("3️⃣ Code health report NOT required");
484
+ x("2️⃣ Code health NOT measured, as Fallow is not installed"), x("3️⃣ Code health report NOT required");
484
485
  return;
485
486
  }
486
487
  await a("2️⃣ Measure code health", "fallow", [
@@ -489,33 +490,33 @@ async function lt(e, t) {
489
490
  "--format",
490
491
  "json",
491
492
  ...t
492
- ], L), await a("3️⃣ Write code health report", "fallow", ["--format", "markdown"], s, !0);
493
- let n = await c(L);
494
- return await ut(n), n;
493
+ ], I), await a("3️⃣ Write code health report", "fallow", ["--format", "markdown"], s, !0);
494
+ let n = await c(I);
495
+ return await dt(n), n;
495
496
  }
496
- async function ut(e) {
497
+ async function dt(e) {
497
498
  let { score: t, grade: n } = e.health_score;
498
- await r(ne, {
499
+ await r(y, {
499
500
  schemaVersion: 1,
500
501
  label: "fallow",
501
502
  message: `${n} (${String(Math.round(t))})`,
502
- color: it[n] ?? "lightgrey"
503
+ color: at[n] ?? "lightgrey"
503
504
  });
504
505
  }
505
- async function dt(e, t, n) {
506
+ async function ft(e, t, n) {
506
507
  let [r, a, o, s] = await Promise.all([
507
508
  i(".github/workflows/ci.yml"),
508
509
  i(".github/workflows/codeql.yml"),
509
510
  i(".github/dependabot.yml"),
510
511
  i(l)
511
512
  ]), [c, u, d, f] = await Promise.all([
512
- R(`repos/${e}/${t}`),
513
- R(`repos/${e}/${t}/private-vulnerability-reporting`),
514
- R(`repos/${e}/${t}/vulnerability-alerts`),
515
- R(`repos/${e}/${t}/commits/main/check-runs?per_page=100`)
513
+ L(`repos/${e}/${t}`),
514
+ L(`repos/${e}/${t}/private-vulnerability-reporting`),
515
+ L(`repos/${e}/${t}/vulnerability-alerts`),
516
+ L(`repos/${e}/${t}/commits/main/check-runs?per_page=100`)
516
517
  ]), p = c === void 0 ? void 0 : JSON.parse(c).security_and_analysis, m = (e) => p?.[e] === void 0 ? void 0 : p[e].status === "enabled", h = new Set((f === void 0 ? [] : JSON.parse(f).check_runs).map((e) => e.app?.slug)), g = o?.match(/package-ecosystem:/g)?.length ?? 0, _ = o?.match(/open-pull-requests-limit: 0\b/g)?.length ?? 0;
517
518
  return {
518
- codeQLLanguages: (a ?? "").matchAll(/- language: ([\w-]+)/g).filter(([, e]) => e !== "rust" || s !== null).map(([, e = ""]) => rt[e] ?? e).toArray(),
519
+ codeQLLanguages: (a ?? "").matchAll(/- language: ([\w-]+)/g).filter(([, e]) => e !== "rust" || s !== null).map(([, e = ""]) => it[e] ?? e).toArray(),
519
520
  codeQLQueries: /queries: ([\w-]+)/.exec(a ?? "")?.[1],
520
521
  dependabotAlerts: d !== void 0,
521
522
  dependabotSecurityUpdates: m("dependabot_security_updates"),
@@ -532,37 +533,37 @@ async function dt(e, t, n) {
532
533
  testsInCI: r?.includes("npm test") ?? !1
533
534
  };
534
535
  }
535
- async function R(e) {
536
+ async function L(e) {
536
537
  try {
537
- let { stdout: t } = await at("gh", ["api", e]);
538
+ let { stdout: t } = await ot("gh", ["api", e]);
538
539
  return t;
539
540
  } catch (e) {
540
541
  if (String(e.stderr).includes("HTTP 404")) return;
541
542
  throw e;
542
543
  }
543
544
  }
544
- async function ft(e) {
545
+ async function pt(e) {
545
546
  let t = await fetch(`https://www.bestpractices.dev/projects.json?url=${encodeURIComponent(e)}`);
546
547
  if (!t.ok) throw Error(`OpenSSF Best Practices lookup failed with status ${String(t.status)}.`);
547
548
  return (await t.json()).find((t) => t.repo_url === e)?.id;
548
549
  }
549
- async function pt(e) {
550
+ async function mt(e) {
550
551
  let t = await fetch(`https://api.scorecard.dev/projects/${e}`);
551
552
  if (t.status !== 404) {
552
553
  if (!t.ok) throw Error(`OpenSSF Scorecard lookup failed with status ${String(t.status)}.`);
553
554
  return await t.json();
554
555
  }
555
556
  }
556
- function mt(e) {
557
- return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || $e.has(e) || P[e] !== void 0 && t >= P[e]);
557
+ function ht(e) {
558
+ return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || et.has(e) || N[e] !== void 0 && t >= N[e]);
558
559
  }
559
- function z(e) {
560
+ function R(e) {
560
561
  return e === !1 ? " These are handled manually." : "";
561
562
  }
562
- function B(e) {
563
+ function z(e) {
563
564
  return e === void 0 ? "❔ Unknown" : e ? "✅ On" : "❌ Off";
564
565
  }
565
- function V(e, t) {
566
+ function B(e, t) {
566
567
  return t.length === 0 ? "" : `### ${e}
567
568
 
568
569
  |Check|Status|What it does|
@@ -571,90 +572,90 @@ ${t.map((e) => `|${e.join("|")}|`).join("\n")}
571
572
 
572
573
  `;
573
574
  }
574
- function H(e, t, n, r) {
575
+ function V(e, t, n, r) {
575
576
  return `![${n}](https://img.shields.io/endpoint?url=${encodeURIComponent(`https://raw.githubusercontent.com/${e}/${t}/main/${r}`)})`;
576
577
  }
577
- function ht(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i }) {
578
+ function gt(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i }) {
578
579
  let a = `https://github.com/${e}/${t}`, o = (e) => e ? ` Part of the [CI workflow](${a}/actions/workflows/ci.yml) on every push and pull request to \`main\`.` : "", c = [[
579
580
  "Unit tests",
580
- B(i.testsInCI),
581
+ z(i.testsInCI),
581
582
  `[Vitest](https://vitest.dev) runs the unit tests.${o(i.testsInCI)}`
582
583
  ], [
583
584
  "Property-based tests",
584
- B(i.propertyTests),
585
+ z(i.propertyTests),
585
586
  `[fast-check](https://fast-check.dev) runs many random inputs per test to find edge cases, alongside the unit tests.${o(i.propertyTests && i.testsInCI)}`
586
587
  ]];
587
588
  n !== void 0 && c.push([
588
589
  "Test coverage",
589
- B(!0),
590
- `${H(e, t, "Coverage", I)} [Vitest's V8 coverage](https://vitest.dev/guide/coverage) measures the share of source lines the unit tests run. The target is ${String(F)}%.`
590
+ z(!0),
591
+ `${V(e, t, "Coverage", F)} [Vitest's V8 coverage](https://vitest.dev/guide/coverage) measures the share of source lines the unit tests run. The target is ${String(P)}%.`
591
592
  ]);
592
593
  let l = `[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=${e}_${t}&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=${e}_${t}) `, u = [[
593
594
  "Code analysis",
594
- B(i.sonarCloud),
595
+ z(i.sonarCloud),
595
596
  `${i.sonarCloud ? l : ""}[SonarCloud](https://sonarcloud.io) checks every push for bugs, code smells and vulnerabilities.`
596
597
  ], [
597
598
  "Linting",
598
- B(i.lintInCI),
599
+ z(i.lintInCI),
599
600
  `[ESLint](https://eslint.org) checks the code for errors and style problems.${o(i.lintInCI)}`
600
601
  ]];
601
602
  r !== void 0 && u.unshift([
602
603
  "Code health",
603
- B(!0),
604
- `[${H(e, t, "Fallow code health", ne)}](./${s}) [Fallow](https://github.com/fallow-rs/fallow) finds unused code, duplication, complexity and dependency problems.`
604
+ z(!0),
605
+ `[${V(e, t, "Fallow code health", y)}](./${s}) [Fallow](https://github.com/fallow-rs/fallow) finds unused code, duplication, complexity and dependency problems.`
605
606
  ]);
606
607
  let d = i.codeQLLanguages.length > 0, f = `[![CodeQL](${a}/actions/workflows/codeql.yml/badge.svg)](${a}/security/code-scanning) `, p = i.codeQLQueries === "security-extended" ? "using the extended security queries" : "using the default queries", m = d ? ` ${i.codeQLLanguages.join(" and ")}` : "", h = [
607
608
  [
608
609
  "Push protection",
609
- B(i.pushProtection),
610
+ z(i.pushProtection),
610
611
  "[GitHub push protection](https://docs.github.com/en/code-security/secret-scanning/push-protection-for-repositories-and-organizations) blocks pushes that contain credentials."
611
612
  ],
612
613
  [
613
614
  "Static analysis",
614
- B(d),
615
+ z(d),
615
616
  `${d ? f : ""}[CodeQL](https://codeql.github.com) scans${m} for security vulnerabilities, ${p}, on every push and pull request to \`main\` and weekly.`
616
617
  ],
617
618
  [
618
619
  "Secret scanning",
619
- B(i.secretScanning),
620
+ z(i.secretScanning),
620
621
  "[GitHub secret scanning](https://docs.github.com/en/code-security/secret-scanning) detects credentials, such as API keys and tokens, committed to the repository."
621
622
  ]
622
623
  ], g = "[Dependabot](https://docs.github.com/en/code-security/dependabot)", _ = [
623
624
  [
624
625
  "Vulnerability audit",
625
- B(i.npmAuditInCI),
626
+ z(i.npmAuditInCI),
626
627
  i.npmAuditLevel === void 0 ? `[npm audit](https://docs.npmjs.com/cli/commands/npm-audit) fails when a shipped dependency has any known vulnerability, or a development dependency has a high or critical one.${o(i.npmAuditInCI)}` : `[npm audit](https://docs.npmjs.com/cli/commands/npm-audit) fails when a dependency has a known vulnerability of ${i.npmAuditLevel} severity or above.${o(i.npmAuditInCI)}`
627
628
  ],
628
629
  [
629
630
  "Supply chain risk",
630
- B(i.socket),
631
+ z(i.socket),
631
632
  "[Socket](https://socket.dev) flags malicious packages, typosquatting and suspicious behaviour that may not yet have a CVE."
632
633
  ],
633
634
  [
634
635
  "Security alerts",
635
- B(i.dependabotAlerts),
636
+ z(i.dependabotAlerts),
636
637
  `${g} alerts when a dependency has a known vulnerability, using the GitHub Advisory Database.`
637
638
  ],
638
639
  [
639
640
  "Security updates",
640
- B(i.dependabotSecurityUpdates),
641
- `${g} opens pull requests that update vulnerable dependencies.${z(i.dependabotSecurityUpdates)}`
641
+ z(i.dependabotSecurityUpdates),
642
+ `${g} opens pull requests that update vulnerable dependencies.${R(i.dependabotSecurityUpdates)}`
642
643
  ],
643
644
  [
644
645
  "Version updates",
645
- B(i.dependabotVersionUpdates),
646
- `${g} opens pull requests for new dependency versions.${z(i.dependabotVersionUpdates)}`
646
+ z(i.dependabotVersionUpdates),
647
+ `${g} opens pull requests for new dependency versions.${R(i.dependabotVersionUpdates)}`
647
648
  ]
648
649
  ];
649
650
  return `This section is updated each time \`npm run document\` is run. Settings come from the repository's workflow files and GitHub. Test coverage and the Fallow score are measured at the same time.
650
651
 
651
- ${V("Testing", c)}${V("Code Quality", u)}${V("Security Analysis", h)}${V("Dependencies", _)}`;
652
+ ${B("Testing", c)}${B("Code Quality", u)}${B("Security Analysis", h)}${B("Dependencies", _)}`;
652
653
  }
653
- function gt(e, t, n, r, i) {
654
- let a = `https://github.com/${e}/${t}`, o = `github.com/${e}/${t}`, s = `https://www.bestpractices.dev/projects/${String(r)}`, c = i !== void 0 && mt(i) ? "\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." : "", l = r === void 0 ? "" : `[![OpenSSF Best Practices](${s}/badge)](${s})\n`, u = n.securitySettings.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${a}/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.";
654
+ function _t(e, t, n, r, i) {
655
+ let a = `https://github.com/${e}/${t}`, o = `github.com/${e}/${t}`, s = `https://www.bestpractices.dev/projects/${String(r)}`, c = i !== void 0 && ht(i) ? "\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." : "", l = r === void 0 ? "" : `[![OpenSSF Best Practices](${s}/badge)](${s})\n`, u = n.securitySettings.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${a}/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.";
655
656
  return `## Quality & Security
656
657
 
657
- ${ht(e, t, n)}### OpenSSF 🚧
658
+ ${gt(e, t, n)}### OpenSSF 🚧
658
659
 
659
660
  ${l}[![OpenSSF Scorecard](https://api.scorecard.dev/projects/${o}/badge)](https://scorecard.dev/viewer/?uri=${o})
660
661
 
@@ -666,37 +667,37 @@ Please do not open public GitHub issues for security vulnerabilities. ${u}`;
666
667
  }
667
668
  //#endregion
668
669
  //#region src/actions/documentUsage.ts
669
- var _t = "<!-- USAGE_START -->", vt = "<!-- USAGE_END -->", yt = /* @__PURE__ */ new Set([
670
+ var vt = "<!-- USAGE_START -->", yt = "<!-- USAGE_END -->", bt = /* @__PURE__ */ new Set([
670
671
  "connector",
671
672
  "cookbook",
672
673
  "presenter"
673
- ]), bt = /* @__PURE__ */ new Set(["development", "eslint"]), xt = "> [!WARNING]\n> This project 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.", St = "This repository manages itself using the actions it implements.", Ct = "This repository is managed using the common set of actions provided by [@dpuse/dpuse-development](https://github.com/dpuse/dpuse-development).";
674
- async function wt() {
674
+ ]), xt = /* @__PURE__ */ new Set(["development", "eslint"]), St = "> [!WARNING]\n> This project 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.", Ct = "This repository manages itself using the actions it implements.", wt = "This repository is managed using the common set of actions provided by [@dpuse/dpuse-development](https://github.com/dpuse/dpuse-development).";
675
+ async function Tt() {
675
676
  try {
676
- f("Document Usage"), b("1️⃣ Insert usage content into 'README.md'");
677
- let [e, t] = await Promise.all([c("package.json"), c("config.json")]), r = Tt(e), i = Et(r), a = U(e.engines?.node), s = U(e.engines?.npm), l = U(e.devDependencies?.typescript), u = Dt(_(t.id), e.name), d = `${r.replace(/\.git$/, "")}/blob/main/package.json`, p = Ot(u, r, i, a, s, l, `${e.name === "@dpuse/dpuse-development" ? St : Ct} See the \`scripts\` block in [package.json](${d}) for details.`);
678
- await n(p, _t, vt), o("Usage documented");
677
+ f("Document Usage"), x("1️⃣ Insert usage content into 'README.md'");
678
+ let [e, t] = await Promise.all([c("package.json"), c("config.json")]), r = Et(e), i = Dt(r), a = H(e.engines?.node), s = H(e.engines?.npm), l = H(e.devDependencies?.typescript), u = Ot(_(t.id), e.name), d = `${r.replace(/\.git$/, "")}/blob/main/package.json`, p = kt(u, r, i, a, s, l, `${e.name === "@dpuse/dpuse-development" ? Ct : wt} See the \`scripts\` block in [package.json](${d}) for details.`);
679
+ await n(p, vt, yt), o("Usage documented");
679
680
  } catch (e) {
680
681
  console.error("❌ Error documenting usage", e), process.exit(1);
681
682
  }
682
683
  }
683
- function Tt(e) {
684
+ function Et(e) {
684
685
  let t = e.repository, n = typeof t == "string" ? t : t?.url;
685
686
  if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
686
687
  return n.replace(/^git\+/, "");
687
688
  }
688
- function Et(e) {
689
+ function Dt(e) {
689
690
  return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
690
691
  }
691
- function U(e) {
692
+ function H(e) {
692
693
  if (e == null) throw Error("package.json version range is required to document usage.");
693
694
  let t = /\d+(?:\.\d+)*/.exec(e);
694
695
  if (t == null) throw Error(`Unable to parse version from '${e}'.`);
695
696
  return t[0];
696
697
  }
697
- function Dt(e, t) {
698
+ function Ot(e, t) {
698
699
  let { typeId: n } = e;
699
- if (yt.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.
700
+ if (bt.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.
700
701
 
701
702
  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.`;
702
703
  if (e.publishedTo === "npm") {
@@ -707,11 +708,11 @@ You may view or clone this repository for your own purposes, such as building a
707
708
  npm install ${t}
708
709
  \`\`\`
709
710
 
710
- ${bt.has(n) ? `${xt}\n\n` : ""}To work on the source instead, clone this repository.`;
711
+ ${xt.has(n) ? `${St}\n\n` : ""}To work on the source instead, clone this repository.`;
711
712
  }
712
713
  return "You may view or clone this repository for your own purposes.";
713
714
  }
714
- function Ot(e, t, n, r, i, a, o) {
715
+ function kt(e, t, n, r, i, a, o) {
715
716
  return `## Usage
716
717
 
717
718
  ${e}
@@ -728,93 +729,87 @@ ${o}`;
728
729
  }
729
730
  //#endregion
730
731
  //#region src/actions/documentApiReference.ts
731
- var W = "API_REFERENCE.md";
732
- async function kt() {
732
+ var U = "API_REFERENCE.md";
733
+ async function At() {
733
734
  try {
734
735
  f("Document API Reference");
735
736
  let { writeAPIReference: e } = await import("./apiReference-BazeHifT.js");
736
- await e("1️⃣ ", W), o("API reference documented");
737
+ await e("1️⃣ ", U), o("API reference documented");
737
738
  } catch (e) {
738
739
  console.error("❌ Error documenting API reference", e), process.exit(1);
739
740
  }
740
741
  }
741
742
  //#endregion
742
743
  //#region src/actions/documentBundleSizes.ts
743
- var G = "bundle-analysis-reports/sonda/index.json", At = "<!-- BUNDLE_START -->", jt = "<!-- BUNDLE_END -->", K = "&nbsp;&nbsp;&nbsp;&nbsp;", q = 20, Mt = "This report is updated with each release, from the bundle the release builds, 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._", J = "(bundler output, whitespace & JSON)", Nt = `${J} = 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.`;
744
- async function Pt(e) {
744
+ var W = "bundle-analysis-reports/sonda/index.json", jt = "<!-- BUNDLE_START -->", Mt = "<!-- BUNDLE_END -->", G = "&nbsp;&nbsp;&nbsp;&nbsp;", K = 20, q = "█", Nt = "▒", Pt = "This report is updated with each release, from the bundle the release builds, 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._", J = "Bars show each row's share of its output file.", Ft = "↳ rows are part of the row above.", Y = "(bundler output, whitespace & JSON)", It = `${Y} = 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.`;
745
+ async function Lt(e) {
745
746
  try {
746
- f("Document Bundle Sizes"), b("1️⃣ Read bundle analysis report");
747
- let t = await c(G);
748
- b("2️⃣ Insert table into 'README.md'");
749
- let r = Ft(t, e?.moduleLevel ?? !1);
750
- await n(`## Bundle Analysis\n\n${Mt}\n\n${r}\n\n${Nt}`, At, jt), o("Bundle sizes documented");
747
+ f("Document Bundle Sizes"), x("1️⃣ Read bundle analysis report");
748
+ let t = await c(W);
749
+ x("2️⃣ Insert table into 'README.md'");
750
+ let r = Rt(t, e?.moduleLevel ?? !1), i = r.includes("↳") ? `${J} ${Ft}` : J;
751
+ await n(`## Bundle Analysis\n\n${Pt}\n\n${r}\n\n${i}\n\n${It}`, jt, Mt), o("Bundle sizes documented");
751
752
  } catch (e) {
752
753
  console.error("❌ Error documenting bundle sizes", e), process.exit(1);
753
754
  }
754
755
  }
755
- function Ft(e, t) {
756
- let n = Vt(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, Gt(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
756
+ function Rt(e, t) {
757
+ let n = Wt(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, Z(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), a = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
757
758
  for (let [e, o] of i) {
758
- let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted((e, t) => t[1].sizes.uncompressed - e[1].sizes.uncompressed), s = i.length === 1 ? It(e, o, zt(i), r, t) : Lt(e, o, i, r, t);
759
- a.push(...s);
759
+ let i = [...n.get(e) ?? /* @__PURE__ */ new Map()].toSorted(zt), s = i.reduce((e, [, t]) => e + t.sizes.uncompressed, 0), c = s > 0 && r > 0 ? ` · ${Zt(s, r)} of the build` : "";
760
+ a.push(`| **${e}** | ${Jt(o)}${c} |`, ...Bt(i, s, t));
760
761
  }
761
762
  return a.join("\n");
762
763
  }
763
- function It(e, t, n, r, i) {
764
- let [a, { sizes: o, files: s }] = n, c = r > 0 ? o.uncompressed / r * 100 : 0;
765
- if (s.size === 1) return [`| ${e} → ${Rt(a, Bt(s))} | ${X(t)} · ${Z(c)} |`];
766
- let l = [`| ${e} → ${a} | ${X(t)} · ${Z(c)} |`];
767
- return i || l.push(...Y(s, K, r)), l;
764
+ function zt(e, t) {
765
+ return e[0] === Y == (t[0] === Y) ? t[1].sizes.uncompressed - e[1].sizes.uncompressed : e[0] === Y ? 1 : -1;
768
766
  }
769
- function Lt(e, t, n, r, i) {
770
- let a = [`| ${e} | ${X(t)} |`];
771
- for (let [e, { sizes: t, files: o }] of n) {
772
- let n = r > 0 ? t.uncompressed / r * 100 : 0;
767
+ function Bt(e, t, n) {
768
+ let r = [];
769
+ for (let [i, { sizes: a, files: o }] of e) {
773
770
  if (o.size === 1) {
774
- let t = Bt(o);
775
- a.push(`| ${K}${Rt(e, t)} | ${Z(n)} |`);
771
+ let e = Ut(o);
772
+ r.push(`| ${G}${Ht(i, e)} | ${X(a.uncompressed, t)} |`);
776
773
  continue;
777
774
  }
778
- a.push(`| ${K}${e} | ${Z(n)} |`), i || a.push(...Y(o, `${K}${K}`, r));
775
+ r.push(`| ${G}${i} | ${X(a.uncompressed, t)} |`), n || r.push(...Vt(o, t));
779
776
  }
780
- return a;
777
+ return r;
781
778
  }
782
- function Y(e, t, n) {
783
- return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, r]) => `| ${t}${e} | ${Z(n > 0 ? r.uncompressed / n * 100 : 0)} |`);
779
+ function Vt(e, t) {
780
+ return [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed).map(([e, n]) => `| ${G}${G}↳ ${e} | ${X(n.uncompressed, t, Nt)} |`);
784
781
  }
785
- function Rt(e, t) {
786
- return t === "" ? e : `${e} → ${t}`;
782
+ function X(e, t, n = q) {
783
+ return `${Yt(t > 0 ? e / t * 100 : 0, n)} · ${$(e)}`;
787
784
  }
788
- function zt(e) {
789
- let [t] = e;
790
- if (t === void 0) throw Error("Expected exactly one entry");
791
- return t;
785
+ function Ht(e, t) {
786
+ return t === "" ? e : `${e} → ${t}`;
792
787
  }
793
- function Bt(e) {
788
+ function Ut(e) {
794
789
  let [t] = e.keys();
795
790
  if (t === void 0) throw Error("Expected exactly one file");
796
791
  return t;
797
792
  }
798
- function Vt(e) {
799
- let t = Ht(e.dependencies), n = /* @__PURE__ */ new Map();
793
+ function Wt(e) {
794
+ let t = Gt(e.dependencies), n = /* @__PURE__ */ new Map();
800
795
  for (let r of e.resources) {
801
796
  if (r.kind !== "chunk" || !r.parent) continue;
802
- let { group: e, file: i } = Ut(r.name, t), a = Gt(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
797
+ let { group: e, file: i } = Kt(r.name, t), a = Z(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
803
798
  n.set(r.parent, o);
804
799
  let s = o.get(e) ?? {
805
- sizes: Kt(),
800
+ sizes: Q(),
806
801
  files: /* @__PURE__ */ new Map()
807
802
  };
808
- o.set(e, s), qt(s.sizes, a);
809
- let c = s.files.get(i) ?? Kt();
810
- s.files.set(i, c), qt(c, a);
803
+ o.set(e, s), Xt(s.sizes, a);
804
+ let c = s.files.get(i) ?? Q();
805
+ s.files.set(i, c), Xt(c, a);
811
806
  }
812
807
  return n;
813
808
  }
814
- function Ht(e) {
809
+ function Gt(e) {
815
810
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
816
811
  }
817
- function Ut(e, t) {
812
+ function Kt(e, t) {
818
813
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
819
814
  if (n) {
820
815
  let [t, r] = n;
@@ -824,55 +819,58 @@ function Ut(e, t) {
824
819
  };
825
820
  }
826
821
  return e === "[unassigned]" ? {
827
- group: J,
822
+ group: Y,
828
823
  file: ""
829
824
  } : e.startsWith("\0") ? {
830
825
  group: "(runtime)",
831
826
  file: e.slice(1)
832
827
  } : {
833
828
  group: e.startsWith("rust/") || e.includes("vite-plugin-wasm") ? "wasm" : "src",
834
- file: Wt(e)
829
+ file: qt(e)
835
830
  };
836
831
  }
837
- function Wt(e) {
832
+ function qt(e) {
838
833
  return e.split("/").at(-1) ?? e;
839
834
  }
840
- function Gt(e) {
835
+ function Z(e) {
841
836
  return {
842
837
  uncompressed: e.uncompressed,
843
838
  gzip: e.gzip ?? 0
844
839
  };
845
840
  }
846
- function X(e) {
847
- return `${Jt(e.uncompressed)} · gzip ${Jt(e.gzip)}`;
841
+ function Jt(e) {
842
+ return `${$(e.uncompressed)} · gzip ${$(e.gzip)}`;
848
843
  }
849
- function Z(e) {
850
- let t = Math.round(e / 100 * q);
851
- return `\`${"█".repeat(t)}${"░".repeat(q - t)}\` ${e.toFixed(1)}%`;
844
+ function Yt(e, t = q) {
845
+ let n = Math.round(e / 100 * K);
846
+ return `\`${t.repeat(n)}${"░".repeat(K - n)}\` ${e.toFixed(1)}%`;
852
847
  }
853
- function Kt() {
848
+ function Q() {
854
849
  return {
855
850
  uncompressed: 0,
856
851
  gzip: 0
857
852
  };
858
853
  }
859
- function qt(e, t) {
854
+ function Xt(e, t) {
860
855
  e.uncompressed += t.uncompressed, e.gzip += t.gzip;
861
856
  }
862
- function Jt(e) {
857
+ function Zt(e, t) {
858
+ return `${(e / t * 100).toFixed(1)}%`;
859
+ }
860
+ function $(e) {
863
861
  return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
864
862
  }
865
863
  //#endregion
866
864
  //#region src/actions/documentProject.ts
867
- async function Q(e = "MIT", t = !1) {
865
+ async function Qt(e = "MIT", t = !1) {
868
866
  try {
869
867
  let n = await c("config.json"), r = _(n.id).typeId === "connector";
870
- await Je(), r && await Ae(), await wt(), await Ie(e), await i("bundle-analysis-reports/sonda/index.json") === null ? b(`ℹ️ Bundle sizes NOT documented, as there is no '${G}' yet. Build the project first.`) : await Pt({ moduleLevel: t }), await ot(), await je();
871
- let a = await i(W) !== null;
872
- a ? await kt() : b(`ℹ️ '${W}' NOT required by this project`), await x("ℹ️ Format generated files", "prettier", [
868
+ await Ye(), r && await ke(), await Tt(), await Fe(e), await i("bundle-analysis-reports/sonda/index.json") === null ? x(`ℹ️ Bundle sizes NOT documented, as there is no '${W}' yet. Build the project first.`) : await Lt({ moduleLevel: t }), await st(), await Ae();
869
+ let a = await i(U) !== null;
870
+ a ? await At() : x(`ℹ️ '${U}' NOT required by this project`), await S("ℹ️ Format generated files", "prettier", [
873
871
  "--write",
874
872
  "README.md",
875
- ...a ? [W] : []
873
+ ...a ? [U] : []
876
874
  ]);
877
875
  } catch (e) {
878
876
  console.error("❌ Error documenting project", e), process.exit(1);
@@ -880,7 +878,7 @@ async function Q(e = "MIT", t = !1) {
880
878
  }
881
879
  //#endregion
882
880
  //#region src/actions/formatCode.ts
883
- async function Yt() {
881
+ async function $t() {
884
882
  try {
885
883
  f("Format Code");
886
884
  let e = [
@@ -892,25 +890,25 @@ async function Yt() {
892
890
  "app",
893
891
  "src",
894
892
  "tests"
895
- ].filter((e) => ae(e)).map((e) => `${e}/**`)
893
+ ].filter((e) => ie(e)).map((e) => `${e}/**`)
896
894
  ];
897
- await x("1️⃣ Format", "prettier", e), o("Code formatted");
895
+ await S("1️⃣ Format", "prettier", e), o("Code formatted");
898
896
  } catch (e) {
899
897
  console.error("❌ Error formatting code", e), process.exit(1);
900
898
  }
901
899
  }
902
900
  //#endregion
903
901
  //#region src/actions/lintCode.ts
904
- async function Xt() {
902
+ async function en() {
905
903
  try {
906
- f("Lint Code"), await x("1️⃣ Lint", "eslint", ["."]), o("Code linted");
904
+ f("Lint Code"), await S("1️⃣ Lint", "eslint", ["."]), o("Code linted");
907
905
  } catch (e) {
908
906
  console.error("❌ Error linting code", e), process.exit(1);
909
907
  }
910
908
  }
911
909
  //#endregion
912
910
  //#region src/utilities/cloudflare.ts
913
- async function Zt() {
911
+ async function tn() {
914
912
  let e = await c("config.json"), t = {
915
913
  body: JSON.stringify(e),
916
914
  headers: { "Content-Type": "application/json" },
@@ -918,7 +916,7 @@ async function Zt() {
918
916
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
919
917
  if (!n.ok) throw Error(await n.text());
920
918
  }
921
- async function Qt(e, t) {
919
+ async function nn(e, t) {
922
920
  async function n(e, t, r) {
923
921
  for (let i of r) {
924
922
  let r = `${e}/${i}`, a = `${t}/${i}`;
@@ -936,7 +934,7 @@ async function Qt(e, t) {
936
934
  let r = await v(`${e}/${t}/`);
937
935
  await n(`${e}/${t}`, t, r);
938
936
  }
939
- async function $t(e) {
937
+ async function rn(e) {
940
938
  let t = e.id, n = {
941
939
  body: JSON.stringify(e),
942
940
  headers: { "Content-Type": "application/json" },
@@ -944,7 +942,7 @@ async function $t(e) {
944
942
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
945
943
  if (!r.ok) throw Error(await r.text());
946
944
  }
947
- async function en(e, t) {
945
+ async function an(e, t) {
948
946
  let n = `v${e.version ?? "unknown"}`;
949
947
  async function r(e, r = "") {
950
948
  let i = await v(e, { withFileTypes: !0 });
@@ -968,34 +966,34 @@ async function en(e, t) {
968
966
  }
969
967
  //#endregion
970
968
  //#region src/actions/publishProject.ts
971
- async function tn() {
969
+ async function on() {
972
970
  try {
973
971
  f("Publish Project");
974
972
  let e = await c("package.json"), t = await c("config.json"), n = _(t.id);
975
- n.publishedTo === "npm" ? await x("1️⃣ Publish to npm", "npm", ["publish", "--provenance"]) : b("1️⃣ Publishing to npm NOT required"), await $("2️⃣ ", e, t, n), o(`Project version '${e.version ?? "unknown"}' published.`);
973
+ n.publishedTo === "npm" ? await S("1️⃣ Publish to npm", "npm", ["publish", "--provenance"]) : x("1️⃣ Publishing to npm NOT required"), await sn("2️⃣ ", e, t, n), o(`Project version '${e.version ?? "unknown"}' published.`);
976
974
  } catch (e) {
977
975
  console.error("❌ Error publishing project", e), process.exit(1);
978
976
  }
979
977
  }
980
- async function $(e, t, n, r) {
981
- if (r.typeId === "app") b(`${e} Register module`), await Zt();
982
- else if (r.typeId === "engine") b(`${e} Register module`), await en(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await $t(n);
983
- else if (r.uploadGroupName === void 0) b(`${e} Registration NOT required`);
978
+ async function sn(e, t, n, r) {
979
+ if (r.typeId === "app") x(`${e} Register module`), await tn();
980
+ else if (r.typeId === "engine") x(`${e} Register module`), await an(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await rn(n);
981
+ else if (r.uploadGroupName === void 0) x(`${e} Registration NOT required`);
984
982
  else {
985
- b(`${e} Register module`);
983
+ x(`${e} Register module`);
986
984
  let i = n.id.split("-").slice(2).join("-");
987
- await en(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await $t(n);
985
+ await an(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await rn(n);
988
986
  }
989
987
  }
990
988
  //#endregion
991
989
  //#region src/actions/releaseProject.ts
992
- async function nn(e = "MIT", t = !1) {
990
+ async function cn(e = "MIT", t = !1) {
993
991
  try {
994
992
  f("Release Project");
995
993
  let n = await c("package.json"), r = await c("config.json"), i = _(r.id);
996
- await y("1️⃣ ", n);
994
+ await b("1️⃣ ", n);
997
995
  let a = await g("2️⃣ ", n, i);
998
- if (await E("3️⃣ ", n), b("4️⃣ Regenerate README"), await Q(e, t), await d("5️⃣ Stage changes", "git", ["add", "."]), await d("6️⃣ Commit changes", "git", [
996
+ if (await D("3️⃣ ", n), x("4️⃣ Regenerate README"), await Qt(e, t), await d("5️⃣ Stage changes", "git", ["add", "."]), await d("6️⃣ Commit changes", "git", [
999
997
  "commit",
1000
998
  "-m",
1001
999
  `v${n.version ?? "unknown"}`
@@ -1003,9 +1001,9 @@ async function nn(e = "MIT", t = !1) {
1003
1001
  "push",
1004
1002
  "origin",
1005
1003
  "main:main"
1006
- ]), await $("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1004
+ ]), await sn("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1007
1005
  let e = `v${n.version ?? "unknown"}`;
1008
- await x("9️⃣ Create GitHub release", "gh", [
1006
+ await S("9️⃣ Create GitHub release", "gh", [
1009
1007
  "release",
1010
1008
  "create",
1011
1009
  e,
@@ -1014,7 +1012,7 @@ async function nn(e = "MIT", t = !1) {
1014
1012
  "--generate-notes",
1015
1013
  "--latest"
1016
1014
  ]);
1017
- } else b(`9️⃣ Publishing NOT required for package with type identifier of '${i.typeId}'.`);
1015
+ } else x(`9️⃣ Publishing NOT required for package with type identifier of '${i.typeId}'.`);
1018
1016
  o(`Project version '${n.version ?? "unknown"}' released.`);
1019
1017
  } catch (e) {
1020
1018
  console.error("❌ Error releasing project", e), process.exit(1);
@@ -1022,11 +1020,11 @@ async function nn(e = "MIT", t = !1) {
1022
1020
  }
1023
1021
  //#endregion
1024
1022
  //#region src/actions/syncProjectWithGitHub.ts
1025
- async function rn() {
1023
+ async function ln() {
1026
1024
  try {
1027
1025
  f("Synchronise Project with GitHub");
1028
1026
  let e = await c("package.json"), t = await c("config.json"), n = _(t.id);
1029
- await y("1️⃣ ", e), await g("2️⃣ ", e, n), await d("3️⃣ Stage changes", "git", ["add", "."]), await d("4️⃣ Commit changes", "git", [
1027
+ await b("1️⃣ ", e), await g("2️⃣ ", e, n), await d("3️⃣ Stage changes", "git", ["add", "."]), await d("4️⃣ Commit changes", "git", [
1030
1028
  "commit",
1031
1029
  "-m",
1032
1030
  `v${e.version ?? "unknown"}`
@@ -1041,12 +1039,12 @@ async function rn() {
1041
1039
  }
1042
1040
  //#endregion
1043
1041
  //#region src/actions/testProject.ts
1044
- var an = [
1042
+ var un = [
1045
1043
  "1️⃣ ",
1046
1044
  "2️⃣ ",
1047
1045
  "3️⃣ ",
1048
1046
  "4️⃣ "
1049
- ], on = [{
1047
+ ], dn = [{
1050
1048
  id: "unit",
1051
1049
  label: "Run unit tests",
1052
1050
  command: "vitest",
@@ -1059,14 +1057,14 @@ var an = [
1059
1057
  arguments: ["test", "--pass-with-no-tests"],
1060
1058
  configFileName: "playwright.config.ts"
1061
1059
  }];
1062
- async function sn(e = ["unit"]) {
1060
+ async function fn(e = ["unit"]) {
1063
1061
  try {
1064
1062
  f("Test Project");
1065
1063
  let t = 0;
1066
- for (let n of on) {
1064
+ for (let n of dn) {
1067
1065
  if (!e.includes(n.id) || await i(n.configFileName) === null) continue;
1068
- let r = `${an[t] ?? ""} ${n.label}`;
1069
- await x(r, n.command, n.arguments), t += 1;
1066
+ let r = `${un[t] ?? ""} ${n.label}`;
1067
+ await S(r, n.command, n.arguments), t += 1;
1070
1068
  }
1071
1069
  if (t === 0) {
1072
1070
  console.warn("\n⚠️ No tests configured for this project.\n");
@@ -1078,4 +1076,4 @@ async function sn(e = ["unit"]) {
1078
1076
  }
1079
1077
  }
1080
1078
  //#endregion
1081
- export { de as auditDependencies, fe as buildProject, we as checkProject, Q as documentProject, Yt as formatCode, Xt as lintCode, tn as publishProject, nn as releaseProject, rn as syncProjectWithGitHub, sn as testProject, Qt as uploadDirectoryToR2 };
1079
+ export { ue as auditDependencies, de as buildProject, Ce as checkProject, Qt as documentProject, $t as formatCode, en as lintCode, on as publishProject, cn as releaseProject, ln as syncProjectWithGitHub, fn as testProject, nn as uploadDirectoryToR2 };