@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/index.js
CHANGED
|
@@ -4631,7 +4631,7 @@ function generateLoginHTML(options) {
|
|
|
4631
4631
|
if (response.ok) {
|
|
4632
4632
|
const data = await response.json();
|
|
4633
4633
|
sessionStorage.setItem('authToken', token);
|
|
4634
|
-
window.location.href = '/
|
|
4634
|
+
window.location.href = '/'; // Dashboard is served at root path
|
|
4635
4635
|
} else if (response.status === 401) {
|
|
4636
4636
|
showError('Invalid token. Please check and try again.');
|
|
4637
4637
|
} else {
|
|
@@ -7568,7 +7568,24 @@ var DashboardApprovalChannel = class {
|
|
|
7568
7568
|
}
|
|
7569
7569
|
resolve();
|
|
7570
7570
|
});
|
|
7571
|
-
this.httpServer.on("error",
|
|
7571
|
+
this.httpServer.on("error", (err) => {
|
|
7572
|
+
if (err.code === "EADDRINUSE") {
|
|
7573
|
+
const port = this.config.port;
|
|
7574
|
+
process.stderr.write(
|
|
7575
|
+
`
|
|
7576
|
+
\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
|
|
7577
|
+
\u2551 Port ${port} is already in use. \u2551
|
|
7578
|
+
\u2551 \u2551
|
|
7579
|
+
\u2551 Another Sanctuary Dashboard may still be running. \u2551
|
|
7580
|
+
\u2551 To fix: lsof -ti:${port} | xargs kill \u2551
|
|
7581
|
+
\u2551 Then restart the dashboard. \u2551
|
|
7582
|
+
\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
|
|
7583
|
+
|
|
7584
|
+
`
|
|
7585
|
+
);
|
|
7586
|
+
}
|
|
7587
|
+
reject(err);
|
|
7588
|
+
});
|
|
7572
7589
|
});
|
|
7573
7590
|
}
|
|
7574
7591
|
/**
|
|
@@ -7848,7 +7865,7 @@ var DashboardApprovalChannel = class {
|
|
|
7848
7865
|
if (!this.checkAuth(req, url, res)) return;
|
|
7849
7866
|
if (!this.checkRateLimit(req, res, "general")) return;
|
|
7850
7867
|
try {
|
|
7851
|
-
if (method === "GET" && url.pathname === "/") {
|
|
7868
|
+
if (method === "GET" && (url.pathname === "/" || url.pathname === "/dashboard")) {
|
|
7852
7869
|
this.serveDashboard(res);
|
|
7853
7870
|
} else if (method === "GET" && url.pathname === "/events") {
|
|
7854
7871
|
this.handleSSE(req, res);
|