effect 2.0.0-next.49 → 2.0.0-next.50

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.
Files changed (361) hide show
  1. package/BigInt/dist/effect-BigInt.cjs.dev.js +45 -18
  2. package/BigInt/dist/effect-BigInt.cjs.mjs +1 -0
  3. package/BigInt/dist/effect-BigInt.cjs.prod.js +45 -18
  4. package/BigInt/dist/effect-BigInt.esm.js +46 -19
  5. package/Brand/dist/effect-Brand.cjs.dev.js +0 -1
  6. package/Brand/dist/effect-Brand.cjs.prod.js +0 -1
  7. package/Cache/dist/effect-Cache.cjs.dev.js +23 -23
  8. package/Cache/dist/effect-Cache.cjs.prod.js +23 -23
  9. package/Cause/dist/effect-Cause.cjs.dev.js +4 -5
  10. package/Cause/dist/effect-Cause.cjs.prod.js +4 -5
  11. package/Channel/dist/effect-Channel.cjs.dev.js +35 -35
  12. package/Channel/dist/effect-Channel.cjs.prod.js +35 -35
  13. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +30 -30
  14. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +30 -30
  15. package/Chunk/dist/effect-Chunk.cjs.dev.js +0 -1
  16. package/Chunk/dist/effect-Chunk.cjs.prod.js +0 -1
  17. package/Clock/dist/effect-Clock.cjs.dev.js +11 -11
  18. package/Clock/dist/effect-Clock.cjs.prod.js +11 -11
  19. package/Config/dist/effect-Config.cjs.dev.js +7 -8
  20. package/Config/dist/effect-Config.cjs.prod.js +7 -8
  21. package/ConfigError/dist/effect-ConfigError.cjs.dev.js +1 -2
  22. package/ConfigError/dist/effect-ConfigError.cjs.prod.js +1 -2
  23. package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +10 -10
  24. package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +10 -10
  25. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +2 -3
  26. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +2 -3
  27. package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +1 -2
  28. package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +1 -2
  29. package/Console/dist/effect-Console.cjs.dev.js +27 -27
  30. package/Console/dist/effect-Console.cjs.prod.js +27 -27
  31. package/Data/dist/effect-Data.cjs.dev.js +36 -36
  32. package/Data/dist/effect-Data.cjs.prod.js +36 -36
  33. package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +11 -11
  34. package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +11 -11
  35. package/Deferred/dist/effect-Deferred.cjs.dev.js +4 -5
  36. package/Deferred/dist/effect-Deferred.cjs.prod.js +4 -5
  37. package/Differ/dist/effect-Differ.cjs.dev.js +1 -2
  38. package/Differ/dist/effect-Differ.cjs.prod.js +1 -2
  39. package/Duration/dist/effect-Duration.cjs.dev.js +0 -1
  40. package/Duration/dist/effect-Duration.cjs.prod.js +0 -1
  41. package/Effect/dist/effect-Effect.cjs.dev.js +37 -57
  42. package/Effect/dist/effect-Effect.cjs.mjs +0 -2
  43. package/Effect/dist/effect-Effect.cjs.prod.js +37 -57
  44. package/Effect/dist/effect-Effect.esm.js +4 -23
  45. package/Either/dist/effect-Either.cjs.dev.js +1 -1
  46. package/Either/dist/effect-Either.cjs.prod.js +1 -1
  47. package/Either/dist/effect-Either.esm.js +1 -1
  48. package/Exit/dist/effect-Exit.cjs.dev.js +4 -5
  49. package/Exit/dist/effect-Exit.cjs.prod.js +4 -5
  50. package/Fiber/dist/effect-Fiber.cjs.dev.js +24 -24
  51. package/Fiber/dist/effect-Fiber.cjs.prod.js +24 -24
  52. package/FiberId/dist/effect-FiberId.cjs.dev.js +2 -3
  53. package/FiberId/dist/effect-FiberId.cjs.prod.js +2 -3
  54. package/FiberRef/dist/effect-FiberRef.cjs.dev.js +24 -31
  55. package/FiberRef/dist/effect-FiberRef.cjs.mjs +0 -1
  56. package/FiberRef/dist/effect-FiberRef.cjs.prod.js +24 -31
  57. package/FiberRef/dist/effect-FiberRef.esm.js +2 -8
  58. package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +5 -6
  59. package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +5 -6
  60. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +6 -7
  61. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +6 -7
  62. package/GroupBy/dist/effect-GroupBy.cjs.dev.js +36 -36
  63. package/GroupBy/dist/effect-GroupBy.cjs.prod.js +36 -36
  64. package/HashMap/dist/effect-HashMap.cjs.dev.js +1 -2
  65. package/HashMap/dist/effect-HashMap.cjs.prod.js +1 -2
  66. package/HashSet/dist/effect-HashSet.cjs.dev.js +1 -2
  67. package/HashSet/dist/effect-HashSet.cjs.prod.js +1 -2
  68. package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +24 -24
  69. package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +24 -24
  70. package/Layer/dist/effect-Layer.cjs.dev.js +35 -35
  71. package/Layer/dist/effect-Layer.cjs.mjs +2 -2
  72. package/Layer/dist/effect-Layer.cjs.prod.js +35 -35
  73. package/Layer/dist/effect-Layer.esm.js +4 -4
  74. package/List/dist/effect-List.cjs.dev.js +0 -1
  75. package/List/dist/effect-List.cjs.prod.js +0 -1
  76. package/LogLevel/dist/effect-LogLevel.cjs.dev.js +4 -4
  77. package/LogLevel/dist/effect-LogLevel.cjs.prod.js +4 -4
  78. package/Logger/dist/effect-Logger.cjs.dev.js +28 -28
  79. package/Logger/dist/effect-Logger.cjs.prod.js +28 -28
  80. package/Match/dist/effect-Match.cjs.dev.js +0 -1
  81. package/Match/dist/effect-Match.cjs.prod.js +0 -1
  82. package/Metric/dist/effect-Metric.cjs.dev.js +22 -22
  83. package/Metric/dist/effect-Metric.cjs.prod.js +22 -22
  84. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +1 -2
  85. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +1 -2
  86. package/MetricHook/dist/effect-MetricHook.cjs.dev.js +3 -3
  87. package/MetricHook/dist/effect-MetricHook.cjs.prod.js +3 -3
  88. package/MetricKey/dist/effect-MetricKey.cjs.dev.js +3 -4
  89. package/MetricKey/dist/effect-MetricKey.cjs.prod.js +3 -4
  90. package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +1 -2
  91. package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +1 -2
  92. package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +24 -24
  93. package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +24 -24
  94. package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +5 -5
  95. package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +5 -5
  96. package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +1 -2
  97. package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +1 -2
  98. package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +1 -2
  99. package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +1 -2
  100. package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +0 -1
  101. package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +0 -1
  102. package/Number/dist/effect-Number.cjs.dev.js +31 -2
  103. package/Number/dist/effect-Number.cjs.mjs +2 -1
  104. package/Number/dist/effect-Number.cjs.prod.js +31 -2
  105. package/Number/dist/effect-Number.esm.js +24 -3
  106. package/Option/dist/effect-Option.cjs.dev.js +1 -88
  107. package/Option/dist/effect-Option.cjs.mjs +0 -6
  108. package/Option/dist/effect-Option.cjs.prod.js +1 -88
  109. package/Option/dist/effect-Option.esm.js +2 -83
  110. package/Pool/dist/effect-Pool.cjs.dev.js +24 -24
  111. package/Pool/dist/effect-Pool.cjs.prod.js +24 -24
  112. package/PubSub/dist/effect-PubSub.cjs.dev.js +23 -23
  113. package/PubSub/dist/effect-PubSub.cjs.prod.js +23 -23
  114. package/Queue/dist/effect-Queue.cjs.dev.js +23 -23
  115. package/Queue/dist/effect-Queue.cjs.prod.js +23 -23
  116. package/Random/dist/effect-Random.cjs.dev.js +11 -11
  117. package/Random/dist/effect-Random.cjs.prod.js +11 -11
  118. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +0 -1
  119. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +0 -1
  120. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +332 -90
  121. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.mjs +15 -2
  122. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +332 -90
  123. package/ReadonlyRecord/dist/effect-ReadonlyRecord.esm.js +323 -92
  124. package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +0 -1
  125. package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +0 -1
  126. package/Ref/dist/effect-Ref.cjs.dev.js +5 -6
  127. package/Ref/dist/effect-Ref.cjs.prod.js +5 -6
  128. package/Reloadable/dist/effect-Reloadable.cjs.dev.js +28 -28
  129. package/Reloadable/dist/effect-Reloadable.cjs.prod.js +28 -28
  130. package/Request/dist/effect-Request.cjs.dev.js +23 -23
  131. package/Request/dist/effect-Request.cjs.prod.js +23 -23
  132. package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +30 -30
  133. package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +30 -30
  134. package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +31 -31
  135. package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +31 -31
  136. package/Resource/dist/effect-Resource.cjs.dev.js +26 -26
  137. package/Resource/dist/effect-Resource.cjs.prod.js +26 -26
  138. package/Runtime/dist/effect-Runtime.cjs.dev.js +25 -25
  139. package/Runtime/dist/effect-Runtime.cjs.prod.js +25 -25
  140. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +35 -35
  141. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +35 -35
  142. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +2 -3
  143. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +2 -3
  144. package/STM/dist/effect-STM.cjs.dev.js +38 -38
  145. package/STM/dist/effect-STM.cjs.prod.js +38 -38
  146. package/Schedule/dist/effect-Schedule.cjs.dev.js +16 -16
  147. package/Schedule/dist/effect-Schedule.cjs.prod.js +16 -16
  148. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +0 -1
  149. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +0 -1
  150. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +0 -1
  151. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +0 -1
  152. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +0 -1
  153. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +0 -1
  154. package/Scheduler/dist/effect-Scheduler.cjs.dev.js +4 -5
  155. package/Scheduler/dist/effect-Scheduler.cjs.prod.js +4 -5
  156. package/Scope/dist/effect-Scope.cjs.dev.js +22 -22
  157. package/Scope/dist/effect-Scope.cjs.prod.js +22 -22
  158. package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +29 -29
  159. package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +29 -29
  160. package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +26 -26
  161. package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +26 -26
  162. package/Sink/dist/effect-Sink.cjs.dev.js +33 -33
  163. package/Sink/dist/effect-Sink.cjs.prod.js +33 -33
  164. package/SortedMap/dist/effect-SortedMap.cjs.dev.js +0 -1
  165. package/SortedMap/dist/effect-SortedMap.cjs.prod.js +0 -1
  166. package/SortedSet/dist/effect-SortedSet.cjs.dev.js +0 -1
  167. package/SortedSet/dist/effect-SortedSet.cjs.prod.js +0 -1
  168. package/Stream/dist/effect-Stream.cjs.dev.js +36 -36
  169. package/Stream/dist/effect-Stream.cjs.prod.js +36 -36
  170. package/Streamable/dist/effect-Streamable.cjs.dev.js +36 -36
  171. package/Streamable/dist/effect-Streamable.cjs.prod.js +36 -36
  172. package/String/dist/effect-String.cjs.dev.js +2 -2
  173. package/String/dist/effect-String.cjs.prod.js +2 -2
  174. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +41 -41
  175. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +41 -41
  176. package/Supervisor/dist/effect-Supervisor.cjs.dev.js +28 -28
  177. package/Supervisor/dist/effect-Supervisor.cjs.prod.js +28 -28
  178. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +25 -25
  179. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +25 -25
  180. package/TArray/dist/effect-TArray.cjs.dev.js +40 -40
  181. package/TArray/dist/effect-TArray.cjs.prod.js +40 -40
  182. package/TDeferred/dist/effect-TDeferred.cjs.dev.js +39 -39
  183. package/TDeferred/dist/effect-TDeferred.cjs.prod.js +39 -39
  184. package/TMap/dist/effect-TMap.cjs.dev.js +41 -41
  185. package/TMap/dist/effect-TMap.cjs.prod.js +41 -41
  186. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +38 -38
  187. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +38 -38
  188. package/TPubSub/dist/effect-TPubSub.cjs.dev.js +47 -47
  189. package/TPubSub/dist/effect-TPubSub.cjs.prod.js +47 -47
  190. package/TQueue/dist/effect-TQueue.cjs.dev.js +40 -40
  191. package/TQueue/dist/effect-TQueue.cjs.prod.js +40 -40
  192. package/TRandom/dist/effect-TRandom.cjs.dev.js +40 -40
  193. package/TRandom/dist/effect-TRandom.cjs.prod.js +40 -40
  194. package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +46 -46
  195. package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +46 -46
  196. package/TRef/dist/effect-TRef.cjs.dev.js +38 -38
  197. package/TRef/dist/effect-TRef.cjs.prod.js +38 -38
  198. package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +39 -39
  199. package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +39 -39
  200. package/TSet/dist/effect-TSet.cjs.dev.js +41 -41
  201. package/TSet/dist/effect-TSet.cjs.prod.js +41 -41
  202. package/Take/dist/effect-Take.cjs.dev.js +30 -30
  203. package/Take/dist/effect-Take.cjs.prod.js +30 -30
  204. package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +2 -3
  205. package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +2 -3
  206. package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +16 -16
  207. package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +16 -16
  208. package/TestClock/dist/effect-TestClock.cjs.dev.js +27 -27
  209. package/TestClock/dist/effect-TestClock.cjs.prod.js +27 -27
  210. package/TestContext/dist/effect-TestContext.cjs.dev.js +29 -29
  211. package/TestContext/dist/effect-TestContext.cjs.prod.js +29 -29
  212. package/TestLive/dist/effect-TestLive.cjs.dev.js +11 -11
  213. package/TestLive/dist/effect-TestLive.cjs.prod.js +11 -11
  214. package/TestServices/dist/effect-TestServices.cjs.dev.js +29 -29
  215. package/TestServices/dist/effect-TestServices.cjs.prod.js +29 -29
  216. package/TestSized/dist/effect-TestSized.cjs.dev.js +4 -5
  217. package/TestSized/dist/effect-TestSized.cjs.prod.js +4 -5
  218. package/Tracer/dist/effect-Tracer.cjs.dev.js +28 -21
  219. package/Tracer/dist/effect-Tracer.cjs.mjs +1 -0
  220. package/Tracer/dist/effect-Tracer.cjs.prod.js +28 -21
  221. package/Tracer/dist/effect-Tracer.esm.js +8 -2
  222. package/dist/{Ref-23b67ad9.cjs.prod.js → Ref-00103de4.cjs.prod.js} +1 -1
  223. package/dist/{Ref-c75b5362.cjs.dev.js → Ref-f990026b.cjs.dev.js} +1 -1
  224. package/dist/{cache-7b144c1f.cjs.prod.js → cache-0b148e42.cjs.prod.js} +4 -4
  225. package/dist/{cache-e3d6cc01.cjs.dev.js → cache-d709d5cb.cjs.dev.js} +4 -4
  226. package/dist/{circular-105d525c.cjs.prod.js → circular-5b6f6504.cjs.prod.js} +10 -8
  227. package/dist/{circular-cbfc1699.cjs.dev.js → circular-6d2bb353.cjs.dev.js} +10 -8
  228. package/dist/{circular-3761aff7.cjs.prod.js → circular-952618e5.cjs.prod.js} +7 -7
  229. package/dist/{circular-8baf0205.cjs.dev.js → circular-aa705e70.cjs.dev.js} +7 -7
  230. package/dist/{config-887520b4.cjs.dev.js → config-8a7bf1ae.cjs.dev.js} +3 -3
  231. package/dist/{config-6a5f97fe.cjs.prod.js → config-f0bd27af.cjs.prod.js} +3 -3
  232. package/dist/{configProvider-8567470d.cjs.dev.js → configProvider-3d85d4ef.cjs.dev.js} +4 -4
  233. package/dist/{configProvider-098f7113.cjs.prod.js → configProvider-ae007b10.cjs.prod.js} +4 -4
  234. package/dist/{core-84667e8d.cjs.prod.js → core-473934ce.cjs.prod.js} +125 -41
  235. package/dist/{core-6815193e.cjs.dev.js → core-b4bf44d3.cjs.dev.js} +125 -41
  236. package/dist/{core-8072a539.cjs.prod.js → core-d3f4e713.cjs.prod.js} +2 -2
  237. package/dist/{core-e6f9fdbe.cjs.dev.js → core-dd1edd7a.cjs.dev.js} +2 -2
  238. package/dist/{core-effect-520abd3d.cjs.prod.js → core-effect-6666f2dc.cjs.prod.js} +20 -13
  239. package/dist/{core-effect-5700daea.cjs.dev.js → core-effect-f4b1aad8.cjs.dev.js} +20 -13
  240. package/dist/{dataSource-0ca8ef42.cjs.dev.js → dataSource-9f78e828.cjs.dev.js} +2 -2
  241. package/dist/{dataSource-17adc342.cjs.prod.js → dataSource-d5d7f338.cjs.prod.js} +2 -2
  242. package/dist/declarations/src/BigInt.d.ts +29 -3
  243. package/dist/declarations/src/BigInt.d.ts.map +1 -1
  244. package/dist/declarations/src/Channel.d.ts +0 -2
  245. package/dist/declarations/src/Channel.d.ts.map +1 -1
  246. package/dist/declarations/src/Effect.d.ts +7 -37
  247. package/dist/declarations/src/Effect.d.ts.map +1 -1
  248. package/dist/declarations/src/FiberRef.d.ts +0 -5
  249. package/dist/declarations/src/FiberRef.d.ts.map +1 -1
  250. package/dist/declarations/src/HashMap.d.ts +1 -1
  251. package/dist/declarations/src/Layer.d.ts +7 -10
  252. package/dist/declarations/src/Layer.d.ts.map +1 -1
  253. package/dist/declarations/src/Number.d.ts +24 -1
  254. package/dist/declarations/src/Number.d.ts.map +1 -1
  255. package/dist/declarations/src/Option.d.ts +0 -62
  256. package/dist/declarations/src/Option.d.ts.map +1 -1
  257. package/dist/declarations/src/ReadonlyRecord.d.ts +239 -79
  258. package/dist/declarations/src/ReadonlyRecord.d.ts.map +1 -1
  259. package/dist/declarations/src/Stream.d.ts +0 -2
  260. package/dist/declarations/src/Stream.d.ts.map +1 -1
  261. package/dist/declarations/src/Tracer.d.ts +6 -1
  262. package/dist/declarations/src/Tracer.d.ts.map +1 -1
  263. package/dist/{defaultServices-193b11dc.cjs.dev.js → defaultServices-6a9a2d2b.cjs.dev.js} +8 -79
  264. package/dist/{defaultServices-4c3bf140.cjs.prod.js → defaultServices-8ea5e664.cjs.prod.js} +8 -79
  265. package/dist/{fiber-cbdeec72.cjs.dev.js → fiber-3d944398.cjs.dev.js} +3 -3
  266. package/dist/{fiber-a1a5e429.cjs.prod.js → fiber-cbd0613f.cjs.prod.js} +3 -3
  267. package/dist/{fiberRefs-f631451c.cjs.prod.js → fiberRefs-99808a27.cjs.prod.js} +1 -1
  268. package/dist/{fiberRefs-8d2401f9.cjs.dev.js → fiberRefs-ccc37f30.cjs.dev.js} +1 -1
  269. package/dist/{fiberRuntime-7cb6cd44.cjs.dev.js → fiberRuntime-0c1e7478.cjs.dev.js} +17 -25
  270. package/dist/{fiberRuntime-4691f31b.cjs.prod.js → fiberRuntime-f1e80ca7.cjs.prod.js} +17 -25
  271. package/dist/{groupBy-5174c302.cjs.prod.js → groupBy-30f6e9ba.cjs.prod.js} +4 -4
  272. package/dist/{groupBy-239a6e6e.cjs.dev.js → groupBy-8ae74e3b.cjs.dev.js} +4 -4
  273. package/dist/{key-9b2f3322.cjs.prod.js → key-9c7368c8.cjs.prod.js} +1 -1
  274. package/dist/{key-2d4efb00.cjs.dev.js → key-e3189bbd.cjs.dev.js} +1 -1
  275. package/dist/{layer-d1c204db.cjs.prod.js → layer-bfb9802a.cjs.prod.js} +9 -10
  276. package/dist/{layer-961b15ae.cjs.dev.js → layer-c284cf0d.cjs.dev.js} +9 -10
  277. package/dist/{patch-1771b466.cjs.prod.js → patch-256bc574.cjs.prod.js} +1 -1
  278. package/dist/{patch-32cc7202.cjs.dev.js → patch-cda9b6c8.cjs.dev.js} +1 -1
  279. package/dist/{pathPatch-45b09159.cjs.dev.js → pathPatch-31ce8101.cjs.dev.js} +1 -1
  280. package/dist/{pathPatch-312bd492.cjs.prod.js → pathPatch-40b92af6.cjs.prod.js} +1 -1
  281. package/dist/{pool-f178fcc7.cjs.prod.js → pool-122f0fad.cjs.prod.js} +5 -5
  282. package/dist/{pool-3890e6ce.cjs.dev.js → pool-f6ca2038.cjs.dev.js} +5 -5
  283. package/dist/{query-a6b58e39.cjs.prod.js → query-5cc0ddf8.cjs.prod.js} +3 -3
  284. package/dist/{query-39c40fa6.cjs.dev.js → query-7bffa3c3.cjs.dev.js} +3 -3
  285. package/dist/{queue-4c4bdc04.cjs.dev.js → queue-4166cfdb.cjs.dev.js} +2 -2
  286. package/dist/{queue-5342a8d5.cjs.prod.js → queue-e326fd89.cjs.prod.js} +2 -2
  287. package/dist/{registry-6fbdb4e3.cjs.prod.js → registry-081e18a3.cjs.prod.js} +2 -2
  288. package/dist/{registry-ec8b84a2.cjs.dev.js → registry-377855a9.cjs.dev.js} +2 -2
  289. package/dist/{runtime-3295bc3c.cjs.prod.js → runtime-4078f059.cjs.prod.js} +5 -5
  290. package/dist/{runtime-43b9e2bb.cjs.dev.js → runtime-d4514ab5.cjs.dev.js} +5 -5
  291. package/dist/{schedule-a4be407d.cjs.dev.js → schedule-31e38871.cjs.dev.js} +3 -3
  292. package/dist/{schedule-6431754b.cjs.prod.js → schedule-f036b254.cjs.prod.js} +3 -3
  293. package/dist/{scopedRef-9032002a.cjs.dev.js → scopedRef-5ecf6468.cjs.dev.js} +6 -6
  294. package/dist/{scopedRef-7c2bf3f3.cjs.prod.js → scopedRef-8ce21228.cjs.prod.js} +6 -6
  295. package/dist/{singleProducerAsyncInput-879852ad.cjs.prod.js → singleProducerAsyncInput-8879d87c.cjs.prod.js} +1 -1
  296. package/dist/{singleProducerAsyncInput-82e5c80c.cjs.dev.js → singleProducerAsyncInput-ece7387b.cjs.dev.js} +1 -1
  297. package/dist/{sink-e4280f95.cjs.dev.js → sink-1794329b.cjs.dev.js} +4 -3
  298. package/dist/{sink-95371737.cjs.prod.js → sink-9208df8d.cjs.prod.js} +4 -3
  299. package/dist/{stm-f792171c.cjs.prod.js → stm-6ad7b384.cjs.prod.js} +3 -3
  300. package/dist/{stm-4bf1a928.cjs.dev.js → stm-b080be31.cjs.dev.js} +3 -3
  301. package/dist/{stream-c498ce8a.cjs.dev.js → stream-09aeeac3.cjs.dev.js} +5 -5
  302. package/dist/{stream-254329d0.cjs.prod.js → stream-e19805ca.cjs.prod.js} +5 -5
  303. package/dist/{synchronizedRef-cfe99d53.cjs.dev.js → synchronizedRef-8fa16866.cjs.dev.js} +1 -1
  304. package/dist/{synchronizedRef-5420532c.cjs.prod.js → synchronizedRef-cc04ecbd.cjs.prod.js} +1 -1
  305. package/dist/{tArray-7f227674.cjs.prod.js → tArray-5e42c290.cjs.prod.js} +3 -3
  306. package/dist/{tArray-996f4aba.cjs.dev.js → tArray-7d470ed7.cjs.dev.js} +3 -3
  307. package/dist/{tMap-811797bf.cjs.prod.js → tMap-a2cfde88.cjs.prod.js} +4 -4
  308. package/dist/{tMap-b9665a82.cjs.dev.js → tMap-f0df0ea0.cjs.dev.js} +4 -4
  309. package/dist/{tQueue-0c15312e.cjs.dev.js → tQueue-085f70b5.cjs.dev.js} +3 -3
  310. package/dist/{tQueue-8a6a0244.cjs.prod.js → tQueue-b80e940e.cjs.prod.js} +3 -3
  311. package/dist/{tRef-44d17d07.cjs.dev.js → tRef-2e495254.cjs.dev.js} +1 -1
  312. package/dist/{tRef-2892ee02.cjs.prod.js → tRef-42a212cb.cjs.prod.js} +1 -1
  313. package/internal/cache.esm.js +1 -1
  314. package/internal/channel.esm.js +3 -2
  315. package/internal/core-effect.esm.js +18 -11
  316. package/internal/core.esm.js +52 -41
  317. package/internal/fiberRuntime.esm.js +7 -14
  318. package/internal/layer/circular.esm.js +9 -6
  319. package/internal/layer.esm.js +3 -3
  320. package/internal/sink.esm.js +1 -1
  321. package/internal/stream.esm.js +6 -6
  322. package/internal/tracer.esm.js +7 -4
  323. package/package.json +1 -1
  324. package/src/BigInt.ts +51 -17
  325. package/src/Channel.ts +0 -2
  326. package/src/Effect.ts +9 -44
  327. package/src/Either.ts +1 -1
  328. package/src/FiberRef.ts +0 -6
  329. package/src/HashMap.ts +1 -1
  330. package/src/Layer.ts +7 -10
  331. package/src/Number.ts +29 -1
  332. package/src/Option.ts +1 -94
  333. package/src/ReadonlyRecord.ts +383 -110
  334. package/src/Stream.ts +0 -2
  335. package/src/Tracer.ts +6 -1
  336. package/src/internal/channel.ts +14 -5
  337. package/src/internal/core-effect.ts +34 -24
  338. package/src/internal/core.ts +83 -70
  339. package/src/internal/fiberRuntime.ts +4 -29
  340. package/src/internal/layer/circular.ts +10 -13
  341. package/src/internal/layer.ts +8 -8
  342. package/src/internal/stream.ts +3 -5
  343. package/src/internal/tracer.ts +7 -3
  344. /package/dist/{FiberId-54d8bd67.cjs.prod.js → FiberId-0f0b7779.cjs.prod.js} +0 -0
  345. /package/dist/{FiberId-6708cdca.cjs.dev.js → FiberId-6595cf4c.cjs.dev.js} +0 -0
  346. /package/dist/{HashSet-86613304.cjs.prod.js → HashSet-251c8294.cjs.prod.js} +0 -0
  347. /package/dist/{HashSet-dd020cb0.cjs.dev.js → HashSet-c12c037b.cjs.dev.js} +0 -0
  348. /package/dist/{RuntimeFlagsPatch-35ed8dee.cjs.prod.js → RuntimeFlagsPatch-3890e860.cjs.prod.js} +0 -0
  349. /package/dist/{RuntimeFlagsPatch-9cbc441d.cjs.dev.js → RuntimeFlagsPatch-7d62915d.cjs.dev.js} +0 -0
  350. /package/dist/{boundaries-6eea221f.cjs.dev.js → boundaries-8dfe50cb.cjs.dev.js} +0 -0
  351. /package/dist/{boundaries-26f0dc82.cjs.prod.js → boundaries-ebe66d32.cjs.prod.js} +0 -0
  352. /package/dist/{configError-a824b415.cjs.dev.js → configError-0c09b93c.cjs.dev.js} +0 -0
  353. /package/dist/{configError-856c7153.cjs.prod.js → configError-9021016b.cjs.prod.js} +0 -0
  354. /package/dist/{configSecret-663cfb59.cjs.prod.js → configSecret-0bdfadd8.cjs.prod.js} +0 -0
  355. /package/dist/{configSecret-23cf1a3f.cjs.dev.js → configSecret-938818ad.cjs.dev.js} +0 -0
  356. /package/dist/{hook-8e8bee6a.cjs.dev.js → hook-ad5af092.cjs.dev.js} +0 -0
  357. /package/dist/{hook-c2815d51.cjs.prod.js → hook-cab99f9e.cjs.prod.js} +0 -0
  358. /package/dist/{keyType-4ec0b247.cjs.prod.js → keyType-2ae6a00e.cjs.prod.js} +0 -0
  359. /package/dist/{keyType-f30c9fa4.cjs.dev.js → keyType-36962f62.cjs.dev.js} +0 -0
  360. /package/dist/{take-981a87eb.cjs.prod.js → take-114476e5.cjs.prod.js} +0 -0
  361. /package/dist/{take-bfd0a3ed.cjs.dev.js → take-d4fa1beb.cjs.dev.js} +0 -0
@@ -5,10 +5,10 @@ var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.prod.js');
5
5
  var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
6
6
  var Hash_dist_effectHash = require('../Hash/dist/effect-Hash.cjs.prod.js');
7
7
  var HashMap_dist_effectHashMap = require('../HashMap/dist/effect-HashMap.cjs.prod.js');
8
- var core = require('./core-8072a539.cjs.prod.js');
9
- var stm = require('./stm-f792171c.cjs.prod.js');
10
- var tArray = require('./tArray-7f227674.cjs.prod.js');
11
- var tRef = require('./tRef-2892ee02.cjs.prod.js');
8
+ var core = require('./core-d3f4e713.cjs.prod.js');
9
+ var stm = require('./stm-6ad7b384.cjs.prod.js');
10
+ var tArray = require('./tArray-5e42c290.cjs.prod.js');
11
+ var tRef = require('./tRef-42a212cb.cjs.prod.js');
12
12
  var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
13
13
  var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js');
14
14
  var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.prod.js');
@@ -5,10 +5,10 @@ var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.dev.js');
5
5
  var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
6
6
  var Hash_dist_effectHash = require('../Hash/dist/effect-Hash.cjs.dev.js');
7
7
  var HashMap_dist_effectHashMap = require('../HashMap/dist/effect-HashMap.cjs.dev.js');
8
- var core = require('./core-e6f9fdbe.cjs.dev.js');
9
- var stm = require('./stm-4bf1a928.cjs.dev.js');
10
- var tArray = require('./tArray-996f4aba.cjs.dev.js');
11
- var tRef = require('./tRef-44d17d07.cjs.dev.js');
8
+ var core = require('./core-dd1edd7a.cjs.dev.js');
9
+ var stm = require('./stm-b080be31.cjs.dev.js');
10
+ var tArray = require('./tArray-7d470ed7.cjs.dev.js');
11
+ var tRef = require('./tRef-2e495254.cjs.dev.js');
12
12
  var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
13
13
  var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js');
14
14
  var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.dev.js');
@@ -2,9 +2,9 @@
2
2
 
3
3
  var Chunk_dist_effectChunk = require('../Chunk/dist/effect-Chunk.cjs.dev.js');
4
4
  var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
5
- var core = require('./core-e6f9fdbe.cjs.dev.js');
6
- var stm = require('./stm-4bf1a928.cjs.dev.js');
7
- var tRef = require('./tRef-44d17d07.cjs.dev.js');
5
+ var core = require('./core-dd1edd7a.cjs.dev.js');
6
+ var stm = require('./stm-b080be31.cjs.dev.js');
7
+ var tRef = require('./tRef-2e495254.cjs.dev.js');
8
8
  var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
9
9
  var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js');
10
10
  var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.dev.js');
@@ -2,9 +2,9 @@
2
2
 
3
3
  var Chunk_dist_effectChunk = require('../Chunk/dist/effect-Chunk.cjs.prod.js');
4
4
  var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
5
- var core = require('./core-8072a539.cjs.prod.js');
6
- var stm = require('./stm-f792171c.cjs.prod.js');
7
- var tRef = require('./tRef-2892ee02.cjs.prod.js');
5
+ var core = require('./core-d3f4e713.cjs.prod.js');
6
+ var stm = require('./stm-6ad7b384.cjs.prod.js');
7
+ var tRef = require('./tRef-42a212cb.cjs.prod.js');
8
8
  var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
9
9
  var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js');
10
10
  var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.prod.js');
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
4
- var core = require('./core-e6f9fdbe.cjs.dev.js');
4
+ var core = require('./core-dd1edd7a.cjs.dev.js');
5
5
  var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
6
6
 
7
7
  /** @internal */
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
4
- var core = require('./core-8072a539.cjs.prod.js');
4
+ var core = require('./core-d3f4e713.cjs.prod.js');
5
5
  var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
6
6
 
7
7
  /** @internal */
@@ -10,7 +10,7 @@ import { size, get, has, set, remove, empty } from '../MutableHashMap/dist/effec
10
10
  import { offer, poll, EmptyMutableQueue, unbounded } from '../MutableQueue/dist/effect-MutableQueue.esm.js';
11
11
  import { compareAndSet, set as set$1, make as make$1 } from '../MutableRef/dist/effect-MutableRef.esm.js';
12
12
  import { match, none, isSome, some, getOrUndefined } from '../Option/dist/effect-Option.esm.js';
13
- import { map, context, fiberId, sync, suspend, succeed, flatMap, asUnit, onInterrupt, zipRight, exit, provideContext } from './core.esm.js';
13
+ import { map, sync, suspend, succeed, flatMap, asUnit, onInterrupt, zipRight, exit, provideContext, context, fiberId } from './core.esm.js';
14
14
  import { clockWith, when } from './core-effect.esm.js';
15
15
  import { struct } from './Data.esm.js';
16
16
  import { none as none$1 } from './fiberId.esm.js';
@@ -2,7 +2,7 @@ import { failureOrCause, map as map$2, die, isDieType, isInterrupted } from '../
2
2
  import { empty, isEmpty, unsafeFromArray, fromIterable, unsafeGet as unsafeGet$1 } from '../Chunk/dist/effect-Chunk.esm.js';
3
3
  import { add, merge as merge$1, make as make$4, unsafeGet } from '../Context/dist/effect-Context.esm.js';
4
4
  import { await as _await, make as make$1, succeed as succeed$2, failCause as failCause$2, isDone } from '../Deferred/dist/effect-Deferred.esm.js';
5
- import { unit, flatMap as flatMap$1, uninterruptible, tap, context as context$1, map as map$1, suspend as suspend$1, matchCause, flatten as flatten$1, gen, acquireRelease, makeSemaphore, matchCauseEffect, failCause as failCause$1, zipRight as zipRight$1, interruptible, asUnit as asUnit$1, succeed as succeed$1, uninterruptibleMask, exit, raceFirst, tapErrorCause, intoDeferred, forkScoped, forever, raceWith, as as as$1, race, scoped as scoped$1, when, repeatWhile, zip as zip$1, zipWith, forkDaemon, never as never$1, sync as sync$1, setSpan, repeatUntil, catchAllCause as catchAllCause$1 } from '../Effect/dist/effect-Effect.esm.js';
5
+ import { unit, flatMap as flatMap$1, uninterruptible, tap, context as context$1, map as map$1, suspend as suspend$1, matchCause, flatten as flatten$1, gen, acquireRelease, makeSemaphore, matchCauseEffect, failCause as failCause$1, zipRight as zipRight$1, interruptible, asUnit as asUnit$1, succeed as succeed$1, uninterruptibleMask, exit, raceFirst, tapErrorCause, intoDeferred, forkScoped, forever, raceWith, as as as$1, race, scoped as scoped$1, when, repeatWhile, zip as zip$1, zipWith, forkDaemon, never as never$1, sync as sync$1, makeSpanScoped, repeatUntil, catchAllCause as catchAllCause$1 } from '../Effect/dist/effect-Effect.esm.js';
6
6
  import { match, left, right } from '../Either/dist/effect-Either.esm.js';
7
7
  import { equals } from '../Equal/dist/effect-Equal.esm.js';
8
8
  import { match as match$2, failCause as failCause$3, succeed as succeed$3, zip as zip$2 } from '../Exit/dist/effect-Exit.esm.js';
@@ -23,6 +23,7 @@ import { flatMap, fromEffect, ensuringWith, suspend, catchAllCause, failCause, c
23
23
  import { OP_DONE as OP_DONE$1 } from './opCodes/channelMergeDecision.esm.js';
24
24
  import { OP_RIGHT_DONE, OP_LEFT_DONE, OP_BOTH_RUNNING } from './opCodes/channelMergeState.esm.js';
25
25
  import { OP_READ, OP_FROM_EFFECT, OP_EMIT, OP_DONE } from './opCodes/channelState.esm.js';
26
+ import { spanTag } from './tracer.esm.js';
26
27
 
27
28
  /** @internal */
28
29
  const acquireUseRelease = (acquire, use, release) => flatMap(fromEffect(make(() => unit)), ref => pipe(fromEffect(uninterruptible(tap(acquire, a => set(ref, exit => release(a, exit))))), flatMap(use), ensuringWith(exit => flatMap$1(get(ref), f => f(exit)))));
@@ -600,7 +601,7 @@ const unwrapScoped = self => concatAllWith(scoped(self), (d, _) => d, (d, _) =>
600
601
  const updateService = /*#__PURE__*/dual(3, (self, tag, f) => mapInputContext(self, context => merge$1(context, make$4(tag, f(unsafeGet(context, tag))))));
601
602
 
602
603
  /** @internal */
603
- const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(as$1(setSpan(name, options), self)));
604
+ const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(flatMap$1(context$1(), context => map$1(makeSpanScoped(name, options), span => provideContext(self, add(context, spanTag, span))))));
604
605
 
605
606
  /** @internal */
606
607
  const writeAll = (...outs) => writeChunk(fromIterable(outs));
@@ -1,6 +1,6 @@
1
1
  import { append, toReadonlyArray, fromIterable as fromIterable$2, isNonEmpty, headNonEmpty, tailNonEmpty } from '../Chunk/dist/effect-Chunk.esm.js';
2
2
  import { clockWith as clockWith$1, sleep as sleep$1, currentTimeMillis, currentTimeNanos } from '../Clock/dist/effect-Clock.esm.js';
3
- import { add, unsafeGet, empty as empty$1 } from '../Context/dist/effect-Context.esm.js';
3
+ import { add, unsafeGet, getOption, empty as empty$1 } from '../Context/dist/effect-Context.esm.js';
4
4
  import { nanos } from '../Duration/dist/effect-Duration.esm.js';
5
5
  import { right, left } from '../Either/dist/effect-Either.esm.js';
6
6
  import { none as none$1 } from '../FiberId/dist/effect-FiberId.esm.js';
@@ -9,13 +9,14 @@ import { dual, identity, constVoid, constTrue, constFalse, pipe } from '../Funct
9
9
  import { set, forEach } from '../HashMap/dist/effect-HashMap.esm.js';
10
10
  import { fromIterable as fromIterable$1, union, size } from '../HashSet/dist/effect-HashSet.esm.js';
11
11
  import { fail, find, isDieType, empty, failures, failureOrCause, keepDefects, flatten, NoSuchElementException, isNoSuchElementException, interruptors, IllegalArgumentException, isCause } from './cause.esm.js';
12
- import { fiberRefLocallyWith, currentLogAnnotations, isEffect, map, mapError, asyncEither, unit, sync, makeEffectError, catchAll, fail as fail$1, catchAllCause, unified, failCause, matchCauseEffect, succeed, catchIf, matchCause, zipRight, withFiberRuntime, flatMap, suspend, context, orElse, yieldNow, dieSync, dieMessage, failSync, flip, matchEffect, currentLogSpan, fiberRefGet, failCauseSync, intoDeferred, deferredAwait, as, zip, updateRuntimeFlags, deferredMake, asUnit, whenEffect, async, contextWithEffect, provideContext, currentMetricLabels, mapInputContext, currentTracerSpanAnnotations, currentTracerSpan, currentTracerSpanLinks, acquireUseRelease, currentInterruptedCause, interrupt, runtimeFlags, fiberRefGetWith, currentTracerTimingEnabled, exitSucceed, exitDie } from './core.esm.js';
12
+ import { fiberRefLocallyWith, currentLogAnnotations, isEffect, map, mapError, asyncEither, unit, sync, makeEffectError, catchAll, fail as fail$1, catchAllCause, unified, failCause, matchCauseEffect, succeed, catchIf, matchCause, zipRight, withFiberRuntime, flatMap, suspend, context, orElse, yieldNow, dieSync, dieMessage, failSync, flip, matchEffect, currentLogSpan, fiberRefGet, failCauseSync, intoDeferred, deferredAwait, as, zip, updateRuntimeFlags, deferredMake, asUnit, whenEffect, async, contextWithEffect, provideContext, currentMetricLabels, mapInputContext, currentTracerSpanAnnotations, currentTracerSpanLinks, acquireUseRelease, currentInterruptedCause, interrupt, runtimeFlags, fiberRefGetWith, currentTracerTimingEnabled, exitSucceed, exitDie } from './core.esm.js';
13
13
  import { randomWith } from './defaultServices.esm.js';
14
14
  import { diff, patch } from './fiberRefs/patch.esm.js';
15
15
  import { make as make$2 } from './metric/label.esm.js';
16
16
  import { diff as diff$1 } from './runtimeFlags.esm.js';
17
17
  import { SingleShotGen } from './singleShotGen.esm.js';
18
- import { prepend, head as head$1, findFirst as findFirst$1, empty as empty$2 } from '../List/dist/effect-List.esm.js';
18
+ import { spanTag } from './tracer.esm.js';
19
+ import { prepend, empty as empty$2 } from '../List/dist/effect-List.esm.js';
19
20
  import { Trace, Debug, Info, Warning, Error, Fatal } from '../LogLevel/dist/effect-LogLevel.esm.js';
20
21
  import { make } from '../LogSpan/dist/effect-LogSpan.esm.js';
21
22
  import { some, none as none$2, match as match$1, fromNullable as fromNullable$1 } from '../Option/dist/effect-Option.esm.js';
@@ -530,7 +531,7 @@ const promise = evaluate => evaluate.length >= 1 ? async((resolve, signal) => {
530
531
  });
531
532
 
532
533
  /* @internal */
533
- const provideService = /*#__PURE__*/dual(3, (self, tag, service) => provideServiceEffect(self, tag, succeed(service)));
534
+ const provideService = /*#__PURE__*/dual(3, (self, tag, service) => contextWithEffect(env => provideContext(self, add(env, tag, service))));
534
535
 
535
536
  /* @internal */
536
537
  const provideServiceEffect = /*#__PURE__*/dual(3, (self, tag, effect) => contextWithEffect(env => flatMap(effect, service => provideContext(self, pipe(env, add(tag, service))))));
@@ -796,6 +797,9 @@ const serviceMembers = tag => ({
796
797
  constants: serviceConstants(tag)
797
798
  });
798
799
 
800
+ /** @internal */
801
+ const serviceOption = tag => map(context(), getOption(tag));
802
+
799
803
  // -----------------------------------------------------------------------------
800
804
  // tracing
801
805
  // -----------------------------------------------------------------------------
@@ -820,11 +824,14 @@ const annotateSpans = /*#__PURE__*/dual(args => isEffect(args[0]), function () {
820
824
  return fiberRefLocallyWith(args[0], currentTracerSpanAnnotations, typeof args[1] === "string" ? set(args[1], args[2]) : annotations => Object.entries(args[1]).reduce((acc, [key, value]) => set(acc, key, value), annotations));
821
825
  });
822
826
 
823
- /* @internal */
824
- const currentParentSpan = /*#__PURE__*/map( /*#__PURE__*/fiberRefGet(currentTracerSpan), head$1);
827
+ /** @internal */
828
+ const currentParentSpan = /*#__PURE__*/serviceOption(spanTag);
825
829
 
826
- /* @internal */
827
- const currentSpan = /*#__PURE__*/map( /*#__PURE__*/fiberRefGet(currentTracerSpan), /*#__PURE__*/findFirst$1(span => span._tag === "Span"));
830
+ /** @internal */
831
+ const currentSpan = /*#__PURE__*/map( /*#__PURE__*/context(), context => {
832
+ const span = context.unsafeMap.get(spanTag);
833
+ return span !== undefined && span._tag === "Span" ? some(span) : none$2();
834
+ });
828
835
  const bigint0 = /*#__PURE__*/BigInt(0);
829
836
  /** @internal */
830
837
  const currentTimeNanosTracing = /*#__PURE__*/fiberRefGetWith(currentTracerTimingEnabled, enabled => enabled ? currentTimeNanos : succeed(bigint0));
@@ -839,7 +846,7 @@ const linkSpans = /*#__PURE__*/dual(args => isEffect(args[0]), (self, span, attr
839
846
  /** @internal */
840
847
  const makeSpan = (name, options) => tracerWith(tracer => flatMap(options?.parent ? succeedSome(options.parent) : options?.root ? succeedNone : currentParentSpan, parent => flatMap(fiberRefGet(currentTracerSpanAnnotations), annotations => flatMap(fiberRefGet(currentTracerSpanLinks), links => flatMap(currentTimeNanosTracing, startTime => sync(() => {
841
848
  const linksArray = options?.links ? [...toReadonlyArray(links), ...options.links] : toReadonlyArray(links);
842
- const span = tracer.span(name, parent, options?.context ?? empty$1(), linksArray, options?.sampled ?? (parent._tag === "Some" ? parent.value.sampled : true), startTime);
849
+ const span = tracer.span(name, parent, options?.context ?? empty$1(), linksArray, startTime);
843
850
  forEach(annotations, (value, key) => span.attribute(key, value));
844
851
  Object.entries(options?.attributes ?? {}).forEach(([k, v]) => span.attribute(k, v));
845
852
  return span;
@@ -859,7 +866,7 @@ const useSpan = (name, ...args) => {
859
866
  };
860
867
 
861
868
  /** @internal */
862
- const withParentSpan = /*#__PURE__*/dual(2, (self, span) => fiberRefLocallyWith(self, currentTracerSpan, prepend(span)));
869
+ const withParentSpan = /*#__PURE__*/dual(2, (self, span) => provideService(self, spanTag, span));
863
870
 
864
871
  /** @internal */
865
872
  const withSpan = /*#__PURE__*/dual(args => typeof args[0] !== "string", (self, name, options) => useSpan(name, options ?? {}, span => withParentSpan(self, span)));
@@ -874,4 +881,4 @@ const fromNullable = value => value == null ? fail$1(NoSuchElementException()) :
874
881
  /* @internal */
875
882
  const optionFromOptional = self => catchAll(map(self, some), error => isNoSuchElementException(error) ? succeedNone : fail$1(error));
876
883
 
877
- export { Do, _catch, allowInterrupt, annotateCurrentSpan, annotateLogs, annotateSpans, asSome, asSomeError, asyncOption, bind, bindTo, bindValue, catchAllDefect, catchSomeCause, catchSomeDefect, catchTag, catchTags, cause, clock, clockWith, contextWith, currentParentSpan, currentSpan, currentTimeNanosTracing, delay, descriptor, descriptorWith, diffFiberRefs, diffFiberRefsAndRuntimeFlags, dropUntil, dropWhile, eventually, every, fiberRefs, filterOrDie, filterOrDieMessage, filterOrElse, filterOrFail, findFirst, firstSuccessOf, flipWith, forever, fromNullable, gen, head, ignore, ignoreLogged, inheritFiberRefs, isFailure, isSuccess, iterate, labelMetrics, labelMetricsSet, linkSpans, log, logAnnotations, logDebug, logError, logFatal, logInfo, logTrace, logWarning, loop, makeSpan, mapAccum, mapErrorCause, match, memoize, merge, negate, none, once, option, optionFromOptional, orElseFail, orElseSucceed, parallelErrors, patchFiberRefs, promise, provideService, provideServiceEffect, random, reduce, reduceRight, reduceWhile, repeatN, sandbox, serviceConstants, serviceFunction, serviceFunctionEffect, serviceFunctions, serviceMembers, setFiberRefs, sleep, spanAnnotations, spanLinks, succeedNone, succeedSome, summarized, tagMetrics, takeUntil, takeWhile, tapBoth, tapDefect, tapError, tapErrorCause, tapErrorTag, timed, timedWith, tracer, tracerWith, tryMap, tryMapPromise, tryPromise, try_, unless, unlessEffect, unsandbox, updateFiberRefs, updateService, useSpan, when, whenFiberRef, whenRef, withLogSpan, withMetric, withParentSpan, withSpan };
884
+ export { Do, _catch, allowInterrupt, annotateCurrentSpan, annotateLogs, annotateSpans, asSome, asSomeError, asyncOption, bind, bindTo, bindValue, catchAllDefect, catchSomeCause, catchSomeDefect, catchTag, catchTags, cause, clock, clockWith, contextWith, currentParentSpan, currentSpan, currentTimeNanosTracing, delay, descriptor, descriptorWith, diffFiberRefs, diffFiberRefsAndRuntimeFlags, dropUntil, dropWhile, eventually, every, fiberRefs, filterOrDie, filterOrDieMessage, filterOrElse, filterOrFail, findFirst, firstSuccessOf, flipWith, forever, fromNullable, gen, head, ignore, ignoreLogged, inheritFiberRefs, isFailure, isSuccess, iterate, labelMetrics, labelMetricsSet, linkSpans, log, logAnnotations, logDebug, logError, logFatal, logInfo, logTrace, logWarning, loop, makeSpan, mapAccum, mapErrorCause, match, memoize, merge, negate, none, once, option, optionFromOptional, orElseFail, orElseSucceed, parallelErrors, patchFiberRefs, promise, provideService, provideServiceEffect, random, reduce, reduceRight, reduceWhile, repeatN, sandbox, serviceConstants, serviceFunction, serviceFunctionEffect, serviceFunctions, serviceMembers, serviceOption, setFiberRefs, sleep, spanAnnotations, spanLinks, succeedNone, succeedSome, summarized, tagMetrics, takeUntil, takeWhile, tapBoth, tapDefect, tapError, tapErrorCause, tapErrorTag, timed, timedWith, tracer, tracerWith, tryMap, tryMapPromise, tryPromise, try_, unless, unlessEffect, unsandbox, updateFiberRefs, updateService, useSpan, when, whenFiberRef, whenRef, withLogSpan, withMetric, withParentSpan, withSpan };
@@ -16,9 +16,10 @@ import { DeferredTypeId, deferredVariance, pending, done } from './deferred.esm.
16
16
  import { OP_STATE_PENDING, OP_STATE_DONE } from './opCodes/deferred.esm.js';
17
17
  import { OP_SUCCESS, OP_FAILURE, OP_WITH_RUNTIME, OP_ON_FAILURE, OP_ON_SUCCESS, OP_ON_SUCCESS_AND_FAILURE, OP_UPDATE_RUNTIME_FLAGS, OP_SYNC, OP_WHILE, OP_YIELD, OP_REVERT_FLAGS, OP_ASYNC } from './opCodes/effect.esm.js';
18
18
  import { Interruption, interruption, differ } from './runtimeFlags.esm.js';
19
- import { empty as empty$3, isCons } from '../List/dist/effect-List.esm.js';
19
+ import { spanTag } from './tracer.esm.js';
20
+ import { empty as empty$3 } from '../List/dist/effect-List.esm.js';
20
21
  import { make as make$1, get, set } from '../MutableRef/dist/effect-MutableRef.esm.js';
21
- import { getOrElse, getOrThrow, some, none as none$1, match } from '../Option/dist/effect-Option.esm.js';
22
+ import { getOrElse, getOrThrow, some, none as none$1, match, isSome } from '../Option/dist/effect-Option.esm.js';
22
23
  import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
23
24
  import { reduce as reduce$1, fromIterable as fromIterable$1 } from '../ReadonlyArray/dist/effect-ReadonlyArray.esm.js';
24
25
  import { enable, disable } from '../RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.esm.js';
@@ -376,31 +377,28 @@ const originalInstance = obj => {
376
377
 
377
378
  /* @internal */
378
379
  const capture = (obj, span) => {
379
- if (isCons(span)) {
380
- const head = span.head;
381
- if (head._tag === "Span") {
382
- return new Proxy(obj, {
383
- has(target, p) {
384
- return p === spanSymbol || p === originalSymbol || p in target;
385
- },
386
- get(target, p) {
387
- if (p === spanSymbol) {
388
- return head;
389
- }
390
- if (p === originalSymbol) {
391
- return obj;
392
- }
393
- // @ts-expect-error
394
- return target[p];
380
+ if (isSome(span)) {
381
+ return new Proxy(obj, {
382
+ has(target, p) {
383
+ return p === spanSymbol || p === originalSymbol || p in target;
384
+ },
385
+ get(target, p) {
386
+ if (p === spanSymbol) {
387
+ return span.value;
395
388
  }
396
- });
397
- }
389
+ if (p === originalSymbol) {
390
+ return obj;
391
+ }
392
+ // @ts-expect-error
393
+ return target[p];
394
+ }
395
+ });
398
396
  }
399
397
  return obj;
400
398
  };
401
399
 
402
400
  /* @internal */
403
- const die = defect => typeof defect === "object" && defect !== null && !(spanSymbol in defect) ? withFiberRuntime(fiber => failCause(die$1(capture(defect, fiber.getFiberRef(currentTracerSpan))))) : failCause(die$1(defect));
401
+ const die = defect => typeof defect === "object" && defect !== null && !(spanSymbol in defect) ? withFiberRuntime(fiber => failCause(die$1(capture(defect, currentSpanFromFiber(fiber))))) : failCause(die$1(defect));
404
402
 
405
403
  /* @internal */
406
404
  const dieMessage = message => failCauseSync(() => die$1(RuntimeException(message)));
@@ -414,12 +412,6 @@ const either = self => matchEffect(self, {
414
412
  onSuccess: a => succeed(right(a))
415
413
  });
416
414
 
417
- /* @internal */
418
- const context = () => suspend(() => fiberRefGet(currentContext));
419
-
420
- /* @internal */
421
- const contextWithEffect = f => flatMap(context(), f);
422
-
423
415
  /* @internal */
424
416
  const exit = self => matchCause(self, {
425
417
  onFailure: exitFailCause,
@@ -427,7 +419,7 @@ const exit = self => matchCause(self, {
427
419
  });
428
420
 
429
421
  /* @internal */
430
- const fail = error => typeof error === "object" && error !== null && !(spanSymbol in error) ? withFiberRuntime(fiber => failCause(fail$1(capture(error, fiber.getFiberRef(currentTracerSpan))))) : failCause(fail$1(error));
422
+ const fail = error => typeof error === "object" && error !== null && !(spanSymbol in error) ? withFiberRuntime(fiber => failCause(fail$1(capture(error, currentSpanFromFiber(fiber))))) : failCause(fail$1(error));
431
423
 
432
424
  /* @internal */
433
425
  const failSync = evaluate => flatMap(sync(evaluate), fail);
@@ -673,15 +665,6 @@ const partitionMap = (elements, f) => fromIterable$1(elements).reduceRight(([lef
673
665
  }
674
666
  }, [new Array(), new Array()]);
675
667
 
676
- /* @internal */
677
- const provideContext = /*#__PURE__*/dual(2, (self, context) => fiberRefLocally(currentContext, context)(self));
678
-
679
- /* @internal */
680
- const provideSomeContext = /*#__PURE__*/dual(2, (self, context) => fiberRefLocallyWith(currentContext, parent => merge(parent, context))(self));
681
-
682
- /* @internal */
683
- const mapInputContext = /*#__PURE__*/dual(2, (self, f) => contextWithEffect(context => provideContext(self, f(context))));
684
-
685
668
  /* @internal */
686
669
  const runtimeFlags = /*#__PURE__*/withFiberRuntime((_, status) => succeed(status.runtimeFlags));
687
670
 
@@ -1161,9 +1144,6 @@ const currentInterruptedCause = /*#__PURE__*/globalValue( /*#__PURE__*/Symbol.fo
1161
1144
  join: (parent, _) => parent
1162
1145
  }));
1163
1146
 
1164
- /** @internal */
1165
- const currentTracerSpan = /*#__PURE__*/globalValue( /*#__PURE__*/Symbol.for("effect/FiberRef/currentTracerSpan"), () => fiberRefUnsafeMake(empty$3()));
1166
-
1167
1147
  /** @internal */
1168
1148
  const currentTracerTimingEnabled = /*#__PURE__*/globalValue( /*#__PURE__*/Symbol.for("effect/FiberRef/currentTracerTiming"), () => fiberRefUnsafeMake(true));
1169
1149
 
@@ -1742,4 +1722,35 @@ const deferredInterruptJoiner = (self, joiner) => sync(() => {
1742
1722
  }
1743
1723
  });
1744
1724
 
1745
- export { CloseableScopeTypeId, EffectErrorTypeId, EffectTypeId, FiberRefTypeId, RequestResolverImpl, RequestResolverTypeId, RevertFlags, ScopeTypeId, acquireUseRelease, allLogLevels, as, asUnit, async, asyncEither, attemptOrElse, blocked, catchAll, catchAllCause, catchIf, catchSome, checkInterruptible, context, contextWithEffect, currentConcurrency, currentContext, currentForkScopeOverride, currentInterruptedCause, currentLogAnnotations, currentLogLevel, currentLogSpan, currentMaxOpsBeforeYield, currentMetricLabels, currentRequestBatching, currentSchedulingPriority, currentTracerSpan, currentTracerSpanAnnotations, currentTracerSpanLinks, currentTracerTimingEnabled, currentUnhandledErrorLogLevel, deferredAwait, deferredComplete, deferredCompleteWith, deferredDie, deferredDieSync, deferredDone, deferredFail, deferredFailCause, deferredFailCauseSync, deferredFailSync, deferredInterrupt, deferredInterruptWith, deferredIsDone, deferredMake, deferredMakeAs, deferredPoll, deferredSucceed, deferredSync, deferredUnsafeDone, deferredUnsafeMake, die, dieMessage, dieSync, either, exit, exitAs, exitAsUnit, exitCauseOption, exitCollectAll, exitDie, exitExists, exitFail, exitFailCause, exitFlatMap, exitFlatMapEffect, exitFlatten, exitForEachEffect, exitFromEither, exitFromOption, exitGetOrElse, exitInterrupt, exitIsExit, exitIsFailure, exitIsInterrupted, exitIsSuccess, exitMap, exitMapBoth, exitMapError, exitMapErrorCause, exitMatch, exitMatchEffect, exitSucceed, exitUnit, exitZip, exitZipLeft, exitZipPar, exitZipParLeft, exitZipParRight, exitZipRight, exitZipWith, fail, failCause, failCauseSync, failSync, fiberId, fiberIdWith, fiberRefDelete, fiberRefGet, fiberRefGetAndSet, fiberRefGetAndUpdate, fiberRefGetAndUpdateSome, fiberRefGetWith, fiberRefLocally, fiberRefLocallyWith, fiberRefModify, fiberRefModifySome, fiberRefReset, fiberRefSet, fiberRefUnsafeMake, fiberRefUnsafeMakeContext, fiberRefUnsafeMakeHashSet, fiberRefUnsafeMakePatch, fiberRefUnsafeMakeRuntimeFlags, fiberRefUpdate, fiberRefUpdateAndGet, fiberRefUpdateSome, fiberRefUpdateSomeAndGet, flatMap, flatMapStep, flatten, flip, forEachSequential, forEachSequentialDiscard, if_, interrupt, interruptAsFiber, interruptFiber, interruptWith, interruptible, interruptibleMask, intoDeferred, isEffect, isEffectError, isRequestResolver, logLevelAll, logLevelDebug, logLevelError, logLevelFatal, logLevelInfo, logLevelNone, logLevelTrace, logLevelWarning, makeEffectError, map, mapBoth, mapError, mapInputContext, matchCause, matchCauseEffect, matchEffect, metricLabels, never, onError, onExit, onInterrupt, orDie, orDieWith, orElse, originalInstance, partitionMap, provideContext, provideSomeContext, releaseMapAdd, releaseMapAddIfOpen, releaseMapMake, releaseMapRelease, requestBlockLocally, resolverLocally, runRequestBlock, runtimeFlags, scopeAddFinalizer, scopeAddFinalizerExit, scopeClose, scopeFork, step, succeed, suspend, sync, tap, transplant, unified, uninterruptible, uninterruptibleMask, unit, updateRuntimeFlags, whenEffect, whileLoop, withConcurrency, withFiberRuntime, withMaxOpsBeforeYield, withRequestBatching, withRuntimeFlags, withSchedulingPriority, withTracerTiming, withUnhandledErrorLogLevel, yieldNow, zip, zipLeft, zipRight, zipWith };
1725
+ // -----------------------------------------------------------------------------
1726
+ // Context
1727
+ // -----------------------------------------------------------------------------
1728
+
1729
+ const constContext = /*#__PURE__*/fiberRefGet(currentContext);
1730
+
1731
+ /* @internal */
1732
+ const context = () => constContext;
1733
+
1734
+ /* @internal */
1735
+ const contextWithEffect = f => flatMap(context(), f);
1736
+
1737
+ /* @internal */
1738
+ const provideContext = /*#__PURE__*/dual(2, (self, context) => fiberRefLocally(currentContext, context)(self));
1739
+
1740
+ /* @internal */
1741
+ const provideSomeContext = /*#__PURE__*/dual(2, (self, context) => fiberRefLocallyWith(currentContext, parent => merge(parent, context))(self));
1742
+
1743
+ /* @internal */
1744
+ const mapInputContext = /*#__PURE__*/dual(2, (self, f) => contextWithEffect(context => provideContext(self, f(context))));
1745
+
1746
+ // -----------------------------------------------------------------------------
1747
+ // Tracing
1748
+ // -----------------------------------------------------------------------------
1749
+
1750
+ /** @internal */
1751
+ const currentSpanFromFiber = fiber => {
1752
+ const span = fiber.getFiberRef(currentContext).unsafeMap.get(spanTag);
1753
+ return span !== undefined && span._tag === "Span" ? some(span) : none$1();
1754
+ };
1755
+
1756
+ export { CloseableScopeTypeId, EffectErrorTypeId, EffectTypeId, FiberRefTypeId, RequestResolverImpl, RequestResolverTypeId, RevertFlags, ScopeTypeId, acquireUseRelease, allLogLevels, as, asUnit, async, asyncEither, attemptOrElse, blocked, catchAll, catchAllCause, catchIf, catchSome, checkInterruptible, context, contextWithEffect, currentConcurrency, currentContext, currentForkScopeOverride, currentInterruptedCause, currentLogAnnotations, currentLogLevel, currentLogSpan, currentMaxOpsBeforeYield, currentMetricLabels, currentRequestBatching, currentSchedulingPriority, currentSpanFromFiber, currentTracerSpanAnnotations, currentTracerSpanLinks, currentTracerTimingEnabled, currentUnhandledErrorLogLevel, deferredAwait, deferredComplete, deferredCompleteWith, deferredDie, deferredDieSync, deferredDone, deferredFail, deferredFailCause, deferredFailCauseSync, deferredFailSync, deferredInterrupt, deferredInterruptWith, deferredIsDone, deferredMake, deferredMakeAs, deferredPoll, deferredSucceed, deferredSync, deferredUnsafeDone, deferredUnsafeMake, die, dieMessage, dieSync, either, exit, exitAs, exitAsUnit, exitCauseOption, exitCollectAll, exitDie, exitExists, exitFail, exitFailCause, exitFlatMap, exitFlatMapEffect, exitFlatten, exitForEachEffect, exitFromEither, exitFromOption, exitGetOrElse, exitInterrupt, exitIsExit, exitIsFailure, exitIsInterrupted, exitIsSuccess, exitMap, exitMapBoth, exitMapError, exitMapErrorCause, exitMatch, exitMatchEffect, exitSucceed, exitUnit, exitZip, exitZipLeft, exitZipPar, exitZipParLeft, exitZipParRight, exitZipRight, exitZipWith, fail, failCause, failCauseSync, failSync, fiberId, fiberIdWith, fiberRefDelete, fiberRefGet, fiberRefGetAndSet, fiberRefGetAndUpdate, fiberRefGetAndUpdateSome, fiberRefGetWith, fiberRefLocally, fiberRefLocallyWith, fiberRefModify, fiberRefModifySome, fiberRefReset, fiberRefSet, fiberRefUnsafeMake, fiberRefUnsafeMakeContext, fiberRefUnsafeMakeHashSet, fiberRefUnsafeMakePatch, fiberRefUnsafeMakeRuntimeFlags, fiberRefUpdate, fiberRefUpdateAndGet, fiberRefUpdateSome, fiberRefUpdateSomeAndGet, flatMap, flatMapStep, flatten, flip, forEachSequential, forEachSequentialDiscard, if_, interrupt, interruptAsFiber, interruptFiber, interruptWith, interruptible, interruptibleMask, intoDeferred, isEffect, isEffectError, isRequestResolver, logLevelAll, logLevelDebug, logLevelError, logLevelFatal, logLevelInfo, logLevelNone, logLevelTrace, logLevelWarning, makeEffectError, map, mapBoth, mapError, mapInputContext, matchCause, matchCauseEffect, matchEffect, metricLabels, never, onError, onExit, onInterrupt, orDie, orDieWith, orElse, originalInstance, partitionMap, provideContext, provideSomeContext, releaseMapAdd, releaseMapAddIfOpen, releaseMapMake, releaseMapRelease, requestBlockLocally, resolverLocally, runRequestBlock, runtimeFlags, scopeAddFinalizer, scopeAddFinalizerExit, scopeClose, scopeFork, step, succeed, suspend, sync, tap, transplant, unified, uninterruptible, uninterruptibleMask, unit, updateRuntimeFlags, whenEffect, whileLoop, withConcurrency, withFiberRuntime, withMaxOpsBeforeYield, withRequestBatching, withRuntimeFlags, withSchedulingPriority, withTracerTiming, withUnhandledErrorLogLevel, yieldNow, zip, zipLeft, zipRight, zipWith };
@@ -1,6 +1,6 @@
1
1
  import { not } from '../Boolean/dist/effect-Boolean.esm.js';
2
2
  import { fromIterable as fromIterable$1, isNonEmpty, headNonEmpty, tailNonEmpty, unsafeFromArray, prepend } from '../Chunk/dist/effect-Chunk.esm.js';
3
- import { get as get$1, getOption, add, Tag, merge, make as make$2, unsafeGet } from '../Context/dist/effect-Context.esm.js';
3
+ import { getOption, get as get$1, add, Tag, merge, make as make$2, unsafeGet } from '../Context/dist/effect-Context.esm.js';
4
4
  import { await as _await$1 } from '../Deferred/dist/effect-Deferred.esm.js';
5
5
  import { parallel, sequential, parallelN } from '../ExecutionStrategy/dist/effect-ExecutionStrategy.esm.js';
6
6
  import { threadName, combine, none as none$2, unsafeMake as unsafeMake$1 } from '../FiberId/dist/effect-FiberId.esm.js';
@@ -16,8 +16,8 @@ import { clockTag } from './clock.esm.js';
16
16
  import { currentRequestMap } from './completedRequestMap.esm.js';
17
17
  import { matchSimple, match as match$1 } from './concurrency.esm.js';
18
18
  import { configProviderTag } from './configProvider.esm.js';
19
- import { fiberRefUnsafeMake, currentTracerSpan, fiberRefUnsafeMakeHashSet, uninterruptible, tap, isEffect, withFiberRuntime, fiberRefLocally, currentForkScopeOverride, map as map$2, exit, exitIsSuccess, onError, failCause, partitionMap, either, flatMap as flatMap$1, unit, succeed, fail, dieSync, uninterruptibleMask, interruptible, forEachSequential, zipRight, asUnit, onInterrupt, zipLeft, interruptFiber, deferredMake, exitMatchEffect, flatten, deferredFailCause, deferredSucceed, contextWithEffect, scopeFork, currentMetricLabels, acquireUseRelease, scopeClose, exitZipWith, flip, fiberIdWith, updateRuntimeFlags, runtimeFlags, ScopeTypeId, releaseMapMake, CloseableScopeTypeId, releaseMapAdd, scopeAddFinalizerExit, as, mapInputContext, onExit, fiberRefUnsafeMakePatch, fiberRefGet, fiberRefSet, fiberRefGetWith, sync, fiberRefUpdate, fiberRefDelete, fiberRefUnsafeMakeContext, fiberRefUnsafeMakeRuntimeFlags, forEachSequentialDiscard, exitSucceed, matchCauseEffect, suspend, fiberRefLocallyWith, currentInterruptedCause, deferredUnsafeMake, deferredAwait, async, currentSchedulingPriority, whileLoop, currentUnhandledErrorLogLevel, currentLogLevel, currentLogSpan, currentLogAnnotations, exitFailCause, exitUnit, currentContext, blocked, catchAllCause, runRequestBlock, RevertFlags, yieldNow as yieldNow$1, isEffectError, withRuntimeFlags, matchEffect, if_, zipWith, currentRequestBatching, transplant, step, deferredUnsafeDone, deferredFail, exitCollectAll, exitIsFailure, exitInterrupt, exitAsUnit, interruptAsFiber, flatMapStep } from './core.esm.js';
20
- import { makeSpan, currentTimeNanosTracing, mapErrorCause } from './core-effect.esm.js';
19
+ import { fiberRefUnsafeMake, currentContext, fiberRefUnsafeMakeHashSet, uninterruptible, tap, isEffect, withFiberRuntime, fiberRefLocally, currentForkScopeOverride, map as map$2, exit, exitIsSuccess, onError, failCause, partitionMap, either, flatMap as flatMap$1, unit, succeed, fail, dieSync, uninterruptibleMask, interruptible, forEachSequential, zipRight, asUnit, onInterrupt, zipLeft, interruptFiber, deferredMake, exitMatchEffect, flatten, deferredFailCause, deferredSucceed, contextWithEffect, scopeFork, currentMetricLabels, acquireUseRelease, scopeClose, exitZipWith, flip, fiberIdWith, updateRuntimeFlags, runtimeFlags, ScopeTypeId, releaseMapMake, CloseableScopeTypeId, releaseMapAdd, scopeAddFinalizerExit, as, mapInputContext, onExit, fiberRefUnsafeMakePatch, fiberRefGet, fiberRefSet, fiberRefGetWith, sync, fiberRefUpdate, fiberRefDelete, fiberRefUnsafeMakeContext, fiberRefUnsafeMakeRuntimeFlags, forEachSequentialDiscard, exitSucceed, matchCauseEffect, suspend, currentInterruptedCause, deferredUnsafeMake, deferredAwait, async, currentSchedulingPriority, whileLoop, currentUnhandledErrorLogLevel, currentLogLevel, currentLogSpan, currentLogAnnotations, exitFailCause, exitUnit, blocked, catchAllCause, runRequestBlock, RevertFlags, yieldNow as yieldNow$1, isEffectError, withRuntimeFlags, matchEffect, if_, zipWith, currentRequestBatching, transplant, step, deferredUnsafeDone, deferredFail, exitCollectAll, exitIsFailure, exitInterrupt, exitAsUnit, interruptAsFiber, flatMapStep } from './core.esm.js';
20
+ import { makeSpan, currentTimeNanosTracing, provideService, mapErrorCause } from './core-effect.esm.js';
21
21
  import { currentServices } from './defaultServices.esm.js';
22
22
  import { consoleTag } from './defaultServices/console.esm.js';
23
23
  import { sequential as sequential$2, isSequential, isParallel } from './executionStrategy.esm.js';
@@ -34,8 +34,7 @@ import { complete } from './request.esm.js';
34
34
  import { patch, diff, runtimeMetrics, WindDown, Interruption, interruptible as interruptible$1, enable, cooperativeYielding, OpSupervision, none as none$3 } from './runtimeFlags.esm.js';
35
35
  import { none as none$1 } from './supervisor.esm.js';
36
36
  import { differ, empty as empty$1 } from './supervisor/patch.esm.js';
37
- import { tracerTag } from './tracer.esm.js';
38
- import { head, prepend as prepend$1 } from '../List/dist/effect-List.esm.js';
37
+ import { spanTag, tracerTag } from './tracer.esm.js';
39
38
  import { fromLiteral, greaterThan } from '../LogLevel/dist/effect-LogLevel.esm.js';
40
39
  import { make as make$4, compareAndSet } from '../MutableRef/dist/effect-MutableRef.esm.js';
41
40
  import { flatMap, map, some, none, match, fromNullable, isSome, getOrElse } from '../Option/dist/effect-Option.esm.js';
@@ -1175,7 +1174,7 @@ const tracerLogger = /*#__PURE__*/makeLogger(({
1175
1174
  logLevel,
1176
1175
  message
1177
1176
  }) => {
1178
- const span = flatMap(get(context, currentTracerSpan), head);
1177
+ const span = flatMap(get(context, currentContext), getOption(spanTag));
1179
1178
  const clockService = map(get(context, currentServices), _ => get$1(_, clockTag));
1180
1179
  if (span._tag === "None" || span.value._tag === "ExternalSpan" || clockService._tag === "None") {
1181
1180
  return;
@@ -1997,16 +1996,10 @@ const interruptWhenPossible = /*#__PURE__*/dual(2, (self, all) => fiberRefGetWit
1997
1996
  /** @internal */
1998
1997
  const makeSpanScoped = (name, options) => acquireRelease(makeSpan(name, options), (span, exit) => flatMap$1(currentTimeNanosTracing, endTime => sync(() => span.end(endTime, exit))));
1999
1998
 
2000
- /* @internal */
2001
- const setSpan = (name, options) => tap(makeSpanScoped(name, options), span => setParentSpan(span));
2002
-
2003
1999
  /* @internal */
2004
2000
  const withTracerScoped = value => fiberRefLocallyScopedWith(currentServices, add(tracerTag, value));
2005
2001
 
2006
- /* @internal */
2007
- const setParentSpan = span => fiberRefLocallyScopedWith(currentTracerSpan, prepend$1(span));
2008
-
2009
2002
  /** @internal */
2010
- const withSpanScoped = /*#__PURE__*/dual(args => typeof args[0] !== "string", (self, name, options) => flatMap$1(makeSpanScoped(name, options), span => fiberRefLocallyWith(self, currentTracerSpan, prepend$1(span))));
2003
+ const withSpanScoped = /*#__PURE__*/dual(args => typeof args[0] !== "string", (self, name, options) => flatMap$1(makeSpanScoped(name, options), span => provideService(self, spanTag, span)));
2011
2004
 
2012
- export { FiberRuntime, acquireRelease, acquireReleaseInterruptible, addFinalizer, all, allSuccesses, allWith, currentLoggers, currentMinimumLogLevel, currentRuntimeFlags, currentSupervisor, daemonChildren, defaultLogger, disconnect, ensuring, exists, fiberActive, fiberAll, fiberAwaitAll, fiberFailures, fiberInterruptFork, fiberJoinAll, fiberLifetimes, fiberRefLocallyScoped, fiberRefLocallyScopedWith, fiberRefMake, fiberRefMakeContext, fiberRefMakeRuntimeFlags, fiberRefMakeWith, fiberRefUnsafeMakeSupervisor, fiberScoped, fiberStarted, fiberSuccesses, filter, finalizersMask, forEachOptions, forEachParN, forEachParNDiscard, forEachParUnbounded, forEachParUnboundedDiscard, fork, forkDaemon, forkWithErrorHandler, getConsole, interruptWhenPossible, invokeWithInterrupt, labelMetricsScoped, labelMetricsScopedSet, logFmtLogger, makeSpanScoped, mergeAll, parallelFinalizers, parallelNFinalizers, partition, race, raceAll, raceFibersWith, raceWith, reduceEffect, releaseMapReleaseAll, replicate, replicateEffect, runtimeFiberVariance, scope, scopeExtend, scopeMake, scopeTag, scopeUse, scopeWith, scopedEffect, sequentialFinalizers, setParentSpan, setSpan, tagMetricsScoped, tracerLogger, unsafeFork, unsafeMakeChildFiber, using, validate, validateAll, validateFirst, validateWith, withClockScoped, withConfigProviderScoped, withEarlyRelease, withRuntimeFlagsScoped, withSpanScoped, withTracerScoped, zipLeftOptions, zipOptions, zipRightOptions, zipWithOptions };
2005
+ export { FiberRuntime, acquireRelease, acquireReleaseInterruptible, addFinalizer, all, allSuccesses, allWith, currentLoggers, currentMinimumLogLevel, currentRuntimeFlags, currentSupervisor, daemonChildren, defaultLogger, disconnect, ensuring, exists, fiberActive, fiberAll, fiberAwaitAll, fiberFailures, fiberInterruptFork, fiberJoinAll, fiberLifetimes, fiberRefLocallyScoped, fiberRefLocallyScopedWith, fiberRefMake, fiberRefMakeContext, fiberRefMakeRuntimeFlags, fiberRefMakeWith, fiberRefUnsafeMakeSupervisor, fiberScoped, fiberStarted, fiberSuccesses, filter, finalizersMask, forEachOptions, forEachParN, forEachParNDiscard, forEachParUnbounded, forEachParUnboundedDiscard, fork, forkDaemon, forkWithErrorHandler, getConsole, interruptWhenPossible, invokeWithInterrupt, labelMetricsScoped, labelMetricsScopedSet, logFmtLogger, makeSpanScoped, mergeAll, parallelFinalizers, parallelNFinalizers, partition, race, raceAll, raceFibersWith, raceWith, reduceEffect, releaseMapReleaseAll, replicate, replicateEffect, runtimeFiberVariance, scope, scopeExtend, scopeMake, scopeTag, scopeUse, scopeWith, scopedEffect, sequentialFinalizers, tagMetricsScoped, tracerLogger, unsafeFork, unsafeMakeChildFiber, using, validate, validateAll, validateFirst, validateWith, withClockScoped, withConfigProviderScoped, withEarlyRelease, withRuntimeFlagsScoped, withSpanScoped, withTracerScoped, zipLeftOptions, zipOptions, zipRightOptions, zipWithOptions };
@@ -1,13 +1,16 @@
1
+ import { make } from '../../Context/dist/effect-Context.esm.js';
1
2
  import { dual } from '../../Function/dist/effect-Function.esm.js';
2
3
  import { add, remove } from '../../HashSet/dist/effect-HashSet.esm.js';
3
- import { fiberRefLocally, map, tap, zipRight } from '../core.esm.js';
4
- import { fiberRefLocallyScoped, currentMinimumLogLevel, fiberRefLocallyScopedWith, currentLoggers, currentSupervisor, withRuntimeFlagsScoped, withConfigProviderScoped, setParentSpan as setParentSpan$1, makeSpanScoped, addFinalizer, setSpan as setSpan$1, withTracerScoped } from '../fiberRuntime.esm.js';
5
- import { scopedDiscard, unwrapEffect, unwrapScoped, flatMap } from '../layer.esm.js';
4
+ import { fiberRefLocally, map, tap } from '../core.esm.js';
5
+ import { fiberRefLocallyScoped, currentMinimumLogLevel, fiberRefLocallyScopedWith, currentLoggers, currentSupervisor, withRuntimeFlagsScoped, withConfigProviderScoped, makeSpanScoped, addFinalizer, withTracerScoped } from '../fiberRuntime.esm.js';
6
+ import { scopedDiscard, unwrapEffect, unwrapScoped, flatMap, succeedContext, scoped } from '../layer.esm.js';
6
7
  import { CooperativeYielding, Interruption, OpSupervision, RuntimeMetrics, WindDown } from '../runtimeFlags.esm.js';
7
8
  import { enable, disable } from '../runtimeFlagsPatch.esm.js';
8
9
  import { Zip } from '../supervisor.esm.js';
10
+ import { spanTag } from '../tracer.esm.js';
9
11
 
10
12
  // circular with Logger
13
+
11
14
  /** @internal */
12
15
  const minimumLogLevel = level => scopedDiscard(fiberRefLocallyScoped(currentMinimumLogLevel, level));
13
16
 
@@ -72,12 +75,12 @@ const disableWindDown = /*#__PURE__*/scopedDiscard( /*#__PURE__*/withRuntimeFlag
72
75
  const setConfigProvider = configProvider => scopedDiscard(withConfigProviderScoped(configProvider));
73
76
 
74
77
  /** @internal */
75
- const setParentSpan = span => scopedDiscard(setParentSpan$1(span));
78
+ const parentSpan = span => succeedContext(make(spanTag, span));
76
79
 
77
80
  /** @internal */
78
- const setSpan = (name, options) => scopedDiscard(options?.onEnd ? tap(makeSpanScoped(name, options), span => zipRight(addFinalizer(exit => options.onEnd(span, exit)), setParentSpan$1(span))) : setSpan$1(name, options));
81
+ const span = (name, options) => scoped(spanTag, options?.onEnd ? tap(makeSpanScoped(name, options), span => addFinalizer(exit => options.onEnd(span, exit))) : makeSpanScoped(name, options));
79
82
 
80
83
  /** @internal */
81
84
  const setTracer = tracer => scopedDiscard(withTracerScoped(tracer));
82
85
 
83
- export { addLogger, addLoggerEffect, addLoggerScoped, addSupervisor, disableCooperativeYielding, disableInterruption, disableOpSupervision, disableRuntimeMetrics, disableWindDown, enableCooperativeYielding, enableInterruption, enableOpSupervision, enableRuntimeMetrics, enableWindDown, minimumLogLevel, removeLogger, replaceLogger, replaceLoggerEffect, replaceLoggerScoped, setConfigProvider, setParentSpan, setSpan, setTracer, withMinimumLogLevel };
86
+ export { addLogger, addLoggerEffect, addLoggerScoped, addSupervisor, disableCooperativeYielding, disableInterruption, disableOpSupervision, disableRuntimeMetrics, disableWindDown, enableCooperativeYielding, enableInterruption, enableOpSupervision, enableRuntimeMetrics, enableWindDown, minimumLogLevel, parentSpan, removeLogger, replaceLogger, replaceLoggerEffect, replaceLoggerScoped, setConfigProvider, setTracer, span, withMinimumLogLevel };
@@ -4,7 +4,7 @@ import { empty, get, make, merge as merge$1, unsafeGet, Tag, isContext, isTag }
4
4
  import { millis } from '../Duration/dist/effect-Duration.esm.js';
5
5
  import { diff as diff$1 } from '../FiberRefsPatch/dist/effect-FiberRefsPatch.esm.js';
6
6
  import { dual, pipe } from '../Function/dist/effect-Function.esm.js';
7
- import { flatMap as flatMap$1, sync as sync$1, zipWith, provideContext, matchCauseEffect, context as context$1, failCause as failCause$1, failCauseSync as failCauseSync$1, map as map$1, fiberRefLocally as fiberRefLocally$1, fiberRefLocallyWith as fiberRefLocallyWith$1, zipRight, never, as, succeed as succeed$1, fail as fail$2, tap as tap$1, currentTracerSpan, provideSomeContext, acquireUseRelease, scopeClose, updateRuntimeFlags, flatten as flatten$1, onExit, exitMatch, unit, scopeAddFinalizerExit, deferredMake, uninterruptibleMask, exit, whenEffect, asUnit, deferredSucceed, deferredFailCause, deferredAwait, exitMatchEffect } from './core.esm.js';
7
+ import { flatMap as flatMap$1, sync as sync$1, zipWith, provideContext, matchCauseEffect, failCause as failCause$1, failCauseSync as failCauseSync$1, map as map$1, fiberRefLocally as fiberRefLocally$1, fiberRefLocallyWith as fiberRefLocallyWith$1, zipRight, never, as, succeed as succeed$1, fail as fail$2, tap as tap$1, provideSomeContext, context as context$1, acquireUseRelease, scopeClose, updateRuntimeFlags, flatten as flatten$1, onExit, exitMatch, unit, scopeAddFinalizerExit, deferredMake, uninterruptibleMask, exit, whenEffect, asUnit, deferredSucceed, deferredFailCause, deferredAwait, exitMatchEffect } from './core.esm.js';
8
8
  import { memoize as memoize$1, patchFiberRefs, diffFiberRefs } from './core-effect.esm.js';
9
9
  import { makeSynchronized } from './effect/circular.esm.js';
10
10
  import { scopeWith, zipWithOptions, scopeExtend, fiberRefLocallyScoped as fiberRefLocallyScoped$1, fiberRefLocallyScopedWith as fiberRefLocallyScopedWith$1, scopedEffect, acquireRelease, scopeMake, makeSpanScoped, addFinalizer } from './fiberRuntime.esm.js';
@@ -13,12 +13,12 @@ import { OP_FRESH, OP_EXTEND_SCOPE, OP_FROM_EFFECT, OP_FOLD, OP_ZIP_WITH, OP_SCO
13
13
  import { make as make$1, set, modify, update, get as get$1 } from './ref.esm.js';
14
14
  import { runtime, defaultRuntime } from './runtime.esm.js';
15
15
  import { modifyEffect } from './synchronizedRef.esm.js';
16
- import { prepend } from '../List/dist/effect-List.esm.js';
17
16
  import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
18
17
  import { isDone } from '../ScheduleDecision/dist/effect-ScheduleDecision.esm.js';
19
18
  import { start } from '../ScheduleIntervals/dist/effect-ScheduleIntervals.esm.js';
20
19
  import { Scope } from '../Scope/dist/effect-Scope.esm.js';
21
20
  import { diff } from './runtimeFlags.esm.js';
21
+ import { spanTag } from './tracer.esm.js';
22
22
 
23
23
  /** @internal */
24
24
  const LayerSymbolKey = "effect/Layer";
@@ -556,7 +556,7 @@ const unwrapScoped = self => {
556
556
  const withSpan = /*#__PURE__*/dual(args => isLayer(args[0]), (self, name, options) => unwrapScoped(map$1(options?.onEnd ? tap$1(makeSpanScoped(name, options), span => addFinalizer(exit => options.onEnd(span, exit))) : makeSpanScoped(name, options), span => withParentSpan(self, span))));
557
557
 
558
558
  /** @internal */
559
- const withParentSpan = /*#__PURE__*/dual(2, (self, span) => fiberRefLocallyWith(self, currentTracerSpan, prepend(span)));
559
+ const withParentSpan = /*#__PURE__*/dual(2, (self, span) => provide(succeedContext(make(spanTag, span)), self));
560
560
 
561
561
  // circular with Effect
562
562
 
@@ -2,7 +2,7 @@ import { die as die$1, RuntimeException } from '../Cause/dist/effect-Cause.esm.j
2
2
  import { appendAll, splitAt, isEmpty, empty, append, toReadonlyArray, unsafeFromArray, drop as drop$1, flatten, map as map$3, dropWhile as dropWhile$1, filter, isNonEmpty, unsafeGet as unsafeGet$1, of, last as last$1, reduce } from '../Chunk/dist/effect-Chunk.esm.js';
3
3
  import { currentTimeMillis } from '../Clock/dist/effect-Clock.esm.js';
4
4
  import { millis } from '../Duration/dist/effect-Duration.esm.js';
5
- import { takeWhile, map as map$1, zip as zip$1, forEach as forEach$1, dropUntil as dropUntil$1, dropWhile as dropWhile$2, context as context$1, contextWith as contextWith$1, filter as filter$1, succeed as succeed$2, flatMap as flatMap$2, dieMessage as dieMessage$1, acquireRelease, never as never$1, gen, suspend as suspend$2, isEffect, failCause as failCause$2 } from '../Effect/dist/effect-Effect.esm.js';
5
+ import { takeWhile, map as map$1, zip as zip$1, forEach as forEach$1, dropUntil as dropUntil$1, dropWhile as dropWhile$2, contextWith as contextWith$1, filter as filter$1, succeed as succeed$2, flatMap as flatMap$2, dieMessage as dieMessage$1, acquireRelease, never as never$1, gen, suspend as suspend$2, isEffect, failCause as failCause$2, context as context$1 } from '../Effect/dist/effect-Effect.esm.js';
6
6
  import { match as match$1, merge, left, right } from '../Either/dist/effect-Either.esm.js';
7
7
  import { match as match$2 } from '../Exit/dist/effect-Exit.esm.js';
8
8
  import { dual, pipe, constTrue, identity } from '../Function/dist/effect-Function.esm.js';
@@ -5,13 +5,13 @@ import { sleep, currentTimeMillis } from '../Clock/dist/effect-Clock.esm.js';
5
5
  import { add, unsafeGet } from '../Context/dist/effect-Context.esm.js';
6
6
  import { make as make$4, succeed as succeed$2, await as _await, failCause as failCause$3, poll, fail as fail$4 } from '../Deferred/dist/effect-Deferred.esm.js';
7
7
  import { toMillis, millis, greaterThan, zero } from '../Duration/dist/effect-Duration.esm.js';
8
- import { acquireRelease as acquireRelease$1, all, when as when$1, flatMap as flatMap$2, zipRight as zipRight$1, succeed as succeed$1, map as map$1, forkScoped, scope, runtime, match as match$1, sync as sync$1, as as as$1, unit as unit$2, onError as onError$1, tap as tap$1, gen, suspend as suspend$1, transplant, die as die$1, dieSync as dieSync$1, dieMessage as dieMessage$1, makeSemaphore, matchCauseEffect, flatten as flatten$1, forEach, catchAllCause as catchAllCause$2, dropUntil as dropUntil$1, dropWhile as dropWhile$2, context as context$1, fail as fail$3, failSync as failSync$1, failCause as failCause$4, failCauseSync as failCauseSync$1, findFirst as findFirst$1, tryPromise, promise, isEffect, mapError as mapError$1, zip as zip$1, never as never$1, orDie as orDie$1, matchEffect, scoped as scoped$1, asUnit, forkDaemon, ensuring as ensuring$2, timeoutFail as timeoutFail$1, timeoutFailCause as timeoutFailCause$1, runSync, catchTags as catchTags$1, tapErrorCause as tapErrorCause$1, runPromise, setSpan, raceWith, zipWith as zipWith$1, forkIn, reduce as reduce$1, catchSomeCause as catchSomeCause$1, orElse as orElse$2, zipLeft as zipLeft$1, catchAll as catchAll$2, asSome, succeedNone, fork } from '../Effect/dist/effect-Effect.esm.js';
8
+ import { acquireRelease as acquireRelease$1, all, when as when$1, flatMap as flatMap$2, zipRight as zipRight$1, succeed as succeed$1, map as map$1, forkScoped, scope, runtime, match as match$1, sync as sync$1, as as as$1, unit as unit$2, onError as onError$1, tap as tap$1, gen, suspend as suspend$1, transplant, die as die$1, dieSync as dieSync$1, dieMessage as dieMessage$1, makeSemaphore, matchCauseEffect, flatten as flatten$1, forEach, catchAllCause as catchAllCause$2, dropUntil as dropUntil$1, dropWhile as dropWhile$2, fail as fail$3, failSync as failSync$1, failCause as failCause$4, failCauseSync as failCauseSync$1, findFirst as findFirst$1, tryPromise, promise, isEffect, mapError as mapError$1, zip as zip$1, never as never$1, orDie as orDie$1, matchEffect, scoped as scoped$1, asUnit, forkDaemon, ensuring as ensuring$2, timeoutFail as timeoutFail$1, timeoutFailCause as timeoutFailCause$1, runSync, catchTags as catchTags$1, tapErrorCause as tapErrorCause$1, runPromise, raceWith, zipWith as zipWith$1, forkIn, reduce as reduce$1, catchSomeCause as catchSomeCause$1, context as context$2, orElse as orElse$2, zipLeft as zipLeft$1, catchAll as catchAll$2, asSome, succeedNone, fork } from '../Effect/dist/effect-Effect.esm.js';
9
9
  import { match, left, right } from '../Either/dist/effect-Either.esm.js';
10
10
  import { equals } from '../Equal/dist/effect-Equal.esm.js';
11
11
  import { match as match$3, failCause as failCause$2, fail as fail$2, isSuccess, succeed as succeed$4, unit as unit$3, isFailure } from '../Exit/dist/effect-Exit.esm.js';
12
12
  import { join, interrupt, poll as poll$1 } from '../Fiber/dist/effect-Fiber.esm.js';
13
13
  import { dual, pipe, identity, constTrue } from '../Function/dist/effect-Function.esm.js';
14
- import { build, context as context$2, merge as merge$1 } from '../Layer/dist/effect-Layer.esm.js';
14
+ import { build, context as context$1, merge as merge$1 } from '../Layer/dist/effect-Layer.esm.js';
15
15
  import { none, some as some$1, match as match$2, getOrElse, map as map$4, isSome, isNone } from '../Option/dist/effect-Option.esm.js';
16
16
  import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
17
17
  import { bounded as bounded$1, subscribe, shutdown as shutdown$1 } from '../PubSub/dist/effect-PubSub.esm.js';
@@ -21,7 +21,7 @@ import { runPromiseExit } from '../Runtime/dist/effect-Runtime.esm.js';
21
21
  import { forever as forever$1, driver, spaced } from '../Schedule/dist/effect-Schedule.esm.js';
22
22
  import { make as make$6, close, use } from '../Scope/dist/effect-Scope.esm.js';
23
23
  import { Both } from '../StreamHaltStrategy/dist/effect-StreamHaltStrategy.esm.js';
24
- import { unwrap as unwrap$1, zipRight as zipRight$2, pipeToOrFail, unwrapScoped as unwrapScoped$1, concatMap, writeChunk, drain as drain$1, identityChannel, ensuring as ensuring$1, mapOut, mapOutEffectPar, repeated, interruptWhen as interruptWhen$1, interruptWhenDeferred as interruptWhenDeferred$1, mapOutEffect, mapError as mapError$2, mapErrorCause as mapErrorCause$1, mergeWith as mergeWith$1, orDieWith as orDieWith$1, orElse as orElse$1, catchAll as catchAll$1, runDrain as runDrain$1, scoped as scoped$2, toPull as toPull$1, fromInput as fromInput$1, mergeMap, writeAll } from './channel.esm.js';
24
+ import { unwrap as unwrap$1, zipRight as zipRight$2, pipeToOrFail, unwrapScoped as unwrapScoped$1, concatMap, writeChunk, drain as drain$1, identityChannel, ensuring as ensuring$1, mapOut, mapOutEffectPar, repeated, interruptWhen as interruptWhen$1, interruptWhenDeferred as interruptWhenDeferred$1, mapOutEffect, mapError as mapError$2, mapErrorCause as mapErrorCause$1, mergeWith as mergeWith$1, orDieWith as orDieWith$1, orElse as orElse$1, catchAll as catchAll$1, runDrain as runDrain$1, scoped as scoped$2, toPull as toPull$1, withSpan as withSpan$1, fromInput as fromInput$1, mergeMap, writeAll } from './channel.esm.js';
25
25
  import { run as run$1, runScoped as runScoped$1 } from './channel/channelExecutor.esm.js';
26
26
  import { BufferSliding } from './channel/mergeStrategy.esm.js';
27
27
  import { make as make$5 } from './channel/singleProducerAsyncInput.esm.js';
@@ -740,7 +740,7 @@ const ensuring = /*#__PURE__*/dual(2, (self, finalizer) => new StreamImpl(pipe(t
740
740
  const ensuringWith = /*#__PURE__*/dual(2, (self, finalizer) => new StreamImpl(ensuringWith$1(toChannel(self), finalizer)));
741
741
 
742
742
  /** @internal */
743
- const context = () => fromEffect(context$1());
743
+ const context = () => fromEffect(context$2());
744
744
 
745
745
  /** @internal */
746
746
  const contextWith = f => pipe(context(), map(f));
@@ -1603,7 +1603,7 @@ const mapInputContext = /*#__PURE__*/dual(2, (self, f) => contextWithStream(env
1603
1603
  /** @internal */
1604
1604
  const provideSomeLayer = /*#__PURE__*/dual(2, (self, layer) =>
1605
1605
  // @ts-expect-error
1606
- pipe(self, provideLayer(pipe(context$2(), merge$1(layer)))));
1606
+ pipe(self, provideLayer(pipe(context$1(), merge$1(layer)))));
1607
1607
 
1608
1608
  /** @internal */
1609
1609
  const range = (min, max, chunkSize = DefaultChunkSize) => suspend(() => {
@@ -2473,7 +2473,7 @@ const whenCaseEffect = /*#__PURE__*/dual(2, (self, pf) => pipe(fromEffect(self),
2473
2473
  const whenEffect = /*#__PURE__*/dual(2, (self, effect) => pipe(fromEffect(effect), flatMap(bool => bool ? self : empty)));
2474
2474
 
2475
2475
  /** @internal */
2476
- const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(as$1(setSpan(name, options), self)));
2476
+ const withSpan = /*#__PURE__*/dual(3, (self, name, options) => new StreamImpl(withSpan$1(toChannel(self), name, options)));
2477
2477
 
2478
2478
  /** @internal */
2479
2479
  const zip = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWith(that, (a, a2) => [a, a2])));