{"version":3,"file":"BunHttpServer-CeQFkhnw.mjs","names":["layer","make","Response","layer","BunFileSystem.layer","BunStream.fromReadableStream","emptyReadbleStream","layer","layer","layer","layer","layer","BunFileSystem.layer","BunCrypto.layer","BunPath.layer","BunStdio.layer","BunTerminal.layer","Platform.layer","BunServices.layer","BunStream.fromReadableStream","BunMultipart.persisted","BunMultipart.stream"],"sources":["../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunFileSystem.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunHttpPlatform.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunStream.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunMultipart.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunChildProcessSpawner.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunCrypto.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunPath.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunStdio.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunTerminal.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunServices.js","../../../node_modules/.pnpm/@effect+platform-bun@4.0.0-beta.102_patch_hash=9f7cfa69ef19b624ac7704fe505a6775dc272d73_f56a6f2f974adf1396223857dd50e704/node_modules/@effect/platform-bun/dist/BunHttpServer.js"],"sourcesContent":["/**\n * Bun layer for Effect's `FileSystem` service.\n *\n * This module exposes one `layer` that provides `FileSystem` in Bun by using\n * the shared Node file-system implementation. Once the layer is provided,\n * programs use the standard `effect/FileSystem` service operations.\n *\n * @since 4.0.0\n */\nimport * as NodeFileSystem from \"@effect/platform-node-shared/NodeFileSystem\";\n/**\n * Layer that provides the `FileSystem` service for Bun using the shared Node file-system implementation.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = NodeFileSystem.layer;\n//# sourceMappingURL=BunFileSystem.js.map","import * as Layer from \"effect/Layer\";\nimport * as Etag from \"effect/unstable/http/Etag\";\nimport * as Platform from \"effect/unstable/http/HttpPlatform\";\nimport * as Response from \"effect/unstable/http/HttpServerResponse\";\nimport * as BunFileSystem from \"./BunFileSystem.js\";\n/**\n * @category constructors\n * @since 4.0.0\n */\nconst make = /*#__PURE__*/Platform.make({\n  fileResponse(path, status, statusText, headers, start, end, _contentLength) {\n    let file = Bun.file(path);\n    if (start > 0 || end !== undefined) {\n      file = file.slice(start, end);\n    }\n    return Response.raw(file, {\n      headers,\n      status,\n      statusText\n    });\n  },\n  fileWebResponse(file, status, statusText, headers, _options) {\n    return Response.raw(file, {\n      headers,\n      status,\n      statusText\n    });\n  }\n});\n/**\n * Layer that provides the Bun `HttpPlatform`, including file responses backed by `Bun.file`.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/Layer.effect(Platform.HttpPlatform)(make).pipe(/*#__PURE__*/Layer.provide(BunFileSystem.layer), /*#__PURE__*/Layer.provide(Etag.layer));\n//# sourceMappingURL=BunHttpPlatform.js.map","/**\n * Bun stream interoperability for Effect streams.\n *\n * This module is the Bun entry point for adapting runtime streams into Effect's\n * streaming model. It re-exports the shared Node stream adapters for Bun's\n * Node-compatible stream APIs and adds {@link fromReadableStream}, a Web\n * `ReadableStream` adapter that uses Bun's `readMany` reader method to pull\n * batches of values into an Effect `Stream`.\n *\n * @since 4.0.0\n */\nimport * as Arr from \"effect/Array\";\nimport * as Cause from \"effect/Cause\";\nimport * as Channel from \"effect/Channel\";\nimport * as Effect from \"effect/Effect\";\nimport * as Scope from \"effect/Scope\";\nimport * as Stream from \"effect/Stream\";\n/**\n * @since 4.0.0\n */\nexport * from \"@effect/platform-node-shared/NodeStream\";\n/**\n * Creates a stream from a `ReadableStream` using Bun's optimized `.readMany`\n * API.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const fromReadableStream = options => Stream.fromChannel(Channel.fromTransform(Effect.fnUntraced(function* (_, scope) {\n  const reader = options.evaluate().getReader();\n  yield* Scope.addFinalizer(scope, options.releaseLockOnEnd ? Effect.sync(() => reader.releaseLock()) : Effect.promise(() => reader.cancel()));\n  function readMany() {\n    const result = reader.readMany();\n    if (\"then\" in result) {\n      return Effect.callback(resume => {\n        result.then(_ => resume(handleResult(_)), e => resume(Effect.fail(options.onError(e))));\n      });\n    }\n    return handleResult(result);\n  }\n  function handleResult(result) {\n    if (result.done) {\n      return Cause.done();\n    } else if (!Arr.isReadonlyArrayNonEmpty(result.value)) {\n      return readMany();\n    }\n    return Effect.succeed(result.value);\n  }\n  // @effect-diagnostics-next-line returnEffectInGen:off\n  return Effect.suspend(readMany);\n})));\n//# sourceMappingURL=BunStream.js.map","import * as Stream from \"effect/Stream\";\nimport * as Multipart from \"effect/unstable/http/Multipart\";\nimport * as BunStream from \"./BunStream.js\";\n/**\n * Parses a Bun `Request` body as multipart data and returns a stream of multipart parts.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const stream = source => BunStream.fromReadableStream({\n  evaluate: () => source.body ?? emptyReadbleStream,\n  onError: cause => Multipart.MultipartError.fromReason(\"InternalError\", cause)\n}).pipe(Stream.pipeThroughChannel(Multipart.makeChannel(Object.fromEntries(source.headers))));\nconst emptyReadbleStream = /*#__PURE__*/new ReadableStream({\n  start(controller) {\n    controller.enqueue(new Uint8Array());\n    controller.close();\n  }\n});\n/**\n * Parses and persists multipart data from a Bun `Request`, requiring file-system, path, and scope services.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const persisted = source => Multipart.toPersisted(stream(source));\n//# sourceMappingURL=BunMultipart.js.map","/**\n * Bun implementation of `ChildProcessSpawner`.\n *\n * @since 4.0.0\n */\nexport * from \"@effect/platform-node-shared/NodeChildProcessSpawner\";\n//# sourceMappingURL=BunChildProcessSpawner.js.map","/**\n * The `BunCrypto` module provides Bun's `Crypto` service layer for Effect\n * programs. Provide {@link layer} at the edge of a Bun app, CLI, script, or\n * test to satisfy `effect/Crypto` with cryptographically secure random bytes,\n * UUID generation, random values, and SHA digest operations.\n *\n * This adapter reuses the shared Node-compatible implementation, so randomness\n * and digest behavior follow Bun's `node:crypto` compatibility layer. SHA-1 is\n * present for interoperability with existing protocols, not for new\n * security-sensitive designs.\n *\n * @since 1.0.0\n */\nimport * as NodeCrypto from \"@effect/platform-node-shared/NodeCrypto\";\n/**\n * Layer that provides the Bun Crypto service implementation.\n *\n * @category layers\n * @since 1.0.0\n */\nexport const layer = NodeCrypto.layer;\n//# sourceMappingURL=BunCrypto.js.map","/**\n * Bun-backed layers for Effect's {@link Path} service.\n *\n * This module provides the `Path` service for Bun programs by reusing the\n * shared Node-compatible path implementation. Provide one of these layers when\n * Bun code should receive path operations from the Effect environment instead\n * of importing runtime path helpers directly.\n *\n * @since 4.0.0\n */\nimport * as NodePath from \"@effect/platform-node-shared/NodePath\";\n/**\n * Layer that provides the default `Path` service for Bun using the shared Node path implementation.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = NodePath.layer;\n/**\n * Layer that provides the POSIX `Path` service for Bun using the shared Node path implementation.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerPosix = NodePath.layerPosix;\n/**\n * Layer that provides the Win32 `Path` service for Bun using the shared Node path implementation.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerWin32 = NodePath.layerWin32;\n//# sourceMappingURL=BunPath.js.map","/**\n * Process stdio for Bun applications.\n *\n * This module provides the Bun layer for Effect's `Stdio` service by using the\n * shared Node stdio implementation. Arguments come from `process.argv`, input\n * is read from `process.stdin`, and output and error output write to\n * `process.stdout` and `process.stderr`.\n *\n * @since 4.0.0\n */\nimport * as NodeStdio from \"@effect/platform-node-shared/NodeStdio\";\n/**\n * Provides the `Stdio` service backed by the current process arguments,\n * stdin, stdout, and stderr streams.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = NodeStdio.layer;\n//# sourceMappingURL=BunStdio.js.map","/**\n * Bun-backed implementation of Effect's `Terminal` service.\n *\n * This module reuses the shared Node terminal implementation for Bun. `make`\n * creates a scoped process-backed `Terminal` service, and `layer` provides the\n * default terminal service with the standard quit behavior for key input.\n *\n * @since 4.0.0\n */\nimport * as NodeTerminal from \"@effect/platform-node-shared/NodeTerminal\";\n/**\n * Creates a scoped `Terminal` service backed by process stdin/stdout, using the\n * optional predicate to decide when key input should end the input stream.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = NodeTerminal.make;\n/**\n * Provides the default process-backed `Terminal` service, ending key input on\n * the default quit keys.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = NodeTerminal.layer;\n//# sourceMappingURL=BunTerminal.js.map","import * as Layer from \"effect/Layer\";\nimport * as BunChildProcessSpawner from \"./BunChildProcessSpawner.js\";\nimport * as BunCrypto from \"./BunCrypto.js\";\nimport * as BunFileSystem from \"./BunFileSystem.js\";\nimport * as BunPath from \"./BunPath.js\";\nimport * as BunStdio from \"./BunStdio.js\";\nimport * as BunTerminal from \"./BunTerminal.js\";\n/**\n * Provides the default Bun implementations for child process spawning,\n * filesystem, path, stdio, and terminal services.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = /*#__PURE__*/BunChildProcessSpawner.layer.pipe(/*#__PURE__*/Layer.provideMerge(/*#__PURE__*/Layer.mergeAll(BunFileSystem.layer, BunCrypto.layer, BunPath.layer, BunStdio.layer, BunTerminal.layer)));\n//# sourceMappingURL=BunServices.js.map","import * as Config from \"effect/Config\";\nimport * as Context from \"effect/Context\";\nimport * as Deferred from \"effect/Deferred\";\nimport * as Duration from \"effect/Duration\";\nimport * as Effect from \"effect/Effect\";\nimport * as Exit from \"effect/Exit\";\nimport * as Fiber from \"effect/Fiber\";\nimport * as FiberSet from \"effect/FiberSet\";\nimport { flow } from \"effect/Function\";\nimport * as Inspectable from \"effect/Inspectable\";\nimport * as Layer from \"effect/Layer\";\nimport * as Option from \"effect/Option\";\nimport * as Scope from \"effect/Scope\";\nimport * as Semaphore from \"effect/Semaphore\";\nimport * as Stream from \"effect/Stream\";\nimport * as Cookies from \"effect/unstable/http/Cookies\";\nimport * as Etag from \"effect/unstable/http/Etag\";\nimport * as FetchHttpClient from \"effect/unstable/http/FetchHttpClient\";\nimport * as Headers from \"effect/unstable/http/Headers\";\nimport * as HttpEffect from \"effect/unstable/http/HttpEffect\";\nimport * as IncomingMessage from \"effect/unstable/http/HttpIncomingMessage\";\nimport * as Server from \"effect/unstable/http/HttpServer\";\nimport * as Error from \"effect/unstable/http/HttpServerError\";\nimport * as ServerRequest from \"effect/unstable/http/HttpServerRequest\";\nimport * as UrlParams from \"effect/unstable/http/UrlParams\";\nimport * as Socket from \"effect/unstable/socket/Socket\";\nimport * as Platform from \"./BunHttpPlatform.js\";\nimport * as BunMultipart from \"./BunMultipart.js\";\nimport * as BunServices from \"./BunServices.js\";\nimport * as BunStream from \"./BunStream.js\";\n/**\n * Creates a scoped Bun `HttpServer` from `Bun.serve` options, stopping the server on scope finalization with optional graceful shutdown settings.\n *\n * @category constructors\n * @since 4.0.0\n */\nexport const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {\n  const scope = yield* Effect.scope;\n  const handlerStack = [function (_request, _server) {\n    return new Response(\"not found\", {\n      status: 404\n    });\n  }];\n  const server = Bun.serve({\n    ...options,\n    fetch: handlerStack[0],\n    websocket: {\n      // Patch: upstreamed as https://github.com/Effect-TS/effect/pull/6691 (ships\n      // in >= 4.0.0-beta.103 as the layer option `websocket: { ... }`). On\n      // upgrade: drop this patch and pass the option in apps/server/src/server.ts.\n      // Negotiate permessage-deflate with clients that offer it; clients that\n      // don't still get uncompressed frames on their connection. A dedicated\n      // compressor keeps a per-connection sliding window (context takeover) so\n      // the compression dictionary is shared across server-to-client frames.\n      // Decompression uses the shared decompressor: uWebSockets' dedicated\n      // decompressor path can abort connections (close 1006) on valid DEFLATE\n      // input — see https://github.com/uNetworking/uWebSockets.js/issues/633.\n      perMessageDeflate: {\n        compress: \"dedicated\",\n        decompress: \"shared\"\n      },\n      open(ws) {\n        Deferred.doneUnsafe(ws.data.deferred, Exit.succeed(ws));\n      },\n      message(ws, message) {\n        ws.data.run(message);\n      },\n      close(ws, code, closeReason) {\n        code = typeof code === \"number\" ? code : 1001;\n        Deferred.doneUnsafe(ws.data.closeDeferred, Socket.defaultCloseCodeIsError(code) ? Exit.fail(new Socket.SocketError({\n          reason: new Socket.SocketCloseError({\n            code,\n            closeReason\n          })\n        })) : Exit.void);\n      }\n    }\n  });\n  const shutdown = yield* Effect.promise(() => server.stop()).pipe(Effect.cached);\n  const preemptiveShutdown = options.disablePreemptiveShutdown ? Effect.void : Effect.timeoutOrElse(shutdown, {\n    duration: options.gracefulShutdownTimeout ?? Duration.seconds(20),\n    orElse: () => Effect.void\n  });\n  yield* Scope.addFinalizer(scope, shutdown);\n  return Server.make({\n    address: {\n      _tag: \"TcpAddress\",\n      port: server.port,\n      hostname: server.hostname\n    },\n    serve: Effect.fnUntraced(function* (httpApp, middleware) {\n      const parent = yield* Effect.fiber;\n      const services = parent.context;\n      const serveScope = Context.getUnsafe(services, Scope.Scope);\n      const scope = Scope.forkUnsafe(serveScope, \"parallel\");\n      const httpEffect = HttpEffect.toHandled(httpApp, (request, response) => Effect.sync(() => {\n        ;\n        request.resolve(makeResponse(request, response, services, scope));\n      }), middleware);\n      function handler(request, server) {\n        return new Promise((resolve, _reject) => {\n          const map = new Map(services.mapUnsafe);\n          map.set(ServerRequest.HttpServerRequest.key, new BunServerRequest(request, resolve, removeHost(request.url), server));\n          const fiber = Fiber.runIn(Effect.runForkWith(Context.makeUnsafe(map))(httpEffect), scope);\n          request.signal.addEventListener(\"abort\", () => {\n            fiber.interruptUnsafe(parent.id, Error.ClientAbort.annotation);\n          }, {\n            once: true\n          });\n        });\n      }\n      yield* Scope.addFinalizerExit(serveScope, () => {\n        handlerStack.pop();\n        server.reload({\n          fetch: handlerStack[handlerStack.length - 1]\n        });\n        return preemptiveShutdown;\n      });\n      handlerStack.push(handler);\n      server.reload({\n        fetch: handler\n      });\n    })\n  });\n});\nconst makeResponse = (request, response, context, scope) => {\n  const fields = {\n    headers: new globalThis.Headers(response.headers),\n    status: response.status\n  };\n  if (!Cookies.isEmpty(response.cookies)) {\n    for (const header of Cookies.toSetCookieHeaders(response.cookies)) {\n      fields.headers.append(\"set-cookie\", header);\n    }\n  }\n  if (response.statusText !== undefined) {\n    fields.statusText = response.statusText;\n  }\n  if (request.method === \"HEAD\") {\n    return new Response(undefined, fields);\n  }\n  response = HttpEffect.scopeTransferToStream(response);\n  const body = response.body;\n  switch (body._tag) {\n    case \"Empty\":\n      {\n        return new Response(undefined, fields);\n      }\n    case \"Uint8Array\":\n    case \"Raw\":\n      {\n        if (body.body instanceof Response) {\n          for (const [key, value] of fields.headers.entries()) {\n            body.body.headers.set(key, value);\n          }\n          return body.body;\n        }\n        return new Response(body.body, fields);\n      }\n    case \"FormData\":\n      {\n        return new Response(body.formData, fields);\n      }\n    case \"Stream\":\n      {\n        return new Response(Stream.toReadableStreamWith(Stream.unwrap(Effect.withFiber(fiber => {\n          Fiber.runIn(fiber, scope);\n          return Effect.succeed(body.stream);\n        })), context), fields);\n      }\n  }\n};\n/**\n * Layer that provides only `HttpServer` by constructing a scoped Bun server from the supplied serve options.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerServer = /*#__PURE__*/flow(make, /*#__PURE__*/Layer.effect(Server.HttpServer));\n/**\n * Layer that provides Bun HTTP support services: `HttpPlatform`, weak ETag generation, and `BunServices`.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerHttpServices = /*#__PURE__*/Layer.mergeAll(Platform.layer, Etag.layerWeak, BunServices.layer);\n/**\n * Layer that provides a Bun `HttpServer` together with the Bun HTTP platform, ETag generator, and Bun services.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layer = options => Layer.mergeAll(layerServer(options), layerHttpServices);\n/**\n * Layer that starts a Bun HTTP server on an ephemeral port for tests.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerTest = /*#__PURE__*/Server.layerTestClient.pipe(/*#__PURE__*/Layer.provide(/*#__PURE__*/FetchHttpClient.layer.pipe(/*#__PURE__*/Layer.provide(/*#__PURE__*/Layer.succeed(FetchHttpClient.RequestInit)({\n  keepalive: false\n})))), /*#__PURE__*/Layer.provideMerge(/*#__PURE__*/layer({\n  port: 0\n})));\n/**\n * Creates the Bun HTTP server and support-services layer from configurable serve options.\n *\n * @category layers\n * @since 4.0.0\n */\nexport const layerConfig = options => Layer.mergeAll(Layer.effect(Server.HttpServer)(Effect.flatMap(Config.unwrap(options), make)), layerHttpServices);\nfunction wsDefaultRun(_) {\n  this.buffer.push(_);\n}\nclass BunServerRequest extends Inspectable.Class {\n  [ServerRequest.TypeId];\n  [IncomingMessage.TypeId];\n  source;\n  resolve;\n  url;\n  bunServer;\n  headersOverride;\n  remoteAddressOverride;\n  constructor(source, resolve, url, bunServer, headersOverride, remoteAddressOverride) {\n    super();\n    this[ServerRequest.TypeId] = ServerRequest.TypeId;\n    this[IncomingMessage.TypeId] = IncomingMessage.TypeId;\n    this.source = source;\n    this.resolve = resolve;\n    this.url = url;\n    this.bunServer = bunServer;\n    this.headersOverride = headersOverride;\n    this.remoteAddressOverride = remoteAddressOverride;\n  }\n  toJSON() {\n    return IncomingMessage.inspect(this, {\n      _id: \"HttpServerRequest\",\n      method: this.method,\n      url: this.originalUrl\n    });\n  }\n  modify(options) {\n    return new BunServerRequest(this.source, this.resolve, options.url ?? this.url, this.bunServer, options.headers ?? this.headersOverride, \"remoteAddress\" in options ? options.remoteAddress : this.remoteAddressOverride);\n  }\n  get method() {\n    return this.source.method.toUpperCase();\n  }\n  get originalUrl() {\n    return this.source.url;\n  }\n  get remoteAddress() {\n    return this.remoteAddressOverride ?? Option.fromNullishOr(this.bunServer.requestIP(this.source)?.address);\n  }\n  get headers() {\n    this.headersOverride ??= Headers.fromInput(this.source.headers);\n    return this.headersOverride;\n  }\n  cachedCookies;\n  get cookies() {\n    if (this.cachedCookies) {\n      return this.cachedCookies;\n    }\n    return this.cachedCookies = Cookies.parseHeader(this.headers.cookie ?? \"\");\n  }\n  get stream() {\n    return this.source.body ? BunStream.fromReadableStream({\n      evaluate: () => this.source.body ?? emptyReadbleStream,\n      onError: cause => new Error.HttpServerError({\n        reason: new Error.RequestParseError({\n          request: this,\n          cause\n        })\n      })\n    }) : Stream.fail(new Error.HttpServerError({\n      reason: new Error.RequestParseError({\n        request: this,\n        description: \"can not create stream from empty body\"\n      })\n    }));\n  }\n  textEffect;\n  get text() {\n    if (this.textEffect) {\n      return this.textEffect;\n    }\n    this.textEffect = Effect.runSync(Effect.cached(Effect.tryPromise({\n      try: () => this.source.text(),\n      catch: cause => new Error.HttpServerError({\n        reason: new Error.RequestParseError({\n          request: this,\n          cause\n        })\n      })\n    })));\n    return this.textEffect;\n  }\n  get json() {\n    return Effect.flatMap(this.text, _ => Effect.try({\n      try: () => JSON.parse(_),\n      catch: cause => new Error.HttpServerError({\n        reason: new Error.RequestParseError({\n          request: this,\n          cause\n        })\n      })\n    }));\n  }\n  get urlParamsBody() {\n    return Effect.flatMap(this.text, _ => Effect.try({\n      try: () => UrlParams.fromInput(new URLSearchParams(_)),\n      catch: cause => new Error.HttpServerError({\n        reason: new Error.RequestParseError({\n          request: this,\n          cause\n        })\n      })\n    }));\n  }\n  multipartEffect;\n  get multipart() {\n    if (this.multipartEffect) {\n      return this.multipartEffect;\n    }\n    this.multipartEffect = Effect.runSync(Effect.cached(BunMultipart.persisted(this.source)));\n    return this.multipartEffect;\n  }\n  get multipartStream() {\n    return BunMultipart.stream(this.source);\n  }\n  arrayBufferEffect;\n  get arrayBuffer() {\n    if (this.arrayBufferEffect) {\n      return this.arrayBufferEffect;\n    }\n    this.arrayBufferEffect = Effect.runSync(Effect.cached(Effect.tryPromise({\n      try: () => this.source.arrayBuffer(),\n      catch: cause => new Error.HttpServerError({\n        reason: new Error.RequestParseError({\n          request: this,\n          cause\n        })\n      })\n    })));\n    this.textEffect = Effect.map(this.arrayBufferEffect, _ => new TextDecoder().decode(_));\n    return this.arrayBufferEffect;\n  }\n  get upgrade() {\n    return Effect.callback(resume => {\n      const deferred = Deferred.makeUnsafe();\n      const closeDeferred = Deferred.makeUnsafe();\n      const semaphore = Semaphore.makeUnsafe(1);\n      const success = this.bunServer.upgrade(this.source, {\n        data: {\n          deferred,\n          closeDeferred,\n          buffer: [],\n          run: wsDefaultRun\n        }\n      });\n      if (!success) {\n        resume(Effect.fail(new Error.HttpServerError({\n          reason: new Error.RequestParseError({\n            request: this,\n            description: \"Not an upgradeable ServerRequest\"\n          })\n        })));\n        return;\n      }\n      resume(Effect.map(Deferred.await(deferred), ws => {\n        const write = chunk => Effect.sync(() => {\n          if (typeof chunk === \"string\") {\n            ws.sendText(chunk);\n          } else if (Socket.isCloseEvent(chunk)) {\n            ws.close(chunk.code, chunk.reason);\n          } else {\n            ws.sendBinary(chunk);\n          }\n          return true;\n        });\n        const writer = Effect.succeed(write);\n        const runRaw = Effect.fnUntraced(function* (handler, opts) {\n          const set = yield* FiberSet.make();\n          const run = yield* FiberSet.runtime(set)();\n          function runRaw(data) {\n            const result = handler(data);\n            if (Effect.isEffect(result)) {\n              run(result);\n            }\n          }\n          ws.data.run = runRaw;\n          ws.data.buffer.forEach(runRaw);\n          ws.data.buffer.length = 0;\n          if (opts?.onOpen) yield* opts.onOpen;\n          return yield* FiberSet.join(set);\n        }, Effect.scoped, Effect.onExit(exit => Effect.sync(() => ws.close(exit._tag === \"Success\" ? 1000 : 1011))), Effect.raceFirst(Deferred.await(closeDeferred)), semaphore.withPermits(1));\n        return Socket.make({\n          runRaw,\n          writer\n        });\n      }));\n    });\n  }\n}\nconst emptyReadbleStream = /*#__PURE__*/new ReadableStream({\n  start(controller) {\n    controller.enqueue(new Uint8Array());\n    controller.close();\n  }\n});\nconst removeHost = url => {\n  if (url[0] === \"/\") {\n    return url;\n  }\n  const index = url.indexOf(\"/\", url.indexOf(\"//\") + 2);\n  return index === -1 ? \"/\" : url.slice(index);\n};\n//# sourceMappingURL=BunHttpServer.js.map"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,MAAaA,UAAQ,eAAe;;;;;;;ACPpC,MAAMC,SAAoB,uBAAS,KAAK;CACtC,aAAa,MAAM,QAAQ,YAAY,SAAS,OAAO,KAAK,gBAAgB;EAC1E,IAAI,OAAO,IAAI,KAAK,IAAI;EACxB,IAAI,QAAQ,KAAK,QAAQ,KAAA,GACvB,OAAO,KAAK,MAAM,OAAO,GAAG;EAE9B,OAAOC,WAAS,IAAI,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