(fn)
| 124 | } |
| 125 | |
| 126 | suspendReplWhile(fn) { |
| 127 | if (this.repl) { |
| 128 | this.repl.pause(); |
| 129 | } |
| 130 | this.stdin.pause(); |
| 131 | this.paused = true; |
| 132 | return (async () => { |
| 133 | try { |
| 134 | await fn(); |
| 135 | this.paused = false; |
| 136 | if (this.repl) { |
| 137 | this.repl.resume(); |
| 138 | this.repl.displayPrompt(); |
| 139 | } |
| 140 | this.stdin.resume(); |
| 141 | } catch (error) { |
| 142 | process.nextTick(() => { throw error; }); |
| 143 | } |
| 144 | })(); |
| 145 | } |
| 146 | |
| 147 | killChild() { |
| 148 | this.client.reset(); |
no test coverage detected