ccclub 0.2.84 → 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 +20 -40
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -688,40 +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"));
|
|
708
|
+
function printQuickStart() {
|
|
716
709
|
console.log("");
|
|
717
|
-
console.log(chalk4.dim("
|
|
718
|
-
console.log(chalk4.white(" ccclub -d 1"));
|
|
719
|
-
console.log("");
|
|
720
|
-
console.log(chalk4.dim(" Open the dashboard in browser:"));
|
|
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"));
|
|
710
|
+
console.log(chalk4.dim(" Run ") + chalk4.white("ccclub") + chalk4.dim(" to see the leaderboard. ") + chalk4.white("ccclub -h") + chalk4.dim(" for all commands."));
|
|
725
711
|
console.log("");
|
|
726
712
|
}
|
|
727
713
|
|
|
@@ -795,16 +781,7 @@ async function joinCommand(inviteCode) {
|
|
|
795
781
|
await ensureGlobalInstall();
|
|
796
782
|
}
|
|
797
783
|
console.log("");
|
|
798
|
-
console.log(chalk5.
|
|
799
|
-
console.log("");
|
|
800
|
-
console.log(chalk5.dim(" See the leaderboard:"));
|
|
801
|
-
console.log(chalk5.white(" ccclub"));
|
|
802
|
-
console.log("");
|
|
803
|
-
console.log(chalk5.dim(" Yesterday / 7 days / 30 days / all time:"));
|
|
804
|
-
console.log(chalk5.white(" ccclub -d 1"));
|
|
805
|
-
console.log("");
|
|
806
|
-
console.log(chalk5.dim(" Open the dashboard in browser:"));
|
|
807
|
-
console.log(chalk5.white(` https://ccclub.dev/g/${data.groupCode}`));
|
|
784
|
+
console.log(chalk5.dim(" Run ") + chalk5.white("ccclub") + chalk5.dim(" to see the leaderboard. ") + chalk5.white("ccclub -h") + chalk5.dim(" for all commands."));
|
|
808
785
|
console.log("");
|
|
809
786
|
}
|
|
810
787
|
|
|
@@ -1065,6 +1042,9 @@ function printGroup(data, code, period, config, showCache = false, showAll = fal
|
|
|
1065
1042
|
console.log(chalk6.dim(` ${hiddenCount} inactive member${hiddenCount > 1 ? "s" : ""} hidden \xB7 ccclub --all to show`));
|
|
1066
1043
|
}
|
|
1067
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
|
+
}
|
|
1068
1048
|
if (hasPlan) {
|
|
1069
1049
|
const me = data.rankings.find((r) => r.userId === config.userId);
|
|
1070
1050
|
if (me && !me.plan) {
|
|
@@ -1175,7 +1155,7 @@ async function profileCommand(options) {
|
|
|
1175
1155
|
console.log(` Plan: ${profile.plan ? PLAN_LABELS[profile.plan] || profile.plan : chalk7.dim("(not set)")}`);
|
|
1176
1156
|
console.log(` URL: ${profile.url || chalk7.dim("(not set)")}`);
|
|
1177
1157
|
console.log();
|
|
1178
|
-
console.log(chalk7.dim(" Update: ccclub profile --name <name> --avatar <url> --
|
|
1158
|
+
console.log(chalk7.dim(" Update: ccclub profile --name <name> --avatar <url> --plan <plan>"));
|
|
1179
1159
|
console.log();
|
|
1180
1160
|
} catch (err) {
|
|
1181
1161
|
spinner2.fail(`Error: ${formatFetchError(err)}`);
|
|
@@ -1304,10 +1284,10 @@ async function createGroupCommand() {
|
|
|
1304
1284
|
await saveConfig(config);
|
|
1305
1285
|
}
|
|
1306
1286
|
spinner.succeed(`Created "${data.groupName}"`);
|
|
1307
|
-
console.log(
|
|
1308
|
-
|
|
1309
|
-
console.log(
|
|
1310
|
-
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}`));
|
|
1311
1291
|
} finally {
|
|
1312
1292
|
rl.close();
|
|
1313
1293
|
}
|
|
@@ -1405,7 +1385,7 @@ async function hookCommand() {
|
|
|
1405
1385
|
}
|
|
1406
1386
|
|
|
1407
1387
|
// src/index.ts
|
|
1408
|
-
var VERSION = "0.
|
|
1388
|
+
var VERSION = "0.3.0";
|
|
1409
1389
|
startUpdateCheck(VERSION);
|
|
1410
1390
|
var program = new Command();
|
|
1411
1391
|
program.name("ccclub").description("Claude Code leaderboard among friends").version(VERSION, "-v, -V, --version");
|