moondesk 0.11.1 → 0.11.3
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/npm/install-binary.js +5 -4
- package/package.json +1 -1
package/npm/install-binary.js
CHANGED
|
@@ -442,15 +442,16 @@ function createDownloadProgressReporter(logger = console) {
|
|
|
442
442
|
let lastUnknownBytes = 0;
|
|
443
443
|
const unknownReportStep = 5 * 1024 * 1024;
|
|
444
444
|
|
|
445
|
+
// Progress is diagnostic output: keep stdout reserved for native command results.
|
|
445
446
|
return ({ downloadedBytes, totalBytes }) => {
|
|
446
447
|
if (!started) {
|
|
447
448
|
started = true;
|
|
448
449
|
if (Number.isFinite(totalBytes) && totalBytes > 0) {
|
|
449
|
-
logger.
|
|
450
|
+
logger.warn?.(
|
|
450
451
|
`Downloading MoonDesk ${version} native binary (${formatMiB(totalBytes)})...`,
|
|
451
452
|
);
|
|
452
453
|
} else {
|
|
453
|
-
logger.
|
|
454
|
+
logger.warn?.(`Downloading MoonDesk ${version} native binary...`);
|
|
454
455
|
}
|
|
455
456
|
}
|
|
456
457
|
|
|
@@ -461,7 +462,7 @@ function createDownloadProgressReporter(logger = console) {
|
|
|
461
462
|
const bucket = percent === 100 ? 100 : Math.floor(percent / 25) * 25;
|
|
462
463
|
if (bucket >= 25 && bucket > lastPercentBucket) {
|
|
463
464
|
lastPercentBucket = bucket;
|
|
464
|
-
logger.
|
|
465
|
+
logger.warn?.(
|
|
465
466
|
`MoonDesk ${version} native binary download: ${bucket}% (${formatMiB(Math.min(downloadedBytes, totalBytes))} / ${formatMiB(totalBytes)})`,
|
|
466
467
|
);
|
|
467
468
|
}
|
|
@@ -470,7 +471,7 @@ function createDownloadProgressReporter(logger = console) {
|
|
|
470
471
|
|
|
471
472
|
if (downloadedBytes - lastUnknownBytes >= unknownReportStep) {
|
|
472
473
|
lastUnknownBytes = downloadedBytes;
|
|
473
|
-
logger.
|
|
474
|
+
logger.warn?.(
|
|
474
475
|
`MoonDesk ${version} native binary download: ${formatMiB(downloadedBytes)} downloaded...`,
|
|
475
476
|
);
|
|
476
477
|
}
|