ccgather 2.0.19 → 2.0.21

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/dist/index.js +13 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -295,20 +295,8 @@ async function suspenseDots(message, durationMs = 600) {
295
295
  process.stdout.write("\r" + " ".repeat(50) + "\r");
296
296
  }
297
297
  async function printAnimatedWelcomeBox(user) {
298
- const welcomeLine = `\u{1F44B} ${colors.white.bold(`Welcome back, ${user.username}!`)}`;
299
- const boxWidth = Math.max(getDisplayWidth(welcomeLine) + 4, 40);
300
- const top = colors.dim(` ${box.topLeft}${box.horizontal.repeat(boxWidth)}${box.topRight}`);
301
- const bottom = colors.dim(
302
- ` ${box.bottomLeft}${box.horizontal.repeat(boxWidth)}${box.bottomRight}`
303
- );
304
- console.log(top);
305
- await sleep(20);
306
- const visibleLength = getDisplayWidth(welcomeLine);
307
- const padding = boxWidth - 2 - visibleLength;
308
- const paddedLine = `${box.vertical} ${welcomeLine}${" ".repeat(Math.max(0, padding))} ${box.vertical}`;
309
- console.log(colors.dim(" ") + paddedLine);
310
- await sleep(25);
311
- console.log(bottom);
298
+ console.log(` \u{1F44B} ${colors.white.bold(`Welcome back, ${user.username}!`)}`);
299
+ await sleep(50);
312
300
  }
313
301
  var import_chalk, import_string_width, VERSION, colors, LOGO, LOGO_COMPACT, TAGLINE, SLOGAN, boxRound, box, HEADER_WIDTH, LEVELS;
314
302
  var init_ui = __esm({
@@ -316,7 +304,7 @@ var init_ui = __esm({
316
304
  "use strict";
317
305
  import_chalk = __toESM(require("chalk"));
318
306
  import_string_width = __toESM(require("string-width"));
319
- VERSION = true ? "2.0.19" : "0.0.0";
307
+ VERSION = true ? "2.0.21" : "0.0.0";
320
308
  colors = {
321
309
  primary: import_chalk.default.hex("#DA7756"),
322
310
  // Claude coral
@@ -1290,8 +1278,10 @@ async function submit(options) {
1290
1278
  }
1291
1279
  const processSpinner = (0, import_ora2.default)({
1292
1280
  text: "Processing scan data...",
1293
- color: "cyan"
1281
+ color: "cyan",
1282
+ indent: 2
1294
1283
  }).start();
1284
+ await sleep(300);
1295
1285
  if (!scannedData) {
1296
1286
  processSpinner.fail(colors.error("No usage data found."));
1297
1287
  console.log(` ${colors.muted("Make sure you have used Claude Code at least once.")}
@@ -1299,7 +1289,7 @@ async function submit(options) {
1299
1289
  process.exit(1);
1300
1290
  }
1301
1291
  const usageData = ccgatherToUsageData(scannedData);
1302
- await sleep(350);
1292
+ await sleep(250);
1303
1293
  processSpinner.succeed(colors.success("Scan complete!"));
1304
1294
  console.log();
1305
1295
  const formatDate = (dateStr) => {
@@ -1478,11 +1468,13 @@ async function submit(options) {
1478
1468
  console.log();
1479
1469
  console.log(sectionHeader("\u2B06\uFE0F", "Level Progress"));
1480
1470
  console.log();
1481
- const previousLevel = result.previous?.previousLevel;
1482
- const serverLevel = result.currentLevel || currentLevel.level;
1471
+ const previousTokens = result.previous?.totalTokens || 0;
1472
+ const previousLevelInfo = getLevelProgress(previousTokens);
1473
+ const previousLevel = previousLevelInfo.current.level;
1474
+ const currentLevelNum = currentLevel.level;
1483
1475
  let levelChangeText = "";
1484
- if (previousLevel && serverLevel > previousLevel) {
1485
- const levelChange = serverLevel - previousLevel;
1476
+ if (previousTokens > 0 && currentLevelNum > previousLevel) {
1477
+ const levelChange = currentLevelNum - previousLevel;
1486
1478
  levelChangeText = ` ${colors.success(`\u2191${levelChange}`)}`;
1487
1479
  }
1488
1480
  await sleep(200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccgather",
3
- "version": "2.0.19",
3
+ "version": "2.0.21",
4
4
  "description": "CLI tool for syncing Claude Code usage data to CCgather leaderboard",
5
5
  "bin": {
6
6
  "ccgather": "dist/index.js",