@apdesign/cursor-roi-tracker 0.5.2 → 0.5.3

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": "@apdesign/cursor-roi-tracker",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Collect commit-level AI coding metrics from staged diff and local AI events",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -172,7 +172,7 @@ function ensureDefaultConfig(repoRoot) {
172
172
  ],
173
173
  eventsDirectory: [".cursor/animus-ai-events.jsonl", ".cursor/local-ai-events"],
174
174
  membersFile: ".cursor/enginuity_yunxiao_members.names.json",
175
- serverBaseUrl: "",
175
+ serverBaseUrl: "http://127.0.0.1:4000",
176
176
  silentTokenPath: "/api/cursor-board/auth/silent-token",
177
177
  commitReportPath: "/api/cursor-board/commit-reports",
178
178
  requestTimeoutMs: 5000,
package/src/config.js CHANGED
@@ -13,7 +13,7 @@ function loadConfig(repoRoot) {
13
13
  excludeRegexes: DEFAULT_EXCLUDE_PATTERNS.map((item) => item.source),
14
14
  eventsDirectory: [".cursor/animus-ai-events.jsonl", ".cursor/local-ai-events"],
15
15
  membersFile: null,
16
- serverBaseUrl: null,
16
+ serverBaseUrl: "http://127.0.0.1:4000",
17
17
  silentTokenPath: "/api/cursor-board/auth/silent-token",
18
18
  commitReportPath: "/api/cursor-board/commit-reports",
19
19
  requestTimeoutMs: 5000,
@@ -40,10 +40,10 @@ function loadConfig(repoRoot) {
40
40
  eventsDirectory: normalizeEventsDirectoryConfig(parsed.eventsDirectory, defaults.eventsDirectory),
41
41
  membersFile:
42
42
  typeof parsed.membersFile === "string" ? parsed.membersFile : defaults.membersFile,
43
- serverBaseUrl:
44
- typeof parsed.serverBaseUrl === "string"
45
- ? parsed.serverBaseUrl
46
- : defaults.serverBaseUrl,
43
+ serverBaseUrl: normalizeStringWithFallback(
44
+ parsed.serverBaseUrl,
45
+ defaults.serverBaseUrl
46
+ ),
47
47
  silentTokenPath:
48
48
  typeof parsed.silentTokenPath === "string"
49
49
  ? parsed.silentTokenPath
@@ -62,6 +62,14 @@ function loadConfig(repoRoot) {
62
62
  }
63
63
  }
64
64
 
65
+ function normalizeStringWithFallback(input, fallback) {
66
+ if (typeof input !== "string") {
67
+ return fallback;
68
+ }
69
+ const value = input.trim();
70
+ return value || fallback;
71
+ }
72
+
65
73
  function normalizeEventsDirectoryConfig(input, fallback) {
66
74
  if (typeof input === "string" && input.trim()) {
67
75
  return [input.trim()];