@dpuse/dpuse-development 0.3.745 → 0.3.746

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.
@@ -6259,30 +6259,34 @@ function Ur(e) {
6259
6259
  //#endregion
6260
6260
  //#region src/actions/documentGovernance.ts
6261
6261
  var Wr = "<!-- GOVERNANCE_START -->", Gr = "<!-- GOVERNANCE_END -->", Kr = {
6262
+ "Branch-Protection": 3,
6263
+ "Code-Review": 0,
6264
+ Contributors: 0
6265
+ }, qr = /* @__PURE__ */ new Set(["CII-Best-Practices"]), Jr = {
6262
6266
  actions: "GitHub Actions",
6263
6267
  "javascript-typescript": "JavaScript/TypeScript",
6264
6268
  rust: "Rust"
6265
- }, qr = "code-health-reports/fallow", Jr = {
6269
+ }, Yr = "code-health-reports/fallow", Xr = {
6266
6270
  A: "brightgreen",
6267
6271
  B: "green",
6268
6272
  C: "yellow",
6269
6273
  D: "orange",
6270
6274
  F: "red"
6271
- }, Yr = `${qr}/health.json`, Xr = `${qr}/index.md`, Zr = r(i);
6272
- async function Qr() {
6275
+ }, Zr = `${Yr}/health.json`, Qr = `${Yr}/index.md`, $r = r(i);
6276
+ async function ei() {
6273
6277
  try {
6274
6278
  G("Document Governance");
6275
- let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = await $r(e), { owner: r, repo: i } = Un(e, "document governance");
6279
+ let [e, t] = await Promise.all([W("package.json"), W("config.json")]), n = await ti(e), { owner: r, repo: i } = Un(e, "document governance");
6276
6280
  q("3️⃣ Read security checks and settings");
6277
- let a = await ti(r, i, e);
6278
- q("4️⃣ Look up OpenSSF Best Practices badge");
6279
- let o = await ri(`https://github.com/${r}/${i}`);
6280
- q("5️⃣ Insert governance content into 'README.md'"), await Bn(si(r, i, ii(e), ai(t.firstCreatedAt), n, o, a), Wr, Gr), K("Governance documented");
6281
+ let a = await ri(r, i, e);
6282
+ q("4️⃣ Look up OpenSSF Best Practices badge and Scorecard results");
6283
+ let [o, s] = await Promise.all([ai(`https://github.com/${r}/${i}`), oi(`github.com/${r}/${i}`)]);
6284
+ q("5️⃣ Insert governance content into 'README.md'"), await Bn(di(r, i, ci(e), li(t.firstCreatedAt), n, o, a, s), Wr, Gr), K("Governance documented");
6281
6285
  } catch (e) {
6282
6286
  console.error("❌ Error documenting governance", e), process.exit(1);
6283
6287
  }
6284
6288
  }
6285
- async function $r(e) {
6289
+ async function ti(e) {
6286
6290
  if (e.devDependencies?.fallow == null) {
6287
6291
  q("1️⃣ Code health NOT measured, as Fallow is not installed"), q("2️⃣ Code health report NOT required");
6288
6292
  return;
@@ -6292,15 +6296,15 @@ async function $r(e) {
6292
6296
  "--report-only",
6293
6297
  "--format",
6294
6298
  "json"
6295
- ], Yr), await In("2️⃣ Write code health report", "fallow", ["--format", "markdown"], Xr, !0), await W(Yr);
6299
+ ], Zr), await In("2️⃣ Write code health report", "fallow", ["--format", "markdown"], Qr, !0), await W(Zr);
6296
6300
  }
6297
- function ei(e) {
6301
+ function ni(e) {
6298
6302
  let { score: t, grade: n } = e.health_score, { functions_above_threshold: r, functions_analyzed: i, average_maintainability: a } = e.summary, o = e.vital_signs;
6299
6303
  return `### Code Health
6300
6304
 
6301
- [![Fallow code health](${`https://img.shields.io/badge/fallow-${encodeURIComponent(`${n} (${String(Math.round(t))})`).replaceAll("-", "--").replaceAll("(", "%28").replaceAll(")", "%29")}-${Jr[n] ?? "lightgrey"}`})](./${Xr})
6305
+ [![Fallow code health](${`https://img.shields.io/badge/fallow-${encodeURIComponent(`${n} (${String(Math.round(t))})`).replaceAll("-", "--").replaceAll("(", "%28").replaceAll(")", "%29")}-${Xr[n] ?? "lightgrey"}`})](./${Qr})
6302
6306
 
6303
- [Fallow](https://github.com/fallow-rs/fallow) analyses the TypeScript source on each release for unused code, duplication, complexity, and dependency hygiene. See the [full Fallow report](./${Xr}) for every finding.
6307
+ [Fallow](https://github.com/fallow-rs/fallow) analyses the TypeScript source on each release for unused code, duplication, complexity, and dependency hygiene. See the [full Fallow report](./${Qr}) for every finding.
6304
6308
 
6305
6309
  |Measure|Value|
6306
6310
  |:-|-:|
@@ -6316,19 +6320,19 @@ function ei(e) {
6316
6320
 
6317
6321
  `;
6318
6322
  }
6319
- async function ti(e, t, n) {
6323
+ async function ri(e, t, n) {
6320
6324
  let [r, i, a] = await Promise.all([
6321
6325
  Rn(".github/workflows/ci.yml"),
6322
6326
  Rn(".github/workflows/codeql.yml"),
6323
6327
  Rn(".github/dependabot.yml")
6324
6328
  ]), [o, s, c, l] = await Promise.all([
6325
- ni(`repos/${e}/${t}`),
6326
- ni(`repos/${e}/${t}/private-vulnerability-reporting`),
6327
- ni(`repos/${e}/${t}/vulnerability-alerts`),
6328
- ni(`repos/${e}/${t}/commits/main/check-runs?per_page=100`)
6329
+ ii(`repos/${e}/${t}`),
6330
+ ii(`repos/${e}/${t}/private-vulnerability-reporting`),
6331
+ ii(`repos/${e}/${t}/vulnerability-alerts`),
6332
+ ii(`repos/${e}/${t}/commits/main/check-runs?per_page=100`)
6329
6333
  ]), u = o === void 0 ? void 0 : JSON.parse(o).security_and_analysis, d = (e) => u?.[e] === void 0 ? void 0 : u[e].status === "enabled", f = new Set((l === void 0 ? [] : JSON.parse(l).check_runs).map((e) => e.app?.slug)), p = a?.match(/package-ecosystem:/g)?.length ?? 0, m = a?.match(/open-pull-requests-limit: 0\b/g)?.length ?? 0;
6330
6334
  return {
6331
- codeQLLanguages: (i ?? "").matchAll(/- language: ([\w-]+)/g).map(([, e = ""]) => Kr[e] ?? e).toArray(),
6335
+ codeQLLanguages: (i ?? "").matchAll(/- language: ([\w-]+)/g).map(([, e = ""]) => Jr[e] ?? e).toArray(),
6332
6336
  dependabotAlerts: c !== void 0,
6333
6337
  dependabotSecurityUpdates: d("dependabot_security_updates"),
6334
6338
  dependabotVersionUpdates: p > m,
@@ -6343,27 +6347,37 @@ async function ti(e, t, n) {
6343
6347
  testsInCI: r?.includes("npm test") ?? !1
6344
6348
  };
6345
6349
  }
6346
- async function ni(e) {
6350
+ async function ii(e) {
6347
6351
  try {
6348
- let { stdout: t } = await Zr("gh", ["api", e]);
6352
+ let { stdout: t } = await $r("gh", ["api", e]);
6349
6353
  return t;
6350
6354
  } catch (e) {
6351
6355
  if (String(e.stderr).includes("HTTP 404")) return;
6352
6356
  throw e;
6353
6357
  }
6354
6358
  }
6355
- async function ri(e) {
6359
+ async function ai(e) {
6356
6360
  let t = await fetch(`https://www.bestpractices.dev/projects.json?url=${encodeURIComponent(e)}`);
6357
6361
  if (!t.ok) throw Error(`OpenSSF Best Practices lookup failed with status ${String(t.status)}.`);
6358
6362
  return (await t.json()).find((t) => t.repo_url === e)?.id;
6359
6363
  }
6360
- function ii(e) {
6364
+ async function oi(e) {
6365
+ let t = await fetch(`https://api.scorecard.dev/projects/${e}`);
6366
+ if (t.status !== 404) {
6367
+ if (!t.ok) throw Error(`OpenSSF Scorecard lookup failed with status ${String(t.status)}.`);
6368
+ return await t.json();
6369
+ }
6370
+ }
6371
+ function si(e) {
6372
+ return e.checks.every(({ name: e, score: t }) => t === -1 || t === 10 || qr.has(e) || Kr[e] !== void 0 && t >= Kr[e]);
6373
+ }
6374
+ function ci(e) {
6361
6375
  let t = e.author, n = typeof t == "string" ? t : t?.name;
6362
6376
  if (n == null || n === "") throw Error("package.json 'author' field is required to document governance.");
6363
6377
  let r = n.indexOf("<"), i = r === -1 ? -1 : n.indexOf(">", r);
6364
6378
  return (i === -1 ? n : n.slice(0, r).trimEnd() + n.slice(i + 1).trimStart()).trim();
6365
6379
  }
6366
- function ai(e) {
6380
+ function li(e) {
6367
6381
  let t = (/* @__PURE__ */ new Date()).getFullYear();
6368
6382
  if (e == null) return String(t);
6369
6383
  let n = new Date(e).getFullYear();
@@ -6372,7 +6386,7 @@ function ai(e) {
6372
6386
  function Y(e, t = "On") {
6373
6387
  return e === void 0 ? "❔ Unknown" : e ? `✅ ${t}` : "❌ Off";
6374
6388
  }
6375
- function oi(e, t, n) {
6389
+ function ui(e, t, n) {
6376
6390
  let r = `https://github.com/${e}/${t}`, i = Y(n.codeQLLanguages.length > 0, n.codeQLLanguages.join(", "));
6377
6391
  return `### Checks & Settings
6378
6392
 
@@ -6445,25 +6459,25 @@ ${[
6445
6459
 
6446
6460
  `;
6447
6461
  }
6448
- function si(e, t, n, r, i, a, o) {
6449
- let s = `https://github.com/${e}/${t}`, c = `github.com/${e}/${t}`, l = `https://www.bestpractices.dev/projects/${String(a)}`, u = a === void 0 ? "" : `[![OpenSSF Best Practices](${l}/badge)](${l})\n`, d = o.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${s}/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.` : "See [SECURITY.md](./SECURITY.md) for how to report one privately, the full disclosure policy, and expected response times.";
6462
+ function di(e, t, n, r, i, a, o, s) {
6463
+ let c = `https://github.com/${e}/${t}`, l = `github.com/${e}/${t}`, u = `https://www.bestpractices.dev/projects/${String(a)}`, d = s !== void 0 && si(s) ? " Apart from the Best Practices badge above, the remaining Scorecard gaps need multi-person review or a pull-request workflow, which this solo-maintained project doesn't use." : "", f = a === void 0 ? "" : `[![OpenSSF Best Practices](${u}/badge)](${u})\n`, p = o.privateVulnerabilityReporting === !0 ? `Use [GitHub private vulnerability reporting](${c}/security/advisories/new) instead. See [SECURITY.md](./SECURITY.md) for the full disclosure policy, contact details, and expected response times.` : "See [SECURITY.md](./SECURITY.md) for how to report one privately, the full disclosure policy, and expected response times.";
6450
6464
  return `## Security & Quality
6451
6465
 
6452
- ${oi(e, t, o)}${i === void 0 ? "" : ei(i)}### Reporting Vulnerabilities
6466
+ ${ui(e, t, o)}${i === void 0 ? "" : ni(i)}### Reporting Vulnerabilities
6453
6467
 
6454
- Please do not open public GitHub issues for security vulnerabilities. ${d}
6468
+ Please do not open public GitHub issues for security vulnerabilities. ${p}
6455
6469
 
6456
6470
  ### OpenSSF 🚧
6457
6471
 
6458
- ${u}[![OpenSSF Scorecard](https://api.scorecard.dev/projects/${c}/badge)](https://scorecard.dev/viewer/?uri=${c})
6472
+ ${f}[![OpenSSF Scorecard](https://api.scorecard.dev/projects/${l}/badge)](https://scorecard.dev/viewer/?uri=${l})
6459
6473
 
6460
- This project is working towards the [OpenSSF Best Practices](https://www.bestpractices.dev) Passing badge, a self-certification covering security policy, vulnerability reporting, build processes, code quality, and more. Currently the [OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=${c}) provides an independent automated assessment of the project's security practices and is an ongoing area of improvement.
6474
+ This project is working towards the [OpenSSF Best Practices](https://www.bestpractices.dev) Passing badge, a self-certification covering security policy, vulnerability reporting, build processes, code quality, and more. Currently the [OpenSSF Scorecard](https://scorecard.dev/viewer/?uri=${l}) provides an independent automated assessment of the project's security practices and is an ongoing area of improvement.${d}
6461
6475
 
6462
6476
  ## Contributing
6463
6477
 
6464
6478
  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.
6465
6479
 
6466
- For security vulnerabilities, see [Reporting Vulnerabilities](#reporting-vulnerabilities). For bugs, inconsistencies, or other feedback, [open a GitHub issue](${s}/issues) — feedback is read, but responses and fixes are at the maintainer's discretion.
6480
+ For security vulnerabilities, see [Reporting Vulnerabilities](#reporting-vulnerabilities). For bugs, inconsistencies, or other feedback, [open a GitHub issue](${c}/issues) — feedback is read, but responses and fixes are at the maintainer's discretion.
6467
6481
 
6468
6482
  ## License
6469
6483
 
@@ -6473,28 +6487,28 @@ This project is licensed under the MIT License, permitting free use, modificatio
6473
6487
  }
6474
6488
  //#endregion
6475
6489
  //#region node_modules/@dpuse/dpuse-shared/dist/componentConfig.schema-DT3mO5rS.js
6476
- var ci = {
6490
+ var fi = {
6477
6491
  lang: void 0,
6478
6492
  message: void 0,
6479
6493
  abortEarly: void 0,
6480
6494
  abortPipeEarly: void 0
6481
6495
  };
6482
6496
  /* @__NO_SIDE_EFFECTS__ */
6483
- function li(e) {
6497
+ function pi(e) {
6484
6498
  return e ? {
6485
6499
  lang: e?.lang ?? void 0,
6486
6500
  message: e?.message,
6487
6501
  abortEarly: e?.abortEarly ?? void 0,
6488
6502
  abortPipeEarly: e?.abortPipeEarly ?? void 0
6489
- } : ci;
6503
+ } : fi;
6490
6504
  }
6491
6505
  /* @__NO_SIDE_EFFECTS__ */
6492
- function ui(e) {
6506
+ function mi(e) {
6493
6507
  let t = typeof e;
6494
6508
  return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
6495
6509
  }
6496
6510
  function X(e, t, n, r, i) {
6497
- let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ ui(a), c = {
6511
+ let a = i && "input" in i ? i.input : n.value, o = i?.expected ?? e.expects ?? null, s = i?.received ?? /* @__PURE__ */ mi(a), c = {
6498
6512
  kind: e.kind,
6499
6513
  type: e.type,
6500
6514
  input: a,
@@ -6511,39 +6525,39 @@ function X(e, t, n, r, i) {
6511
6525
  u !== void 0 && (c.message = typeof u == "function" ? u(c) : u), l && (n.typed = !1), n.issues ? n.issues.push(c) : n.issues = [c];
6512
6526
  }
6513
6527
  /* @__NO_SIDE_EFFECTS__ */
6514
- function di(e, t) {
6528
+ function hi(e, t) {
6515
6529
  return e === t || Number.isNaN(e) && Number.isNaN(t);
6516
6530
  }
6517
6531
  /* @__NO_SIDE_EFFECTS__ */
6518
- function fi(e, t) {
6532
+ function gi(e, t) {
6519
6533
  return Object.prototype.hasOwnProperty.call(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
6520
6534
  }
6521
6535
  /* @__NO_SIDE_EFFECTS__ */
6522
- function pi(e, t) {
6536
+ function _i(e, t) {
6523
6537
  let n = [...new Set(e)];
6524
6538
  return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
6525
6539
  }
6526
- function mi(e) {
6540
+ function vi(e) {
6527
6541
  return e["~standard"] = {
6528
6542
  version: 1,
6529
6543
  vendor: "valibot",
6530
- validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ li())
6544
+ validate: (t) => e["~run"]({ value: t }, /* @__PURE__ */ pi())
6531
6545
  }, e;
6532
6546
  }
6533
6547
  /* @__NO_SIDE_EFFECTS__ */
6534
- function hi(e, t, n) {
6548
+ function yi(e, t, n) {
6535
6549
  return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
6536
6550
  }
6537
6551
  /* @__NO_SIDE_EFFECTS__ */
6538
- function gi(e, t, n) {
6552
+ function bi(e, t, n) {
6539
6553
  return typeof e.default == "function" ? e.default(t, n) : e.default;
6540
6554
  }
6541
6555
  /* @__NO_SIDE_EFFECTS__ */
6542
- function _i(e, t) {
6543
- return mi({
6556
+ function xi(e, t) {
6557
+ return vi({
6544
6558
  kind: "schema",
6545
6559
  type: "array",
6546
- reference: _i,
6560
+ reference: xi,
6547
6561
  expects: "Array",
6548
6562
  async: !1,
6549
6563
  item: e,
@@ -6576,11 +6590,11 @@ function _i(e, t) {
6576
6590
  });
6577
6591
  }
6578
6592
  /* @__NO_SIDE_EFFECTS__ */
6579
- function vi(e) {
6580
- return mi({
6593
+ function Si(e) {
6594
+ return vi({
6581
6595
  kind: "schema",
6582
6596
  type: "boolean",
6583
- reference: vi,
6597
+ reference: Si,
6584
6598
  expects: "boolean",
6585
6599
  async: !1,
6586
6600
  message: e,
@@ -6590,23 +6604,23 @@ function vi(e) {
6590
6604
  });
6591
6605
  }
6592
6606
  /* @__NO_SIDE_EFFECTS__ */
6593
- function yi(e, t) {
6594
- return mi({
6607
+ function Ci(e, t) {
6608
+ return vi({
6595
6609
  kind: "schema",
6596
6610
  type: "literal",
6597
- reference: yi,
6598
- expects: /* @__PURE__ */ ui(e),
6611
+ reference: Ci,
6612
+ expects: /* @__PURE__ */ mi(e),
6599
6613
  async: !1,
6600
6614
  literal: e,
6601
6615
  message: t,
6602
6616
  "~run"(e, t) {
6603
- return /* @__PURE__ */ di(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
6617
+ return /* @__PURE__ */ hi(e.value, this.literal) ? e.typed = !0 : X(this, "type", e, t), e;
6604
6618
  }
6605
6619
  });
6606
6620
  }
6607
6621
  /* @__NO_SIDE_EFFECTS__ */
6608
6622
  function Z(e, t) {
6609
- return mi({
6623
+ return vi({
6610
6624
  kind: "schema",
6611
6625
  type: "nullable",
6612
6626
  reference: Z,
@@ -6615,16 +6629,16 @@ function Z(e, t) {
6615
6629
  wrapped: e,
6616
6630
  default: t,
6617
6631
  "~run"(e, t) {
6618
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ gi(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6632
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ bi(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6619
6633
  }
6620
6634
  });
6621
6635
  }
6622
6636
  /* @__NO_SIDE_EFFECTS__ */
6623
- function bi(e) {
6624
- return mi({
6637
+ function wi(e) {
6638
+ return vi({
6625
6639
  kind: "schema",
6626
6640
  type: "number",
6627
- reference: bi,
6641
+ reference: wi,
6628
6642
  expects: "number",
6629
6643
  async: !1,
6630
6644
  message: e,
@@ -6634,26 +6648,26 @@ function bi(e) {
6634
6648
  });
6635
6649
  }
6636
6650
  /* @__NO_SIDE_EFFECTS__ */
6637
- function xi(e, t) {
6638
- return mi({
6651
+ function Ti(e, t) {
6652
+ return vi({
6639
6653
  kind: "schema",
6640
6654
  type: "optional",
6641
- reference: xi,
6655
+ reference: Ti,
6642
6656
  expects: `(${e.expects} | undefined)`,
6643
6657
  async: !1,
6644
6658
  wrapped: e,
6645
6659
  default: t,
6646
6660
  "~run"(e, t) {
6647
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ gi(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6661
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ bi(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
6648
6662
  }
6649
6663
  });
6650
6664
  }
6651
6665
  /* @__NO_SIDE_EFFECTS__ */
6652
- function Si(e, t, n) {
6653
- return mi({
6666
+ function Ei(e, t, n) {
6667
+ return vi({
6654
6668
  kind: "schema",
6655
6669
  type: "record",
6656
- reference: Si,
6670
+ reference: Ei,
6657
6671
  expects: "Object",
6658
6672
  async: !1,
6659
6673
  key: e,
@@ -6663,7 +6677,7 @@ function Si(e, t, n) {
6663
6677
  let n = e.value;
6664
6678
  if (n && typeof n == "object") {
6665
6679
  e.typed = !0, e.value = {};
6666
- for (let r in n) if (/* @__PURE__ */ fi(n, r)) {
6680
+ for (let r in n) if (/* @__PURE__ */ gi(n, r)) {
6667
6681
  let i = n[r], a = this.key["~run"]({ value: r }, t);
6668
6682
  if (a.issues) {
6669
6683
  let o = {
@@ -6703,7 +6717,7 @@ function Si(e, t, n) {
6703
6717
  }
6704
6718
  /* @__NO_SIDE_EFFECTS__ */
6705
6719
  function Q(e, t) {
6706
- return mi({
6720
+ return vi({
6707
6721
  kind: "schema",
6708
6722
  type: "strict_object",
6709
6723
  reference: Q,
@@ -6718,7 +6732,7 @@ function Q(e, t) {
6718
6732
  for (let r in this.entries) {
6719
6733
  let i = this.entries[r];
6720
6734
  if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
6721
- let a = r in n ? n[r] : /* @__PURE__ */ gi(i), o = i["~run"]({ value: a }, t);
6735
+ let a = r in n ? n[r] : /* @__PURE__ */ bi(i), o = i["~run"]({ value: a }, t);
6722
6736
  if (o.issues) {
6723
6737
  let i = {
6724
6738
  type: "object",
@@ -6734,7 +6748,7 @@ function Q(e, t) {
6734
6748
  }
6735
6749
  }
6736
6750
  o.typed || (e.typed = !1), e.value[r] = o.value;
6737
- } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ hi(i);
6751
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ yi(i);
6738
6752
  else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (X(this, "key", e, t, {
6739
6753
  input: void 0,
6740
6754
  expected: `"${r}"`,
@@ -6770,7 +6784,7 @@ function Q(e, t) {
6770
6784
  }
6771
6785
  /* @__NO_SIDE_EFFECTS__ */
6772
6786
  function $(e) {
6773
- return mi({
6787
+ return vi({
6774
6788
  kind: "schema",
6775
6789
  type: "string",
6776
6790
  reference: $,
@@ -6783,19 +6797,19 @@ function $(e) {
6783
6797
  });
6784
6798
  }
6785
6799
  /* @__NO_SIDE_EFFECTS__ */
6786
- function Ci(e) {
6800
+ function Di(e) {
6787
6801
  let t;
6788
6802
  if (e) for (let n of e) if (t) for (let e of n.issues) t.push(e);
6789
6803
  else t = n.issues;
6790
6804
  return t;
6791
6805
  }
6792
6806
  /* @__NO_SIDE_EFFECTS__ */
6793
- function wi(e, t) {
6794
- return mi({
6807
+ function Oi(e, t) {
6808
+ return vi({
6795
6809
  kind: "schema",
6796
6810
  type: "union",
6797
- reference: wi,
6798
- expects: /* @__PURE__ */ pi(e.map((e) => e.expects), "|"),
6811
+ reference: Oi,
6812
+ expects: /* @__PURE__ */ _i(e.map((e) => e.expects), "|"),
6799
6813
  async: !1,
6800
6814
  options: e,
6801
6815
  message: t,
@@ -6814,29 +6828,29 @@ function wi(e, t) {
6814
6828
  if (n) return n;
6815
6829
  if (r) {
6816
6830
  if (r.length === 1) return r[0];
6817
- X(this, "type", e, t, { issues: /* @__PURE__ */ Ci(r) }), e.typed = !0;
6831
+ X(this, "type", e, t, { issues: /* @__PURE__ */ Di(r) }), e.typed = !0;
6818
6832
  } else if (i?.length === 1) return i[0];
6819
- else X(this, "type", e, t, { issues: /* @__PURE__ */ Ci(i) });
6833
+ else X(this, "type", e, t, { issues: /* @__PURE__ */ Di(i) });
6820
6834
  return e;
6821
6835
  }
6822
6836
  });
6823
6837
  }
6824
- var Ti = /* @__PURE__ */ Q({
6838
+ var ki = /* @__PURE__ */ Q({
6825
6839
  en: /* @__PURE__ */ $(),
6826
6840
  es: /* @__PURE__ */ $()
6827
- }), Ei = {
6841
+ }), Ai = {
6828
6842
  id: /* @__PURE__ */ $(),
6829
6843
  label: /* @__PURE__ */ Q({
6830
- en: /* @__PURE__ */ xi(/* @__PURE__ */ $()),
6831
- es: /* @__PURE__ */ xi(/* @__PURE__ */ $())
6844
+ en: /* @__PURE__ */ Ti(/* @__PURE__ */ $()),
6845
+ es: /* @__PURE__ */ Ti(/* @__PURE__ */ $())
6832
6846
  }),
6833
6847
  description: /* @__PURE__ */ Q({
6834
- en: /* @__PURE__ */ xi(/* @__PURE__ */ $()),
6835
- es: /* @__PURE__ */ xi(/* @__PURE__ */ $())
6848
+ en: /* @__PURE__ */ Ti(/* @__PURE__ */ $()),
6849
+ es: /* @__PURE__ */ Ti(/* @__PURE__ */ $())
6836
6850
  }),
6837
6851
  icon: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6838
6852
  iconDark: /* @__PURE__ */ Z(/* @__PURE__ */ $())
6839
- }, Di = (e) => /* @__PURE__ */ wi(e.map((e) => /* @__PURE__ */ yi(e))), Oi = Di([
6853
+ }, ji = (e) => /* @__PURE__ */ Oi(e.map((e) => /* @__PURE__ */ Ci(e))), Mi = ji([
6840
6854
  "app",
6841
6855
  "connector",
6842
6856
  "connectorConnection",
@@ -6858,33 +6872,33 @@ var Ti = /* @__PURE__ */ Q({
6858
6872
  "presenter",
6859
6873
  "presenterPresentation",
6860
6874
  "tool"
6861
- ]), ki = Di([
6875
+ ]), Ni = ji([
6862
6876
  "danger",
6863
6877
  "success",
6864
6878
  "warning"
6865
- ]), Ai = Di([
6879
+ ]), Pi = ji([
6866
6880
  "alpha",
6867
6881
  "beta",
6868
6882
  "releaseCandidate",
6869
6883
  "generalAvailability"
6870
- ]), ji = /* @__PURE__ */ Q({
6871
- color: ki,
6884
+ ]), Fi = /* @__PURE__ */ Q({
6885
+ color: Ni,
6872
6886
  label: /* @__PURE__ */ $()
6873
- }), Mi = {
6874
- ...Ei,
6875
- typeId: Oi
6876
- }, Ni = /* @__PURE__ */ Q({
6877
- ...Mi,
6878
- order: /* @__PURE__ */ bi(),
6887
+ }), Ii = {
6888
+ ...Ai,
6889
+ typeId: Mi
6890
+ }, Li = /* @__PURE__ */ Q({
6891
+ ...Ii,
6892
+ order: /* @__PURE__ */ wi(),
6879
6893
  path: /* @__PURE__ */ $()
6880
- }), Pi = {
6881
- ...Mi,
6882
- firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ bi()),
6883
- lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ bi()),
6884
- status: /* @__PURE__ */ Z(ji),
6885
- statusId: /* @__PURE__ */ Z(Ai)
6894
+ }), Ri = {
6895
+ ...Ii,
6896
+ firstCreatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ wi()),
6897
+ lastUpdatedAt: /* @__PURE__ */ Z(/* @__PURE__ */ wi()),
6898
+ status: /* @__PURE__ */ Z(Fi),
6899
+ statusId: /* @__PURE__ */ Z(Pi)
6886
6900
  };
6887
- ({ ...Pi }), Di([
6901
+ ({ ...Ri }), ji([
6888
6902
  "app",
6889
6903
  "engine",
6890
6904
  "connector",
@@ -6894,17 +6908,17 @@ var Ti = /* @__PURE__ */ Q({
6894
6908
  ]);
6895
6909
  //#endregion
6896
6910
  //#region node_modules/@dpuse/dpuse-shared/dist/moduleConfig.schema-aYmFWSrn.js
6897
- var Fi = {
6898
- ...Pi,
6911
+ var zi = {
6912
+ ...Ri,
6899
6913
  vendorAccountURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6900
6914
  vendorDocumentationURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6901
6915
  vendorHomeURL: /* @__PURE__ */ Z(/* @__PURE__ */ $()),
6902
6916
  version: /* @__PURE__ */ $()
6903
6917
  };
6904
- ({ ...Fi });
6918
+ ({ ...zi });
6905
6919
  //#endregion
6906
6920
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModuleConnector.es.js
6907
- var Ii = Di([
6921
+ var Bi = ji([
6908
6922
  "abortOperation",
6909
6923
  "auditObjectContent",
6910
6924
  "createObject",
@@ -6920,39 +6934,39 @@ var Ii = Di([
6920
6934
  "retrieveChunks",
6921
6935
  "retrieveRecords",
6922
6936
  "upsertRecords"
6923
- ]), Li = Di([
6937
+ ]), Vi = ji([
6924
6938
  "application",
6925
6939
  "curatedDataset",
6926
6940
  "database",
6927
6941
  "fileStore"
6928
- ]), Ri = /* @__PURE__ */ Q({ label: Ti }), zi = Di([
6942
+ ]), Hi = /* @__PURE__ */ Q({ label: ki }), Ui = ji([
6929
6943
  "bidirectional",
6930
6944
  "destination",
6931
6945
  "source",
6932
6946
  "unknown"
6933
- ]), Bi = /* @__PURE__ */ Q({ label: Ti }), Vi = /* @__PURE__ */ Q({
6934
- authMethodId: Di([
6947
+ ]), Wi = /* @__PURE__ */ Q({ label: ki }), Gi = /* @__PURE__ */ Q({
6948
+ authMethodId: ji([
6935
6949
  "apiKey",
6936
6950
  "disabled",
6937
6951
  "oAuth2",
6938
6952
  "none"
6939
6953
  ]),
6940
- activeConnectionCount: /* @__PURE__ */ xi(/* @__PURE__ */ bi()),
6941
- canDescribe: /* @__PURE__ */ xi(/* @__PURE__ */ vi()),
6942
- id: /* @__PURE__ */ xi(/* @__PURE__ */ $()),
6943
- label: /* @__PURE__ */ xi(Ti),
6944
- maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ bi()),
6945
- params: /* @__PURE__ */ xi(/* @__PURE__ */ _i(/* @__PURE__ */ Si(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6946
- }), Hi = /* @__PURE__ */ Q({
6947
- ...Fi,
6948
- typeId: /* @__PURE__ */ yi("connector"),
6949
- actionNames: /* @__PURE__ */ _i(Ii),
6950
- category: /* @__PURE__ */ Z(Ri),
6951
- categoryId: Li,
6952
- implementations: /* @__PURE__ */ Si(/* @__PURE__ */ $(), Vi),
6953
- usage: /* @__PURE__ */ Z(Bi),
6954
- usageId: /* @__PURE__ */ Z(zi)
6955
- }), Ui = {
6954
+ activeConnectionCount: /* @__PURE__ */ Ti(/* @__PURE__ */ wi()),
6955
+ canDescribe: /* @__PURE__ */ Ti(/* @__PURE__ */ Si()),
6956
+ id: /* @__PURE__ */ Ti(/* @__PURE__ */ $()),
6957
+ label: /* @__PURE__ */ Ti(ki),
6958
+ maxConnectionCount: /* @__PURE__ */ Z(/* @__PURE__ */ wi()),
6959
+ params: /* @__PURE__ */ Ti(/* @__PURE__ */ xi(/* @__PURE__ */ Ei(/* @__PURE__ */ $(), /* @__PURE__ */ $())))
6960
+ }), Ki = /* @__PURE__ */ Q({
6961
+ ...zi,
6962
+ typeId: /* @__PURE__ */ Ci("connector"),
6963
+ actionNames: /* @__PURE__ */ xi(Bi),
6964
+ category: /* @__PURE__ */ Z(Hi),
6965
+ categoryId: Vi,
6966
+ implementations: /* @__PURE__ */ Ei(/* @__PURE__ */ $(), Gi),
6967
+ usage: /* @__PURE__ */ Z(Wi),
6968
+ usageId: /* @__PURE__ */ Z(Ui)
6969
+ }), qi = {
6956
6970
  abortOperation: "Abort Operation",
6957
6971
  auditObjectContent: "Audit Object Content",
6958
6972
  createObject: "Create Object",
@@ -6968,12 +6982,12 @@ var Ii = Di([
6968
6982
  retrieveChunks: "Retrieve Chunks",
6969
6983
  retrieveRecords: "Retrieve Records",
6970
6984
  upsertRecords: "Upsert Records"
6971
- }, Wi = /* @__PURE__ */ new Set([
6985
+ }, Ji = /* @__PURE__ */ new Set([
6972
6986
  "createObject",
6973
6987
  "dropObject",
6974
6988
  "removeRecords",
6975
6989
  "upsertRecords"
6976
- ]), Gi = /* @__PURE__ */ new Set([
6990
+ ]), Yi = /* @__PURE__ */ new Set([
6977
6991
  "auditObjectContent",
6978
6992
  "findObject",
6979
6993
  "getInfo",
@@ -6984,57 +6998,57 @@ var Ii = Di([
6984
6998
  "retrieveChunks",
6985
6999
  "retrieveRecords"
6986
7000
  ]);
6987
- function Ki(e) {
7001
+ function Xi(e) {
6988
7002
  let t = !1, n = !1;
6989
- for (let r of e) Gi.has(r) && (t = !0), Wi.has(r) && (n = !0);
7003
+ for (let r of e) Yi.has(r) && (t = !0), Ji.has(r) && (n = !0);
6990
7004
  return t && n ? "bidirectional" : t ? "source" : n ? "destination" : "unknown";
6991
7005
  }
6992
- function qi(e) {
7006
+ function Zi(e) {
6993
7007
  let t = new Set(e), n = "|Action|Supported|\n";
6994
7008
  n += "|:----|:-------:|\n";
6995
- for (let e of Object.keys(Ui)) n += `| ${Ui[e]} | ${t.has(e) ? "✓" : ""} |\n`;
7009
+ for (let e of Object.keys(qi)) n += `| ${qi[e]} | ${t.has(e) ? "✓" : ""} |\n`;
6996
7010
  return n;
6997
7011
  }
6998
7012
  //#endregion
6999
7013
  //#region src/actions/documentActions.ts
7000
- var Ji = "<!-- CONNECTOR_ACTIONS_START -->", Yi = "<!-- CONNECTOR_ACTIONS_END -->", Xi = "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.", Zi = {
7014
+ var Qi = "<!-- CONNECTOR_ACTIONS_START -->", $i = "<!-- CONNECTOR_ACTIONS_END -->", ea = "Connectors conform to a unified interface contract by implementing a specific subset of standard actions. These standardised actions allow the DPUse application to interact with any underlying data source in the same way, enabling Connectors to be built independently and loaded dynamically at runtime.", ta = {
7001
7015
  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.",
7002
7016
  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.",
7003
7017
  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.",
7004
7018
  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."
7005
- }, Qi = "The table below lists all connector actions and highlights those supported by this connector.";
7006
- async function $i() {
7019
+ }, na = "The table below lists all connector actions and highlights those supported by this connector.";
7020
+ async function ra() {
7007
7021
  try {
7008
7022
  G("Document Actions"), q("1️⃣ Insert actions description and table into 'README.md'");
7009
- let e = (await W("config.json")).actionNames ?? [], t = Ki(e), n = qi(e);
7010
- await Bn(`${Xi}\n\n${Zi[t]} ${Qi}\n\n${n}`, Ji, Yi), K("Actions documented");
7023
+ let e = (await W("config.json")).actionNames ?? [], t = Xi(e), n = Zi(e);
7024
+ await Bn(`${ea}\n\n${ta[t]} ${na}\n\n${n}`, Qi, $i), K("Actions documented");
7011
7025
  } catch (e) {
7012
7026
  console.error("❌ Error documenting actions", e), process.exit(1);
7013
7027
  }
7014
7028
  }
7015
7029
  //#endregion
7016
7030
  //#region src/actions/documentOpening.ts
7017
- var ea = "<!-- OPENING_START -->", ta = "<!-- OPENING_END -->";
7018
- async function na() {
7031
+ var ia = "<!-- OPENING_START -->", aa = "<!-- OPENING_END -->";
7032
+ async function oa() {
7019
7033
  try {
7020
7034
  G("Document Opening"), q("1️⃣ Insert opening content into 'README.md'");
7021
7035
  let e = await W("package.json"), t = await W("config.json"), { owner: n, repo: r } = Un(e, "document opening");
7022
- await Bn(aa(n, r, ra(e), ia(t)), ea, ta), K("Opening documented");
7036
+ await Bn(la(n, r, sa(e), ca(t)), ia, aa), K("Opening documented");
7023
7037
  } catch (e) {
7024
7038
  console.error("❌ Error documenting opening", e), process.exit(1);
7025
7039
  }
7026
7040
  }
7027
- function ra(e) {
7041
+ function sa(e) {
7028
7042
  let t = e.license;
7029
7043
  if (t == null || t === "") throw Error("package.json 'license' field is required to document opening.");
7030
7044
  return t;
7031
7045
  }
7032
- function ia(e) {
7046
+ function ca(e) {
7033
7047
  let t = e.description.en;
7034
7048
  if (t == null || t.length === 0) throw Error("config.json 'description.en' field is required to document opening.");
7035
7049
  return t;
7036
7050
  }
7037
- function aa(e, t, n, r) {
7051
+ function la(e, t, n, r) {
7038
7052
  let i = `https://github.com/${e}/${t}`;
7039
7053
  return `[![License: ${n}](https://img.shields.io/badge/License-${n.replaceAll("-", "--")}-blue.svg)](./LICENSE)
7040
7054
  [![DPUse version](https://img.shields.io/github/v/release/${e}/${t}?color=f6821f&label=DPUse)](${i}/releases/latest)
@@ -7062,31 +7076,31 @@ ${r}`;
7062
7076
  }
7063
7077
  //#endregion
7064
7078
  //#region src/actions/documentUsage.ts
7065
- var oa = "<!-- USAGE_START -->", sa = "<!-- USAGE_END -->";
7066
- async function ca() {
7079
+ var ua = "<!-- USAGE_START -->", da = "<!-- USAGE_END -->";
7080
+ async function fa() {
7067
7081
  try {
7068
7082
  G("Document Usage"), q("1️⃣ Insert usage content into 'README.md'");
7069
- let e = await W("package.json"), t = la(e);
7070
- await Bn(fa(t, ua(t), da(e.engines?.node), da(e.engines?.npm), da(e.devDependencies?.typescript)), oa, sa), K("Usage documented");
7083
+ let e = await W("package.json"), t = pa(e);
7084
+ await Bn(ga(t, ma(t), ha(e.engines?.node), ha(e.engines?.npm), ha(e.devDependencies?.typescript)), ua, da), K("Usage documented");
7071
7085
  } catch (e) {
7072
7086
  console.error("❌ Error documenting usage", e), process.exit(1);
7073
7087
  }
7074
7088
  }
7075
- function la(e) {
7089
+ function pa(e) {
7076
7090
  let t = e.repository, n = typeof t == "string" ? t : t?.url;
7077
7091
  if (n == null || n === "") throw Error("package.json 'repository' field is required to document usage.");
7078
7092
  return n.replace(/^git\+/, "");
7079
7093
  }
7080
- function ua(e) {
7094
+ function ma(e) {
7081
7095
  return (e.split("/").at(-1) ?? "").replace(/\.git$/, "");
7082
7096
  }
7083
- function da(e) {
7097
+ function ha(e) {
7084
7098
  if (e == null) throw Error("package.json version range is required to document usage.");
7085
7099
  let t = /\d+(?:\.\d+)*/.exec(e);
7086
7100
  if (t == null) throw Error(`Unable to parse version from '${e}'.`);
7087
7101
  return t[0];
7088
7102
  }
7089
- function fa(e, t, n, r, i) {
7103
+ function ga(e, t, n, r, i) {
7090
7104
  return `This connector 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.
7091
7105
 
7092
7106
  You may view or clone this repository for your own purposes, such as building a new, similar connector, though there is currently no process to accept third-party connectors into DPUse at this stage. Cloned or forked code is unsupported and isn't guaranteed to remain compatible with the DPUse Engine as it evolves.
@@ -7101,7 +7115,7 @@ _Requires [Node.js](https://nodejs.org/) ${n} or later, [npm](https://www.npmjs.
7101
7115
  }
7102
7116
  //#endregion
7103
7117
  //#region src/actions/formatCode.ts
7104
- async function pa() {
7118
+ async function _a() {
7105
7119
  try {
7106
7120
  G("Format Code"), await U("1️⃣ Format", "prettier", [
7107
7121
  "--write",
@@ -7116,7 +7130,7 @@ async function pa() {
7116
7130
  }
7117
7131
  //#endregion
7118
7132
  //#region src/actions/lintCode.ts
7119
- async function ma() {
7133
+ async function va() {
7120
7134
  try {
7121
7135
  G("Lint Code"), await U("1️⃣ Lint", "eslint", ["."]), K("Code linted");
7122
7136
  } catch (e) {
@@ -7125,7 +7139,7 @@ async function ma() {
7125
7139
  }
7126
7140
  //#endregion
7127
7141
  //#region src/utilities/cloudflare.ts
7128
- async function ha() {
7142
+ async function ya() {
7129
7143
  let e = await W("config.json"), t = {
7130
7144
  body: JSON.stringify(e),
7131
7145
  headers: { "Content-Type": "application/json" },
@@ -7133,7 +7147,7 @@ async function ha() {
7133
7147
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
7134
7148
  if (!n.ok) throw Error(await n.text());
7135
7149
  }
7136
- async function ga(e, t) {
7150
+ async function ba(e, t) {
7137
7151
  async function n(e, t, r) {
7138
7152
  for (let i of r) {
7139
7153
  let r = `${e}/${i}`, a = `${t}/${i}`;
@@ -7151,7 +7165,7 @@ async function ga(e, t) {
7151
7165
  let r = await Pn(`${e}/${t}/`);
7152
7166
  await n(`${e}/${t}`, t, r);
7153
7167
  }
7154
- async function _a(e) {
7168
+ async function xa(e) {
7155
7169
  let t = e.id, n = {
7156
7170
  body: JSON.stringify(e),
7157
7171
  headers: { "Content-Type": "application/json" },
@@ -7159,7 +7173,7 @@ async function _a(e) {
7159
7173
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
7160
7174
  if (!r.ok) throw Error(await r.text());
7161
7175
  }
7162
- async function va(e, t) {
7176
+ async function Sa(e, t) {
7163
7177
  let n = `v${e.version ?? "unknown"}`;
7164
7178
  async function r(e, r = "") {
7165
7179
  let i = await Pn(e, { withFileTypes: !0 });
@@ -7183,24 +7197,24 @@ async function va(e, t) {
7183
7197
  }
7184
7198
  //#endregion
7185
7199
  //#region node_modules/valibot/dist/index.mjs
7186
- var ya = {
7200
+ var Ca = {
7187
7201
  lang: void 0,
7188
7202
  message: void 0,
7189
7203
  abortEarly: void 0,
7190
7204
  abortPipeEarly: void 0
7191
7205
  };
7192
7206
  /* @__NO_SIDE_EFFECTS__ */
7193
- function ba(e) {
7207
+ function wa(e) {
7194
7208
  return e ? {
7195
7209
  lang: e?.lang ?? void 0,
7196
7210
  message: e?.message,
7197
7211
  abortEarly: e?.abortEarly ?? void 0,
7198
7212
  abortPipeEarly: e?.abortPipeEarly ?? void 0
7199
- } : ya;
7213
+ } : Ca;
7200
7214
  }
7201
7215
  /* @__NO_SIDE_EFFECTS__ */
7202
- function xa(e, t, n) {
7203
- let r = e["~run"]({ value: t }, /* @__PURE__ */ ba(n));
7216
+ function Ta(e, t, n) {
7217
+ let r = e["~run"]({ value: t }, /* @__PURE__ */ wa(n));
7204
7218
  return {
7205
7219
  typed: r.typed,
7206
7220
  success: !r.issues,
@@ -7210,21 +7224,21 @@ function xa(e, t, n) {
7210
7224
  }
7211
7225
  //#endregion
7212
7226
  //#region node_modules/@dpuse/dpuse-shared/dist/dpuse-shared-componentModulePresenter.es.js
7213
- var Sa = Di([
7227
+ var Ea = ji([
7214
7228
  "list",
7215
7229
  "render",
7216
7230
  "setColorMode"
7217
- ]), Ca = /* @__PURE__ */ Q({
7218
- ...Fi,
7219
- typeId: /* @__PURE__ */ yi("presenter"),
7220
- actionNames: /* @__PURE__ */ _i(Sa),
7221
- presentations: /* @__PURE__ */ _i(Ni)
7222
- }), wa = [
7231
+ ]), Da = /* @__PURE__ */ Q({
7232
+ ...zi,
7233
+ typeId: /* @__PURE__ */ Ci("presenter"),
7234
+ actionNames: /* @__PURE__ */ xi(Ea),
7235
+ presentations: /* @__PURE__ */ xi(Li)
7236
+ }), Oa = [
7223
7237
  "1️⃣ ",
7224
7238
  "2️⃣ ",
7225
7239
  "3️⃣ ",
7226
7240
  "4️⃣ "
7227
- ], Ta = [{
7241
+ ], ka = [{
7228
7242
  id: "unit",
7229
7243
  label: "Run unit tests",
7230
7244
  command: "vitest",
@@ -7237,36 +7251,36 @@ var Sa = Di([
7237
7251
  arguments: ["test", "--pass-with-no-tests"],
7238
7252
  configFileName: "playwright.config.ts"
7239
7253
  }];
7240
- async function Ea() {
7254
+ async function Aa() {
7241
7255
  try {
7242
7256
  G("Build Project"), await U("1️⃣ Bundle project", "vite", ["build"]), K("Project built");
7243
7257
  } catch (e) {
7244
7258
  console.error("❌ Error building project", e), process.exit(1);
7245
7259
  }
7246
7260
  }
7247
- async function Da() {
7261
+ async function ja() {
7248
7262
  try {
7249
7263
  G("Publish Project");
7250
7264
  let e = await W("package.json"), t = await W("config.json");
7251
- await Ia("1️⃣ ", e, t, Hn(t.id)), K(`Project version '${e.version ?? "unknown"}' published.`);
7265
+ await Ba("1️⃣ ", e, t, Hn(t.id)), K(`Project version '${e.version ?? "unknown"}' published.`);
7252
7266
  } catch (e) {
7253
7267
  console.error("❌ Error publishing project", e), process.exit(1);
7254
7268
  }
7255
7269
  }
7256
- async function Oa() {
7270
+ async function Ma() {
7257
7271
  try {
7258
7272
  G("Release Project");
7259
7273
  let e = await W("package.json"), t = await W("config.json");
7260
- await Fa("1️⃣ ", e);
7274
+ await za("1️⃣ ", e);
7261
7275
  let n = Hn(t.id);
7262
7276
  switch (n.typeId) {
7263
7277
  case "connector":
7264
- t = await Aa("2️⃣ ", e);
7278
+ t = await Pa("2️⃣ ", e);
7265
7279
  break;
7266
7280
  case "presenter":
7267
- t = await ja("2️⃣ ", e);
7281
+ t = await Fa("2️⃣ ", e);
7268
7282
  break;
7269
- default: t = await ka("2️⃣ ", e);
7283
+ default: t = await Na("2️⃣ ", e);
7270
7284
  }
7271
7285
  await U("3️⃣ Bundle project", "vite", ["build"]), await Fn("4️⃣ Stage changes", "git", ["add", "."]), await Fn("5️⃣ Commit changes", "git", [
7272
7286
  "commit",
@@ -7276,7 +7290,7 @@ async function Oa() {
7276
7290
  "push",
7277
7291
  "origin",
7278
7292
  "main:main"
7279
- ]), await Ia("7️⃣ ", e, t, n), n.publishedTo === "npm" ? await U("8️⃣ Create GitHub release", "gh", [
7293
+ ]), await Ba("7️⃣ ", e, t, n), n.publishedTo === "npm" ? await U("8️⃣ Create GitHub release", "gh", [
7280
7294
  "release",
7281
7295
  "create",
7282
7296
  `v${e.version ?? "unknown"}`,
@@ -7289,39 +7303,39 @@ async function Oa() {
7289
7303
  console.error("❌ Error releasing project", e), process.exit(1);
7290
7304
  }
7291
7305
  }
7292
- async function ka(e, t) {
7306
+ async function Na(e, t) {
7293
7307
  q(`${e} Build project configuration`);
7294
7308
  let n = await W("config.json");
7295
7309
  return t.name != null && (n.id = t.name.replace("@dpuse/", "")), t.version != null && (n.version = t.version), n.icon ??= await Rn("logo.svg"), n.iconDark ??= await Rn("logoDark.svg"), await zn("config.json", n), n;
7296
7310
  }
7297
- async function Aa(e, t) {
7311
+ async function Pa(e, t) {
7298
7312
  q(`${e} Build connector project configuration`);
7299
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ xa(Hi, n);
7313
+ let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Ta(Ki, n);
7300
7314
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7301
7315
  let a = Gn(r);
7302
- return await Ma(t, n, a, Ki(a));
7316
+ return await Ia(t, n, a, Xi(a));
7303
7317
  }
7304
- async function ja(e, t) {
7318
+ async function Fa(e, t) {
7305
7319
  q(`${e} Build presenter project configuration`);
7306
- let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ xa(Ca, n);
7320
+ let [n, r] = await Promise.all([W("config.json"), Ln("src/index.ts")]), i = /* @__PURE__ */ Ta(Da, n);
7307
7321
  if (!i.success) throw console.error("❌ Configuration is invalid:"), console.table(i.issues), Error("Configuration is invalid");
7308
- return await Ma(t, n, Gn(r));
7322
+ return await Ia(t, n, Gn(r));
7309
7323
  }
7310
- async function Ma(e, t, n, r) {
7324
+ async function Ia(e, t, n, r) {
7311
7325
  return n.length > 0 ? (console.info(`ℹ️ Implements ${String(n.length)} operations:`), console.table(n)) : console.warn("⚠️ Implements no operations"), r === "unknown" ? console.warn("⚠️ No usage identified") : r && console.info(`ℹ️ Supports '${r}' usage.`), e.name != null && (t.id = e.name.replace("@dpuse/", "").replace("@dpuse/", "")), e.version != null && (t.version = e.version), t.actionNames = n, r !== void 0 && (t.usageId = r), await zn("config.json", t), t;
7312
7326
  }
7313
- async function Na() {
7327
+ async function La() {
7314
7328
  try {
7315
7329
  G("Synchronise Project with GitHub");
7316
7330
  let e = await W("package.json"), t = await W("config.json");
7317
- switch (await Fa("1️⃣ ", e), Hn(t.id).typeId) {
7331
+ switch (await za("1️⃣ ", e), Hn(t.id).typeId) {
7318
7332
  case "connector":
7319
- await Aa("2️⃣ ", e);
7333
+ await Pa("2️⃣ ", e);
7320
7334
  break;
7321
7335
  case "presenter":
7322
- await ja("2️⃣ ", e);
7336
+ await Fa("2️⃣ ", e);
7323
7337
  break;
7324
- default: await ka("2️⃣ ", e);
7338
+ default: await Na("2️⃣ ", e);
7325
7339
  }
7326
7340
  await Fn("3️⃣ Stage changes", "git", ["add", "."]), await Fn("4️⃣ Commit changes", "git", [
7327
7341
  "commit",
@@ -7336,14 +7350,14 @@ async function Na() {
7336
7350
  console.error("❌ Error synchronising project with GitHub", e), process.exit(1);
7337
7351
  }
7338
7352
  }
7339
- async function Pa(e = ["unit"], t = !1) {
7353
+ async function Ra(e = ["unit"], t = !1) {
7340
7354
  try {
7341
7355
  G("Test Project");
7342
7356
  let n = 0;
7343
- for (let r of Ta) {
7357
+ for (let r of ka) {
7344
7358
  if (!e.includes(r.id) || await Rn(r.configFileName) === null) continue;
7345
7359
  let i = t && r.id === "unit" ? ["--coverage"] : [];
7346
- await U(`${wa[n] ?? ""} ${r.label}`, r.command, [...r.arguments, ...i]), n += 1;
7360
+ await U(`${Oa[n] ?? ""} ${r.label}`, r.command, [...r.arguments, ...i]), n += 1;
7347
7361
  }
7348
7362
  if (n === 0) {
7349
7363
  console.warn("\n⚠️ No tests configured for this project.\n");
@@ -7354,7 +7368,7 @@ async function Pa(e = ["unit"], t = !1) {
7354
7368
  console.error("❌ Error testing project", e), process.exit(1);
7355
7369
  }
7356
7370
  }
7357
- async function Fa(e, t, n = "./") {
7371
+ async function za(e, t, n = "./") {
7358
7372
  if (q(`${e} Bump project version`), t.version == null) t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`);
7359
7373
  else {
7360
7374
  let e = t.version, n = t.version.split(".");
@@ -7362,17 +7376,17 @@ async function Fa(e, t, n = "./") {
7362
7376
  }
7363
7377
  await zn(`${n}package.json`, t);
7364
7378
  }
7365
- async function Ia(e, t, n, r) {
7366
- if (r.typeId === "app") q(`${e} Register module`), await ha();
7367
- else if (r.typeId === "engine") q(`${e} Register module`), await va(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await _a(n);
7379
+ async function Ba(e, t, n, r) {
7380
+ if (r.typeId === "app") q(`${e} Register module`), await ya();
7381
+ else if (r.typeId === "engine") q(`${e} Register module`), await Sa(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await xa(n);
7368
7382
  else if (r.uploadGroupName === void 0) q(`${e} Registration NOT required`);
7369
7383
  else {
7370
7384
  q(`${e} Register module`);
7371
7385
  let i = n.id.split("-").slice(2).join("-");
7372
- await va(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await _a(n);
7386
+ await Sa(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await xa(n);
7373
7387
  }
7374
7388
  }
7375
7389
  //#endregion
7376
- export { Jn as auditDependencies, Ea as buildProject, Yn as checkConfigFiles, nr as checkDependencies, $i as documentActions, dr as documentBundleSizes, Nr as documentDependencies, Qr as documentGovernance, na as documentOpening, ca as documentUsage, pa as formatCode, ma as lintCode, Da as publishProject, Oa as releaseProject, Na as syncProjectWithGitHub, Pa as testProject, ga as uploadDirectoryToR2 };
7390
+ export { Jn as auditDependencies, Aa as buildProject, Yn as checkConfigFiles, nr as checkDependencies, ra as documentActions, dr as documentBundleSizes, Nr as documentDependencies, ei as documentGovernance, oa as documentOpening, fa as documentUsage, _a as formatCode, va as lintCode, ja as publishProject, Ma as releaseProject, La as syncProjectWithGitHub, Ra as testProject, ba as uploadDirectoryToR2 };
7377
7391
 
7378
7392
  //# sourceMappingURL=dpuse-development.es.js.map