@sanctuary-framework/mcp-server 0.5.15 → 0.5.16
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.cjs +20 -3
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +20 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +20 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2341,7 +2341,7 @@ function generateLoginHTML(options) {
|
|
|
2341
2341
|
if (response.ok) {
|
|
2342
2342
|
const data = await response.json();
|
|
2343
2343
|
sessionStorage.setItem('authToken', token);
|
|
2344
|
-
window.location.href = '/
|
|
2344
|
+
window.location.href = '/'; // Dashboard is served at root path
|
|
2345
2345
|
} else if (response.status === 401) {
|
|
2346
2346
|
showError('Invalid token. Please check and try again.');
|
|
2347
2347
|
} else {
|
|
@@ -5292,7 +5292,24 @@ var init_dashboard = __esm({
|
|
|
5292
5292
|
}
|
|
5293
5293
|
resolve();
|
|
5294
5294
|
});
|
|
5295
|
-
this.httpServer.on("error",
|
|
5295
|
+
this.httpServer.on("error", (err) => {
|
|
5296
|
+
if (err.code === "EADDRINUSE") {
|
|
5297
|
+
const port = this.config.port;
|
|
5298
|
+
process.stderr.write(
|
|
5299
|
+
`
|
|
5300
|
+
\u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
|
|
5301
|
+
\u2551 Port ${port} is already in use. \u2551
|
|
5302
|
+
\u2551 \u2551
|
|
5303
|
+
\u2551 Another Sanctuary Dashboard may still be running. \u2551
|
|
5304
|
+
\u2551 To fix: lsof -ti:${port} | xargs kill \u2551
|
|
5305
|
+
\u2551 Then restart the dashboard. \u2551
|
|
5306
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D
|
|
5307
|
+
|
|
5308
|
+
`
|
|
5309
|
+
);
|
|
5310
|
+
}
|
|
5311
|
+
reject(err);
|
|
5312
|
+
});
|
|
5296
5313
|
});
|
|
5297
5314
|
}
|
|
5298
5315
|
/**
|
|
@@ -5572,7 +5589,7 @@ var init_dashboard = __esm({
|
|
|
5572
5589
|
if (!this.checkAuth(req, url, res)) return;
|
|
5573
5590
|
if (!this.checkRateLimit(req, res, "general")) return;
|
|
5574
5591
|
try {
|
|
5575
|
-
if (method === "GET" && url.pathname === "/") {
|
|
5592
|
+
if (method === "GET" && (url.pathname === "/" || url.pathname === "/dashboard")) {
|
|
5576
5593
|
this.serveDashboard(res);
|
|
5577
5594
|
} else if (method === "GET" && url.pathname === "/events") {
|
|
5578
5595
|
this.handleSSE(req, res);
|