effect 2.0.0-next.46 → 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.
- package/BigInt/dist/effect-BigInt.cjs.d.mts +2 -0
- package/BigInt/dist/effect-BigInt.cjs.d.mts.map +1 -0
- package/BigInt/dist/effect-BigInt.cjs.d.ts +2 -0
- package/BigInt/dist/effect-BigInt.cjs.d.ts.map +1 -0
- package/{Bigint/dist/effect-Bigint.cjs.dev.js → BigInt/dist/effect-BigInt.cjs.dev.js} +30 -30
- package/BigInt/dist/effect-BigInt.cjs.js +7 -0
- package/{Bigint/dist/effect-Bigint.cjs.mjs → BigInt/dist/effect-BigInt.cjs.mjs} +2 -2
- package/{Bigint/dist/effect-Bigint.cjs.prod.js → BigInt/dist/effect-BigInt.cjs.prod.js} +30 -30
- package/{Bigint/dist/effect-Bigint.esm.js → BigInt/dist/effect-BigInt.esm.js} +28 -28
- package/BigInt/package.json +4 -0
- package/Brand/dist/effect-Brand.cjs.dev.js +3 -3
- package/Brand/dist/effect-Brand.cjs.prod.js +3 -3
- package/Cache/dist/effect-Cache.cjs.dev.js +28 -28
- package/Cache/dist/effect-Cache.cjs.prod.js +28 -28
- package/Cause/dist/effect-Cause.cjs.dev.js +8 -8
- package/Cause/dist/effect-Cause.cjs.prod.js +8 -8
- package/Channel/dist/effect-Channel.cjs.dev.js +41 -41
- package/Channel/dist/effect-Channel.cjs.prod.js +41 -41
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +36 -38
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +36 -38
- package/Chunk/dist/effect-Chunk.cjs.dev.js +3 -3
- package/Chunk/dist/effect-Chunk.cjs.prod.js +3 -3
- package/Clock/dist/effect-Clock.cjs.dev.js +14 -14
- package/Clock/dist/effect-Clock.cjs.prod.js +14 -14
- package/Config/dist/effect-Config.cjs.dev.js +11 -11
- package/Config/dist/effect-Config.cjs.prod.js +11 -11
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +4 -4
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +4 -4
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +13 -13
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +13 -13
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +5 -5
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +5 -5
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +4 -4
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +4 -4
- package/Console/dist/effect-Console.cjs.dev.js +32 -32
- package/Console/dist/effect-Console.cjs.prod.js +32 -32
- package/Context/dist/effect-Context.cjs.dev.js +3 -3
- package/Context/dist/effect-Context.cjs.prod.js +3 -3
- package/Data/dist/effect-Data.cjs.dev.js +50 -46
- package/Data/dist/effect-Data.cjs.prod.js +50 -46
- package/Data/dist/effect-Data.esm.js +11 -5
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +14 -14
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +14 -14
- package/Deferred/dist/effect-Deferred.cjs.dev.js +8 -8
- package/Deferred/dist/effect-Deferred.cjs.prod.js +8 -8
- package/Differ/dist/effect-Differ.cjs.dev.js +5 -5
- package/Differ/dist/effect-Differ.cjs.prod.js +5 -5
- package/Duration/dist/effect-Duration.cjs.dev.js +4 -4
- package/Duration/dist/effect-Duration.cjs.prod.js +4 -4
- package/Duration/dist/effect-Duration.esm.js +2 -2
- package/Effect/dist/effect-Effect.cjs.dev.js +67 -136
- package/Effect/dist/effect-Effect.cjs.mjs +2 -11
- package/Effect/dist/effect-Effect.cjs.prod.js +67 -136
- package/Effect/dist/effect-Effect.esm.js +30 -90
- package/Effectable/dist/effect-Effectable.cjs.dev.js +1 -1
- package/Effectable/dist/effect-Effectable.cjs.prod.js +1 -1
- package/Either/dist/effect-Either.cjs.dev.js +17 -3
- package/Either/dist/effect-Either.cjs.mjs +3 -1
- package/Either/dist/effect-Either.cjs.prod.js +17 -3
- package/Either/dist/effect-Either.esm.js +13 -1
- package/Encoding/dist/effect-Encoding.cjs.dev.js +3 -3
- package/Encoding/dist/effect-Encoding.cjs.prod.js +3 -3
- package/Exit/dist/effect-Exit.cjs.dev.js +8 -8
- package/Exit/dist/effect-Exit.cjs.prod.js +8 -8
- package/Fiber/dist/effect-Fiber.cjs.dev.js +29 -29
- package/Fiber/dist/effect-Fiber.cjs.prod.js +29 -29
- package/FiberId/dist/effect-FiberId.cjs.dev.js +5 -5
- package/FiberId/dist/effect-FiberId.cjs.prod.js +5 -5
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +29 -29
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +29 -29
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +9 -9
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +9 -9
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +10 -10
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +10 -10
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +43 -43
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +43 -43
- package/HashMap/dist/effect-HashMap.cjs.dev.js +4 -4
- package/HashMap/dist/effect-HashMap.cjs.prod.js +4 -4
- package/HashSet/dist/effect-HashSet.cjs.dev.js +4 -4
- package/HashSet/dist/effect-HashSet.cjs.prod.js +4 -4
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +29 -29
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +29 -29
- package/Layer/dist/effect-Layer.cjs.dev.js +151 -52
- package/Layer/dist/effect-Layer.cjs.mjs +12 -0
- package/Layer/dist/effect-Layer.cjs.prod.js +151 -52
- package/Layer/dist/effect-Layer.esm.js +92 -2
- package/List/dist/effect-List.cjs.dev.js +3 -3
- package/List/dist/effect-List.cjs.prod.js +3 -3
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +8 -8
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +8 -8
- package/Logger/dist/effect-Logger.cjs.dev.js +33 -39
- package/Logger/dist/effect-Logger.cjs.prod.js +33 -39
- package/Logger/dist/effect-Logger.esm.js +0 -5
- package/Match/dist/effect-Match.cjs.d.mts +2 -0
- package/Match/dist/effect-Match.cjs.d.mts.map +1 -0
- package/Match/dist/effect-Match.cjs.d.ts +2 -0
- package/Match/dist/effect-Match.cjs.d.ts.map +1 -0
- package/Match/dist/effect-Match.cjs.dev.js +620 -0
- package/Match/dist/effect-Match.cjs.js +7 -0
- package/Match/dist/effect-Match.cjs.mjs +39 -0
- package/Match/dist/effect-Match.cjs.prod.js +620 -0
- package/Match/dist/effect-Match.esm.js +258 -0
- package/Match/package.json +4 -0
- package/Metric/dist/effect-Metric.cjs.dev.js +27 -27
- package/Metric/dist/effect-Metric.cjs.prod.js +27 -27
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +4 -4
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +4 -4
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +6 -6
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +6 -6
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +7 -7
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +7 -7
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +4 -4
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +4 -4
- package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +1 -1
- package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +1 -1
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +29 -29
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +29 -29
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +8 -8
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +8 -8
- package/MetricState/dist/effect-MetricState.cjs.dev.js +1 -1
- package/MetricState/dist/effect-MetricState.cjs.prod.js +1 -1
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +4 -4
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +4 -4
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +4 -4
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +4 -4
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +3 -3
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +3 -3
- package/Option/dist/effect-Option.cjs.dev.js +3 -3
- package/Option/dist/effect-Option.cjs.prod.js +3 -3
- package/Pool/dist/effect-Pool.cjs.dev.js +29 -29
- package/Pool/dist/effect-Pool.cjs.prod.js +29 -29
- package/Predicate/dist/effect-Predicate.cjs.dev.js +5 -5
- package/Predicate/dist/effect-Predicate.cjs.mjs +1 -1
- package/Predicate/dist/effect-Predicate.cjs.prod.js +5 -5
- package/Predicate/dist/effect-Predicate.esm.js +5 -5
- package/PubSub/dist/effect-PubSub.cjs.dev.js +28 -28
- package/PubSub/dist/effect-PubSub.cjs.prod.js +28 -28
- package/Queue/dist/effect-Queue.cjs.dev.js +28 -28
- package/Queue/dist/effect-Queue.cjs.prod.js +28 -28
- package/README.md +23 -0
- package/Random/dist/effect-Random.cjs.dev.js +14 -14
- package/Random/dist/effect-Random.cjs.prod.js +14 -14
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +3 -3
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +3 -3
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +3 -3
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +3 -3
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +3 -3
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +3 -3
- package/Ref/dist/effect-Ref.cjs.dev.js +9 -9
- package/Ref/dist/effect-Ref.cjs.prod.js +9 -9
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +33 -33
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +33 -33
- package/Request/dist/effect-Request.cjs.dev.js +28 -28
- package/Request/dist/effect-Request.cjs.prod.js +28 -28
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +36 -38
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +36 -38
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +42 -44
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +42 -44
- package/Resource/dist/effect-Resource.cjs.dev.js +31 -31
- package/Resource/dist/effect-Resource.cjs.prod.js +31 -31
- package/Runtime/dist/effect-Runtime.cjs.dev.js +30 -30
- package/Runtime/dist/effect-Runtime.cjs.prod.js +30 -30
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +33 -34
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +33 -34
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +6 -6
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +6 -6
- package/STM/dist/effect-STM.cjs.dev.js +45 -45
- package/STM/dist/effect-STM.cjs.prod.js +45 -45
- package/Schedule/dist/effect-Schedule.cjs.dev.js +20 -20
- package/Schedule/dist/effect-Schedule.cjs.prod.js +20 -20
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +3 -3
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +3 -3
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +3 -3
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +3 -3
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +3 -3
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +3 -3
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +8 -8
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +8 -8
- package/Scope/dist/effect-Scope.cjs.dev.js +27 -27
- package/Scope/dist/effect-Scope.cjs.prod.js +27 -27
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +34 -36
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +34 -36
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +31 -31
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +31 -31
- package/Sink/dist/effect-Sink.cjs.dev.js +39 -39
- package/Sink/dist/effect-Sink.cjs.prod.js +39 -39
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +3 -3
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +3 -3
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +3 -3
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +3 -3
- package/Stream/dist/effect-Stream.cjs.dev.js +43 -43
- package/Stream/dist/effect-Stream.cjs.prod.js +43 -43
- package/Streamable/dist/effect-Streamable.cjs.dev.js +43 -43
- package/Streamable/dist/effect-Streamable.cjs.prod.js +43 -43
- package/String/dist/effect-String.cjs.dev.js +3 -3
- package/String/dist/effect-String.cjs.prod.js +3 -3
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +46 -46
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +46 -46
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +33 -34
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +33 -34
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +30 -30
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +30 -30
- package/TArray/dist/effect-TArray.cjs.dev.js +47 -47
- package/TArray/dist/effect-TArray.cjs.prod.js +47 -47
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +46 -46
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +46 -46
- package/TMap/dist/effect-TMap.cjs.dev.js +48 -48
- package/TMap/dist/effect-TMap.cjs.prod.js +48 -48
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +45 -45
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +45 -45
- package/TPubSub/dist/effect-TPubSub.cjs.dev.js +50 -50
- package/TPubSub/dist/effect-TPubSub.cjs.prod.js +50 -50
- package/TQueue/dist/effect-TQueue.cjs.dev.js +47 -47
- package/TQueue/dist/effect-TQueue.cjs.prod.js +47 -47
- package/TRandom/dist/effect-TRandom.cjs.dev.js +46 -46
- package/TRandom/dist/effect-TRandom.cjs.prod.js +46 -46
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +50 -50
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +50 -50
- package/TRef/dist/effect-TRef.cjs.dev.js +45 -45
- package/TRef/dist/effect-TRef.cjs.prod.js +45 -45
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +46 -46
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +46 -46
- package/TSet/dist/effect-TSet.cjs.dev.js +48 -48
- package/TSet/dist/effect-TSet.cjs.prod.js +48 -48
- package/Take/dist/effect-Take.cjs.dev.js +36 -38
- package/Take/dist/effect-Take.cjs.prod.js +36 -38
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +5 -5
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +5 -5
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +20 -20
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +20 -20
- package/TestClock/dist/effect-TestClock.cjs.dev.js +32 -32
- package/TestClock/dist/effect-TestClock.cjs.prod.js +32 -32
- package/TestConfig/dist/effect-TestConfig.cjs.dev.js +3 -3
- package/TestConfig/dist/effect-TestConfig.cjs.prod.js +3 -3
- package/TestContext/dist/effect-TestContext.cjs.dev.js +34 -36
- package/TestContext/dist/effect-TestContext.cjs.prod.js +34 -36
- package/TestLive/dist/effect-TestLive.cjs.dev.js +14 -14
- package/TestLive/dist/effect-TestLive.cjs.prod.js +14 -14
- package/TestServices/dist/effect-TestServices.cjs.dev.js +40 -42
- package/TestServices/dist/effect-TestServices.cjs.prod.js +40 -42
- package/TestSized/dist/effect-TestSized.cjs.dev.js +8 -8
- package/TestSized/dist/effect-TestSized.cjs.prod.js +8 -8
- package/Tracer/dist/effect-Tracer.cjs.dev.js +20 -18
- package/Tracer/dist/effect-Tracer.cjs.mjs +1 -0
- package/Tracer/dist/effect-Tracer.cjs.prod.js +20 -18
- package/Tracer/dist/effect-Tracer.esm.js +7 -6
- package/dist/{Context-da73ddfa.cjs.dev.js → Context-607e9b4c.cjs.dev.js} +2 -2
- package/dist/{Context-9fe5eb16.cjs.prod.js → Context-c91d8ca0.cjs.prod.js} +2 -2
- package/dist/{Either-d43f082c.cjs.prod.js → Either-a3f96c60.cjs.prod.js} +2 -2
- package/dist/{Either-fa0ef1d9.cjs.dev.js → Either-e7500e90.cjs.dev.js} +2 -2
- package/dist/{Option-463b42e6.cjs.dev.js → Option-01caa9d4.cjs.dev.js} +1 -1
- package/dist/{Option-935e5d7c.cjs.prod.js → Option-dd52e82a.cjs.prod.js} +1 -1
- package/dist/{Ref-acdee7ef.cjs.dev.js → Ref-548003d1.cjs.dev.js} +1 -1
- package/dist/{Ref-4014b526.cjs.prod.js → Ref-6608e3b6.cjs.prod.js} +1 -1
- package/dist/{cache-7eed9d33.cjs.dev.js → cache-7953c9ae.cjs.dev.js} +5 -5
- package/dist/{cache-5c7d77e4.cjs.prod.js → cache-d7096ab5.cjs.prod.js} +5 -5
- package/dist/{circular-c8b65bdb.cjs.dev.js → circular-171d6971.cjs.dev.js} +8 -9
- package/dist/{circular-c2dbce1a.cjs.dev.js → circular-8568ddf2.cjs.dev.js} +7 -7
- package/dist/{circular-1f481ffb.cjs.prod.js → circular-894f44de.cjs.prod.js} +7 -7
- package/dist/{circular-9e10a5a7.cjs.prod.js → circular-b6cc8a1d.cjs.prod.js} +8 -9
- package/dist/{config-5ba54da1.cjs.prod.js → config-615bcaef.cjs.prod.js} +3 -3
- package/dist/{config-3b7935a3.cjs.dev.js → config-ea74e7d0.cjs.dev.js} +3 -3
- package/dist/{configProvider-f34a82f1.cjs.dev.js → configProvider-089a1159.cjs.dev.js} +4 -4
- package/dist/{configProvider-b6b20998.cjs.prod.js → configProvider-3877a6ec.cjs.prod.js} +4 -4
- package/dist/{core-b7401357.cjs.dev.js → core-365f89c2.cjs.dev.js} +3 -3
- package/dist/{core-07202cc0.cjs.prod.js → core-3908bc43.cjs.prod.js} +3 -3
- package/dist/{core-c5747f88.cjs.dev.js → core-3d37486a.cjs.dev.js} +3 -3
- package/dist/{core-7411d1e1.cjs.prod.js → core-8ccae4e2.cjs.prod.js} +3 -3
- package/dist/{core-effect-9201ea63.cjs.prod.js → core-effect-37a0d753.cjs.prod.js} +8 -8
- package/dist/{core-effect-1c564d42.cjs.dev.js → core-effect-c529ccac.cjs.dev.js} +8 -8
- package/dist/{dataSource-b83bc277.cjs.prod.js → dataSource-0e407d86.cjs.prod.js} +2 -2
- package/dist/{dataSource-b5eda714.cjs.dev.js → dataSource-d125d7af.cjs.dev.js} +2 -2
- package/dist/declarations/src/{Bigint.d.ts → BigInt.d.ts} +27 -27
- package/dist/declarations/src/{Bigint.d.ts.map → BigInt.d.ts.map} +1 -1
- package/dist/declarations/src/Channel.d.ts +4 -2
- package/dist/declarations/src/Channel.d.ts.map +1 -1
- package/dist/declarations/src/Data.d.ts +1 -2
- package/dist/declarations/src/Data.d.ts.map +1 -1
- package/dist/declarations/src/Effect.d.ts +67 -102
- package/dist/declarations/src/Effect.d.ts.map +1 -1
- package/dist/declarations/src/Either.d.ts +16 -0
- package/dist/declarations/src/Either.d.ts.map +1 -1
- package/dist/declarations/src/FiberRef.d.ts +2 -2
- package/dist/declarations/src/FiberRef.d.ts.map +1 -1
- package/dist/declarations/src/Layer.d.ts +98 -3
- package/dist/declarations/src/Layer.d.ts.map +1 -1
- package/dist/declarations/src/Logger.d.ts +2 -7
- package/dist/declarations/src/Logger.d.ts.map +1 -1
- package/dist/declarations/src/Match.d.ts +420 -0
- package/dist/declarations/src/Match.d.ts.map +1 -0
- package/dist/declarations/src/Predicate.d.ts +4 -4
- package/dist/declarations/src/Queue.d.ts +5 -0
- package/dist/declarations/src/Queue.d.ts.map +1 -1
- package/dist/declarations/src/Stream.d.ts +4 -2
- package/dist/declarations/src/Stream.d.ts.map +1 -1
- package/dist/declarations/src/Tracer.d.ts +17 -10
- package/dist/declarations/src/Tracer.d.ts.map +1 -1
- package/dist/declarations/src/index.d.ts +5 -1
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/{defaultServices-9d7ce86f.cjs.prod.js → defaultServices-1c3db777.cjs.prod.js} +15 -4
- package/dist/{defaultServices-755d5b46.cjs.dev.js → defaultServices-a933c201.cjs.dev.js} +15 -4
- package/dist/effect.cjs.dev.js +6 -3
- package/dist/effect.cjs.mjs +2 -1
- package/dist/effect.cjs.prod.js +6 -3
- package/dist/effect.esm.js +4 -2
- package/dist/{fiber-5156eff2.cjs.dev.js → fiber-13587a5a.cjs.dev.js} +3 -3
- package/dist/{fiber-9519d109.cjs.prod.js → fiber-2858bd1f.cjs.prod.js} +3 -3
- package/dist/{fiberRefs-98b71233.cjs.dev.js → fiberRefs-abe2a811.cjs.dev.js} +1 -1
- package/dist/{fiberRefs-558c17e6.cjs.prod.js → fiberRefs-ea1edd57.cjs.prod.js} +1 -1
- package/dist/{fiberRuntime-31ae011f.cjs.prod.js → fiberRuntime-9fafeaab.cjs.prod.js} +27 -23
- package/dist/{fiberRuntime-d3872282.cjs.dev.js → fiberRuntime-ebcb168f.cjs.dev.js} +27 -23
- package/dist/{groupBy-862cc2da.cjs.dev.js → groupBy-050e6b17.cjs.dev.js} +4 -4
- package/dist/{groupBy-724f64ef.cjs.prod.js → groupBy-93f35a1d.cjs.prod.js} +4 -4
- package/dist/{hook-8cefc909.cjs.dev.js → hook-2c94278c.cjs.dev.js} +1 -1
- package/dist/{hook-98ce30e4.cjs.prod.js → hook-9af5cf52.cjs.prod.js} +1 -1
- package/dist/{key-198b6670.cjs.dev.js → key-2d4efb00.cjs.dev.js} +2 -2
- package/dist/{key-eb8a12b2.cjs.prod.js → key-9b2f3322.cjs.prod.js} +2 -2
- package/dist/{layer-29574350.cjs.dev.js → layer-09807eda.cjs.dev.js} +15 -10
- package/dist/{layer-51ff4846.cjs.prod.js → layer-fc5b5ca7.cjs.prod.js} +15 -10
- package/dist/{patch-0220a642.cjs.dev.js → patch-2f545954.cjs.dev.js} +1 -1
- package/dist/{patch-7c559bb2.cjs.prod.js → patch-e72c6c2f.cjs.prod.js} +1 -1
- package/dist/{pathPatch-fab016f1.cjs.dev.js → pathPatch-9fa78980.cjs.dev.js} +1 -1
- package/dist/{pathPatch-b56a4da2.cjs.prod.js → pathPatch-f3064fa9.cjs.prod.js} +1 -1
- package/dist/{pool-3211287f.cjs.dev.js → pool-7c9cd8e9.cjs.dev.js} +5 -5
- package/dist/{pool-f77d7705.cjs.prod.js → pool-9370f703.cjs.prod.js} +5 -5
- package/dist/{query-c36decd5.cjs.dev.js → query-6cd164ab.cjs.dev.js} +3 -3
- package/dist/{query-a52b25f0.cjs.prod.js → query-8147932f.cjs.prod.js} +3 -3
- package/dist/{queue-7a223c44.cjs.dev.js → queue-06ce789d.cjs.dev.js} +23 -13
- package/dist/{queue-315ea45d.cjs.prod.js → queue-6afe5f19.cjs.prod.js} +23 -13
- package/dist/{registry-62ff192e.cjs.dev.js → registry-35e8eb48.cjs.dev.js} +2 -2
- package/dist/{registry-d5258dff.cjs.prod.js → registry-5c67df33.cjs.prod.js} +2 -2
- package/dist/{runtime-005f8a9b.cjs.prod.js → runtime-d41d839b.cjs.prod.js} +6 -6
- package/dist/{runtime-57c8ddf8.cjs.dev.js → runtime-fb1c1c19.cjs.dev.js} +6 -6
- package/dist/{schedule-e7a9f93f.cjs.dev.js → schedule-0e1db444.cjs.dev.js} +3 -3
- package/dist/{schedule-8cdf6bf1.cjs.prod.js → schedule-64057679.cjs.prod.js} +3 -3
- package/dist/{scopedRef-eb19c7a6.cjs.dev.js → scopedRef-2ea09a4f.cjs.dev.js} +6 -6
- package/dist/{scopedRef-789d7fef.cjs.prod.js → scopedRef-7a6d42f7.cjs.prod.js} +6 -6
- package/dist/{singleProducerAsyncInput-f9b258b1.cjs.prod.js → singleProducerAsyncInput-8b8ad112.cjs.prod.js} +1 -1
- package/dist/{singleProducerAsyncInput-9ff8389b.cjs.dev.js → singleProducerAsyncInput-97f74016.cjs.dev.js} +1 -1
- package/dist/{sink-572d8981.cjs.prod.js → sink-6d1a77bf.cjs.prod.js} +3 -3
- package/dist/{sink-8d3427e7.cjs.dev.js → sink-ebf2fbdb.cjs.dev.js} +3 -3
- package/dist/{stm-f250b596.cjs.prod.js → stm-4a6de085.cjs.prod.js} +3 -3
- package/dist/{stm-8aca0022.cjs.dev.js → stm-dbec85f1.cjs.dev.js} +3 -3
- package/dist/{stream-34d80d2c.cjs.dev.js → stream-478aa5a8.cjs.dev.js} +9 -6
- package/dist/{stream-ea4f4d44.cjs.prod.js → stream-f7345889.cjs.prod.js} +9 -6
- package/dist/{synchronizedRef-ed8aa6ac.cjs.prod.js → synchronizedRef-432b4455.cjs.prod.js} +1 -1
- package/dist/{synchronizedRef-a12fd967.cjs.dev.js → synchronizedRef-fa63e917.cjs.dev.js} +1 -1
- package/dist/{tArray-17f078f2.cjs.dev.js → tArray-0c9045e7.cjs.dev.js} +3 -3
- package/dist/{tArray-d184e22f.cjs.prod.js → tArray-b30ccc3e.cjs.prod.js} +3 -3
- package/dist/{tMap-e219f30e.cjs.prod.js → tMap-001c791c.cjs.prod.js} +4 -4
- package/dist/{tMap-1a5aa78b.cjs.dev.js → tMap-0625df1d.cjs.dev.js} +4 -4
- package/dist/{tQueue-47129ad0.cjs.prod.js → tQueue-6accdd70.cjs.prod.js} +3 -3
- package/dist/{tQueue-0a4fc773.cjs.dev.js → tQueue-cdbf9130.cjs.dev.js} +3 -3
- package/dist/{tRef-ab4c5713.cjs.prod.js → tRef-8b60d85b.cjs.prod.js} +1 -1
- package/dist/{tRef-b860ef05.cjs.dev.js → tRef-b5bae36d.cjs.dev.js} +1 -1
- package/internal/channel.esm.js +2 -2
- package/internal/core-effect.esm.js +1 -1
- package/internal/fiberRuntime.esm.js +27 -23
- package/internal/layer/circular.esm.js +5 -6
- package/internal/layer.esm.js +9 -5
- package/internal/logger.esm.js +3 -3
- package/internal/matcher.esm.js +314 -0
- package/internal/queue.esm.js +24 -14
- package/internal/stream.esm.js +7 -4
- package/internal/tracer.esm.js +14 -4
- package/package.json +21 -13
- package/src/{Bigint.ts → BigInt.ts} +26 -26
- package/src/Channel.ts +4 -2
- package/src/Data.ts +18 -16
- package/src/Duration.ts +2 -2
- package/src/Effect.ts +84 -151
- package/src/Either.ts +33 -0
- package/src/FiberRef.ts +2 -3
- package/src/Layer.ts +157 -3
- package/src/Logger.ts +2 -8
- package/src/Match.ts +800 -0
- package/src/Predicate.ts +4 -4
- package/src/Queue.ts +8 -0
- package/src/Stream.ts +4 -2
- package/src/Tracer.ts +18 -9
- package/src/index.ts +6 -1
- package/src/internal/channel.ts +5 -3
- package/src/internal/core-effect.ts +27 -22
- package/src/internal/core.ts +5 -7
- package/src/internal/fiberRuntime.ts +39 -13
- package/src/internal/layer/circular.ts +21 -6
- package/src/internal/layer.ts +20 -4
- package/src/internal/logger.ts +4 -4
- package/src/internal/matcher.ts +594 -0
- package/src/internal/queue.ts +26 -11
- package/src/internal/stream.ts +9 -7
- package/src/internal/tracer.ts +28 -5
- package/src/tsconfig.json +41 -0
- package/Bigint/dist/effect-Bigint.cjs.d.mts +0 -2
- package/Bigint/dist/effect-Bigint.cjs.d.mts.map +0 -1
- package/Bigint/dist/effect-Bigint.cjs.d.ts +0 -2
- package/Bigint/dist/effect-Bigint.cjs.d.ts.map +0 -1
- package/Bigint/dist/effect-Bigint.cjs.js +0 -7
- package/Bigint/package.json +0 -4
- /package/dist/{Effectable-c4c14a2b.cjs.prod.js → Effectable-6a8a05f1.cjs.prod.js} +0 -0
- /package/dist/{Effectable-7314aed8.cjs.dev.js → Effectable-71c10ab9.cjs.dev.js} +0 -0
- /package/dist/{FiberId-1d7ac632.cjs.prod.js → FiberId-54d8bd67.cjs.prod.js} +0 -0
- /package/dist/{FiberId-d88ddce6.cjs.dev.js → FiberId-6708cdca.cjs.dev.js} +0 -0
- /package/dist/{HashSet-ac02a3e1.cjs.prod.js → HashSet-86613304.cjs.prod.js} +0 -0
- /package/dist/{HashSet-5963ad6b.cjs.dev.js → HashSet-dd020cb0.cjs.dev.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-866fa259.cjs.prod.js → RuntimeFlagsPatch-902b4680.cjs.prod.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-69102b03.cjs.dev.js → RuntimeFlagsPatch-cf423492.cjs.dev.js} +0 -0
- /package/dist/{boundaries-f212e414.cjs.dev.js → boundaries-b5265184.cjs.dev.js} +0 -0
- /package/dist/{boundaries-9af538e3.cjs.prod.js → boundaries-bfd86b3e.cjs.prod.js} +0 -0
- /package/dist/{configError-b43723af.cjs.prod.js → configError-856c7153.cjs.prod.js} +0 -0
- /package/dist/{configError-d5efe9c0.cjs.dev.js → configError-a824b415.cjs.dev.js} +0 -0
- /package/dist/{configSecret-e2faa181.cjs.prod.js → configSecret-9b941a86.cjs.prod.js} +0 -0
- /package/dist/{configSecret-3e8ae336.cjs.dev.js → configSecret-e7bb51da.cjs.dev.js} +0 -0
- /package/dist/{keyType-0c5e6178.cjs.prod.js → keyType-4ec0b247.cjs.prod.js} +0 -0
- /package/dist/{keyType-7c164b82.cjs.dev.js → keyType-f30c9fa4.cjs.dev.js} +0 -0
- /package/dist/{label-655343b5.cjs.prod.js → label-a588e6cd.cjs.prod.js} +0 -0
- /package/dist/{label-011edbe7.cjs.dev.js → label-b0cebeae.cjs.dev.js} +0 -0
- /package/dist/{state-0bdf02b7.cjs.prod.js → state-40d5dc71.cjs.prod.js} +0 -0
- /package/dist/{state-931050c4.cjs.dev.js → state-620f7a22.cjs.dev.js} +0 -0
- /package/dist/{take-85daaf79.cjs.prod.js → take-15455ae3.cjs.prod.js} +0 -0
- /package/dist/{take-f9ef9e2e.cjs.dev.js → take-1c250e7a.cjs.dev.js} +0 -0
package/internal/queue.esm.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { head, prepend, filter, isEmpty as isEmpty$
|
|
1
|
+
import { head, prepend, filter, isEmpty as isEmpty$2, fromIterable as fromIterable$1, appendAll, append, empty as empty$1 } from '../Chunk/dist/effect-Chunk.esm.js';
|
|
2
2
|
import { pipe, dual } from '../Function/dist/effect-Function.esm.js';
|
|
3
3
|
import { flatMap, sync, map, deferredMake, fiberId, withFiberRuntime, unit, succeed, deferredUnsafeDone, deferredInterruptWith, asUnit, deferredUnsafeMake, onInterrupt, suspend, interrupt, deferredAwait, catchAll, uninterruptible, whenEffect, deferredSucceed, zipRight } from './core.esm.js';
|
|
4
4
|
import { forEachParUnboundedDiscard } from './fiberRuntime.esm.js';
|
|
5
|
-
import { bounded as bounded$1, unbounded as unbounded$1, length, poll as poll$1, EmptyMutableQueue, offer as offer$1, offerAll as offerAll$1, pollUpTo, capacity as capacity$1 } from '../MutableQueue/dist/effect-MutableQueue.esm.js';
|
|
5
|
+
import { bounded as bounded$1, unbounded as unbounded$1, length, isEmpty as isEmpty$1, poll as poll$1, EmptyMutableQueue, offer as offer$1, offerAll as offerAll$1, pollUpTo, capacity as capacity$1 } from '../MutableQueue/dist/effect-MutableQueue.esm.js';
|
|
6
6
|
import { make as make$1, get, set } from '../MutableRef/dist/effect-MutableRef.esm.js';
|
|
7
7
|
import { none, some } from '../Option/dist/effect-Option.esm.js';
|
|
8
8
|
import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
|
|
@@ -162,7 +162,7 @@ class QueueImpl {
|
|
|
162
162
|
// Not enough takers, offer to the queue
|
|
163
163
|
const surplus = this.queue.offerAll(remaining);
|
|
164
164
|
unsafeCompleteTakers(this.strategy, this.queue, this.takers);
|
|
165
|
-
return isEmpty$
|
|
165
|
+
return isEmpty$2(surplus) ? succeed(true) : this.strategy.handleSurplus(surplus, this.queue, this.takers, this.shutdownFlag);
|
|
166
166
|
});
|
|
167
167
|
}
|
|
168
168
|
take() {
|
|
@@ -353,6 +353,16 @@ class BackPressureStrategy {
|
|
|
353
353
|
surplusSize() {
|
|
354
354
|
return length(this.putters);
|
|
355
355
|
}
|
|
356
|
+
onCompleteTakersWithEmptyQueue(takers) {
|
|
357
|
+
while (!isEmpty$1(this.putters) && !isEmpty$1(takers)) {
|
|
358
|
+
const taker = poll$1(takers, void 0);
|
|
359
|
+
const putter = poll$1(this.putters, void 0);
|
|
360
|
+
if (putter[2]) {
|
|
361
|
+
unsafeCompleteDeferred(putter[1], true);
|
|
362
|
+
}
|
|
363
|
+
unsafeCompleteDeferred(taker, putter[0]);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
356
366
|
shutdown() {
|
|
357
367
|
return pipe(fiberId, flatMap(fiberId => pipe(sync(() => unsafePollAll(this.putters)), flatMap(putters => forEachParUnboundedDiscard(putters, ([_, deferred, isLastItem]) => isLastItem ? pipe(deferredInterruptWith(deferred, fiberId), asUnit) : unit, false)))));
|
|
358
368
|
}
|
|
@@ -385,17 +395,12 @@ class BackPressureStrategy {
|
|
|
385
395
|
}
|
|
386
396
|
}
|
|
387
397
|
unsafeOffer(iterable, deferred) {
|
|
388
|
-
const
|
|
389
|
-
let
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
next = iterator.next();
|
|
395
|
-
if (next.done) {
|
|
396
|
-
pipe(this.putters, offer$1([value, deferred, true]));
|
|
397
|
-
break;
|
|
398
|
-
}
|
|
398
|
+
const stuff = Array.from(iterable);
|
|
399
|
+
for (let i = 0; i < stuff.length; i++) {
|
|
400
|
+
const value = stuff[i];
|
|
401
|
+
if (i === stuff.length - 1) {
|
|
402
|
+
pipe(this.putters, offer$1([value, deferred, true]));
|
|
403
|
+
} else {
|
|
399
404
|
pipe(this.putters, offer$1([value, deferred, false]));
|
|
400
405
|
}
|
|
401
406
|
}
|
|
@@ -414,6 +419,7 @@ class DroppingStrategy {
|
|
|
414
419
|
shutdown() {
|
|
415
420
|
return unit;
|
|
416
421
|
}
|
|
422
|
+
onCompleteTakersWithEmptyQueue() {}
|
|
417
423
|
handleSurplus(_iterable, _queue, _takers, _isShutdown) {
|
|
418
424
|
return succeed(false);
|
|
419
425
|
}
|
|
@@ -431,6 +437,7 @@ class SlidingStrategy {
|
|
|
431
437
|
shutdown() {
|
|
432
438
|
return unit;
|
|
433
439
|
}
|
|
440
|
+
onCompleteTakersWithEmptyQueue() {}
|
|
434
441
|
handleSurplus(iterable, queue, takers, _isShutdown) {
|
|
435
442
|
return sync(() => {
|
|
436
443
|
this.unsafeOffer(queue, iterable);
|
|
@@ -500,6 +507,9 @@ const unsafeCompleteTakers = (strategy, queue, takers) => {
|
|
|
500
507
|
keepPolling = false;
|
|
501
508
|
}
|
|
502
509
|
}
|
|
510
|
+
if (keepPolling && queue.length() === 0 && !isEmpty$1(takers)) {
|
|
511
|
+
strategy.onCompleteTakersWithEmptyQueue(takers);
|
|
512
|
+
}
|
|
503
513
|
};
|
|
504
514
|
|
|
505
515
|
export { BackingQueueFromMutableQueue, DequeueTypeId, EnqueueTypeId, QueueStrategyTypeId, awaitShutdown, backPressureStrategy, backingQueueFromMutableQueue, bounded, capacity, dequeueVariance, dropping, droppingStrategy, enqueueVariance, isDequeue, isEmpty, isEnqueue, isFull, isQueue, isShutdown, make, offer, offerAll, poll, shutdown, size, sliding, slidingStrategy, take, takeAll, takeBetween, takeN, takeUpTo, unbounded, unsafeCompleteTakers, unsafeOffer, unsafeRemove };
|
package/internal/stream.esm.js
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
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(
|
|
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])));
|
package/internal/tracer.esm.js
CHANGED
|
@@ -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
|
-
|
|
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.
|
|
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
|
-
"
|
|
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
|
-
"./
|
|
190
|
-
"types": "./dist/declarations/src/
|
|
191
|
-
"module": "./
|
|
192
|
-
"import": "./
|
|
193
|
-
"default": "./
|
|
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.
|
|
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.
|
|
1059
|
-
"@typescript-eslint/eslint-plugin": "^6.7.
|
|
1060
|
-
"@typescript-eslint/parser": "^6.7.
|
|
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.
|
|
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.
|
|
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"
|
|
@@ -19,15 +19,15 @@ import * as predicate from "./Predicate"
|
|
|
19
19
|
* @param input - The value to test.
|
|
20
20
|
*
|
|
21
21
|
* @example
|
|
22
|
-
* import {
|
|
22
|
+
* import { isBigInt } from "effect/BigInt"
|
|
23
23
|
*
|
|
24
|
-
* assert.deepStrictEqual(
|
|
25
|
-
* assert.deepStrictEqual(
|
|
24
|
+
* assert.deepStrictEqual(isBigInt(1n), true)
|
|
25
|
+
* assert.deepStrictEqual(isBigInt(1), false)
|
|
26
26
|
*
|
|
27
27
|
* @category guards
|
|
28
28
|
* @since 2.0.0
|
|
29
29
|
*/
|
|
30
|
-
export const
|
|
30
|
+
export const isBigInt: (u: unknown) => u is bigint = predicate.isBigInt
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
33
|
* Provides an addition operation on `bigint`s.
|
|
@@ -36,7 +36,7 @@ export const isBigint: (u: unknown) => u is bigint = predicate.isBigint
|
|
|
36
36
|
* @param that - The second operand.
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
|
-
* import { sum } from 'effect/
|
|
39
|
+
* import { sum } from 'effect/BigInt'
|
|
40
40
|
*
|
|
41
41
|
* assert.deepStrictEqual(sum(2n, 3n), 5n)
|
|
42
42
|
*
|
|
@@ -55,7 +55,7 @@ export const sum: {
|
|
|
55
55
|
* @param that - The second operand.
|
|
56
56
|
*
|
|
57
57
|
* @example
|
|
58
|
-
* import { multiply } from 'effect/
|
|
58
|
+
* import { multiply } from 'effect/BigInt'
|
|
59
59
|
*
|
|
60
60
|
* assert.deepStrictEqual(multiply(2n, 3n), 6n)
|
|
61
61
|
*
|
|
@@ -74,7 +74,7 @@ export const multiply: {
|
|
|
74
74
|
* @param that - The second operand.
|
|
75
75
|
*
|
|
76
76
|
* @example
|
|
77
|
-
* import { subtract } from 'effect/
|
|
77
|
+
* import { subtract } from 'effect/BigInt'
|
|
78
78
|
*
|
|
79
79
|
* assert.deepStrictEqual(subtract(2n, 3n), -1n)
|
|
80
80
|
*
|
|
@@ -96,7 +96,7 @@ export const subtract: {
|
|
|
96
96
|
* @param that - The divisor operand.
|
|
97
97
|
*
|
|
98
98
|
* @example
|
|
99
|
-
* import { divide } from 'effect/
|
|
99
|
+
* import { divide } from 'effect/BigInt'
|
|
100
100
|
*
|
|
101
101
|
* assert.deepStrictEqual(divide(6n, 3n), 2n)
|
|
102
102
|
* assert.deepStrictEqual(divide(6n, 4n), 1n)
|
|
@@ -116,7 +116,7 @@ export const divide: {
|
|
|
116
116
|
* @param n - A `bigint` to be incremented.
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
|
-
* import { increment } from 'effect/
|
|
119
|
+
* import { increment } from 'effect/BigInt'
|
|
120
120
|
*
|
|
121
121
|
* assert.deepStrictEqual(increment(2n), 3n)
|
|
122
122
|
*
|
|
@@ -131,7 +131,7 @@ export const increment = (n: bigint): bigint => n + 1n
|
|
|
131
131
|
* @param n - A `bigint` to be decremented.
|
|
132
132
|
*
|
|
133
133
|
* @example
|
|
134
|
-
* import { decrement } from 'effect/
|
|
134
|
+
* import { decrement } from 'effect/BigInt'
|
|
135
135
|
*
|
|
136
136
|
* assert.deepStrictEqual(decrement(3n), 2n)
|
|
137
137
|
*
|
|
@@ -159,7 +159,7 @@ export const Order: order.Order<bigint> = order.bigint
|
|
|
159
159
|
* @param that - The second argument.
|
|
160
160
|
*
|
|
161
161
|
* @example
|
|
162
|
-
* import { lessThan } from 'effect/
|
|
162
|
+
* import { lessThan } from 'effect/BigInt'
|
|
163
163
|
*
|
|
164
164
|
* assert.deepStrictEqual(lessThan(2n, 3n), true)
|
|
165
165
|
* assert.deepStrictEqual(lessThan(3n, 3n), false)
|
|
@@ -180,7 +180,7 @@ export const lessThan: {
|
|
|
180
180
|
* @param that - The second `bigint` to compare with.
|
|
181
181
|
*
|
|
182
182
|
* @example
|
|
183
|
-
* import { lessThanOrEqualTo } from 'effect/
|
|
183
|
+
* import { lessThanOrEqualTo } from 'effect/BigInt'
|
|
184
184
|
*
|
|
185
185
|
* assert.deepStrictEqual(lessThanOrEqualTo(2n, 3n), true)
|
|
186
186
|
* assert.deepStrictEqual(lessThanOrEqualTo(3n, 3n), true)
|
|
@@ -201,7 +201,7 @@ export const lessThanOrEqualTo: {
|
|
|
201
201
|
* @param that - The second argument.
|
|
202
202
|
*
|
|
203
203
|
* @example
|
|
204
|
-
* import { greaterThan } from 'effect/
|
|
204
|
+
* import { greaterThan } from 'effect/BigInt'
|
|
205
205
|
*
|
|
206
206
|
* assert.deepStrictEqual(greaterThan(2n, 3n), false)
|
|
207
207
|
* assert.deepStrictEqual(greaterThan(3n, 3n), false)
|
|
@@ -222,7 +222,7 @@ export const greaterThan: {
|
|
|
222
222
|
* @param that - The second `bigint` to compare with.
|
|
223
223
|
*
|
|
224
224
|
* @example
|
|
225
|
-
* import { greaterThanOrEqualTo } from 'effect/
|
|
225
|
+
* import { greaterThanOrEqualTo } from 'effect/BigInt'
|
|
226
226
|
*
|
|
227
227
|
* assert.deepStrictEqual(greaterThanOrEqualTo(2n, 3n), false)
|
|
228
228
|
* assert.deepStrictEqual(greaterThanOrEqualTo(3n, 3n), true)
|
|
@@ -244,7 +244,7 @@ export const greaterThanOrEqualTo: {
|
|
|
244
244
|
* @param maximum - The `maximum` value to check.
|
|
245
245
|
*
|
|
246
246
|
* @example
|
|
247
|
-
* import { between } from 'effect/
|
|
247
|
+
* import { between } from 'effect/BigInt'
|
|
248
248
|
*
|
|
249
249
|
* assert.deepStrictEqual(between(0n, 5n)(3n), true)
|
|
250
250
|
* assert.deepStrictEqual(between(0n, 5n)(-1n), false)
|
|
@@ -270,7 +270,7 @@ export const between: {
|
|
|
270
270
|
* @param maximum - The upper end of the range.
|
|
271
271
|
*
|
|
272
272
|
* @example
|
|
273
|
-
* import { clamp } from 'effect/
|
|
273
|
+
* import { clamp } from 'effect/BigInt'
|
|
274
274
|
*
|
|
275
275
|
* assert.deepStrictEqual(clamp(0n, 5n)(3n), 3n)
|
|
276
276
|
* assert.deepStrictEqual(clamp(0n, 5n)(-1n), 0n)
|
|
@@ -290,7 +290,7 @@ export const clamp: {
|
|
|
290
290
|
* @param that - The second `bigint`.
|
|
291
291
|
*
|
|
292
292
|
* @example
|
|
293
|
-
* import { min } from 'effect/
|
|
293
|
+
* import { min } from 'effect/BigInt'
|
|
294
294
|
*
|
|
295
295
|
* assert.deepStrictEqual(min(2n, 3n), 2n)
|
|
296
296
|
*
|
|
@@ -308,7 +308,7 @@ export const min: {
|
|
|
308
308
|
* @param that - The second `bigint`.
|
|
309
309
|
*
|
|
310
310
|
* @example
|
|
311
|
-
* import { max } from 'effect/
|
|
311
|
+
* import { max } from 'effect/BigInt'
|
|
312
312
|
*
|
|
313
313
|
* assert.deepStrictEqual(max(2n, 3n), 3n)
|
|
314
314
|
*
|
|
@@ -325,7 +325,7 @@ export const max: {
|
|
|
325
325
|
* @param n - The `bigint` to determine the sign of.
|
|
326
326
|
*
|
|
327
327
|
* @example
|
|
328
|
-
* import { sign } from 'effect/
|
|
328
|
+
* import { sign } from 'effect/BigInt'
|
|
329
329
|
*
|
|
330
330
|
* assert.deepStrictEqual(sign(-5n), -1)
|
|
331
331
|
* assert.deepStrictEqual(sign(0n), 0)
|
|
@@ -342,7 +342,7 @@ export const sign = (n: bigint): Ordering => Order(n, 0n)
|
|
|
342
342
|
* @param n - The `bigint` to determine the absolute value of.
|
|
343
343
|
*
|
|
344
344
|
* @example
|
|
345
|
-
* import { abs } from 'effect/
|
|
345
|
+
* import { abs } from 'effect/BigInt'
|
|
346
346
|
*
|
|
347
347
|
* assert.deepStrictEqual(abs(-5n), 5n)
|
|
348
348
|
* assert.deepStrictEqual(abs(0n), 0n)
|
|
@@ -360,7 +360,7 @@ export const abs = (n: bigint): bigint => (n < 0n ? -n : n)
|
|
|
360
360
|
* @param b - The second `bigint`.
|
|
361
361
|
*
|
|
362
362
|
* @example
|
|
363
|
-
* import { gcd } from 'effect/
|
|
363
|
+
* import { gcd } from 'effect/BigInt'
|
|
364
364
|
*
|
|
365
365
|
* assert.deepStrictEqual(gcd(2n, 3n), 1n)
|
|
366
366
|
* assert.deepStrictEqual(gcd(2n, 4n), 2n)
|
|
@@ -388,7 +388,7 @@ export const gcd: {
|
|
|
388
388
|
* @param b - The second `bigint`.
|
|
389
389
|
*
|
|
390
390
|
* @example
|
|
391
|
-
* import { lcm } from 'effect/
|
|
391
|
+
* import { lcm } from 'effect/BigInt'
|
|
392
392
|
*
|
|
393
393
|
* assert.deepStrictEqual(lcm(2n, 3n), 6n)
|
|
394
394
|
* assert.deepStrictEqual(lcm(2n, 4n), 4n)
|
|
@@ -408,7 +408,7 @@ export const lcm: {
|
|
|
408
408
|
* @param n - The `bigint` to determine the square root of.
|
|
409
409
|
*
|
|
410
410
|
* @example
|
|
411
|
-
* import { unsafeSqrt } from 'effect/
|
|
411
|
+
* import { unsafeSqrt } from 'effect/BigInt'
|
|
412
412
|
*
|
|
413
413
|
* assert.deepStrictEqual(unsafeSqrt(4n), 2n)
|
|
414
414
|
* assert.deepStrictEqual(unsafeSqrt(9n), 3n)
|
|
@@ -437,7 +437,7 @@ export const unsafeSqrt = (n: bigint): bigint => {
|
|
|
437
437
|
* @param n - The `bigint` to determine the square root of.
|
|
438
438
|
*
|
|
439
439
|
* @example
|
|
440
|
-
* import { sqrt } from 'effect/
|
|
440
|
+
* import { sqrt } from 'effect/BigInt'
|
|
441
441
|
* import * as Option from 'effect/Option'
|
|
442
442
|
*
|
|
443
443
|
* assert.deepStrictEqual(sqrt(4n), Option.some(2n))
|
|
@@ -457,7 +457,7 @@ export const sqrt = (n: bigint): Option.Option<bigint> =>
|
|
|
457
457
|
* @param collection - The collection of `bigint`s to sum.
|
|
458
458
|
*
|
|
459
459
|
* @example
|
|
460
|
-
* import { sumAll } from 'effect/
|
|
460
|
+
* import { sumAll } from 'effect/BigInt'
|
|
461
461
|
*
|
|
462
462
|
* assert.deepStrictEqual(sumAll([2n, 3n, 4n]), 9n)
|
|
463
463
|
*
|
|
@@ -478,7 +478,7 @@ export const sumAll = (collection: Iterable<bigint>): bigint => {
|
|
|
478
478
|
* @param collection - The collection of `bigint`s to multiply.
|
|
479
479
|
*
|
|
480
480
|
* @example
|
|
481
|
-
* import { multiplyAll } from 'effect/
|
|
481
|
+
* import { multiplyAll } from 'effect/BigInt'
|
|
482
482
|
*
|
|
483
483
|
* assert.deepStrictEqual(multiplyAll([2n, 3n, 4n]), 24n)
|
|
484
484
|
*
|
package/src/Channel.ts
CHANGED
|
@@ -2060,10 +2060,11 @@ export const withSpan: {
|
|
|
2060
2060
|
(
|
|
2061
2061
|
name: string,
|
|
2062
2062
|
options?: {
|
|
2063
|
-
readonly attributes?: Record<string,
|
|
2063
|
+
readonly attributes?: Record<string, unknown>
|
|
2064
2064
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
2065
2065
|
readonly parent?: Tracer.ParentSpan
|
|
2066
2066
|
readonly root?: boolean
|
|
2067
|
+
readonly sampled?: boolean
|
|
2067
2068
|
readonly context?: Context.Context<never>
|
|
2068
2069
|
}
|
|
2069
2070
|
): <Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>(
|
|
@@ -2073,10 +2074,11 @@ export const withSpan: {
|
|
|
2073
2074
|
self: Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>,
|
|
2074
2075
|
name: string,
|
|
2075
2076
|
options?: {
|
|
2076
|
-
readonly attributes?: Record<string,
|
|
2077
|
+
readonly attributes?: Record<string, unknown>
|
|
2077
2078
|
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
2078
2079
|
readonly parent?: Tracer.ParentSpan
|
|
2079
2080
|
readonly root?: boolean
|
|
2081
|
+
readonly sampled?: boolean
|
|
2080
2082
|
readonly context?: Context.Context<never>
|
|
2081
2083
|
}
|
|
2082
2084
|
): Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>
|
package/src/Data.ts
CHANGED
|
@@ -5,7 +5,6 @@ import type * as Channel from "./Channel"
|
|
|
5
5
|
import * as Effect from "./Effect"
|
|
6
6
|
import * as Effectable from "./Effectable"
|
|
7
7
|
import type * as Equal from "./Equal"
|
|
8
|
-
import type * as Inspectable from "./Inspectable"
|
|
9
8
|
import * as internal from "./internal/Data"
|
|
10
9
|
import { type Pipeable } from "./Pipeable"
|
|
11
10
|
import type * as Sink from "./Sink"
|
|
@@ -303,7 +302,7 @@ export const taggedEnum: {
|
|
|
303
302
|
* @since 2.0.0
|
|
304
303
|
* @category models
|
|
305
304
|
*/
|
|
306
|
-
export interface YieldableError extends Case, Pipeable,
|
|
305
|
+
export interface YieldableError extends Case, Pipeable, Error {
|
|
307
306
|
readonly [Effectable.EffectTypeId]: Effect.Effect.VarianceStruct<never, this, never>
|
|
308
307
|
readonly [Effectable.StreamTypeId]: Effect.Effect.VarianceStruct<never, this, never>
|
|
309
308
|
readonly [Effectable.SinkTypeId]: Sink.Sink.VarianceStruct<never, this, unknown, never, never>
|
|
@@ -318,21 +317,23 @@ export interface YieldableError extends Case, Pipeable, Inspectable.Inspectable
|
|
|
318
317
|
>
|
|
319
318
|
}
|
|
320
319
|
|
|
321
|
-
const
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
320
|
+
const YieldableErrorMessage = Symbol.for("effect/Data/YieldableError/message")
|
|
321
|
+
const YieldableErrorProto = {
|
|
322
|
+
...Effectable.StructuralCommitPrototype,
|
|
323
|
+
__proto__: globalThis.Error.prototype,
|
|
324
|
+
commit() {
|
|
325
|
+
return Effect.fail(this)
|
|
326
|
+
},
|
|
327
|
+
toString(this: globalThis.Error) {
|
|
328
|
+
return `${this.name}: ${this.message}`
|
|
329
|
+
},
|
|
330
|
+
get message() {
|
|
331
|
+
return (this as any)[YieldableErrorMessage] ?? JSON.stringify(this)
|
|
333
332
|
},
|
|
334
|
-
|
|
335
|
-
)
|
|
333
|
+
set message(value: string) {
|
|
334
|
+
;(this as any)[YieldableErrorMessage] = value
|
|
335
|
+
}
|
|
336
|
+
}
|
|
336
337
|
|
|
337
338
|
/**
|
|
338
339
|
* Provides a constructor for a Case Class.
|
|
@@ -363,5 +364,6 @@ export const TaggedError = <Tag extends string>(tag: Tag): new<A extends Record<
|
|
|
363
364
|
class Base extends Error<{}> {
|
|
364
365
|
readonly _tag = tag
|
|
365
366
|
}
|
|
367
|
+
Base.prototype.name = tag
|
|
366
368
|
return Base as any
|
|
367
369
|
}
|
package/src/Duration.ts
CHANGED
|
@@ -11,7 +11,7 @@ import * as Option from "./Option"
|
|
|
11
11
|
import * as order from "./Order"
|
|
12
12
|
import type { Pipeable } from "./Pipeable"
|
|
13
13
|
import { pipeArguments } from "./Pipeable"
|
|
14
|
-
import {
|
|
14
|
+
import { isBigInt, isNumber } from "./Predicate"
|
|
15
15
|
|
|
16
16
|
const TypeId: unique symbol = Symbol.for("effect/Duration")
|
|
17
17
|
|
|
@@ -75,7 +75,7 @@ export const decode = (input: DurationInput): Duration => {
|
|
|
75
75
|
return input
|
|
76
76
|
} else if (isNumber(input)) {
|
|
77
77
|
return millis(input)
|
|
78
|
-
} else if (
|
|
78
|
+
} else if (isBigInt(input)) {
|
|
79
79
|
return nanos(input)
|
|
80
80
|
} else {
|
|
81
81
|
DURATION_REGEX.lastIndex = 0 // Reset the lastIndex before each use
|