@dpuse/dpuse-development 1.0.121 → 1.0.123

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.1 kB · gzip 21.0 kB · 65.6% of the build |
82
+ |     src → documentDependencies.ts + 22 more | `██████████████████░░` 88.3% · 57.5 kB |
83
+ |         ↳ documentDependencies.ts | `▒▒▒▒░░░░░░░░░░░░░░░░` 17.5% · 11.4 kB |
84
+ |         ↳ documentQualitySecurity.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 15.2% · 9.9 kB |
85
+ |         ↳ documentBundleSizes.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 13.9% · 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 = "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._", Bn = "Bars show each row's share of its output file.", Vn = "↳ rows are part of the row above.", Hn = "+ 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)", Un = `${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", Wn = `${q}…) = the compiled Rust code, embedded as base64 text, about a third larger than the binary it decodes to, which is the size given.`, Gn = `${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 Kn(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 = qn(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("↳") ? `${Bn} ${Vn}` : Bn,
1089
+ / \+ \d+ more \|/.test(o) ? Hn : "",
1090
+ o.includes(K) ? Un : "",
1091
+ o.includes(q) ? Wn : "",
1092
+ Gn
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${zn}\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 qn(e, t) {
1100
+ let { assetContents: n, isModuleLevel: r, workerJson: i } = t, a = cr(e), o = i === void 0 ? void 0 : cr(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 && Jn(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, pr(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(nr), i = n.reduce((e, [, t]) => e + t.sizes.uncompressed, 0), o = i > 0 && s > 0 ? ` · ${vr(i, s)} of the build` : "";
1108
+ l.push(Z(`**${X(e)}**`, `${mr(t)}${o}`), ...rr(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 Jn(e, t, n) {
1113
+ let r = Yn(t), i = Xn(r ?? ""), a = Xn(t);
1114
+ Qn(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 && $n(e, Buffer.byteLength(r), i, n);
1118
1118
  }
1119
- function Jn(e) {
1119
+ function Yn(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 Xn(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) - Zn(e);
1137
1137
  }
1138
1138
  return t;
1139
1139
  }
1140
- function Xn(e) {
1140
+ function Zn(e) {
1141
1141
  return e.endsWith("==") ? 2 : +!!e.endsWith("=");
1142
1142
  }
1143
- function Zn(e, t) {
1143
+ function Qn(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
+ tr(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 $n(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
+ tr(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
+ }]]) : er(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 er(e, t, n) {
1181
+ Qn(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, sr(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) ?? gr();
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 tr(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 nr(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 rr(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 = sr(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}${or(i, o)}`, J(a.uncompressed, t))), n || r.push(...ir(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 ir(e, t) {
1210
+ let n = [...e].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), r = ar(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 ar(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,48 @@ 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 `${hr(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 or(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
+ let t = e.indexOf(" → "), n = t === -1 ? "" : e.slice(0, t + 3), r = e.slice(n.length), i = Math.max(Rn - n.length, 2);
1240
+ return r.length > i ? `${n}<abbr title="${r.replaceAll("&", "&amp;").replaceAll("\"", "&quot;")}">…${r.slice(r.length - (i - 1))}</abbr>` : e;
1237
1241
  }
1238
- function or(e) {
1242
+ function Z(e, t) {
1243
+ return `| ${e} | ${t.replaceAll(" ", "&nbsp;")} |`;
1244
+ }
1245
+ function sr(e) {
1239
1246
  let [t] = e.keys();
1240
1247
  if (t === void 0) throw Error("Expected exactly one file");
1241
1248
  return t;
1242
1249
  }
1243
- function sr(e) {
1244
- let t = cr(e.dependencies), n = /* @__PURE__ */ new Map();
1250
+ function cr(e) {
1251
+ let t = lr(e.dependencies), n = /* @__PURE__ */ new Map();
1245
1252
  for (let r of e.resources) {
1246
1253
  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();
1254
+ let { group: e, file: i } = ur(r.name, t), a = pr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
1248
1255
  n.set(r.parent, o);
1249
1256
  let s = o.get(e) ?? {
1250
- sizes: X(),
1257
+ sizes: gr(),
1251
1258
  files: /* @__PURE__ */ new Map()
1252
1259
  };
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);
1260
+ o.set(e, s), _r(s.sizes, a);
1261
+ let c = s.files.get(i) ?? gr();
1262
+ s.files.set(i, c), _r(c, a);
1256
1263
  }
1257
1264
  return n;
1258
1265
  }
1259
- function cr(e) {
1266
+ function lr(e) {
1260
1267
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
1261
1268
  }
1262
- function lr(e, t) {
1269
+ function ur(e, t) {
1263
1270
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
1264
1271
  if (n) {
1265
1272
  let [t, r] = n;
@@ -1276,53 +1283,53 @@ function lr(e, t) {
1276
1283
  file: e.slice(1)
1277
1284
  } : e.startsWith("rust/") ? {
1278
1285
  group: "wasm",
1279
- file: ur(e)
1286
+ file: dr(e)
1280
1287
  } : {
1281
1288
  group: "src",
1282
- file: dr(e)
1289
+ file: fr(e)
1283
1290
  };
1284
1291
  }
1285
- function ur(e) {
1286
- let t = e.split("/", 2)[1] ?? "", n = dr(e);
1292
+ function dr(e) {
1293
+ let t = e.split("/", 2)[1] ?? "", n = fr(e);
1287
1294
  return t !== "" && n.startsWith(t) ? `…${n.slice(t.length)}` : n;
1288
1295
  }
1289
- function dr(e) {
1296
+ function fr(e) {
1290
1297
  return e.split("/").at(-1) ?? e;
1291
1298
  }
1292
- function fr(e) {
1299
+ function pr(e) {
1293
1300
  return {
1294
1301
  uncompressed: e.uncompressed,
1295
1302
  gzip: e.gzip ?? 0
1296
1303
  };
1297
1304
  }
1298
- function pr(e) {
1299
- return `${Z(e.uncompressed)} · gzip ${Z(e.gzip)}`;
1305
+ function mr(e) {
1306
+ return `${Q(e.uncompressed)} · gzip ${Q(e.gzip)}`;
1300
1307
  }
1301
- function mr(e, t = Pn) {
1308
+ function hr(e, t = Pn) {
1302
1309
  let n = Math.round(e / 100 * W);
1303
1310
  return `\`${t.repeat(n)}${"░".repeat(W - n)}\` ${e.toFixed(1)}%`;
1304
1311
  }
1305
- function X() {
1312
+ function gr() {
1306
1313
  return {
1307
1314
  uncompressed: 0,
1308
1315
  gzip: 0
1309
1316
  };
1310
1317
  }
1311
- function hr(e, t) {
1318
+ function _r(e, t) {
1312
1319
  e.uncompressed += t.uncompressed, e.gzip += t.gzip;
1313
1320
  }
1314
- function gr(e, t) {
1321
+ function vr(e, t) {
1315
1322
  return `${(e / t * 100).toFixed(1)}%`;
1316
1323
  }
1317
- function Z(e) {
1324
+ function Q(e) {
1318
1325
  return e < 1024 ? `${String(e)} B` : `${(e / 1024).toFixed(1)} kB`;
1319
1326
  }
1320
1327
  //#endregion
1321
1328
  //#region src/actions/documentProject.ts
1322
- async function _r(t = "MIT", n = !1) {
1329
+ async function yr(t = "MIT", n = !1) {
1323
1330
  try {
1324
1331
  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();
1332
+ 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 Kn({ moduleLevel: n }), await rn(), await Ke();
1326
1333
  let a = await e(H) !== null;
1327
1334
  a ? await kn() : C(`ℹ️ '${H}' NOT required by this project`), await o("ℹ️ Format generated files", "prettier", [
1328
1335
  "--write",
@@ -1335,7 +1342,7 @@ async function _r(t = "MIT", n = !1) {
1335
1342
  }
1336
1343
  //#endregion
1337
1344
  //#region src/actions/formatCode.ts
1338
- async function vr() {
1345
+ async function br() {
1339
1346
  try {
1340
1347
  s("Format Code");
1341
1348
  let e = [
@@ -1356,7 +1363,7 @@ async function vr() {
1356
1363
  }
1357
1364
  //#endregion
1358
1365
  //#region src/actions/lintCode.ts
1359
- async function yr() {
1366
+ async function xr() {
1360
1367
  try {
1361
1368
  s("Lint Code"), await o("1️⃣ Lint", "eslint", ["."]), b("Code linted");
1362
1369
  } catch (e) {
@@ -1365,7 +1372,7 @@ async function yr() {
1365
1372
  }
1366
1373
  //#endregion
1367
1374
  //#region src/utilities/cloudflare.ts
1368
- var br = "dpuse-sample-data-eu", xr = {
1375
+ var Sr = "dpuse-sample-data-eu", Cr = {
1369
1376
  bin: "application/octet-stream",
1370
1377
  csv: "text/csv",
1371
1378
  json: "application/json",
@@ -1376,7 +1383,7 @@ var br = "dpuse-sample-data-eu", xr = {
1376
1383
  xlsx: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
1377
1384
  xml: "application/xml"
1378
1385
  };
1379
- async function Sr() {
1386
+ async function wr() {
1380
1387
  let e = await S("config.json"), t = {
1381
1388
  body: JSON.stringify(e),
1382
1389
  headers: { "Content-Type": "application/json" },
@@ -1384,12 +1391,12 @@ async function Sr() {
1384
1391
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
1385
1392
  if (!n.ok) throw Error(await n.text());
1386
1393
  }
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]);
1394
+ async function $(e, t) {
1395
+ let n = await kr(`${e}/${t}`, t), r = Map.groupBy(n, ({ key: e }) => Ar(e));
1396
+ for (let [e, t] of r) await Or(t, ["--content-type", e]);
1390
1397
  }
1391
- async function Cr(e) {
1392
- await Q(e, "application"), await Q(e, "fileStore"), await Tr(["applicationIndex.json", "fileStoreIndex.json"].map((t) => ({
1398
+ async function Tr(e) {
1399
+ await $(e, "application"), await $(e, "fileStore"), await Or(["applicationIndex.json", "fileStoreIndex.json"].map((t) => ({
1393
1400
  file: `${e}/${t}`,
1394
1401
  key: t
1395
1402
  })), [
@@ -1399,7 +1406,7 @@ async function Cr(e) {
1399
1406
  "no-cache"
1400
1407
  ]);
1401
1408
  }
1402
- async function $(e) {
1409
+ async function Er(e) {
1403
1410
  let t = e.id, n = {
1404
1411
  body: JSON.stringify(e),
1405
1412
  headers: { "Content-Type": "application/json" },
@@ -1407,7 +1414,7 @@ async function $(e) {
1407
1414
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
1408
1415
  if (!r.ok) throw Error(await r.text());
1409
1416
  }
1410
- async function wr(e, t) {
1417
+ async function Dr(e, t) {
1411
1418
  let n = `v${e.version ?? "unknown"}`;
1412
1419
  async function r(e, r = "") {
1413
1420
  let i = await ee(e, { withFileTypes: !0 });
@@ -1429,7 +1436,7 @@ async function wr(e, t) {
1429
1436
  }
1430
1437
  await r("dist");
1431
1438
  }
1432
- async function Tr(e, t) {
1439
+ async function Or(e, t) {
1433
1440
  if (e.length === 0) return;
1434
1441
  let n = await w.mkdtemp(T.join(ge.tmpdir(), "dpuse-r2-bulk-")), r = T.join(n, "files.json");
1435
1442
  try {
@@ -1437,7 +1444,7 @@ async function Tr(e, t) {
1437
1444
  "r2",
1438
1445
  "bulk",
1439
1446
  "put",
1440
- br,
1447
+ Sr,
1441
1448
  "--filename",
1442
1449
  r,
1443
1450
  ...t,
@@ -1451,28 +1458,28 @@ async function Tr(e, t) {
1451
1458
  });
1452
1459
  }
1453
1460
  }
1454
- async function Er(e, t) {
1461
+ async function kr(e, t) {
1455
1462
  let n = await ee(e), r = [];
1456
1463
  for (let i of n) {
1457
1464
  if (i.startsWith(".")) continue;
1458
1465
  let n = `${e}/${i}`, a = `${t}/${i}`;
1459
- (await p(n)).isDirectory() ? r.push(...await Er(n, a)) : r.push({
1466
+ (await p(n)).isDirectory() ? r.push(...await kr(n, a)) : r.push({
1460
1467
  file: n,
1461
1468
  key: a
1462
1469
  });
1463
1470
  }
1464
1471
  return r;
1465
1472
  }
1466
- function Dr(e) {
1473
+ function Ar(e) {
1467
1474
  let t = e.slice(e.lastIndexOf("/") + 1), n = t.lastIndexOf(".");
1468
1475
  if (n === -1) return t === "LICENSE" ? "text/plain" : "application/octet-stream";
1469
- let r = xr[t.slice(n + 1).toLowerCase()];
1476
+ let r = Cr[t.slice(n + 1).toLowerCase()];
1470
1477
  if (r === void 0) throw Error(`No content type for '${e}'. Add its extension to 'SAMPLE_DATA_CONTENT_TYPES'.`);
1471
1478
  return r;
1472
1479
  }
1473
1480
  //#endregion
1474
1481
  //#region src/actions/publishProject.ts
1475
- async function Or() {
1482
+ async function jr() {
1476
1483
  try {
1477
1484
  s("Publish Project");
1478
1485
  let e = await S("package.json"), t = await S("config.json"), n = m(t.id);
@@ -1482,30 +1489,30 @@ async function Or() {
1482
1489
  "app",
1483
1490
  "kb"
1484
1491
  ].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.`);
1492
+ r && await o("2️⃣ Deploy", "npm", ["run", "deploy"]), await Mr(r ? "3️⃣ " : "2️⃣ ", e, t, n), n.publishedTo === "sampleData" && (C("3️⃣ Upload sample data"), await Tr("public")), b(`Project version '${e.version ?? "unknown"}' published.`);
1486
1493
  } catch (e) {
1487
1494
  console.error("❌ Error publishing project", e), process.exit(1);
1488
1495
  }
1489
1496
  }
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);
1497
+ async function Mr(e, t, n, r) {
1498
+ if (r.typeId === "app") C(`${e} Register module`), await wr();
1499
+ else if (r.typeId === "engine") C(`${e} Register module`), await Dr(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await Er(n);
1493
1500
  else if (r.uploadGroupName === void 0) C(`${e} Registration NOT required`);
1494
1501
  else {
1495
1502
  C(`${e} Register module`);
1496
1503
  let i = n.id.split("-").slice(2).join("-");
1497
- await wr(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await $(n);
1504
+ await Dr(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await Er(n);
1498
1505
  }
1499
1506
  }
1500
1507
  //#endregion
1501
1508
  //#region src/actions/releaseProject.ts
1502
- async function Ar(e = "MIT", t = !1) {
1509
+ async function Nr(e = "MIT", t = !1) {
1503
1510
  try {
1504
1511
  s("Release Project");
1505
1512
  let n = await S("package.json"), r = await S("config.json"), i = m(r.id);
1506
1513
  await d("1️⃣ ", n);
1507
1514
  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", [
1515
+ if (await Ee("3️⃣ ", n), C("4️⃣ Regenerate README"), await yr(e, t), await y("5️⃣ Stage changes", "git", ["add", "."]), await y("6️⃣ Commit changes", "git", [
1509
1516
  "commit",
1510
1517
  "-m",
1511
1518
  `v${n.version ?? "unknown"}`
@@ -1513,7 +1520,7 @@ async function Ar(e = "MIT", t = !1) {
1513
1520
  "push",
1514
1521
  "origin",
1515
1522
  "main:main"
1516
- ]), await kr("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1523
+ ]), await Mr("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1517
1524
  let e = `v${n.version ?? "unknown"}`;
1518
1525
  await o("9️⃣ Trigger GitHub release", "gh", [
1519
1526
  "release",
@@ -1532,7 +1539,7 @@ async function Ar(e = "MIT", t = !1) {
1532
1539
  }
1533
1540
  //#endregion
1534
1541
  //#region src/actions/syncProjectWithGitHub.ts
1535
- async function jr() {
1542
+ async function Pr() {
1536
1543
  try {
1537
1544
  s("Synchronise Project with GitHub");
1538
1545
  let e = await S("package.json"), t = await S("config.json"), n = m(t.id);
@@ -1551,12 +1558,12 @@ async function jr() {
1551
1558
  }
1552
1559
  //#endregion
1553
1560
  //#region src/actions/testProject.ts
1554
- var Mr = [
1561
+ var Fr = [
1555
1562
  "1️⃣ ",
1556
1563
  "2️⃣ ",
1557
1564
  "3️⃣ ",
1558
1565
  "4️⃣ "
1559
- ], Nr = [{
1566
+ ], Ir = [{
1560
1567
  id: "unit",
1561
1568
  label: "Run unit tests",
1562
1569
  command: "vitest",
@@ -1569,13 +1576,13 @@ var Mr = [
1569
1576
  arguments: ["test", "--pass-with-no-tests"],
1570
1577
  configFileName: "playwright.config.ts"
1571
1578
  }];
1572
- async function Pr(t = ["unit"]) {
1579
+ async function Lr(t = ["unit"]) {
1573
1580
  try {
1574
1581
  s("Test Project");
1575
1582
  let n = 0;
1576
- for (let r of Nr) {
1583
+ for (let r of Ir) {
1577
1584
  if (!t.includes(r.id) || await e(r.configFileName) === null) continue;
1578
- let i = `${Mr[n] ?? ""} ${r.label}`;
1585
+ let i = `${Fr[n] ?? ""} ${r.label}`;
1579
1586
  await o(i, r.command, r.arguments), n += 1;
1580
1587
  }
1581
1588
  if (n === 0) {
@@ -1589,7 +1596,7 @@ async function Pr(t = ["unit"]) {
1589
1596
  }
1590
1597
  //#endregion
1591
1598
  //#region src/actions/triggerGitHubRelease.ts
1592
- async function Fr() {
1599
+ async function Rr() {
1593
1600
  try {
1594
1601
  s("Trigger GitHub Release");
1595
1602
  let e = `v${(await S("package.json")).version ?? "unknown"}`;
@@ -1607,4 +1614,4 @@ async function Fr() {
1607
1614
  }
1608
1615
  }
1609
1616
  //#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 };
1617
+ export { ye as auditDependencies, Te as buildProject, ze as checkProject, yr as documentProject, br as formatCode, xr as lintCode, jr as publishProject, Nr as releaseProject, Pr as syncProjectWithGitHub, Lr as testProject, Rr as triggerGitHubRelease, $ as uploadDirectoryToR2 };