@dpuse/dpuse-development 1.0.120 → 1.0.122

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.
package/README.md CHANGED
@@ -76,39 +76,39 @@ This report is updated with each release, from the bundle the release builds, us
76
76
 
77
77
  _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not generate source maps for CSS._
78
78
 
79
- | Chunk/Module/File | Composition |
80
- | :------------------------------------------------------------------------------- | :------------------------------------------ |
81
- | **dist/dpuse-development.es.js** | 64.8 kB · gzip 20.8 kB · 65.5% of the build |
82
- |     src → documentDependencies.ts + 22 more | `██████████████████░░` 88.2% · 57.1 kB |
83
- |         ↳ documentDependencies.ts | `▒▒▒▒░░░░░░░░░░░░░░░░` 17.6% · 11.4 kB |
84
- |         ↳ documentQualitySecurity.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 15.3% · 9.9 kB |
85
- |         ↳ documentBundleSizes.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 13.4% · 8.7 kB |
86
- |         ↳ checkConfigFiles.ts | `▒░░░░░░░░░░░░░░░░░░░` 5.8% · 3.8 kB |
87
- |         ↳ rustCrates.ts | `▒░░░░░░░░░░░░░░░░░░░` 5.3% · 3.4 kB |
88
- |         ↳ cloudflare.ts | `▒░░░░░░░░░░░░░░░░░░░` 4.3% · 2.8 kB |
89
- |         ↳ documentUsage.ts | `▒░░░░░░░░░░░░░░░░░░░` 4.2% · 2.7 kB |
90
- |         ↳ documentOpening.ts | `▒░░░░░░░░░░░░░░░░░░░` 3.1% · 2.0 kB |
91
- |         ↳ auditDependencies.ts | `▒░░░░░░░░░░░░░░░░░░░` 3.1% · 2.0 kB |
92
- |         ↳ checkDependencies.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.7% · 1.8 kB |
93
- |         ↳ documentActions.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.7% · 1.8 kB |
94
- |         ↳ documentContributingLicense.ts | `░░░░░░░░░░░░░░░░░░░░` 1.9% · 1.2 kB |
95
- |         ↳ publishProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% · 1.1 kB |
96
- |         ↳ releaseProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.5% · 972 B |
97
- |         ↳ testProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.2% · 799 B |
98
- |         ↳ 8 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 4.3% · 2.8 kB |
99
- |     (inlined worker) | `░░░░░░░░░░░░░░░░░░░░` 0.0% · 17 B |
100
- |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 11.8% · 7.6 kB |
101
- | **dist/utilities-CjhO3pxf.js** | 23.1 kB · gzip 6.4 kB · 23.4% of the build |
102
- |     @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `██████████░░░░░░░░░░` 50.8% · 11.8 kB |
103
- |     src → index.ts | `███████░░░░░░░░░░░░░` 35.8% · 8.3 kB |
104
- |     valibot → dist/index.mjs | `░░░░░░░░░░░░░░░░░░░░` 1.7% · 413 B |
105
- |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 11.6% · 2.7 kB |
106
- | **dist/apiReference-D4xooSV0.js** | 8.5 kB · gzip 3.1 kB · 8.6% of the build |
107
- |     src → apiReference.ts | `███████████████████░` 95.1% · 8.0 kB |
108
- |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 4.9% · 427 B |
109
- | **dist/vite.es.js** | 2.5 kB · gzip 1.1 kB · 2.5% of the build |
110
- |     src → vite.ts | `█████████████████░░░` 87.0% · 2.2 kB |
111
- |     (bundler output, whitespace & JSON) | `███░░░░░░░░░░░░░░░░░` 13.0% · 334 B |
79
+ | Chunk/Module/File | Composition |
80
+ | :------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------- |
81
+ | **dist/dpuse-development.es.js** | 65.0 kB · gzip 20.9 kB · 65.6% of the build |
82
+ |     src → documentDependencies.ts + 22 more | `██████████████████░░` 88.3% · 57.4 kB |
83
+ |         ↳ documentDependencies.ts | `▒▒▒▒░░░░░░░░░░░░░░░░` 17.5% · 11.4 kB |
84
+ |         ↳ documentQualitySecurity.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 15.2% · 9.9 kB |
85
+ |         ↳ documentBundleSizes.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 13.8% · 9.0 kB |
86
+ |         ↳ checkConfigFiles.ts | `▒░░░░░░░░░░░░░░░░░░░` 5.8% · 3.8 kB |
87
+ |         ↳ rustCrates.ts | `▒░░░░░░░░░░░░░░░░░░░` 5.3% · 3.4 kB |
88
+ |         ↳ cloudflare.ts | `▒░░░░░░░░░░░░░░░░░░░` 4.3% · 2.8 kB |
89
+ |         ↳ documentUsage.ts | `▒░░░░░░░░░░░░░░░░░░░` 4.2% · 2.7 kB |
90
+ |         ↳ documentOpening.ts | `▒░░░░░░░░░░░░░░░░░░░` 3.1% · 2.0 kB |
91
+ |         ↳ auditDependencies.ts | `▒░░░░░░░░░░░░░░░░░░░` 3.0% · 2.0 kB |
92
+ |         ↳ checkDependencies.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.7% · 1.8 kB |
93
+ |         ↳ documentActions.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.7% · 1.8 kB |
94
+ |         ↳ documentContributingLicense.ts | `░░░░░░░░░░░░░░░░░░░░` 1.9% · 1.2 kB |
95
+ |         ↳ publishProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% · 1.1 kB |
96
+ |         ↳ releaseProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.5% · 972 B |
97
+ |         ↳ testProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.2% · 799 B |
98
+ |         ↳ 8 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 4.3% · 2.8 kB |
99
+ |     (inlined worker) | `░░░░░░░░░░░░░░░░░░░░` 0.0% · 17 B |
100
+ |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 11.7% · 7.6 kB |
101
+ | **dist/utilities-CjhO3pxf.js** | 23.1 kB · gzip 6.4 kB · 23.3% of the build |
102
+ |     @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `██████████░░░░░░░░░░` 50.8% · 11.8 kB |
103
+ |     src → index.ts | `███████░░░░░░░░░░░░░` 35.8% · 8.3 kB |
104
+ |     valibot → dist/index.mjs | `░░░░░░░░░░░░░░░░░░░░` 1.7% · 413 B |
105
+ |     (bundler output, whitespace & JSON) | `██░░░░░░░░░░░░░░░░░░` 11.6% · 2.7 kB |
106
+ | **dist/apiReference-D4xooSV0.js** | 8.5 kB · gzip 3.1 kB · 8.5% of the build |
107
+ |     src → apiReference.ts | `███████████████████░` 95.1% · 8.0 kB |
108
+ |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 4.9% · 427 B |
109
+ | **dist/vite.es.js** | 2.5 kB · gzip 1.1 kB · 2.5% of the build |
110
+ |     src → vite.ts | `█████████████████░░░` 87.0% · 2.2 kB |
111
+ |     (bundler output, whitespace & JSON) | `███░░░░░░░░░░░░░░░░░` 13.0% · 334 B |
112
112
 
113
113
  Bars show each row's share of its output file. ↳ rows are part of the row above.
114
114
 
@@ -1073,50 +1073,50 @@ async function kn() {
1073
1073
  }
1074
1074
  //#endregion
1075
1075
  //#region src/actions/documentBundleSizes.ts
1076
- var An = "bundle-analysis-reports/sonda/index.json", jn = "bundle-analysis-reports/sonda/worker.json", Mn = "<!-- BUNDLE_START -->", Nn = "<!-- BUNDLE_END -->", U = "&nbsp;&nbsp;&nbsp;&nbsp;", W = 20, Pn = "█", Fn = "▒", In = 100 / W / 2, Ln = 100 / W, Rn = "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._", zn = "Bars show each row's share of its output file.", Bn = "↳ rows are part of the row above.", Vn = "+ n more = the row also holds n more files from the same package or folder, each no larger than the one named. A package can appear under several output files, each holding different files, never the same file twice.", G = "(bundler output, whitespace & JSON)", K = "(inlined worker)", Hn = `${K} = 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.`, q = "(Rust WebAssembly as base64", Un = `${q}…) = the compiled Rust code, embedded as base64 text, about a third larger than the binary it decodes to, which is the size given.`, Wn = `${G} = 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.`;
1077
- async function Gn(t) {
1076
+ var An = "bundle-analysis-reports/sonda/index.json", jn = "bundle-analysis-reports/sonda/worker.json", Mn = "<!-- BUNDLE_START -->", Nn = "<!-- BUNDLE_END -->", U = "&nbsp;&nbsp;&nbsp;&nbsp;", W = 20, Pn = "█", Fn = "▒", In = 100 / W / 2, Ln = 100 / W, Rn = 48, zn = 16, Bn = "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._", Vn = "Bars show each row's share of its output file.", Hn = "↳ rows are part of the row above.", Un = "+ n more = the row also holds n more files from the same package or folder, each no larger than the one named. A package can appear under several output files, each holding different files, never the same file twice.", G = "(bundler output, whitespace & JSON)", K = "(inlined worker)", Wn = `${K} = 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.`, q = "(Rust WebAssembly as base64", Gn = `${q}…) = the compiled Rust code, embedded as base64 text, about a third larger than the binary it decodes to, which is the size given.`, Kn = `${G} = 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.`;
1077
+ async function qn(t) {
1078
1078
  try {
1079
1079
  s("Document Bundle Sizes"), C("1️⃣ Read bundle analysis report");
1080
1080
  let n = await S(An), r = await e(jn), i = r === null ? void 0 : JSON.parse(r), a = /* @__PURE__ */ new Map();
1081
1081
  for (let t of n.resources) t.kind === "asset" && a.set(t.name, await e(t.name));
1082
1082
  C("2️⃣ Insert table into 'README.md'");
1083
- let o = Kn(n, {
1083
+ let o = Jn(n, {
1084
1084
  assetContents: a,
1085
1085
  isModuleLevel: t?.moduleLevel ?? !1,
1086
1086
  workerJson: i
1087
1087
  }), c = [
1088
- o.includes("↳") ? `${zn} ${Bn}` : zn,
1089
- / \+ \d+ more \|/.test(o) ? Vn : "",
1090
- o.includes(K) ? Hn : "",
1091
- o.includes(q) ? Un : "",
1092
- Wn
1088
+ o.includes("↳") ? `${Vn} ${Hn}` : Vn,
1089
+ / \+ \d+ more \|/.test(o) ? Un : "",
1090
+ o.includes(K) ? Wn : "",
1091
+ o.includes(q) ? Gn : "",
1092
+ Kn
1093
1093
  ].filter((e) => e !== "");
1094
- await _(`## Bundle Analysis\n\n${Rn}\n\n${o}\n\n${c.join("\n\n")}`, Mn, Nn), b("Bundle sizes documented");
1094
+ await _(`## Bundle Analysis\n\n${Bn}\n\n${o}\n\n${c.join("\n\n")}`, Mn, Nn), b("Bundle sizes documented");
1095
1095
  } catch (e) {
1096
1096
  console.error("❌ Error documenting bundle sizes", e), process.exit(1);
1097
1097
  }
1098
1098
  }
1099
- function Kn(e, t) {
1100
- let { assetContents: n, isModuleLevel: r, workerJson: i } = t, a = sr(e), o = i === void 0 ? void 0 : sr(i).values().next().value;
1099
+ function Jn(e, t) {
1100
+ let { assetContents: n, isModuleLevel: r, workerJson: i } = t, a = lr(e), o = i === void 0 ? void 0 : lr(i).values().next().value;
1101
1101
  for (let [e, t] of a) {
1102
1102
  let r = n.get(e);
1103
- r != null && qn(t, r, o);
1103
+ r != null && Yn(t, r, o);
1104
1104
  }
1105
- 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, fr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), l = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
1105
+ 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, mr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), l = ["|Chunk/Module/File|Composition|", "|:------ |:-----------|"];
1106
1106
  for (let [e, t] of c) {
1107
- let n = [...a.get(e) ?? /* @__PURE__ */ new Map()].toSorted(tr), i = n.reduce((e, [, t]) => e + t.sizes.uncompressed, 0), o = i > 0 && s > 0 ? ` · ${gr(i, s)} of the build` : "";
1108
- l.push(`| **${e}** | ${pr(t)}${o} |`, ...nr(n, i, r));
1107
+ let n = [...a.get(e) ?? /* @__PURE__ */ new Map()].toSorted(rr), i = n.reduce((e, [, t]) => e + t.sizes.uncompressed, 0), o = i > 0 && s > 0 ? ` · ${yr(i, s)} of the build` : "";
1108
+ l.push(Z(`**${X(e)}**`, `${hr(t)}${o}`), ...ir(n, i, r));
1109
1109
  }
1110
1110
  return l.join("\n");
1111
1111
  }
1112
- function qn(e, t, n) {
1113
- let r = Jn(t), i = Yn(r ?? ""), a = Yn(t);
1114
- Zn(e, {
1112
+ function Yn(e, t, n) {
1113
+ let r = Xn(t), i = Zn(r ?? ""), a = Zn(t);
1114
+ $n(e, {
1115
1115
  bytes: a.bytes - i.bytes,
1116
1116
  binaryBytes: a.binaryBytes - i.binaryBytes
1117
- }), r !== void 0 && Qn(e, Buffer.byteLength(r), i, n);
1117
+ }), r !== void 0 && er(e, Buffer.byteLength(r), i, n);
1118
1118
  }
1119
- function Jn(e) {
1119
+ function Xn(e) {
1120
1120
  if (!e.includes("new Worker(")) return;
1121
1121
  let t = /encodeURIComponent\((\w+)\)/.exec(e)?.[1];
1122
1122
  if (t === void 0) return;
@@ -1126,21 +1126,21 @@ function Jn(e) {
1126
1126
  for (; a < e.length && e[a] !== r;) a += e[a] === "\\" ? 2 : 1;
1127
1127
  return e.slice(i, a);
1128
1128
  }
1129
- function Yn(e) {
1129
+ function Zn(e) {
1130
1130
  let t = {
1131
1131
  bytes: 0,
1132
1132
  binaryBytes: 0
1133
1133
  };
1134
1134
  for (let n of e.matchAll(/data:application\/wasm;base64,([A-Za-z\d+/]*={0,2})/g)) {
1135
1135
  let e = n[1] ?? "";
1136
- t.bytes += n[0].length, t.binaryBytes += Math.floor(e.length * 3 / 4) - Xn(e);
1136
+ t.bytes += n[0].length, t.binaryBytes += Math.floor(e.length * 3 / 4) - Qn(e);
1137
1137
  }
1138
1138
  return t;
1139
1139
  }
1140
- function Xn(e) {
1140
+ function Qn(e) {
1141
1141
  return e.endsWith("==") ? 2 : +!!e.endsWith("=");
1142
1142
  }
1143
- function Zn(e, t) {
1143
+ function $n(e, t) {
1144
1144
  if (t.bytes <= 0) return;
1145
1145
  let n = [e.get("wasm"), e.get(G)].flatMap((e) => e === void 0 ? [] : e.files.entries().map(([t, n]) => ({
1146
1146
  group: e,
@@ -1148,8 +1148,8 @@ function Zn(e, t) {
1148
1148
  sizes: n
1149
1149
  })).toArray()).find(({ sizes: e }) => e.uncompressed >= t.bytes);
1150
1150
  if (n === void 0) return;
1151
- er(e, n.group, n.fileName, n.sizes, t.bytes);
1152
- let r = `${q}, ${Z(t.binaryBytes)} binary)`;
1151
+ nr(e, n.group, n.fileName, n.sizes, t.bytes);
1152
+ let r = `${q}, ${Q(t.binaryBytes)} binary)`;
1153
1153
  e.set(r, {
1154
1154
  sizes: {
1155
1155
  uncompressed: t.bytes,
@@ -1161,14 +1161,14 @@ function Zn(e, t) {
1161
1161
  }]])
1162
1162
  });
1163
1163
  }
1164
- function Qn(e, t, n, r) {
1164
+ function er(e, t, n, r) {
1165
1165
  let i = e.get(G), a = i?.files.get("");
1166
1166
  if (i === void 0 || a === void 0 || a.uncompressed < t) return;
1167
- er(e, i, "", a, t);
1167
+ nr(e, i, "", a, t);
1168
1168
  let o = r === void 0 ? /* @__PURE__ */ new Map([["", {
1169
1169
  uncompressed: t,
1170
1170
  gzip: 0
1171
- }]]) : $n(r, t, n);
1171
+ }]]) : tr(r, t, n);
1172
1172
  e.set(K, {
1173
1173
  sizes: {
1174
1174
  uncompressed: t,
@@ -1177,44 +1177,44 @@ function Qn(e, t, n, r) {
1177
1177
  files: o
1178
1178
  });
1179
1179
  }
1180
- function $n(e, t, n) {
1181
- Zn(e, n);
1180
+ function tr(e, t, n) {
1181
+ $n(e, n);
1182
1182
  let r = /* @__PURE__ */ new Map();
1183
1183
  for (let [t, n] of e) if (t === "src") for (let [e, t] of n.files) r.set(e, { ...t });
1184
1184
  else {
1185
- let e = n.files.size === 1 ? Y(t, or(n.files)) : t;
1185
+ let e = n.files.size === 1 ? Y(t, cr(n.files)) : t;
1186
1186
  r.set(e, { ...n.sizes });
1187
1187
  }
1188
- let i = r.values().reduce((e, t) => e + t.uncompressed, 0), a = r.get(G) ?? X();
1188
+ let i = r.values().reduce((e, t) => e + t.uncompressed, 0), a = r.get(G) ?? _r();
1189
1189
  return a.uncompressed += Math.max(0, t - i), a.uncompressed > 0 && r.set(G, a), r;
1190
1190
  }
1191
- function er(e, t, n, r, i) {
1191
+ function nr(e, t, n, r, i) {
1192
1192
  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);
1193
1193
  }
1194
- function tr(e, t) {
1194
+ function rr(e, t) {
1195
1195
  return e[0] === G == (t[0] === G) ? t[1].sizes.uncompressed - e[1].sizes.uncompressed : e[0] === G ? 1 : -1;
1196
1196
  }
1197
- function nr(e, t, n) {
1197
+ function ir(e, t, n) {
1198
1198
  let r = [];
1199
1199
  for (let [i, { sizes: a, files: o }] of e) {
1200
1200
  if (o.size === 1) {
1201
- let e = or(o);
1202
- r.push(`| ${U}${Y(i, e)} | ${J(a.uncompressed, t)} |`);
1201
+ let e = cr(o);
1202
+ r.push(Z(`${U}${X(Y(i, e))}`, J(a.uncompressed, t)));
1203
1203
  continue;
1204
1204
  }
1205
- r.push(`| ${U}${ar(i, o)} | ${J(a.uncompressed, t)} |`), n || r.push(...rr(o, t));
1205
+ r.push(Z(`${U}${sr(i, o)}`, J(a.uncompressed, t))), n || r.push(...ar(o, t));
1206
1206
  }
1207
1207
  return r;
1208
1208
  }
1209
- function rr(e, t) {
1210
- let n = [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), r = ir(n, t), i = (r > 0 ? n.slice(0, -r) : n).map(([e, n]) => `| ${U}${U}↳ ${e} | ${J(n.uncompressed, t, Fn)} |`);
1209
+ function ar(e, t) {
1210
+ let n = [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), r = or(n, t), i = (r > 0 ? n.slice(0, -r) : n).map(([e, n]) => Z(`${U}${U}↳ ${X(e)}`, J(n.uncompressed, t, Fn)));
1211
1211
  if (r > 0) {
1212
1212
  let e = n.slice(-r).reduce((e, [, t]) => e + t.uncompressed, 0);
1213
- i.push(`| ${U}${U}↳ ${String(r)} smaller files | ${J(e, t, Fn)} |`);
1213
+ i.push(Z(`${U}${U}↳ ${String(r)} smaller files`, J(e, t, Fn)));
1214
1214
  }
1215
1215
  return i;
1216
1216
  }
1217
- function ir(e, t) {
1217
+ function or(e, t) {
1218
1218
  if (t <= 0) return 0;
1219
1219
  let n = 0, r = 0;
1220
1220
  for (let [, i] of e.toReversed()) {
@@ -1225,41 +1225,49 @@ function ir(e, t) {
1225
1225
  return n >= 2 ? n : 0;
1226
1226
  }
1227
1227
  function J(e, t, n = Pn) {
1228
- return `${mr(t > 0 ? e / t * 100 : 0, n)} · ${Z(e)}`;
1228
+ return `${gr(t > 0 ? e / t * 100 : 0, n)} · ${Q(e)}`;
1229
1229
  }
1230
1230
  function Y(e, t) {
1231
1231
  return t === "" ? e : `${e} → ${t}`;
1232
1232
  }
1233
- function ar(e, t) {
1233
+ function sr(e, t) {
1234
1234
  if (e === K) return e;
1235
1235
  let [n] = [...t].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed)[0] ?? [""];
1236
- return `${Y(e, n)} + ${String(t.size - 1)} more`;
1236
+ return `${X(Y(e, n))} + ${String(t.size - 1)} more`;
1237
+ }
1238
+ function X(e) {
1239
+ if (e.length <= Rn) return e;
1240
+ let t = `${e.slice(0, zn)}…${e.slice(e.length - 31)}`;
1241
+ return `<abbr title="${e.replaceAll("&", "&amp;").replaceAll("\"", "&quot;")}">${t}</abbr>`;
1242
+ }
1243
+ function Z(e, t) {
1244
+ return `| ${e} | ${t.replaceAll(" ", "&nbsp;")} |`;
1237
1245
  }
1238
- function or(e) {
1246
+ function cr(e) {
1239
1247
  let [t] = e.keys();
1240
1248
  if (t === void 0) throw Error("Expected exactly one file");
1241
1249
  return t;
1242
1250
  }
1243
- function sr(e) {
1244
- let t = cr(e.dependencies), n = /* @__PURE__ */ new Map();
1251
+ function lr(e) {
1252
+ let t = ur(e.dependencies), n = /* @__PURE__ */ new Map();
1245
1253
  for (let r of e.resources) {
1246
1254
  if (r.kind !== "chunk" || !r.parent) continue;
1247
- let { group: e, file: i } = lr(r.name, t), a = fr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
1255
+ let { group: e, file: i } = dr(r.name, t), a = mr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
1248
1256
  n.set(r.parent, o);
1249
1257
  let s = o.get(e) ?? {
1250
- sizes: X(),
1258
+ sizes: _r(),
1251
1259
  files: /* @__PURE__ */ new Map()
1252
1260
  };
1253
- o.set(e, s), hr(s.sizes, a);
1254
- let c = s.files.get(i) ?? X();
1255
- s.files.set(i, c), hr(c, a);
1261
+ o.set(e, s), vr(s.sizes, a);
1262
+ let c = s.files.get(i) ?? _r();
1263
+ s.files.set(i, c), vr(c, a);
1256
1264
  }
1257
1265
  return n;
1258
1266
  }
1259
- function cr(e) {
1267
+ function ur(e) {
1260
1268
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
1261
1269
  }
1262
- function lr(e, t) {
1270
+ function dr(e, t) {
1263
1271
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
1264
1272
  if (n) {
1265
1273
  let [t, r] = n;
@@ -1276,53 +1284,53 @@ function lr(e, t) {
1276
1284
  file: e.slice(1)
1277
1285
  } : e.startsWith("rust/") ? {
1278
1286
  group: "wasm",
1279
- file: ur(e)
1287
+ file: fr(e)
1280
1288
  } : {
1281
1289
  group: "src",
1282
- file: dr(e)
1290
+ file: pr(e)
1283
1291
  };
1284
1292
  }
1285
- function ur(e) {
1286
- let t = e.split("/", 2)[1] ?? "", n = dr(e);
1293
+ function fr(e) {
1294
+ let t = e.split("/", 2)[1] ?? "", n = pr(e);
1287
1295
  return t !== "" && n.startsWith(t) ? `…${n.slice(t.length)}` : n;
1288
1296
  }
1289
- function dr(e) {
1297
+ function pr(e) {
1290
1298
  return e.split("/").at(-1) ?? e;
1291
1299
  }
1292
- function fr(e) {
1300
+ function mr(e) {
1293
1301
  return {
1294
1302
  uncompressed: e.uncompressed,
1295
1303
  gzip: e.gzip ?? 0
1296
1304
  };
1297
1305
  }
1298
- function pr(e) {
1299
- return `${Z(e.uncompressed)} · gzip ${Z(e.gzip)}`;
1306
+ function hr(e) {
1307
+ return `${Q(e.uncompressed)} · gzip ${Q(e.gzip)}`;
1300
1308
  }
1301
- function mr(e, t = Pn) {
1309
+ function gr(e, t = Pn) {
1302
1310
  let n = Math.round(e / 100 * W);
1303
1311
  return `\`${t.repeat(n)}${"░".repeat(W - n)}\` ${e.toFixed(1)}%`;
1304
1312
  }
1305
- function X() {
1313
+ function _r() {
1306
1314
  return {
1307
1315
  uncompressed: 0,
1308
1316
  gzip: 0
1309
1317
  };
1310
1318
  }
1311
- function hr(e, t) {
1319
+ function vr(e, t) {
1312
1320
  e.uncompressed += t.uncompressed, e.gzip += t.gzip;
1313
1321
  }
1314
- function gr(e, t) {
1322
+ function yr(e, t) {
1315
1323
  return `${(e / t * 100).toFixed(1)}%`;
1316
1324
  }
1317
- function Z(e) {
1325
+ function Q(e) {
1318
1326
  return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
1319
1327
  }
1320
1328
  //#endregion
1321
1329
  //#region src/actions/documentProject.ts
1322
- async function _r(t = "MIT", n = !1) {
1330
+ async function br(t = "MIT", n = !1) {
1323
1331
  try {
1324
1332
  let r = await S("config.json"), i = m(r.id).typeId === "connector";
1325
- await Bt(), i && await Ge(), await wn(), await ft(t), await e("bundle-analysis-reports/sonda/index.json") === null ? C(`ℹ️ Bundle sizes NOT documented, as there is no '${An}' yet. Build the project first.`) : await Gn({ moduleLevel: n }), await rn(), await Ke();
1333
+ await Bt(), i && await Ge(), await wn(), await ft(t), await e("bundle-analysis-reports/sonda/index.json") === null ? C(`ℹ️ Bundle sizes NOT documented, as there is no '${An}' yet. Build the project first.`) : await qn({ moduleLevel: n }), await rn(), await Ke();
1326
1334
  let a = await e(H) !== null;
1327
1335
  a ? await kn() : C(`ℹ️ '${H}' NOT required by this project`), await o("ℹ️ Format generated files", "prettier", [
1328
1336
  "--write",
@@ -1335,7 +1343,7 @@ async function _r(t = "MIT", n = !1) {
1335
1343
  }
1336
1344
  //#endregion
1337
1345
  //#region src/actions/formatCode.ts
1338
- async function vr() {
1346
+ async function xr() {
1339
1347
  try {
1340
1348
  s("Format Code");
1341
1349
  let e = [
@@ -1356,7 +1364,7 @@ async function vr() {
1356
1364
  }
1357
1365
  //#endregion
1358
1366
  //#region src/actions/lintCode.ts
1359
- async function yr() {
1367
+ async function Sr() {
1360
1368
  try {
1361
1369
  s("Lint Code"), await o("1️⃣ Lint", "eslint", ["."]), b("Code linted");
1362
1370
  } catch (e) {
@@ -1365,7 +1373,7 @@ async function yr() {
1365
1373
  }
1366
1374
  //#endregion
1367
1375
  //#region src/utilities/cloudflare.ts
1368
- var br = "dpuse-sample-data-eu", xr = {
1376
+ var Cr = "dpuse-sample-data-eu", wr = {
1369
1377
  bin: "application/octet-stream",
1370
1378
  csv: "text/csv",
1371
1379
  json: "application/json",
@@ -1376,7 +1384,7 @@ var br = "dpuse-sample-data-eu", xr = {
1376
1384
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1377
1385
  xml: "application/xml"
1378
1386
  };
1379
- async function Sr() {
1387
+ async function Tr() {
1380
1388
  let e = await S("config.json"), t = {
1381
1389
  body: JSON.stringify(e),
1382
1390
  headers: { "Content-Type": "application/json" },
@@ -1384,12 +1392,12 @@ async function Sr() {
1384
1392
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
1385
1393
  if (!n.ok) throw Error(await n.text());
1386
1394
  }
1387
- async function Q(e, t) {
1388
- let n = await Er(`${e}/${t}`, t), r = Map.groupBy(n, ({ key: e }) => Dr(e));
1389
- for (let [e, t] of r) await Tr(t, ["--content-type", e]);
1395
+ async function $(e, t) {
1396
+ let n = await Ar(`${e}/${t}`, t), r = Map.groupBy(n, ({ key: e }) => jr(e));
1397
+ for (let [e, t] of r) await kr(t, ["--content-type", e]);
1390
1398
  }
1391
- async function Cr(e) {
1392
- await Q(e, "application"), await Q(e, "fileStore"), await Tr(["applicationIndex.json", "fileStoreIndex.json"].map((t) => ({
1399
+ async function Er(e) {
1400
+ await $(e, "application"), await $(e, "fileStore"), await kr(["applicationIndex.json", "fileStoreIndex.json"].map((t) => ({
1393
1401
  file: `${e}/${t}`,
1394
1402
  key: t
1395
1403
  })), [
@@ -1399,7 +1407,7 @@ async function Cr(e) {
1399
1407
  "no-cache"
1400
1408
  ]);
1401
1409
  }
1402
- async function $(e) {
1410
+ async function Dr(e) {
1403
1411
  let t = e.id, n = {
1404
1412
  body: JSON.stringify(e),
1405
1413
  headers: { "Content-Type": "application/json" },
@@ -1407,7 +1415,7 @@ async function $(e) {
1407
1415
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
1408
1416
  if (!r.ok) throw Error(await r.text());
1409
1417
  }
1410
- async function wr(e, t) {
1418
+ async function Or(e, t) {
1411
1419
  let n = `v${e.version ?? "unknown"}`;
1412
1420
  async function r(e, r = "") {
1413
1421
  let i = await ee(e, { withFileTypes: !0 });
@@ -1429,7 +1437,7 @@ async function wr(e, t) {
1429
1437
  }
1430
1438
  await r("dist");
1431
1439
  }
1432
- async function Tr(e, t) {
1440
+ async function kr(e, t) {
1433
1441
  if (e.length === 0) return;
1434
1442
  let n = await w.mkdtemp(T.join(ge.tmpdir(), "dpuse-r2-bulk-")), r = T.join(n, "files.json");
1435
1443
  try {
@@ -1437,7 +1445,7 @@ async function Tr(e, t) {
1437
1445
  "r2",
1438
1446
  "bulk",
1439
1447
  "put",
1440
- br,
1448
+ Cr,
1441
1449
  "--filename",
1442
1450
  r,
1443
1451
  ...t,
@@ -1451,28 +1459,28 @@ async function Tr(e, t) {
1451
1459
  });
1452
1460
  }
1453
1461
  }
1454
- async function Er(e, t) {
1462
+ async function Ar(e, t) {
1455
1463
  let n = await ee(e), r = [];
1456
1464
  for (let i of n) {
1457
1465
  if (i.startsWith(".")) continue;
1458
1466
  let n = `${e}/${i}`, a = `${t}/${i}`;
1459
- (await p(n)).isDirectory() ? r.push(...await Er(n, a)) : r.push({
1467
+ (await p(n)).isDirectory() ? r.push(...await Ar(n, a)) : r.push({
1460
1468
  file: n,
1461
1469
  key: a
1462
1470
  });
1463
1471
  }
1464
1472
  return r;
1465
1473
  }
1466
- function Dr(e) {
1474
+ function jr(e) {
1467
1475
  let t = e.slice(e.lastIndexOf("/") + 1), n = t.lastIndexOf(".");
1468
1476
  if (n === -1) return t === "LICENSE" ? "text/plain" : "application/octet-stream";
1469
- let r = xr[t.slice(n + 1).toLowerCase()];
1477
+ let r = wr[t.slice(n + 1).toLowerCase()];
1470
1478
  if (r === void 0) throw Error(`No content type for '${e}'. Add its extension to 'SAMPLE_DATA_CONTENT_TYPES'.`);
1471
1479
  return r;
1472
1480
  }
1473
1481
  //#endregion
1474
1482
  //#region src/actions/publishProject.ts
1475
- async function Or() {
1483
+ async function Mr() {
1476
1484
  try {
1477
1485
  s("Publish Project");
1478
1486
  let e = await S("package.json"), t = await S("config.json"), n = m(t.id);
@@ -1482,30 +1490,30 @@ async function Or() {
1482
1490
  "app",
1483
1491
  "kb"
1484
1492
  ].includes(n.publishedTo);
1485
- r && await o("2️⃣ Deploy", "npm", ["run", "deploy"]), await kr(r ? "3️⃣ " : "2️⃣ ", e, t, n), n.publishedTo === "sampleData" && (C("3️⃣ Upload sample data"), await Cr("public")), b(`Project version '${e.version ?? "unknown"}' published.`);
1493
+ r && await o("2️⃣ Deploy", "npm", ["run", "deploy"]), await Nr(r ? "3️⃣ " : "2️⃣ ", e, t, n), n.publishedTo === "sampleData" && (C("3️⃣ Upload sample data"), await Er("public")), b(`Project version '${e.version ?? "unknown"}' published.`);
1486
1494
  } catch (e) {
1487
1495
  console.error("❌ Error publishing project", e), process.exit(1);
1488
1496
  }
1489
1497
  }
1490
- async function kr(e, t, n, r) {
1491
- if (r.typeId === "app") C(`${e} Register module`), await Sr();
1492
- else if (r.typeId === "engine") C(`${e} Register module`), await wr(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await $(n);
1498
+ async function Nr(e, t, n, r) {
1499
+ if (r.typeId === "app") C(`${e} Register module`), await Tr();
1500
+ else if (r.typeId === "engine") C(`${e} Register module`), await Or(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await Dr(n);
1493
1501
  else if (r.uploadGroupName === void 0) C(`${e} Registration NOT required`);
1494
1502
  else {
1495
1503
  C(`${e} Register module`);
1496
1504
  let i = n.id.split("-").slice(2).join("-");
1497
- await wr(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await $(n);
1505
+ await Or(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await Dr(n);
1498
1506
  }
1499
1507
  }
1500
1508
  //#endregion
1501
1509
  //#region src/actions/releaseProject.ts
1502
- async function Ar(e = "MIT", t = !1) {
1510
+ async function Pr(e = "MIT", t = !1) {
1503
1511
  try {
1504
1512
  s("Release Project");
1505
1513
  let n = await S("package.json"), r = await S("config.json"), i = m(r.id);
1506
1514
  await d("1️⃣ ", n);
1507
1515
  let a = await oe("2️⃣ ", n, i);
1508
- if (await Ee("3️⃣ ", n), C("4️⃣ Regenerate README"), await _r(e, t), await y("5️⃣ Stage changes", "git", ["add", "."]), await y("6️⃣ Commit changes", "git", [
1516
+ if (await Ee("3️⃣ ", n), C("4️⃣ Regenerate README"), await br(e, t), await y("5️⃣ Stage changes", "git", ["add", "."]), await y("6️⃣ Commit changes", "git", [
1509
1517
  "commit",
1510
1518
  "-m",
1511
1519
  `v${n.version ?? "unknown"}`
@@ -1513,7 +1521,7 @@ async function Ar(e = "MIT", t = !1) {
1513
1521
  "push",
1514
1522
  "origin",
1515
1523
  "main:main"
1516
- ]), await kr("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1524
+ ]), await Nr("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1517
1525
  let e = `v${n.version ?? "unknown"}`;
1518
1526
  await o("9️⃣ Trigger GitHub release", "gh", [
1519
1527
  "release",
@@ -1532,7 +1540,7 @@ async function Ar(e = "MIT", t = !1) {
1532
1540
  }
1533
1541
  //#endregion
1534
1542
  //#region src/actions/syncProjectWithGitHub.ts
1535
- async function jr() {
1543
+ async function Fr() {
1536
1544
  try {
1537
1545
  s("Synchronise Project with GitHub");
1538
1546
  let e = await S("package.json"), t = await S("config.json"), n = m(t.id);
@@ -1551,12 +1559,12 @@ async function jr() {
1551
1559
  }
1552
1560
  //#endregion
1553
1561
  //#region src/actions/testProject.ts
1554
- var Mr = [
1562
+ var Ir = [
1555
1563
  "1️⃣ ",
1556
1564
  "2️⃣ ",
1557
1565
  "3️⃣ ",
1558
1566
  "4️⃣ "
1559
- ], Nr = [{
1567
+ ], Lr = [{
1560
1568
  id: "unit",
1561
1569
  label: "Run unit tests",
1562
1570
  command: "vitest",
@@ -1569,13 +1577,13 @@ var Mr = [
1569
1577
  arguments: ["test", "--pass-with-no-tests"],
1570
1578
  configFileName: "playwright.config.ts"
1571
1579
  }];
1572
- async function Pr(t = ["unit"]) {
1580
+ async function Rr(t = ["unit"]) {
1573
1581
  try {
1574
1582
  s("Test Project");
1575
1583
  let n = 0;
1576
- for (let r of Nr) {
1584
+ for (let r of Lr) {
1577
1585
  if (!t.includes(r.id) || await e(r.configFileName) === null) continue;
1578
- let i = `${Mr[n] ?? ""} ${r.label}`;
1586
+ let i = `${Ir[n] ?? ""} ${r.label}`;
1579
1587
  await o(i, r.command, r.arguments), n += 1;
1580
1588
  }
1581
1589
  if (n === 0) {
@@ -1589,7 +1597,7 @@ async function Pr(t = ["unit"]) {
1589
1597
  }
1590
1598
  //#endregion
1591
1599
  //#region src/actions/triggerGitHubRelease.ts
1592
- async function Fr() {
1600
+ async function zr() {
1593
1601
  try {
1594
1602
  s("Trigger GitHub Release");
1595
1603
  let e = `v${(await S("package.json")).version ?? "unknown"}`;
@@ -1607,4 +1615,4 @@ async function Fr() {
1607
1615
  }
1608
1616
  }
1609
1617
  //#endregion
1610
- export { ye as auditDependencies, Te as buildProject, ze as checkProject, _r as documentProject, vr as formatCode, yr as lintCode, Or as publishProject, Ar as releaseProject, jr as syncProjectWithGitHub, Pr as testProject, Fr as triggerGitHubRelease, Q as uploadDirectoryToR2 };
1618
+ export { ye as auditDependencies, Te as buildProject, ze as checkProject, br as documentProject, xr as formatCode, Sr as lintCode, Mr as publishProject, Pr as releaseProject, Fr as syncProjectWithGitHub, Rr as testProject, zr as triggerGitHubRelease, $ as uploadDirectoryToR2 };