effect 2.0.0-next.47 → 2.0.0-next.48

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 (416) hide show
  1. package/BigInt/dist/effect-BigInt.cjs.d.mts +2 -0
  2. package/BigInt/dist/effect-BigInt.cjs.d.mts.map +1 -0
  3. package/BigInt/dist/effect-BigInt.cjs.d.ts +2 -0
  4. package/BigInt/dist/effect-BigInt.cjs.d.ts.map +1 -0
  5. package/{Bigint/dist/effect-Bigint.cjs.dev.js → BigInt/dist/effect-BigInt.cjs.dev.js} +30 -30
  6. package/BigInt/dist/effect-BigInt.cjs.js +7 -0
  7. package/{Bigint/dist/effect-Bigint.cjs.mjs → BigInt/dist/effect-BigInt.cjs.mjs} +2 -2
  8. package/{Bigint/dist/effect-Bigint.cjs.prod.js → BigInt/dist/effect-BigInt.cjs.prod.js} +30 -30
  9. package/{Bigint/dist/effect-Bigint.esm.js → BigInt/dist/effect-BigInt.esm.js} +28 -28
  10. package/BigInt/package.json +4 -0
  11. package/Brand/dist/effect-Brand.cjs.dev.js +3 -3
  12. package/Brand/dist/effect-Brand.cjs.prod.js +3 -3
  13. package/Cache/dist/effect-Cache.cjs.dev.js +28 -28
  14. package/Cache/dist/effect-Cache.cjs.prod.js +28 -28
  15. package/Cause/dist/effect-Cause.cjs.dev.js +8 -8
  16. package/Cause/dist/effect-Cause.cjs.prod.js +8 -8
  17. package/Channel/dist/effect-Channel.cjs.dev.js +41 -41
  18. package/Channel/dist/effect-Channel.cjs.prod.js +41 -41
  19. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +36 -38
  20. package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +36 -38
  21. package/Chunk/dist/effect-Chunk.cjs.dev.js +3 -3
  22. package/Chunk/dist/effect-Chunk.cjs.prod.js +3 -3
  23. package/Clock/dist/effect-Clock.cjs.dev.js +14 -14
  24. package/Clock/dist/effect-Clock.cjs.prod.js +14 -14
  25. package/Config/dist/effect-Config.cjs.dev.js +11 -11
  26. package/Config/dist/effect-Config.cjs.prod.js +11 -11
  27. package/ConfigError/dist/effect-ConfigError.cjs.dev.js +4 -4
  28. package/ConfigError/dist/effect-ConfigError.cjs.prod.js +4 -4
  29. package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +13 -13
  30. package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +13 -13
  31. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +5 -5
  32. package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +5 -5
  33. package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +4 -4
  34. package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +4 -4
  35. package/Console/dist/effect-Console.cjs.dev.js +32 -32
  36. package/Console/dist/effect-Console.cjs.prod.js +32 -32
  37. package/Context/dist/effect-Context.cjs.dev.js +3 -3
  38. package/Context/dist/effect-Context.cjs.prod.js +3 -3
  39. package/Data/dist/effect-Data.cjs.dev.js +50 -46
  40. package/Data/dist/effect-Data.cjs.prod.js +50 -46
  41. package/Data/dist/effect-Data.esm.js +11 -5
  42. package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +14 -14
  43. package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +14 -14
  44. package/Deferred/dist/effect-Deferred.cjs.dev.js +8 -8
  45. package/Deferred/dist/effect-Deferred.cjs.prod.js +8 -8
  46. package/Differ/dist/effect-Differ.cjs.dev.js +5 -5
  47. package/Differ/dist/effect-Differ.cjs.prod.js +5 -5
  48. package/Duration/dist/effect-Duration.cjs.dev.js +4 -4
  49. package/Duration/dist/effect-Duration.cjs.prod.js +4 -4
  50. package/Duration/dist/effect-Duration.esm.js +2 -2
  51. package/Effect/dist/effect-Effect.cjs.dev.js +67 -136
  52. package/Effect/dist/effect-Effect.cjs.mjs +2 -11
  53. package/Effect/dist/effect-Effect.cjs.prod.js +67 -136
  54. package/Effect/dist/effect-Effect.esm.js +30 -90
  55. package/Effectable/dist/effect-Effectable.cjs.dev.js +1 -1
  56. package/Effectable/dist/effect-Effectable.cjs.prod.js +1 -1
  57. package/Either/dist/effect-Either.cjs.dev.js +17 -3
  58. package/Either/dist/effect-Either.cjs.mjs +3 -1
  59. package/Either/dist/effect-Either.cjs.prod.js +17 -3
  60. package/Either/dist/effect-Either.esm.js +13 -1
  61. package/Encoding/dist/effect-Encoding.cjs.dev.js +3 -3
  62. package/Encoding/dist/effect-Encoding.cjs.prod.js +3 -3
  63. package/Exit/dist/effect-Exit.cjs.dev.js +8 -8
  64. package/Exit/dist/effect-Exit.cjs.prod.js +8 -8
  65. package/Fiber/dist/effect-Fiber.cjs.dev.js +29 -29
  66. package/Fiber/dist/effect-Fiber.cjs.prod.js +29 -29
  67. package/FiberId/dist/effect-FiberId.cjs.dev.js +5 -5
  68. package/FiberId/dist/effect-FiberId.cjs.prod.js +5 -5
  69. package/FiberRef/dist/effect-FiberRef.cjs.dev.js +29 -29
  70. package/FiberRef/dist/effect-FiberRef.cjs.prod.js +29 -29
  71. package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +9 -9
  72. package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +9 -9
  73. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +10 -10
  74. package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +10 -10
  75. package/GroupBy/dist/effect-GroupBy.cjs.dev.js +43 -43
  76. package/GroupBy/dist/effect-GroupBy.cjs.prod.js +43 -43
  77. package/HashMap/dist/effect-HashMap.cjs.dev.js +4 -4
  78. package/HashMap/dist/effect-HashMap.cjs.prod.js +4 -4
  79. package/HashSet/dist/effect-HashSet.cjs.dev.js +4 -4
  80. package/HashSet/dist/effect-HashSet.cjs.prod.js +4 -4
  81. package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +29 -29
  82. package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +29 -29
  83. package/Layer/dist/effect-Layer.cjs.dev.js +151 -52
  84. package/Layer/dist/effect-Layer.cjs.mjs +12 -0
  85. package/Layer/dist/effect-Layer.cjs.prod.js +151 -52
  86. package/Layer/dist/effect-Layer.esm.js +92 -2
  87. package/List/dist/effect-List.cjs.dev.js +3 -3
  88. package/List/dist/effect-List.cjs.prod.js +3 -3
  89. package/LogLevel/dist/effect-LogLevel.cjs.dev.js +8 -8
  90. package/LogLevel/dist/effect-LogLevel.cjs.prod.js +8 -8
  91. package/Logger/dist/effect-Logger.cjs.dev.js +33 -39
  92. package/Logger/dist/effect-Logger.cjs.prod.js +33 -39
  93. package/Logger/dist/effect-Logger.esm.js +0 -5
  94. package/Match/dist/effect-Match.cjs.d.mts +2 -0
  95. package/Match/dist/effect-Match.cjs.d.mts.map +1 -0
  96. package/Match/dist/effect-Match.cjs.d.ts +2 -0
  97. package/Match/dist/effect-Match.cjs.d.ts.map +1 -0
  98. package/Match/dist/effect-Match.cjs.dev.js +620 -0
  99. package/Match/dist/effect-Match.cjs.js +7 -0
  100. package/Match/dist/effect-Match.cjs.mjs +39 -0
  101. package/Match/dist/effect-Match.cjs.prod.js +620 -0
  102. package/Match/dist/effect-Match.esm.js +258 -0
  103. package/Match/package.json +4 -0
  104. package/Metric/dist/effect-Metric.cjs.dev.js +27 -27
  105. package/Metric/dist/effect-Metric.cjs.prod.js +27 -27
  106. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +4 -4
  107. package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +4 -4
  108. package/MetricHook/dist/effect-MetricHook.cjs.dev.js +6 -6
  109. package/MetricHook/dist/effect-MetricHook.cjs.prod.js +6 -6
  110. package/MetricKey/dist/effect-MetricKey.cjs.dev.js +7 -7
  111. package/MetricKey/dist/effect-MetricKey.cjs.prod.js +7 -7
  112. package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +4 -4
  113. package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +4 -4
  114. package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +1 -1
  115. package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +1 -1
  116. package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +29 -29
  117. package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +29 -29
  118. package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +8 -8
  119. package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +8 -8
  120. package/MetricState/dist/effect-MetricState.cjs.dev.js +1 -1
  121. package/MetricState/dist/effect-MetricState.cjs.prod.js +1 -1
  122. package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +4 -4
  123. package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +4 -4
  124. package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +4 -4
  125. package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +4 -4
  126. package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +3 -3
  127. package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +3 -3
  128. package/Option/dist/effect-Option.cjs.dev.js +3 -3
  129. package/Option/dist/effect-Option.cjs.prod.js +3 -3
  130. package/Pool/dist/effect-Pool.cjs.dev.js +29 -29
  131. package/Pool/dist/effect-Pool.cjs.prod.js +29 -29
  132. package/Predicate/dist/effect-Predicate.cjs.dev.js +5 -5
  133. package/Predicate/dist/effect-Predicate.cjs.mjs +1 -1
  134. package/Predicate/dist/effect-Predicate.cjs.prod.js +5 -5
  135. package/Predicate/dist/effect-Predicate.esm.js +5 -5
  136. package/PubSub/dist/effect-PubSub.cjs.dev.js +28 -28
  137. package/PubSub/dist/effect-PubSub.cjs.prod.js +28 -28
  138. package/Queue/dist/effect-Queue.cjs.dev.js +28 -28
  139. package/Queue/dist/effect-Queue.cjs.prod.js +28 -28
  140. package/README.md +23 -0
  141. package/Random/dist/effect-Random.cjs.dev.js +14 -14
  142. package/Random/dist/effect-Random.cjs.prod.js +14 -14
  143. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +3 -3
  144. package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +3 -3
  145. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +3 -3
  146. package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +3 -3
  147. package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +3 -3
  148. package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +3 -3
  149. package/Ref/dist/effect-Ref.cjs.dev.js +9 -9
  150. package/Ref/dist/effect-Ref.cjs.prod.js +9 -9
  151. package/Reloadable/dist/effect-Reloadable.cjs.dev.js +33 -33
  152. package/Reloadable/dist/effect-Reloadable.cjs.prod.js +33 -33
  153. package/Request/dist/effect-Request.cjs.dev.js +28 -28
  154. package/Request/dist/effect-Request.cjs.prod.js +28 -28
  155. package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +36 -38
  156. package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +36 -38
  157. package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +42 -44
  158. package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +42 -44
  159. package/Resource/dist/effect-Resource.cjs.dev.js +31 -31
  160. package/Resource/dist/effect-Resource.cjs.prod.js +31 -31
  161. package/Runtime/dist/effect-Runtime.cjs.dev.js +30 -30
  162. package/Runtime/dist/effect-Runtime.cjs.prod.js +30 -30
  163. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +33 -34
  164. package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +33 -34
  165. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +6 -6
  166. package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +6 -6
  167. package/STM/dist/effect-STM.cjs.dev.js +45 -45
  168. package/STM/dist/effect-STM.cjs.prod.js +45 -45
  169. package/Schedule/dist/effect-Schedule.cjs.dev.js +20 -20
  170. package/Schedule/dist/effect-Schedule.cjs.prod.js +20 -20
  171. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +3 -3
  172. package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +3 -3
  173. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +3 -3
  174. package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +3 -3
  175. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +3 -3
  176. package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +3 -3
  177. package/Scheduler/dist/effect-Scheduler.cjs.dev.js +8 -8
  178. package/Scheduler/dist/effect-Scheduler.cjs.prod.js +8 -8
  179. package/Scope/dist/effect-Scope.cjs.dev.js +27 -27
  180. package/Scope/dist/effect-Scope.cjs.prod.js +27 -27
  181. package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +34 -36
  182. package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +34 -36
  183. package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +31 -31
  184. package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +31 -31
  185. package/Sink/dist/effect-Sink.cjs.dev.js +39 -39
  186. package/Sink/dist/effect-Sink.cjs.prod.js +39 -39
  187. package/SortedMap/dist/effect-SortedMap.cjs.dev.js +3 -3
  188. package/SortedMap/dist/effect-SortedMap.cjs.prod.js +3 -3
  189. package/SortedSet/dist/effect-SortedSet.cjs.dev.js +3 -3
  190. package/SortedSet/dist/effect-SortedSet.cjs.prod.js +3 -3
  191. package/Stream/dist/effect-Stream.cjs.dev.js +43 -43
  192. package/Stream/dist/effect-Stream.cjs.prod.js +43 -43
  193. package/Streamable/dist/effect-Streamable.cjs.dev.js +43 -43
  194. package/Streamable/dist/effect-Streamable.cjs.prod.js +43 -43
  195. package/String/dist/effect-String.cjs.dev.js +3 -3
  196. package/String/dist/effect-String.cjs.prod.js +3 -3
  197. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +46 -46
  198. package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +46 -46
  199. package/Supervisor/dist/effect-Supervisor.cjs.dev.js +33 -34
  200. package/Supervisor/dist/effect-Supervisor.cjs.prod.js +33 -34
  201. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +30 -30
  202. package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +30 -30
  203. package/TArray/dist/effect-TArray.cjs.dev.js +47 -47
  204. package/TArray/dist/effect-TArray.cjs.prod.js +47 -47
  205. package/TDeferred/dist/effect-TDeferred.cjs.dev.js +46 -46
  206. package/TDeferred/dist/effect-TDeferred.cjs.prod.js +46 -46
  207. package/TMap/dist/effect-TMap.cjs.dev.js +48 -48
  208. package/TMap/dist/effect-TMap.cjs.prod.js +48 -48
  209. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +45 -45
  210. package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +45 -45
  211. package/TPubSub/dist/effect-TPubSub.cjs.dev.js +50 -50
  212. package/TPubSub/dist/effect-TPubSub.cjs.prod.js +50 -50
  213. package/TQueue/dist/effect-TQueue.cjs.dev.js +47 -47
  214. package/TQueue/dist/effect-TQueue.cjs.prod.js +47 -47
  215. package/TRandom/dist/effect-TRandom.cjs.dev.js +46 -46
  216. package/TRandom/dist/effect-TRandom.cjs.prod.js +46 -46
  217. package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +50 -50
  218. package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +50 -50
  219. package/TRef/dist/effect-TRef.cjs.dev.js +45 -45
  220. package/TRef/dist/effect-TRef.cjs.prod.js +45 -45
  221. package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +46 -46
  222. package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +46 -46
  223. package/TSet/dist/effect-TSet.cjs.dev.js +48 -48
  224. package/TSet/dist/effect-TSet.cjs.prod.js +48 -48
  225. package/Take/dist/effect-Take.cjs.dev.js +36 -38
  226. package/Take/dist/effect-Take.cjs.prod.js +36 -38
  227. package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +5 -5
  228. package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +5 -5
  229. package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +20 -20
  230. package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +20 -20
  231. package/TestClock/dist/effect-TestClock.cjs.dev.js +32 -32
  232. package/TestClock/dist/effect-TestClock.cjs.prod.js +32 -32
  233. package/TestConfig/dist/effect-TestConfig.cjs.dev.js +3 -3
  234. package/TestConfig/dist/effect-TestConfig.cjs.prod.js +3 -3
  235. package/TestContext/dist/effect-TestContext.cjs.dev.js +34 -36
  236. package/TestContext/dist/effect-TestContext.cjs.prod.js +34 -36
  237. package/TestLive/dist/effect-TestLive.cjs.dev.js +14 -14
  238. package/TestLive/dist/effect-TestLive.cjs.prod.js +14 -14
  239. package/TestServices/dist/effect-TestServices.cjs.dev.js +40 -42
  240. package/TestServices/dist/effect-TestServices.cjs.prod.js +40 -42
  241. package/TestSized/dist/effect-TestSized.cjs.dev.js +8 -8
  242. package/TestSized/dist/effect-TestSized.cjs.prod.js +8 -8
  243. package/Tracer/dist/effect-Tracer.cjs.dev.js +20 -18
  244. package/Tracer/dist/effect-Tracer.cjs.mjs +1 -0
  245. package/Tracer/dist/effect-Tracer.cjs.prod.js +20 -18
  246. package/Tracer/dist/effect-Tracer.esm.js +7 -6
  247. package/dist/{Context-da73ddfa.cjs.dev.js → Context-607e9b4c.cjs.dev.js} +2 -2
  248. package/dist/{Context-9fe5eb16.cjs.prod.js → Context-c91d8ca0.cjs.prod.js} +2 -2
  249. package/dist/{Either-d43f082c.cjs.prod.js → Either-a3f96c60.cjs.prod.js} +2 -2
  250. package/dist/{Either-fa0ef1d9.cjs.dev.js → Either-e7500e90.cjs.dev.js} +2 -2
  251. package/dist/{Option-463b42e6.cjs.dev.js → Option-01caa9d4.cjs.dev.js} +1 -1
  252. package/dist/{Option-935e5d7c.cjs.prod.js → Option-dd52e82a.cjs.prod.js} +1 -1
  253. package/dist/{Ref-acdee7ef.cjs.dev.js → Ref-548003d1.cjs.dev.js} +1 -1
  254. package/dist/{Ref-4014b526.cjs.prod.js → Ref-6608e3b6.cjs.prod.js} +1 -1
  255. package/dist/{cache-7eed9d33.cjs.dev.js → cache-7953c9ae.cjs.dev.js} +5 -5
  256. package/dist/{cache-5c7d77e4.cjs.prod.js → cache-d7096ab5.cjs.prod.js} +5 -5
  257. package/dist/{circular-c8b65bdb.cjs.dev.js → circular-171d6971.cjs.dev.js} +8 -9
  258. package/dist/{circular-c2dbce1a.cjs.dev.js → circular-8568ddf2.cjs.dev.js} +7 -7
  259. package/dist/{circular-1f481ffb.cjs.prod.js → circular-894f44de.cjs.prod.js} +7 -7
  260. package/dist/{circular-9e10a5a7.cjs.prod.js → circular-b6cc8a1d.cjs.prod.js} +8 -9
  261. package/dist/{config-5ba54da1.cjs.prod.js → config-615bcaef.cjs.prod.js} +3 -3
  262. package/dist/{config-3b7935a3.cjs.dev.js → config-ea74e7d0.cjs.dev.js} +3 -3
  263. package/dist/{configProvider-f34a82f1.cjs.dev.js → configProvider-089a1159.cjs.dev.js} +4 -4
  264. package/dist/{configProvider-b6b20998.cjs.prod.js → configProvider-3877a6ec.cjs.prod.js} +4 -4
  265. package/dist/{core-b7401357.cjs.dev.js → core-365f89c2.cjs.dev.js} +3 -3
  266. package/dist/{core-07202cc0.cjs.prod.js → core-3908bc43.cjs.prod.js} +3 -3
  267. package/dist/{core-c01fd1d8.cjs.dev.js → core-3d37486a.cjs.dev.js} +3 -3
  268. package/dist/{core-84e608f0.cjs.prod.js → core-8ccae4e2.cjs.prod.js} +3 -3
  269. package/dist/{core-effect-9201ea63.cjs.prod.js → core-effect-37a0d753.cjs.prod.js} +8 -8
  270. package/dist/{core-effect-1c564d42.cjs.dev.js → core-effect-c529ccac.cjs.dev.js} +8 -8
  271. package/dist/{dataSource-b83bc277.cjs.prod.js → dataSource-0e407d86.cjs.prod.js} +2 -2
  272. package/dist/{dataSource-b5eda714.cjs.dev.js → dataSource-d125d7af.cjs.dev.js} +2 -2
  273. package/dist/declarations/src/{Bigint.d.ts → BigInt.d.ts} +27 -27
  274. package/dist/declarations/src/{Bigint.d.ts.map → BigInt.d.ts.map} +1 -1
  275. package/dist/declarations/src/Channel.d.ts +4 -2
  276. package/dist/declarations/src/Channel.d.ts.map +1 -1
  277. package/dist/declarations/src/Data.d.ts +1 -2
  278. package/dist/declarations/src/Data.d.ts.map +1 -1
  279. package/dist/declarations/src/Effect.d.ts +67 -102
  280. package/dist/declarations/src/Effect.d.ts.map +1 -1
  281. package/dist/declarations/src/Either.d.ts +16 -0
  282. package/dist/declarations/src/Either.d.ts.map +1 -1
  283. package/dist/declarations/src/FiberRef.d.ts +2 -2
  284. package/dist/declarations/src/FiberRef.d.ts.map +1 -1
  285. package/dist/declarations/src/Layer.d.ts +98 -3
  286. package/dist/declarations/src/Layer.d.ts.map +1 -1
  287. package/dist/declarations/src/Logger.d.ts +2 -7
  288. package/dist/declarations/src/Logger.d.ts.map +1 -1
  289. package/dist/declarations/src/Match.d.ts +420 -0
  290. package/dist/declarations/src/Match.d.ts.map +1 -0
  291. package/dist/declarations/src/Predicate.d.ts +4 -4
  292. package/dist/declarations/src/Stream.d.ts +4 -2
  293. package/dist/declarations/src/Stream.d.ts.map +1 -1
  294. package/dist/declarations/src/Tracer.d.ts +17 -10
  295. package/dist/declarations/src/Tracer.d.ts.map +1 -1
  296. package/dist/declarations/src/index.d.ts +5 -1
  297. package/dist/declarations/src/index.d.ts.map +1 -1
  298. package/dist/{defaultServices-9d7ce86f.cjs.prod.js → defaultServices-1c3db777.cjs.prod.js} +15 -4
  299. package/dist/{defaultServices-755d5b46.cjs.dev.js → defaultServices-a933c201.cjs.dev.js} +15 -4
  300. package/dist/effect.cjs.dev.js +6 -3
  301. package/dist/effect.cjs.mjs +2 -1
  302. package/dist/effect.cjs.prod.js +6 -3
  303. package/dist/effect.esm.js +4 -2
  304. package/dist/{fiber-5156eff2.cjs.dev.js → fiber-13587a5a.cjs.dev.js} +3 -3
  305. package/dist/{fiber-9519d109.cjs.prod.js → fiber-2858bd1f.cjs.prod.js} +3 -3
  306. package/dist/{fiberRefs-98b71233.cjs.dev.js → fiberRefs-abe2a811.cjs.dev.js} +1 -1
  307. package/dist/{fiberRefs-558c17e6.cjs.prod.js → fiberRefs-ea1edd57.cjs.prod.js} +1 -1
  308. package/dist/{fiberRuntime-31ae011f.cjs.prod.js → fiberRuntime-9fafeaab.cjs.prod.js} +27 -23
  309. package/dist/{fiberRuntime-d3872282.cjs.dev.js → fiberRuntime-ebcb168f.cjs.dev.js} +27 -23
  310. package/dist/{groupBy-70c6dc0d.cjs.dev.js → groupBy-050e6b17.cjs.dev.js} +4 -4
  311. package/dist/{groupBy-5fb5d639.cjs.prod.js → groupBy-93f35a1d.cjs.prod.js} +4 -4
  312. package/dist/{hook-8cefc909.cjs.dev.js → hook-2c94278c.cjs.dev.js} +1 -1
  313. package/dist/{hook-98ce30e4.cjs.prod.js → hook-9af5cf52.cjs.prod.js} +1 -1
  314. package/dist/{key-198b6670.cjs.dev.js → key-2d4efb00.cjs.dev.js} +2 -2
  315. package/dist/{key-eb8a12b2.cjs.prod.js → key-9b2f3322.cjs.prod.js} +2 -2
  316. package/dist/{layer-29574350.cjs.dev.js → layer-09807eda.cjs.dev.js} +15 -10
  317. package/dist/{layer-51ff4846.cjs.prod.js → layer-fc5b5ca7.cjs.prod.js} +15 -10
  318. package/dist/{patch-0220a642.cjs.dev.js → patch-2f545954.cjs.dev.js} +1 -1
  319. package/dist/{patch-7c559bb2.cjs.prod.js → patch-e72c6c2f.cjs.prod.js} +1 -1
  320. package/dist/{pathPatch-fab016f1.cjs.dev.js → pathPatch-9fa78980.cjs.dev.js} +1 -1
  321. package/dist/{pathPatch-b56a4da2.cjs.prod.js → pathPatch-f3064fa9.cjs.prod.js} +1 -1
  322. package/dist/{pool-59df8b4d.cjs.dev.js → pool-7c9cd8e9.cjs.dev.js} +5 -5
  323. package/dist/{pool-042cc42b.cjs.prod.js → pool-9370f703.cjs.prod.js} +5 -5
  324. package/dist/{query-c36decd5.cjs.dev.js → query-6cd164ab.cjs.dev.js} +3 -3
  325. package/dist/{query-a52b25f0.cjs.prod.js → query-8147932f.cjs.prod.js} +3 -3
  326. package/dist/{queue-e4c59627.cjs.dev.js → queue-06ce789d.cjs.dev.js} +2 -2
  327. package/dist/{queue-425b92f6.cjs.prod.js → queue-6afe5f19.cjs.prod.js} +2 -2
  328. package/dist/{registry-62ff192e.cjs.dev.js → registry-35e8eb48.cjs.dev.js} +2 -2
  329. package/dist/{registry-d5258dff.cjs.prod.js → registry-5c67df33.cjs.prod.js} +2 -2
  330. package/dist/{runtime-005f8a9b.cjs.prod.js → runtime-d41d839b.cjs.prod.js} +6 -6
  331. package/dist/{runtime-57c8ddf8.cjs.dev.js → runtime-fb1c1c19.cjs.dev.js} +6 -6
  332. package/dist/{schedule-e7a9f93f.cjs.dev.js → schedule-0e1db444.cjs.dev.js} +3 -3
  333. package/dist/{schedule-8cdf6bf1.cjs.prod.js → schedule-64057679.cjs.prod.js} +3 -3
  334. package/dist/{scopedRef-eb19c7a6.cjs.dev.js → scopedRef-2ea09a4f.cjs.dev.js} +6 -6
  335. package/dist/{scopedRef-789d7fef.cjs.prod.js → scopedRef-7a6d42f7.cjs.prod.js} +6 -6
  336. package/dist/{singleProducerAsyncInput-f9b258b1.cjs.prod.js → singleProducerAsyncInput-8b8ad112.cjs.prod.js} +1 -1
  337. package/dist/{singleProducerAsyncInput-9ff8389b.cjs.dev.js → singleProducerAsyncInput-97f74016.cjs.dev.js} +1 -1
  338. package/dist/{sink-b2fcb569.cjs.prod.js → sink-6d1a77bf.cjs.prod.js} +3 -3
  339. package/dist/{sink-17e02d40.cjs.dev.js → sink-ebf2fbdb.cjs.dev.js} +3 -3
  340. package/dist/{stm-9dd6be88.cjs.prod.js → stm-4a6de085.cjs.prod.js} +3 -3
  341. package/dist/{stm-5264610b.cjs.dev.js → stm-dbec85f1.cjs.dev.js} +3 -3
  342. package/dist/{stream-5e2ed3a9.cjs.dev.js → stream-478aa5a8.cjs.dev.js} +9 -6
  343. package/dist/{stream-c9c522f2.cjs.prod.js → stream-f7345889.cjs.prod.js} +9 -6
  344. package/dist/{synchronizedRef-ed8aa6ac.cjs.prod.js → synchronizedRef-432b4455.cjs.prod.js} +1 -1
  345. package/dist/{synchronizedRef-a12fd967.cjs.dev.js → synchronizedRef-fa63e917.cjs.dev.js} +1 -1
  346. package/dist/{tArray-77a2ae3c.cjs.dev.js → tArray-0c9045e7.cjs.dev.js} +3 -3
  347. package/dist/{tArray-cac66af4.cjs.prod.js → tArray-b30ccc3e.cjs.prod.js} +3 -3
  348. package/dist/{tMap-5ac8ec9c.cjs.prod.js → tMap-001c791c.cjs.prod.js} +4 -4
  349. package/dist/{tMap-73bbf062.cjs.dev.js → tMap-0625df1d.cjs.dev.js} +4 -4
  350. package/dist/{tQueue-dded9b2d.cjs.prod.js → tQueue-6accdd70.cjs.prod.js} +3 -3
  351. package/dist/{tQueue-2b1cd0c4.cjs.dev.js → tQueue-cdbf9130.cjs.dev.js} +3 -3
  352. package/dist/{tRef-73c3549e.cjs.prod.js → tRef-8b60d85b.cjs.prod.js} +1 -1
  353. package/dist/{tRef-90f0872b.cjs.dev.js → tRef-b5bae36d.cjs.dev.js} +1 -1
  354. package/internal/channel.esm.js +2 -2
  355. package/internal/core-effect.esm.js +1 -1
  356. package/internal/fiberRuntime.esm.js +27 -23
  357. package/internal/layer/circular.esm.js +5 -6
  358. package/internal/layer.esm.js +9 -5
  359. package/internal/logger.esm.js +3 -3
  360. package/internal/matcher.esm.js +314 -0
  361. package/internal/stream.esm.js +7 -4
  362. package/internal/tracer.esm.js +14 -4
  363. package/package.json +21 -13
  364. package/src/{Bigint.ts → BigInt.ts} +26 -26
  365. package/src/Channel.ts +4 -2
  366. package/src/Data.ts +18 -16
  367. package/src/Duration.ts +2 -2
  368. package/src/Effect.ts +84 -151
  369. package/src/Either.ts +33 -0
  370. package/src/FiberRef.ts +2 -3
  371. package/src/Layer.ts +157 -3
  372. package/src/Logger.ts +2 -8
  373. package/src/Match.ts +800 -0
  374. package/src/Predicate.ts +4 -4
  375. package/src/Stream.ts +4 -2
  376. package/src/Tracer.ts +18 -9
  377. package/src/index.ts +6 -1
  378. package/src/internal/channel.ts +5 -3
  379. package/src/internal/core-effect.ts +27 -22
  380. package/src/internal/core.ts +5 -7
  381. package/src/internal/fiberRuntime.ts +39 -13
  382. package/src/internal/layer/circular.ts +21 -6
  383. package/src/internal/layer.ts +20 -4
  384. package/src/internal/logger.ts +4 -4
  385. package/src/internal/matcher.ts +594 -0
  386. package/src/internal/stream.ts +9 -7
  387. package/src/internal/tracer.ts +28 -5
  388. package/src/tsconfig.json +41 -0
  389. package/Bigint/dist/effect-Bigint.cjs.d.mts +0 -2
  390. package/Bigint/dist/effect-Bigint.cjs.d.mts.map +0 -1
  391. package/Bigint/dist/effect-Bigint.cjs.d.ts +0 -2
  392. package/Bigint/dist/effect-Bigint.cjs.d.ts.map +0 -1
  393. package/Bigint/dist/effect-Bigint.cjs.js +0 -7
  394. package/Bigint/package.json +0 -4
  395. /package/dist/{Effectable-c4c14a2b.cjs.prod.js → Effectable-6a8a05f1.cjs.prod.js} +0 -0
  396. /package/dist/{Effectable-7314aed8.cjs.dev.js → Effectable-71c10ab9.cjs.dev.js} +0 -0
  397. /package/dist/{FiberId-1d7ac632.cjs.prod.js → FiberId-54d8bd67.cjs.prod.js} +0 -0
  398. /package/dist/{FiberId-d88ddce6.cjs.dev.js → FiberId-6708cdca.cjs.dev.js} +0 -0
  399. /package/dist/{HashSet-ac02a3e1.cjs.prod.js → HashSet-86613304.cjs.prod.js} +0 -0
  400. /package/dist/{HashSet-5963ad6b.cjs.dev.js → HashSet-dd020cb0.cjs.dev.js} +0 -0
  401. /package/dist/{RuntimeFlagsPatch-866fa259.cjs.prod.js → RuntimeFlagsPatch-902b4680.cjs.prod.js} +0 -0
  402. /package/dist/{RuntimeFlagsPatch-69102b03.cjs.dev.js → RuntimeFlagsPatch-cf423492.cjs.dev.js} +0 -0
  403. /package/dist/{boundaries-f212e414.cjs.dev.js → boundaries-b5265184.cjs.dev.js} +0 -0
  404. /package/dist/{boundaries-9af538e3.cjs.prod.js → boundaries-bfd86b3e.cjs.prod.js} +0 -0
  405. /package/dist/{configError-b43723af.cjs.prod.js → configError-856c7153.cjs.prod.js} +0 -0
  406. /package/dist/{configError-d5efe9c0.cjs.dev.js → configError-a824b415.cjs.dev.js} +0 -0
  407. /package/dist/{configSecret-e2faa181.cjs.prod.js → configSecret-9b941a86.cjs.prod.js} +0 -0
  408. /package/dist/{configSecret-3e8ae336.cjs.dev.js → configSecret-e7bb51da.cjs.dev.js} +0 -0
  409. /package/dist/{keyType-0c5e6178.cjs.prod.js → keyType-4ec0b247.cjs.prod.js} +0 -0
  410. /package/dist/{keyType-7c164b82.cjs.dev.js → keyType-f30c9fa4.cjs.dev.js} +0 -0
  411. /package/dist/{label-655343b5.cjs.prod.js → label-a588e6cd.cjs.prod.js} +0 -0
  412. /package/dist/{label-011edbe7.cjs.dev.js → label-b0cebeae.cjs.dev.js} +0 -0
  413. /package/dist/{state-0bdf02b7.cjs.prod.js → state-40d5dc71.cjs.prod.js} +0 -0
  414. /package/dist/{state-931050c4.cjs.dev.js → state-620f7a22.cjs.dev.js} +0 -0
  415. /package/dist/{take-85daaf79.cjs.prod.js → take-15455ae3.cjs.prod.js} +0 -0
  416. /package/dist/{take-f9ef9e2e.cjs.dev.js → take-1c250e7a.cjs.dev.js} +0 -0
@@ -4,15 +4,16 @@ 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, 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';
8
- import { memoize as memoize$1, withParentSpan, patchFiberRefs, diffFiberRefs } from './core-effect.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';
8
+ import { memoize as memoize$1, patchFiberRefs, diffFiberRefs } from './core-effect.esm.js';
9
9
  import { makeSynchronized } from './effect/circular.esm.js';
10
- import { scopeWith, zipWithOptions, scopeExtend, fiberRefLocallyScoped as fiberRefLocallyScoped$1, fiberRefLocallyScopedWith as fiberRefLocallyScopedWith$1, scopedEffect, acquireRelease, scopeMake, useSpanScoped } from './fiberRuntime.esm.js';
10
+ import { scopeWith, zipWithOptions, scopeExtend, fiberRefLocallyScoped as fiberRefLocallyScoped$1, fiberRefLocallyScopedWith as fiberRefLocallyScopedWith$1, scopedEffect, acquireRelease, scopeMake, makeSpanScoped, addFinalizer } from './fiberRuntime.esm.js';
11
11
  import { OP_SUCCESS, OP_FAILURE } from './opCodes/effect.esm.js';
12
12
  import { OP_FRESH, OP_EXTEND_SCOPE, OP_FROM_EFFECT, OP_FOLD, OP_ZIP_WITH, OP_SCOPED, OP_SUSPEND, OP_PROVIDE_TO, OP_ZIP_WITH_PAR } from './opCodes/layer.esm.js';
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';
16
17
  import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
17
18
  import { isDone } from '../ScheduleDecision/dist/effect-ScheduleDecision.esm.js';
18
19
  import { start } from '../ScheduleIntervals/dist/effect-ScheduleIntervals.esm.js';
@@ -552,7 +553,10 @@ const unwrapScoped = self => {
552
553
  // -----------------------------------------------------------------------------
553
554
 
554
555
  /** @internal */
555
- const withSpan = /*#__PURE__*/dual(args => isLayer(args[0]), (self, name, options) => unwrapScoped(map$1(useSpanScoped(name, options), span => locallyEffect(self, withParentSpan(span)))));
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
+
558
+ /** @internal */
559
+ const withParentSpan = /*#__PURE__*/dual(2, (self, span) => fiberRefLocallyWith(self, currentTracerSpan, prepend(span)));
556
560
 
557
561
  // circular with Effect
558
562
 
@@ -568,4 +572,4 @@ const provideSomeRuntime = /*#__PURE__*/dual(2, (self, rt) => {
568
572
  /** @internal */
569
573
  const effect_provide = /*#__PURE__*/dual(2, (self, source) => isLayer(source) ? provideSomeLayer(self, source) : isContext(source) ? provideSomeContext(self, source) : provideSomeRuntime(self, source));
570
574
 
571
- export { LayerTypeId, build, buildWithScope, catchAll, catchAllCause, context, die, dieSync, discard, effect_provide, extendScope, fail, failCause, failCauseSync, failSync, fiberRefLocally, fiberRefLocallyScoped, fiberRefLocallyScopedWith, fiberRefLocallyWith, flatMap, flatten, fresh, fromEffect, fromEffectContext, fromEffectDiscard, fromFunction, isFresh, isLayer, launch, locallyEffect, map, mapError, match, matchCause, memoize, merge, mergeAll, orDie, orElse, passthrough, project, provide, provideMerge, retry, scope, scoped, scopedContext, scopedDiscard, service, succeed, succeedContext, suspend, sync, syncContext, tap, tapError, tapErrorCause, toRuntime, unwrapEffect, unwrapScoped, use, useMerge, withSpan, zipWithPar };
575
+ export { LayerTypeId, build, buildWithScope, catchAll, catchAllCause, context, die, dieSync, discard, effect_provide, extendScope, fail, failCause, failCauseSync, failSync, fiberRefLocally, fiberRefLocallyScoped, fiberRefLocallyScopedWith, fiberRefLocallyWith, flatMap, flatten, fresh, fromEffect, fromEffectContext, fromEffectDiscard, fromFunction, isFresh, isLayer, launch, locallyEffect, map, mapError, match, matchCause, memoize, merge, mergeAll, orDie, orElse, passthrough, project, provide, provideMerge, retry, scope, scoped, scopedContext, scopedDiscard, service, succeed, succeedContext, suspend, sync, syncContext, tap, tapError, tapErrorCause, toRuntime, unwrapEffect, unwrapScoped, use, useMerge, withParentSpan, withSpan, zipWithPar };
@@ -124,7 +124,7 @@ const stringLogger = /*#__PURE__*/makeLogger(({
124
124
  }
125
125
  output = output + filterKeyName(key);
126
126
  output = output + "=";
127
- output = appendQuoted(String(value), output);
127
+ output = appendQuoted(serializeUnknown(value), output);
128
128
  }
129
129
  }
130
130
  return output;
@@ -189,7 +189,7 @@ const logfmtLogger = /*#__PURE__*/makeLogger(({
189
189
  }
190
190
  output = output + filterKeyName(key);
191
191
  output = output + "=";
192
- output = appendQuotedLogfmt(String(value), output);
192
+ output = appendQuotedLogfmt(serializeUnknown(value), output);
193
193
  }
194
194
  }
195
195
  return output;
@@ -210,4 +210,4 @@ const renderLogSpanLogfmt = now => self => {
210
210
  return `${label}=${now - self.startTime}ms`;
211
211
  };
212
212
 
213
- export { LoggerTypeId, filterLogLevel, logfmtLogger, makeLogger, map, mapInput, none, simple, stringLogger, succeed, sync, zip, zipLeft, zipRight };
213
+ export { LoggerTypeId, filterLogLevel, logfmtLogger, makeLogger, map, mapInput, none, serializeUnknown, simple, stringLogger, succeed, sync, zip, zipLeft, zipRight };
@@ -0,0 +1,314 @@
1
+ import { left, isEither, right, match } from '../Either/dist/effect-Either.esm.js';
2
+ import { identity } from '../Function/dist/effect-Function.esm.js';
3
+ import { none, some } from '../Option/dist/effect-Option.esm.js';
4
+ import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
5
+
6
+ /** @internal */
7
+ const TypeId = /*#__PURE__*/Symbol.for("@effect/matcher/Matcher");
8
+ const TypeMatcherProto = {
9
+ [TypeId]: {
10
+ _input: identity,
11
+ _filters: identity,
12
+ _remaining: identity,
13
+ _result: identity
14
+ },
15
+ _tag: "TypeMatcher",
16
+ add(_case) {
17
+ return makeTypeMatcher([...this.cases, _case]);
18
+ },
19
+ pipe() {
20
+ return pipeArguments(this, arguments);
21
+ }
22
+ };
23
+ function makeTypeMatcher(cases) {
24
+ const matcher = Object.create(TypeMatcherProto);
25
+ matcher.cases = cases;
26
+ return matcher;
27
+ }
28
+ const ValueMatcherProto = {
29
+ [TypeId]: {
30
+ _input: identity,
31
+ _filters: identity,
32
+ _result: identity
33
+ },
34
+ _tag: "ValueMatcher",
35
+ add(_case) {
36
+ if (this.value._tag === "Right") {
37
+ return this;
38
+ }
39
+ if (_case._tag === "When" && _case.guard(this.provided) === true) {
40
+ return makeValueMatcher(this.provided, right(_case.evaluate(this.provided)));
41
+ } else if (_case._tag === "Not" && _case.guard(this.provided) === false) {
42
+ return makeValueMatcher(this.provided, right(_case.evaluate(this.provided)));
43
+ }
44
+ return this;
45
+ },
46
+ pipe() {
47
+ return pipeArguments(this, arguments);
48
+ }
49
+ };
50
+ function makeValueMatcher(provided, value) {
51
+ const matcher = Object.create(ValueMatcherProto);
52
+ matcher.provided = provided;
53
+ matcher.value = value;
54
+ return matcher;
55
+ }
56
+ const makeWhen = (guard, evaluate) => ({
57
+ _tag: "When",
58
+ guard,
59
+ evaluate
60
+ });
61
+ const makeNot = (guard, evaluate) => ({
62
+ _tag: "Not",
63
+ guard,
64
+ evaluate
65
+ });
66
+ const makePredicate = pattern => {
67
+ if (typeof pattern === "function") {
68
+ return pattern;
69
+ } else if (Array.isArray(pattern)) {
70
+ const predicates = pattern.map(makePredicate);
71
+ const len = predicates.length;
72
+ return u => {
73
+ if (!Array.isArray(u)) {
74
+ return false;
75
+ }
76
+ for (let i = 0; i < len; i++) {
77
+ if (predicates[i](u[i]) === false) {
78
+ return false;
79
+ }
80
+ }
81
+ return true;
82
+ };
83
+ } else if (pattern !== null && typeof pattern === "object") {
84
+ const keysAndPredicates = Object.entries(pattern).map(([k, p]) => [k, makePredicate(p)]);
85
+ const len = keysAndPredicates.length;
86
+ return u => {
87
+ if (typeof u !== "object" || u === null) {
88
+ return false;
89
+ }
90
+ for (let i = 0; i < len; i++) {
91
+ const [key, predicate] = keysAndPredicates[i];
92
+ if (!(key in u) || predicate(u[key]) === false) {
93
+ return false;
94
+ }
95
+ }
96
+ return true;
97
+ };
98
+ }
99
+ return u => u === pattern;
100
+ };
101
+ const makeOrPredicate = patterns => {
102
+ const predicates = patterns.map(makePredicate);
103
+ const len = predicates.length;
104
+ return u => {
105
+ for (let i = 0; i < len; i++) {
106
+ if (predicates[i](u) === true) {
107
+ return true;
108
+ }
109
+ }
110
+ return false;
111
+ };
112
+ };
113
+ const makeAndPredicate = patterns => {
114
+ const predicates = patterns.map(makePredicate);
115
+ const len = predicates.length;
116
+ return u => {
117
+ for (let i = 0; i < len; i++) {
118
+ if (predicates[i](u) === false) {
119
+ return false;
120
+ }
121
+ }
122
+ return true;
123
+ };
124
+ };
125
+
126
+ /** @internal */
127
+ const type = () => makeTypeMatcher([]);
128
+
129
+ /** @internal */
130
+ const value = i => makeValueMatcher(i, left(i));
131
+
132
+ /** @internal */
133
+ const valueTags = fields => {
134
+ const match = tagsExhaustive(fields)(makeTypeMatcher([]));
135
+ return input => match(input);
136
+ };
137
+
138
+ /** @internal */
139
+ const typeTags = () => fields => {
140
+ const match = tagsExhaustive(fields)(makeTypeMatcher([]));
141
+ return input => match(input);
142
+ };
143
+
144
+ /** @internal */
145
+ const when = (pattern, f) => self => self.add(makeWhen(makePredicate(pattern), f));
146
+
147
+ /** @internal */
148
+ const whenOr = (...args) => self => {
149
+ const onMatch = args[args.length - 1];
150
+ const patterns = args.slice(0, -1);
151
+ return self.add(makeWhen(makeOrPredicate(patterns), onMatch));
152
+ };
153
+
154
+ /** @internal */
155
+ const whenAnd = (...args) => self => {
156
+ const onMatch = args[args.length - 1];
157
+ const patterns = args.slice(0, -1);
158
+ return self.add(makeWhen(makeAndPredicate(patterns), onMatch));
159
+ };
160
+
161
+ /** @internal */
162
+ const discriminator = field => (...pattern) => {
163
+ const f = pattern[pattern.length - 1];
164
+ const values = pattern.slice(0, -1);
165
+ const pred = values.length === 1 ? _ => _[field] === values[0] : _ => values.includes(_[field]);
166
+ return self => self.add(makeWhen(pred, f));
167
+ };
168
+
169
+ /** @internal */
170
+ const discriminatorStartsWith = field => (pattern, f) => {
171
+ const pred = _ => typeof _[field] === "string" && _[field].startsWith(pattern);
172
+ return self => self.add(makeWhen(pred, f));
173
+ };
174
+
175
+ /** @internal */
176
+ const discriminators = field => fields => {
177
+ const predicates = [];
178
+ for (const key in fields) {
179
+ const pred = _ => _[field] === key;
180
+ const f = fields[key];
181
+ if (f) {
182
+ predicates.push(makeWhen(pred, f));
183
+ }
184
+ }
185
+ const len = predicates.length;
186
+ return self => {
187
+ let matcher = self;
188
+ for (let i = 0; i < len; i++) {
189
+ matcher = matcher.add(predicates[i]);
190
+ }
191
+ return matcher;
192
+ };
193
+ };
194
+
195
+ /** @internal */
196
+ const discriminatorsExhaustive = field => fields => {
197
+ const addCases = discriminators(field)(fields);
198
+ return matcher => exhaustive(addCases(matcher));
199
+ };
200
+
201
+ /** @internal */
202
+ const tag = /*#__PURE__*/discriminator("_tag");
203
+
204
+ /** @internal */
205
+ const tagStartsWith = /*#__PURE__*/discriminatorStartsWith("_tag");
206
+
207
+ /** @internal */
208
+ const tags = /*#__PURE__*/discriminators("_tag");
209
+
210
+ /** @internal */
211
+ const tagsExhaustive = /*#__PURE__*/discriminatorsExhaustive("_tag");
212
+
213
+ /** @internal */
214
+ const not = (pattern, f) => self => self.add(makeNot(makePredicate(pattern), f));
215
+
216
+ /** @internal */
217
+ const nonEmptyString = u => typeof u === "string" && u.length > 0;
218
+
219
+ /** @internal */
220
+ const is = (...literals) => {
221
+ const len = literals.length;
222
+ return u => {
223
+ for (let i = 0; i < len; i++) {
224
+ if (u === literals[i]) {
225
+ return true;
226
+ }
227
+ }
228
+ return false;
229
+ };
230
+ };
231
+
232
+ /** @internal */
233
+ const any = () => true;
234
+
235
+ /** @internal */
236
+ const defined = u => u !== undefined && u !== null;
237
+
238
+ /** @internal */
239
+ const instanceOf = constructor => u => u instanceof constructor;
240
+
241
+ /** @internal */
242
+ const orElse = f => self => {
243
+ const result = either(self);
244
+ if (isEither(result)) {
245
+ // @ts-expect-error
246
+ return result._tag === "Right" ? result.right : f(result.left);
247
+ }
248
+
249
+ // @ts-expect-error
250
+ return input => {
251
+ const a = result(input);
252
+ return a._tag === "Right" ? a.right : f(a.left);
253
+ };
254
+ };
255
+
256
+ /** @internal */
257
+ const orElseAbsurd = self => orElse(() => {
258
+ throw new Error("absurd");
259
+ })(self);
260
+
261
+ /** @internal */
262
+ const either = self => {
263
+ if (self._tag === "ValueMatcher") {
264
+ return self.value;
265
+ }
266
+ const len = self.cases.length;
267
+ return input => {
268
+ for (let i = 0; i < len; i++) {
269
+ const _case = self.cases[i];
270
+ if (_case._tag === "When" && _case.guard(input) === true) {
271
+ return right(_case.evaluate(input));
272
+ } else if (_case._tag === "Not" && _case.guard(input) === false) {
273
+ return right(_case.evaluate(input));
274
+ }
275
+ }
276
+ return left(input);
277
+ };
278
+ };
279
+
280
+ /** @internal */
281
+ const option = self => {
282
+ const toEither = either(self);
283
+ if (isEither(toEither)) {
284
+ return match(toEither, {
285
+ onLeft: () => none(),
286
+ onRight: some
287
+ });
288
+ }
289
+ return input => match(toEither(input), {
290
+ onLeft: () => none(),
291
+ onRight: some
292
+ });
293
+ };
294
+
295
+ /** @internal */
296
+ const exhaustive = self => {
297
+ const toEither = either(self);
298
+ if (isEither(toEither)) {
299
+ if (toEither._tag === "Right") {
300
+ return toEither.right;
301
+ }
302
+ throw new Error("@effect/match: exhaustive absurd");
303
+ }
304
+ return u => {
305
+ // @ts-expect-error
306
+ const result = toEither(u);
307
+ if (result._tag === "Right") {
308
+ return result.right;
309
+ }
310
+ throw new Error("@effect/match: exhaustive absurd");
311
+ };
312
+ };
313
+
314
+ export { TypeId, any, defined, discriminator, discriminatorStartsWith, discriminators, discriminatorsExhaustive, either, exhaustive, instanceOf, is, nonEmptyString, not, option, orElse, orElseAbsurd, tag, tagStartsWith, tags, tagsExhaustive, type, typeTags, value, valueTags, when, whenAnd, whenOr };
@@ -1,11 +1,11 @@
1
1
  import { flipCauseOption, failureOrCause, map as map$3, isInterrupted, die as die$2, IllegalArgumentException, RuntimeException, isDieType, isRuntimeException, squash } from '../Cause/dist/effect-Cause.esm.js';
2
2
  import { Done, Await } from '../ChannelMergeDecision/dist/effect-ChannelMergeDecision.esm.js';
3
- import { empty as empty$1, isNonEmpty, of, map as map$2, range as range$1, unsafeFromArray, reduceRight, prepend as prepend$1, isEmpty, dropWhile as dropWhile$1, filter as filter$1, filterMap as filterMap$1, filterMapWhile as filterMapWhile$1, findFirst, fromIterable as fromIterable$1, flatMap as flatMap$3, takeWhile as takeWhile$1, take as take$3, drop as drop$1, appendAll, unsafeLast, zipWith as zipWith$2, reduce, append, last as last$1, splitWhere, head as head$1, mapAccum as mapAccum$1, make as make$7, unsafeGet as unsafeGet$1, flatten as flatten$2, isChunk, splitAt, takeRight as takeRight$1 } from '../Chunk/dist/effect-Chunk.esm.js';
3
+ import { empty as empty$1, isNonEmpty, of, map as map$2, range as range$1, unsafeFromArray, reduceRight, prepend as prepend$1, isEmpty, dropWhile as dropWhile$1, filter as filter$1, filterMap as filterMap$1, filterMapWhile as filterMapWhile$1, findFirst, fromIterable as fromIterable$1, flatMap as flatMap$3, takeWhile as takeWhile$1, take as take$3, drop as drop$1, appendAll, unsafeLast, zipWith as zipWith$2, reduce, append, last as last$1, splitWhere, head as head$1, mapAccum as mapAccum$1, make as make$7, unsafeGet as unsafeGet$1, flatten as flatten$2, isChunk, appendAllNonEmpty, splitAt, takeRight as takeRight$1 } from '../Chunk/dist/effect-Chunk.esm.js';
4
4
  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, withSpanScoped, 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, 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';
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';
@@ -1117,7 +1117,10 @@ const groupAdjacentBy = /*#__PURE__*/dual(2, (self, f) => {
1117
1117
  const input = unsafeGet$1(chunk, until);
1118
1118
  const updatedKey = f(input);
1119
1119
  if (!equals(key, updatedKey)) {
1120
- builder.push([key, unsafeFromArray(Array.from(tuple[1]).slice(from, until))]);
1120
+ const previousChunk = tuple[1];
1121
+ const additionalChunk = unsafeFromArray(Array.from(chunk).slice(from, until));
1122
+ const group = appendAllNonEmpty(previousChunk, additionalChunk);
1123
+ builder.push([key, group]);
1121
1124
  key = updatedKey;
1122
1125
  from = until;
1123
1126
  loop = false;
@@ -2470,7 +2473,7 @@ const whenCaseEffect = /*#__PURE__*/dual(2, (self, pf) => pipe(fromEffect(self),
2470
2473
  const whenEffect = /*#__PURE__*/dual(2, (self, effect) => pipe(fromEffect(effect), flatMap(bool => bool ? self : empty)));
2471
2474
 
2472
2475
  /** @internal */
2473
- const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(as$1(withSpanScoped(name, options), self)));
2476
+ const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(as$1(setSpan(name, options), self)));
2474
2477
 
2475
2478
  /** @internal */
2476
2479
  const zip = /*#__PURE__*/dual(2, (self, that) => pipe(self, zipWith(that, (a, a2) => [a, a2])));
@@ -1,4 +1,4 @@
1
- import { Tag } from '../Context/dist/effect-Context.esm.js';
1
+ import { Tag, empty } from '../Context/dist/effect-Context.esm.js';
2
2
  import { globalValue } from '../GlobalValue/dist/effect-GlobalValue.esm.js';
3
3
  import { incrementAndGet, make as make$1 } from '../MutableRef/dist/effect-MutableRef.esm.js';
4
4
 
@@ -23,11 +23,12 @@ class NativeSpan {
23
23
  _tag = "Span";
24
24
  traceId = "native";
25
25
  events = [];
26
- constructor(name, parent, context, links, startTime) {
26
+ constructor(name, parent, context, links, sampled, startTime) {
27
27
  this.name = name;
28
28
  this.parent = parent;
29
29
  this.context = context;
30
30
  this.links = links;
31
+ this.sampled = sampled;
31
32
  this.startTime = startTime;
32
33
  this.status = {
33
34
  _tag: "Started",
@@ -54,8 +55,17 @@ class NativeSpan {
54
55
 
55
56
  /** @internal */
56
57
  const nativeTracer = /*#__PURE__*/make({
57
- span: (name, parent, context, links, startTime) => new NativeSpan(name, parent, context, links, startTime),
58
+ span: (name, parent, context, links, sampled, startTime) => new NativeSpan(name, parent, context, links, sampled, startTime),
58
59
  context: f => f()
59
60
  });
60
61
 
61
- export { NativeSpan, TracerTypeId, make, nativeTracer, tracerTag };
62
+ /** @internal */
63
+ const externalSpan = options => ({
64
+ _tag: "ExternalSpan",
65
+ spanId: options.spanId,
66
+ traceId: options.traceId,
67
+ sampled: options.sampled ?? true,
68
+ context: options.context ?? empty()
69
+ });
70
+
71
+ export { NativeSpan, TracerTypeId, externalSpan, make, nativeTracer, tracerTag };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "effect",
3
- "version": "2.0.0-next.47",
3
+ "version": "2.0.0-next.48",
4
4
  "packageManager": "pnpm@8.7.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,7 +34,7 @@
34
34
  "src",
35
35
  "dist",
36
36
  "internal",
37
- "Bigint",
37
+ "BigInt",
38
38
  "Boolean",
39
39
  "Brand",
40
40
  "Cache",
@@ -89,6 +89,7 @@
89
89
  "LogLevel",
90
90
  "LogSpan",
91
91
  "Logger",
92
+ "Match",
92
93
  "Metric",
93
94
  "MetricBoundaries",
94
95
  "MetricHook",
@@ -186,11 +187,11 @@
186
187
  "default": "./dist/effect.cjs.js"
187
188
  },
188
189
  "./package.json": "./package.json",
189
- "./Bigint": {
190
- "types": "./dist/declarations/src/Bigint.d.ts",
191
- "module": "./Bigint/dist/effect-Bigint.esm.js",
192
- "import": "./Bigint/dist/effect-Bigint.cjs.mjs",
193
- "default": "./Bigint/dist/effect-Bigint.cjs.js"
190
+ "./BigInt": {
191
+ "types": "./dist/declarations/src/BigInt.d.ts",
192
+ "module": "./BigInt/dist/effect-BigInt.esm.js",
193
+ "import": "./BigInt/dist/effect-BigInt.cjs.mjs",
194
+ "default": "./BigInt/dist/effect-BigInt.cjs.js"
194
195
  },
195
196
  "./Boolean": {
196
197
  "types": "./dist/declarations/src/Boolean.d.ts",
@@ -516,6 +517,12 @@
516
517
  "import": "./Logger/dist/effect-Logger.cjs.mjs",
517
518
  "default": "./Logger/dist/effect-Logger.cjs.js"
518
519
  },
520
+ "./Match": {
521
+ "types": "./dist/declarations/src/Match.d.ts",
522
+ "module": "./Match/dist/effect-Match.esm.js",
523
+ "import": "./Match/dist/effect-Match.cjs.mjs",
524
+ "default": "./Match/dist/effect-Match.cjs.js"
525
+ },
519
526
  "./Metric": {
520
527
  "types": "./dist/declarations/src/Metric.d.ts",
521
528
  "module": "./Metric/dist/effect-Metric.esm.js",
@@ -1049,20 +1056,20 @@
1049
1056
  "@changesets/changelog-github": "^0.4.8",
1050
1057
  "@changesets/cli": "^2.26.2",
1051
1058
  "@definitelytyped/dtslint": "^0.0.182",
1052
- "@effect/build-utils": "^0.1.5",
1059
+ "@effect/build-utils": "^0.1.8",
1053
1060
  "@effect/docgen": "^0.1.8",
1054
1061
  "@effect/eslint-plugin": "^0.1.2",
1055
1062
  "@effect/language-service": "^0.0.21",
1056
1063
  "@preconstruct/cli": "^2.8.1",
1057
1064
  "@types/chai": "^4.3.6",
1058
- "@types/node": "^20.8.2",
1059
- "@typescript-eslint/eslint-plugin": "^6.7.4",
1060
- "@typescript-eslint/parser": "^6.7.4",
1065
+ "@types/node": "^20.8.4",
1066
+ "@typescript-eslint/eslint-plugin": "^6.7.5",
1067
+ "@typescript-eslint/parser": "^6.7.5",
1061
1068
  "@vitejs/plugin-react": "^4.1.0",
1062
1069
  "@vitest/coverage-v8": "^0.34.6",
1063
1070
  "@vitest/expect": "^0.34.6",
1064
1071
  "babel-plugin-annotate-pure-calls": "^0.4.0",
1065
- "eslint": "^8.50.0",
1072
+ "eslint": "^8.51.0",
1066
1073
  "eslint-import-resolver-typescript": "^3.6.1",
1067
1074
  "eslint-plugin-codegen": "0.17.0",
1068
1075
  "eslint-plugin-deprecation": "^2.0.0",
@@ -1074,7 +1081,7 @@
1074
1081
  "prettier": "^3.0.3",
1075
1082
  "ts-node": "^10.9.1",
1076
1083
  "typescript": "^5.2.2",
1077
- "vite": "^4.4.10",
1084
+ "vite": "^4.4.11",
1078
1085
  "vitest": "0.34.6"
1079
1086
  },
1080
1087
  "scripts": {
@@ -1087,6 +1094,7 @@
1087
1094
  "circular": "madge --ts-config ./tsconfig.json --circular --no-color --no-spinner --warning src",
1088
1095
  "update-version": "changeset version && pnpm install --no-frozen-lockfile",
1089
1096
  "lint": "eslint src test",
1097
+ "lint-fix": "eslint src test --fix",
1090
1098
  "fix": "preconstruct fix",
1091
1099
  "docgen": "docgen",
1092
1100
  "dtslint": "dtslint --expectOnly dtslint"