()
| 51 | // access a stream from an operation that uses it. |
| 52 | let stdin: typeof process.stdin | undefined |
| 53 | const getStdin = () => { |
| 54 | if (stdin === undefined) { |
| 55 | stdin = process.stdin |
| 56 | if (stdin.readableEnded) { |
| 57 | onStdinEnd() |
| 58 | } else { |
| 59 | stdin.once("end", onStdinEnd) |
| 60 | } |
| 61 | } |
| 62 | return stdin |
| 63 | } |
| 64 | yield* Effect.addFinalizer(() => Effect.sync(() => stdin?.off("end", onStdinEnd))) |
| 65 | |
| 66 | const rlRef = yield* RcRef.make({ |
no test coverage detected