vargai 0.4.0-alpha37 → 0.4.0-alpha38
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/package.json
CHANGED
|
@@ -239,6 +239,9 @@ async function renderClipLayers(
|
|
|
239
239
|
.filter(Boolean) as { index: number; reason: Error }[];
|
|
240
240
|
|
|
241
241
|
if (failures.length > 0) {
|
|
242
|
+
if (failures.length === 1 && failures[0]) {
|
|
243
|
+
throw failures[0].reason;
|
|
244
|
+
}
|
|
242
245
|
const errors = failures
|
|
243
246
|
.map((f) => f.reason?.message || "Unknown error")
|
|
244
247
|
.join("; ");
|
|
@@ -222,8 +222,13 @@ export async function renderRoot(
|
|
|
222
222
|
`\x1b[33mℹ ${successCount} clip(s) cached, ${failures.length} failed\x1b[0m`,
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
|
-
const
|
|
226
|
-
|
|
225
|
+
const errorCounts = new Map<string, number>();
|
|
226
|
+
for (const f of failures) {
|
|
227
|
+
const msg = f.reason?.message || "Unknown error";
|
|
228
|
+
errorCounts.set(msg, (errorCounts.get(msg) || 0) + 1);
|
|
229
|
+
}
|
|
230
|
+
const errors = [...errorCounts.entries()]
|
|
231
|
+
.map(([msg, count]) => (count > 1 ? `${msg} (x${count})` : msg))
|
|
227
232
|
.join("; ");
|
|
228
233
|
throw new Error(
|
|
229
234
|
`${failures.length} of ${clipResults.length} clips failed: ${errors}`,
|