ccclub 0.2.73 → 0.2.74
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 +13 -13
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -937,16 +937,16 @@ function printGroup(data, code, period, config, showCache = false) {
|
|
|
937
937
|
const hasUsage = data.rankings.some((r) => r.usageSnapshot);
|
|
938
938
|
const head = ["#", "Name", "Cost", "Tokens"];
|
|
939
939
|
const widths = [5, 20, 12, 10];
|
|
940
|
-
if (hasUsage) {
|
|
941
|
-
head.push("Usage 7d");
|
|
942
|
-
widths.push(10);
|
|
943
|
-
}
|
|
944
940
|
if (hasPlan) {
|
|
945
941
|
head.push("Monthly ROI");
|
|
946
942
|
widths.push(15);
|
|
947
943
|
}
|
|
948
944
|
head.push("Chats", "$/Chat");
|
|
949
945
|
widths.push(8, 9);
|
|
946
|
+
if (hasUsage) {
|
|
947
|
+
head.push("Usage 7d");
|
|
948
|
+
widths.push(10);
|
|
949
|
+
}
|
|
950
950
|
const table = new Table({
|
|
951
951
|
head: head.map((h) => chalk6.cyan(h)),
|
|
952
952
|
style: { head: [], border: [] },
|
|
@@ -965,14 +965,6 @@ function printGroup(data, code, period, config, showCache = false) {
|
|
|
965
965
|
c(`$${entry.costUSD.toFixed(2)}`),
|
|
966
966
|
c(formatTokens(tokens))
|
|
967
967
|
];
|
|
968
|
-
if (hasUsage) {
|
|
969
|
-
if (entry.usageSnapshot) {
|
|
970
|
-
const { sevenDay } = entry.usageSnapshot;
|
|
971
|
-
row.push(c(`${Math.round(sevenDay)}%`));
|
|
972
|
-
} else {
|
|
973
|
-
row.push(chalk6.dim("\u2014"));
|
|
974
|
-
}
|
|
975
|
-
}
|
|
976
968
|
if (hasPlan) {
|
|
977
969
|
if (entry.plan && entry.plan !== "api") {
|
|
978
970
|
const price = PLAN_PRICES[entry.plan];
|
|
@@ -989,6 +981,14 @@ function printGroup(data, code, period, config, showCache = false) {
|
|
|
989
981
|
}
|
|
990
982
|
row.push(c(String(entry.chatCount)));
|
|
991
983
|
row.push(entry.chatCount > 0 ? c(`$${(entry.costUSD / entry.chatCount).toFixed(2)}`) : chalk6.dim("\u2014"));
|
|
984
|
+
if (hasUsage) {
|
|
985
|
+
if (entry.usageSnapshot) {
|
|
986
|
+
const { sevenDay } = entry.usageSnapshot;
|
|
987
|
+
row.push(c(`${Math.round(sevenDay)}%`));
|
|
988
|
+
} else {
|
|
989
|
+
row.push(chalk6.dim("\u2014"));
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
992
|
table.push(row);
|
|
993
993
|
}
|
|
994
994
|
console.log(table.toString());
|
|
@@ -1338,7 +1338,7 @@ async function hookCommand() {
|
|
|
1338
1338
|
}
|
|
1339
1339
|
|
|
1340
1340
|
// src/index.ts
|
|
1341
|
-
var VERSION = "0.2.
|
|
1341
|
+
var VERSION = "0.2.74";
|
|
1342
1342
|
startUpdateCheck(VERSION);
|
|
1343
1343
|
var program = new Command();
|
|
1344
1344
|
program.name("ccclub").description("Claude Code leaderboard among friends").version(VERSION, "-v, -V, --version");
|