Function
writeLineMessage
(child: ReturnType<typeof startServer>, payload: unknown)
Source from the content-addressed store, hash-verified
| 126 | } |
| 127 | |
| 128 | function writeLineMessage(child: ReturnType<typeof startServer>, payload: unknown) { |
| 129 | const input = child.stdin; |
| 130 | if (!input) throw new Error("stdin unavailable"); |
| 131 | input.write(`${JSON.stringify(payload)}\n`); |
| 132 | } |
| 133 | |
| 134 | async function stopServer(child: ReturnType<typeof startServer>) { |
| 135 | child.kill("SIGTERM"); |
Tested by
no test coverage detected