@effect/platform 0.69.0 → 0.69.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,8 +76,7 @@ export const withTracerDisabledForUrls = dual<
76
76
  export const logger = make((httpApp) => {
77
77
  let counter = 0
78
78
  return Effect.withFiberRuntime((fiber) => {
79
- const context = fiber.getFiberRef(FiberRef.currentContext)
80
- const request = Context.unsafeGet(context, ServerRequest.HttpServerRequest)
79
+ const request = Context.unsafeGet(fiber.currentContext, ServerRequest.HttpServerRequest)
81
80
  return Effect.withLogSpan(
82
81
  Effect.flatMap(Effect.exit(httpApp), (exit) => {
83
82
  if (fiber.getFiberRef(loggerDisabled)) {
@@ -110,8 +109,7 @@ export const logger = make((httpApp) => {
110
109
  /** @internal */
111
110
  export const tracer = make((httpApp) =>
112
111
  Effect.withFiberRuntime((fiber) => {
113
- const context = fiber.getFiberRef(FiberRef.currentContext)
114
- const request = Context.unsafeGet(context, ServerRequest.HttpServerRequest)
112
+ const request = Context.unsafeGet(fiber.currentContext, ServerRequest.HttpServerRequest)
115
113
  const disabled = fiber.getFiberRef(currentTracerDisabledWhen)(request)
116
114
  if (disabled) {
117
115
  return httpApp
@@ -303,8 +301,7 @@ export const cors = (options?: {
303
301
 
304
302
  return <E, R>(httpApp: App.Default<E, R>): App.Default<E, R> =>
305
303
  Effect.withFiberRuntime((fiber) => {
306
- const context = fiber.getFiberRef(FiberRef.currentContext)
307
- const request = Context.unsafeGet(context, ServerRequest.HttpServerRequest)
304
+ const request = Context.unsafeGet(fiber.currentContext, ServerRequest.HttpServerRequest)
308
305
  if (request.method === "OPTIONS") {
309
306
  return Effect.succeed(ServerResponse.empty({
310
307
  status: 204,