repowise 0.1.61 → 0.1.62
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/dist/bin/repowise.js +11 -11
- package/package.json +1 -1
package/dist/bin/repowise.js
CHANGED
|
@@ -494,17 +494,6 @@ async function handleCatchUp(offlineState, pollClient, repoIds, state, repoLocal
|
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
async function startListener(options) {
|
|
497
|
-
const origLog = console.log.bind(console);
|
|
498
|
-
const origError = console.error.bind(console);
|
|
499
|
-
const origWarn = console.warn.bind(console);
|
|
500
|
-
const ts = () => {
|
|
501
|
-
const d = /* @__PURE__ */ new Date();
|
|
502
|
-
const pad = (n) => String(n).padStart(2, "0");
|
|
503
|
-
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;
|
|
504
|
-
};
|
|
505
|
-
console.log = (...args) => origLog(`[${ts()}]`, ...args);
|
|
506
|
-
console.error = (...args) => origError(`[${ts()}]`, ...args);
|
|
507
|
-
console.warn = (...args) => origWarn(`[${ts()}]`, ...args);
|
|
508
497
|
running = true;
|
|
509
498
|
if (!options?.skipPidCheck) {
|
|
510
499
|
const alreadyRunning = await handleStalePid();
|
|
@@ -552,6 +541,17 @@ async function startListener(options) {
|
|
|
552
541
|
}
|
|
553
542
|
}
|
|
554
543
|
let pollIntervalMs = 5e3;
|
|
544
|
+
const origLog = console.log.bind(console);
|
|
545
|
+
const origError = console.error.bind(console);
|
|
546
|
+
const origWarn = console.warn.bind(console);
|
|
547
|
+
const ts = () => {
|
|
548
|
+
const d = /* @__PURE__ */ new Date();
|
|
549
|
+
const pad = (n) => String(n).padStart(2, "0");
|
|
550
|
+
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`;
|
|
551
|
+
};
|
|
552
|
+
console.log = (...args) => origLog(`[${ts()}]`, ...args);
|
|
553
|
+
console.error = (...args) => origError(`[${ts()}]`, ...args);
|
|
554
|
+
console.warn = (...args) => origWarn(`[${ts()}]`, ...args);
|
|
555
555
|
console.log(`RepoWise Listener started \u2014 watching ${allRepoIds.length} repo(s)`);
|
|
556
556
|
const shutdown = async () => {
|
|
557
557
|
console.log("Shutting down...");
|