ccclub 0.2.7 → 0.2.8
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 +2 -24
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -326,7 +326,7 @@ function aggregateToBlocks(entries, humanTurns = []) {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
// src/commands/sync.ts
|
|
329
|
-
var SYNC_FORMAT_VERSION = "
|
|
329
|
+
var SYNC_FORMAT_VERSION = "4";
|
|
330
330
|
function getSyncVersionPath() {
|
|
331
331
|
return join4(homedir4(), CCCLUB_CONFIG_DIR, "sync-version");
|
|
332
332
|
}
|
|
@@ -789,31 +789,9 @@ async function hookCommand() {
|
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
|
|
792
|
-
// src/global-install.ts
|
|
793
|
-
import { exec } from "child_process";
|
|
794
|
-
import chalk9 from "chalk";
|
|
795
|
-
function run(cmd) {
|
|
796
|
-
return new Promise((resolve) => {
|
|
797
|
-
exec(cmd, (err, stdout4) => resolve(err ? "" : stdout4.trim()));
|
|
798
|
-
});
|
|
799
|
-
}
|
|
800
|
-
async function ensureGlobalInstall() {
|
|
801
|
-
const globalList = await run("npm list -g ccclub --depth=0");
|
|
802
|
-
if (globalList.includes("ccclub@")) return;
|
|
803
|
-
console.log(chalk9.dim("\n Installing ccclub globally so you can run it directly..."));
|
|
804
|
-
const result = await run("npm install -g ccclub");
|
|
805
|
-
if (result) {
|
|
806
|
-
console.log(chalk9.green(" Done!") + chalk9.dim(" You can now use ") + chalk9.white("ccclub") + chalk9.dim(" directly."));
|
|
807
|
-
} else {
|
|
808
|
-
console.log(chalk9.dim(" Could not auto-install. Run manually:"));
|
|
809
|
-
console.log(chalk9.white(" npm install -g ccclub"));
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
|
|
813
792
|
// src/index.ts
|
|
814
793
|
var program = new Command();
|
|
815
|
-
program.name("ccclub").description("CCClub - Compare Claude Code usage with friends").version("0.2.
|
|
816
|
-
program.hook("postAction", () => ensureGlobalInstall());
|
|
794
|
+
program.name("ccclub").description("CCClub - Compare Claude Code usage with friends").version("0.2.8");
|
|
817
795
|
program.command("init").description("Initialize CCClub (one-time setup)").action(initCommand);
|
|
818
796
|
program.command("join").description("Join a friend's group").argument("<invite-code>", "6-character invite code").action(joinCommand);
|
|
819
797
|
program.command("sync").description("Sync local usage data to server").option("-s, --silent", "No output (used by auto-sync hook)").option("-f, --full", "Force full re-sync of all data").action(syncCommand);
|