Address review feedback: move getDefaultServerParameters to test file

- Moved getDefaultServerParameters from stdio.ts to stdio.test.ts since it's only used in tests
- Reverted unrelated changes to inMemory.ts and inMemory.test.ts
- Kept the core Windows compatibility fix for stdio tests

Co-authored-by: HoberMin <99346635+HoberMin@users.noreply.github.com>
This commit is contained in:
Felix Weinberger 2025-07-08 15:15:50 +01:00
commit 88ede3783e
No known key found for this signature in database

View file

@ -1,5 +1,14 @@
import { JSONRPCMessage } from "../types.js";
import { StdioClientTransport, getDefaultServerParameters } from "./stdio.js";
import { StdioClientTransport, StdioServerParameters } from "./stdio.js";
// Configure default server parameters based on OS
// Uses 'more' command for Windows and 'tee' command for Unix/Linux
const getDefaultServerParameters = (): StdioServerParameters => {
if (process.platform === "win32") {
return { command: "more" };
}
return { command: "/usr/bin/tee" };
};
const serverParameters = getDefaultServerParameters();