dankgrinder 8.39.0 → 8.40.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.
Files changed (2) hide show
  1. package/lib/ui.js +5 -3
  2. package/package.json +1 -1
package/lib/ui.js CHANGED
@@ -59,7 +59,7 @@ const DIM = c.dim;
59
59
 
60
60
  function trunc(s, n) { s = String(s || ''); return s.length <= n ? s : s.slice(0, n - 1) + '…'; }
61
61
  function padR(s, n) { return trunc(s, n).padEnd(n); }
62
- function padL(s, n) { return String(s).padStart(n); }
62
+ function padL(s, n, char) { return String(s).padStart(n, char || ' '); }
63
63
  function padC(s, n) {
64
64
  s = String(s || '');
65
65
  const pad = Math.max(0, n - s.length);
@@ -120,7 +120,9 @@ function draw() {
120
120
  const T = '─'.repeat(W - 2); // inner width
121
121
 
122
122
  // ── Top of box ──
123
- process.stdout.write('\x1b[2J\x1b[H');
123
+ // Move cursor to top-left of box area and overwrite in place (no full clear)
124
+ process.stdout.write(`\x1b[${1};1H`);
125
+ process.stdout.write(`\x1b[0J`); // clear from cursor to end of screen
124
126
  process.stdout.write(`\x1b[38;2;77;212;238m┌─${T}─┐\x1b[0m\n`);
125
127
 
126
128
  // ── Banner inside box ──
@@ -219,7 +221,7 @@ function draw() {
219
221
  process.stdout.write(`${c.bold}Σ${c.reset} `);
220
222
  process.stdout.write(`${DIM}${padL(_workers.length, 2)} acc${c.reset} `);
221
223
  process.stdout.write(`${' '.repeat(col.name)} `);
222
- process.stdout.write(`${DIM}${padR(w.lastStatus || '', col.last)}${c.reset} `);
224
+ process.stdout.write(`${DIM}${' '.repeat(col.last)}${c.reset} `);
223
225
  process.stdout.write(`${padL(totalCmds, col.cmds)} `);
224
226
  process.stdout.write(`${padL(rate, col.ok)}% `);
225
227
  process.stdout.write(`${totalCoins > 0 ? c.green + padL('+' + totalCoins.toLocaleString(), col.earned) + c.reset : DIM + padL('—', col.earned) + c.reset} `);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dankgrinder",
3
- "version": "8.39.0",
3
+ "version": "8.40.0",
4
4
  "description": "Dank Memer automation engine — grind coins while you sleep",
5
5
  "bin": {
6
6
  "dankgrinder": "bin/dankgrinder.js"