()
| 125 | process.stdin.resume(); |
| 126 | |
| 127 | const onConnect = () => { |
| 128 | this.firstTimeConnecting = false; |
| 129 | this.reconnectCount = 0; |
| 130 | this.connected = true; |
| 131 | |
| 132 | // Sending a JSON-stringified options object (even just an empty |
| 133 | // object) over the socket is required to start the REPL session. |
| 134 | sock.write(JSON.stringify({ |
| 135 | columns: process.stdout.columns, |
| 136 | terminal: !isEmacs(), |
| 137 | key: key |
| 138 | }) + "\n"); |
| 139 | |
| 140 | process.stderr.write(shellBanner()); |
| 141 | process.stdin.pipe(sock); |
| 142 | if (process.stdin.setRawMode) { // https://github.com/joyent/node/issues/8204 |
| 143 | process.stdin.setRawMode(true); |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | const onClose = () => { |
| 148 | tearDown(); |
nothing calls this directly
no test coverage detected