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:
parent
a7dc125850
commit
88ede3783e
1 changed files with 13 additions and 109 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue