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 +1 -1
- package/src/commands/serve.js +12 -0
package/package.json
CHANGED
package/src/commands/serve.js
CHANGED
|
@@ -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");
|