dankgrinder 8.89.0 → 8.91.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 (3) hide show
  1. package/lib/grinder.js +19 -15
  2. package/lib/ui.js +21 -14
  3. package/package.json +1 -1
package/lib/grinder.js CHANGED
@@ -3057,42 +3057,46 @@ async function start(apiKey, apiUrl, opts = {}) {
3057
3057
  let finalCoins = 0;
3058
3058
  let finalCmds = 0;
3059
3059
 
3060
- let table = ' ╭───────────────┬────────────────┬──────────┬────────╮\n';
3061
- table += ' │ ACCOUNT │ GAINED │ COMMANDS │ OK % │\n';
3062
- table += ' ├───────────────┼────────────────┼──────────┼────────┤\n';
3060
+ const figlet = require('figlet');
3061
+
3062
+ let table = '';
3063
+
3064
+
3065
+ table += ' ' + c.dim('────────────────────────────────────────────────────────────────────────────────────────────────') + '\n\n';
3066
+ table += ' ' + c.dim('ACCOUNT'.padEnd(25)) + c.dim('GAINED'.padEnd(15)) + c.dim('COMMANDS'.padEnd(10)) + c.dim('OK %') + '\n\n';
3063
3067
 
3064
3068
  for (const wk of workers) {
3065
3069
  const rate = wk.stats.commands > 0 ? ((wk.stats.successes / wk.stats.commands) * 100).toFixed(0) : 0;
3066
3070
  finalCoins += wk.stats.coins || 0;
3067
3071
  finalCmds += wk.stats.commands || 0;
3068
3072
 
3069
- const unRaw = (wk.username || '?').substring(0, 13);
3073
+ const unRaw = (wk.username || '?').substring(0, 23);
3070
3074
  const coinsRaw = '+⏣' + (wk.stats.coins || 0).toLocaleString();
3071
3075
  const cmdsRaw = String(wk.stats.commands || 0);
3072
3076
  const okRaw = rate + '%';
3073
3077
 
3074
- const un = unRaw.padEnd(13);
3075
- const coins = coinsRaw.substring(0, 14).padEnd(14);
3076
- const cmds = cmdsRaw.substring(0, 8).padEnd(8);
3078
+ const un = unRaw.padEnd(25);
3079
+ const coins = coinsRaw.substring(0, 14).padEnd(15);
3080
+ const cmds = cmdsRaw.substring(0, 8).padEnd(10);
3077
3081
  const ok = okRaw.substring(0, 6).padEnd(6);
3078
3082
 
3079
- table += ` ${c.cyan}${un}${c.reset} ${c.green}${coins}${c.reset} ${cmds} ${ok} │\n`;
3083
+ table += ` ${c.cyan}${un}${c.reset} ${c.green}${coins}${c.reset} ${cmds} ${ok}\n`;
3080
3084
  }
3081
3085
 
3082
3086
  if (workers.length === 0) {
3083
- table += ` ${c.dim}${'No workers...'.padEnd(13)}${c.reset} ${''.padEnd(14)} ${''.padEnd(8)} ${''.padEnd(6)} │\n`;
3087
+ table += ` ${c.dim}${'No workers...'.padEnd(25)}${c.reset} ${''.padEnd(15)} ${''.padEnd(10)} ${''.padEnd(6)}\n`;
3084
3088
  }
3085
3089
 
3086
- table += ' ╰───────────────┴────────────────┴──────────┴────────╯\n';
3090
+ table += '\n ' + c.dim('────────────────────────────────────────────────────────────────────────────────────────────────') + '\n';
3087
3091
  process.stdout.write(table);
3088
3092
 
3089
3093
  const memFinal = Math.round((process.memoryUsage?.rss?.() ?? process.memoryUsage().rss) / 1048576);
3090
3094
  const cpm = globalCmdRate.getRate().toFixed(1);
3091
3095
 
3092
- console.log(` ${c.bold}======================================================${c.reset}`);
3093
- console.log(` ${c.bold}TOTAL:${c.reset} ${c.green}+⏣${finalCoins.toLocaleString()}${c.reset} in ${ui.formatUptime()}`);
3094
- console.log(` ${c.bold}STATS:${c.reset} ${finalCmds} commands | ~${cpm} cmd/m | ${memFinal}MB used`);
3095
- console.log(` ${c.bold}======================================================${c.reset}\n`);
3096
+ console.log('\n ' + c.magenta('◆') + ' ' + c.bold('TOTAL') + ' ' + c.green('+⏣' + finalCoins.toLocaleString()) + ' ' + c.dim('in ' + ui.formatUptime()));
3097
+ console.log(' ' + c.cyan('◆') + ' ' + c.bold('STATS') + ' ' + finalCmds + c.dim(' cmds │ ') + '~' + cpm + c.dim(' cmd/m │ ') + memFinal + c.dim('MB RAM'));
3098
+ console.log('\n');
3099
+
3096
3100
 
3097
3101
  // Stop workers immediately (don't wait) — instant shutdown
3098
3102
  for (const wk of workers) {
@@ -3123,7 +3127,7 @@ async function start(apiKey, apiUrl, opts = {}) {
3123
3127
 
3124
3128
  const disResult = redis?.disconnect?.();
3125
3129
  if (disResult && typeof disResult.catch === 'function') disResult.catch(() => {});
3126
- console.log(`${c.green}Goodbye!${c.reset}\n`);
3130
+ console.log(c.magenta + figlet.textSync('GOODBYE!', { font: 'ANSI Shadow' }) + c.reset + '\n');
3127
3131
  // Force exit so Ctrl+C always terminates immediately
3128
3132
  setTimeout(() => process.exit(0), 2000);
3129
3133
  process.exit(0);
package/lib/ui.js CHANGED
@@ -39,7 +39,8 @@ const ACC_COLORS = ['#ff0054', '#ffbd00', '#390099', '#9e0059', '#ff5400', '#00f
39
39
  function getAccountColor(str) {
40
40
  let hash = 0;
41
41
  for (let i = 0; i < str.length; i++) hash = str.charCodeAt(i) + ((hash << 5) - hash);
42
- return chalk.hex(ACC_COLORS[Math.abs(hash) % ACC_COLORS.length]);
42
+ const h = Math.abs(hash) % 360;
43
+ return chalk.hsl(h, 90, 65); // 360 distinct hues, visually scaled for 10k unique accounts!
43
44
  }
44
45
 
45
46
  const STATUS_DOT = {
@@ -147,17 +148,21 @@ function render() {
147
148
  if (w.channel && !w.paused && !w.dashboardPaused) onlineCount++;
148
149
  }
149
150
 
150
- // 1. MODERN BRANDING (Vercel / Claude CLI Style)
151
- // No big flashy ASCII, just a clean sleek badge
152
- out += '\n ' + chalk.bgBlack.white.bold(' DANK GRINDER ') + chalk.gray(' v' + _version) +
153
- chalk.dim(' │ ') + chalk.cyan('● ' + getLoader() + ' Running') + '\n\n';
151
+ // 1. BIG ASCI TITLE IS BACK (With Gradient)
152
+ const titleStr = figlet.textSync('DANK GRINDER', { font: 'ANSI Shadow' });
153
+ out += chalk.bold(applyGradient(titleStr));
154
+ out += ' ' + chalk.dim('v' + _version + ' │ ') + chalk.cyan('● ' + getLoader() + ' Running') + '\n\n';
154
155
 
155
- // 2. MINIMALIST STATS
156
- const profStr = totalCoins > 0 ? '+' + formatBal(totalCoins) : '0';
157
-
158
- out += ' ' + chalk.cyan('◆') + chalk.bold(' ONLINE ') + chalk.white(onlineCount + ' / ' + _workers.length) + '\n';
159
- out += ' ' + chalk.blue('') + chalk.bold(' UPTIME ') + chalk.white(fmtUptime()) + '\n';
160
- out += ' ' + chalk.green('') + chalk.bold(' BALANCE ') + chalk.white('⏣ ' + formatBal(totalBal)) + chalk.gray(' (profit: ' + profStr + ')') + '\n';
156
+ // 2. MINIMALIST STATS + TREND SPARKLINE
157
+ const profStr = totalCoins > 0 ? '+' + formatBal(totalCoins) : '+0';
158
+ const graph = getSparkline();
159
+
160
+ const secOnline = chalk.dim('Online') + ' ' + chalk.bold.cyan(`${onlineCount}/${_workers.length}`);
161
+ const secUptime = chalk.dim('Uptime') + ' ' + chalk.bold.blue(fmtUptime());
162
+ const secBal = chalk.dim('Bank') + ' ' + chalk.bold.green(`⏣ ${formatBal(totalBal)}`) + chalk.greenBright(` (${profStr})`);
163
+ const secTrend = chalk.dim('Trend') + ' ' + chalk.magenta(graph);
164
+
165
+ out += ` ${secOnline} ${chalk.dim('│')} ${secUptime} ${chalk.dim('│')} ${secBal} ${chalk.dim('│')} ${secTrend}\n`;
161
166
 
162
167
  // Divider
163
168
  const divWidth = Math.min(C - 4, 100);
@@ -190,11 +195,12 @@ function render() {
190
195
  activity = chalk.gray('◎');
191
196
  }
192
197
 
193
- const numStr = chalk.dim(String(i + 1).padStart(2, '0'));
198
+ const numStr = chalk.dim('0' + (i + 1).toString().slice(-2));
194
199
  const dot = getDot(w);
195
200
 
196
201
  const nameRaw = trunc(w.username || 'Worker ' + (i+1), wCols.name - 3);
197
- const nameStr = dot.color(dot.dot) + ' ' + chalk.whiteBright(nameRaw);
202
+ // INDIVIDUAL SMART COLORS TRIGGERED HERE
203
+ const nameStr = dot.color(dot.dot) + ' ' + getAccountColor(nameRaw)(chalk.bold(nameRaw));
198
204
 
199
205
  const bVal = w.stats.balance !== undefined ? formatBal(w.stats.balance) : '—';
200
206
  const balRaw = trunc(bVal === '—' ? '—' : bVal, wCols.bal - 1);
@@ -222,11 +228,12 @@ function render() {
222
228
  out += '\n ' + chalk.dim('─'.repeat(divWidth)) + '\n\n';
223
229
 
224
230
  // 4. ACTIVITY STREAM
225
- out += chalk.gray(' ACTIVITY') + '\n';
231
+ out += chalk.gray(' ACTIVITY LOG') + '\n';
226
232
  if (_events.length === 0) {
227
233
  out += chalk.dim(' No recent events.\n');
228
234
  } else {
229
235
  _events.forEach(ev => {
236
+ // Enhanced event log with nice contrast
230
237
  out += ` ${chalk.dim(ev.ts)} ${ev.icon} ${chalk.white(ev.msg)}\n`;
231
238
  });
232
239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dankgrinder",
3
- "version": "8.89.0",
3
+ "version": "8.91.0",
4
4
  "description": "Dank Memer automation engine — grind coins while you sleep",
5
5
  "bin": {
6
6
  "dankgrinder": "bin/dankgrinder.js"