(command, encoding)
| 29 | const stream: _CommandExecutor.CommandExecutor["stream"] = (command) => |
| 30 | Stream.unwrapScoped(Effect.map(start(command), (process) => process.stdout)) |
| 31 | const streamLines: _CommandExecutor.CommandExecutor["streamLines"] = (command, encoding) => { |
| 32 | const decoder = new TextDecoder(encoding) |
| 33 | return Stream.splitLines( |
| 34 | Stream.mapChunks(stream(command), Chunk.map((bytes) => decoder.decode(bytes))) |
| 35 | ) |
| 36 | } |
| 37 | return { |
| 38 | [TypeId]: TypeId, |
| 39 | start, |
no test coverage detected