getaimeter 0.3.3 → 0.3.4
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/cli.js +3 -3
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -335,11 +335,11 @@ function runLogs() {
|
|
|
335
335
|
const tail = allLines.slice(-lines).join('\n');
|
|
336
336
|
console.log(tail);
|
|
337
337
|
|
|
338
|
-
// Follow mode
|
|
338
|
+
// Follow mode — poll every second (fs.watch is unreliable on Windows)
|
|
339
339
|
console.log('\n--- Watching for new entries (Ctrl+C to stop) ---\n');
|
|
340
340
|
|
|
341
341
|
let fileSize = fs.statSync(logFile).size;
|
|
342
|
-
|
|
342
|
+
setInterval(() => {
|
|
343
343
|
try {
|
|
344
344
|
const newSize = fs.statSync(logFile).size;
|
|
345
345
|
if (newSize > fileSize) {
|
|
@@ -351,7 +351,7 @@ function runLogs() {
|
|
|
351
351
|
fileSize = newSize;
|
|
352
352
|
}
|
|
353
353
|
} catch {}
|
|
354
|
-
});
|
|
354
|
+
}, 1000);
|
|
355
355
|
}
|
|
356
356
|
|
|
357
357
|
// ---------------------------------------------------------------------------
|