* @internal Test seam: drive the demux off a provided stdin/stdout pair * instead of spawning a binary. Used by the transport unit tests, mirroring * the Python test that injects a fake process.
(stdin: Writable, stdout: Readable)
| 122 | const env = { ...process.env }; |
| 123 | if (this.config.token) env.CMDOP_TOKEN = this.config.token; |
| 124 | else delete env.CMDOP_TOKEN; |
| 125 | if (this.config.baseUrl) env.CMDOP_BASE_URL = this.config.baseUrl; |
| 126 | else delete env.CMDOP_BASE_URL; |
| 127 | const child = spawn(this.binaryPath, ["--stdio"], { |
| 128 | stdio: ["pipe", "pipe", "pipe"], |
| 129 | env, |
| 130 | windowsHide: true, |
| 131 | }); |
| 132 | this.#child = child; |