@vibegrid/mcp 0.4.0-beta.4 → 0.4.0-beta.5
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/index.js +7 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1555,6 +1555,12 @@ var rpcId = 0;
|
|
|
1555
1555
|
function readPort() {
|
|
1556
1556
|
try {
|
|
1557
1557
|
const raw = fs3.readFileSync(PORT_FILE, "utf-8").trim();
|
|
1558
|
+
if (!raw) return null;
|
|
1559
|
+
if (raw.startsWith("{")) {
|
|
1560
|
+
const parsed = JSON.parse(raw);
|
|
1561
|
+
const port2 = parsed?.port;
|
|
1562
|
+
return typeof port2 === "number" && Number.isFinite(port2) && port2 > 0 ? port2 : null;
|
|
1563
|
+
}
|
|
1558
1564
|
const port = parseInt(raw, 10);
|
|
1559
1565
|
return Number.isFinite(port) && port > 0 ? port : null;
|
|
1560
1566
|
} catch {
|
|
@@ -2274,7 +2280,7 @@ console.warn = (...args) => _origError("[mcp:warn]", ...args);
|
|
|
2274
2280
|
console.error = (...args) => _origError("[mcp:error]", ...args);
|
|
2275
2281
|
async function main() {
|
|
2276
2282
|
configManager.init();
|
|
2277
|
-
const version = true ? "0.4.0-beta.
|
|
2283
|
+
const version = true ? "0.4.0-beta.5" : createRequire(import.meta.url)("../package.json").version;
|
|
2278
2284
|
const server = createMcpServer(version);
|
|
2279
2285
|
const transport = new StdioServerTransport();
|
|
2280
2286
|
await server.connect(transport);
|