(spawned, streamName, target)
| 66586 | return stream4 !== null && typeof stream4 === "object" && typeof stream4.pipe === "function"; |
| 66587 | } |
| 66588 | function isWritableStream(stream4) { |
| 66589 | return isStream(stream4) && stream4.writable !== false && typeof stream4._write === "function" && typeof stream4._writableState === "object"; |
| 66590 | } |
| 66591 | |
| 66592 | // node_modules/execa/lib/pipe.js |
| 66593 | var isExecaChildProcess = (target) => target instanceof import_node_child_process.ChildProcess && typeof target.then === "function"; |
| 66594 | var pipeToTarget = (spawned, streamName, target) => { |
| 66595 | if (typeof target === "string") { |
| 66596 | spawned[streamName].pipe((0, import_node_fs.createWriteStream)(target)); |
| 66597 | return spawned; |
| 66598 | } |
| 66599 | if (isWritableStream(target)) { |
| 66600 | spawned[streamName].pipe(target); |
| 66601 | return spawned; |
| 66602 | } |
| 66603 | if (!isExecaChildProcess(target)) { |
| 66604 | throw new TypeError("The second argument must be a string, a stream or an Execa child process."); |
| 66605 | } |
| 66606 | if (!isWritableStream(target.stdin)) { |
| 66607 | throw new TypeError("The target child process's stdin must be available."); |
| 66608 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…