effect 2.0.0-next.47 → 2.0.0-next.49
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 +50 -41
- package/Channel/dist/effect-Channel.cjs.mjs +1 -0
- package/Channel/dist/effect-Channel.cjs.prod.js +50 -41
- package/Channel/dist/effect-Channel.esm.js +10 -2
- 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 +13 -4
- package/Chunk/dist/effect-Chunk.cjs.mjs +1 -0
- package/Chunk/dist/effect-Chunk.cjs.prod.js +13 -4
- package/Chunk/dist/effect-Chunk.esm.js +10 -2
- 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 +10 -3
- package/List/dist/effect-List.cjs.mjs +1 -0
- package/List/dist/effect-List.cjs.prod.js +10 -3
- package/List/dist/effect-List.esm.js +7 -1
- 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 +115 -33
- package/Metric/dist/effect-Metric.cjs.prod.js +115 -33
- package/Metric/dist/effect-Metric.esm.js +88 -6
- 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 +47 -47
- package/TRef/dist/effect-TRef.cjs.mjs +0 -1
- package/TRef/dist/effect-TRef.cjs.prod.js +47 -47
- package/TRef/dist/effect-TRef.esm.js +3 -2
- 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-4014b526.cjs.prod.js → Ref-23b67ad9.cjs.prod.js} +1 -1
- package/dist/{Ref-acdee7ef.cjs.dev.js → Ref-c75b5362.cjs.dev.js} +1 -1
- package/dist/{cache-5c7d77e4.cjs.prod.js → cache-7b144c1f.cjs.prod.js} +5 -5
- package/dist/{cache-7eed9d33.cjs.dev.js → cache-e3d6cc01.cjs.dev.js} +5 -5
- package/dist/{circular-9e10a5a7.cjs.prod.js → circular-105d525c.cjs.prod.js} +8 -9
- package/dist/{circular-1f481ffb.cjs.prod.js → circular-3761aff7.cjs.prod.js} +7 -7
- package/dist/{circular-c2dbce1a.cjs.dev.js → circular-8baf0205.cjs.dev.js} +7 -7
- package/dist/{circular-c8b65bdb.cjs.dev.js → circular-cbfc1699.cjs.dev.js} +8 -9
- package/dist/{config-5ba54da1.cjs.prod.js → config-6a5f97fe.cjs.prod.js} +3 -3
- package/dist/{config-3b7935a3.cjs.dev.js → config-887520b4.cjs.dev.js} +3 -3
- package/dist/{configProvider-b6b20998.cjs.prod.js → configProvider-098f7113.cjs.prod.js} +4 -4
- package/dist/{configProvider-f34a82f1.cjs.dev.js → configProvider-8567470d.cjs.dev.js} +4 -4
- package/dist/{core-b7401357.cjs.dev.js → core-6815193e.cjs.dev.js} +5 -4
- package/dist/{core-84e608f0.cjs.prod.js → core-8072a539.cjs.prod.js} +3 -3
- package/dist/{core-07202cc0.cjs.prod.js → core-84667e8d.cjs.prod.js} +5 -4
- package/dist/{core-c01fd1d8.cjs.dev.js → core-e6f9fdbe.cjs.dev.js} +3 -3
- package/dist/{core-effect-9201ea63.cjs.prod.js → core-effect-520abd3d.cjs.prod.js} +8 -8
- package/dist/{core-effect-1c564d42.cjs.dev.js → core-effect-5700daea.cjs.dev.js} +8 -8
- package/dist/{dataSource-b5eda714.cjs.dev.js → dataSource-0ca8ef42.cjs.dev.js} +2 -2
- package/dist/{dataSource-b83bc277.cjs.prod.js → dataSource-17adc342.cjs.prod.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 +11 -2
- package/dist/declarations/src/Channel.d.ts.map +1 -1
- package/dist/declarations/src/Chunk.d.ts +11 -1
- package/dist/declarations/src/Chunk.d.ts.map +1 -1
- package/dist/declarations/src/Data.d.ts +6 -7
- 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/HashMap.d.ts +30 -0
- package/dist/declarations/src/HashMap.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/List.d.ts +8 -0
- package/dist/declarations/src/List.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/Metric.d.ts +88 -6
- package/dist/declarations/src/Metric.d.ts.map +1 -1
- package/dist/declarations/src/Predicate.d.ts +4 -4
- package/dist/declarations/src/Stream.d.ts +4 -2
- package/dist/declarations/src/Stream.d.ts.map +1 -1
- package/dist/declarations/src/TRef.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-755d5b46.cjs.dev.js → defaultServices-193b11dc.cjs.dev.js} +15 -4
- package/dist/{defaultServices-9d7ce86f.cjs.prod.js → defaultServices-4c3bf140.cjs.prod.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-9519d109.cjs.prod.js → fiber-a1a5e429.cjs.prod.js} +3 -3
- package/dist/{fiber-5156eff2.cjs.dev.js → fiber-cbdeec72.cjs.dev.js} +3 -3
- package/dist/{fiberRefs-98b71233.cjs.dev.js → fiberRefs-8d2401f9.cjs.dev.js} +1 -1
- package/dist/{fiberRefs-558c17e6.cjs.prod.js → fiberRefs-f631451c.cjs.prod.js} +1 -1
- package/dist/{fiberRuntime-31ae011f.cjs.prod.js → fiberRuntime-4691f31b.cjs.prod.js} +27 -23
- package/dist/{fiberRuntime-d3872282.cjs.dev.js → fiberRuntime-7cb6cd44.cjs.dev.js} +27 -23
- package/dist/{groupBy-70c6dc0d.cjs.dev.js → groupBy-239a6e6e.cjs.dev.js} +10 -7
- package/dist/{groupBy-5fb5d639.cjs.prod.js → groupBy-5174c302.cjs.prod.js} +10 -7
- package/dist/{hook-8cefc909.cjs.dev.js → hook-8e8bee6a.cjs.dev.js} +1 -1
- package/dist/{hook-98ce30e4.cjs.prod.js → hook-c2815d51.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-961b15ae.cjs.dev.js} +15 -10
- package/dist/{layer-51ff4846.cjs.prod.js → layer-d1c204db.cjs.prod.js} +15 -10
- package/dist/{patch-7c559bb2.cjs.prod.js → patch-1771b466.cjs.prod.js} +1 -1
- package/dist/{patch-0220a642.cjs.dev.js → patch-32cc7202.cjs.dev.js} +1 -1
- package/dist/{pathPatch-b56a4da2.cjs.prod.js → pathPatch-312bd492.cjs.prod.js} +1 -1
- package/dist/{pathPatch-fab016f1.cjs.dev.js → pathPatch-45b09159.cjs.dev.js} +1 -1
- package/dist/{pool-59df8b4d.cjs.dev.js → pool-3890e6ce.cjs.dev.js} +5 -5
- package/dist/{pool-042cc42b.cjs.prod.js → pool-f178fcc7.cjs.prod.js} +5 -5
- package/dist/{query-c36decd5.cjs.dev.js → query-39c40fa6.cjs.dev.js} +3 -3
- package/dist/{query-a52b25f0.cjs.prod.js → query-a6b58e39.cjs.prod.js} +3 -3
- package/dist/{queue-e4c59627.cjs.dev.js → queue-4c4bdc04.cjs.dev.js} +2 -2
- package/dist/{queue-425b92f6.cjs.prod.js → queue-5342a8d5.cjs.prod.js} +2 -2
- package/dist/{registry-d5258dff.cjs.prod.js → registry-6fbdb4e3.cjs.prod.js} +2 -2
- package/dist/{registry-62ff192e.cjs.dev.js → registry-ec8b84a2.cjs.dev.js} +2 -2
- package/dist/{runtime-005f8a9b.cjs.prod.js → runtime-3295bc3c.cjs.prod.js} +6 -6
- package/dist/{runtime-57c8ddf8.cjs.dev.js → runtime-43b9e2bb.cjs.dev.js} +6 -6
- package/dist/{schedule-8cdf6bf1.cjs.prod.js → schedule-6431754b.cjs.prod.js} +3 -3
- package/dist/{schedule-e7a9f93f.cjs.dev.js → schedule-a4be407d.cjs.dev.js} +3 -3
- package/dist/{scopedRef-789d7fef.cjs.prod.js → scopedRef-7c2bf3f3.cjs.prod.js} +6 -6
- package/dist/{scopedRef-eb19c7a6.cjs.dev.js → scopedRef-9032002a.cjs.dev.js} +6 -6
- package/dist/{singleProducerAsyncInput-9ff8389b.cjs.dev.js → singleProducerAsyncInput-82e5c80c.cjs.dev.js} +1 -1
- package/dist/{singleProducerAsyncInput-f9b258b1.cjs.prod.js → singleProducerAsyncInput-879852ad.cjs.prod.js} +1 -1
- package/dist/{sink-b2fcb569.cjs.prod.js → sink-95371737.cjs.prod.js} +17 -19
- package/dist/{sink-17e02d40.cjs.dev.js → sink-e4280f95.cjs.dev.js} +17 -19
- package/dist/{stm-5264610b.cjs.dev.js → stm-4bf1a928.cjs.dev.js} +3 -3
- package/dist/{stm-9dd6be88.cjs.prod.js → stm-f792171c.cjs.prod.js} +3 -3
- package/dist/{stream-c9c522f2.cjs.prod.js → stream-254329d0.cjs.prod.js} +17 -13
- package/dist/{stream-5e2ed3a9.cjs.dev.js → stream-c498ce8a.cjs.dev.js} +17 -13
- package/dist/{synchronizedRef-ed8aa6ac.cjs.prod.js → synchronizedRef-5420532c.cjs.prod.js} +1 -1
- package/dist/{synchronizedRef-a12fd967.cjs.dev.js → synchronizedRef-cfe99d53.cjs.dev.js} +1 -1
- package/dist/{tArray-cac66af4.cjs.prod.js → tArray-7f227674.cjs.prod.js} +3 -3
- package/dist/{tArray-77a2ae3c.cjs.dev.js → tArray-996f4aba.cjs.dev.js} +3 -3
- package/dist/{tMap-5ac8ec9c.cjs.prod.js → tMap-811797bf.cjs.prod.js} +4 -4
- package/dist/{tMap-73bbf062.cjs.dev.js → tMap-b9665a82.cjs.dev.js} +4 -4
- package/dist/{tQueue-2b1cd0c4.cjs.dev.js → tQueue-0c15312e.cjs.dev.js} +3 -3
- package/dist/{tQueue-dded9b2d.cjs.prod.js → tQueue-8a6a0244.cjs.prod.js} +3 -3
- package/dist/{tRef-73c3549e.cjs.prod.js → tRef-2892ee02.cjs.prod.js} +1 -1
- package/dist/{tRef-90f0872b.cjs.dev.js → tRef-44d17d07.cjs.dev.js} +1 -1
- package/internal/cause.esm.js +2 -1
- package/internal/channel.esm.js +28 -30
- package/internal/core-effect.esm.js +1 -1
- package/internal/core-stream.esm.js +1 -1
- package/internal/fiberRuntime.esm.js +27 -23
- package/internal/groupBy.esm.js +8 -5
- 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/sink.esm.js +11 -11
- package/internal/stream.esm.js +15 -12
- package/internal/tracer.esm.js +14 -4
- package/package.json +25 -16
- package/src/{Bigint.ts → BigInt.ts} +26 -26
- package/src/Channel.ts +14 -2
- package/src/Chunk.ts +12 -1
- package/src/Data.ts +33 -21
- 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/HashMap.ts +30 -0
- package/src/Layer.ts +157 -3
- package/src/List.ts +9 -0
- package/src/Logger.ts +2 -8
- package/src/Match.ts +800 -0
- package/src/Metric.ts +88 -6
- package/src/Predicate.ts +4 -4
- package/src/Stream.ts +4 -2
- package/src/TRef.ts +1 -1
- package/src/Tracer.ts +18 -9
- package/src/index.ts +6 -1
- package/src/internal/cause.ts +1 -1
- package/src/internal/channel.ts +89 -94
- 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/groupBy.ts +7 -3
- 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/stream.ts +17 -12
- package/src/internal/tracer.ts +28 -5
- package/src/tsconfig.json +49 -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-35ed8dee.cjs.prod.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-69102b03.cjs.dev.js → RuntimeFlagsPatch-9cbc441d.cjs.dev.js} +0 -0
- /package/dist/{boundaries-9af538e3.cjs.prod.js → boundaries-26f0dc82.cjs.prod.js} +0 -0
- /package/dist/{boundaries-f212e414.cjs.dev.js → boundaries-6eea221f.cjs.dev.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-3e8ae336.cjs.dev.js → configSecret-23cf1a3f.cjs.dev.js} +0 -0
- /package/dist/{configSecret-e2faa181.cjs.prod.js → configSecret-663cfb59.cjs.prod.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-981a87eb.cjs.prod.js} +0 -0
- /package/dist/{take-f9ef9e2e.cjs.dev.js → take-bfd0a3ed.cjs.dev.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
4
|
-
var core = require('./core-
|
|
4
|
+
var core = require('./core-e6f9fdbe.cjs.dev.js');
|
|
5
5
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
package/internal/cause.esm.js
CHANGED
package/internal/channel.esm.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { failureOrCause, map as map$2,
|
|
2
|
-
import { fromIterable, unsafeGet as unsafeGet$1
|
|
1
|
+
import { failureOrCause, map as map$2, die, isDieType, isInterrupted } from '../Cause/dist/effect-Cause.esm.js';
|
|
2
|
+
import { empty, isEmpty, unsafeFromArray, fromIterable, unsafeGet as unsafeGet$1 } from '../Chunk/dist/effect-Chunk.esm.js';
|
|
3
3
|
import { add, merge as merge$1, make as make$4, unsafeGet } from '../Context/dist/effect-Context.esm.js';
|
|
4
4
|
import { await as _await, make as make$1, succeed as succeed$2, failCause as failCause$2, isDone } from '../Deferred/dist/effect-Deferred.esm.js';
|
|
5
|
-
import { unit, flatMap as flatMap$1, uninterruptible, tap, context as context$1, map as map$1, suspend as suspend$1, matchCause, flatten as flatten$1, gen, acquireRelease, makeSemaphore, matchCauseEffect, failCause as failCause$1, zipRight as zipRight$1, interruptible, asUnit as asUnit$1, succeed as succeed$1, uninterruptibleMask, exit, raceFirst, tapErrorCause, intoDeferred, forkScoped, forever, raceWith, as as as$1, race, scoped as scoped$1, when, repeatWhile, zip as zip$1, zipWith, forkDaemon, never as never$1, sync as sync$1,
|
|
5
|
+
import { unit, flatMap as flatMap$1, uninterruptible, tap, context as context$1, map as map$1, suspend as suspend$1, matchCause, flatten as flatten$1, gen, acquireRelease, makeSemaphore, matchCauseEffect, failCause as failCause$1, zipRight as zipRight$1, interruptible, asUnit as asUnit$1, succeed as succeed$1, uninterruptibleMask, exit, raceFirst, tapErrorCause, intoDeferred, forkScoped, forever, raceWith, as as as$1, race, scoped as scoped$1, when, repeatWhile, zip as zip$1, zipWith, forkDaemon, never as never$1, sync as sync$1, setSpan, repeatUntil, catchAllCause as catchAllCause$1 } from '../Effect/dist/effect-Effect.esm.js';
|
|
6
6
|
import { match, left, right } from '../Either/dist/effect-Either.esm.js';
|
|
7
7
|
import { equals } from '../Equal/dist/effect-Equal.esm.js';
|
|
8
|
-
import {
|
|
8
|
+
import { match as match$2, failCause as failCause$3, succeed as succeed$3, zip as zip$2 } from '../Exit/dist/effect-Exit.esm.js';
|
|
9
9
|
import { interrupt, join, await as _await$1 } from '../Fiber/dist/effect-Fiber.esm.js';
|
|
10
10
|
import { pipe, dual, constVoid, identity } from '../Function/dist/effect-Function.esm.js';
|
|
11
11
|
import { build, merge, context as context$2 } from '../Layer/dist/effect-Layer.esm.js';
|
|
12
12
|
import { match as match$1, none, some, isSome } from '../Option/dist/effect-Option.esm.js';
|
|
13
13
|
import { subscribe } from '../PubSub/dist/effect-PubSub.esm.js';
|
|
14
14
|
import { take, bounded, shutdown, offer, unbounded, size } from '../Queue/dist/effect-Queue.esm.js';
|
|
15
|
-
import { make, get, set,
|
|
15
|
+
import { make, get, set, modify, update } from '../Ref/dist/effect-Ref.esm.js';
|
|
16
16
|
import { make as make$3, extend, close } from '../Scope/dist/effect-Scope.esm.js';
|
|
17
17
|
import { runScoped, run as run$1, ChannelExecutor, readUpstream } from './channel/channelExecutor.esm.js';
|
|
18
18
|
import { Done, Await } from './channel/mergeDecision.esm.js';
|
|
19
19
|
import { BothRunning, RightDone, LeftDone } from './channel/mergeState.esm.js';
|
|
20
|
-
import { match as match$
|
|
20
|
+
import { match as match$3, BackPressure } from './channel/mergeStrategy.esm.js';
|
|
21
21
|
import { make as make$2 } from './channel/singleProducerAsyncInput.esm.js';
|
|
22
|
-
import { flatMap, fromEffect, ensuringWith, suspend, catchAllCause, failCause, concatMapWith, readWith, write, fail, succeedNow, pipeTo, concatAll,
|
|
22
|
+
import { flatMap, fromEffect, ensuringWith, suspend, catchAllCause, failCause, concatMapWith, readWith, write, fail, succeedNow, pipeTo, concatAll, succeed, sync, readWithCause, foldCauseChannel, embedInput, provideContext, readOrFail, collectElements, acquireReleaseOut, concatAllWith, unit as unit$1, isChannel } from './core-stream.esm.js';
|
|
23
23
|
import { OP_DONE as OP_DONE$1 } from './opCodes/channelMergeDecision.esm.js';
|
|
24
24
|
import { OP_RIGHT_DONE, OP_LEFT_DONE, OP_BOTH_RUNNING } from './opCodes/channelMergeState.esm.js';
|
|
25
25
|
import { OP_READ, OP_FROM_EFFECT, OP_EMIT, OP_DONE } from './opCodes/channelState.esm.js';
|
|
@@ -225,7 +225,7 @@ const fromQueue = queue => suspend(() => fromQueueInternal(queue));
|
|
|
225
225
|
|
|
226
226
|
/** @internal */
|
|
227
227
|
const fromQueueInternal = queue => pipe(fromEffect(take(queue)), flatMap(match({
|
|
228
|
-
onLeft: match$
|
|
228
|
+
onLeft: match$2({
|
|
229
229
|
onFailure: failCause,
|
|
230
230
|
onSuccess: succeedNow
|
|
231
231
|
}),
|
|
@@ -338,38 +338,36 @@ const mergeAllWith = ({
|
|
|
338
338
|
concurrency,
|
|
339
339
|
mergeStrategy = BackPressure()
|
|
340
340
|
}) => (channels, f) => pipe(gen(function* ($) {
|
|
341
|
+
const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : concurrency;
|
|
341
342
|
const input = yield* $(make$2());
|
|
342
343
|
const queueReader = fromInput(input);
|
|
343
344
|
const queue = yield* $(acquireRelease(bounded(bufferSize), queue => shutdown(queue)));
|
|
344
345
|
const cancelers = yield* $(acquireRelease(unbounded(), queue => shutdown(queue)));
|
|
345
346
|
const lastDone = yield* $(make(none()));
|
|
346
347
|
const errorSignal = yield* $(make$1());
|
|
347
|
-
const withPermits =
|
|
348
|
+
const withPermits = (yield* $(makeSemaphore(concurrencyN))).withPermits;
|
|
348
349
|
const pull = yield* $(toPull(channels));
|
|
349
350
|
const evaluatePull = pull => pipe(flatMap$1(pull, match({
|
|
350
351
|
onLeft: done => succeed$1(some(done)),
|
|
351
352
|
onRight: outElem => as$1(offer(queue, succeed$1(right(outElem))), none())
|
|
352
|
-
})), repeatUntil(isSome), flatMap$1(match$1({
|
|
353
|
-
onNone: () =>
|
|
354
|
-
onSome:
|
|
355
|
-
|
|
356
|
-
onSome: lastDone => some(f(lastDone, outDone))
|
|
357
|
-
}))
|
|
358
|
-
})), catchAllCause$1(cause => isInterrupted(cause) ? failCause$1(cause) : pipe(offer(queue, failCause$1(cause)), zipRight$1(succeed$2(errorSignal, void 0)), asUnit$1)));
|
|
353
|
+
})), repeatUntil(isSome), flatMap$1(outDone => update(lastDone, match$1({
|
|
354
|
+
onNone: () => some(outDone.value),
|
|
355
|
+
onSome: lastDone => some(f(lastDone, outDone.value))
|
|
356
|
+
}))), catchAllCause$1(cause => isInterrupted(cause) ? failCause$1(cause) : pipe(offer(queue, failCause$1(cause)), zipRight$1(succeed$2(errorSignal, void 0)), asUnit$1)));
|
|
359
357
|
yield* $(matchCauseEffect(pull, {
|
|
360
358
|
onFailure: cause => pipe(offer(queue, failCause$1(cause)), zipRight$1(succeed$1(false))),
|
|
361
359
|
onSuccess: match({
|
|
362
|
-
onLeft: outDone => raceWith(_await(errorSignal), withPermits(
|
|
363
|
-
onSelfDone: (_, permitAcquisition) =>
|
|
364
|
-
onOtherDone: (_, failureAwait) =>
|
|
360
|
+
onLeft: outDone => raceWith(_await(errorSignal), withPermits(concurrencyN)(unit), {
|
|
361
|
+
onSelfDone: (_, permitAcquisition) => as$1(interrupt(permitAcquisition), false),
|
|
362
|
+
onOtherDone: (_, failureAwait) => zipRight$1(interrupt(failureAwait), pipe(get(lastDone), flatMap$1(match$1({
|
|
365
363
|
onNone: () => offer(queue, succeed$1(left(outDone))),
|
|
366
364
|
onSome: lastDone => offer(queue, succeed$1(left(f(lastDone, outDone))))
|
|
367
|
-
})), as$1(false)))
|
|
365
|
+
})), as$1(false)))
|
|
368
366
|
}),
|
|
369
|
-
onRight: channel =>
|
|
367
|
+
onRight: channel => match$3(mergeStrategy, {
|
|
370
368
|
onBackPressure: () => gen(function* ($) {
|
|
371
369
|
const latch = yield* $(make$1());
|
|
372
|
-
const raceEffects = pipe(queueReader, pipeTo(channel), toPull, flatMap$1(pull =>
|
|
370
|
+
const raceEffects = pipe(queueReader, pipeTo(channel), toPull, flatMap$1(pull => race(evaluatePull(pull), _await(errorSignal))), scoped$1);
|
|
373
371
|
yield* $(succeed$2(latch, void 0), zipRight$1(raceEffects), withPermits(1), forkScoped);
|
|
374
372
|
yield* $(_await(latch));
|
|
375
373
|
const errored = yield* $(isDone(errorSignal));
|
|
@@ -379,7 +377,7 @@ const mergeAllWith = ({
|
|
|
379
377
|
const canceler = yield* $(make$1());
|
|
380
378
|
const latch = yield* $(make$1());
|
|
381
379
|
const size$1 = yield* $(size(cancelers));
|
|
382
|
-
yield* $(take(cancelers), flatMap$1(_ => succeed$2(_, void 0)), when(() =>
|
|
380
|
+
yield* $(take(cancelers), flatMap$1(_ => succeed$2(_, void 0)), when(() => size$1 >= concurrencyN));
|
|
383
381
|
yield* $(offer(cancelers, canceler));
|
|
384
382
|
const raceEffects = pipe(queueReader, pipeTo(channel), toPull, flatMap$1(pull => pipe(evaluatePull(pull), race(_await(errorSignal)), race(_await(canceler)))), scoped$1);
|
|
385
383
|
yield* $(succeed$2(latch, void 0), zipRight$1(raceEffects), withPermits(1), forkScoped);
|
|
@@ -387,7 +385,7 @@ const mergeAllWith = ({
|
|
|
387
385
|
const errored = yield* $(isDone(errorSignal));
|
|
388
386
|
return !errored;
|
|
389
387
|
})
|
|
390
|
-
})
|
|
388
|
+
})
|
|
391
389
|
})
|
|
392
390
|
}), repeatWhile(identity), forkScoped);
|
|
393
391
|
return [queue, input];
|
|
@@ -425,7 +423,7 @@ const mergeWith = /*#__PURE__*/dual(2, (self, options) => unwrapScoped(flatMap$1
|
|
|
425
423
|
if (op._tag === OP_DONE$1) {
|
|
426
424
|
return succeed$1(fromEffect(zipRight$1(interrupt(fiber), op.effect)));
|
|
427
425
|
}
|
|
428
|
-
return map$1(_await$1(fiber), match$
|
|
426
|
+
return map$1(_await$1(fiber), match$2({
|
|
429
427
|
onFailure: cause => fromEffect(op.f(failCause$3(cause))),
|
|
430
428
|
onSuccess: match({
|
|
431
429
|
onLeft: done => fromEffect(op.f(succeed$3(done))),
|
|
@@ -433,7 +431,7 @@ const mergeWith = /*#__PURE__*/dual(2, (self, options) => unwrapScoped(flatMap$1
|
|
|
433
431
|
})
|
|
434
432
|
}));
|
|
435
433
|
};
|
|
436
|
-
return match$
|
|
434
|
+
return match$2(exit, {
|
|
437
435
|
onFailure: cause => onDecision(done(failCause$3(cause))),
|
|
438
436
|
onSuccess: match({
|
|
439
437
|
onLeft: z => onDecision(done(succeed$3(z))),
|
|
@@ -454,7 +452,7 @@ const mergeWith = /*#__PURE__*/dual(2, (self, options) => unwrapScoped(flatMap$1
|
|
|
454
452
|
}
|
|
455
453
|
case OP_LEFT_DONE:
|
|
456
454
|
{
|
|
457
|
-
return unwrap(map$1(exit(pullR), match$
|
|
455
|
+
return unwrap(map$1(exit(pullR), match$2({
|
|
458
456
|
onFailure: cause => fromEffect(state.f(failCause$3(cause))),
|
|
459
457
|
onSuccess: match({
|
|
460
458
|
onLeft: done => fromEffect(state.f(succeed$3(done))),
|
|
@@ -464,7 +462,7 @@ const mergeWith = /*#__PURE__*/dual(2, (self, options) => unwrapScoped(flatMap$1
|
|
|
464
462
|
}
|
|
465
463
|
case OP_RIGHT_DONE:
|
|
466
464
|
{
|
|
467
|
-
return unwrap(map$1(exit(pullL), match$
|
|
465
|
+
return unwrap(map$1(exit(pullL), match$2({
|
|
468
466
|
onFailure: cause => fromEffect(state.f(failCause$3(cause))),
|
|
469
467
|
onSuccess: match({
|
|
470
468
|
onLeft: done => fromEffect(state.f(succeed$3(done))),
|
|
@@ -560,7 +558,7 @@ const interpretToPull = (channelState, exec) => {
|
|
|
560
558
|
switch (state._tag) {
|
|
561
559
|
case OP_DONE:
|
|
562
560
|
{
|
|
563
|
-
return match$
|
|
561
|
+
return match$2(exec.getDone(), {
|
|
564
562
|
onFailure: failCause$1,
|
|
565
563
|
onSuccess: done => succeed$1(left(done))
|
|
566
564
|
});
|
|
@@ -602,7 +600,7 @@ const unwrapScoped = self => concatAllWith(scoped(self), (d, _) => d, (d, _) =>
|
|
|
602
600
|
const updateService = /*#__PURE__*/dual(3, (self, tag, f) => mapInputContext(self, context => merge$1(context, make$4(tag, f(unsafeGet(context, tag))))));
|
|
603
601
|
|
|
604
602
|
/** @internal */
|
|
605
|
-
const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(as$1(
|
|
603
|
+
const withSpan = /*#__PURE__*/dual(3, (self, name, options) => unwrapScoped(as$1(setSpan(name, options), self)));
|
|
606
604
|
|
|
607
605
|
/** @internal */
|
|
608
606
|
const writeAll = (...outs) => writeChunk(fromIterable(outs));
|
|
@@ -839,7 +839,7 @@ const linkSpans = /*#__PURE__*/dual(args => isEffect(args[0]), (self, span, attr
|
|
|
839
839
|
/** @internal */
|
|
840
840
|
const makeSpan = (name, options) => tracerWith(tracer => flatMap(options?.parent ? succeedSome(options.parent) : options?.root ? succeedNone : currentParentSpan, parent => flatMap(fiberRefGet(currentTracerSpanAnnotations), annotations => flatMap(fiberRefGet(currentTracerSpanLinks), links => flatMap(currentTimeNanosTracing, startTime => sync(() => {
|
|
841
841
|
const linksArray = options?.links ? [...toReadonlyArray(links), ...options.links] : toReadonlyArray(links);
|
|
842
|
-
const span = tracer.span(name, parent, options?.context ?? empty$1(), linksArray, startTime);
|
|
842
|
+
const span = tracer.span(name, parent, options?.context ?? empty$1(), linksArray, options?.sampled ?? (parent._tag === "Some" ? parent.value.sampled : true), startTime);
|
|
843
843
|
forEach(annotations, (value, key) => span.attribute(key, value));
|
|
844
844
|
Object.entries(options?.attributes ?? {}).forEach(([k, v]) => span.attribute(k, v));
|
|
845
845
|
return span;
|
|
@@ -8,7 +8,7 @@ import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
|
|
|
8
8
|
import { Continue } from './channel/childExecutorDecision.esm.js';
|
|
9
9
|
import { ContinuationKImpl } from './channel/continuation.esm.js';
|
|
10
10
|
import { PullAfterNext } from './channel/upstreamPullStrategy.esm.js';
|
|
11
|
-
import { OP_BRACKET_OUT, OP_FOLD, OP_CONCAT_ALL, OP_BRIDGE, OP_ENSURING, OP_FAIL, OP_FROM_EFFECT, OP_PIPE_TO, OP_PROVIDE, OP_READ, OP_SUCCEED, OP_EMIT, OP_SUCCEED_NOW
|
|
11
|
+
import { OP_BRACKET_OUT, OP_FOLD, OP_CONCAT_ALL, OP_BRIDGE, OP_ENSURING, OP_FAIL, OP_FROM_EFFECT, OP_PIPE_TO, OP_PROVIDE, OP_READ, OP_SUSPEND, OP_SUCCEED, OP_EMIT, OP_SUCCEED_NOW } from './opCodes/channel.esm.js';
|
|
12
12
|
|
|
13
13
|
/** @internal */
|
|
14
14
|
const ChannelSymbolKey = "effect/Channel";
|
|
@@ -8,6 +8,7 @@ import { getOrDefault } from '../FiberRefs/dist/effect-FiberRefs.esm.js';
|
|
|
8
8
|
import { diff as diff$1, patch as patch$1 } from '../FiberRefsPatch/dist/effect-FiberRefsPatch.esm.js';
|
|
9
9
|
import { isDone, done, suspended, running } from '../FiberStatus/dist/effect-FiberStatus.esm.js';
|
|
10
10
|
import { dual, identity, pipe } from '../Function/dist/effect-Function.esm.js';
|
|
11
|
+
import { map as map$1 } from '../HashMap/dist/effect-HashMap.esm.js';
|
|
11
12
|
import { make, fromIterable as fromIterable$2, union, size } from '../HashSet/dist/effect-HashSet.esm.js';
|
|
12
13
|
import { par, flatten as flatten$2, sequentialCollectionToChunk } from './blockedRequests.esm.js';
|
|
13
14
|
import { pretty, failureOrCause, parallel as parallel$1, sequential as sequential$1, interrupt, isEmpty, isInterruptedOnly, die, NoSuchElementException, stripFailures, isInterruptedException, IllegalArgumentException } from './cause.esm.js';
|
|
@@ -15,7 +16,7 @@ import { clockTag } from './clock.esm.js';
|
|
|
15
16
|
import { currentRequestMap } from './completedRequestMap.esm.js';
|
|
16
17
|
import { matchSimple, match as match$1 } from './concurrency.esm.js';
|
|
17
18
|
import { configProviderTag } from './configProvider.esm.js';
|
|
18
|
-
import { fiberRefUnsafeMake, currentTracerSpan, fiberRefUnsafeMakeHashSet, uninterruptible, tap, isEffect, withFiberRuntime, fiberRefLocally, currentForkScopeOverride, map as map$
|
|
19
|
+
import { fiberRefUnsafeMake, currentTracerSpan, fiberRefUnsafeMakeHashSet, uninterruptible, tap, isEffect, withFiberRuntime, fiberRefLocally, currentForkScopeOverride, map as map$2, exit, exitIsSuccess, onError, failCause, partitionMap, either, flatMap as flatMap$1, unit, succeed, fail, dieSync, uninterruptibleMask, interruptible, forEachSequential, zipRight, asUnit, onInterrupt, zipLeft, interruptFiber, deferredMake, exitMatchEffect, flatten, deferredFailCause, deferredSucceed, contextWithEffect, scopeFork, currentMetricLabels, acquireUseRelease, scopeClose, exitZipWith, flip, fiberIdWith, updateRuntimeFlags, runtimeFlags, ScopeTypeId, releaseMapMake, CloseableScopeTypeId, releaseMapAdd, scopeAddFinalizerExit, as, mapInputContext, onExit, fiberRefUnsafeMakePatch, fiberRefGet, fiberRefSet, fiberRefGetWith, sync, fiberRefUpdate, fiberRefDelete, fiberRefUnsafeMakeContext, fiberRefUnsafeMakeRuntimeFlags, forEachSequentialDiscard, exitSucceed, matchCauseEffect, suspend, fiberRefLocallyWith, currentInterruptedCause, deferredUnsafeMake, deferredAwait, async, currentSchedulingPriority, whileLoop, currentUnhandledErrorLogLevel, currentLogLevel, currentLogSpan, currentLogAnnotations, exitFailCause, exitUnit, currentContext, blocked, catchAllCause, runRequestBlock, RevertFlags, yieldNow as yieldNow$1, isEffectError, withRuntimeFlags, matchEffect, if_, zipWith, currentRequestBatching, transplant, step, deferredUnsafeDone, deferredFail, exitCollectAll, exitIsFailure, exitInterrupt, exitAsUnit, interruptAsFiber, flatMapStep } from './core.esm.js';
|
|
19
20
|
import { makeSpan, currentTimeNanosTracing, mapErrorCause } from './core-effect.esm.js';
|
|
20
21
|
import { currentServices } from './defaultServices.esm.js';
|
|
21
22
|
import { consoleTag } from './defaultServices/console.esm.js';
|
|
@@ -24,7 +25,7 @@ import { _await, FiberTypeId, fiberVariance, join, RuntimeFiberTypeId, currentFi
|
|
|
24
25
|
import { resume, stateful, interruptSignal, OP_STATEFUL, OP_RESUME, OP_INTERRUPT_SIGNAL, OP_YIELD_NOW, yieldNow } from './fiberMessage.esm.js';
|
|
25
26
|
import { get, joinAs, delete_, updatedAs, forkAs, getOrDefault as getOrDefault$1 } from './fiberRefs.esm.js';
|
|
26
27
|
import { globalScope, unsafeMake } from './fiberScope.esm.js';
|
|
27
|
-
import { makeLogger, stringLogger, logfmtLogger } from './logger.esm.js';
|
|
28
|
+
import { makeLogger, stringLogger, logfmtLogger, serializeUnknown } from './logger.esm.js';
|
|
28
29
|
import { counter, tagged, histogram } from './metric.esm.js';
|
|
29
30
|
import { exponential } from './metric/boundaries.esm.js';
|
|
30
31
|
import { make as make$3 } from './metric/label.esm.js';
|
|
@@ -868,7 +869,7 @@ class FiberRuntime {
|
|
|
868
869
|
}
|
|
869
870
|
}
|
|
870
871
|
[OP_TAG](op) {
|
|
871
|
-
return map$
|
|
872
|
+
return map$2(fiberRefGet(currentContext), context => {
|
|
872
873
|
try {
|
|
873
874
|
return unsafeGet(context, op);
|
|
874
875
|
} catch (e) {
|
|
@@ -1179,7 +1180,7 @@ const tracerLogger = /*#__PURE__*/makeLogger(({
|
|
|
1179
1180
|
if (span._tag === "None" || span.value._tag === "ExternalSpan" || clockService._tag === "None") {
|
|
1180
1181
|
return;
|
|
1181
1182
|
}
|
|
1182
|
-
const attributes = Object.fromEntries(annotations);
|
|
1183
|
+
const attributes = Object.fromEntries(map$1(annotations, value => serializeUnknown(value)));
|
|
1183
1184
|
attributes["effect.fiberId"] = threadName(fiberId);
|
|
1184
1185
|
attributes["effect.logLevel"] = logLevel.label;
|
|
1185
1186
|
if (cause !== null && cause._tag !== "Empty") {
|
|
@@ -1247,8 +1248,8 @@ const existsLoop = (iterator, index, f) => {
|
|
|
1247
1248
|
|
|
1248
1249
|
/* @internal */
|
|
1249
1250
|
const filter = /*#__PURE__*/dual(args => isIterable(args[0]), (elements, f, options) => {
|
|
1250
|
-
const predicate = options?.negate ? (a, i) => map$
|
|
1251
|
-
return matchSimple(options, () => suspend(() => fromIterable(elements).reduceRight((effect, a, i) => zipWith(effect, suspend(() => predicate(a, i)), (list, b) => b ? [a, ...list] : list), sync(() => new Array()))), () => map$
|
|
1251
|
+
const predicate = options?.negate ? (a, i) => map$2(f(a, i), not) : f;
|
|
1252
|
+
return matchSimple(options, () => suspend(() => fromIterable(elements).reduceRight((effect, a, i) => zipWith(effect, suspend(() => predicate(a, i)), (list, b) => b ? [a, ...list] : list), sync(() => new Array()))), () => map$2(forEachOptions(elements, (a, i) => map$2(predicate(a, i), b => b ? some(a) : none()), options), compact));
|
|
1252
1253
|
});
|
|
1253
1254
|
|
|
1254
1255
|
// === all
|
|
@@ -1311,7 +1312,7 @@ const allEither = (effects, reconcile, options) => {
|
|
|
1311
1312
|
discard: true
|
|
1312
1313
|
});
|
|
1313
1314
|
}
|
|
1314
|
-
return map$
|
|
1315
|
+
return map$2(forEachOptions(eitherEffects, identity, {
|
|
1315
1316
|
concurrency: options?.concurrency,
|
|
1316
1317
|
batching: options?.batching
|
|
1317
1318
|
}), eithers => reconcile._tag === "Some" ? reconcile.value(eithers) : eithers);
|
|
@@ -1325,14 +1326,14 @@ const all = (arg, options) => {
|
|
|
1325
1326
|
} else if (options?.mode === "either") {
|
|
1326
1327
|
return allEither(effects, reconcile, options);
|
|
1327
1328
|
}
|
|
1328
|
-
return reconcile._tag === "Some" ? map$
|
|
1329
|
+
return reconcile._tag === "Some" ? map$2(forEachOptions(effects, identity, options), reconcile.value) : forEachOptions(effects, identity, options);
|
|
1329
1330
|
};
|
|
1330
1331
|
|
|
1331
1332
|
/* @internal */
|
|
1332
1333
|
const allWith = options => arg => all(arg, options);
|
|
1333
1334
|
|
|
1334
1335
|
/* @internal */
|
|
1335
|
-
const allSuccesses = (elements, options) => map$
|
|
1336
|
+
const allSuccesses = (elements, options) => map$2(all(fromIterable(elements).map(exit), options), filterMap(exit => exitIsSuccess(exit) ? some(exit.i0) : none()));
|
|
1336
1337
|
|
|
1337
1338
|
/* @internal */
|
|
1338
1339
|
const replicate = /*#__PURE__*/dual(2, (self, n) => Array.from({
|
|
@@ -1440,7 +1441,7 @@ const forEachParUnboundedDiscard = (self, f, batching) => suspend(() => {
|
|
|
1440
1441
|
return unit;
|
|
1441
1442
|
}
|
|
1442
1443
|
}
|
|
1443
|
-
}))), forkDaemon, map$
|
|
1444
|
+
}))), forkDaemon, map$2(fiber => {
|
|
1444
1445
|
fiber.addObserver(() => {
|
|
1445
1446
|
joinOrder.push(fiber);
|
|
1446
1447
|
});
|
|
@@ -1466,7 +1467,7 @@ const forEachParUnboundedDiscard = (self, f, batching) => suspend(() => {
|
|
|
1466
1467
|
const forEachParN = (self, n, f, batching) => suspend(() => {
|
|
1467
1468
|
const as = fromIterable(self);
|
|
1468
1469
|
const array = new Array(as.length);
|
|
1469
|
-
const fn = (a, i) => map$
|
|
1470
|
+
const fn = (a, i) => map$2(f(a, i), b => array[i] = b);
|
|
1470
1471
|
return zipRight(forEachParNDiscard(as, n, fn, batching), succeed(array));
|
|
1471
1472
|
});
|
|
1472
1473
|
|
|
@@ -1560,7 +1561,7 @@ const forkWithScopeOverride = (self, scopeOverride) => withFiberRuntime((parentF
|
|
|
1560
1561
|
const mergeAll = /*#__PURE__*/dual(args => isIterable(args[0]), (elements, zero, f, options) => matchSimple(options, () => fromIterable(elements).reduce((acc, a, i) => zipWith(acc, a, (acc, a) => f(acc, a, i)), succeed(zero)), () => flatMap$1(make$1(zero), acc => flatMap$1(forEachOptions(elements, (effect, i) => flatMap$1(effect, a => update(acc, b => f(b, a, i))), options), () => get$2(acc)))));
|
|
1561
1562
|
|
|
1562
1563
|
/* @internal */
|
|
1563
|
-
const partition = /*#__PURE__*/dual(args => isIterable(args[0]), (elements, f, options) => pipe(forEachOptions(elements, (a, i) => either(f(a, i)), options), map$
|
|
1564
|
+
const partition = /*#__PURE__*/dual(args => isIterable(args[0]), (elements, f, options) => pipe(forEachOptions(elements, (a, i) => either(f(a, i)), options), map$2(chunk => partitionMap(chunk, identity))));
|
|
1564
1565
|
|
|
1565
1566
|
/* @internal */
|
|
1566
1567
|
const validateAll = /*#__PURE__*/dual(args => isIterable(args[0]), (elements, f, options) => flatMap$1(partition(elements, f, {
|
|
@@ -1577,7 +1578,7 @@ const raceAll = all => {
|
|
|
1577
1578
|
const self = headNonEmpty(list);
|
|
1578
1579
|
const effects = tailNonEmpty(list);
|
|
1579
1580
|
const inheritAll$1 = res => pipe(inheritAll(res[1]), as(res[0]));
|
|
1580
|
-
return pipe(deferredMake(), flatMap$1(done => pipe(make$1(effects.length), flatMap$1(fails => uninterruptibleMask(restore => pipe(fork(interruptible(self)), flatMap$1(head => pipe(effects, forEachSequential(effect => fork(interruptible(effect))), map$
|
|
1581
|
+
return pipe(deferredMake(), flatMap$1(done => pipe(make$1(effects.length), flatMap$1(fails => uninterruptibleMask(restore => pipe(fork(interruptible(self)), flatMap$1(head => pipe(effects, forEachSequential(effect => fork(interruptible(effect))), map$2(unsafeFromArray), map$2(tail => pipe(tail, prepend(head))), tap(fibers => pipe(fibers, reduce(unit, (effect, fiber) => pipe(effect, zipRight(pipe(_await(fiber), flatMap$1(raceAllArbiter(fibers, fiber, done, fails)), fork, asUnit)))))), flatMap$1(fibers => pipe(restore(pipe(_await$1(done), flatMap$1(inheritAll$1))), onInterrupt(() => pipe(fibers, reduce(unit, (effect, fiber) => pipe(effect, zipLeft(interruptFiber(fiber))))))))))))))));
|
|
1581
1582
|
};
|
|
1582
1583
|
|
|
1583
1584
|
/* @internal */
|
|
@@ -1598,7 +1599,7 @@ const reduceEffect = /*#__PURE__*/dual(args => isIterable(args[0]), (elements, z
|
|
|
1598
1599
|
return some(f(acc.value, elem, i));
|
|
1599
1600
|
}
|
|
1600
1601
|
}
|
|
1601
|
-
}, options), map$
|
|
1602
|
+
}, options), map$2(option => {
|
|
1602
1603
|
switch (option._tag) {
|
|
1603
1604
|
case "None":
|
|
1604
1605
|
{
|
|
@@ -1703,7 +1704,7 @@ const withClockScoped = value => fiberRefLocallyScopedWith(currentServices, add(
|
|
|
1703
1704
|
const withConfigProviderScoped = value => fiberRefLocallyScopedWith(currentServices, add(configProviderTag, value));
|
|
1704
1705
|
|
|
1705
1706
|
/* @internal */
|
|
1706
|
-
const withEarlyRelease = self => scopeWith(parent => flatMap$1(scopeFork(parent, sequential$2), child => pipe(self, scopeExtend(child), map$
|
|
1707
|
+
const withEarlyRelease = self => scopeWith(parent => flatMap$1(scopeFork(parent, sequential$2), child => pipe(self, scopeExtend(child), map$2(value => [fiberIdWith(fiberId => scopeClose(child, exitInterrupt(fiberId))), value]))));
|
|
1707
1708
|
|
|
1708
1709
|
/** @internal */
|
|
1709
1710
|
const zipOptions = /*#__PURE__*/dual(args => isEffect(args[1]), (self, that, options) => zipWithOptions(self, that, (a, b) => [a, b], options));
|
|
@@ -1715,7 +1716,7 @@ const zipLeftOptions = /*#__PURE__*/dual(args => isEffect(args[1]), (self, that,
|
|
|
1715
1716
|
const zipRightOptions = /*#__PURE__*/dual(args => isEffect(args[1]), (self, that, options) => zipWithOptions(self, that, (_, b) => b, options));
|
|
1716
1717
|
|
|
1717
1718
|
/** @internal */
|
|
1718
|
-
const zipWithOptions = /*#__PURE__*/dual(args => isEffect(args[1]), (self, that, f, options) => map$
|
|
1719
|
+
const zipWithOptions = /*#__PURE__*/dual(args => isEffect(args[1]), (self, that, f, options) => map$2(all([self, that], {
|
|
1719
1720
|
concurrency: options?.concurrent ? 2 : 1,
|
|
1720
1721
|
batching: options?.batching
|
|
1721
1722
|
}), ([a, a2]) => f(a, a2)));
|
|
@@ -1770,7 +1771,7 @@ const scopeTag = /*#__PURE__*/Tag(ScopeTypeId);
|
|
|
1770
1771
|
const scope = scopeTag;
|
|
1771
1772
|
|
|
1772
1773
|
/* @internal */
|
|
1773
|
-
const scopeMake = (strategy = sequential$2) => map$
|
|
1774
|
+
const scopeMake = (strategy = sequential$2) => map$2(releaseMapMake, rm => ({
|
|
1774
1775
|
[ScopeTypeId]: ScopeTypeId,
|
|
1775
1776
|
[CloseableScopeTypeId]: CloseableScopeTypeId,
|
|
1776
1777
|
strategy,
|
|
@@ -1834,9 +1835,9 @@ const fiberAll = fibers => ({
|
|
|
1834
1835
|
[FiberTypeId]: fiberVariance,
|
|
1835
1836
|
id: () => fromIterable(fibers).reduce((id, fiber) => combine(id, fiber.id()), none$2),
|
|
1836
1837
|
await: () => exit(forEachParUnbounded(fibers, fiber => flatten(fiber.await()), false)),
|
|
1837
|
-
children: () => map$
|
|
1838
|
+
children: () => map$2(forEachParUnbounded(fibers, fiber => fiber.children(), false), flatten$1),
|
|
1838
1839
|
inheritAll: () => forEachSequentialDiscard(fibers, fiber => fiber.inheritAll()),
|
|
1839
|
-
poll: () => map$
|
|
1840
|
+
poll: () => map$2(forEachSequential(fibers, fiber => fiber.poll()), reduceRight(some(exitSucceed(new Array())), (optionB, optionA) => {
|
|
1840
1841
|
switch (optionA._tag) {
|
|
1841
1842
|
case "None":
|
|
1842
1843
|
{
|
|
@@ -1994,15 +1995,18 @@ const interruptWhenPossible = /*#__PURE__*/dual(2, (self, all) => fiberRefGetWit
|
|
|
1994
1995
|
// circular Tracer
|
|
1995
1996
|
|
|
1996
1997
|
/** @internal */
|
|
1997
|
-
const
|
|
1998
|
+
const makeSpanScoped = (name, options) => acquireRelease(makeSpan(name, options), (span, exit) => flatMap$1(currentTimeNanosTracing, endTime => sync(() => span.end(endTime, exit))));
|
|
1998
1999
|
|
|
1999
2000
|
/* @internal */
|
|
2000
|
-
const
|
|
2001
|
+
const setSpan = (name, options) => tap(makeSpanScoped(name, options), span => setParentSpan(span));
|
|
2001
2002
|
|
|
2002
2003
|
/* @internal */
|
|
2003
2004
|
const withTracerScoped = value => fiberRefLocallyScopedWith(currentServices, add(tracerTag, value));
|
|
2004
2005
|
|
|
2005
2006
|
/* @internal */
|
|
2006
|
-
const
|
|
2007
|
+
const setParentSpan = span => fiberRefLocallyScopedWith(currentTracerSpan, prepend$1(span));
|
|
2007
2008
|
|
|
2008
|
-
|
|
2009
|
+
/** @internal */
|
|
2010
|
+
const withSpanScoped = /*#__PURE__*/dual(args => typeof args[0] !== "string", (self, name, options) => flatMap$1(makeSpanScoped(name, options), span => fiberRefLocallyWith(self, currentTracerSpan, prepend$1(span))));
|
|
2011
|
+
|
|
2012
|
+
export { FiberRuntime, acquireRelease, acquireReleaseInterruptible, addFinalizer, all, allSuccesses, allWith, currentLoggers, currentMinimumLogLevel, currentRuntimeFlags, currentSupervisor, daemonChildren, defaultLogger, disconnect, ensuring, exists, fiberActive, fiberAll, fiberAwaitAll, fiberFailures, fiberInterruptFork, fiberJoinAll, fiberLifetimes, fiberRefLocallyScoped, fiberRefLocallyScopedWith, fiberRefMake, fiberRefMakeContext, fiberRefMakeRuntimeFlags, fiberRefMakeWith, fiberRefUnsafeMakeSupervisor, fiberScoped, fiberStarted, fiberSuccesses, filter, finalizersMask, forEachOptions, forEachParN, forEachParNDiscard, forEachParUnbounded, forEachParUnboundedDiscard, fork, forkDaemon, forkWithErrorHandler, getConsole, interruptWhenPossible, invokeWithInterrupt, labelMetricsScoped, labelMetricsScopedSet, logFmtLogger, makeSpanScoped, mergeAll, parallelFinalizers, parallelNFinalizers, partition, race, raceAll, raceFibersWith, raceWith, reduceEffect, releaseMapReleaseAll, replicate, replicateEffect, runtimeFiberVariance, scope, scopeExtend, scopeMake, scopeTag, scopeUse, scopeWith, scopedEffect, sequentialFinalizers, setParentSpan, setSpan, tagMetricsScoped, tracerLogger, unsafeFork, unsafeMakeChildFiber, using, validate, validateAll, validateFirst, validateWith, withClockScoped, withConfigProviderScoped, withEarlyRelease, withRuntimeFlagsScoped, withSpanScoped, withTracerScoped, zipLeftOptions, zipOptions, zipRightOptions, zipWithOptions };
|
package/internal/groupBy.esm.js
CHANGED
|
@@ -11,7 +11,7 @@ import { make as make$2, update, get } from '../Ref/dist/effect-Ref.esm.js';
|
|
|
11
11
|
import { drain } from './channel.esm.js';
|
|
12
12
|
import { runScoped } from './channel/channelExecutor.esm.js';
|
|
13
13
|
import { pipeTo, readWithCause, flatMap as flatMap$2, fromEffect as fromEffect$1 } from './core-stream.esm.js';
|
|
14
|
-
import { flatMap, flattenTake, fromQueue, filterEffect, map, zipWithIndex, unwrapScoped, mapEffectSequential, distributedWithDynamicCallback, flattenExitOption, matchConcurrency, fromEffect, mapEffectPar, toChannel } from './stream.esm.js';
|
|
14
|
+
import { flatMap, flattenTake, fromQueue, filterEffect, map, zipWithIndex, unwrapScoped, mapEffectSequential, distributedWithDynamicCallback, flattenExitOption, isStream, matchConcurrency, fromEffect, mapEffectPar, toChannel } from './stream.esm.js';
|
|
15
15
|
import { TakeImpl, of as of$1, chunk, failCause, end } from './take.esm.js';
|
|
16
16
|
|
|
17
17
|
/** @internal */
|
|
@@ -29,7 +29,10 @@ const groupByVariance = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
/** @internal */
|
|
32
|
-
const
|
|
32
|
+
const isGroupBy = u => typeof u === "object" && u != null && GroupByTypeId in u;
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
const evaluate = /*#__PURE__*/dual(args => isGroupBy(args[0]), (self, f, options) => flatMap(self.grouped, ([key, queue]) => f(key, flattenTake(fromQueue(queue, {
|
|
33
36
|
shutdown: true
|
|
34
37
|
}))), {
|
|
35
38
|
concurrency: "unbounded",
|
|
@@ -66,7 +69,7 @@ const make = grouped => ({
|
|
|
66
69
|
// Circular with Stream
|
|
67
70
|
|
|
68
71
|
/** @internal */
|
|
69
|
-
const groupBy = /*#__PURE__*/dual(args =>
|
|
72
|
+
const groupBy = /*#__PURE__*/dual(args => isStream(args[0]), (self, f, options) => make(unwrapScoped(gen(function* ($) {
|
|
70
73
|
const decider = yield* $(make$1());
|
|
71
74
|
const output = yield* $(acquireRelease(bounded(options?.bufferSize ?? 16), queue => shutdown(queue)));
|
|
72
75
|
const ref = yield* $(make$2(new Map()));
|
|
@@ -85,7 +88,7 @@ const mapEffectOptions = /*#__PURE__*/dual(args => typeof args[0] !== "function"
|
|
|
85
88
|
if (options?.key) {
|
|
86
89
|
return evaluate(groupByKey(self, options.key, {
|
|
87
90
|
bufferSize: options.bufferSize
|
|
88
|
-
}), (_, s) =>
|
|
91
|
+
}), (_, s) => mapEffectSequential(s, f));
|
|
89
92
|
}
|
|
90
93
|
return matchConcurrency(options?.concurrency, () => mapEffectSequential(self, f), n => options?.unordered ? flatMap(self, a => fromEffect(f(a)), {
|
|
91
94
|
concurrency: n
|
|
@@ -205,4 +208,4 @@ const groupByIterable = /*#__PURE__*/dual(2, (iterable, f) => {
|
|
|
205
208
|
return unsafeFromArray(builder.map(tuple => [tuple[0], unsafeFromArray(tuple[1])]));
|
|
206
209
|
});
|
|
207
210
|
|
|
208
|
-
export { GroupByTypeId, bindEffect, evaluate, filter, first, groupBy, groupByIterable, groupByKey, make, mapEffectOptions };
|
|
211
|
+
export { GroupByTypeId, bindEffect, evaluate, filter, first, groupBy, groupByIterable, groupByKey, isGroupBy, make, mapEffectOptions };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { dual } from '../../Function/dist/effect-Function.esm.js';
|
|
2
2
|
import { add, remove } from '../../HashSet/dist/effect-HashSet.esm.js';
|
|
3
|
-
import { fiberRefLocally, map } from '../core.esm.js';
|
|
4
|
-
import { fiberRefLocallyScoped, currentMinimumLogLevel, fiberRefLocallyScopedWith, currentLoggers, currentSupervisor, withRuntimeFlagsScoped, withConfigProviderScoped,
|
|
5
|
-
import { scopedDiscard, flatMap } from '../layer.esm.js';
|
|
3
|
+
import { fiberRefLocally, map, tap, zipRight } from '../core.esm.js';
|
|
4
|
+
import { fiberRefLocallyScoped, currentMinimumLogLevel, fiberRefLocallyScopedWith, currentLoggers, currentSupervisor, withRuntimeFlagsScoped, withConfigProviderScoped, setParentSpan as setParentSpan$1, makeSpanScoped, addFinalizer, setSpan as setSpan$1, withTracerScoped } from '../fiberRuntime.esm.js';
|
|
5
|
+
import { scopedDiscard, unwrapEffect, unwrapScoped, flatMap } from '../layer.esm.js';
|
|
6
6
|
import { CooperativeYielding, Interruption, OpSupervision, RuntimeMetrics, WindDown } from '../runtimeFlags.esm.js';
|
|
7
7
|
import { enable, disable } from '../runtimeFlagsPatch.esm.js';
|
|
8
8
|
import { Zip } from '../supervisor.esm.js';
|
|
9
|
-
import { unwrapEffect, unwrapScoped } from '../../Layer/dist/effect-Layer.esm.js';
|
|
10
9
|
|
|
11
10
|
// circular with Logger
|
|
12
11
|
/** @internal */
|
|
@@ -73,10 +72,10 @@ const disableWindDown = /*#__PURE__*/scopedDiscard( /*#__PURE__*/withRuntimeFlag
|
|
|
73
72
|
const setConfigProvider = configProvider => scopedDiscard(withConfigProviderScoped(configProvider));
|
|
74
73
|
|
|
75
74
|
/** @internal */
|
|
76
|
-
const setParentSpan = span => scopedDiscard(
|
|
75
|
+
const setParentSpan = span => scopedDiscard(setParentSpan$1(span));
|
|
77
76
|
|
|
78
77
|
/** @internal */
|
|
79
|
-
const setSpan = (name, options) => scopedDiscard(
|
|
78
|
+
const setSpan = (name, options) => scopedDiscard(options?.onEnd ? tap(makeSpanScoped(name, options), span => zipRight(addFinalizer(exit => options.onEnd(span, exit)), setParentSpan$1(span))) : setSpan$1(name, options));
|
|
80
79
|
|
|
81
80
|
/** @internal */
|
|
82
81
|
const setTracer = tracer => scopedDiscard(withTracerScoped(tracer));
|
package/internal/layer.esm.js
CHANGED
|
@@ -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,
|
|
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,
|
|
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(
|
|
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 };
|
package/internal/logger.esm.js
CHANGED
|
@@ -124,7 +124,7 @@ const stringLogger = /*#__PURE__*/makeLogger(({
|
|
|
124
124
|
}
|
|
125
125
|
output = output + filterKeyName(key);
|
|
126
126
|
output = output + "=";
|
|
127
|
-
output = appendQuoted(
|
|
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(
|
|
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 };
|