dankgrinder 7.68.0 → 7.69.0
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/lib/dashboard.js +9 -3
- package/lib/grinder.js +9 -1
- package/package.json +1 -1
package/lib/dashboard.js
CHANGED
|
@@ -252,12 +252,18 @@ function renderDashboard(ctx) {
|
|
|
252
252
|
rows.push(mkRow(`${modeTag} ${D}P=pause R=resume S=status Q=quit${_}`));
|
|
253
253
|
rows.push(border('╚'));
|
|
254
254
|
|
|
255
|
-
// ── Flush:
|
|
256
|
-
|
|
257
|
-
// No full-screen clear, no cursor tricks. Simple and reliable.
|
|
255
|
+
// ── Flush: overwrite rows from line 1, then blank remaining screen ──
|
|
256
|
+
const rowsOnScreen = process.stdout.rows || 24;
|
|
258
257
|
for (const row of rows) {
|
|
259
258
|
process.stdout.write(`${_c.clearLine}\r${row}\n`);
|
|
260
259
|
}
|
|
260
|
+
// Fill remaining screen lines with blanks so old startup logs don't bleed through
|
|
261
|
+
const extra = rowsOnScreen - rows.length;
|
|
262
|
+
for (let i = 0; i < extra; i++) {
|
|
263
|
+
process.stdout.write(`${_c.clearLine}\r${' '.repeat(tw)}\n`);
|
|
264
|
+
}
|
|
265
|
+
// Move cursor to end so terminal doesn't scroll on next \r write
|
|
266
|
+
process.stdout.write(`\x1b[${rows.length};1H`);
|
|
261
267
|
|
|
262
268
|
return rows.length;
|
|
263
269
|
}
|
package/lib/grinder.js
CHANGED
|
@@ -2872,6 +2872,7 @@ async function start(apiKey, apiUrl, opts = {}) {
|
|
|
2872
2872
|
await new Promise((r) => setTimeout(r, 10000));
|
|
2873
2873
|
data = await fetchConfig(4, 2000, fetchOpts);
|
|
2874
2874
|
}
|
|
2875
|
+
console.log(`[DEBUG] fetched config, accounts: ${data?.accounts?.length || 0}`);
|
|
2875
2876
|
|
|
2876
2877
|
if (data && data.error) {
|
|
2877
2878
|
log('error', `${data.error}`);
|
|
@@ -3346,14 +3347,21 @@ async function start(apiKey, apiUrl, opts = {}) {
|
|
|
3346
3347
|
console.log('');
|
|
3347
3348
|
|
|
3348
3349
|
console.log(` ${rgb(139, 92, 246)}${c.bold}>>>${c.reset} ${gradientText('Starting grind loops...', [139, 92, 246], [52, 211, 153])}`);
|
|
3349
|
-
|
|
3350
|
+
|
|
3351
|
+
console.log(`[DEBUG] activeWorkers count: ${activeWorkers.length}`);
|
|
3352
|
+
for (let i = 0; i < Math.min(activeWorkers.length, 5); i++) {
|
|
3353
|
+
const w = activeWorkers[i];
|
|
3354
|
+
console.log(`[DEBUG] worker[${i}]: ${w.username}, running=${w.running}, client=${!!w.client}, channel=${!!w.channel}`);
|
|
3355
|
+
}
|
|
3350
3356
|
|
|
3351
3357
|
// Phase 3: Start all grind loops (only for valid workers)
|
|
3352
3358
|
for (const w of activeWorkers) {
|
|
3359
|
+
console.log(`[DEBUG] calling grindLoop on: ${w.username}`);
|
|
3353
3360
|
if (!shutdownCalled) w.grindLoop();
|
|
3354
3361
|
}
|
|
3355
3362
|
|
|
3356
3363
|
startTime = Date.now();
|
|
3364
|
+
console.log(`[DEBUG] dashboardStarted set to true`);
|
|
3357
3365
|
dashboardStarted = true;
|
|
3358
3366
|
setDashboardActive(true);
|
|
3359
3367
|
// Setup keyboard shortcuts
|