electrobun 0.0.19-beta.132 → 0.0.19-beta.133
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
package/src/cli/index.ts
CHANGED
|
@@ -324,6 +324,7 @@ async function ensureCEFDependencies(targetOS?: 'macos' | 'win' | 'linux', targe
|
|
|
324
324
|
// Create temp file with unique name to avoid conflicts
|
|
325
325
|
const fileStream = createWriteStream(filePath);
|
|
326
326
|
let downloadedSize = 0;
|
|
327
|
+
let lastReportedPercent = -1;
|
|
327
328
|
|
|
328
329
|
// Stream download with progress
|
|
329
330
|
if (response.body) {
|
|
@@ -338,8 +339,10 @@ async function ensureCEFDependencies(targetOS?: 'macos' | 'win' | 'linux', targe
|
|
|
338
339
|
|
|
339
340
|
if (totalSize > 0) {
|
|
340
341
|
const percent = Math.round((downloadedSize / totalSize) * 100);
|
|
341
|
-
|
|
342
|
-
|
|
342
|
+
const percentTier = Math.floor(percent / 10) * 10;
|
|
343
|
+
if (percentTier > lastReportedPercent && percentTier <= 100) {
|
|
344
|
+
console.log(` Progress: ${percentTier}% (${Math.round(downloadedSize / 1024 / 1024)}MB/${Math.round(totalSize / 1024 / 1024)}MB)`);
|
|
345
|
+
lastReportedPercent = percentTier;
|
|
343
346
|
}
|
|
344
347
|
}
|
|
345
348
|
}
|