@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 +1 -1
- package/src/cli-install-hooks.js +1 -1
- package/src/config.js +13 -5
package/package.json
CHANGED
package/src/cli-install-hooks.js
CHANGED
|
@@ -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:
|
|
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
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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()];
|