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
package/src/Chunk.ts
CHANGED
|
@@ -823,7 +823,7 @@ export const last = <A>(self: Chunk<A>): Option<A> => get(self, self.length - 1)
|
|
|
823
823
|
export const unsafeLast = <A>(self: Chunk<A>): A => unsafeGet(self, self.length - 1)
|
|
824
824
|
|
|
825
825
|
/**
|
|
826
|
-
* Returns
|
|
826
|
+
* Returns a chunk with the elements mapped by the specified f function.
|
|
827
827
|
*
|
|
828
828
|
* @since 2.0.0
|
|
829
829
|
* @category mapping
|
|
@@ -836,6 +836,17 @@ export const map: {
|
|
|
836
836
|
of(f(self.backing.a, 0)) :
|
|
837
837
|
unsafeFromArray(pipe(toReadonlyArray(self), RA.map((a, i) => f(a, i)))))
|
|
838
838
|
|
|
839
|
+
/**
|
|
840
|
+
* Returns a non empty chunk with the elements mapped by the specified f function.
|
|
841
|
+
*
|
|
842
|
+
* @since 2.0.0
|
|
843
|
+
* @category mapping
|
|
844
|
+
*/
|
|
845
|
+
export const mapNonEmpty: {
|
|
846
|
+
<A, B>(f: (a: A, i: number) => B): (self: NonEmptyChunk<A>) => NonEmptyChunk<B>
|
|
847
|
+
<A, B>(self: NonEmptyChunk<A>, f: (a: A, i: number) => B): NonEmptyChunk<B>
|
|
848
|
+
} = map as any
|
|
849
|
+
|
|
839
850
|
/**
|
|
840
851
|
* Statefully maps over the chunk, producing new elements of type `B`.
|
|
841
852
|
*
|
package/src/Data.ts
CHANGED
|
@@ -164,11 +164,21 @@ export const Structural: new<A>(
|
|
|
164
164
|
* @since 2.0.0
|
|
165
165
|
* @category models
|
|
166
166
|
*/
|
|
167
|
-
export type TaggedEnum<
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
>
|
|
171
|
-
|
|
167
|
+
export type TaggedEnum<
|
|
168
|
+
A extends Record<string, Record<string, any>> & UntaggedChildren<A>
|
|
169
|
+
> = keyof A extends infer Tag
|
|
170
|
+
? Tag extends keyof A ? Data<{ readonly [K in `_tag` | keyof A[Tag]]: K extends `_tag` ? Tag : A[Tag][K] }>
|
|
171
|
+
: never
|
|
172
|
+
: never
|
|
173
|
+
|
|
174
|
+
type ChildrenAreTagged<A> = keyof A extends infer K ? K extends keyof A ? "_tag" extends keyof A[K] ? true
|
|
175
|
+
: false
|
|
176
|
+
: never
|
|
177
|
+
: never
|
|
178
|
+
|
|
179
|
+
type UntaggedChildren<A> = true extends ChildrenAreTagged<A>
|
|
180
|
+
? "It looks like you're trying to create a tagged enum, but one or more of its members already has a `_tag` property."
|
|
181
|
+
: unknown
|
|
172
182
|
|
|
173
183
|
/**
|
|
174
184
|
* @since 2.0.0
|
package/src/HashMap.ts
CHANGED
|
@@ -35,6 +35,36 @@ export declare namespace HashMap {
|
|
|
35
35
|
* @category models
|
|
36
36
|
*/
|
|
37
37
|
export type UpdateFn<V> = (option: Option<V>) => Option<V>
|
|
38
|
+
/**
|
|
39
|
+
* This type-level utility extracts the key type `K` from a `HashMap<K, V>` type.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* import * as HashMap from "effect/HashMap"
|
|
43
|
+
*
|
|
44
|
+
* declare const hm: HashMap.HashMap<string, number>
|
|
45
|
+
*
|
|
46
|
+
* // $ExpectType string
|
|
47
|
+
* type K = HashMap.HashMap.Key<typeof hm>
|
|
48
|
+
*
|
|
49
|
+
* @since 2.0.0
|
|
50
|
+
* @category type-level
|
|
51
|
+
*/
|
|
52
|
+
export type Key<T extends HashMap<any, any>> = [T] extends [HashMap<infer _K, infer _V>] ? _K : never
|
|
53
|
+
/**
|
|
54
|
+
* This type-level utility extracts the value type `V` from a `HashMap<K, V>` type.
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* import * as HashMap from "effect/HashMap"
|
|
58
|
+
*
|
|
59
|
+
* declare const hm: HashMap.HashMap<string, number>
|
|
60
|
+
*
|
|
61
|
+
* // $ExpectType number
|
|
62
|
+
* type V = HashMap.HashMap.Value<typeof hm>
|
|
63
|
+
*
|
|
64
|
+
* @since 2.0.0
|
|
65
|
+
* @category type-level
|
|
66
|
+
*/
|
|
67
|
+
export type Value<T extends HashMap<any, any>> = [T] extends [HashMap<infer _K, infer _V>] ? _V : never
|
|
38
68
|
}
|
|
39
69
|
|
|
40
70
|
/**
|
package/src/List.ts
CHANGED
|
@@ -736,6 +736,15 @@ export const map: {
|
|
|
736
736
|
}
|
|
737
737
|
})
|
|
738
738
|
|
|
739
|
+
/**
|
|
740
|
+
* @since 2.0.0
|
|
741
|
+
* @category combinators
|
|
742
|
+
*/
|
|
743
|
+
export const mapNonEmpty: {
|
|
744
|
+
<A, B>(f: (a: A) => B): (self: Cons<A>) => Cons<B>
|
|
745
|
+
<A, B>(self: Cons<A>, f: (a: A) => B): Cons<B>
|
|
746
|
+
} = map as any
|
|
747
|
+
|
|
739
748
|
/**
|
|
740
749
|
* Partition a list into two lists, where the first list contains all elements
|
|
741
750
|
* that did not satisfy the specified predicate, and the second list contains
|
package/src/Metric.ts
CHANGED
|
@@ -156,7 +156,26 @@ export const mapInput: {
|
|
|
156
156
|
} = internal.mapInput
|
|
157
157
|
|
|
158
158
|
/**
|
|
159
|
-
*
|
|
159
|
+
* Represents a Counter metric that tracks cumulative numerical values over time.
|
|
160
|
+
* Counters can be incremented and decremented and provide a running total of changes.
|
|
161
|
+
*
|
|
162
|
+
* @param name - The name of the counter metric.
|
|
163
|
+
* @param options - An optional configuration for the counter:
|
|
164
|
+
* - description - A description of the counter.
|
|
165
|
+
* - bigint - Indicates if the counter uses 'bigint' data type.
|
|
166
|
+
* - incremental - Set to 'true' for a counter that only increases. With this configuration, Effect ensures that non-incremental updates have no impact on the counter, making it exclusively suitable for counting upwards.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* import * as Metric from "effect/Metric"
|
|
170
|
+
*
|
|
171
|
+
* const numberCounter = Metric.counter("count", {
|
|
172
|
+
* description: "A number counter"
|
|
173
|
+
* });
|
|
174
|
+
*
|
|
175
|
+
* const bigintCounter = Metric.counter("count", {
|
|
176
|
+
* description: "A bigint counter",
|
|
177
|
+
* bigint: true
|
|
178
|
+
* });
|
|
160
179
|
*
|
|
161
180
|
* @since 2.0.0
|
|
162
181
|
* @category constructors
|
|
@@ -181,8 +200,16 @@ export const counter: {
|
|
|
181
200
|
} = internal.counter
|
|
182
201
|
|
|
183
202
|
/**
|
|
184
|
-
*
|
|
185
|
-
*
|
|
203
|
+
* Creates a Frequency metric to count occurrences of events.
|
|
204
|
+
* Frequency metrics are used to count the number of times specific events or incidents occur.
|
|
205
|
+
*
|
|
206
|
+
* @param name - The name of the Frequency metric.
|
|
207
|
+
* @param description - An optional description of the Frequency metric.
|
|
208
|
+
*
|
|
209
|
+
* @example
|
|
210
|
+
* import * as Metric from "effect/Metric"
|
|
211
|
+
*
|
|
212
|
+
* const errorFrequency = Metric.frequency("error_frequency", "Counts the occurrences of errors.");
|
|
186
213
|
*
|
|
187
214
|
* @since 2.0.0
|
|
188
215
|
* @category constructors
|
|
@@ -212,7 +239,25 @@ export const fromMetricKey: <Type extends MetricKeyType.MetricKeyType<any, any>>
|
|
|
212
239
|
internal.fromMetricKey
|
|
213
240
|
|
|
214
241
|
/**
|
|
215
|
-
*
|
|
242
|
+
* Represents a Gauge metric that tracks and reports a single numerical value at a specific moment.
|
|
243
|
+
* Gauges are suitable for metrics that represent instantaneous values, such as memory usage or CPU load.
|
|
244
|
+
*
|
|
245
|
+
* @param name - The name of the gauge metric.
|
|
246
|
+
* @param options - An optional configuration for the gauge:
|
|
247
|
+
* - description - A description of the gauge metric.
|
|
248
|
+
* - bigint - Indicates if the counter uses 'bigint' data type.
|
|
249
|
+
*
|
|
250
|
+
* @example
|
|
251
|
+
* import * as Metric from "effect/Metric"
|
|
252
|
+
*
|
|
253
|
+
* const numberGauge = Metric.gauge("memory_usage", {
|
|
254
|
+
* description: "A gauge for memory usage"
|
|
255
|
+
* });
|
|
256
|
+
*
|
|
257
|
+
* const bigintGauge = Metric.gauge("cpu_load", {
|
|
258
|
+
* description: "A gauge for CPU load",
|
|
259
|
+
* bigint: true
|
|
260
|
+
* });
|
|
216
261
|
*
|
|
217
262
|
* @since 2.0.0
|
|
218
263
|
* @category constructors
|
|
@@ -223,8 +268,21 @@ export const gauge: {
|
|
|
223
268
|
} = internal.gauge
|
|
224
269
|
|
|
225
270
|
/**
|
|
226
|
-
*
|
|
227
|
-
*
|
|
271
|
+
* Represents a Histogram metric that records observations in specified value boundaries.
|
|
272
|
+
* Histogram metrics are useful for measuring the distribution of values within a range.
|
|
273
|
+
*
|
|
274
|
+
* @param name - The name of the histogram metric.
|
|
275
|
+
* @param boundaries - The boundaries for defining the histogram's value ranges.
|
|
276
|
+
* @param description - A description of the histogram metric.
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* import * as Metric from "effect/Metric"
|
|
280
|
+
* import * as MetricBoundaries from "effect/MetricBoundaries"
|
|
281
|
+
*
|
|
282
|
+
* const latencyHistogram = Metric.histogram("latency_histogram",
|
|
283
|
+
* MetricBoundaries.linear({ start: 0, width: 10, count: 11 }),
|
|
284
|
+
* "Measures the distribution of request latency."
|
|
285
|
+
* );
|
|
228
286
|
*
|
|
229
287
|
* @since 2.0.0
|
|
230
288
|
* @category constructors
|
|
@@ -311,6 +369,30 @@ export const succeed: <Out>(out: Out) => Metric<void, unknown, Out> = internal.s
|
|
|
311
369
|
export const sync: <Out>(evaluate: LazyArg<Out>) => Metric<void, unknown, Out> = internal.sync
|
|
312
370
|
|
|
313
371
|
/**
|
|
372
|
+
* Creates a Summary metric that records observations and calculates quantiles.
|
|
373
|
+
* Summary metrics provide statistical information about a set of values, including quantiles.
|
|
374
|
+
*
|
|
375
|
+
* @param options - An object with configuration options for the Summary metric:
|
|
376
|
+
* - name - The name of the Summary metric.
|
|
377
|
+
* - maxAge - The maximum age of observations to retain.
|
|
378
|
+
* - maxSize - The maximum number of observations to keep.
|
|
379
|
+
* - error - The error percentage when calculating quantiles.
|
|
380
|
+
* - quantiles - An `Chunk` of quantiles to calculate (e.g., [0.5, 0.9]).
|
|
381
|
+
* - description - An optional description of the Summary metric.
|
|
382
|
+
*
|
|
383
|
+
* @example
|
|
384
|
+
* import * as Metric from "effect/Metric"
|
|
385
|
+
* import * as Chunk from "effect/Chunk"
|
|
386
|
+
*
|
|
387
|
+
* const responseTimesSummary = Metric.summary({
|
|
388
|
+
* name: "response_times_summary",
|
|
389
|
+
* maxAge: "60 seconds", // Retain observations for 60 seconds.
|
|
390
|
+
* maxSize: 1000, // Keep a maximum of 1000 observations.
|
|
391
|
+
* error: 0.01, // Allow a 1% error when calculating quantiles.
|
|
392
|
+
* quantiles: Chunk.make(0.5, 0.9, 0.99), // Calculate 50th, 90th, and 99th percentiles.
|
|
393
|
+
* description: "Measures the distribution of response times."
|
|
394
|
+
* });
|
|
395
|
+
*
|
|
314
396
|
* @since 2.0.0
|
|
315
397
|
* @category constructors
|
|
316
398
|
*/
|
package/src/TRef.ts
CHANGED
package/src/internal/cause.ts
CHANGED
|
@@ -59,7 +59,7 @@ const proto = {
|
|
|
59
59
|
return { _id: "Cause", _tag: this._tag, failure: toJSON(this.error) }
|
|
60
60
|
case "Sequential":
|
|
61
61
|
case "Parallel":
|
|
62
|
-
return { _id: "Cause", _tag: this._tag,
|
|
62
|
+
return { _id: "Cause", _tag: this._tag, left: toJSON(this.left), right: toJSON(this.right) }
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
toString<E>(this: Cause.Cause<E>) {
|
package/src/internal/channel.ts
CHANGED
|
@@ -1176,6 +1176,7 @@ export const mergeAllWith = (
|
|
|
1176
1176
|
> =>
|
|
1177
1177
|
pipe(
|
|
1178
1178
|
Effect.gen(function*($) {
|
|
1179
|
+
const concurrencyN = concurrency === "unbounded" ? Number.MAX_SAFE_INTEGER : concurrency
|
|
1179
1180
|
const input = yield* $(singleProducerAsyncInput.make<
|
|
1180
1181
|
InErr & InErr1,
|
|
1181
1182
|
InElem & InElem1,
|
|
@@ -1196,9 +1197,8 @@ export const mergeAllWith = (
|
|
|
1196
1197
|
)
|
|
1197
1198
|
const lastDone = yield* $(Ref.make<Option.Option<OutDone>>(Option.none()))
|
|
1198
1199
|
const errorSignal = yield* $(Deferred.make<never, void>())
|
|
1199
|
-
const withPermits =
|
|
1200
|
-
|
|
1201
|
-
(yield* $(Effect.makeSemaphore(concurrency))).withPermits
|
|
1200
|
+
const withPermits = (yield* $(Effect.makeSemaphore(concurrencyN)))
|
|
1201
|
+
.withPermits
|
|
1202
1202
|
const pull = yield* $(toPull(channels))
|
|
1203
1203
|
const evaluatePull = (
|
|
1204
1204
|
pull: Effect.Effect<Env | Env1, OutErr | OutErr1, Either.Either<OutDone, OutElem>>
|
|
@@ -1216,23 +1216,21 @@ export const mergeAllWith = (
|
|
|
1216
1216
|
})
|
|
1217
1217
|
),
|
|
1218
1218
|
Effect.repeatUntil(Option.isSome),
|
|
1219
|
-
Effect.flatMap(
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
Option.
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
)
|
|
1229
|
-
})),
|
|
1219
|
+
Effect.flatMap((outDone) =>
|
|
1220
|
+
Ref.update(
|
|
1221
|
+
lastDone,
|
|
1222
|
+
Option.match({
|
|
1223
|
+
onNone: () => Option.some(outDone.value),
|
|
1224
|
+
onSome: (lastDone) => Option.some(f(lastDone, outDone.value))
|
|
1225
|
+
})
|
|
1226
|
+
)
|
|
1227
|
+
),
|
|
1230
1228
|
Effect.catchAllCause((cause) =>
|
|
1231
1229
|
Cause.isInterrupted(cause) ?
|
|
1232
1230
|
Effect.failCause(cause) :
|
|
1233
1231
|
pipe(
|
|
1234
1232
|
Queue.offer(queue, Effect.failCause(cause)),
|
|
1235
|
-
Effect.zipRight(Deferred.succeed
|
|
1233
|
+
Effect.zipRight(Deferred.succeed(errorSignal, void 0)),
|
|
1236
1234
|
Effect.asUnit
|
|
1237
1235
|
)
|
|
1238
1236
|
)
|
|
@@ -1246,88 +1244,83 @@ export const mergeAllWith = (
|
|
|
1246
1244
|
),
|
|
1247
1245
|
onSuccess: Either.match({
|
|
1248
1246
|
onLeft: (outDone) =>
|
|
1249
|
-
Effect.raceWith(Deferred.await(errorSignal), withPermits(
|
|
1250
|
-
onSelfDone: (_, permitAcquisition) =>
|
|
1247
|
+
Effect.raceWith(Deferred.await(errorSignal), withPermits(concurrencyN)(Effect.unit), {
|
|
1248
|
+
onSelfDone: (_, permitAcquisition) => Effect.as(Fiber.interrupt(permitAcquisition), false),
|
|
1251
1249
|
onOtherDone: (_, failureAwait) =>
|
|
1252
|
-
|
|
1250
|
+
Effect.zipRight(
|
|
1253
1251
|
Fiber.interrupt(failureAwait),
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
Effect.
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
Effect.as(false)
|
|
1262
|
-
)
|
|
1252
|
+
pipe(
|
|
1253
|
+
Ref.get(lastDone),
|
|
1254
|
+
Effect.flatMap(Option.match({
|
|
1255
|
+
onNone: () => Queue.offer(queue, Effect.succeed(Either.left(outDone))),
|
|
1256
|
+
onSome: (lastDone) => Queue.offer(queue, Effect.succeed(Either.left(f(lastDone, outDone))))
|
|
1257
|
+
})),
|
|
1258
|
+
Effect.as(false)
|
|
1263
1259
|
)
|
|
1264
1260
|
)
|
|
1265
1261
|
}),
|
|
1266
1262
|
onRight: (channel) =>
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
Effect.
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
)
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
)
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
})
|
|
1329
|
-
})
|
|
1330
|
-
)
|
|
1263
|
+
_mergeStrategy.match(mergeStrategy, {
|
|
1264
|
+
onBackPressure: () =>
|
|
1265
|
+
Effect.gen(function*($) {
|
|
1266
|
+
const latch = yield* $(Deferred.make<never, void>())
|
|
1267
|
+
const raceEffects: Effect.Effect<Env | Env1, OutErr | OutErr1, void> = pipe(
|
|
1268
|
+
queueReader,
|
|
1269
|
+
core.pipeTo(channel),
|
|
1270
|
+
toPull,
|
|
1271
|
+
Effect.flatMap((pull) =>
|
|
1272
|
+
Effect.race(
|
|
1273
|
+
evaluatePull(pull),
|
|
1274
|
+
Deferred.await(errorSignal)
|
|
1275
|
+
)
|
|
1276
|
+
),
|
|
1277
|
+
Effect.scoped
|
|
1278
|
+
)
|
|
1279
|
+
yield* $(
|
|
1280
|
+
Deferred.succeed<never, void>(latch, void 0),
|
|
1281
|
+
Effect.zipRight(raceEffects),
|
|
1282
|
+
withPermits(1),
|
|
1283
|
+
Effect.forkScoped
|
|
1284
|
+
)
|
|
1285
|
+
yield* $(Deferred.await(latch))
|
|
1286
|
+
const errored = yield* $(Deferred.isDone(errorSignal))
|
|
1287
|
+
return !errored
|
|
1288
|
+
}),
|
|
1289
|
+
onBufferSliding: () =>
|
|
1290
|
+
Effect.gen(function*($) {
|
|
1291
|
+
const canceler = yield* $(Deferred.make<never, void>())
|
|
1292
|
+
const latch = yield* $(Deferred.make<never, void>())
|
|
1293
|
+
const size = yield* $(Queue.size(cancelers))
|
|
1294
|
+
yield* $(
|
|
1295
|
+
Queue.take(cancelers),
|
|
1296
|
+
Effect.flatMap((_) => Deferred.succeed<never, void>(_, void 0)),
|
|
1297
|
+
Effect.when(() => size >= concurrencyN)
|
|
1298
|
+
)
|
|
1299
|
+
yield* $(Queue.offer(cancelers, canceler))
|
|
1300
|
+
const raceEffects: Effect.Effect<Env | Env1, OutErr | OutErr1, void> = pipe(
|
|
1301
|
+
queueReader,
|
|
1302
|
+
core.pipeTo(channel),
|
|
1303
|
+
toPull,
|
|
1304
|
+
Effect.flatMap((pull) =>
|
|
1305
|
+
pipe(
|
|
1306
|
+
evaluatePull(pull),
|
|
1307
|
+
Effect.race(Deferred.await(errorSignal)),
|
|
1308
|
+
Effect.race(Deferred.await(canceler))
|
|
1309
|
+
)
|
|
1310
|
+
),
|
|
1311
|
+
Effect.scoped
|
|
1312
|
+
)
|
|
1313
|
+
yield* $(
|
|
1314
|
+
Deferred.succeed<never, void>(latch, void 0),
|
|
1315
|
+
Effect.zipRight(raceEffects),
|
|
1316
|
+
withPermits(1),
|
|
1317
|
+
Effect.forkScoped
|
|
1318
|
+
)
|
|
1319
|
+
yield* $(Deferred.await(latch))
|
|
1320
|
+
const errored = yield* $(Deferred.isDone(errorSignal))
|
|
1321
|
+
return !errored
|
|
1322
|
+
})
|
|
1323
|
+
})
|
|
1331
1324
|
})
|
|
1332
1325
|
}),
|
|
1333
1326
|
Effect.repeatWhile(identity),
|
package/src/internal/groupBy.ts
CHANGED
|
@@ -35,6 +35,10 @@ const groupByVariance = {
|
|
|
35
35
|
_V: (_: never) => _
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const isGroupBy = (u: unknown): u is GroupBy.GroupBy<unknown, unknown, unknown, unknown> =>
|
|
40
|
+
typeof u === "object" && u != null && GroupByTypeId in u
|
|
41
|
+
|
|
38
42
|
/** @internal */
|
|
39
43
|
export const evaluate = dual<
|
|
40
44
|
<K, E, V, R2, E2, A>(
|
|
@@ -47,7 +51,7 @@ export const evaluate = dual<
|
|
|
47
51
|
options?: { readonly bufferSize?: number }
|
|
48
52
|
) => Stream.Stream<R2 | R, E | E2, A>
|
|
49
53
|
>(
|
|
50
|
-
|
|
54
|
+
(args) => isGroupBy(args[0]),
|
|
51
55
|
<R, K, E, V, R2, E2, A>(
|
|
52
56
|
self: GroupBy.GroupBy<R, E, K, V>,
|
|
53
57
|
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>,
|
|
@@ -122,7 +126,7 @@ export const groupBy = dual<
|
|
|
122
126
|
options?: { readonly bufferSize?: number }
|
|
123
127
|
) => GroupBy.GroupBy<R2 | R, E2 | E, K, V>
|
|
124
128
|
>(
|
|
125
|
-
(args) =>
|
|
129
|
+
(args) => stream.isStream(args[0]),
|
|
126
130
|
<R, E, A, R2, E2, K, V>(
|
|
127
131
|
self: Stream.Stream<R, E, A>,
|
|
128
132
|
f: (a: A) => Effect.Effect<R2, E2, readonly [K, V]>,
|
|
@@ -240,7 +244,7 @@ export const mapEffectOptions = dual<
|
|
|
240
244
|
if (options?.key) {
|
|
241
245
|
return evaluate(
|
|
242
246
|
groupByKey(self, options.key, { bufferSize: options.bufferSize }),
|
|
243
|
-
(_, s) =>
|
|
247
|
+
(_, s) => stream.mapEffectSequential(s, f)
|
|
244
248
|
)
|
|
245
249
|
}
|
|
246
250
|
|
package/src/internal/stream.ts
CHANGED
|
@@ -2613,12 +2613,12 @@ export const flatMap = dual<
|
|
|
2613
2613
|
)
|
|
2614
2614
|
)
|
|
2615
2615
|
),
|
|
2616
|
-
(
|
|
2616
|
+
(_) =>
|
|
2617
2617
|
new StreamImpl(
|
|
2618
2618
|
pipe(
|
|
2619
2619
|
toChannel(self),
|
|
2620
2620
|
channel.concatMap(channel.writeChunk),
|
|
2621
|
-
channel.mergeMap((out) => toChannel(f(out)),
|
|
2621
|
+
channel.mergeMap((out) => toChannel(f(out)), options as any)
|
|
2622
2622
|
)
|
|
2623
2623
|
)
|
|
2624
2624
|
)
|
|
@@ -2635,7 +2635,7 @@ export const matchConcurrency = <A>(
|
|
|
2635
2635
|
case undefined:
|
|
2636
2636
|
return sequential()
|
|
2637
2637
|
case "unbounded":
|
|
2638
|
-
return bounded(Number.
|
|
2638
|
+
return bounded(Number.MAX_SAFE_INTEGER)
|
|
2639
2639
|
default:
|
|
2640
2640
|
return concurrency > 1 ? bounded(concurrency) : sequential()
|
|
2641
2641
|
}
|
|
@@ -2980,10 +2980,13 @@ export const fromIteratorSucceed = <A>(
|
|
|
2980
2980
|
}
|
|
2981
2981
|
builder = []
|
|
2982
2982
|
let count = 0
|
|
2983
|
-
while (
|
|
2983
|
+
while (next.done === false) {
|
|
2984
2984
|
builder.push(next.value)
|
|
2985
|
-
next = iterator.next()
|
|
2986
2985
|
count = count + 1
|
|
2986
|
+
if (count >= maxChunkSize) {
|
|
2987
|
+
break
|
|
2988
|
+
}
|
|
2989
|
+
next = iterator.next()
|
|
2987
2990
|
}
|
|
2988
2991
|
if (count > 0) {
|
|
2989
2992
|
return pipe(
|
package/src/tsconfig.json
CHANGED
|
@@ -33,7 +33,15 @@
|
|
|
33
33
|
"target": "ES2021",
|
|
34
34
|
"module": "ES6",
|
|
35
35
|
"incremental": true,
|
|
36
|
-
"removeComments": false
|
|
36
|
+
"removeComments": false,
|
|
37
|
+
"paths": {
|
|
38
|
+
"effect": [
|
|
39
|
+
"./index.ts"
|
|
40
|
+
],
|
|
41
|
+
"effect/*": [
|
|
42
|
+
"./*.ts"
|
|
43
|
+
]
|
|
44
|
+
}
|
|
37
45
|
},
|
|
38
46
|
"include": [
|
|
39
47
|
"**/*"
|
/package/dist/{RuntimeFlagsPatch-902b4680.cjs.prod.js → RuntimeFlagsPatch-35ed8dee.cjs.prod.js}
RENAMED
|
File without changes
|
/package/dist/{RuntimeFlagsPatch-cf423492.cjs.dev.js → RuntimeFlagsPatch-9cbc441d.cjs.dev.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|