MCPcopy Index your code
hub / github.com/Effect-TS/effect / stream

Function stream

packages/platform-bun/src/internal/multipart.ts:12–27  ·  view source on GitHub ↗
(source: Request)

Source from the content-addressed store, hash-verified

10
11/** @internal */
12export const stream = (source: Request): Stream.Stream<Multipart.Part, Multipart.MultipartError> =>
13 pipe(
14 Multipart.makeConfig({}),
15 Effect.map((config) => {
16 const parser = MP.make({
17 ...config,
18 headers: source.headers
19 })
20 return Stream.fromReadableStream(
21 () => source.body!.pipeThrough(parser),
22 (cause) => convertError(cause as MultipartError)
23 )
24 }),
25 Stream.unwrap,
26 Stream.map(convertPart)
27 )
28
29/** @internal */
30export const persisted = (source: Request) =>

Callers 1

persistedFunction · 0.70

Calls 4

convertErrorFunction · 0.70
mapMethod · 0.65
makeMethod · 0.65
pipeFunction · 0.50

Tested by

no test coverage detected