tokentracker-cli 0.5.9 → 0.5.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tokentracker-cli",
3
- "version": "0.5.9",
3
+ "version": "0.5.10",
4
4
  "description": "Token usage tracker for AI agent CLIs (Claude Code, Codex, Cursor, Kiro, Gemini, OpenCode, OpenClaw)",
5
5
  "main": "src/cli.js",
6
6
  "bin": {
@@ -26,6 +26,18 @@ async function cmdServe(argv) {
26
26
  }
27
27
  }
28
28
 
29
+ // 0.1 Ensure config.json baseUrl matches the canonical default
30
+ try {
31
+ const { DEFAULT_BASE_URL } = require("../lib/runtime-config");
32
+ const { readJson, writeJson } = require("../lib/fs");
33
+ const cfgPath = path.join(trackerDir, "config.json");
34
+ const cfg = await readJson(cfgPath);
35
+ if (cfg && cfg.baseUrl !== DEFAULT_BASE_URL) {
36
+ cfg.baseUrl = DEFAULT_BASE_URL;
37
+ await writeJson(cfgPath, cfg);
38
+ }
39
+ } catch { /* ignore */ }
40
+
29
41
  // 1. Optional sync
30
42
  if (opts.sync) {
31
43
  process.stdout.write("Syncing local data...\n");