(info)
| 310 | partsBuffer.push(new FieldImpl(info.name, info.contentType, MP.decodeField(info, value))) |
| 311 | }, |
| 312 | onFile(info) { |
| 313 | let chunks: Array<Uint8Array> = [] |
| 314 | let finished = false |
| 315 | const take: Channel.Channel<Chunk.Chunk<Uint8Array>> = Channel.suspend(() => { |
| 316 | if (chunks.length === 0) { |
| 317 | return finished ? Channel.void : Channel.zipRight(pump, take) |
| 318 | } |
| 319 | const chunk = Chunk.unsafeFromArray(chunks) |
| 320 | chunks = [] |
| 321 | return finished ? Channel.write(chunk) : Channel.zipRight( |
| 322 | Channel.write(chunk), |
| 323 | Channel.zipRight(pump, take) |
| 324 | ) |
| 325 | }) |
| 326 | partsBuffer.push(new FileImpl(info, take)) |
| 327 | return function(chunk) { |
| 328 | if (chunk === null) { |
| 329 | finished = true |
| 330 | } else { |
| 331 | chunks.push(chunk) |
| 332 | } |
| 333 | } |
| 334 | }, |
| 335 | onError(error_) { |
| 336 | exit = Option.some(Exit.fail(convertError(error_))) |
| 337 | }, |
nothing calls this directly
no test coverage detected
searching dependent graphs…