codeusage-cli 0.1.18 → 0.1.20

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.cjs +8 -5
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -29131,6 +29131,9 @@ Cleaning up...`));
29131
29131
  `));
29132
29132
  });
29133
29133
 
29134
+ // src/hooks/stop.ts
29135
+ var import_path6 = __toESM(require("path"));
29136
+
29134
29137
  // src/lib/session-log.ts
29135
29138
  var import_promises14 = __toESM(require("fs/promises"));
29136
29139
  var import_path4 = __toESM(require("path"));
@@ -29798,7 +29801,7 @@ async function getGitRoot(cwd) {
29798
29801
  const { stdout } = await execa("git", ["rev-parse", "--show-toplevel"], {
29799
29802
  cwd
29800
29803
  });
29801
- return stdout.trim();
29804
+ return import_path4.default.normalize(stdout.trim());
29802
29805
  } catch {
29803
29806
  return null;
29804
29807
  }
@@ -29815,7 +29818,7 @@ function getSessionParser(providerId) {
29815
29818
  return SESSION_PARSERS[providerId];
29816
29819
  }
29817
29820
  function getClaudeProjectHash(cwd) {
29818
- return cwd.replace(/[/ ]/g, "-");
29821
+ return cwd.replace(/[^\w-]/g, "-");
29819
29822
  }
29820
29823
  async function findLatestClaudeSession(projectPath) {
29821
29824
  try {
@@ -30285,7 +30288,7 @@ function calculateDelta(current, previous) {
30285
30288
  }
30286
30289
 
30287
30290
  // src/hooks/stop.ts
30288
- var CLI_VERSION = "0.1.18";
30291
+ var CLI_VERSION = "0.1.20";
30289
30292
  var hookStopCommand = new Command("stop").description("Handle AI coding tool stop hook (internal)").option("--dry-run", "Parse session but don't send to API").option("--provider <provider>", "Provider ID (claude_code or codex)").action(async (options) => {
30290
30293
  if (!isConfigured()) {
30291
30294
  return;
@@ -30313,7 +30316,7 @@ var hookStopCommand = new Command("stop").description("Handle AI coding tool sto
30313
30316
  let projectSlug = config2.project_overrides[effectiveCwd];
30314
30317
  if (!projectSlug) {
30315
30318
  projectSlug = await detectProjectSlug(effectiveCwd);
30316
- if (projectSlug === effectiveCwd.split("/").pop()) {
30319
+ if (projectSlug === import_path6.default.basename(effectiveCwd)) {
30317
30320
  console.log(source_default.dim("Tip: Set a project name: codeusage project set <name>"));
30318
30321
  }
30319
30322
  }
@@ -30455,7 +30458,7 @@ var hookNotificationCommand = new Command("notification").description("Handle AI
30455
30458
 
30456
30459
  // src/index.ts
30457
30460
  var program2 = new Command;
30458
- program2.name("codeusage").description("CLI for Codeusage - AI coding tool intelligence platform").version("0.1.18");
30461
+ program2.name("codeusage").description("CLI for Codeusage - AI coding tool intelligence platform").version("0.1.20");
30459
30462
  program2.addCommand(initCommand);
30460
30463
  program2.addCommand(statusCommand);
30461
30464
  program2.addCommand(projectCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codeusage-cli",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "CLI for Codeusage - AI coding tool intelligence platform",
5
5
  "author": "Hashim",
6
6
  "license": "MIT",