@dpuse/dpuse-development 1.0.119 → 1.0.121

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
@@ -78,11 +78,11 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
78
78
 
79
79
  | Chunk/Module/File | Composition |
80
80
  | :------------------------------------------------------------------------------- | :------------------------------------------ |
81
- | **dist/dpuse-development.es.js** | 65.0 kB · gzip 20.9 kB · 65.6% of the build |
82
- |     src | `██████████████████░░` 88.2% · 57.3 kB |
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
83
  |         ↳ documentDependencies.ts | `▒▒▒▒░░░░░░░░░░░░░░░░` 17.6% · 11.4 kB |
84
84
  |         ↳ documentQualitySecurity.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 15.3% · 9.9 kB |
85
- |         ↳ documentBundleSizes.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 13.7% · 8.9 kB |
85
+ |         ↳ documentBundleSizes.ts | `▒▒▒░░░░░░░░░░░░░░░░░` 13.4% · 8.7 kB |
86
86
  |         ↳ checkConfigFiles.ts | `▒░░░░░░░░░░░░░░░░░░░` 5.8% · 3.8 kB |
87
87
  |         ↳ rustCrates.ts | `▒░░░░░░░░░░░░░░░░░░░` 5.3% · 3.4 kB |
88
88
  |         ↳ cloudflare.ts | `▒░░░░░░░░░░░░░░░░░░░` 4.3% · 2.8 kB |
@@ -93,17 +93,17 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
93
93
  |         ↳ documentActions.ts | `▒░░░░░░░░░░░░░░░░░░░` 2.7% · 1.8 kB |
94
94
  |         ↳ documentContributingLicense.ts | `░░░░░░░░░░░░░░░░░░░░` 1.9% · 1.2 kB |
95
95
  |         ↳ publishProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.7% · 1.1 kB |
96
- |         ↳ releaseProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.5% · 971 B |
96
+ |         ↳ releaseProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.5% · 972 B |
97
97
  |         ↳ testProject.ts | `░░░░░░░░░░░░░░░░░░░░` 1.2% · 799 B |
98
98
  |         ↳ 8 smaller files | `▒░░░░░░░░░░░░░░░░░░░` 4.3% · 2.8 kB |
99
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 |
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
102
  |     @dpuse/dpuse-shared → dist/dpuse-shared.es.js | `██████████░░░░░░░░░░` 50.8% · 11.8 kB |
103
103
  |     src → index.ts | `███████░░░░░░░░░░░░░` 35.8% · 8.3 kB |
104
104
  |     valibot → dist/index.mjs | `░░░░░░░░░░░░░░░░░░░░` 1.7% · 413 B |
105
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 |
106
+ | **dist/apiReference-D4xooSV0.js** | 8.5 kB · gzip 3.1 kB · 8.6% of the build |
107
107
  |     src → apiReference.ts | `███████████████████░` 95.1% · 8.0 kB |
108
108
  |     (bundler output, whitespace & JSON) | `█░░░░░░░░░░░░░░░░░░░` 4.9% · 427 B |
109
109
  | **dist/vite.es.js** | 2.5 kB · gzip 1.1 kB · 2.5% of the build |
@@ -112,6 +112,8 @@ _Note: Sonda's Vite reports currently exclude CSS files, since Vite does not gen
112
112
 
113
113
  Bars show each row's share of its output file. ↳ rows are part of the row above.
114
114
 
115
+ - 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.
116
+
115
117
  (inlined worker) = 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.
116
118
 
117
119
  (bundler output, whitespace & JSON) = 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.
@@ -1073,7 +1073,7 @@ 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.", G = "split", Vn = `(${G} · n files) = a package whose files are divided across output files; each row lists only the files in that output file, and no file appears in more than one.`, K = "(bundler output, whitespace & JSON)", q = "(inlined worker)", Hn = `${q} = a Web Worker built separately and embedded in its output file as text. Where the build records what it contains, its rows list that; any few bytes over are the escaping needed to embed it.`, J = "(Rust WebAssembly as base64", Un = `${J}…) = the compiled Rust code, embedded as base64 text, about a third larger than the binary it decodes to, which is the size given.`, Wn = `${K} = bytes Sonda can't trace to a source file: whitespace (indentation and line breaks), code the bundler generates (region comments, the combined import/export lines, its small runtime helper and wrappers), and imported JSON such as \`config.json\`, which the bundler doesn't map. The JSON and the generated code are real bytes that ship; the whitespace mostly disappears once compressed.`;
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
1077
  async function Gn(t) {
1078
1078
  try {
1079
1079
  s("Document Bundle Sizes"), C("1️⃣ Read bundle analysis report");
@@ -1086,9 +1086,9 @@ async function Gn(t) {
1086
1086
  workerJson: i
1087
1087
  }), c = [
1088
1088
  o.includes("↳") ? `${zn} ${Bn}` : zn,
1089
- o.includes(`(${G} · `) ? Vn : "",
1090
- o.includes(q) ? Hn : "",
1091
- o.includes(J) ? Un : "",
1089
+ / \+ \d+ more \|/.test(o) ? Vn : "",
1090
+ o.includes(K) ? Hn : "",
1091
+ o.includes(q) ? Un : "",
1092
1092
  Wn
1093
1093
  ].filter((e) => e !== "");
1094
1094
  await _(`## Bundle Analysis\n\n${Rn}\n\n${o}\n\n${c.join("\n\n")}`, Mn, Nn), b("Bundle sizes documented");
@@ -1097,20 +1097,17 @@ async function Gn(t) {
1097
1097
  }
1098
1098
  }
1099
1099
  function Kn(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;
1100
+ let { assetContents: n, isModuleLevel: r, workerJson: i } = t, a = sr(e), o = i === void 0 ? void 0 : sr(i).values().next().value;
1101
1101
  for (let [e, t] of a) {
1102
1102
  let r = n.get(e);
1103
1103
  r != null && qn(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, pr(e)]).toSorted((e, t) => t[1].uncompressed - e[1].uncompressed), l = nr(a, e.dependencies), u = ["|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, fr(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 ? ` · ${_r(i, s)} of the build` : "";
1108
- u.push(`| **${e}** | ${mr(t)}${o} |`, ...rr(n, i, {
1109
- isModuleLevel: r,
1110
- splitPackages: l
1111
- }));
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));
1112
1109
  }
1113
- return u.join("\n");
1110
+ return l.join("\n");
1114
1111
  }
1115
1112
  function qn(e, t, n) {
1116
1113
  let r = Jn(t), i = Yn(r ?? ""), a = Yn(t);
@@ -1145,14 +1142,14 @@ function Xn(e) {
1145
1142
  }
1146
1143
  function Zn(e, t) {
1147
1144
  if (t.bytes <= 0) return;
1148
- let n = [e.get("wasm"), e.get(K)].flatMap((e) => e === void 0 ? [] : e.files.entries().map(([t, n]) => ({
1145
+ let n = [e.get("wasm"), e.get(G)].flatMap((e) => e === void 0 ? [] : e.files.entries().map(([t, n]) => ({
1149
1146
  group: e,
1150
1147
  fileName: t,
1151
1148
  sizes: n
1152
1149
  })).toArray()).find(({ sizes: e }) => e.uncompressed >= t.bytes);
1153
1150
  if (n === void 0) return;
1154
1151
  er(e, n.group, n.fileName, n.sizes, t.bytes);
1155
- let r = `${J}, ${Z(t.binaryBytes)} binary)`;
1152
+ let r = `${q}, ${Z(t.binaryBytes)} binary)`;
1156
1153
  e.set(r, {
1157
1154
  sizes: {
1158
1155
  uncompressed: t.bytes,
@@ -1165,14 +1162,14 @@ function Zn(e, t) {
1165
1162
  });
1166
1163
  }
1167
1164
  function Qn(e, t, n, r) {
1168
- let i = e.get(K), a = i?.files.get("");
1165
+ let i = e.get(G), a = i?.files.get("");
1169
1166
  if (i === void 0 || a === void 0 || a.uncompressed < t) return;
1170
1167
  er(e, i, "", a, t);
1171
1168
  let o = r === void 0 ? /* @__PURE__ */ new Map([["", {
1172
1169
  uncompressed: t,
1173
1170
  gzip: 0
1174
1171
  }]]) : $n(r, t, n);
1175
- e.set(q, {
1172
+ e.set(K, {
1176
1173
  sizes: {
1177
1174
  uncompressed: t,
1178
1175
  gzip: 0
@@ -1185,45 +1182,39 @@ function $n(e, t, n) {
1185
1182
  let r = /* @__PURE__ */ new Map();
1186
1183
  for (let [t, n] of e) if (t === "src") for (let [e, t] of n.files) r.set(e, { ...t });
1187
1184
  else {
1188
- let e = n.files.size === 1 ? or(t, sr(n.files)) : t;
1185
+ let e = n.files.size === 1 ? Y(t, or(n.files)) : t;
1189
1186
  r.set(e, { ...n.sizes });
1190
1187
  }
1191
- let i = r.values().reduce((e, t) => e + t.uncompressed, 0), a = r.get(K) ?? X();
1192
- return a.uncompressed += Math.max(0, t - i), a.uncompressed > 0 && r.set(K, a), r;
1188
+ let i = r.values().reduce((e, t) => e + t.uncompressed, 0), a = r.get(G) ?? X();
1189
+ return a.uncompressed += Math.max(0, t - i), a.uncompressed > 0 && r.set(G, a), r;
1193
1190
  }
1194
1191
  function er(e, t, n, r, i) {
1195
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);
1196
1193
  }
1197
1194
  function tr(e, t) {
1198
- return e[0] === K == (t[0] === K) ? t[1].sizes.uncompressed - e[1].sizes.uncompressed : e[0] === K ? 1 : -1;
1199
- }
1200
- function nr(e, t) {
1201
- let n = new Set(t.map((e) => e.name)), r = /* @__PURE__ */ new Map();
1202
- for (let t of e.values()) for (let e of t.keys()) n.has(e) && r.set(e, (r.get(e) ?? 0) + 1);
1203
- return new Set(r.entries().filter(([, e]) => e > 1).map(([e]) => e));
1204
- }
1205
- function rr(e, t, n) {
1206
- let { isModuleLevel: r, splitPackages: i } = n, a = [];
1207
- for (let [n, { sizes: o, files: s }] of e) {
1208
- if (s.size === 1) {
1209
- let e = sr(s);
1210
- a.push(`| ${U}${or(n, e)} | ${Y(o.uncompressed, t)} |`);
1195
+ return e[0] === G == (t[0] === G) ? t[1].sizes.uncompressed - e[1].sizes.uncompressed : e[0] === G ? 1 : -1;
1196
+ }
1197
+ function nr(e, t, n) {
1198
+ let r = [];
1199
+ for (let [i, { sizes: a, files: o }] of e) {
1200
+ if (o.size === 1) {
1201
+ let e = or(o);
1202
+ r.push(`| ${U}${Y(i, e)} | ${J(a.uncompressed, t)} |`);
1211
1203
  continue;
1212
1204
  }
1213
- let e = i.has(n) ? `${n} (${G} · ${String(s.size)} files)` : n;
1214
- a.push(`| ${U}${e} | ${Y(o.uncompressed, t)} |`), r || a.push(...ir(s, t));
1205
+ r.push(`| ${U}${ar(i, o)} | ${J(a.uncompressed, t)} |`), n || r.push(...rr(o, t));
1215
1206
  }
1216
- return a;
1207
+ return r;
1217
1208
  }
1218
- function ir(e, t) {
1219
- 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]) => `| ${U}${U}↳ ${e} | ${Y(n.uncompressed, t, Fn)} |`);
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)} |`);
1220
1211
  if (r > 0) {
1221
1212
  let e = n.slice(-r).reduce((e, [, t]) => e + t.uncompressed, 0);
1222
- i.push(`| ${U}${U}↳ ${String(r)} smaller files | ${Y(e, t, Fn)} |`);
1213
+ i.push(`| ${U}${U}↳ ${String(r)} smaller files | ${J(e, t, Fn)} |`);
1223
1214
  }
1224
1215
  return i;
1225
1216
  }
1226
- function ar(e, t) {
1217
+ function ir(e, t) {
1227
1218
  if (t <= 0) return 0;
1228
1219
  let n = 0, r = 0;
1229
1220
  for (let [, i] of e.toReversed()) {
@@ -1233,37 +1224,42 @@ function ar(e, t) {
1233
1224
  }
1234
1225
  return n >= 2 ? n : 0;
1235
1226
  }
1236
- function Y(e, t, n = Pn) {
1237
- return `${hr(t > 0 ? e / t * 100 : 0, n)} · ${Z(e)}`;
1227
+ function J(e, t, n = Pn) {
1228
+ return `${mr(t > 0 ? e / t * 100 : 0, n)} · ${Z(e)}`;
1238
1229
  }
1239
- function or(e, t) {
1230
+ function Y(e, t) {
1240
1231
  return t === "" ? e : `${e} → ${t}`;
1241
1232
  }
1242
- function sr(e) {
1233
+ function ar(e, t) {
1234
+ if (e === K) return e;
1235
+ let [n] = [...t].toSorted((e, t) => t[1].uncompressed - e[1].uncompressed)[0] ?? [""];
1236
+ return `${Y(e, n)} + ${String(t.size - 1)} more`;
1237
+ }
1238
+ function or(e) {
1243
1239
  let [t] = e.keys();
1244
1240
  if (t === void 0) throw Error("Expected exactly one file");
1245
1241
  return t;
1246
1242
  }
1247
- function cr(e) {
1248
- let t = lr(e.dependencies), n = /* @__PURE__ */ new Map();
1243
+ function sr(e) {
1244
+ let t = cr(e.dependencies), n = /* @__PURE__ */ new Map();
1249
1245
  for (let r of e.resources) {
1250
1246
  if (r.kind !== "chunk" || !r.parent) continue;
1251
- let { group: e, file: i } = ur(r.name, t), a = pr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
1247
+ let { group: e, file: i } = lr(r.name, t), a = fr(r), o = n.get(r.parent) ?? /* @__PURE__ */ new Map();
1252
1248
  n.set(r.parent, o);
1253
1249
  let s = o.get(e) ?? {
1254
1250
  sizes: X(),
1255
1251
  files: /* @__PURE__ */ new Map()
1256
1252
  };
1257
- o.set(e, s), gr(s.sizes, a);
1253
+ o.set(e, s), hr(s.sizes, a);
1258
1254
  let c = s.files.get(i) ?? X();
1259
- s.files.set(i, c), gr(c, a);
1255
+ s.files.set(i, c), hr(c, a);
1260
1256
  }
1261
1257
  return n;
1262
1258
  }
1263
- function lr(e) {
1259
+ function cr(e) {
1264
1260
  return e.flatMap((e) => e.paths.map((t) => [t, e.name])).toSorted((e, t) => t[0].length - e[0].length);
1265
1261
  }
1266
- function ur(e, t) {
1262
+ function lr(e, t) {
1267
1263
  let n = t.find(([t]) => e === t || e.startsWith(`${t}/`));
1268
1264
  if (n) {
1269
1265
  let [t, r] = n;
@@ -1273,36 +1269,36 @@ function ur(e, t) {
1273
1269
  };
1274
1270
  }
1275
1271
  return e === "[unassigned]" ? {
1276
- group: K,
1272
+ group: G,
1277
1273
  file: ""
1278
1274
  } : e.startsWith("\0") ? {
1279
1275
  group: "(runtime)",
1280
1276
  file: e.slice(1)
1281
1277
  } : e.startsWith("rust/") ? {
1282
1278
  group: "wasm",
1283
- file: dr(e)
1279
+ file: ur(e)
1284
1280
  } : {
1285
1281
  group: "src",
1286
- file: fr(e)
1282
+ file: dr(e)
1287
1283
  };
1288
1284
  }
1289
- function dr(e) {
1290
- let t = e.split("/", 2)[1] ?? "", n = fr(e);
1285
+ function ur(e) {
1286
+ let t = e.split("/", 2)[1] ?? "", n = dr(e);
1291
1287
  return t !== "" && n.startsWith(t) ? `…${n.slice(t.length)}` : n;
1292
1288
  }
1293
- function fr(e) {
1289
+ function dr(e) {
1294
1290
  return e.split("/").at(-1) ?? e;
1295
1291
  }
1296
- function pr(e) {
1292
+ function fr(e) {
1297
1293
  return {
1298
1294
  uncompressed: e.uncompressed,
1299
1295
  gzip: e.gzip ?? 0
1300
1296
  };
1301
1297
  }
1302
- function mr(e) {
1298
+ function pr(e) {
1303
1299
  return `${Z(e.uncompressed)} · gzip ${Z(e.gzip)}`;
1304
1300
  }
1305
- function hr(e, t = Pn) {
1301
+ function mr(e, t = Pn) {
1306
1302
  let n = Math.round(e / 100 * W);
1307
1303
  return `\`${t.repeat(n)}${"░".repeat(W - n)}\` ${e.toFixed(1)}%`;
1308
1304
  }
@@ -1312,10 +1308,10 @@ function X() {
1312
1308
  gzip: 0
1313
1309
  };
1314
1310
  }
1315
- function gr(e, t) {
1311
+ function hr(e, t) {
1316
1312
  e.uncompressed += t.uncompressed, e.gzip += t.gzip;
1317
1313
  }
1318
- function _r(e, t) {
1314
+ function gr(e, t) {
1319
1315
  return `${(e / t * 100).toFixed(1)}%`;
1320
1316
  }
1321
1317
  function Z(e) {
@@ -1323,7 +1319,7 @@ function Z(e) {
1323
1319
  }
1324
1320
  //#endregion
1325
1321
  //#region src/actions/documentProject.ts
1326
- async function Q(t = "MIT", n = !1) {
1322
+ async function _r(t = "MIT", n = !1) {
1327
1323
  try {
1328
1324
  let r = await S("config.json"), i = m(r.id).typeId === "connector";
1329
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();
@@ -1388,12 +1384,12 @@ async function Sr() {
1388
1384
  }, n = await fetch(`https://api.dpuse.app/configs/${e.id}`, t);
1389
1385
  if (!n.ok) throw Error(await n.text());
1390
1386
  }
1391
- async function $(e, t) {
1392
- let n = await Dr(`${e}/${t}`, t), r = Map.groupBy(n, ({ key: e }) => Or(e));
1393
- for (let [e, t] of r) await Er(t, ["--content-type", e]);
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
1390
  }
1395
1391
  async function Cr(e) {
1396
- await $(e, "application"), await $(e, "fileStore"), await Er(["applicationIndex.json", "fileStoreIndex.json"].map((t) => ({
1392
+ await Q(e, "application"), await Q(e, "fileStore"), await Tr(["applicationIndex.json", "fileStoreIndex.json"].map((t) => ({
1397
1393
  file: `${e}/${t}`,
1398
1394
  key: t
1399
1395
  })), [
@@ -1403,7 +1399,7 @@ async function Cr(e) {
1403
1399
  "no-cache"
1404
1400
  ]);
1405
1401
  }
1406
- async function wr(e) {
1402
+ async function $(e) {
1407
1403
  let t = e.id, n = {
1408
1404
  body: JSON.stringify(e),
1409
1405
  headers: { "Content-Type": "application/json" },
@@ -1411,7 +1407,7 @@ async function wr(e) {
1411
1407
  }, r = await fetch(`https://api.dpuse.app/configs/${t}`, n);
1412
1408
  if (!r.ok) throw Error(await r.text());
1413
1409
  }
1414
- async function Tr(e, t) {
1410
+ async function wr(e, t) {
1415
1411
  let n = `v${e.version ?? "unknown"}`;
1416
1412
  async function r(e, r = "") {
1417
1413
  let i = await ee(e, { withFileTypes: !0 });
@@ -1433,7 +1429,7 @@ async function Tr(e, t) {
1433
1429
  }
1434
1430
  await r("dist");
1435
1431
  }
1436
- async function Er(e, t) {
1432
+ async function Tr(e, t) {
1437
1433
  if (e.length === 0) return;
1438
1434
  let n = await w.mkdtemp(T.join(ge.tmpdir(), "dpuse-r2-bulk-")), r = T.join(n, "files.json");
1439
1435
  try {
@@ -1455,19 +1451,19 @@ async function Er(e, t) {
1455
1451
  });
1456
1452
  }
1457
1453
  }
1458
- async function Dr(e, t) {
1454
+ async function Er(e, t) {
1459
1455
  let n = await ee(e), r = [];
1460
1456
  for (let i of n) {
1461
1457
  if (i.startsWith(".")) continue;
1462
1458
  let n = `${e}/${i}`, a = `${t}/${i}`;
1463
- (await p(n)).isDirectory() ? r.push(...await Dr(n, a)) : r.push({
1459
+ (await p(n)).isDirectory() ? r.push(...await Er(n, a)) : r.push({
1464
1460
  file: n,
1465
1461
  key: a
1466
1462
  });
1467
1463
  }
1468
1464
  return r;
1469
1465
  }
1470
- function Or(e) {
1466
+ function Dr(e) {
1471
1467
  let t = e.slice(e.lastIndexOf("/") + 1), n = t.lastIndexOf(".");
1472
1468
  if (n === -1) return t === "LICENSE" ? "text/plain" : "application/octet-stream";
1473
1469
  let r = xr[t.slice(n + 1).toLowerCase()];
@@ -1476,7 +1472,7 @@ function Or(e) {
1476
1472
  }
1477
1473
  //#endregion
1478
1474
  //#region src/actions/publishProject.ts
1479
- async function kr() {
1475
+ async function Or() {
1480
1476
  try {
1481
1477
  s("Publish Project");
1482
1478
  let e = await S("package.json"), t = await S("config.json"), n = m(t.id);
@@ -1486,30 +1482,30 @@ async function kr() {
1486
1482
  "app",
1487
1483
  "kb"
1488
1484
  ].includes(n.publishedTo);
1489
- r && await o("2️⃣ Deploy", "npm", ["run", "deploy"]), await Ar(r ? "3️⃣ " : "2️⃣ ", e, t, n), n.publishedTo === "sampleData" && (C("3️⃣ Upload sample data"), await Cr("public")), b(`Project version '${e.version ?? "unknown"}' published.`);
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.`);
1490
1486
  } catch (e) {
1491
1487
  console.error("❌ Error publishing project", e), process.exit(1);
1492
1488
  }
1493
1489
  }
1494
- async function Ar(e, t, n, r) {
1490
+ async function kr(e, t, n, r) {
1495
1491
  if (r.typeId === "app") C(`${e} Register module`), await Sr();
1496
- else if (r.typeId === "engine") C(`${e} Register module`), await Tr(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await wr(n);
1492
+ else if (r.typeId === "engine") C(`${e} Register module`), await wr(t, `dpuse-engine-eu/${r.uploadGroupName ?? "unknown"}`), await $(n);
1497
1493
  else if (r.uploadGroupName === void 0) C(`${e} Registration NOT required`);
1498
1494
  else {
1499
1495
  C(`${e} Register module`);
1500
1496
  let i = n.id.split("-").slice(2).join("-");
1501
- await Tr(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await wr(n);
1497
+ await wr(t, `dpuse-engine-eu/${r.uploadGroupName}/${i}`), await $(n);
1502
1498
  }
1503
1499
  }
1504
1500
  //#endregion
1505
1501
  //#region src/actions/releaseProject.ts
1506
- async function jr(e = "MIT", t = !1) {
1502
+ async function Ar(e = "MIT", t = !1) {
1507
1503
  try {
1508
1504
  s("Release Project");
1509
1505
  let n = await S("package.json"), r = await S("config.json"), i = m(r.id);
1510
1506
  await d("1️⃣ ", n);
1511
1507
  let a = await oe("2️⃣ ", n, i);
1512
- if (await Ee("3️⃣ ", n), C("4️⃣ Regenerate README"), await Q(e, t), await y("5️⃣ Stage changes", "git", ["add", "."]), await y("6️⃣ Commit changes", "git", [
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", [
1513
1509
  "commit",
1514
1510
  "-m",
1515
1511
  `v${n.version ?? "unknown"}`
@@ -1517,7 +1513,7 @@ async function jr(e = "MIT", t = !1) {
1517
1513
  "push",
1518
1514
  "origin",
1519
1515
  "main:main"
1520
- ]), await Ar("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1516
+ ]), await kr("8️⃣ ", n, a, i), i.publishedTo === "npm") {
1521
1517
  let e = `v${n.version ?? "unknown"}`;
1522
1518
  await o("9️⃣ Trigger GitHub release", "gh", [
1523
1519
  "release",
@@ -1536,7 +1532,7 @@ async function jr(e = "MIT", t = !1) {
1536
1532
  }
1537
1533
  //#endregion
1538
1534
  //#region src/actions/syncProjectWithGitHub.ts
1539
- async function Mr() {
1535
+ async function jr() {
1540
1536
  try {
1541
1537
  s("Synchronise Project with GitHub");
1542
1538
  let e = await S("package.json"), t = await S("config.json"), n = m(t.id);
@@ -1555,12 +1551,12 @@ async function Mr() {
1555
1551
  }
1556
1552
  //#endregion
1557
1553
  //#region src/actions/testProject.ts
1558
- var Nr = [
1554
+ var Mr = [
1559
1555
  "1️⃣ ",
1560
1556
  "2️⃣ ",
1561
1557
  "3️⃣ ",
1562
1558
  "4️⃣ "
1563
- ], Pr = [{
1559
+ ], Nr = [{
1564
1560
  id: "unit",
1565
1561
  label: "Run unit tests",
1566
1562
  command: "vitest",
@@ -1573,13 +1569,13 @@ var Nr = [
1573
1569
  arguments: ["test", "--pass-with-no-tests"],
1574
1570
  configFileName: "playwright.config.ts"
1575
1571
  }];
1576
- async function Fr(t = ["unit"]) {
1572
+ async function Pr(t = ["unit"]) {
1577
1573
  try {
1578
1574
  s("Test Project");
1579
1575
  let n = 0;
1580
- for (let r of Pr) {
1576
+ for (let r of Nr) {
1581
1577
  if (!t.includes(r.id) || await e(r.configFileName) === null) continue;
1582
- let i = `${Nr[n] ?? ""} ${r.label}`;
1578
+ let i = `${Mr[n] ?? ""} ${r.label}`;
1583
1579
  await o(i, r.command, r.arguments), n += 1;
1584
1580
  }
1585
1581
  if (n === 0) {
@@ -1593,7 +1589,7 @@ async function Fr(t = ["unit"]) {
1593
1589
  }
1594
1590
  //#endregion
1595
1591
  //#region src/actions/triggerGitHubRelease.ts
1596
- async function Ir() {
1592
+ async function Fr() {
1597
1593
  try {
1598
1594
  s("Trigger GitHub Release");
1599
1595
  let e = `v${(await S("package.json")).version ?? "unknown"}`;
@@ -1611,4 +1607,4 @@ async function Ir() {
1611
1607
  }
1612
1608
  }
1613
1609
  //#endregion
1614
- export { ye as auditDependencies, Te as buildProject, ze as checkProject, Q as documentProject, vr as formatCode, yr as lintCode, kr as publishProject, jr as releaseProject, Mr as syncProjectWithGitHub, Fr as testProject, Ir as triggerGitHubRelease, $ as uploadDirectoryToR2 };
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 };