@dpuse/dpuse-development 1.0.111 → 1.0.113

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.
@@ -9,17 +9,9 @@ import { run as fe } from "npm-check-updates";
9
9
  import { init as pe } from "license-checker-rseidelsohn";
10
10
  import { setTimeout as me } from "node:timers/promises";
11
11
  import he from "spdx-satisfies";
12
- //#region \0rolldown/runtime.js
13
- var ge = Object.create, _e = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, ye = Object.getOwnPropertyNames, be = Object.getPrototypeOf, xe = Object.prototype.hasOwnProperty, Se = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), Ce = (e, t, n, r) => {
14
- if (t && typeof t == "object" || typeof t == "function") for (var i = ye(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !xe.call(e, s) && s !== n && _e(e, s, {
15
- get: ((e) => t[e]).bind(null, s),
16
- enumerable: !(r = ve(t, s)) || r.enumerable
17
- });
18
- return e;
19
- }, we = (e, t, n) => (n = e == null ? {} : ge(be(e)), Ce(t || !e || !e.__esModule || !xe.call(e, "default") ? _e(n, "default", {
20
- value: e,
21
- enumerable: !0
22
- }) : n, e)), Te = [
12
+ import ge from "node:os";
13
+ //#region src/actions/auditDependencies_.json
14
+ var _e = [
23
15
  {
24
16
  id: "GHSA-ch52-4w7c-c8xp",
25
17
  reason: "'http-cache-semantics', used by the licence checker, which only reads the npm registry locally, with no shared cache to leak from",
@@ -35,80 +27,80 @@ var ge = Object.create, _e = Object.defineProperty, ve = Object.getOwnPropertyDe
35
27
  reason: "'braces', used by ESLint's file matching in dpuse-app, which only reads glob patterns from the project's own config",
36
28
  reviewBy: "2026-12-31"
37
29
  }
38
- ], Ee = /* @__PURE__ */ new Set(["critical", "high"]);
39
- async function De() {
30
+ ], ve = /* @__PURE__ */ new Set(["critical", "high"]);
31
+ async function ye() {
40
32
  try {
41
33
  s("Audit Dependencies");
42
34
  let e = await S("package.json");
43
35
  re.has(e.name ?? "") ? C(`1️⃣ Shipped dependencies NOT checked: ${e.name ?? ""} is a development-only tool`) : await o("1️⃣ Check shipped dependencies for any vulnerability", "npm", ["audit", "--omit=dev"]);
44
36
  let t = await n("2️⃣ Check all dependencies for high or critical vulnerabilities", "npm", ["audit", "--json"]), r = JSON.parse(t);
45
37
  if (r.error !== void 0) throw Error(r.error.summary);
46
- let i = ke(je(r));
38
+ let i = xe(Ce(r));
47
39
  if (i.length > 0) throw Error(`${String(i.length)} high or critical vulnerabilities found`);
48
40
  b("Dependencies audited");
49
41
  } catch (e) {
50
42
  console.error("❌ Error auditing dependencies", e), process.exit(1);
51
43
  }
52
44
  }
53
- async function Oe(e) {
45
+ async function be(e) {
54
46
  let t = JSON.parse(await n(e, "npm", ["audit", "--json"]));
55
47
  if (t.error !== void 0) {
56
48
  console.warn(`⚠️ Could not check the allow list: ${t.error.summary}`);
57
49
  return;
58
50
  }
59
51
  let r = 0;
60
- for (let e of je(t)) {
61
- let t = Ee.has(e.severity) ? Ae(e) : void 0;
52
+ for (let e of Ce(t)) {
53
+ let t = ve.has(e.severity) ? Se(e) : void 0;
62
54
  t !== void 0 && (console.warn(`⚠️ ${t.id} ('${e.name}') is on the allow list, so the CI audit ignores it: ${t.reason}`), r++);
63
55
  }
64
56
  r === 0 && console.info("ℹ️ None of the reported advisories are on the allow list");
65
57
  }
66
- function ke(e) {
58
+ function xe(e) {
67
59
  let t = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), n = [];
68
60
  for (let r of e) {
69
- if (!Ee.has(r.severity)) continue;
70
- let e = Ae(r);
61
+ if (!ve.has(r.severity)) continue;
62
+ let e = Se(r);
71
63
  e === void 0 ? (console.error(`❌ ${r.severity} '${r.name}': ${r.title} (${r.url})`), n.push(r)) : e.reviewBy < t ? console.warn(`⚠️ Ignored ${e.id}, but its review date ${e.reviewBy} has passed: ${e.reason}`) : console.info(`ℹ️ Ignored ${e.id}: ${e.reason}`);
72
64
  }
73
65
  return n;
74
66
  }
75
- function Ae(e) {
67
+ function Se(e) {
76
68
  let t = e.url.slice(e.url.lastIndexOf("/") + 1);
77
- return Te.find((e) => e.id === t);
69
+ return _e.find((e) => e.id === t);
78
70
  }
79
- function je(e) {
71
+ function Ce(e) {
80
72
  let t = /* @__PURE__ */ new Map(), n = Object.values(e.vulnerabilities ?? {});
81
73
  for (let e of n) for (let n of e.via) typeof n != "string" && t.set(n.url, n);
82
74
  return t.values().toArray();
83
75
  }
84
76
  //#endregion
85
77
  //#region src/actions/buildProject.ts
86
- var Me = "build:wasm";
87
- async function Ne() {
78
+ var we = "build:wasm";
79
+ async function Te() {
88
80
  try {
89
- s("Build Project"), await Pe("1️⃣ ", await S("package.json")), b("Project built");
81
+ s("Build Project"), await Ee("1️⃣ ", await S("package.json")), b("Project built");
90
82
  } catch (e) {
91
83
  console.error("❌ Error building project", e), process.exit(1);
92
84
  }
93
85
  }
94
- async function Pe(e, t) {
95
- t.scripts?.[Me] != null && await o(`${e} Build WebAssembly`, "npm", ["run", Me]), await o(`${e} Bundle project`, "vite", ["build"]);
86
+ async function Ee(e, t) {
87
+ t.scripts?.[we] != null && await o(`${e} Build WebAssembly`, "npm", ["run", we]), await o(`${e} Bundle project`, "vite", ["build"]);
96
88
  }
97
89
  //#endregion
98
90
  //#region src/actions/checkConfigFiles.ts
99
- var E = "@dpuse/dpuse-development/prettierrc", Fe = "dpuse-development";
100
- async function Ie() {
91
+ var E = "@dpuse/dpuse-development/prettierrc", De = "dpuse-development";
92
+ async function Oe() {
101
93
  try {
102
94
  s("Check configuration files"), C("1️⃣ Check individual files");
103
95
  let t = await S("config.json"), n = await S("package.json"), r = n.private === !0, i = m(t.id), a = T.dirname(de(import.meta.url));
104
- await D(a, ".editorconfig"), await D(a, ".gitattributes"), await D(a, ".gitignore", [".gitignore_default"]), await D(a, ".markdownlint.json"), await D(a, ".ncurc.json"), await Le(i, a), await D(a, "LICENSE"), await ze(i, a), await Be(i, a), await Ve(i, a), await We(i, a), Re(i, n);
96
+ await D(a, ".editorconfig"), await D(a, ".gitattributes"), await D(a, ".gitignore", [".gitignore_default"]), await D(a, ".markdownlint.json"), await D(a, ".ncurc.json"), await ke(i, a), await D(a, "LICENSE"), await je(i, a), await Me(i, a), await Ne(i, a), await Ie(i, a), Ae(i, n);
105
97
  let o = await e(v) !== null;
106
- o && await D(a, "rust-toolchain.toml"), await D(a, ".github/dependabot.yml", [`.github/dependabot${r ? ".private" : ""}${o ? ".rust" : ""}.yml`]), r ? await He(a) : (await Ue(a), await D(a, "SECURITY.md", [], (e) => e.replaceAll(Fe, () => t.id))), b("Configuration files checked");
98
+ o && await D(a, "rust-toolchain.toml"), await D(a, ".github/dependabot.yml", [`.github/dependabot${r ? ".private" : ""}${o ? ".rust" : ""}.yml`]), r ? await Pe(a) : (await Fe(a), await D(a, "SECURITY.md", [], (e) => e.replaceAll(De, () => t.id))), b("Configuration files checked");
107
99
  } catch (e) {
108
100
  console.error("❌ Error checking configuration files", e), process.exit(1);
109
101
  }
110
102
  }
111
- async function Le(e, t) {
103
+ async function ke(e, t) {
112
104
  ["github"].includes(e.typeId) ? console.info("ℹ️ File 'eslint.config.js' is NOT required by this project") : [
113
105
  "app",
114
106
  "api",
@@ -117,10 +109,10 @@ async function Le(e, t) {
117
109
  "kb"
118
110
  ].includes(e.typeId) ? console.info("⚠️ File 'eslint.config.js' is UNIQUE to this project") : await D(t, "eslint.config.js", ["eslint.config.default.js"]);
119
111
  }
120
- function Re(e, t) {
112
+ function Ae(e, t) {
121
113
  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 === E ? console.info(`ℹ️ Prettier configuration is '${E}'`) : console.info(`❌ Prettier configuration is NOT '${E}'`);
122
114
  }
123
- async function ze(e, t) {
115
+ async function je(e, t) {
124
116
  ["github"].includes(e.typeId) ? console.info("ℹ️ File 'tsconfig.json' is NOT required by this project") : [
125
117
  "connector",
126
118
  "cookbook",
@@ -131,14 +123,15 @@ async function ze(e, t) {
131
123
  "tool"
132
124
  ].includes(e.typeId) ? await D(t, "tsconfig.json") : console.info("⚠️ File 'tsconfig.json' is UNIQUE to this project");
133
125
  }
134
- async function Be(e, t) {
126
+ async function Me(e, t) {
135
127
  ["github"].includes(e.typeId) ? console.info("ℹ️ File 'scripts/tsconfig.json' is NOT required by this project") : await D(t, "scripts/tsconfig.json");
136
128
  }
137
- async function Ve(e, t) {
129
+ async function Ne(e, t) {
138
130
  if ([
139
131
  "eslint",
140
132
  "github",
141
- "kb"
133
+ "kb",
134
+ "resources"
142
135
  ].includes(e.typeId)) console.info("ℹ️ File 'vite.config.ts' is NOT required by this project");
143
136
  else if ([
144
137
  "app",
@@ -160,14 +153,14 @@ async function Ve(e, t) {
160
153
  await D(t, "vite.config.ts", n);
161
154
  }
162
155
  }
163
- async function He(t) {
156
+ async function Pe(t) {
164
157
  for (let n of [".github/workflows/ci.yml", ".github/workflows/publish.yml"]) await e(n) !== null && await D(t, n);
165
158
  console.info("ℹ️ CodeQL and Scorecard workflows and file 'SECURITY.md' are NOT required by this project");
166
159
  }
167
- async function Ue(e) {
160
+ async function Fe(e) {
168
161
  await D(e, ".github/workflows/ci.yml"), await D(e, ".github/workflows/codeql.yml"), await D(e, ".github/workflows/publish.yml"), await D(e, ".github/workflows/scorecard.yml");
169
162
  }
170
- async function We(e, t) {
163
+ async function Ie(e, t) {
171
164
  [
172
165
  "app",
173
166
  "api",
@@ -197,7 +190,7 @@ async function D(e, t, n = [], r = (e) => e) {
197
190
  }
198
191
  //#endregion
199
192
  //#region src/actions/checkDependencies.ts
200
- async function Ge() {
193
+ async function Le() {
201
194
  try {
202
195
  s("Check Dependencies"), await o("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), C("2️⃣ Check using 'npm-check-updates'");
203
196
  let e = {};
@@ -223,8 +216,8 @@ async function Ge() {
223
216
  "fix",
224
217
  "--no-strict-allow-scripts",
225
218
  "--no-fund"
226
- ], !0), await Oe("4️⃣ Name the advisories above that the CI audit ignores");
227
- let t = await Ke();
219
+ ], !0), await be("4️⃣ Name the advisories above that the CI audit ignores");
220
+ let t = await Re();
228
221
  t.length > 0 ? await o("5️⃣ Move install-script pins to installed versions", "npm", [
229
222
  "install-scripts",
230
223
  "approve",
@@ -243,56 +236,56 @@ async function Ge() {
243
236
  console.error("❌ Error checking dependencies", e), process.exit(1);
244
237
  }
245
238
  }
246
- async function Ke() {
239
+ async function Re() {
247
240
  let { allowScripts: e = {} } = await S(T.resolve(process.cwd(), "package.json")), t = Object.entries(e).filter(([e, t]) => t && e.lastIndexOf("@") > 0).map(([e]) => e.slice(0, e.lastIndexOf("@")));
248
241
  return [...new Set(t)];
249
242
  }
250
243
  //#endregion
251
244
  //#region src/actions/checkProject.ts
252
- async function qe() {
253
- await Ie(), await Ge();
245
+ async function ze() {
246
+ await Oe(), await Le();
254
247
  }
255
248
  //#endregion
256
249
  //#region src/actions/documentActions.ts
257
- var Je = "<!-- SUPPORTED_ACTIONS_START -->", Ye = "<!-- SUPPORTED_ACTIONS_END -->", Xe = "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.", Ze = {
250
+ var Be = "<!-- SUPPORTED_ACTIONS_START -->", Ve = "<!-- SUPPORTED_ACTIONS_END -->", He = "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.", Ue = {
258
251
  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.",
259
252
  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.",
260
253
  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.",
261
254
  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."
262
- }, Qe = "The table below lists all connector actions and highlights those supported by this connector.";
263
- async function $e() {
255
+ }, We = "The table below lists all connector actions and highlights those supported by this connector.";
256
+ async function Ge() {
264
257
  try {
265
258
  s("Document Actions"), C("1️⃣ Insert actions description and table into 'README.md'");
266
- let e = (await S("config.json")).actionNames ?? [], t = r(e), n = g(e), i = `## Supported Actions\n\n${Xe}\n\n${Ze[t]} ${Qe}\n\n${n}`;
267
- await _(i, Je, Ye), b("Actions documented");
259
+ let e = (await S("config.json")).actionNames ?? [], t = r(e), n = g(e), i = `## Supported Actions\n\n${He}\n\n${Ue[t]} ${We}\n\n${n}`;
260
+ await _(i, Be, Ve), b("Actions documented");
268
261
  } catch (e) {
269
262
  console.error("❌ Error documenting actions", e), process.exit(1);
270
263
  }
271
264
  }
272
265
  //#endregion
273
266
  //#region src/actions/documentContributingLicense.ts
274
- async function et() {
267
+ async function Ke() {
275
268
  try {
276
269
  s("Document Contributing & License");
277
- let [e, t] = await Promise.all([S("package.json"), S("config.json")]), { owner: n, repository: r } = x(e, "document contributing and license"), i = tt(e), a = nt(t.firstCreatedAt);
278
- C("1️⃣ Insert contributing and license content into 'README.md'"), await l(), await _(rt(n, r, i, a), te, ae), b("Contributing & license documented");
270
+ let [e, t] = await Promise.all([S("package.json"), S("config.json")]), { owner: n, repository: r } = x(e, "document contributing and license"), i = qe(e), a = Je(t.firstCreatedAt);
271
+ C("1️⃣ Insert contributing and license content into 'README.md'"), await l(), await _(Ye(n, r, i, a), te, ae), b("Contributing & license documented");
279
272
  } catch (e) {
280
273
  console.error("❌ Error documenting contributing and license", e), process.exit(1);
281
274
  }
282
275
  }
283
- function tt(e) {
276
+ function qe(e) {
284
277
  let t = e.author, n = typeof t == "string" ? t : t?.name;
285
278
  if (n == null || n === "") throw Error("package.json 'author' field is required to document contributing and license.");
286
279
  let r = n.indexOf("<"), i = r === -1 ? -1 : n.indexOf(">", r);
287
280
  return i === -1 ? n.trim() : [n.slice(0, r).trim(), n.slice(i + 1).trim()].filter((e) => e !== "").join(" ");
288
281
  }
289
- function nt(e) {
282
+ function Je(e) {
290
283
  let t = (/* @__PURE__ */ new Date()).getFullYear();
291
284
  if (e == null) return String(t);
292
285
  let n = new Date(e).getFullYear();
293
286
  return n === t ? String(t) : `${String(n)}-present`;
294
287
  }
295
- function rt(e, t, n, r) {
288
+ function Ye(e, t, n, r) {
296
289
  return `## Contributing
297
290
 
298
291
  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.
@@ -307,8 +300,8 @@ This project is licensed under the MIT License, permitting free use, modificatio
307
300
  }
308
301
  //#endregion
309
302
  //#region src/utilities/rustCrates.ts
310
- var O = "licenses/cargoMetadata.json", k = "licenses/cargoTree.txt", it = 1e3, at = 1e4, ot = "dpuse-development (https://github.com/dpuse/dpuse-development)", st = /^(?:copying|licen[cs]e|unlicense)/i, ct = "wasm32-unknown-unknown";
311
- async function lt(n, r) {
303
+ var O = "licenses/cargoMetadata.json", k = "licenses/cargoTree.txt", Xe = 1e3, Ze = 1e4, Qe = "dpuse-development (https://github.com/dpuse/dpuse-development)", $e = /^(?:copying|licen[cs]e|unlicense)/i, et = "wasm32-unknown-unknown";
304
+ async function tt(n, r) {
312
305
  if (await e("rust/Cargo.toml") === null) return null;
313
306
  let i = [
314
307
  "--manifest-path",
@@ -321,7 +314,7 @@ async function lt(n, r) {
321
314
  "--edges",
322
315
  "normal,no-proc-macro",
323
316
  "--target",
324
- ct,
317
+ et,
325
318
  "--prefix",
326
319
  "depth",
327
320
  "--format",
@@ -333,9 +326,9 @@ async function lt(n, r) {
333
326
  "--format-version",
334
327
  "1",
335
328
  "--filter-platform",
336
- ct
329
+ et
337
330
  ], O);
338
- let s = ut(await a(k)), c = await S(O);
331
+ let s = nt(await a(k)), c = await S(O);
339
332
  await w.rm(k, { force: !0 }), await w.rm(O, { force: !0 });
340
333
  let l = /* @__PURE__ */ new Map();
341
334
  for (let e of s) e.isOwn || l.has(`${e.name}@${e.version}`) || l.set(`${e.name}@${e.version}`, {
@@ -349,9 +342,9 @@ async function lt(n, r) {
349
342
  latestPublishedDate: ""
350
343
  });
351
344
  let u = l.values().toArray();
352
- dt(u, r);
353
- for (let e of u) e.licenseFiles = await mt(e, c);
354
- return await ht(n, u), {
345
+ rt(u, r);
346
+ for (let e of u) e.licenseFiles = await ot(e, c);
347
+ return await st(n, u), {
355
348
  crates: u,
356
349
  treeItems: s.map(({ name: e, version: t, depth: n, isOwn: r }) => ({
357
350
  name: e,
@@ -361,7 +354,7 @@ async function lt(n, r) {
361
354
  }))
362
355
  };
363
356
  }
364
- function ut(e) {
357
+ function nt(e) {
365
358
  let t = [];
366
359
  for (let n of e.split("\n")) {
367
360
  let [e = "", r = "", i = ""] = n.trim().split("|", 3), a = /^\d+/.exec(e)?.[0];
@@ -378,30 +371,30 @@ function ut(e) {
378
371
  }
379
372
  return t;
380
373
  }
381
- function dt(e, t) {
382
- let n = t.split(";").filter((e) => ft(e)), r = e.filter((e) => !pt(e.licenseExpression, n));
374
+ function rt(e, t) {
375
+ let n = t.split(";").filter((e) => it(e)), r = e.filter((e) => !at(e.licenseExpression, n));
383
376
  if (r.length === 0) return;
384
377
  let i = r.map((e) => `${e.name}@${e.version} (${e.licenseExpression === "" ? "no licence" : e.licenseExpression})`).join(", ");
385
378
  throw Error(`Rust crates with licences not allowed: ${i}.`);
386
379
  }
387
- function ft(e) {
380
+ function it(e) {
388
381
  try {
389
382
  return he(e, [e]);
390
383
  } catch {
391
384
  return !1;
392
385
  }
393
386
  }
394
- function pt(e, t) {
387
+ function at(e, t) {
395
388
  try {
396
389
  return he(e.replaceAll("/", " OR "), t);
397
390
  } catch {
398
391
  return !1;
399
392
  }
400
393
  }
401
- async function mt(e, t) {
394
+ async function ot(e, t) {
402
395
  let n = t.packages.find((t) => t.name === e.name && t.version === e.version);
403
396
  if (n == null) return [];
404
- let r = T.dirname(n.manifest_path), i = (await w.readdir(r)).filter((e) => st.test(e)).toSorted((e, t) => e.localeCompare(t, "en"));
397
+ let r = T.dirname(n.manifest_path), i = (await w.readdir(r)).filter((e) => $e.test(e)).toSorted((e, t) => e.localeCompare(t, "en"));
405
398
  await w.mkdir("licenses/downloads", { recursive: !0 });
406
399
  let a = [];
407
400
  for (let t of i) {
@@ -413,14 +406,14 @@ async function mt(e, t) {
413
406
  }
414
407
  return a;
415
408
  }
416
- async function ht(e, t) {
409
+ async function st(e, t) {
417
410
  C(`${e} - fetch release dates from crates.io`);
418
411
  for (let [e, n] of t.entries()) {
419
- e > 0 && await me(it), console.info(`⚙️ Fetching '${n.name}' (${String(e + 1)} of ${String(t.length)})...`);
412
+ e > 0 && await me(Xe), console.info(`⚙️ Fetching '${n.name}' (${String(e + 1)} of ${String(t.length)})...`);
420
413
  try {
421
414
  let e = await fetch(`https://crates.io/api/v1/crates/${encodeURIComponent(n.name)}`, {
422
- headers: { "User-Agent": ot },
423
- signal: AbortSignal.timeout(at)
415
+ headers: { "User-Agent": Qe },
416
+ signal: AbortSignal.timeout(Ze)
424
417
  });
425
418
  if (!e.ok) continue;
426
419
  let t = await e.json(), r = new Map((t.versions ?? []).map((e) => [e.num, e.created_at]));
@@ -430,77 +423,77 @@ async function ht(e, t) {
430
423
  }
431
424
  //#endregion
432
425
  //#region src/actions/documentDependencies.ts
433
- var A = "<!-- DEPENDENCY_LICENSES_START -->", j = "<!-- DEPENDENCY_LICENSES_END -->", M = "## Dependency Licenses", gt = `bundle-analysis-reports/${se}`, N = "licenses/licenseTree.json", _t = "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.", vt = `The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. ${_t}`, yt = `The dependency tree below shows how each package in the table above is reached — direct and transitive — along with its installed version, release date, and update status. A package that does not ship itself, such as one whose parts are bundled separately, is left out and what ships beneath it is shown in its place. ${_t}`;
434
- async function bt(e = "MIT") {
426
+ var A = "<!-- DEPENDENCY_LICENSES_START -->", j = "<!-- DEPENDENCY_LICENSES_END -->", M = "## Dependency Licenses", ct = `bundle-analysis-reports/${se}`, N = "licenses/licenseTree.json", lt = "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.", ut = `The dependency tree below lists every package in this project — direct and transitive — along with its installed version, release date, and update status. ${lt}`, dt = `The dependency tree below shows how each package in the table above is reached — direct and transitive — along with its installed version, release date, and update status. A package that does not ship itself, such as one whose parts are bundled separately, is left out and what ships beneath it is shown in its place. ${lt}`;
427
+ async function ft(e = "MIT") {
435
428
  try {
436
429
  s("Document Dependencies");
437
430
  let n = await S("package.json"), r = n.name ?? "";
438
431
  if (re.has(r)) {
439
- await xt(r), b("Dependencies documented");
432
+ await pt(r), b("Dependencies documented");
440
433
  return;
441
434
  }
442
435
  await f("1️⃣ Clear downloaded licenses", "licenses/downloads");
443
- let i = await At(), a = await jt();
436
+ let i = await St(), a = await Ct();
444
437
  if (a === null) {
445
- let r = Ft(i);
446
- await kt("2️⃣ Identify production licenses", e, [n.name ?? "", ...r], !0), await t("3️⃣ Identify transitive dependencies", "npm", [
438
+ let r = Dt(i);
439
+ await xt("2️⃣ Identify production licenses", e, [n.name ?? "", ...r], !0), await t("3️⃣ Identify transitive dependencies", "npm", [
447
440
  "ls",
448
441
  "--all",
449
442
  "--json",
450
443
  "--omit=dev"
451
- ], N), await St("4️⃣ ", e, new Set(r));
444
+ ], N), await mt("4️⃣ ", e, new Set(r));
452
445
  } else {
453
- let r = Mt(a, i), o = Nt(i), s = o.filter((e) => !r.has(e));
454
- await kt("2️⃣ Identify shipped licenses", e, [n.name ?? "", ...s], !1), Pt(r, new Set(o)), await t("3️⃣ Identify transitive dependencies", "npm", [
446
+ let r = wt(a, i), o = Tt(i), s = o.filter((e) => !r.has(e));
447
+ await xt("2️⃣ Identify shipped licenses", e, [n.name ?? "", ...s], !1), Et(r, new Set(o)), await t("3️⃣ Identify transitive dependencies", "npm", [
455
448
  "ls",
456
449
  "--all",
457
450
  "--json"
458
451
  ], N, !0);
459
- let c = await lt("4️⃣ Identify Rust crates compiled into the WebAssembly", e), l = {
452
+ let c = await tt("4️⃣ Identify Rust crates compiled into the WebAssembly", e), l = {
460
453
  allowedLicenses: e,
461
- productionNames: Dt(n),
454
+ productionNames: yt(n),
462
455
  rustCrates: c,
463
456
  shippedKeys: r
464
457
  };
465
- await Ct(c === null ? "4️⃣ " : "5️⃣ ", l);
458
+ await ht(c === null ? "4️⃣ " : "5️⃣ ", l);
466
459
  }
467
460
  b("Dependencies documented");
468
461
  } catch (e) {
469
462
  console.error("❌ Error documenting dependencies", e), process.exit(1);
470
463
  }
471
464
  }
472
- async function xt(e) {
465
+ async function pt(e) {
473
466
  C(`1️⃣ Skip: ${e} is a development-only tool and is never part of a production release.`);
474
467
  let t = `> [!WARNING]\n> Dependency licenses are not documented here: ${e} is a development-only tool and is never part of a production release.`;
475
468
  await _(`${M}\n\n${t}`, A, j);
476
469
  }
477
- async function St(e, t, n) {
470
+ async function mt(e, t, n) {
478
471
  C(`${e} Insert licenses into 'README.md'`);
479
- let r = await S(N), i = await Ot(), a = `${F(t, !1)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
480
- for (let e of i.values()) a += I(e);
472
+ let r = await S(N), i = await bt(), a = `${jt(t, !1)}\n\n|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|\n`;
473
+ for (let e of i.values()) a += F(e);
481
474
  let o = [];
482
- r.dependencies != null && Ht(r.dependencies, i, n, o, 0);
483
- let s = `${vt}\n\n${o.join("\n")}`;
475
+ r.dependencies != null && I(r.dependencies, i, n, o, 0);
476
+ let s = `${ut}\n\n${o.join("\n")}`;
484
477
  await _(`${M}\n\n${a.trimEnd()}\n\n### Dependency Tree\n\n${s}`, A, j);
485
478
  }
486
- async function Ct(e, t) {
479
+ async function ht(e, t) {
487
480
  C(`${e} Insert licenses into 'README.md'`);
488
- let { allowedLicenses: n, productionNames: r, rustCrates: i, shippedKeys: a } = t, o = await Ot(), s = new Map((i?.crates ?? []).map((e) => [`${e.name}@${e.version}`, Tt(e)])), c = i !== null, l = c ? "|Type|Dependency|Version|License(s)|Document|\n|:-|:-|:-:|:-|:-|" : "|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|", u = `${F(n, !0, c)}\n\n${l}\n`;
489
- for (let e of o.values().toArray().toSorted(wt)) u += I(e, c ? "JavaScript" : void 0);
490
- for (let e of s.values().toArray().toSorted(wt)) u += I(e, "Rust");
481
+ let { allowedLicenses: n, productionNames: r, rustCrates: i, shippedKeys: a } = t, o = await bt(), s = new Map((i?.crates ?? []).map((e) => [`${e.name}@${e.version}`, _t(e)])), c = i !== null, l = c ? "|Type|Dependency|Version|License(s)|Document|\n|:-|:-|:-:|:-|:-|" : "|Dependency|Version|License(s)|Document|\n|:-|:-:|:-|:-|", u = `${jt(n, !0, c)}\n\n${l}\n`;
482
+ for (let e of o.values().toArray().toSorted(gt)) u += F(e, c ? "JavaScript" : void 0);
483
+ for (let e of s.values().toArray().toSorted(gt)) u += F(e, "Rust");
491
484
  let d = await S(N), f = Object.entries(d.dependencies ?? {}).toSorted(([e], [t]) => Number(!r.has(e)) - Number(!r.has(t))), p = [];
492
485
  L(f, {
493
486
  licensesByKey: o,
494
487
  shippedKeys: a,
495
488
  shownKeys: /* @__PURE__ */ new Set()
496
489
  }, p, 0, !1);
497
- let m = p.length === 0 ? "None." : p.join("\n"), h = (i?.treeItems ?? []).map((e) => Et(e, s)).join("\n"), g = c ? `${yt}\n\n#### JavaScript\n\n${m}\n\n#### Rust\n\n${h}` : `${yt}\n\n${m}`;
490
+ let m = p.length === 0 ? "None." : p.join("\n"), h = (i?.treeItems ?? []).map((e) => vt(e, s)).join("\n"), g = c ? `${dt}\n\n#### JavaScript\n\n${m}\n\n#### Rust\n\n${h}` : `${dt}\n\n${m}`;
498
491
  await _(`${M}\n\n${u.trimEnd()}\n\n### Dependency Tree\n\n${g}`, A, j);
499
492
  }
500
- function wt(e, t) {
493
+ function gt(e, t) {
501
494
  return e.name.localeCompare(t.name, "en") || e.installedVersion.localeCompare(t.installedVersion, "en");
502
495
  }
503
- function Tt(e) {
496
+ function _t(e) {
504
497
  return {
505
498
  name: e.name,
506
499
  repository: e.repository,
@@ -513,26 +506,26 @@ function Tt(e) {
513
506
  licenseFiles: e.licenseFiles
514
507
  };
515
508
  }
516
- function Et(e, t) {
509
+ function vt(e, t) {
517
510
  let n = " ".repeat(e.depth);
518
511
  return e.isOwn ? `${n}- **${e.name}** ${e.version} — this project's Rust code, compiled into its WebAssembly` : R(e.name, e.version, t.get(`${e.name}@${e.version}`), n);
519
512
  }
520
- function Dt(e) {
513
+ function yt(e) {
521
514
  return /* @__PURE__ */ new Set([
522
515
  ...Object.keys(e.dependencies ?? {}),
523
516
  ...Object.keys(e.optionalDependencies ?? {}),
524
517
  ...Object.keys(e.peerDependencies ?? {})
525
518
  ]);
526
519
  }
527
- async function Ot() {
520
+ async function bt() {
528
521
  let e = await S("licenses/licenses.json"), t = /* @__PURE__ */ new Map();
529
- for (let [n, r] of Object.entries(e)) t.set(n, Bt(n, r));
522
+ for (let [n, r] of Object.entries(e)) t.set(n, Nt(n, r));
530
523
  return await Promise.all(t.values().map(async (e) => {
531
- let t = await Vt(e.name, e.installedVersion);
524
+ let t = await Pt(e.name, e.installedVersion);
532
525
  e.latestVersion = t.latestVersion, e.latestPublishedDate = t.latestPublishedDate, e.publishedDate = t.publishedDate;
533
526
  })), t;
534
527
  }
535
- async function kt(e, t, n, r) {
528
+ async function xt(e, t, n, r) {
536
529
  C(e), await new Promise((e, i) => {
537
530
  let a = {
538
531
  start: process.cwd(),
@@ -550,39 +543,39 @@ async function kt(e, t, n, r) {
550
543
  });
551
544
  });
552
545
  }
553
- async function At() {
546
+ async function St() {
554
547
  let t = await e("package-lock.json");
555
548
  return t === null ? {} : JSON.parse(t).packages ?? {};
556
549
  }
557
- async function jt() {
558
- let t = await e(gt);
550
+ async function Ct() {
551
+ let t = await e(ct);
559
552
  return t === null ? null : JSON.parse(t);
560
553
  }
561
- function Mt(e, t) {
554
+ function wt(e, t) {
562
555
  let n = new Set(e.packages);
563
556
  for (let r of e.external) {
564
- let e = Rt(t, "", r);
565
- if (e !== void 0) for (let r of [e, ...It(t, e)]) {
557
+ let e = At(t, "", r);
558
+ if (e !== void 0) for (let r of [e, ...Ot(t, e)]) {
566
559
  let e = t[r];
567
560
  e?.version !== void 0 && n.add(P(r, e));
568
561
  }
569
562
  }
570
563
  return n;
571
564
  }
572
- function Nt(e) {
565
+ function Tt(e) {
573
566
  let t = /* @__PURE__ */ new Set();
574
567
  for (let [n, r] of Object.entries(e)) n !== "" && r.version !== void 0 && t.add(P(n, r));
575
568
  return [...t];
576
569
  }
577
- function Pt(e, t) {
570
+ function Et(e, t) {
578
571
  let n = [...e.difference(t)];
579
572
  n.length > 0 && console.warn(`⚠️ Not installed, so not checked; rebuild to refresh the record: ${n.join(", ")}`);
580
573
  }
581
574
  function P(e, t) {
582
575
  return `${t.name ?? e.slice(e.lastIndexOf("node_modules/") + 13)}@${String(t.version)}`;
583
576
  }
584
- function Ft(e) {
585
- let t = It(e, ""), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
577
+ function Dt(e) {
578
+ let t = Ot(e, ""), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
586
579
  for (let [i, a] of Object.entries(e)) {
587
580
  if (i === "" || a.version === void 0) continue;
588
581
  let e = P(i, a);
@@ -590,18 +583,18 @@ function Ft(e) {
590
583
  }
591
584
  return r.values().filter((e) => !n.has(e)).toArray();
592
585
  }
593
- function It(e, t) {
586
+ function Ot(e, t) {
594
587
  let n = /* @__PURE__ */ new Set(), r = [t];
595
588
  for (; r.length > 0;) {
596
589
  let t = r.pop() ?? "", i = e[t];
597
- if (i !== void 0) for (let a of Lt(i)) {
598
- let i = Rt(e, t, a);
590
+ if (i !== void 0) for (let a of kt(i)) {
591
+ let i = At(e, t, a);
599
592
  i === void 0 || n.has(i) || (n.add(i), r.push(i));
600
593
  }
601
594
  }
602
595
  return n;
603
596
  }
604
- function Lt(e) {
597
+ function kt(e) {
605
598
  let t = Object.keys(e.peerDependencies ?? {}).filter((t) => e.peerDependenciesMeta?.[t]?.optional !== !0);
606
599
  return [
607
600
  ...Object.keys(e.dependencies ?? {}),
@@ -609,7 +602,7 @@ function Lt(e) {
609
602
  ...t
610
603
  ];
611
604
  }
612
- function Rt(e, t, n) {
605
+ function At(e, t, n) {
613
606
  let r = t;
614
607
  for (;;) {
615
608
  let t = r === "" ? `node_modules/${n}` : `${r}/node_modules/${n}`, i = e[t];
@@ -619,14 +612,14 @@ function Rt(e, t, n) {
619
612
  r = a === -1 ? "" : r.slice(0, a);
620
613
  }
621
614
  }
622
- function F(e, t, n = !1) {
623
- let r = zt(e.split(";")), i = n ? "[license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn) and [cargo tree](https://doc.rust-lang.org/cargo/commands/cargo-tree.html)" : "[license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn)", a = "The following table lists every package whose code, styles or assets are included in this project's build, as recorded by the build itself. Modules loaded at run time are not included; each documents its own.";
615
+ function jt(e, t, n = !1) {
616
+ let r = Mt(e.split(";")), i = n ? "[license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn) and [cargo tree](https://doc.rust-lang.org/cargo/commands/cargo-tree.html)" : "[license-checker](https://github.com/RSeidelsohn/license-checker-rseidelsohn)", a = "The following table lists every package whose code, styles or assets are included in this project's build, as recorded by the build itself. Modules loaded at run time are not included; each documents its own.";
624
617
  return `License data is updated each time \`npm run document\` is run, using ${i}. ${t ? n ? `${a} It also lists every Rust crate compiled into its WebAssembly, as resolved by Cargo; macros and other crates used only while compiling put none of their code in it, so are left out.` : a : "The following table lists all production dependencies. This project has no build record, so the list is taken from its declared dependencies."} These dependencies have been checked and confirmed to use ${r}, all of which allow commercial use. All are used unmodified, so any licence conditions that apply only to modified versions are not triggered. Developers cloning this repository should independently verify development dependencies.`;
625
618
  }
626
- function zt(e) {
619
+ function Mt(e) {
627
620
  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))}`;
628
621
  }
629
- function Bt(e, t) {
622
+ function Nt(e, t) {
630
623
  let n = e.lastIndexOf("@"), r = n > 0 ? e.slice(0, n) : e, i = n > 0 ? e.slice(n + 1) : "";
631
624
  return {
632
625
  name: r,
@@ -643,7 +636,7 @@ function Bt(e, t) {
643
636
  }]
644
637
  };
645
638
  }
646
- async function Vt(e, t) {
639
+ async function Pt(e, t) {
647
640
  try {
648
641
  let n = await fetch(`https://registry.npmjs.org/${encodeURIComponent(e)}`);
649
642
  if (n.ok) {
@@ -661,16 +654,16 @@ async function Vt(e, t) {
661
654
  publishedDate: ""
662
655
  };
663
656
  }
664
- function I(e, t) {
657
+ function F(e, t) {
665
658
  let n = e.licenseFiles.length === 0 ? "⚠️ No license file" : e.licenseFiles.map((e) => `[${e.label}](licenses/${e.path})`).join(" ");
666
659
  return `${t === void 0 ? "" : `|${t}`}|[${e.name}](${e.repository})|${e.installedVersion}|${e.licenseTypes}|${n}|\n`;
667
660
  }
668
- function Ht(e, t, n, r, i) {
661
+ function I(e, t, n, r, i) {
669
662
  let a = " ".repeat(i);
670
663
  for (let [o, s] of Object.entries(e)) {
671
664
  if (s.version === void 0) continue;
672
665
  let e = s.version;
673
- n.has(`${o}@${e}`) || (r.push(R(o, e, t.get(`${o}@${e}`), a)), s.dependencies != null && Ht(s.dependencies, t, n, r, i + 1));
666
+ n.has(`${o}@${e}`) || (r.push(R(o, e, t.get(`${o}@${e}`), a)), s.dependencies != null && I(s.dependencies, t, n, r, i + 1));
674
667
  }
675
668
  }
676
669
  function L(e, t, n, r, i) {
@@ -685,16 +678,16 @@ function L(e, t, n, r, i) {
685
678
  }
686
679
  }
687
680
  function R(e, t, n, r) {
688
- return `${r}- **${n == null ? e : `[${e}](${n.repository})`}** ${t}${Ut(n)}`;
681
+ return `${r}- **${n == null ? e : `[${e}](${n.repository})`}** ${t}${Ft(n)}`;
689
682
  }
690
- function Ut(e) {
683
+ function Ft(e) {
691
684
  if (e == null) return "";
692
- let t = e.publishedDate ? Wt(e.publishedDate.split("T", 1)[0]) : "";
685
+ let t = e.publishedDate ? It(e.publishedDate.split("T", 1)[0]) : "";
693
686
  if (e.latestVersion === "" || e.latestVersion === e.installedVersion) return t === "" ? "" : ` — ${t}`;
694
- let n = e.latestPublishedDate ? Wt(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `latest: ${e.latestVersion} ❗` : `latest: ${e.latestVersion} — ${n} ❗`;
687
+ let n = e.latestPublishedDate ? It(e.latestPublishedDate.split("T", 1)[0]) : "", r = n === "" ? `latest: ${e.latestVersion} ❗` : `latest: ${e.latestVersion} — ${n} ❗`;
695
688
  return t === "" ? ` — → ${r}` : ` — ${t} → ${r}`;
696
689
  }
697
- function Wt(e) {
690
+ function It(e) {
698
691
  if (e == null || e === "") return "n/a";
699
692
  let t = e.split("T", 1)[0];
700
693
  if (t == null || t === "") return "n/a";
@@ -703,31 +696,31 @@ function Wt(e) {
703
696
  }
704
697
  //#endregion
705
698
  //#region src/actions/documentOpening.ts
706
- var Gt = "<!-- OPENING_START -->", Kt = "<!-- OPENING_END -->";
707
- async function qt() {
699
+ var Lt = "<!-- OPENING_START -->", Rt = "<!-- OPENING_END -->";
700
+ async function zt() {
708
701
  try {
709
702
  s("Document Opening"), C("1️⃣ Insert opening content into 'README.md'");
710
- let e = await S("package.json"), t = await S("config.json"), { owner: n, repository: r } = x(e, "document opening"), i = Jt(e), a = Xt(t), o = m(t.id), c = Zt(n, r, i, o.uploadGroupName === void 0 ? void 0 : t.id, o.publishedTo === "npm" ? Yt(e) : void 0, e.description, a);
711
- await _(c, Gt, Kt), b("Opening documented");
703
+ let e = await S("package.json"), t = await S("config.json"), { owner: n, repository: r } = x(e, "document opening"), i = Bt(e), a = Ht(t), o = m(t.id), c = Ut(n, r, i, o.uploadGroupName === void 0 ? void 0 : t.id, o.publishedTo === "npm" ? Vt(e) : void 0, e.description, a);
704
+ await _(c, Lt, Rt), b("Opening documented");
712
705
  } catch (e) {
713
706
  console.error("❌ Error documenting opening", e), process.exit(1);
714
707
  }
715
708
  }
716
- function Jt(e) {
709
+ function Bt(e) {
717
710
  let t = e.license;
718
711
  if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
719
712
  return t;
720
713
  }
721
- function Yt(e) {
714
+ function Vt(e) {
722
715
  let t = e.name;
723
716
  if (t == null || t === "") throw Error("package.json 'name' field is required to document opening.");
724
717
  return t;
725
718
  }
726
- function Xt(e) {
719
+ function Ht(e) {
727
720
  let t = e.description.en?.trim();
728
721
  return t === void 0 || t === "" ? void 0 : t;
729
722
  }
730
- function Zt(e, t, n, r, i, a, o) {
723
+ function Ut(e, t, n, r, i, a, o) {
731
724
  let s = `https://github.com/${e}/${t}`, c = n.replaceAll("-", "--"), l = encodeURIComponent(`https://api.dpuse.app/configs/${r ?? ""}`);
732
725
  return `[![License: ${n}](https://img.shields.io/badge/License-${c}-blue.svg)](./LICENSE)${r === void 0 ? "" : `\n[![DPUse version](https://img.shields.io/badge/dynamic/json?url=${l}&query=%24.data.version&prefix=v&label=DPUse&color=f6821f)](${s}/releases/latest)`}${i === void 0 ? "" : `\n[![npm version](https://img.shields.io/npm/v/${i}?color=cb3837&label=npm)](https://www.npmjs.com/package/${i})`}
733
726
  [![CI](${s}/actions/workflows/ci.yml/badge.svg)](${s}/actions/workflows/ci.yml)${a == null || a === "" ? "" : `\n\n${a}`}
@@ -748,31 +741,31 @@ In addition, DPUse provides [Tools](https://www.dpuse.app) used by the applicati
748
741
  }
749
742
  //#endregion
750
743
  //#region src/actions/documentQualitySecurity.ts
751
- var Qt = {
744
+ var Wt = {
752
745
  "Branch-Protection": 3,
753
746
  "Code-Review": 0,
754
747
  Contributors: 0
755
- }, $t = /* @__PURE__ */ new Set(["CII-Best-Practices"]), en = "coverage/coverage-final.json", tn = "coverage/coverage-summary.json", nn = 80, rn = 60, an = "code-health-reports/vitest/badge.json", on = {
748
+ }, Gt = /* @__PURE__ */ new Set(["CII-Best-Practices"]), Kt = "coverage/coverage-final.json", qt = "coverage/coverage-summary.json", Jt = 80, Yt = 60, Xt = "code-health-reports/vitest/badge.json", Zt = {
756
749
  actions: "GitHub Actions",
757
750
  "javascript-typescript": "JavaScript/TypeScript",
758
751
  rust: "Rust"
759
- }, sn = {
752
+ }, Qt = {
760
753
  A: "brightgreen",
761
754
  B: "green",
762
755
  C: "yellow",
763
756
  D: "orange",
764
757
  F: "red"
765
- }, cn = `${c}/health.json`, ln = le(ue);
766
- async function un() {
758
+ }, $t = `${c}/health.json`, en = le(ue);
759
+ async function tn() {
767
760
  try {
768
761
  s("Document Quality & Security");
769
- let e = await S("package.json"), t = await dn(e), n = await pn(e, t === void 0 ? [] : ["--coverage", en]), { owner: r, repository: i } = x(e, "document quality and security");
762
+ let e = await S("package.json"), t = await nn(e), n = await an(e, t === void 0 ? [] : ["--coverage", Kt]), { owner: r, repository: i } = x(e, "document quality and security");
770
763
  C("4️⃣ Read security checks and settings");
771
- let a = await hn(r, i, e);
764
+ let a = await sn(r, i, e);
772
765
  C("5️⃣ Look up OpenSSF Best Practices badge and Scorecard results");
773
- let [o, c] = await Promise.all([gn(`https://github.com/${r}/${i}`), _n(`github.com/${r}/${i}`)]);
766
+ let [o, c] = await Promise.all([cn(`https://github.com/${r}/${i}`), ln(`github.com/${r}/${i}`)]);
774
767
  C("6️⃣ Insert quality and security content into 'README.md'");
775
- let d = Sn(r, i, {
768
+ let d = mn(r, i, {
776
769
  coveragePercent: t,
777
770
  fallowHealth: n,
778
771
  securitySettings: a
@@ -782,7 +775,7 @@ async function un() {
782
775
  console.error("❌ Error documenting quality and security", e), process.exit(1);
783
776
  }
784
777
  }
785
- async function dn(t) {
778
+ async function nn(t) {
786
779
  if (t.devDependencies?.["@vitest/coverage-v8"] == null) {
787
780
  C("1️⃣ Test coverage NOT measured, as '@vitest/coverage-v8' is not installed");
788
781
  return;
@@ -792,25 +785,25 @@ async function dn(t) {
792
785
  "--passWithNoTests",
793
786
  "--coverage"
794
787
  ]);
795
- let n = await e(tn);
788
+ let n = await e(qt);
796
789
  if (n === null) return;
797
790
  let r = JSON.parse(n).total.lines.pct;
798
- return await fn(r), r;
791
+ return await rn(r), r;
799
792
  }
800
- async function fn(e) {
793
+ async function rn(e) {
801
794
  let t = [
802
795
  "red",
803
796
  "yellow",
804
797
  "brightgreen"
805
- ], n = Number(e >= rn) + Number(e >= nn);
806
- await i(an, {
798
+ ], n = Number(e >= Yt) + Number(e >= Jt);
799
+ await i(Xt, {
807
800
  schemaVersion: 1,
808
801
  label: "coverage",
809
802
  message: `${e.toFixed(1)}%`,
810
803
  color: t[n]
811
804
  });
812
805
  }
813
- async function pn(e, n) {
806
+ async function an(e, n) {
814
807
  if (e.devDependencies?.fallow == null) {
815
808
  C("2️⃣ Code health NOT measured, as Fallow is not installed"), C("3️⃣ Code health report NOT required");
816
809
  return;
@@ -821,20 +814,20 @@ async function pn(e, n) {
821
814
  "--format",
822
815
  "json",
823
816
  ...n
824
- ], cn), await t("3️⃣ Write code health report", "fallow", ["--format", "markdown"], ne, !0);
825
- let r = await S(cn);
826
- return await mn(r), r;
817
+ ], $t), await t("3️⃣ Write code health report", "fallow", ["--format", "markdown"], ne, !0);
818
+ let r = await S($t);
819
+ return await on(r), r;
827
820
  }
828
- async function mn(e) {
821
+ async function on(e) {
829
822
  let { score: t, grade: n } = e.health_score;
830
823
  await i(h, {
831
824
  schemaVersion: 1,
832
825
  label: "fallow",
833
826
  message: `${n} (${String(Math.round(t))})`,
834
- color: sn[n] ?? "lightgrey"
827
+ color: Qt[n] ?? "lightgrey"
835
828
  });
836
829
  }
837
- async function hn(t, n, r) {
830
+ async function sn(t, n, r) {
838
831
  let [i, a, o] = await Promise.all([
839
832
  e(".github/workflows/ci.yml"),
840
833
  e(".github/dependabot.yml"),
@@ -846,7 +839,7 @@ async function hn(t, n, r) {
846
839
  z(`repos/${t}/${n}/commits/main/check-runs?per_page=100`)
847
840
  ]), f = c === void 0 ? void 0 : JSON.parse(c).security_and_analysis, p = (e) => f?.[e] === void 0 ? void 0 : f[e].status === "enabled", m = new Set((d === void 0 ? [] : JSON.parse(d).check_runs).map((e) => e.app?.slug)), h = a?.match(/package-ecosystem:/g)?.length ?? 0, g = a?.match(/open-pull-requests-limit: 0\b/g)?.length ?? 0;
848
841
  return {
849
- codeQLLanguages: s.matchAll(/- language: ([\w-]+)/g).filter(([, e]) => e !== "rust" || o !== null).map(([, e = ""]) => on[e] ?? e).toArray(),
842
+ codeQLLanguages: s.matchAll(/- language: ([\w-]+)/g).filter(([, e]) => e !== "rust" || o !== null).map(([, e = ""]) => Zt[e] ?? e).toArray(),
850
843
  codeQLQueries: /queries: ([\w-]+)/.exec(s)?.[1],
851
844
  dependabotAlerts: u !== void 0,
852
845
  dependabotSecurityUpdates: p("dependabot_security_updates"),
@@ -865,29 +858,29 @@ async function hn(t, n, r) {
865
858
  }
866
859
  async function z(e) {
867
860
  try {
868
- let { stdout: t } = await ln("gh", ["api", e]);
861
+ let { stdout: t } = await en("gh", ["api", e]);
869
862
  return t;
870
863
  } catch (e) {
871
864
  if (String(e.stderr).includes("HTTP 404")) return;
872
865
  throw e;
873
866
  }
874
867
  }
875
- async function gn(e) {
868
+ async function cn(e) {
876
869
  let t = await fetch(`https://www.bestpractices.dev/projects.json?url=${encodeURIComponent(e)}`);
877
870
  if (!t.ok) throw Error(`OpenSSF Best Practices lookup failed with status ${String(t.status)}.`);
878
871
  return (await t.json()).find((t) => t.repo_url === e)?.id;
879
872
  }
880
- async function _n(e) {
873
+ async function ln(e) {
881
874
  let t = await fetch(`https://api.scorecard.dev/projects/${e}`);
882
875
  if (t.status !== 404) {
883
876
  if (!t.ok) throw Error(`OpenSSF Scorecard lookup failed with status ${String(t.status)}.`);
884
877
  return await t.json();
885
878
  }
886
879
  }
887
- function vn(e) {
888
- return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || $t.has(e) || Qt[e] !== void 0 && t >= Qt[e]);
880
+ function un(e) {
881
+ return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || Gt.has(e) || Wt[e] !== void 0 && t >= Wt[e]);
889
882
  }
890
- function yn(e) {
883
+ function dn(e) {
891
884
  return e === !1 ? " These are handled manually." : "";
892
885
  }
893
886
  function B(e) {
@@ -902,10 +895,10 @@ ${t.map((e) => `|${e.join("|")}|`).join("\n")}
902
895
 
903
896
  `;
904
897
  }
905
- function bn(e, t, n, r) {
898
+ function fn(e, t, n, r) {
906
899
  return `![${n}](https://img.shields.io/endpoint?url=${encodeURIComponent(`https://raw.githubusercontent.com/${e}/${t}/main/${r}`)})`;
907
900
  }
908
- function xn(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i }) {
901
+ function pn(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i }) {
909
902
  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\`.` : "", s = [[
910
903
  "Unit tests",
911
904
  B(i.testsInCI),
@@ -918,7 +911,7 @@ function xn(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i })
918
911
  n !== void 0 && s.push([
919
912
  "Test coverage",
920
913
  B(!0),
921
- `${bn(e, t, "Coverage", an)} [Vitest's V8 coverage](https://vitest.dev/guide/coverage) measures the share of source lines the unit tests run. The target is ${String(nn)}%.`
914
+ `${fn(e, t, "Coverage", Xt)} [Vitest's V8 coverage](https://vitest.dev/guide/coverage) measures the share of source lines the unit tests run. The target is ${String(Jt)}%.`
922
915
  ]);
923
916
  let c = `[![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}) `, l = [[
924
917
  "Code analysis",
@@ -932,7 +925,7 @@ function xn(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i })
932
925
  r !== void 0 && l.unshift([
933
926
  "Code health",
934
927
  B(!0),
935
- `[${bn(e, t, "Fallow code health", h)}](./${ne}) [Fallow](https://github.com/fallow-rs/fallow) finds unused code, duplication, complexity and dependency problems.`
928
+ `[${fn(e, t, "Fallow code health", h)}](./${ne}) [Fallow](https://github.com/fallow-rs/fallow) finds unused code, duplication, complexity and dependency problems.`
936
929
  ]);
937
930
  let u = i.codeQLLanguages.length > 0, d = `[![CodeQL](${a}/actions/workflows/codeql.yml/badge.svg)](${a}/security/code-scanning) `, f = i.codeQLQueries === "security-extended" ? "using the extended security queries" : "using the default queries", p = u ? ` ${i.codeQLLanguages.join(" and ")}` : "", m = [
938
931
  [
@@ -969,23 +962,23 @@ function xn(e, t, { coveragePercent: n, fallowHealth: r, securitySettings: i })
969
962
  [
970
963
  "Security updates",
971
964
  B(i.dependabotSecurityUpdates),
972
- `${g} opens pull requests that update vulnerable dependencies.${yn(i.dependabotSecurityUpdates)}`
965
+ `${g} opens pull requests that update vulnerable dependencies.${dn(i.dependabotSecurityUpdates)}`
973
966
  ],
974
967
  [
975
968
  "Version updates",
976
969
  B(i.dependabotVersionUpdates),
977
- `${g} opens pull requests for new dependency versions.${yn(i.dependabotVersionUpdates)}`
970
+ `${g} opens pull requests for new dependency versions.${dn(i.dependabotVersionUpdates)}`
978
971
  ]
979
972
  ];
980
973
  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.
981
974
 
982
975
  ${V("Testing", s)}${V("Code Quality", l)}${V("Security Analysis", m)}${V("Dependencies", _)}`;
983
976
  }
984
- function Sn(e, t, n, r, i) {
985
- let a = `https://github.com/${e}/${t}`, o = `github.com/${e}/${t}`, s = `https://www.bestpractices.dev/projects/${String(r)}`, c = i !== void 0 && vn(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.";
977
+ function mn(e, t, n, r, i) {
978
+ let a = `https://github.com/${e}/${t}`, o = `github.com/${e}/${t}`, s = `https://www.bestpractices.dev/projects/${String(r)}`, c = i !== void 0 && un(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.";
986
979
  return `## Quality & Security
987
980
 
988
- ${xn(e, t, n)}### OpenSSF 🚧
981
+ ${pn(e, t, n)}### OpenSSF 🚧
989
982
 
990
983
  ${l}[![OpenSSF Scorecard](https://api.scorecard.dev/projects/${o}/badge)](https://scorecard.dev/viewer/?uri=${o})
991
984
 
@@ -997,26 +990,26 @@ Please do not open public GitHub issues for security vulnerabilities. ${u}`;
997
990
  }
998
991
  //#endregion
999
992
  //#region src/actions/documentUsage.ts
1000
- var Cn = "<!-- USAGE_START -->", wn = "<!-- USAGE_END -->", Tn = /* @__PURE__ */ new Set([
993
+ var hn = "<!-- USAGE_START -->", gn = "<!-- USAGE_END -->", _n = /* @__PURE__ */ new Set([
1001
994
  "connector",
1002
995
  "cookbook",
1003
996
  "presenter"
1004
- ]), En = /* @__PURE__ */ new Set(["development", "eslint"]), Dn = "> [!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.", On = "This repository manages itself using the actions it implements.", kn = "This repository is managed using the common set of actions provided by [@dpuse/dpuse-development](https://github.com/dpuse/dpuse-development).";
1005
- async function An() {
997
+ ]), vn = /* @__PURE__ */ new Set(["development", "eslint"]), yn = "> [!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.", bn = "This repository manages itself using the actions it implements.", xn = "This repository is managed using the common set of actions provided by [@dpuse/dpuse-development](https://github.com/dpuse/dpuse-development).";
998
+ async function Sn() {
1006
999
  try {
1007
1000
  s("Document Usage"), C("1️⃣ Insert usage content into 'README.md'");
1008
- let [e, t] = await Promise.all([S("package.json"), S("config.json")]), n = jn(e), r = Mn(n), i = H(e.engines?.node), a = H(e.engines?.npm), o = H(e.devDependencies?.typescript), c = Nn(m(t.id), e.name), l = `${n.replace(/\.git$/, "")}/blob/main/package.json`, u = Pn(c, n, r, i, a, o, `${e.name === "@dpuse/dpuse-development" ? On : kn} See the \`scripts\` block in [package.json](${l}) for details.`);
1009
- await _(u, Cn, wn), b("Usage documented");
1001
+ let [e, t] = await Promise.all([S("package.json"), S("config.json")]), n = Cn(e), r = wn(n), i = H(e.engines?.node), a = H(e.engines?.npm), o = H(e.devDependencies?.typescript), c = Tn(m(t.id), e.name), l = `${n.replace(/\.git$/, "")}/blob/main/package.json`, u = En(c, n, r, i, a, o, `${e.name === "@dpuse/dpuse-development" ? bn : xn} See the \`scripts\` block in [package.json](${l}) for details.`);
1002
+ await _(u, hn, gn), b("Usage documented");
1010
1003
  } catch (e) {
1011
1004
  console.error("❌ Error documenting usage", e), process.exit(1);
1012
1005
  }
1013
1006
  }
1014
- function jn(e) {
1007
+ function Cn(e) {
1015
1008
  let t = e.repository, n = typeof t == "string" ? t : t?.url;
1016
1009
  if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
1017
1010
  return n.replace(/^git\+/, "");
1018
1011
  }
1019
- function Mn(e) {
1012
+ function wn(e) {
1020
1013
  return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
1021
1014
  }
1022
1015
  function H(e) {
@@ -1025,9 +1018,9 @@ function H(e) {
1025
1018
  if (t == null) throw Error(`Unable to parse version from '${e}'.`);
1026
1019
  return t[0];
1027
1020
  }
1028
- function Nn(e, t) {
1021
+ function Tn(e, t) {
1029
1022
  let { typeId: n } = e;
1030
- if (Tn.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.
1023
+ if (_n.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.
1031
1024
 
1032
1025
  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.`;
1033
1026
  if (e.publishedTo === "npm") {
@@ -1038,11 +1031,11 @@ You may view or clone this repository for your own purposes, such as building a
1038
1031
  npm install ${t}
1039
1032
  \`\`\`
1040
1033
 
1041
- ${En.has(n) ? `${Dn}\n\n` : ""}To work on the source instead, clone this repository.`;
1034
+ ${vn.has(n) ? `${yn}\n\n` : ""}To work on the source instead, clone this repository.`;
1042
1035
  }
1043
1036
  return "You may view or clone this repository for your own purposes.";
1044
1037
  }
1045
- function Pn(e, t, n, r, i, a, o) {
1038
+ function En(e, t, n, r, i, a, o) {
1046
1039
  return `## Usage
1047
1040
 
1048
1041
  ${e}
@@ -1060,7 +1053,7 @@ ${o}`;
1060
1053
  //#endregion
1061
1054
  //#region src/actions/documentApiReference.ts
1062
1055
  var U = "API_REFERENCE.md";
1063
- async function Fn() {
1056
+ async function Dn() {
1064
1057
  try {
1065
1058
  s("Document API Reference");
1066
1059
  let { writeAPIReference: e } = await import("./apiReference-D4xooSV0.js");
@@ -1071,49 +1064,49 @@ async function Fn() {
1071
1064
  }
1072
1065
  //#endregion
1073
1066
  //#region src/actions/documentBundleSizes.ts
1074
- var In = "bundle-analysis-reports/sonda/index.json", Ln = "bundle-analysis-reports/sonda/worker.json", Rn = "<!-- BUNDLE_START -->", zn = "<!-- BUNDLE_END -->", W = "&nbsp;&nbsp;&nbsp;&nbsp;", G = 20, Bn = "█", Vn = "▒", Hn = 100 / G / 2, Un = 100 / G, Wn = "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._", Gn = "Bars show each row's share of its output file.", Kn = "↳ rows are part of the row above.", K = "(bundler output, whitespace & JSON)", q = "(inlined worker)", qn = `${q} = a Web Worker built separately and embedded in its output file as text. Where the build records what it contains, its rows list that; any few bytes over are the escaping needed to embed it.`, J = "(Rust WebAssembly as base64", Jn = `${J}…) = the compiled Rust code, embedded as base64 text, about a third larger than the binary it decodes to, which is the size given.`, Yn = `${K} = 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.`;
1075
- async function Xn(t) {
1067
+ var On = "bundle-analysis-reports/sonda/index.json", kn = "bundle-analysis-reports/sonda/worker.json", An = "<!-- BUNDLE_START -->", jn = "<!-- BUNDLE_END -->", W = "&nbsp;&nbsp;&nbsp;&nbsp;", G = 20, Mn = "█", Nn = "▒", Pn = 100 / G / 2, Fn = 100 / G, In = "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._", Ln = "Bars show each row's share of its output file.", Rn = "↳ rows are part of the row above.", K = "(bundler output, whitespace & JSON)", q = "(inlined worker)", zn = `${q} = a Web Worker built separately and embedded in its output file as text. Where the build records what it contains, its rows list that; any few bytes over are the escaping needed to embed it.`, J = "(Rust WebAssembly as base64", Bn = `${J}…) = the compiled Rust code, embedded as base64 text, about a third larger than the binary it decodes to, which is the size given.`, Vn = `${K} = 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.`;
1068
+ async function Hn(t) {
1076
1069
  try {
1077
1070
  s("Document Bundle Sizes"), C("1️⃣ Read bundle analysis report");
1078
- let n = await S(In), r = await e(Ln), i = r === null ? void 0 : JSON.parse(r), a = /* @__PURE__ */ new Map();
1071
+ let n = await S(On), r = await e(kn), i = r === null ? void 0 : JSON.parse(r), a = /* @__PURE__ */ new Map();
1079
1072
  for (let t of n.resources) t.kind === "asset" && a.set(t.name, await e(t.name));
1080
1073
  C("2️⃣ Insert table into 'README.md'");
1081
- let o = Zn(n, {
1074
+ let o = Un(n, {
1082
1075
  assetContents: a,
1083
1076
  isModuleLevel: t?.moduleLevel ?? !1,
1084
1077
  workerJson: i
1085
1078
  }), c = [
1086
- o.includes("↳") ? `${Gn} ${Kn}` : Gn,
1087
- o.includes(q) ? qn : "",
1088
- o.includes(J) ? Jn : "",
1089
- Yn
1079
+ o.includes("↳") ? `${Ln} ${Rn}` : Ln,
1080
+ o.includes(q) ? zn : "",
1081
+ o.includes(J) ? Bn : "",
1082
+ Vn
1090
1083
  ].filter((e) => e !== "");
1091
- await _(`## Bundle Analysis\n\n${Wn}\n\n${o}\n\n${c.join("\n\n")}`, Rn, zn), b("Bundle sizes documented");
1084
+ await _(`## Bundle Analysis\n\n${In}\n\n${o}\n\n${c.join("\n\n")}`, An, jn), b("Bundle sizes documented");
1092
1085
  } catch (e) {
1093
1086
  console.error("❌ Error documenting bundle sizes", e), process.exit(1);
1094
1087
  }
1095
1088
  }
1096
- function Zn(e, t) {
1097
- let { assetContents: n, isModuleLevel: r, workerJson: i } = t, a = fr(e), o = i === void 0 ? void 0 : fr(i).values().next().value;
1089
+ function Un(e, t) {
1090
+ let { assetContents: n, isModuleLevel: r, workerJson: i } = t, a = ir(e), o = i === void 0 ? void 0 : ir(i).values().next().value;
1098
1091
  for (let [e, t] of a) {
1099
1092
  let r = n.get(e);
1100
- r != null && Qn(t, r, o);
1093
+ r != null && Wn(t, r, o);
1101
1094
  }
1102
- let s = a.values().flatMap((e) => e.values().toArray()).reduce((e, t) => e + t.sizes.uncompressed, 0), c = e.resources.filter((e) => e.kind === "asset").map((e) => [e.name, X(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), l = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
1095
+ let s = a.values().flatMap((e) => e.values().toArray()).reduce((e, t) => e + t.sizes.uncompressed, 0), c = e.resources.filter((e) => e.kind === "asset").map((e) => [e.name, lr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), l = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
1103
1096
  for (let [e, t] of c) {
1104
- let n = [...a.get(e) ?? /* @__PURE__ */ new Map()].toSorted(or), i = n.reduce((e, [, t]) => e + t.sizes.uncompressed, 0), o = i > 0 && s > 0 ? ` · ${br(i, s)} of the build` : "";
1105
- l.push(`| **${e}** | ${_r(t)}${o} |`, ...sr(n, i, r));
1097
+ let n = [...a.get(e) ?? /* @__PURE__ */ new Map()].toSorted(Qn), i = n.reduce((e, [, t]) => e + t.sizes.uncompressed, 0), o = i > 0 && s > 0 ? ` · ${fr(i, s)} of the build` : "";
1098
+ l.push(`| **${e}** | ${ur(t)}${o} |`, ...$n(n, i, r));
1106
1099
  }
1107
1100
  return l.join("\n");
1108
1101
  }
1109
- function Qn(e, t, n) {
1110
- let r = $n(t), i = er(r ?? ""), a = er(t);
1111
- nr(e, {
1102
+ function Wn(e, t, n) {
1103
+ let r = Gn(t), i = Kn(r ?? ""), a = Kn(t);
1104
+ Jn(e, {
1112
1105
  bytes: a.bytes - i.bytes,
1113
1106
  binaryBytes: a.binaryBytes - i.binaryBytes
1114
- }), r !== void 0 && rr(e, Buffer.byteLength(r), i, n);
1107
+ }), r !== void 0 && Yn(e, Buffer.byteLength(r), i, n);
1115
1108
  }
1116
- function $n(e) {
1109
+ function Gn(e) {
1117
1110
  if (!e.includes("new Worker(")) return;
1118
1111
  let t = /encodeURIComponent\((\w+)\)/.exec(e)?.[1];
1119
1112
  if (t === void 0) return;
@@ -1123,21 +1116,21 @@ function $n(e) {
1123
1116
  for (; a < e.length && e[a] !== r;) a += e[a] === "\\" ? 2 : 1;
1124
1117
  return e.slice(i, a);
1125
1118
  }
1126
- function er(e) {
1119
+ function Kn(e) {
1127
1120
  let t = {
1128
1121
  bytes: 0,
1129
1122
  binaryBytes: 0
1130
1123
  };
1131
1124
  for (let n of e.matchAll(/data:application\/wasm;base64,([A-Za-z\d+/]*={0,2})/g)) {
1132
1125
  let e = n[1] ?? "";
1133
- t.bytes += n[0].length, t.binaryBytes += Math.floor(e.length * 3 / 4) - tr(e);
1126
+ t.bytes += n[0].length, t.binaryBytes += Math.floor(e.length * 3 / 4) - qn(e);
1134
1127
  }
1135
1128
  return t;
1136
1129
  }
1137
- function tr(e) {
1130
+ function qn(e) {
1138
1131
  return e.endsWith("==") ? 2 : +!!e.endsWith("=");
1139
1132
  }
1140
- function nr(e, t) {
1133
+ function Jn(e, t) {
1141
1134
  if (t.bytes <= 0) return;
1142
1135
  let n = [e.get("wasm"), e.get(K)].flatMap((e) => e === void 0 ? [] : e.files.entries().map(([t, n]) => ({
1143
1136
  group: e,
@@ -1145,7 +1138,7 @@ function nr(e, t) {
1145
1138
  sizes: n
1146
1139
  })).toArray()).find(({ sizes: e }) => e.uncompressed >= t.bytes);
1147
1140
  if (n === void 0) return;
1148
- ar(e, n.group, n.fileName, n.sizes, t.bytes);
1141
+ Zn(e, n.group, n.fileName, n.sizes, t.bytes);
1149
1142
  let r = `${J}, ${Q(t.binaryBytes)} binary)`;
1150
1143
  e.set(r, {
1151
1144
  sizes: {
@@ -1158,14 +1151,14 @@ function nr(e, t) {
1158
1151
  }]])
1159
1152
  });
1160
1153
  }
1161
- function rr(e, t, n, r) {
1154
+ function Yn(e, t, n, r) {
1162
1155
  let i = e.get(K), a = i?.files.get("");
1163
1156
  if (i === void 0 || a === void 0 || a.uncompressed < t) return;
1164
- ar(e, i, "", a, t);
1157
+ Zn(e, i, "", a, t);
1165
1158
  let o = r === void 0 ? /* @__PURE__ */ new Map([["", {
1166
1159
  uncompressed: t,
1167
1160
  gzip: 0
1168
- }]]) : ir(r, t, n);
1161
+ }]]) : Xn(r, t, n);
1169
1162
  e.set(q, {
1170
1163
  sizes: {
1171
1164
  uncompressed: t,
@@ -1174,84 +1167,84 @@ function rr(e, t, n, r) {
1174
1167
  files: o
1175
1168
  });
1176
1169
  }
1177
- function ir(e, t, n) {
1178
- nr(e, n);
1170
+ function Xn(e, t, n) {
1171
+ Jn(e, n);
1179
1172
  let r = /* @__PURE__ */ new Map();
1180
1173
  for (let [t, n] of e) if (t === "src") for (let [e, t] of n.files) r.set(e, { ...t });
1181
1174
  else {
1182
- let e = n.files.size === 1 ? ur(t, dr(n.files)) : t;
1175
+ let e = n.files.size === 1 ? nr(t, rr(n.files)) : t;
1183
1176
  r.set(e, { ...n.sizes });
1184
1177
  }
1185
- let i = r.values().reduce((e, t) => e + t.uncompressed, 0), a = r.get(K) ?? Z();
1178
+ let i = r.values().reduce((e, t) => e + t.uncompressed, 0), a = r.get(K) ?? X();
1186
1179
  return a.uncompressed += Math.max(0, t - i), a.uncompressed > 0 && r.set(K, a), r;
1187
1180
  }
1188
- function ar(e, t, n, r, i) {
1181
+ function Zn(e, t, n, r, i) {
1189
1182
  if (r.uncompressed -= i, t.sizes.uncompressed -= i, r.uncompressed <= 0 && t.files.delete(n), !(t.sizes.uncompressed > 0)) for (let [n, r] of e) r === t && e.delete(n);
1190
1183
  }
1191
- function or(e, t) {
1184
+ function Qn(e, t) {
1192
1185
  return e[0] === K == (t[0] === K) ? t[1].sizes.uncompressed - e[1].sizes.uncompressed : e[0] === K ? 1 : -1;
1193
1186
  }
1194
- function sr(e, t, n) {
1187
+ function $n(e, t, n) {
1195
1188
  let r = [];
1196
1189
  for (let [i, { sizes: a, files: o }] of e) {
1197
1190
  if (o.size === 1) {
1198
- let e = dr(o);
1199
- r.push(`| ${W}${ur(i, e)} | ${Y(a.uncompressed, t)} |`);
1191
+ let e = rr(o);
1192
+ r.push(`| ${W}${nr(i, e)} | ${Y(a.uncompressed, t)} |`);
1200
1193
  continue;
1201
1194
  }
1202
- r.push(`| ${W}${i} | ${Y(a.uncompressed, t)} |`), n || r.push(...cr(o, t));
1195
+ r.push(`| ${W}${i} | ${Y(a.uncompressed, t)} |`), n || r.push(...er(o, t));
1203
1196
  }
1204
1197
  return r;
1205
1198
  }
1206
- function cr(e, t) {
1207
- let n = [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), r = lr(n, t), i = (r > 0 ? n.slice(0, -r) : n).map(([e, n]) => `| ${W}${W}↳ ${e} | ${Y(n.uncompressed, t, Vn)} |`);
1199
+ function er(e, t) {
1200
+ let n = [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), r = tr(n, t), i = (r > 0 ? n.slice(0, -r) : n).map(([e, n]) => `| ${W}${W}↳ ${e} | ${Y(n.uncompressed, t, Nn)} |`);
1208
1201
  if (r > 0) {
1209
1202
  let e = n.slice(-r).reduce((e, [, t]) => e + t.uncompressed, 0);
1210
- i.push(`| ${W}${W}↳ ${String(r)} smaller files | ${Y(e, t, Vn)} |`);
1203
+ i.push(`| ${W}${W}↳ ${String(r)} smaller files | ${Y(e, t, Nn)} |`);
1211
1204
  }
1212
1205
  return i;
1213
1206
  }
1214
- function lr(e, t) {
1207
+ function tr(e, t) {
1215
1208
  if (t <= 0) return 0;
1216
1209
  let n = 0, r = 0;
1217
1210
  for (let [, i] of e.toReversed()) {
1218
- let e = i.uncompressed / t * 100 < Hn, a = (r + i.uncompressed) / t * 100 <= Un;
1211
+ let e = i.uncompressed / t * 100 < Pn, a = (r + i.uncompressed) / t * 100 <= Fn;
1219
1212
  if (!e || !a) break;
1220
1213
  n++, r += i.uncompressed;
1221
1214
  }
1222
1215
  return n >= 2 ? n : 0;
1223
1216
  }
1224
- function Y(e, t, n = Bn) {
1225
- return `${vr(t > 0 ? e / t * 100 : 0, n)} · ${Q(e)}`;
1217
+ function Y(e, t, n = Mn) {
1218
+ return `${dr(t > 0 ? e / t * 100 : 0, n)} · ${Q(e)}`;
1226
1219
  }
1227
- function ur(e, t) {
1220
+ function nr(e, t) {
1228
1221
  return t === "" ? e : `${e} → ${t}`;
1229
1222
  }
1230
- function dr(e) {
1223
+ function rr(e) {
1231
1224
  let [t] = e.keys();
1232
1225
  if (t === void 0) throw Error("Expected exactly one file");
1233
1226
  return t;
1234
1227
  }
1235
- function fr(e) {
1236
- let t = pr(e.dependencies), n = /* @__PURE__ */ new Map();
1228
+ function ir(e) {
1229
+ let t = ar(e.dependencies), n = /* @__PURE__ */ new Map();
1237
1230
  for (let r of e.resources) {
1238
1231
  if (r.kind !== "chunk" || !r.parent) continue;
1239
- let { group: e, file: i } = mr(r.name, t), a = X(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
1232
+ let { group: e, file: i } = or(r.name, t), a = lr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
1240
1233
  n.set(r.parent, o);
1241
1234
  let s = o.get(e) ?? {
1242
- sizes: Z(),
1235
+ sizes: X(),
1243
1236
  files: /* @__PURE__ */ new Map()
1244
1237
  };
1245
- o.set(e, s), yr(s.sizes, a);
1246
- let c = s.files.get(i) ?? Z();
1247
- s.files.set(i, c), yr(c, a);
1238
+ o.set(e, s), Z(s.sizes, a);
1239
+ let c = s.files.get(i) ?? X();
1240
+ s.files.set(i, c), Z(c, a);
1248
1241
  }
1249
1242
  return n;
1250
1243
  }
1251
- function pr(e) {
1244
+ function ar(e) {
1252
1245
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
1253
1246
  }
1254
- function mr(e, t) {
1247
+ function or(e, t) {
1255
1248
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
1256
1249
  if (n) {
1257
1250
  let [t, r] = n;
@@ -1268,42 +1261,42 @@ function mr(e, t) {
1268
1261
  file: e.slice(1)
1269
1262
  } : e.startsWith("rust/") ? {
1270
1263
  group: "wasm",
1271
- file: hr(e)
1264
+ file: sr(e)
1272
1265
  } : {
1273
1266
  group: "src",
1274
- file: gr(e)
1267
+ file: cr(e)
1275
1268
  };
1276
1269
  }
1277
- function hr(e) {
1278
- let t = e.split("/", 2)[1] ?? "", n = gr(e);
1270
+ function sr(e) {
1271
+ let t = e.split("/", 2)[1] ?? "", n = cr(e);
1279
1272
  return t !== "" && n.startsWith(t) ? `…${n.slice(t.length)}` : n;
1280
1273
  }
1281
- function gr(e) {
1274
+ function cr(e) {
1282
1275
  return e.split("/").at(-1) ?? e;
1283
1276
  }
1284
- function X(e) {
1277
+ function lr(e) {
1285
1278
  return {
1286
1279
  uncompressed: e.uncompressed,
1287
1280
  gzip: e.gzip ?? 0
1288
1281
  };
1289
1282
  }
1290
- function _r(e) {
1283
+ function ur(e) {
1291
1284
  return `${Q(e.uncompressed)} · gzip ${Q(e.gzip)}`;
1292
1285
  }
1293
- function vr(e, t = Bn) {
1286
+ function dr(e, t = Mn) {
1294
1287
  let n = Math.round(e / 100 * G);
1295
1288
  return `\`${t.repeat(n)}${"░".repeat(G - n)}\` ${e.toFixed(1)}%`;
1296
1289
  }
1297
- function Z() {
1290
+ function X() {
1298
1291
  return {
1299
1292
  uncompressed: 0,
1300
1293
  gzip: 0
1301
1294
  };
1302
1295
  }
1303
- function yr(e, t) {
1296
+ function Z(e, t) {
1304
1297
  e.uncompressed += t.uncompressed, e.gzip += t.gzip;
1305
1298
  }
1306
- function br(e, t) {
1299
+ function fr(e, t) {
1307
1300
  return `${(e / t * 100).toFixed(1)}%`;
1308
1301
  }
1309
1302
  function Q(e) {
@@ -1311,12 +1304,12 @@ function Q(e) {
1311
1304
  }
1312
1305
  //#endregion
1313
1306
  //#region src/actions/documentProject.ts
1314
- async function xr(t = "MIT", n = !1) {
1307
+ async function pr(t = "MIT", n = !1) {
1315
1308
  try {
1316
1309
  let r = await S("config.json"), i = m(r.id).typeId === "connector";
1317
- await qt(), i && await $e(), await An(), await bt(t), await e("bundle-analysis-reports/sonda/index.json") === null ? C(`ℹ️ Bundle sizes NOT documented, as there is no '${In}' yet. Build the project first.`) : await Xn({ moduleLevel: n }), await un(), await et();
1310
+ await zt(), i && await Ge(), await Sn(), await ft(t), await e("bundle-analysis-reports/sonda/index.json") === null ? C(`ℹ️ Bundle sizes NOT documented, as there is no '${On}' yet. Build the project first.`) : await Hn({ moduleLevel: n }), await tn(), await Ke();
1318
1311
  let a = await e(U) !== null;
1319
- a ? await Fn() : C(`ℹ️ '${U}' NOT required by this project`), await o("ℹ️ Format generated files", "prettier", [
1312
+ a ? await Dn() : C(`ℹ️ '${U}' NOT required by this project`), await o("ℹ️ Format generated files", "prettier", [
1320
1313
  "--write",
1321
1314
  "README.md",
1322
1315
  ...a ? [U] : []
@@ -1327,7 +1320,7 @@ async function xr(t = "MIT", n = !1) {
1327
1320
  }
1328
1321
  //#endregion
1329
1322
  //#region src/actions/formatCode.ts
1330
- async function Sr() {
1323
+ async function mr() {
1331
1324
  try {
1332
1325
  s("Format Code");
1333
1326
  let e = [
@@ -1348,7 +1341,7 @@ async function Sr() {
1348
1341
  }
1349
1342
  //#endregion
1350
1343
  //#region src/actions/lintCode.ts
1351
- async function Cr() {
1344
+ async function hr() {
1352
1345
  try {
1353
1346
  s("Lint Code"), await o("1️⃣ Lint", "eslint", ["."]), b("Code linted");
1354
1347
  } catch (e) {
@@ -1357,9 +1350,7 @@ async function Cr() {
1357
1350
  }
1358
1351
  //#endregion
1359
1352
  //#region src/utilities/cloudflare.ts
1360
- var wr = /* @__PURE__ */ we((/* @__PURE__ */ Se(((e, t) => {
1361
- t.exports = {};
1362
- })))(), 1), Tr = "dpuse-sample-data-eu", Er = {
1353
+ var gr = "dpuse-sample-data-eu", _r = {
1363
1354
  bin: "application/octet-stream",
1364
1355
  csv: "text/csv",
1365
1356
  json: "application/json",
@@ -1370,7 +1361,7 @@ var wr = /* @__PURE__ */ we((/* @__PURE__ */ Se(((e, t) => {
1370
1361
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1371
1362
  xml: "application/xml"
1372
1363
  };
1373
- async function Dr() {
1364
+ async function vr() {
1374
1365
  let e = await S("config.json"), t = {
1375
1366
  body: JSON.stringify(e),
1376
1367
  headers: { "Content-Type": "application/json" },
@@ -1379,11 +1370,11 @@ async function Dr() {
1379
1370
  if (!n.ok) throw Error(await n.text());
1380
1371
  }
1381
1372
  async function $(e, t) {
1382
- let n = await Mr(`${e}/${t}`, t), r = Map.groupBy(n, ({ key: e }) => Nr(e));
1383
- for (let [e, t] of r) await jr(t, ["--content-type", e]);
1373
+ let n = await Cr(`${e}/${t}`, t), r = Map.groupBy(n, ({ key: e }) => wr(e));
1374
+ for (let [e, t] of r) await Sr(t, ["--content-type", e]);
1384
1375
  }
1385
- async function Or(e) {
1386
- await $(e, "application"), await $(e, "fileStore"), await jr(["applicationIndex.json", "fileStoreIndex.json"].map((t) => ({
1376
+ async function yr(e) {
1377
+ await $(e, "application"), await $(e, "fileStore"), await Sr(["applicationIndex.json", "fileStoreIndex.json"].map((t) => ({
1387
1378
  file: `${e}/${t}`,
1388
1379
  key: t
1389
1380
  })), [
@@ -1393,7 +1384,7 @@ async function Or(e) {
1393
1384
  "no-cache"
1394
1385
  ]);
1395
1386
  }
1396
- async function kr(e) {
1387
+ async function br(e) {
1397
1388
  let t = e.id, n = {
1398
1389
  body: JSON.stringify(e),
1399
1390
  headers: { "Content-Type": "application/json" },
@@ -1401,7 +1392,7 @@ async function kr(e) {
1401
1392
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
1402
1393
  if (!r.ok) throw Error(await r.text());
1403
1394
  }
1404
- async function Ar(e, t) {
1395
+ async function xr(e, t) {
1405
1396
  let n = `v${e.version ?? "unknown"}`;
1406
1397
  async function r(e, r = "") {
1407
1398
  let i = await ee(e, { withFileTypes: !0 });
@@ -1423,15 +1414,15 @@ async function Ar(e, t) {
1423
1414
  }
1424
1415
  await r("dist");
1425
1416
  }
1426
- async function jr(e, t) {
1417
+ async function Sr(e, t) {
1427
1418
  if (e.length === 0) return;
1428
- let n = await w.mkdtemp(T.join(wr.default.tmpdir(), "dpuse-r2-bulk-")), r = T.join(n, "files.json");
1419
+ let n = await w.mkdtemp(T.join(ge.tmpdir(), "dpuse-r2-bulk-")), r = T.join(n, "files.json");
1429
1420
  try {
1430
1421
  await i(r, e), console.info(`⚙️ Uploading ${String(e.length)} files (${t.join(" ")})...`), await y(void 0, "wrangler", [
1431
1422
  "r2",
1432
1423
  "bulk",
1433
1424
  "put",
1434
- Tr,
1425
+ gr,
1435
1426
  "--filename",
1436
1427
  r,
1437
1428
  ...t,
@@ -1445,55 +1436,55 @@ async function jr(e, t) {
1445
1436
  });
1446
1437
  }
1447
1438
  }
1448
- async function Mr(e, t) {
1439
+ async function Cr(e, t) {
1449
1440
  let n = await ee(e), r = [];
1450
1441
  for (let i of n) {
1451
1442
  if (i.startsWith(".")) continue;
1452
1443
  let n = `${e}/${i}`, a = `${t}/${i}`;
1453
- (await p(n)).isDirectory() ? r.push(...await Mr(n, a)) : r.push({
1444
+ (await p(n)).isDirectory() ? r.push(...await Cr(n, a)) : r.push({
1454
1445
  file: n,
1455
1446
  key: a
1456
1447
  });
1457
1448
  }
1458
1449
  return r;
1459
1450
  }
1460
- function Nr(e) {
1451
+ function wr(e) {
1461
1452
  let t = e.slice(e.lastIndexOf("/") + 1), n = t.lastIndexOf(".");
1462
1453
  if (n === -1) return t === "LICENSE" ? "text/plain" : "application/octet-stream";
1463
- let r = Er[t.slice(n + 1).toLowerCase()];
1454
+ let r = _r[t.slice(n + 1).toLowerCase()];
1464
1455
  if (r === void 0) throw Error(`No content type for '${e}'. Add its extension to 'SAMPLE_DATA_CONTENT_TYPES'.`);
1465
1456
  return r;
1466
1457
  }
1467
1458
  //#endregion
1468
1459
  //#region src/actions/publishProject.ts
1469
- async function Pr() {
1460
+ async function Tr() {
1470
1461
  try {
1471
1462
  s("Publish Project");
1472
1463
  let e = await S("package.json"), t = await S("config.json"), n = m(t.id);
1473
- n.publishedTo === "npm" ? await o("1️⃣ Publish to npm", "npm", ["publish", "--provenance"]) : C("1️⃣ Publishing to npm NOT required"), await Fr("2️⃣ ", e, t, n), n.publishedTo === "kb" ? await o("3️⃣ Deploy", "npm", ["run", "deploy"]) : n.publishedTo === "sampleData" && (C("3️⃣ Upload sample data"), await Or("public")), b(`Project version '${e.version ?? "unknown"}' published.`);
1464
+ n.publishedTo === "npm" ? await o("1️⃣ Publish to npm", "npm", ["publish", "--provenance"]) : C("1️⃣ Publishing to npm NOT required"), await Er("2️⃣ ", e, t, n), n.publishedTo === "kb" ? await o("3️⃣ Deploy", "npm", ["run", "deploy"]) : n.publishedTo === "sampleData" && (C("3️⃣ Upload sample data"), await yr("public")), b(`Project version '${e.version ?? "unknown"}' published.`);
1474
1465
  } catch (e) {
1475
1466
  console.error("❌ Error publishing project", e), process.exit(1);
1476
1467
  }
1477
1468
  }
1478
- async function Fr(e, t, n, r) {
1479
- if (r.typeId === "app") C(`${e} Register module`), await Dr();
1480
- else if (r.typeId === "engine") C(`${e} Register module`), await Ar(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await kr(n);
1469
+ async function Er(e, t, n, r) {
1470
+ if (r.typeId === "app") C(`${e} Register module`), await vr();
1471
+ else if (r.typeId === "engine") C(`${e} Register module`), await xr(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await br(n);
1481
1472
  else if (r.uploadGroupName === void 0) C(`${e} Registration NOT required`);
1482
1473
  else {
1483
1474
  C(`${e} Register module`);
1484
1475
  let i = n.id.split("-").slice(2).join("-");
1485
- await Ar(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await kr(n);
1476
+ await xr(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await br(n);
1486
1477
  }
1487
1478
  }
1488
1479
  //#endregion
1489
1480
  //#region src/actions/releaseProject.ts
1490
- async function Ir(e = "MIT", t = !1) {
1481
+ async function Dr(e = "MIT", t = !1) {
1491
1482
  try {
1492
1483
  s("Release Project");
1493
1484
  let n = await S("package.json"), r = await S("config.json"), i = m(r.id);
1494
1485
  await d("1️⃣ ", n);
1495
1486
  let a = await oe("2️⃣ ", n, i);
1496
- if (await Pe("3️⃣ ", n), C("4️⃣ Regenerate README"), await xr(e, t), await y("5️⃣ Stage changes", "git", ["add", "."]), await y("6️⃣ Commit changes", "git", [
1487
+ if (await Ee("3️⃣ ", n), C("4️⃣ Regenerate README"), await pr(e, t), await y("5️⃣ Stage changes", "git", ["add", "."]), await y("6️⃣ Commit changes", "git", [
1497
1488
  "commit",
1498
1489
  "-m",
1499
1490
  `v${n.version ?? "unknown"}`
@@ -1501,7 +1492,7 @@ async function Ir(e = "MIT", t = !1) {
1501
1492
  "push",
1502
1493
  "origin",
1503
1494
  "main:main"
1504
- ]), await Fr("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1495
+ ]), await Er("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1505
1496
  let e = `v${n.version ?? "unknown"}`;
1506
1497
  await o("9️⃣ Trigger GitHub release", "gh", [
1507
1498
  "release",
@@ -1520,7 +1511,7 @@ async function Ir(e = "MIT", t = !1) {
1520
1511
  }
1521
1512
  //#endregion
1522
1513
  //#region src/actions/syncProjectWithGitHub.ts
1523
- async function Lr() {
1514
+ async function Or() {
1524
1515
  try {
1525
1516
  s("Synchronise Project with GitHub");
1526
1517
  let e = await S("package.json"), t = await S("config.json"), n = m(t.id);
@@ -1539,12 +1530,12 @@ async function Lr() {
1539
1530
  }
1540
1531
  //#endregion
1541
1532
  //#region src/actions/testProject.ts
1542
- var Rr = [
1533
+ var kr = [
1543
1534
  "1️⃣ ",
1544
1535
  "2️⃣ ",
1545
1536
  "3️⃣ ",
1546
1537
  "4️⃣ "
1547
- ], zr = [{
1538
+ ], Ar = [{
1548
1539
  id: "unit",
1549
1540
  label: "Run unit tests",
1550
1541
  command: "vitest",
@@ -1557,13 +1548,13 @@ var Rr = [
1557
1548
  arguments: ["test", "--pass-with-no-tests"],
1558
1549
  configFileName: "playwright.config.ts"
1559
1550
  }];
1560
- async function Br(t = ["unit"]) {
1551
+ async function jr(t = ["unit"]) {
1561
1552
  try {
1562
1553
  s("Test Project");
1563
1554
  let n = 0;
1564
- for (let r of zr) {
1555
+ for (let r of Ar) {
1565
1556
  if (!t.includes(r.id) || await e(r.configFileName) === null) continue;
1566
- let i = `${Rr[n] ?? ""} ${r.label}`;
1557
+ let i = `${kr[n] ?? ""} ${r.label}`;
1567
1558
  await o(i, r.command, r.arguments), n += 1;
1568
1559
  }
1569
1560
  if (n === 0) {
@@ -1577,7 +1568,7 @@ async function Br(t = ["unit"]) {
1577
1568
  }
1578
1569
  //#endregion
1579
1570
  //#region src/actions/triggerGitHubRelease.ts
1580
- async function Vr() {
1571
+ async function Mr() {
1581
1572
  try {
1582
1573
  s("Trigger GitHub Release");
1583
1574
  let e = `v${(await S("package.json")).version ?? "unknown"}`;
@@ -1595,4 +1586,4 @@ async function Vr() {
1595
1586
  }
1596
1587
  }
1597
1588
  //#endregion
1598
- export { De as auditDependencies, Ne as buildProject, qe as checkProject, xr as documentProject, Sr as formatCode, Cr as lintCode, Pr as publishProject, Ir as releaseProject, Lr as syncProjectWithGitHub, Br as testProject, Vr as triggerGitHubRelease, $ as uploadDirectoryToR2 };
1589
+ export { ye as auditDependencies, Te as buildProject, ze as checkProject, pr as documentProject, mr as formatCode, hr as lintCode, Tr as publishProject, Dr as releaseProject, Or as syncProjectWithGitHub, jr as testProject, Mr as triggerGitHubRelease, $ as uploadDirectoryToR2 };