* Connect to parent via stdio pipes
()
| 2445 | * Connect to parent via stdio pipes |
| 2446 | */ |
| 2447 | private async connectToParentProcessViaStdio(): Promise<void> { |
| 2448 | if (this.cliProcess) { |
| 2449 | throw new Error("CLI child process was unexpectedly started in parent process mode"); |
| 2450 | } |
| 2451 | |
| 2452 | // Create JSON-RPC connection over stdin/stdout |
| 2453 | this.messageWriter = new TeardownResilientStreamMessageWriter(process.stdout); |
| 2454 | this.connection = createMessageConnection( |
| 2455 | new StreamMessageReader(process.stdin), |
| 2456 | this.messageWriter |
| 2457 | ); |
| 2458 | |
| 2459 | this.attachConnectionHandlers(); |
| 2460 | this.connection.listen(); |
| 2461 | } |
| 2462 | |
| 2463 | /** |
| 2464 | * Connect to the CLI server via TCP socket |
no test coverage detected