ccclub 0.2.85 → 0.3.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/dist/index.js +19 -45
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -688,43 +688,26 @@ async function initCommand() {
|
|
|
688
688
|
});
|
|
689
689
|
const hookOk = await installHook();
|
|
690
690
|
spinner.succeed("ccclub initialized!");
|
|
691
|
-
|
|
692
|
-
console.log(chalk4.bold(" Your invite code:"));
|
|
693
|
-
console.log(chalk4.cyan.bold(`
|
|
694
|
-
${data.groupCode}
|
|
695
|
-
`));
|
|
696
|
-
console.log(chalk4.dim(" Share with friends: ") + chalk4.white(`npx ccclub join ${data.groupCode}`));
|
|
697
|
-
if (hookOk) {
|
|
698
|
-
console.log(chalk4.dim(" Auto-sync: on (via Claude Code hook)"));
|
|
699
|
-
} else {
|
|
691
|
+
if (!hookOk) {
|
|
700
692
|
console.log(chalk4.dim(' Tip: run "ccclub hook" to set up auto-sync'));
|
|
701
693
|
}
|
|
702
694
|
console.log("");
|
|
695
|
+
console.log(chalk4.bold(" Invite friends to compete:"));
|
|
696
|
+
console.log("");
|
|
697
|
+
console.log(` ${chalk4.cyan.underline(`${apiUrl}/invite/${data.groupCode}`)}`);
|
|
698
|
+
console.log("");
|
|
699
|
+
console.log(chalk4.dim(` or: npx ccclub join ${data.groupCode}`));
|
|
700
|
+
console.log("");
|
|
703
701
|
await doSync(true);
|
|
704
702
|
await ensureGlobalInstall();
|
|
705
|
-
printQuickStart(
|
|
703
|
+
printQuickStart();
|
|
706
704
|
} finally {
|
|
707
705
|
rl.close();
|
|
708
706
|
}
|
|
709
707
|
}
|
|
710
|
-
function printQuickStart(
|
|
711
|
-
console.log("");
|
|
712
|
-
console.log(chalk4.bold(" What's next?"));
|
|
713
|
-
console.log("");
|
|
714
|
-
console.log(chalk4.dim(" See the leaderboard:"));
|
|
715
|
-
console.log(chalk4.white(" ccclub"));
|
|
716
|
-
console.log("");
|
|
717
|
-
console.log(chalk4.dim(" Yesterday / 7 days / 30 days / all time:"));
|
|
718
|
-
console.log(chalk4.white(" ccclub -d 1"));
|
|
708
|
+
function printQuickStart() {
|
|
719
709
|
console.log("");
|
|
720
|
-
console.log(chalk4.dim("
|
|
721
|
-
console.log(chalk4.white(` https://ccclub.dev/g/${groupCode}`));
|
|
722
|
-
console.log("");
|
|
723
|
-
console.log(chalk4.dim(" Check what data gets uploaded:"));
|
|
724
|
-
console.log(chalk4.white(" ccclub show-data"));
|
|
725
|
-
console.log("");
|
|
726
|
-
console.log(chalk4.dim(" All commands:"));
|
|
727
|
-
console.log(chalk4.white(" ccclub -h"));
|
|
710
|
+
console.log(chalk4.dim(" Run ") + chalk4.white("ccclub") + chalk4.dim(" to see the leaderboard. ") + chalk4.white("ccclub -h") + chalk4.dim(" for all commands."));
|
|
728
711
|
console.log("");
|
|
729
712
|
}
|
|
730
713
|
|
|
@@ -798,19 +781,7 @@ async function joinCommand(inviteCode) {
|
|
|
798
781
|
await ensureGlobalInstall();
|
|
799
782
|
}
|
|
800
783
|
console.log("");
|
|
801
|
-
console.log(chalk5.
|
|
802
|
-
console.log("");
|
|
803
|
-
console.log(chalk5.dim(" See the leaderboard:"));
|
|
804
|
-
console.log(chalk5.white(" ccclub"));
|
|
805
|
-
console.log("");
|
|
806
|
-
console.log(chalk5.dim(" Yesterday / 7 days / 30 days / all time:"));
|
|
807
|
-
console.log(chalk5.white(" ccclub -d 1"));
|
|
808
|
-
console.log("");
|
|
809
|
-
console.log(chalk5.dim(" Open the dashboard in browser:"));
|
|
810
|
-
console.log(chalk5.white(` https://ccclub.dev/g/${data.groupCode}`));
|
|
811
|
-
console.log("");
|
|
812
|
-
console.log(chalk5.dim(" All commands:"));
|
|
813
|
-
console.log(chalk5.white(" ccclub -h"));
|
|
784
|
+
console.log(chalk5.dim(" Run ") + chalk5.white("ccclub") + chalk5.dim(" to see the leaderboard. ") + chalk5.white("ccclub -h") + chalk5.dim(" for all commands."));
|
|
814
785
|
console.log("");
|
|
815
786
|
}
|
|
816
787
|
|
|
@@ -1071,6 +1042,9 @@ function printGroup(data, code, period, config, showCache = false, showAll = fal
|
|
|
1071
1042
|
console.log(chalk6.dim(` ${hiddenCount} inactive member${hiddenCount > 1 ? "s" : ""} hidden \xB7 ccclub --all to show`));
|
|
1072
1043
|
}
|
|
1073
1044
|
console.log(chalk6.dim(` Dashboard: ${config.apiUrl}/g/${code}`));
|
|
1045
|
+
if (code !== "global" && data.group.memberCount < 5) {
|
|
1046
|
+
console.log(chalk6.dim(" Invite: ") + chalk6.cyan.underline(`${config.apiUrl}/invite/${code}`));
|
|
1047
|
+
}
|
|
1074
1048
|
if (hasPlan) {
|
|
1075
1049
|
const me = data.rankings.find((r) => r.userId === config.userId);
|
|
1076
1050
|
if (me && !me.plan) {
|
|
@@ -1310,10 +1284,10 @@ async function createGroupCommand() {
|
|
|
1310
1284
|
await saveConfig(config);
|
|
1311
1285
|
}
|
|
1312
1286
|
spinner.succeed(`Created "${data.groupName}"`);
|
|
1313
|
-
console.log(
|
|
1314
|
-
|
|
1315
|
-
console.log(
|
|
1316
|
-
console.log(chalk9.dim(`
|
|
1287
|
+
console.log("");
|
|
1288
|
+
console.log(` ${chalk9.cyan.underline(`${config.apiUrl}/invite/${data.groupCode}`)}`);
|
|
1289
|
+
console.log("");
|
|
1290
|
+
console.log(chalk9.dim(` or: npx ccclub join ${data.groupCode}`));
|
|
1317
1291
|
} finally {
|
|
1318
1292
|
rl.close();
|
|
1319
1293
|
}
|
|
@@ -1411,7 +1385,7 @@ async function hookCommand() {
|
|
|
1411
1385
|
}
|
|
1412
1386
|
|
|
1413
1387
|
// src/index.ts
|
|
1414
|
-
var VERSION = "0.
|
|
1388
|
+
var VERSION = "0.3.0";
|
|
1415
1389
|
startUpdateCheck(VERSION);
|
|
1416
1390
|
var program = new Command();
|
|
1417
1391
|
program.name("ccclub").description("Claude Code leaderboard among friends").version(VERSION, "-v, -V, --version");
|