tanuki-telemetry 1.3.0 → 1.3.2
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/dist/cli.js +25 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -46,7 +46,28 @@ async function update() {
|
|
|
46
46
|
if (typeof installAllTemplateCommands === "function") {
|
|
47
47
|
await installAllTemplateCommands();
|
|
48
48
|
}
|
|
49
|
-
// 2.
|
|
49
|
+
// 2. Build MCP server + frontend from source
|
|
50
|
+
console.log(" Building MCP server...");
|
|
51
|
+
try {
|
|
52
|
+
execSync("cd ~/.claude/mcp-servers/telemetry && npm run build 2>&1", {
|
|
53
|
+
stdio: "inherit", timeout: 60000,
|
|
54
|
+
});
|
|
55
|
+
execSync("cd ~/.claude/mcp-servers/telemetry/frontend && npm run build 2>&1", {
|
|
56
|
+
stdio: "inherit", timeout: 120000,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
console.log(" Source build failed — continuing with existing dist");
|
|
61
|
+
}
|
|
62
|
+
// 3. Stop existing container
|
|
63
|
+
console.log(" Stopping existing dashboard...");
|
|
64
|
+
try {
|
|
65
|
+
execSync("docker compose -f ~/.claude/mcp-servers/telemetry/docker-compose.yml down 2>&1", { stdio: "inherit", timeout: 30000 });
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
// May not be running, that's fine
|
|
69
|
+
}
|
|
70
|
+
// 3. Rebuild Docker image
|
|
50
71
|
console.log(" Rebuilding Docker image...");
|
|
51
72
|
try {
|
|
52
73
|
execSync("docker compose -f ~/.claude/mcp-servers/telemetry/docker-compose.yml build --no-cache 2>&1", { stdio: "inherit", timeout: 300000 });
|
|
@@ -55,13 +76,13 @@ async function update() {
|
|
|
55
76
|
console.log(" Docker rebuild failed — is Docker running?");
|
|
56
77
|
return;
|
|
57
78
|
}
|
|
58
|
-
//
|
|
59
|
-
console.log("
|
|
79
|
+
// 4. Start fresh container
|
|
80
|
+
console.log(" Starting dashboard...");
|
|
60
81
|
try {
|
|
61
82
|
execSync("docker compose -f ~/.claude/mcp-servers/telemetry/docker-compose.yml up dashboard -d 2>&1", { stdio: "inherit", timeout: 60000 });
|
|
62
83
|
}
|
|
63
84
|
catch {
|
|
64
|
-
console.log("
|
|
85
|
+
console.log(" Start failed — try manually: docker compose up dashboard -d");
|
|
65
86
|
return;
|
|
66
87
|
}
|
|
67
88
|
console.log("\n Update complete! Dashboard at http://localhost:3333\n");
|