(text, which)
| 192 | |
| 193 | #stdioBuffers = { stdout: '', stderr: '' }; |
| 194 | childPrint(text, which) { |
| 195 | const lines = RegExpPrototypeSymbolSplit( |
| 196 | /\r\n|\r|\n/g, |
| 197 | this.#stdioBuffers[which] + text); |
| 198 | |
| 199 | this.#stdioBuffers[which] = ''; |
| 200 | |
| 201 | if (lines[lines.length - 1] !== '') { |
| 202 | this.#stdioBuffers[which] = ArrayPrototypePop(lines); |
| 203 | } |
| 204 | |
| 205 | const textToPrint = ArrayPrototypeJoin( |
| 206 | ArrayPrototypeMap(lines, (chunk) => `< ${chunk}`), |
| 207 | '\n'); |
| 208 | |
| 209 | if (lines.length) { |
| 210 | this.print(textToPrint, true); |
| 211 | if (!this.paused) { |
| 212 | this.repl.displayPrompt(true); |
| 213 | } |
| 214 | } |
| 215 | |
| 216 | if (StringPrototypeEndsWith( |
| 217 | textToPrint, |
| 218 | 'Waiting for the debugger to disconnect...\n', |
| 219 | )) { |
| 220 | this.killChild(); |
| 221 | } |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | function parseInteractiveArgs(args) { |
nothing calls this directly
no test coverage detected