import { spawn, ChildProcess } from "child_process";
// Quick test of the globally installed TypeScript version
function quickTestTypeScript(): void {
console.log("Quick test of globally installed Translations MCP server...\n");
const serverProcess: ChildProcess = spawn("translations-mcp.cmd", [], {
stdio: ["pipe", "pipe", "pipe"],
shell: true,
});
// Just test that it starts up correctly
serverProcess.stderr?.on("data", (data: Buffer) => {
console.log(
"✅ Translations MCP server started successfully:",
data.toString().trim()
);
serverProcess.kill(); // Kill it immediately after it starts
});
serverProcess.on("close", (code: number | null) => {
console.log(
"✅ Test completed. Server can be started and stopped cleanly."
);
});
// Safety timeout
setTimeout(() => {
serverProcess.kill();
console.log("✅ Global installation test completed successfully!");
}, 2000);
}
quickTestTypeScript();