Renombrar paquete a @nucleoriofrio/webmcp y fix crash de stdin
- Renombrar de @jason.today/webmcp a @nucleoriofrio/webmcp en package.json, config.js, websocket-server.js, build/index.js y README - Fix crash de stdin cuando no hay TTY: agregar check process.stdin.isTTY y try/catch en setRawMode - Bump version a 0.2.0
This commit is contained in:
@@ -1569,7 +1569,7 @@ async function daemonize() {
|
||||
console.error(`Server started as daemon with PID: ${child.pid}`);
|
||||
console.error(`Use 'node websocket-server.js --quit' to stop the server`);
|
||||
console.error(`Use 'node websocket-server.js --new <encoded-pair>' to authorize a channel-token pair`);
|
||||
console.error(`Put 'npx @jason.today/webmcp --mcp' in your mcp client config`);
|
||||
console.error(`Put 'npx @nucleoriofrio/webmcp --mcp' in your mcp client config`);
|
||||
if (!CONFIG.startMCP) {
|
||||
process.exit(0);
|
||||
}
|
||||
@@ -1730,7 +1730,7 @@ const main = async () => {
|
||||
console.error(`Server is already running with PID: ${serverStatus.pid}`);
|
||||
console.error(`Use 'node websocket-server.js --quit' to stop the server`);
|
||||
console.error(`Use 'node websocket-server.js --new <encoded-pair>' to authorize a channel-token pair`);
|
||||
console.error(`Put 'npx @jason.today/webmcp --mcp' in your mcp client config`);
|
||||
console.error(`Put 'npx @nucleoriofrio/webmcp --mcp' in your mcp client config`);
|
||||
if (CONFIG.startMCP) {
|
||||
return;
|
||||
} else {
|
||||
@@ -1801,15 +1801,19 @@ const main = async () => {
|
||||
process.on('SIGTERM', () => shutdownGracefully('SIGTERM'));
|
||||
|
||||
// Enable keyboard input handling for CTRL+C on Windows
|
||||
if (process.platform === 'win32') {
|
||||
process.stdin.setRawMode(true);
|
||||
process.stdin.resume();
|
||||
process.stdin.on('data', (data) => {
|
||||
// Check for CTRL+C (03 in hex)
|
||||
if (data.length === 1 && data[0] === 0x03) {
|
||||
shutdownGracefully('CTRL+C');
|
||||
}
|
||||
});
|
||||
if (process.platform === 'win32' && process.stdin.isTTY) {
|
||||
try {
|
||||
process.stdin.setRawMode(true);
|
||||
process.stdin.resume();
|
||||
process.stdin.on('data', (data) => {
|
||||
// Check for CTRL+C (03 in hex)
|
||||
if (data.length === 1 && data[0] === 0x03) {
|
||||
shutdownGracefully('CTRL+C');
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
// stdin not available, ignore
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user