effect 2.0.0-next.48 → 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/Cache/dist/effect-Cache.cjs.dev.js +17 -17
- package/Cache/dist/effect-Cache.cjs.prod.js +17 -17
- package/Cause/dist/effect-Cause.cjs.dev.js +2 -2
- package/Cause/dist/effect-Cause.cjs.prod.js +2 -2
- package/Channel/dist/effect-Channel.cjs.dev.js +38 -29
- package/Channel/dist/effect-Channel.cjs.mjs +1 -0
- package/Channel/dist/effect-Channel.cjs.prod.js +38 -29
- package/Channel/dist/effect-Channel.esm.js +10 -2
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +24 -24
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +24 -24
- package/Chunk/dist/effect-Chunk.cjs.dev.js +10 -1
- package/Chunk/dist/effect-Chunk.cjs.mjs +1 -0
- package/Chunk/dist/effect-Chunk.cjs.prod.js +10 -1
- package/Chunk/dist/effect-Chunk.esm.js +10 -2
- package/Clock/dist/effect-Clock.cjs.dev.js +7 -7
- package/Clock/dist/effect-Clock.cjs.prod.js +7 -7
- package/Config/dist/effect-Config.cjs.dev.js +4 -4
- package/Config/dist/effect-Config.cjs.prod.js +4 -4
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +6 -6
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +6 -6
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +1 -1
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +1 -1
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +1 -1
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +1 -1
- package/Console/dist/effect-Console.cjs.dev.js +21 -21
- package/Console/dist/effect-Console.cjs.prod.js +21 -21
- package/Data/dist/effect-Data.cjs.dev.js +23 -23
- package/Data/dist/effect-Data.cjs.prod.js +23 -23
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +7 -7
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +7 -7
- package/Deferred/dist/effect-Deferred.cjs.dev.js +2 -2
- package/Deferred/dist/effect-Deferred.cjs.prod.js +2 -2
- package/Effect/dist/effect-Effect.cjs.dev.js +23 -23
- package/Effect/dist/effect-Effect.cjs.prod.js +23 -23
- package/Exit/dist/effect-Exit.cjs.dev.js +2 -2
- package/Exit/dist/effect-Exit.cjs.prod.js +2 -2
- package/Fiber/dist/effect-Fiber.cjs.dev.js +18 -18
- package/Fiber/dist/effect-Fiber.cjs.prod.js +18 -18
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +18 -18
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +18 -18
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +3 -3
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +3 -3
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +4 -4
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +4 -4
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +30 -30
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +30 -30
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +18 -18
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +18 -18
- package/Layer/dist/effect-Layer.cjs.dev.js +24 -24
- package/Layer/dist/effect-Layer.cjs.prod.js +24 -24
- package/List/dist/effect-List.cjs.dev.js +7 -0
- package/List/dist/effect-List.cjs.mjs +1 -0
- package/List/dist/effect-List.cjs.prod.js +7 -0
- package/List/dist/effect-List.esm.js +7 -1
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +2 -2
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +2 -2
- package/Logger/dist/effect-Logger.cjs.dev.js +22 -22
- package/Logger/dist/effect-Logger.cjs.prod.js +22 -22
- package/Metric/dist/effect-Metric.cjs.dev.js +104 -22
- package/Metric/dist/effect-Metric.cjs.prod.js +104 -22
- package/Metric/dist/effect-Metric.esm.js +88 -6
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +1 -1
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +1 -1
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +1 -1
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +1 -1
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +18 -18
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +18 -18
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +2 -2
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +2 -2
- package/Pool/dist/effect-Pool.cjs.dev.js +18 -18
- package/Pool/dist/effect-Pool.cjs.prod.js +18 -18
- package/PubSub/dist/effect-PubSub.cjs.dev.js +17 -17
- package/PubSub/dist/effect-PubSub.cjs.prod.js +17 -17
- package/Queue/dist/effect-Queue.cjs.dev.js +17 -17
- package/Queue/dist/effect-Queue.cjs.prod.js +17 -17
- package/Random/dist/effect-Random.cjs.dev.js +7 -7
- package/Random/dist/effect-Random.cjs.prod.js +7 -7
- package/Ref/dist/effect-Ref.cjs.dev.js +3 -3
- package/Ref/dist/effect-Ref.cjs.prod.js +3 -3
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +22 -22
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +22 -22
- package/Request/dist/effect-Request.cjs.dev.js +17 -17
- package/Request/dist/effect-Request.cjs.prod.js +17 -17
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +24 -24
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +24 -24
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +24 -24
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +24 -24
- package/Resource/dist/effect-Resource.cjs.dev.js +20 -20
- package/Resource/dist/effect-Resource.cjs.prod.js +20 -20
- package/Runtime/dist/effect-Runtime.cjs.dev.js +19 -19
- package/Runtime/dist/effect-Runtime.cjs.prod.js +19 -19
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +22 -22
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +22 -22
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +1 -1
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +1 -1
- package/STM/dist/effect-STM.cjs.dev.js +32 -32
- package/STM/dist/effect-STM.cjs.prod.js +32 -32
- package/Schedule/dist/effect-Schedule.cjs.dev.js +12 -12
- package/Schedule/dist/effect-Schedule.cjs.prod.js +12 -12
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +2 -2
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +2 -2
- package/Scope/dist/effect-Scope.cjs.dev.js +16 -16
- package/Scope/dist/effect-Scope.cjs.prod.js +16 -16
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +23 -23
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +23 -23
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +20 -20
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +20 -20
- package/Sink/dist/effect-Sink.cjs.dev.js +27 -27
- package/Sink/dist/effect-Sink.cjs.prod.js +27 -27
- package/Stream/dist/effect-Stream.cjs.dev.js +30 -30
- package/Stream/dist/effect-Stream.cjs.prod.js +30 -30
- package/Streamable/dist/effect-Streamable.cjs.dev.js +30 -30
- package/Streamable/dist/effect-Streamable.cjs.prod.js +30 -30
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +29 -29
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +29 -29
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +22 -22
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +22 -22
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +19 -19
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +19 -19
- package/TArray/dist/effect-TArray.cjs.dev.js +34 -34
- package/TArray/dist/effect-TArray.cjs.prod.js +34 -34
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +33 -33
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +33 -33
- package/TMap/dist/effect-TMap.cjs.dev.js +35 -35
- package/TMap/dist/effect-TMap.cjs.prod.js +35 -35
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +32 -32
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +32 -32
- package/TPubSub/dist/effect-TPubSub.cjs.dev.js +34 -34
- package/TPubSub/dist/effect-TPubSub.cjs.prod.js +34 -34
- package/TQueue/dist/effect-TQueue.cjs.dev.js +34 -34
- package/TQueue/dist/effect-TQueue.cjs.prod.js +34 -34
- package/TRandom/dist/effect-TRandom.cjs.dev.js +34 -34
- package/TRandom/dist/effect-TRandom.cjs.prod.js +34 -34
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +32 -32
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +32 -32
- package/TRef/dist/effect-TRef.cjs.dev.js +34 -34
- package/TRef/dist/effect-TRef.cjs.mjs +0 -1
- package/TRef/dist/effect-TRef.cjs.prod.js +34 -34
- package/TRef/dist/effect-TRef.esm.js +3 -2
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +33 -33
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +33 -33
- package/TSet/dist/effect-TSet.cjs.dev.js +35 -35
- package/TSet/dist/effect-TSet.cjs.prod.js +35 -35
- package/Take/dist/effect-Take.cjs.dev.js +24 -24
- package/Take/dist/effect-Take.cjs.prod.js +24 -24
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +12 -12
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +12 -12
- package/TestClock/dist/effect-TestClock.cjs.dev.js +21 -21
- package/TestClock/dist/effect-TestClock.cjs.prod.js +21 -21
- package/TestContext/dist/effect-TestContext.cjs.dev.js +23 -23
- package/TestContext/dist/effect-TestContext.cjs.prod.js +23 -23
- package/TestLive/dist/effect-TestLive.cjs.dev.js +7 -7
- package/TestLive/dist/effect-TestLive.cjs.prod.js +7 -7
- package/TestServices/dist/effect-TestServices.cjs.dev.js +23 -23
- package/TestServices/dist/effect-TestServices.cjs.prod.js +23 -23
- package/TestSized/dist/effect-TestSized.cjs.dev.js +2 -2
- package/TestSized/dist/effect-TestSized.cjs.prod.js +2 -2
- package/Tracer/dist/effect-Tracer.cjs.dev.js +7 -7
- package/Tracer/dist/effect-Tracer.cjs.prod.js +7 -7
- package/dist/{Ref-6608e3b6.cjs.prod.js → Ref-23b67ad9.cjs.prod.js} +1 -1
- package/dist/{Ref-548003d1.cjs.dev.js → Ref-c75b5362.cjs.dev.js} +1 -1
- package/dist/{cache-d7096ab5.cjs.prod.js → cache-7b144c1f.cjs.prod.js} +3 -3
- package/dist/{cache-7953c9ae.cjs.dev.js → cache-e3d6cc01.cjs.dev.js} +3 -3
- package/dist/{circular-b6cc8a1d.cjs.prod.js → circular-105d525c.cjs.prod.js} +4 -4
- package/dist/{circular-894f44de.cjs.prod.js → circular-3761aff7.cjs.prod.js} +6 -6
- package/dist/{circular-8568ddf2.cjs.dev.js → circular-8baf0205.cjs.dev.js} +6 -6
- package/dist/{circular-171d6971.cjs.dev.js → circular-cbfc1699.cjs.dev.js} +4 -4
- package/dist/{config-615bcaef.cjs.prod.js → config-6a5f97fe.cjs.prod.js} +2 -2
- package/dist/{config-ea74e7d0.cjs.dev.js → config-887520b4.cjs.dev.js} +2 -2
- package/dist/{configProvider-3877a6ec.cjs.prod.js → configProvider-098f7113.cjs.prod.js} +3 -3
- package/dist/{configProvider-089a1159.cjs.dev.js → configProvider-8567470d.cjs.dev.js} +3 -3
- package/dist/{core-365f89c2.cjs.dev.js → core-6815193e.cjs.dev.js} +3 -2
- package/dist/{core-8ccae4e2.cjs.prod.js → core-8072a539.cjs.prod.js} +2 -2
- package/dist/{core-3908bc43.cjs.prod.js → core-84667e8d.cjs.prod.js} +3 -2
- package/dist/{core-3d37486a.cjs.dev.js → core-e6f9fdbe.cjs.dev.js} +2 -2
- package/dist/{core-effect-37a0d753.cjs.prod.js → core-effect-520abd3d.cjs.prod.js} +5 -5
- package/dist/{core-effect-c529ccac.cjs.dev.js → core-effect-5700daea.cjs.dev.js} +5 -5
- package/dist/{dataSource-d125d7af.cjs.dev.js → dataSource-0ca8ef42.cjs.dev.js} +2 -2
- package/dist/{dataSource-0e407d86.cjs.prod.js → dataSource-17adc342.cjs.prod.js} +2 -2
- package/dist/declarations/src/Channel.d.ts +7 -0
- 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 +5 -5
- package/dist/declarations/src/Data.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/List.d.ts +8 -0
- package/dist/declarations/src/List.d.ts.map +1 -1
- package/dist/declarations/src/Metric.d.ts +88 -6
- package/dist/declarations/src/Metric.d.ts.map +1 -1
- package/dist/declarations/src/TRef.d.ts.map +1 -1
- package/dist/{defaultServices-a933c201.cjs.dev.js → defaultServices-193b11dc.cjs.dev.js} +2 -2
- package/dist/{defaultServices-1c3db777.cjs.prod.js → defaultServices-4c3bf140.cjs.prod.js} +2 -2
- package/dist/{fiber-2858bd1f.cjs.prod.js → fiber-a1a5e429.cjs.prod.js} +2 -2
- package/dist/{fiber-13587a5a.cjs.dev.js → fiber-cbdeec72.cjs.dev.js} +2 -2
- package/dist/{fiberRefs-abe2a811.cjs.dev.js → fiberRefs-8d2401f9.cjs.dev.js} +1 -1
- package/dist/{fiberRefs-ea1edd57.cjs.prod.js → fiberRefs-f631451c.cjs.prod.js} +1 -1
- package/dist/{fiberRuntime-9fafeaab.cjs.prod.js → fiberRuntime-4691f31b.cjs.prod.js} +10 -10
- package/dist/{fiberRuntime-ebcb168f.cjs.dev.js → fiberRuntime-7cb6cd44.cjs.dev.js} +10 -10
- package/dist/{groupBy-050e6b17.cjs.dev.js → groupBy-239a6e6e.cjs.dev.js} +10 -7
- package/dist/{groupBy-93f35a1d.cjs.prod.js → groupBy-5174c302.cjs.prod.js} +10 -7
- package/dist/{layer-09807eda.cjs.dev.js → layer-961b15ae.cjs.dev.js} +8 -8
- package/dist/{layer-fc5b5ca7.cjs.prod.js → layer-d1c204db.cjs.prod.js} +8 -8
- package/dist/{patch-e72c6c2f.cjs.prod.js → patch-1771b466.cjs.prod.js} +1 -1
- package/dist/{patch-2f545954.cjs.dev.js → patch-32cc7202.cjs.dev.js} +1 -1
- package/dist/{pool-7c9cd8e9.cjs.dev.js → pool-3890e6ce.cjs.dev.js} +5 -5
- package/dist/{pool-9370f703.cjs.prod.js → pool-f178fcc7.cjs.prod.js} +5 -5
- package/dist/{query-6cd164ab.cjs.dev.js → query-39c40fa6.cjs.dev.js} +3 -3
- package/dist/{query-8147932f.cjs.prod.js → query-a6b58e39.cjs.prod.js} +3 -3
- package/dist/{queue-06ce789d.cjs.dev.js → queue-4c4bdc04.cjs.dev.js} +2 -2
- package/dist/{queue-6afe5f19.cjs.prod.js → queue-5342a8d5.cjs.prod.js} +2 -2
- package/dist/{registry-5c67df33.cjs.prod.js → registry-6fbdb4e3.cjs.prod.js} +1 -1
- package/dist/{registry-35e8eb48.cjs.dev.js → registry-ec8b84a2.cjs.dev.js} +1 -1
- package/dist/{runtime-d41d839b.cjs.prod.js → runtime-3295bc3c.cjs.prod.js} +4 -4
- package/dist/{runtime-fb1c1c19.cjs.dev.js → runtime-43b9e2bb.cjs.dev.js} +4 -4
- package/dist/{schedule-64057679.cjs.prod.js → schedule-6431754b.cjs.prod.js} +3 -3
- package/dist/{schedule-0e1db444.cjs.dev.js → schedule-a4be407d.cjs.dev.js} +3 -3
- package/dist/{scopedRef-7a6d42f7.cjs.prod.js → scopedRef-7c2bf3f3.cjs.prod.js} +6 -6
- package/dist/{scopedRef-2ea09a4f.cjs.dev.js → scopedRef-9032002a.cjs.dev.js} +6 -6
- package/dist/{singleProducerAsyncInput-97f74016.cjs.dev.js → singleProducerAsyncInput-82e5c80c.cjs.dev.js} +1 -1
- package/dist/{singleProducerAsyncInput-8b8ad112.cjs.prod.js → singleProducerAsyncInput-879852ad.cjs.prod.js} +1 -1
- package/dist/{sink-6d1a77bf.cjs.prod.js → sink-95371737.cjs.prod.js} +16 -18
- package/dist/{sink-ebf2fbdb.cjs.dev.js → sink-e4280f95.cjs.dev.js} +16 -18
- package/dist/{stm-dbec85f1.cjs.dev.js → stm-4bf1a928.cjs.dev.js} +3 -3
- package/dist/{stm-4a6de085.cjs.prod.js → stm-f792171c.cjs.prod.js} +3 -3
- package/dist/{stream-f7345889.cjs.prod.js → stream-254329d0.cjs.prod.js} +12 -11
- package/dist/{stream-478aa5a8.cjs.dev.js → stream-c498ce8a.cjs.dev.js} +12 -11
- package/dist/{synchronizedRef-432b4455.cjs.prod.js → synchronizedRef-5420532c.cjs.prod.js} +1 -1
- package/dist/{synchronizedRef-fa63e917.cjs.dev.js → synchronizedRef-cfe99d53.cjs.dev.js} +1 -1
- package/dist/{tArray-b30ccc3e.cjs.prod.js → tArray-7f227674.cjs.prod.js} +3 -3
- package/dist/{tArray-0c9045e7.cjs.dev.js → tArray-996f4aba.cjs.dev.js} +3 -3
- package/dist/{tMap-001c791c.cjs.prod.js → tMap-811797bf.cjs.prod.js} +4 -4
- package/dist/{tMap-0625df1d.cjs.dev.js → tMap-b9665a82.cjs.dev.js} +4 -4
- package/dist/{tQueue-cdbf9130.cjs.dev.js → tQueue-0c15312e.cjs.dev.js} +3 -3
- package/dist/{tQueue-6accdd70.cjs.prod.js → tQueue-8a6a0244.cjs.prod.js} +3 -3
- package/dist/{tRef-8b60d85b.cjs.prod.js → tRef-2892ee02.cjs.prod.js} +1 -1
- package/dist/{tRef-b5bae36d.cjs.dev.js → tRef-44d17d07.cjs.dev.js} +1 -1
- package/internal/cause.esm.js +2 -1
- package/internal/channel.esm.js +26 -28
- package/internal/core-stream.esm.js +1 -1
- package/internal/groupBy.esm.js +8 -5
- package/internal/sink.esm.js +11 -11
- package/internal/stream.esm.js +9 -9
- package/package.json +6 -5
- package/src/Channel.ts +10 -0
- package/src/Chunk.ts +12 -1
- package/src/Data.ts +15 -5
- package/src/HashMap.ts +30 -0
- package/src/List.ts +9 -0
- package/src/Metric.ts +88 -6
- package/src/TRef.ts +1 -1
- package/src/internal/cause.ts +1 -1
- package/src/internal/channel.ts +84 -91
- package/src/internal/groupBy.ts +7 -3
- package/src/internal/stream.ts +8 -5
- package/src/tsconfig.json +9 -1
- /package/dist/{RuntimeFlagsPatch-902b4680.cjs.prod.js → RuntimeFlagsPatch-35ed8dee.cjs.prod.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-cf423492.cjs.dev.js → RuntimeFlagsPatch-9cbc441d.cjs.dev.js} +0 -0
- /package/dist/{boundaries-bfd86b3e.cjs.prod.js → boundaries-26f0dc82.cjs.prod.js} +0 -0
- /package/dist/{boundaries-b5265184.cjs.dev.js → boundaries-6eea221f.cjs.dev.js} +0 -0
- /package/dist/{configSecret-e7bb51da.cjs.dev.js → configSecret-23cf1a3f.cjs.dev.js} +0 -0
- /package/dist/{configSecret-9b941a86.cjs.prod.js → configSecret-663cfb59.cjs.prod.js} +0 -0
- /package/dist/{hook-2c94278c.cjs.dev.js → hook-8e8bee6a.cjs.dev.js} +0 -0
- /package/dist/{hook-9af5cf52.cjs.prod.js → hook-c2815d51.cjs.prod.js} +0 -0
- /package/dist/{pathPatch-f3064fa9.cjs.prod.js → pathPatch-312bd492.cjs.prod.js} +0 -0
- /package/dist/{pathPatch-9fa78980.cjs.dev.js → pathPatch-45b09159.cjs.dev.js} +0 -0
- /package/dist/{take-15455ae3.cjs.prod.js → take-981a87eb.cjs.prod.js} +0 -0
- /package/dist/{take-1c250e7a.cjs.dev.js → take-bfd0a3ed.cjs.dev.js} +0 -0
|
@@ -18,15 +18,15 @@ var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js'
|
|
|
18
18
|
var Pipeable_dist_effectPipeable = require('../Pipeable/dist/effect-Pipeable.cjs.dev.js');
|
|
19
19
|
var PubSub_dist_effectPubSub = require('../PubSub/dist/effect-PubSub.cjs.dev.js');
|
|
20
20
|
var Queue_dist_effectQueue = require('../Queue/dist/effect-Queue.cjs.dev.js');
|
|
21
|
-
var Ref_dist_effectRef = require('./Ref-
|
|
21
|
+
var Ref_dist_effectRef = require('./Ref-c75b5362.cjs.dev.js');
|
|
22
22
|
var Runtime_dist_effectRuntime = require('../Runtime/dist/effect-Runtime.cjs.dev.js');
|
|
23
23
|
var Schedule_dist_effectSchedule = require('../Schedule/dist/effect-Schedule.cjs.dev.js');
|
|
24
24
|
var Scope_dist_effectScope = require('../Scope/dist/effect-Scope.cjs.dev.js');
|
|
25
25
|
var StreamHaltStrategy_dist_effectStreamHaltStrategy = require('./StreamHaltStrategy-9a61b88d.cjs.dev.js');
|
|
26
|
-
var sink = require('./sink-
|
|
26
|
+
var sink = require('./sink-e4280f95.cjs.dev.js');
|
|
27
27
|
var mergeStrategy = require('./mergeStrategy-81ea5b80.cjs.dev.js');
|
|
28
|
-
var singleProducerAsyncInput = require('./singleProducerAsyncInput-
|
|
29
|
-
var take$2 = require('./take-
|
|
28
|
+
var singleProducerAsyncInput = require('./singleProducerAsyncInput-82e5c80c.cjs.dev.js');
|
|
29
|
+
var take$2 = require('./take-bfd0a3ed.cjs.dev.js');
|
|
30
30
|
|
|
31
31
|
/** @internal */
|
|
32
32
|
class RingBuffer {
|
|
@@ -1249,10 +1249,7 @@ const flatMap = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof ar
|
|
|
1249
1249
|
if (options?.switch) {
|
|
1250
1250
|
return matchConcurrency(options?.concurrency, () => flatMapParSwitchBuffer(self, 1, bufferSize, f), n => flatMapParSwitchBuffer(self, n, bufferSize, f));
|
|
1251
1251
|
}
|
|
1252
|
-
return matchConcurrency(options?.concurrency, () => new StreamImpl(sink.concatMap(toChannel(self), as => Function_dist_effectFunction.pipe(as, Chunk_dist_effectChunk.map(a => toChannel(f(a))), Chunk_dist_effectChunk.reduce(sink.unit, (left, right) => Function_dist_effectFunction.pipe(left, sink.zipRight(right)))))),
|
|
1253
|
-
concurrency: n,
|
|
1254
|
-
bufferSize
|
|
1255
|
-
}))));
|
|
1252
|
+
return matchConcurrency(options?.concurrency, () => new StreamImpl(sink.concatMap(toChannel(self), as => Function_dist_effectFunction.pipe(as, Chunk_dist_effectChunk.map(a => toChannel(f(a))), Chunk_dist_effectChunk.reduce(sink.unit, (left, right) => Function_dist_effectFunction.pipe(left, sink.zipRight(right)))))), _ => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mergeMap(out => toChannel(f(out)), options))));
|
|
1256
1253
|
});
|
|
1257
1254
|
|
|
1258
1255
|
/** @internal */
|
|
@@ -1261,7 +1258,7 @@ const matchConcurrency = (concurrency, sequential, bounded) => {
|
|
|
1261
1258
|
case undefined:
|
|
1262
1259
|
return sequential();
|
|
1263
1260
|
case "unbounded":
|
|
1264
|
-
return bounded(Number.
|
|
1261
|
+
return bounded(Number.MAX_SAFE_INTEGER);
|
|
1265
1262
|
default:
|
|
1266
1263
|
return concurrency > 1 ? bounded(concurrency) : sequential();
|
|
1267
1264
|
}
|
|
@@ -1410,10 +1407,13 @@ const fromIteratorSucceed = (iterator, maxChunkSize = DefaultChunkSize) => {
|
|
|
1410
1407
|
}
|
|
1411
1408
|
builder = [];
|
|
1412
1409
|
let count = 0;
|
|
1413
|
-
while (
|
|
1410
|
+
while (next.done === false) {
|
|
1414
1411
|
builder.push(next.value);
|
|
1415
|
-
next = iterator.next();
|
|
1416
1412
|
count = count + 1;
|
|
1413
|
+
if (count >= maxChunkSize) {
|
|
1414
|
+
break;
|
|
1415
|
+
}
|
|
1416
|
+
next = iterator.next();
|
|
1417
1417
|
}
|
|
1418
1418
|
if (count > 0) {
|
|
1419
1419
|
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.unsafeFromArray(builder)), sink.flatMap(() => loop(iterator)));
|
|
@@ -3476,6 +3476,7 @@ exports.interruptWhen = interruptWhen;
|
|
|
3476
3476
|
exports.interruptWhenDeferred = interruptWhenDeferred;
|
|
3477
3477
|
exports.intersperse = intersperse;
|
|
3478
3478
|
exports.intersperseAffixes = intersperseAffixes;
|
|
3479
|
+
exports.isStream = isStream;
|
|
3479
3480
|
exports.iterate = iterate;
|
|
3480
3481
|
exports.let_ = let_;
|
|
3481
3482
|
exports.make = make;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
4
|
-
var core = require('./core-
|
|
4
|
+
var core = require('./core-84667e8d.cjs.prod.js');
|
|
5
5
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
4
|
-
var core = require('./core-
|
|
4
|
+
var core = require('./core-6815193e.cjs.dev.js');
|
|
5
5
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.prod.js');
|
|
4
4
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
5
|
-
var core = require('./core-
|
|
6
|
-
var stm = require('./stm-
|
|
7
|
-
var tRef = require('./tRef-
|
|
5
|
+
var core = require('./core-8072a539.cjs.prod.js');
|
|
6
|
+
var stm = require('./stm-f792171c.cjs.prod.js');
|
|
7
|
+
var tRef = require('./tRef-2892ee02.cjs.prod.js');
|
|
8
8
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
9
9
|
var Order_dist_effectOrder = require('../Order/dist/effect-Order.cjs.prod.js');
|
|
10
10
|
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.dev.js');
|
|
4
4
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
5
|
-
var core = require('./core-
|
|
6
|
-
var stm = require('./stm-
|
|
7
|
-
var tRef = require('./tRef-
|
|
5
|
+
var core = require('./core-e6f9fdbe.cjs.dev.js');
|
|
6
|
+
var stm = require('./stm-4bf1a928.cjs.dev.js');
|
|
7
|
+
var tRef = require('./tRef-44d17d07.cjs.dev.js');
|
|
8
8
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
9
9
|
var Order_dist_effectOrder = require('../Order/dist/effect-Order.cjs.dev.js');
|
|
10
10
|
|
|
@@ -5,10 +5,10 @@ var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.prod.js');
|
|
|
5
5
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
6
6
|
var Hash_dist_effectHash = require('../Hash/dist/effect-Hash.cjs.prod.js');
|
|
7
7
|
var HashMap_dist_effectHashMap = require('../HashMap/dist/effect-HashMap.cjs.prod.js');
|
|
8
|
-
var core = require('./core-
|
|
9
|
-
var stm = require('./stm-
|
|
10
|
-
var tArray = require('./tArray-
|
|
11
|
-
var tRef = require('./tRef-
|
|
8
|
+
var core = require('./core-8072a539.cjs.prod.js');
|
|
9
|
+
var stm = require('./stm-f792171c.cjs.prod.js');
|
|
10
|
+
var tArray = require('./tArray-7f227674.cjs.prod.js');
|
|
11
|
+
var tRef = require('./tRef-2892ee02.cjs.prod.js');
|
|
12
12
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
13
13
|
var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js');
|
|
14
14
|
var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.prod.js');
|
|
@@ -5,10 +5,10 @@ var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.dev.js');
|
|
|
5
5
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
6
6
|
var Hash_dist_effectHash = require('../Hash/dist/effect-Hash.cjs.dev.js');
|
|
7
7
|
var HashMap_dist_effectHashMap = require('../HashMap/dist/effect-HashMap.cjs.dev.js');
|
|
8
|
-
var core = require('./core-
|
|
9
|
-
var stm = require('./stm-
|
|
10
|
-
var tArray = require('./tArray-
|
|
11
|
-
var tRef = require('./tRef-
|
|
8
|
+
var core = require('./core-e6f9fdbe.cjs.dev.js');
|
|
9
|
+
var stm = require('./stm-4bf1a928.cjs.dev.js');
|
|
10
|
+
var tArray = require('./tArray-996f4aba.cjs.dev.js');
|
|
11
|
+
var tRef = require('./tRef-44d17d07.cjs.dev.js');
|
|
12
12
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
13
13
|
var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js');
|
|
14
14
|
var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.dev.js');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Chunk_dist_effectChunk = require('../Chunk/dist/effect-Chunk.cjs.dev.js');
|
|
4
4
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
5
|
-
var core = require('./core-
|
|
6
|
-
var stm = require('./stm-
|
|
7
|
-
var tRef = require('./tRef-
|
|
5
|
+
var core = require('./core-e6f9fdbe.cjs.dev.js');
|
|
6
|
+
var stm = require('./stm-4bf1a928.cjs.dev.js');
|
|
7
|
+
var tRef = require('./tRef-44d17d07.cjs.dev.js');
|
|
8
8
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
9
9
|
var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js');
|
|
10
10
|
var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.dev.js');
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var Chunk_dist_effectChunk = require('../Chunk/dist/effect-Chunk.cjs.prod.js');
|
|
4
4
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
5
|
-
var core = require('./core-
|
|
6
|
-
var stm = require('./stm-
|
|
7
|
-
var tRef = require('./tRef-
|
|
5
|
+
var core = require('./core-8072a539.cjs.prod.js');
|
|
6
|
+
var stm = require('./stm-f792171c.cjs.prod.js');
|
|
7
|
+
var tRef = require('./tRef-2892ee02.cjs.prod.js');
|
|
8
8
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
9
9
|
var ReadonlyArray_dist_effectReadonlyArray = require('../ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js');
|
|
10
10
|
var STM_dist_effectSTM = require('../STM/dist/effect-STM.cjs.prod.js');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.prod.js');
|
|
4
|
-
var core = require('./core-
|
|
4
|
+
var core = require('./core-8072a539.cjs.prod.js');
|
|
5
5
|
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.prod.js');
|
|
6
6
|
|
|
7
7
|
/** @internal */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.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
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
|
});
|
|
@@ -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";
|
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 };
|
package/internal/sink.esm.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { die as die$1, RuntimeException } from '../Cause/dist/effect-Cause.esm.js';
|
|
2
|
-
import { appendAll, empty, append, toReadonlyArray, unsafeFromArray, drop as drop$1,
|
|
2
|
+
import { appendAll, splitAt, isEmpty, empty, append, toReadonlyArray, unsafeFromArray, drop as drop$1, flatten, map as map$3, dropWhile as dropWhile$1, filter, isNonEmpty, unsafeGet as unsafeGet$1, of, last as last$1, reduce } from '../Chunk/dist/effect-Chunk.esm.js';
|
|
3
3
|
import { currentTimeMillis } from '../Clock/dist/effect-Clock.esm.js';
|
|
4
4
|
import { millis } from '../Duration/dist/effect-Duration.esm.js';
|
|
5
|
-
import { takeWhile, map as map$1, zip as zip$1, forEach as forEach$1, context as context$1, contextWith as contextWith$1, filter as filter$1, succeed as succeed$2, dieMessage as dieMessage$1, acquireRelease, never as never$1, gen, suspend as suspend$2, isEffect, failCause as failCause$2
|
|
6
|
-
import { match, merge, left, right } from '../Either/dist/effect-Either.esm.js';
|
|
5
|
+
import { takeWhile, map as map$1, zip as zip$1, forEach as forEach$1, dropUntil as dropUntil$1, dropWhile as dropWhile$2, context as context$1, contextWith as contextWith$1, filter as filter$1, succeed as succeed$2, flatMap as flatMap$2, dieMessage as dieMessage$1, acquireRelease, never as never$1, gen, suspend as suspend$2, isEffect, failCause as failCause$2 } from '../Effect/dist/effect-Effect.esm.js';
|
|
6
|
+
import { match as match$1, merge, left, right } from '../Either/dist/effect-Either.esm.js';
|
|
7
7
|
import { match as match$2 } from '../Exit/dist/effect-Exit.esm.js';
|
|
8
8
|
import { dual, pipe, constTrue, identity } from '../Function/dist/effect-Function.esm.js';
|
|
9
9
|
import { empty as empty$1, has, unsafeGet, set } from '../HashMap/dist/effect-HashMap.esm.js';
|
|
10
10
|
import { empty as empty$2, has as has$1, add } from '../HashSet/dist/effect-HashSet.esm.js';
|
|
11
|
-
import { some as some$1, none, match
|
|
11
|
+
import { some as some$1, none, match, isNone, orElse as orElse$2 } from '../Option/dist/effect-Option.esm.js';
|
|
12
12
|
import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
|
|
13
13
|
import { bounded } from '../PubSub/dist/effect-PubSub.esm.js';
|
|
14
14
|
import { shutdown, offerAll } from '../Queue/dist/effect-Queue.esm.js';
|
|
15
15
|
import { span } from '../ReadonlyArray/dist/effect-ReadonlyArray.esm.js';
|
|
16
16
|
import { make, set as set$1, get } from '../Ref/dist/effect-Ref.esm.js';
|
|
17
|
-
import { zipRight as zipRight$1, as as as$1, bufferChunk, foldChannel, doneCollect, map as map$2, pipeToOrFail, drain as drain$1, identityChannel,
|
|
17
|
+
import { zipRight as zipRight$1, as as as$1, bufferChunk, foldChannel, doneCollect, map as map$2, pipeToOrFail, drain as drain$1, identityChannel, unwrap as unwrap$1, ensuring as ensuring$1, writeChunk, catchAll, unwrapScoped as unwrapScoped$1, mapEffect as mapEffect$1, mapError as mapError$1, mapOut, orElse as orElse$1, fromPubSubScoped, toPubSub, mergeWith } from './channel.esm.js';
|
|
18
18
|
import { Done, Await } from './channel/mergeDecision.esm.js';
|
|
19
|
-
import { suspend as suspend$1, readWithCause, failCause as failCause$1, succeed as succeed$1,
|
|
19
|
+
import { suspend as suspend$1, readWithCause, failCause as failCause$1, succeed as succeed$1, flatMap as flatMap$1, write, readWith, fail as fail$1, fromEffect as fromEffect$1, pipeTo, collectElements, unit, succeedNow, ensuringWith as ensuringWith$1, failSync as failSync$1, failCauseSync as failCauseSync$1, sync as sync$1, provideContext as provideContext$1 } from './core-stream.esm.js';
|
|
20
20
|
|
|
21
21
|
/** @internal */
|
|
22
22
|
const SinkTypeId = /*#__PURE__*/Symbol.for("effect/Sink");
|
|
@@ -465,7 +465,7 @@ const foldEffectReader = (s, contFn, f) => {
|
|
|
465
465
|
return succeedNow(s);
|
|
466
466
|
}
|
|
467
467
|
return readWith({
|
|
468
|
-
onInput: input => pipe(fromEffect$1(foldChunkSplitEffect(s, input, contFn, f)), flatMap$1(([nextS, leftovers]) => pipe(leftovers, match
|
|
468
|
+
onInput: input => pipe(fromEffect$1(foldChunkSplitEffect(s, input, contFn, f)), flatMap$1(([nextS, leftovers]) => pipe(leftovers, match({
|
|
469
469
|
onNone: () => foldEffectReader(nextS, contFn, f),
|
|
470
470
|
onSome: leftover => pipe(write(leftover), as$1(nextS))
|
|
471
471
|
})))),
|
|
@@ -679,7 +679,7 @@ const fromPubSub = (pubsub, options) => fromQueue(pubsub, options);
|
|
|
679
679
|
const fromPush = push => new SinkImpl(unwrapScoped$1(pipe(push, map$1(fromPushPull))));
|
|
680
680
|
const fromPushPull = push => readWith({
|
|
681
681
|
onInput: input => foldChannel(fromEffect$1(push(some$1(input))), {
|
|
682
|
-
onFailure: ([either, leftovers]) => match(either, {
|
|
682
|
+
onFailure: ([either, leftovers]) => match$1(either, {
|
|
683
683
|
onLeft: error => pipe(write(leftovers), zipRight$1(fail$1(error))),
|
|
684
684
|
onRight: z => pipe(write(leftovers), zipRight$1(succeedNow(z)))
|
|
685
685
|
}),
|
|
@@ -687,7 +687,7 @@ const fromPushPull = push => readWith({
|
|
|
687
687
|
}),
|
|
688
688
|
onFailure: fail$1,
|
|
689
689
|
onDone: () => foldChannel(fromEffect$1(push(none())), {
|
|
690
|
-
onFailure: ([either, leftovers]) => match(either, {
|
|
690
|
+
onFailure: ([either, leftovers]) => match$1(either, {
|
|
691
691
|
onLeft: error => pipe(write(leftovers), zipRight$1(fail$1(error))),
|
|
692
692
|
onRight: z => pipe(write(leftovers), zipRight$1(succeedNow(z)))
|
|
693
693
|
}),
|
|
@@ -699,7 +699,7 @@ const fromPushPull = push => readWith({
|
|
|
699
699
|
const fromQueue = (queue, options) => options?.shutdown ? unwrapScoped(map$1(acquireRelease(succeed$2(queue), shutdown), fromQueue)) : forEachChunk(input => pipe(offerAll(queue, input)));
|
|
700
700
|
|
|
701
701
|
/** @internal */
|
|
702
|
-
const head = () => fold(none(), isNone, (option, input) => match
|
|
702
|
+
const head = () => fold(none(), isNone, (option, input) => match(option, {
|
|
703
703
|
onNone: () => some$1(input),
|
|
704
704
|
onSome: () => option
|
|
705
705
|
}));
|
|
@@ -774,7 +774,7 @@ const refineOrDie = /*#__PURE__*/dual(2, (self, pf) => pipe(self, refineOrDieWit
|
|
|
774
774
|
|
|
775
775
|
/** @internal */
|
|
776
776
|
const refineOrDieWith = /*#__PURE__*/dual(3, (self, pf, f) => {
|
|
777
|
-
const newChannel = pipe(self, toChannel, catchAll(error => match
|
|
777
|
+
const newChannel = pipe(self, toChannel, catchAll(error => match(pf(error), {
|
|
778
778
|
onNone: () => failCauseSync$1(() => die$1(f(error))),
|
|
779
779
|
onSome: fail$1
|
|
780
780
|
})));
|
package/internal/stream.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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,
|
|
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, isChunk, mapAccum as mapAccum$1, unsafeGet as unsafeGet$1, make as make$7, flatten as flatten$2, splitAt, appendAllNonEmpty, 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';
|
|
@@ -25,7 +25,7 @@ import { unwrap as unwrap$1, zipRight as zipRight$2, pipeToOrFail, unwrapScoped
|
|
|
25
25
|
import { run as run$1, runScoped as runScoped$1 } from './channel/channelExecutor.esm.js';
|
|
26
26
|
import { BufferSliding } from './channel/mergeStrategy.esm.js';
|
|
27
27
|
import { make as make$5 } from './channel/singleProducerAsyncInput.esm.js';
|
|
28
|
-
import { readWithCause, flatMap as flatMap$1, fromEffect as fromEffect$1, write, failCause as failCause$1, unit as unit$1, pipeTo, collectElements, fail as fail$1, catchAllCause as catchAllCause$1, readWith, suspend as suspend$2, succeedNow, ensuringWith as ensuringWith$1, succeed as succeed$3, provideContext as provideContext$1, foldCauseChannel,
|
|
28
|
+
import { readWithCause, flatMap as flatMap$1, fromEffect as fromEffect$1, write, failCause as failCause$1, unit as unit$1, pipeTo, collectElements, fail as fail$1, catchAllCause as catchAllCause$1, readWith, suspend as suspend$2, succeedNow, ensuringWith as ensuringWith$1, succeed as succeed$3, provideContext as provideContext$1, foldCauseChannel, sync as sync$2, embedInput } from './core-stream.esm.js';
|
|
29
29
|
import { RingBuffer } from './ringBuffer.esm.js';
|
|
30
30
|
import { toChannel as toChannel$1, collectAllN, mkString as mkString$1, foldSink, collectLeftover, zipRight as zipRight$3, fromEffect as fromEffect$2, fail as fail$5, fromChannel as fromChannel$1, collectAll, count, drain as drain$2, fold, foldEffect, forEach as forEach$1, forEachChunk, forEachWhile, head, last, sum } from './sink.esm.js';
|
|
31
31
|
import { OP_CURRENT, OP_PREVIOUS, current, OP_NOT_STARTED, notStarted, previous } from './stream/debounceState.esm.js';
|
|
@@ -880,10 +880,7 @@ const flatMap = /*#__PURE__*/dual(args => typeof args[0] !== "function", (self,
|
|
|
880
880
|
if (options?.switch) {
|
|
881
881
|
return matchConcurrency(options?.concurrency, () => flatMapParSwitchBuffer(self, 1, bufferSize, f), n => flatMapParSwitchBuffer(self, n, bufferSize, f));
|
|
882
882
|
}
|
|
883
|
-
return matchConcurrency(options?.concurrency, () => new StreamImpl(concatMap(toChannel(self), as => pipe(as, map$2(a => toChannel(f(a))), reduce(unit$1, (left, right) => pipe(left, zipRight$2(right)))))),
|
|
884
|
-
concurrency: n,
|
|
885
|
-
bufferSize
|
|
886
|
-
}))));
|
|
883
|
+
return matchConcurrency(options?.concurrency, () => new StreamImpl(concatMap(toChannel(self), as => pipe(as, map$2(a => toChannel(f(a))), reduce(unit$1, (left, right) => pipe(left, zipRight$2(right)))))), _ => new StreamImpl(pipe(toChannel(self), concatMap(writeChunk), mergeMap(out => toChannel(f(out)), options))));
|
|
887
884
|
});
|
|
888
885
|
|
|
889
886
|
/** @internal */
|
|
@@ -892,7 +889,7 @@ const matchConcurrency = (concurrency, sequential, bounded) => {
|
|
|
892
889
|
case undefined:
|
|
893
890
|
return sequential();
|
|
894
891
|
case "unbounded":
|
|
895
|
-
return bounded(Number.
|
|
892
|
+
return bounded(Number.MAX_SAFE_INTEGER);
|
|
896
893
|
default:
|
|
897
894
|
return concurrency > 1 ? bounded(concurrency) : sequential();
|
|
898
895
|
}
|
|
@@ -1041,10 +1038,13 @@ const fromIteratorSucceed = (iterator, maxChunkSize = DefaultChunkSize) => {
|
|
|
1041
1038
|
}
|
|
1042
1039
|
builder = [];
|
|
1043
1040
|
let count = 0;
|
|
1044
|
-
while (
|
|
1041
|
+
while (next.done === false) {
|
|
1045
1042
|
builder.push(next.value);
|
|
1046
|
-
next = iterator.next();
|
|
1047
1043
|
count = count + 1;
|
|
1044
|
+
if (count >= maxChunkSize) {
|
|
1045
|
+
break;
|
|
1046
|
+
}
|
|
1047
|
+
next = iterator.next();
|
|
1048
1048
|
}
|
|
1049
1049
|
if (count > 0) {
|
|
1050
1050
|
return pipe(write(unsafeFromArray(builder)), flatMap$1(() => loop(iterator)));
|
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.49",
|
|
4
4
|
"packageManager": "pnpm@8.7.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -1056,8 +1056,8 @@
|
|
|
1056
1056
|
"@changesets/changelog-github": "^0.4.8",
|
|
1057
1057
|
"@changesets/cli": "^2.26.2",
|
|
1058
1058
|
"@definitelytyped/dtslint": "^0.0.182",
|
|
1059
|
-
"@effect/build-utils": "^0.1.
|
|
1060
|
-
"@effect/docgen": "^0.
|
|
1059
|
+
"@effect/build-utils": "^0.1.9",
|
|
1060
|
+
"@effect/docgen": "^0.2.0",
|
|
1061
1061
|
"@effect/eslint-plugin": "^0.1.2",
|
|
1062
1062
|
"@effect/language-service": "^0.0.21",
|
|
1063
1063
|
"@preconstruct/cli": "^2.8.1",
|
|
@@ -1091,12 +1091,13 @@
|
|
|
1091
1091
|
"test": "vitest",
|
|
1092
1092
|
"check": "tsc -p tsconfig.json",
|
|
1093
1093
|
"coverage": "vitest run --coverage",
|
|
1094
|
-
"circular": "madge --ts
|
|
1094
|
+
"circular": "madge --extensions ts --circular --no-color --no-spinner --warning src",
|
|
1095
1095
|
"update-version": "changeset version && pnpm install --no-frozen-lockfile",
|
|
1096
1096
|
"lint": "eslint src test",
|
|
1097
1097
|
"lint-fix": "eslint src test --fix",
|
|
1098
1098
|
"fix": "preconstruct fix",
|
|
1099
1099
|
"docgen": "docgen",
|
|
1100
|
-
"dtslint": "dtslint --expectOnly dtslint"
|
|
1100
|
+
"dtslint": "dtslint --expectOnly dtslint",
|
|
1101
|
+
"dtslint-clean": "dtslint --installAll"
|
|
1101
1102
|
}
|
|
1102
1103
|
}
|
package/src/Channel.ts
CHANGED
|
@@ -1941,6 +1941,16 @@ export const scoped: <R, E, A>(
|
|
|
1941
1941
|
*/
|
|
1942
1942
|
export const succeed: <A>(value: A) => Channel<never, unknown, unknown, unknown, never, never, A> = core.succeed
|
|
1943
1943
|
|
|
1944
|
+
/**
|
|
1945
|
+
* Lazily constructs a channel from the given side effect.
|
|
1946
|
+
*
|
|
1947
|
+
* @since 2.0.0
|
|
1948
|
+
* @category constructors
|
|
1949
|
+
*/
|
|
1950
|
+
export const suspend: <Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>(
|
|
1951
|
+
evaluate: LazyArg<Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>>
|
|
1952
|
+
) => Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone> = core.suspend
|
|
1953
|
+
|
|
1944
1954
|
/**
|
|
1945
1955
|
* Constructs a channel that succeeds immediately with the specified lazy value.
|
|
1946
1956
|
*
|