()
| 43 | Effect.map((config) => |
| 44 | NodeStream.fromReadable<MP.Part, Multipart.MultipartError>({ |
| 45 | evaluate() { |
| 46 | const parser = MP.make(config) |
| 47 | // `pipe` does not forward source errors or a premature close. |
| 48 | const cleanup = finished(source, { readable: true, writable: false }, (error) => { |
| 49 | cleanup() |
| 50 | if (error) parser.destroy(error) |
| 51 | }) |
| 52 | source.pipe(parser) |
| 53 | return parser as any |
| 54 | }, |
| 55 | onError: (error) => convertError(error as any) |
| 56 | }) |
| 57 | ), |
no test coverage detected