effect 2.0.0-next.37 → 2.0.0-next.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Bigint/dist/effect-Bigint.cjs.dev.js +5 -5
- package/Bigint/dist/effect-Bigint.cjs.prod.js +5 -5
- package/Bigint/dist/effect-Bigint.esm.js +346 -5
- package/Boolean/dist/effect-Boolean.cjs.dev.js +5 -5
- package/Boolean/dist/effect-Boolean.cjs.prod.js +5 -5
- package/Boolean/dist/effect-Boolean.esm.js +230 -5
- package/Brand/dist/effect-Brand.cjs.dev.js +20 -20
- package/Brand/dist/effect-Brand.cjs.prod.js +20 -20
- package/Brand/dist/effect-Brand.esm.js +204 -20
- package/Cache/dist/effect-Cache.cjs.dev.js +72 -72
- package/Cache/dist/effect-Cache.cjs.prod.js +72 -72
- package/Cache/dist/effect-Cache.esm.js +111 -74
- package/Cause/dist/effect-Cause.cjs.dev.js +32 -32
- package/Cause/dist/effect-Cause.cjs.prod.js +32 -32
- package/Cause/dist/effect-Cause.esm.js +668 -33
- package/Channel/dist/effect-Channel.cjs.dev.js +105 -105
- package/Channel/dist/effect-Channel.cjs.prod.js +105 -105
- package/Channel/dist/effect-Channel.esm.js +1001 -107
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +3 -3
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +3 -3
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.esm.js +112 -3
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +3 -3
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +3 -3
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.esm.js +60 -3
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +3 -3
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +3 -3
- package/ChannelMergeState/dist/effect-ChannelMergeState.esm.js +101 -3
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +3 -3
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +3 -3
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.esm.js +84 -3
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +89 -89
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +89 -89
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.esm.js +47 -91
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +3 -3
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +3 -3
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.esm.js +84 -3
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +3 -3
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +3 -3
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.esm.js +83 -3
- package/Chunk/dist/effect-Chunk.cjs.dev.js +20 -20
- package/Chunk/dist/effect-Chunk.cjs.prod.js +20 -20
- package/Chunk/dist/effect-Chunk.esm.js +1084 -20
- package/Clock/dist/effect-Clock.cjs.dev.js +40 -40
- package/Clock/dist/effect-Clock.cjs.prod.js +40 -40
- package/Clock/dist/effect-Clock.esm.js +78 -42
- package/Config/dist/effect-Config.cjs.dev.js +36 -36
- package/Config/dist/effect-Config.cjs.prod.js +36 -36
- package/Config/dist/effect-Config.esm.js +321 -37
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +21 -21
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +21 -21
- package/ConfigError/dist/effect-ConfigError.esm.js +185 -21
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +38 -38
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +38 -38
- package/ConfigProvider/dist/effect-ConfigProvider.esm.js +198 -39
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +24 -24
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +24 -24
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.esm.js +70 -24
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +22 -22
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +22 -22
- package/ConfigSecret/dist/effect-ConfigSecret.esm.js +63 -22
- package/Console/dist/effect-Console.cjs.dev.js +81 -81
- package/Console/dist/effect-Console.cjs.prod.js +81 -81
- package/Console/dist/effect-Console.esm.js +154 -83
- package/Context/dist/effect-Context.cjs.dev.js +17 -17
- package/Context/dist/effect-Context.cjs.prod.js +17 -17
- package/Context/dist/effect-Context.esm.js +295 -17
- package/Data/dist/effect-Data.cjs.dev.js +7 -7
- package/Data/dist/effect-Data.cjs.prod.js +7 -7
- package/Data/dist/effect-Data.esm.js +163 -7
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +40 -40
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +40 -40
- package/DefaultServices/dist/effect-DefaultServices.esm.js +24 -42
- package/Deferred/dist/effect-Deferred.cjs.dev.js +32 -32
- package/Deferred/dist/effect-Deferred.cjs.prod.js +32 -32
- package/Deferred/dist/effect-Deferred.esm.js +206 -33
- package/Differ/dist/effect-Differ.cjs.dev.js +25 -25
- package/Differ/dist/effect-Differ.cjs.prod.js +25 -25
- package/Differ/dist/effect-Differ.esm.js +137 -26
- package/Duration/dist/effect-Duration.cjs.dev.js +17 -16
- package/Duration/dist/effect-Duration.cjs.mjs +1 -0
- package/Duration/dist/effect-Duration.cjs.prod.js +17 -16
- package/Duration/dist/effect-Duration.esm.js +438 -16
- package/Effect/dist/effect-Effect.cjs.dev.js +87 -87
- package/Effect/dist/effect-Effect.cjs.prod.js +87 -87
- package/Effect/dist/effect-Effect.esm.js +3093 -89
- package/Effectable/dist/effect-Effectable.cjs.dev.js +10 -10
- package/Effectable/dist/effect-Effectable.cjs.prod.js +10 -10
- package/Effectable/dist/effect-Effectable.esm.js +77 -10
- package/Either/dist/effect-Either.cjs.dev.js +13 -13
- package/Either/dist/effect-Either.cjs.prod.js +13 -13
- package/Either/dist/effect-Either.esm.js +442 -13
- package/Encoding/dist/effect-Encoding.cjs.dev.js +14 -14
- package/Encoding/dist/effect-Encoding.cjs.prod.js +14 -14
- package/Encoding/dist/effect-Encoding.esm.js +123 -14
- package/Equal/dist/effect-Equal.cjs.dev.js +6 -6
- package/Equal/dist/effect-Equal.cjs.prod.js +6 -6
- package/Equal/dist/effect-Equal.esm.js +57 -6
- package/Equivalence/dist/effect-Equivalence.cjs.dev.js +2 -2
- package/Equivalence/dist/effect-Equivalence.cjs.prod.js +2 -2
- package/Equivalence/dist/effect-Equivalence.esm.js +196 -2
- package/Error/dist/effect-Error.cjs.dev.js +89 -89
- package/Error/dist/effect-Error.cjs.prod.js +89 -89
- package/Error/dist/effect-Error.esm.js +47 -91
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.dev.js +2 -2
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.prod.js +2 -2
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.esm.js +99 -2
- package/Exit/dist/effect-Exit.cjs.dev.js +32 -32
- package/Exit/dist/effect-Exit.cjs.prod.js +32 -32
- package/Exit/dist/effect-Exit.esm.js +332 -33
- package/Fiber/dist/effect-Fiber.cjs.dev.js +75 -75
- package/Fiber/dist/effect-Fiber.cjs.prod.js +75 -75
- package/Fiber/dist/effect-Fiber.esm.js +423 -77
- package/FiberId/dist/effect-FiberId.cjs.dev.js +19 -19
- package/FiberId/dist/effect-FiberId.cjs.prod.js +19 -19
- package/FiberId/dist/effect-FiberId.esm.js +161 -20
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +73 -73
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +73 -73
- package/FiberRef/dist/effect-FiberRef.esm.js +289 -75
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +33 -33
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +33 -33
- package/FiberRefs/dist/effect-FiberRefs.esm.js +107 -34
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +34 -34
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +34 -34
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.esm.js +76 -35
- package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +7 -7
- package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +7 -7
- package/FiberStatus/dist/effect-FiberStatus.esm.js +89 -7
- package/Function/dist/effect-Function.cjs.dev.js +1 -1
- package/Function/dist/effect-Function.cjs.prod.js +1 -1
- package/Function/dist/effect-Function.esm.js +492 -1
- package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +1 -1
- package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +1 -1
- package/GlobalValue/dist/effect-GlobalValue.esm.js +20 -1
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +106 -106
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +106 -106
- package/GroupBy/dist/effect-GroupBy.esm.js +63 -108
- package/Hash/dist/effect-Hash.cjs.dev.js +5 -5
- package/Hash/dist/effect-Hash.cjs.prod.js +5 -5
- package/Hash/dist/effect-Hash.esm.js +164 -5
- package/HashMap/dist/effect-HashMap.cjs.dev.js +17 -17
- package/HashMap/dist/effect-HashMap.cjs.prod.js +17 -17
- package/HashMap/dist/effect-HashMap.esm.js +287 -18
- package/HashSet/dist/effect-HashSet.cjs.dev.js +17 -17
- package/HashSet/dist/effect-HashSet.cjs.prod.js +17 -17
- package/HashSet/dist/effect-HashSet.esm.js +227 -18
- package/Hub/dist/effect-Hub.cjs.dev.js +72 -72
- package/Hub/dist/effect-Hub.cjs.prod.js +72 -72
- package/Hub/dist/effect-Hub.esm.js +148 -74
- package/Inspectable/dist/effect-Inspectable.cjs.dev.js +1 -1
- package/Inspectable/dist/effect-Inspectable.cjs.prod.js +1 -1
- package/Inspectable/dist/effect-Inspectable.esm.js +38 -1
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +73 -73
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +73 -73
- package/KeyedPool/dist/effect-KeyedPool.esm.js +104 -75
- package/Layer/dist/effect-Layer.cjs.dev.js +81 -81
- package/Layer/dist/effect-Layer.cjs.prod.js +81 -81
- package/Layer/dist/effect-Layer.esm.js +557 -83
- package/List/dist/effect-List.cjs.dev.js +21 -21
- package/List/dist/effect-List.cjs.prod.js +21 -21
- package/List/dist/effect-List.esm.js +816 -21
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +32 -32
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +32 -32
- package/LogLevel/dist/effect-LogLevel.esm.js +202 -33
- package/LogSpan/dist/effect-LogSpan.cjs.dev.js +1 -1
- package/LogSpan/dist/effect-LogSpan.cjs.prod.js +1 -1
- package/LogSpan/dist/effect-LogSpan.esm.js +24 -1
- package/Logger/dist/effect-Logger.cjs.dev.js +83 -83
- package/Logger/dist/effect-Logger.cjs.prod.js +83 -83
- package/Logger/dist/effect-Logger.esm.js +198 -85
- package/Metric/dist/effect-Metric.cjs.dev.js +69 -69
- package/Metric/dist/effect-Metric.cjs.prod.js +69 -69
- package/Metric/dist/effect-Metric.esm.js +395 -71
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +22 -22
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +22 -22
- package/MetricBoundaries/dist/effect-MetricBoundaries.esm.js +52 -22
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +26 -26
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +26 -26
- package/MetricHook/dist/effect-MetricHook.esm.js +68 -27
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +22 -22
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +22 -22
- package/MetricKey/dist/effect-MetricKey.esm.js +104 -23
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +18 -18
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +18 -18
- package/MetricKeyType/dist/effect-MetricKeyType.esm.js +147 -18
- package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +9 -9
- package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +9 -9
- package/MetricLabel/dist/effect-MetricLabel.esm.js +41 -9
- package/MetricPair/dist/effect-MetricPair.cjs.dev.js +3 -3
- package/MetricPair/dist/effect-MetricPair.cjs.prod.js +3 -3
- package/MetricPair/dist/effect-MetricPair.esm.js +38 -3
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +75 -75
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +75 -75
- package/MetricPolling/dist/effect-MetricPolling.esm.js +84 -77
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +32 -32
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +32 -32
- package/MetricRegistry/dist/effect-MetricRegistry.esm.js +28 -33
- package/MetricState/dist/effect-MetricState.cjs.dev.js +9 -9
- package/MetricState/dist/effect-MetricState.cjs.prod.js +9 -9
- package/MetricState/dist/effect-MetricState.esm.js +151 -9
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +19 -19
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +19 -19
- package/MutableHashMap/dist/effect-MutableHashMap.esm.js +128 -20
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +20 -20
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +20 -20
- package/MutableHashSet/dist/effect-MutableHashSet.esm.js +90 -21
- package/MutableList/dist/effect-MutableList.cjs.dev.js +4 -4
- package/MutableList/dist/effect-MutableList.cjs.prod.js +4 -4
- package/MutableList/dist/effect-MutableList.esm.js +264 -4
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +22 -22
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +22 -22
- package/MutableQueue/dist/effect-MutableQueue.esm.js +187 -22
- package/MutableRef/dist/effect-MutableRef.cjs.dev.js +9 -9
- package/MutableRef/dist/effect-MutableRef.cjs.prod.js +9 -9
- package/MutableRef/dist/effect-MutableRef.esm.js +156 -9
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.dev.js +1 -1
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.prod.js +1 -1
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.esm.js +28 -1
- package/Number/dist/effect-Number.cjs.dev.js +5 -5
- package/Number/dist/effect-Number.cjs.prod.js +5 -5
- package/Number/dist/effect-Number.esm.js +369 -5
- package/Option/dist/effect-Option.cjs.dev.js +15 -15
- package/Option/dist/effect-Option.cjs.prod.js +15 -15
- package/Option/dist/effect-Option.esm.js +1071 -15
- package/Order/dist/effect-Order.cjs.dev.js +2 -2
- package/Order/dist/effect-Order.cjs.prod.js +2 -2
- package/Order/dist/effect-Order.esm.js +263 -2
- package/Ordering/dist/effect-Ordering.cjs.dev.js +2 -2
- package/Ordering/dist/effect-Ordering.cjs.prod.js +2 -2
- package/Ordering/dist/effect-Ordering.esm.js +88 -2
- package/Pipeable/dist/effect-Pipeable.cjs.dev.js +1 -1
- package/Pipeable/dist/effect-Pipeable.cjs.prod.js +1 -1
- package/Pipeable/dist/effect-Pipeable.esm.js +44 -1
- package/Pool/dist/effect-Pool.cjs.dev.js +73 -73
- package/Pool/dist/effect-Pool.cjs.prod.js +73 -73
- package/Pool/dist/effect-Pool.esm.js +104 -75
- package/Predicate/dist/effect-Predicate.cjs.dev.js +2 -2
- package/Predicate/dist/effect-Predicate.cjs.prod.js +2 -2
- package/Predicate/dist/effect-Predicate.esm.js +634 -2
- package/Queue/dist/effect-Queue.cjs.dev.js +72 -72
- package/Queue/dist/effect-Queue.cjs.prod.js +72 -72
- package/Queue/dist/effect-Queue.esm.js +328 -74
- package/Random/dist/effect-Random.cjs.dev.js +40 -40
- package/Random/dist/effect-Random.cjs.prod.js +40 -40
- package/Random/dist/effect-Random.esm.js +83 -42
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +19 -19
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +19 -19
- package/ReadonlyArray/dist/effect-ReadonlyArray.esm.js +1445 -19
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +17 -17
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +17 -17
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.esm.js +518 -17
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +21 -21
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +21 -21
- package/RedBlackTree/dist/effect-RedBlackTree.esm.js +314 -22
- package/Ref/dist/effect-Ref.cjs.dev.js +32 -32
- package/Ref/dist/effect-Ref.cjs.prod.js +32 -32
- package/Ref/dist/effect-Ref.esm.js +111 -33
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +82 -82
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +82 -82
- package/Reloadable/dist/effect-Reloadable.esm.js +88 -84
- package/Request/dist/effect-Request.cjs.dev.js +72 -72
- package/Request/dist/effect-Request.cjs.prod.js +72 -72
- package/Request/dist/effect-Request.esm.js +160 -74
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +89 -89
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +89 -89
- package/RequestBlock/dist/effect-RequestBlock.esm.js +103 -91
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +89 -89
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +89 -89
- package/RequestResolver/dist/effect-RequestResolver.esm.js +191 -91
- package/Resource/dist/effect-Resource.cjs.dev.js +77 -77
- package/Resource/dist/effect-Resource.cjs.prod.js +77 -77
- package/Resource/dist/effect-Resource.esm.js +70 -79
- package/Runtime/dist/effect-Runtime.cjs.dev.js +77 -77
- package/Runtime/dist/effect-Runtime.cjs.prod.js +77 -77
- package/Runtime/dist/effect-Runtime.esm.js +157 -79
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +83 -83
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +83 -83
- package/RuntimeFlags/dist/effect-RuntimeFlags.esm.js +305 -85
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +26 -26
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +26 -26
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.esm.js +158 -27
- package/STM/dist/effect-STM.cjs.dev.js +110 -110
- package/STM/dist/effect-STM.cjs.prod.js +110 -110
- package/STM/dist/effect-STM.esm.js +1193 -112
- package/Schedule/dist/effect-Schedule.cjs.dev.js +55 -55
- package/Schedule/dist/effect-Schedule.cjs.prod.js +55 -55
- package/Schedule/dist/effect-Schedule.esm.js +957 -57
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +24 -24
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +24 -24
- package/ScheduleDecision/dist/effect-ScheduleDecision.esm.js +48 -24
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +17 -17
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +17 -17
- package/ScheduleInterval/dist/effect-ScheduleInterval.esm.js +130 -17
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +23 -23
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +23 -23
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.esm.js +105 -23
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +32 -32
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +32 -32
- package/Scheduler/dist/effect-Scheduler.esm.js +326 -34
- package/Scope/dist/effect-Scope.cjs.dev.js +69 -69
- package/Scope/dist/effect-Scope.cjs.prod.js +69 -69
- package/Scope/dist/effect-Scope.esm.js +117 -71
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +73 -73
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +73 -73
- package/ScopedCache/dist/effect-ScopedCache.esm.js +52 -75
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +77 -77
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +77 -77
- package/ScopedRef/dist/effect-ScopedRef.esm.js +71 -79
- package/Sink/dist/effect-Sink.cjs.dev.js +99 -99
- package/Sink/dist/effect-Sink.cjs.prod.js +99 -99
- package/Sink/dist/effect-Sink.esm.js +997 -101
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +22 -22
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +22 -22
- package/SortedMap/dist/effect-SortedMap.esm.js +168 -23
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +22 -22
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +22 -22
- package/SortedSet/dist/effect-SortedSet.esm.js +263 -23
- package/Stream/dist/effect-Stream.cjs.dev.js +106 -106
- package/Stream/dist/effect-Stream.cjs.prod.js +106 -106
- package/Stream/dist/effect-Stream.esm.js +2879 -108
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.dev.js +2 -2
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.prod.js +2 -2
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.esm.js +97 -2
- package/String/dist/effect-String.cjs.dev.js +17 -17
- package/String/dist/effect-String.cjs.prod.js +17 -17
- package/String/dist/effect-String.esm.js +600 -17
- package/Struct/dist/effect-Struct.cjs.dev.js +4 -4
- package/Struct/dist/effect-Struct.cjs.prod.js +4 -4
- package/Struct/dist/effect-Struct.esm.js +125 -4
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +106 -106
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +106 -106
- package/SubscriptionRef/dist/effect-SubscriptionRef.esm.js +160 -108
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +83 -83
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +83 -83
- package/Supervisor/dist/effect-Supervisor.esm.js +148 -85
- package/Symbol/dist/effect-Symbol.cjs.dev.js +4 -4
- package/Symbol/dist/effect-Symbol.cjs.prod.js +4 -4
- package/Symbol/dist/effect-Symbol.esm.js +30 -4
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +76 -76
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +76 -76
- package/SynchronizedRef/dist/effect-SynchronizedRef.esm.js +160 -78
- package/TArray/dist/effect-TArray.cjs.dev.js +112 -112
- package/TArray/dist/effect-TArray.cjs.prod.js +112 -112
- package/TArray/dist/effect-TArray.esm.js +367 -114
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +111 -111
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +111 -111
- package/TDeferred/dist/effect-TDeferred.esm.js +63 -113
- package/THub/dist/effect-THub.cjs.dev.js +113 -113
- package/THub/dist/effect-THub.cjs.prod.js +113 -113
- package/THub/dist/effect-THub.esm.js +157 -115
- package/TMap/dist/effect-TMap.cjs.dev.js +114 -114
- package/TMap/dist/effect-TMap.cjs.prod.js +114 -114
- package/TMap/dist/effect-TMap.esm.js +373 -116
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +111 -111
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +111 -111
- package/TPriorityQueue/dist/effect-TPriorityQueue.esm.js +184 -113
- package/TQueue/dist/effect-TQueue.cjs.dev.js +113 -113
- package/TQueue/dist/effect-TQueue.cjs.prod.js +113 -113
- package/TQueue/dist/effect-TQueue.esm.js +293 -115
- package/TRandom/dist/effect-TRandom.cjs.dev.js +112 -112
- package/TRandom/dist/effect-TRandom.cjs.prod.js +112 -112
- package/TRandom/dist/effect-TRandom.esm.js +93 -114
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +110 -110
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +110 -110
- package/TReentrantLock/dist/effect-TReentrantLock.esm.js +199 -112
- package/TRef/dist/effect-TRef.cjs.dev.js +110 -110
- package/TRef/dist/effect-TRef.cjs.prod.js +110 -110
- package/TRef/dist/effect-TRef.esm.js +116 -112
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +112 -112
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +112 -112
- package/TSemaphore/dist/effect-TSemaphore.esm.js +97 -114
- package/TSet/dist/effect-TSet.cjs.dev.js +114 -114
- package/TSet/dist/effect-TSet.cjs.prod.js +114 -114
- package/TSet/dist/effect-TSet.esm.js +268 -116
- package/Take/dist/effect-Take.cjs.dev.js +89 -89
- package/Take/dist/effect-Take.cjs.prod.js +89 -89
- package/Take/dist/effect-Take.esm.js +190 -91
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +25 -25
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +25 -25
- package/TestAnnotation/dist/effect-TestAnnotation.esm.js +111 -26
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +2 -2
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +2 -2
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.esm.js +101 -2
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +57 -57
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +57 -57
- package/TestAnnotations/dist/effect-TestAnnotations.esm.js +83 -59
- package/TestClock/dist/effect-TestClock.cjs.dev.js +85 -85
- package/TestClock/dist/effect-TestClock.cjs.prod.js +85 -85
- package/TestClock/dist/effect-TestClock.esm.js +411 -87
- package/TestConfig/dist/effect-TestConfig.cjs.dev.js +18 -18
- package/TestConfig/dist/effect-TestConfig.cjs.prod.js +18 -18
- package/TestConfig/dist/effect-TestConfig.esm.js +27 -18
- package/TestContext/dist/effect-TestContext.cjs.dev.js +96 -96
- package/TestContext/dist/effect-TestContext.cjs.prod.js +96 -96
- package/TestContext/dist/effect-TestContext.esm.js +29 -98
- package/TestLive/dist/effect-TestLive.cjs.dev.js +40 -40
- package/TestLive/dist/effect-TestLive.cjs.prod.js +40 -40
- package/TestLive/dist/effect-TestLive.esm.js +48 -42
- package/TestServices/dist/effect-TestServices.cjs.dev.js +94 -94
- package/TestServices/dist/effect-TestServices.cjs.prod.js +94 -94
- package/TestServices/dist/effect-TestServices.esm.js +269 -96
- package/TestSized/dist/effect-TestSized.cjs.dev.js +32 -32
- package/TestSized/dist/effect-TestSized.cjs.prod.js +32 -32
- package/TestSized/dist/effect-TestSized.esm.js +50 -33
- package/Tracer/dist/effect-Tracer.cjs.dev.js +40 -40
- package/Tracer/dist/effect-Tracer.cjs.prod.js +40 -40
- package/Tracer/dist/effect-Tracer.esm.js +68 -42
- package/Tuple/dist/effect-Tuple.cjs.dev.js +4 -4
- package/Tuple/dist/effect-Tuple.cjs.prod.js +4 -4
- package/Tuple/dist/effect-Tuple.esm.js +173 -4
- package/Unify/dist/effect-Unify.cjs.dev.js +2 -2
- package/Unify/dist/effect-Unify.cjs.prod.js +2 -2
- package/Unify/dist/effect-Unify.esm.js +40 -2
- package/Utils/dist/effect-Utils.cjs.dev.js +3 -3
- package/Utils/dist/effect-Utils.cjs.prod.js +3 -3
- package/Utils/dist/effect-Utils.esm.js +352 -3
- package/dist/Bigint-0ebd807c.cjs.dev.js +392 -0
- package/dist/Bigint-912c77f3.cjs.prod.js +392 -0
- package/dist/Boolean-97839b78.cjs.prod.js +264 -0
- package/dist/Boolean-f0bc3abf.cjs.dev.js +264 -0
- package/dist/Brand-93578f43.cjs.prod.js +224 -0
- package/dist/Brand-b238487d.cjs.dev.js +224 -0
- package/dist/Cache-1688e584.cjs.dev.js +127 -0
- package/dist/Cache-8f2f2b55.cjs.prod.js +127 -0
- package/dist/Cause-384e2165.cjs.prod.js +791 -0
- package/dist/Cause-96c29074.cjs.dev.js +791 -0
- package/dist/Channel-2ce019f1.cjs.prod.js +1217 -0
- package/dist/Channel-544108d2.cjs.dev.js +1217 -0
- package/dist/ChannelChildExecutorDecision-168278f6.cjs.prod.js +136 -0
- package/dist/ChannelChildExecutorDecision-b0e715de.cjs.dev.js +136 -0
- package/dist/ChannelMergeDecision-9c266aeb.cjs.prod.js +78 -0
- package/dist/ChannelMergeDecision-eeaf4779.cjs.dev.js +78 -0
- package/dist/ChannelMergeState-4366d090.cjs.prod.js +125 -0
- package/dist/ChannelMergeState-abce1d88.cjs.dev.js +125 -0
- package/dist/ChannelMergeStrategy-6193b8e0.cjs.prod.js +104 -0
- package/dist/ChannelMergeStrategy-e7ddbb7a.cjs.dev.js +104 -0
- package/dist/ChannelSingleProducerAsyncInput-62f4749c.cjs.dev.js +55 -0
- package/dist/ChannelSingleProducerAsyncInput-6e0084c3.cjs.prod.js +55 -0
- package/dist/ChannelUpstreamPullRequest-1ca7d2bd.cjs.dev.js +104 -0
- package/dist/ChannelUpstreamPullRequest-208751c3.cjs.prod.js +104 -0
- package/dist/ChannelUpstreamPullStrategy-266b5a77.cjs.prod.js +103 -0
- package/dist/ChannelUpstreamPullStrategy-ec57dc70.cjs.dev.js +103 -0
- package/dist/Chunk-6cf5a8e6.cjs.prod.js +1248 -0
- package/dist/Chunk-bd290b8e.cjs.dev.js +1248 -0
- package/dist/Clock-09ecce0a.cjs.prod.js +97 -0
- package/dist/Clock-bec722c1.cjs.dev.js +97 -0
- package/dist/Config-85ae6286.cjs.prod.js +393 -0
- package/dist/Config-dc58cf69.cjs.dev.js +393 -0
- package/dist/ConfigError-c1f762d2.cjs.dev.js +225 -0
- package/dist/ConfigError-cee682fa.cjs.prod.js +225 -0
- package/dist/ConfigProvider-8341a5f5.cjs.prod.js +240 -0
- package/dist/ConfigProvider-de45b085.cjs.dev.js +240 -0
- package/dist/ConfigProviderPathPatch-52422b32.cjs.prod.js +86 -0
- package/dist/ConfigProviderPathPatch-d22442e3.cjs.dev.js +86 -0
- package/dist/ConfigSecret-c76717e8.cjs.dev.js +83 -0
- package/dist/ConfigSecret-ebab2ae7.cjs.prod.js +83 -0
- package/dist/Console-150b7b40.cjs.prod.js +271 -0
- package/dist/Console-4825ee9f.cjs.dev.js +271 -0
- package/dist/Context-25a49952.cjs.prod.js +327 -0
- package/dist/Context-3c9e986b.cjs.dev.js +327 -0
- package/dist/Context-96739709.cjs.dev.js +222 -0
- package/dist/Context-f958cabc.cjs.prod.js +222 -0
- package/dist/Data-07dc27f1.cjs.prod.js +237 -0
- package/dist/Data-85559fb3.cjs.dev.js +237 -0
- package/dist/DefaultServices-d5740d37.cjs.dev.js +34 -0
- package/dist/DefaultServices-df7495bb.cjs.prod.js +34 -0
- package/dist/Deferred-5d5c886c.cjs.dev.js +253 -0
- package/dist/Deferred-9d825b3b.cjs.prod.js +253 -0
- package/dist/Differ-0122f60e.cjs.dev.js +992 -0
- package/dist/Differ-0bd34066.cjs.prod.js +992 -0
- package/dist/Duration-0bc08d03.cjs.prod.js +508 -0
- package/dist/Duration-604874d1.cjs.dev.js +508 -0
- package/dist/Effect-1442090f.cjs.prod.js +3740 -0
- package/dist/Effect-6e9780e6.cjs.dev.js +3740 -0
- package/dist/Effectable-04f3cd30.cjs.dev.js +99 -0
- package/dist/Effectable-8997112d.cjs.prod.js +99 -0
- package/dist/Effectable-a6403e5f.cjs.dev.js +181 -0
- package/dist/Effectable-f867d1cb.cjs.prod.js +181 -0
- package/dist/Either-3fab3796.cjs.prod.js +502 -0
- package/dist/Either-9c349424.cjs.dev.js +178 -0
- package/dist/Either-a806809d.cjs.dev.js +502 -0
- package/dist/Either-d03d5f05.cjs.prod.js +178 -0
- package/dist/Encoding-0cab52d5.cjs.prod.js +309 -0
- package/dist/Encoding-d993b1b0.cjs.dev.js +309 -0
- package/dist/Equal-281b6ca8.cjs.dev.js +71 -0
- package/dist/Equal-ce9977a8.cjs.prod.js +71 -0
- package/dist/Equivalence-0bc84518.cjs.prod.js +238 -0
- package/dist/Equivalence-de7a0d51.cjs.dev.js +238 -0
- package/dist/Error-5ab157f2.cjs.dev.js +57 -0
- package/dist/Error-e9d25c53.cjs.prod.js +57 -0
- package/dist/ExecutionStrategy-89fbe735.cjs.dev.js +180 -0
- package/dist/ExecutionStrategy-dc778180.cjs.prod.js +180 -0
- package/dist/Exit-5691142c.cjs.prod.js +408 -0
- package/dist/Exit-a23874e1.cjs.dev.js +408 -0
- package/dist/Fiber-6432d5f7.cjs.dev.js +521 -0
- package/dist/Fiber-e61b3c65.cjs.prod.js +521 -0
- package/dist/FiberId-929dcce4.cjs.dev.js +443 -0
- package/dist/FiberId-b79e8047.cjs.prod.js +443 -0
- package/dist/FiberRef-1db44a9b.cjs.dev.js +385 -0
- package/dist/FiberRef-efb4a3ac.cjs.prod.js +385 -0
- package/dist/FiberRefs-43bfd8b9.cjs.dev.js +135 -0
- package/dist/FiberRefs-4cb171f7.cjs.prod.js +135 -0
- package/dist/FiberRefsPatch-5236f61e.cjs.dev.js +90 -0
- package/dist/FiberRefsPatch-cb847553.cjs.prod.js +90 -0
- package/dist/FiberStatus-b82dad24.cjs.prod.js +197 -0
- package/dist/FiberStatus-bac7d58d.cjs.dev.js +197 -0
- package/dist/Function-2e6b0cda.cjs.prod.js +538 -0
- package/dist/Function-41ce433d.cjs.dev.js +538 -0
- package/dist/GlobalValue-81ab6908.cjs.dev.js +28 -0
- package/dist/GlobalValue-cb645c99.cjs.prod.js +28 -0
- package/dist/GroupBy-8a8149b4.cjs.dev.js +79 -0
- package/dist/GroupBy-b74084af.cjs.prod.js +79 -0
- package/dist/Hash-1bd73210.cjs.prod.js +192 -0
- package/dist/Hash-bd154268.cjs.dev.js +192 -0
- package/dist/HashMap-12668911.cjs.prod.js +361 -0
- package/dist/HashMap-68e290b6.cjs.dev.js +361 -0
- package/dist/HashSet-6978c08e.cjs.dev.js +283 -0
- package/dist/HashSet-6fe62df2.cjs.prod.js +965 -0
- package/dist/HashSet-c40a52b1.cjs.prod.js +283 -0
- package/dist/HashSet-ece2cfe8.cjs.dev.js +965 -0
- package/dist/Hub-6e64debd.cjs.prod.js +1280 -0
- package/dist/Hub-74834668.cjs.dev.js +1280 -0
- package/dist/Inspectable-3c4a0f5d.cjs.prod.js +50 -0
- package/dist/Inspectable-ac929af4.cjs.dev.js +50 -0
- package/dist/KeyedPool-b05481e9.cjs.dev.js +282 -0
- package/dist/KeyedPool-cd8abf95.cjs.prod.js +282 -0
- package/dist/Layer-297269fd.cjs.prod.js +687 -0
- package/dist/Layer-c69f3fdc.cjs.dev.js +687 -0
- package/dist/List-c6ea7efe.cjs.dev.js +912 -0
- package/dist/List-d9775087.cjs.prod.js +912 -0
- package/dist/LogLevel-99f64f82.cjs.dev.js +240 -0
- package/dist/LogLevel-e9848e15.cjs.prod.js +240 -0
- package/dist/LogSpan-c905a192.cjs.prod.js +46 -0
- package/dist/LogSpan-e345ba58.cjs.dev.js +46 -0
- package/dist/Logger-680763c7.cjs.dev.js +275 -0
- package/dist/Logger-7a664cc3.cjs.prod.js +275 -0
- package/dist/Metric-09d012ff.cjs.dev.js +488 -0
- package/dist/Metric-b7563a68.cjs.prod.js +488 -0
- package/dist/MetricBoundaries-cf5df220.cjs.prod.js +68 -0
- package/dist/MetricBoundaries-f5f5aae1.cjs.dev.js +68 -0
- package/dist/MetricHook-3104e93b.cjs.dev.js +90 -0
- package/dist/MetricHook-efd05d72.cjs.prod.js +90 -0
- package/dist/MetricKey-9cfcaec8.cjs.prod.js +130 -0
- package/dist/MetricKey-c3ba437e.cjs.dev.js +130 -0
- package/dist/MetricKeyType-6d2d9036.cjs.prod.js +187 -0
- package/dist/MetricKeyType-c1d7ebe8.cjs.dev.js +187 -0
- package/dist/MetricLabel-6a1886c6.cjs.dev.js +53 -0
- package/dist/MetricLabel-7e1d569e.cjs.prod.js +53 -0
- package/dist/MetricPair-658ab13d.cjs.dev.js +50 -0
- package/dist/MetricPair-aec13967.cjs.prod.js +50 -0
- package/dist/MetricPolling-5af0ff67.cjs.dev.js +177 -0
- package/dist/MetricPolling-a0a4e798.cjs.prod.js +177 -0
- package/dist/MetricRegistry-e4af936b.cjs.dev.js +38 -0
- package/dist/MetricRegistry-ff6df283.cjs.prod.js +38 -0
- package/dist/MetricState-b65340a4.cjs.dev.js +191 -0
- package/dist/MetricState-bd6a5001.cjs.prod.js +191 -0
- package/dist/MutableHashMap-74e83e84.cjs.dev.js +154 -0
- package/dist/MutableHashMap-95493edb.cjs.prod.js +154 -0
- package/dist/MutableHashSet-780dfd63.cjs.prod.js +110 -0
- package/dist/MutableHashSet-ec8d7cc4.cjs.dev.js +110 -0
- package/dist/MutableList-58124ef2.cjs.dev.js +296 -0
- package/dist/MutableList-732af09a.cjs.prod.js +296 -0
- package/dist/MutableQueue-0e9f2466.cjs.dev.js +215 -0
- package/dist/MutableQueue-f8aba856.cjs.prod.js +215 -0
- package/dist/MutableRef-4a2f1f23.cjs.prod.js +194 -0
- package/dist/MutableRef-724c4082.cjs.dev.js +194 -0
- package/dist/NonEmptyIterable-418cef14.cjs.prod.js +36 -0
- package/dist/NonEmptyIterable-bb452f41.cjs.dev.js +36 -0
- package/dist/Number-588f6483.cjs.dev.js +417 -0
- package/dist/Number-cb2ba2e8.cjs.prod.js +417 -0
- package/dist/Option-02025c86.cjs.prod.js +1198 -0
- package/dist/Option-03997d77.cjs.dev.js +1198 -0
- package/dist/Order-28bdebd2.cjs.dev.js +321 -0
- package/dist/Order-8a112bfb.cjs.prod.js +321 -0
- package/dist/Ordering-60bf9127.cjs.prod.js +104 -0
- package/dist/Ordering-b955b746.cjs.dev.js +104 -0
- package/dist/Pipeable-4698db72.cjs.dev.js +52 -0
- package/dist/Pipeable-d3ec6711.cjs.prod.js +52 -0
- package/dist/Pool-54389592.cjs.prod.js +122 -0
- package/dist/Pool-fe1b506a.cjs.dev.js +122 -0
- package/dist/Predicate-9e859c9c.cjs.dev.js +718 -0
- package/dist/Predicate-daa86e61.cjs.prod.js +718 -0
- package/dist/Queue-5f954287.cjs.prod.js +394 -0
- package/dist/Queue-8d082fe4.cjs.dev.js +394 -0
- package/dist/Random-35304046.cjs.dev.js +104 -0
- package/dist/Random-b4709b6a.cjs.prod.js +104 -0
- package/dist/ReadonlyArray-48949ee7.cjs.dev.js +1721 -0
- package/dist/ReadonlyArray-8157f697.cjs.prod.js +1721 -0
- package/dist/ReadonlyArray-9a1474f6.cjs.dev.js +10 -0
- package/dist/ReadonlyArray-f9ed7a05.cjs.prod.js +10 -0
- package/dist/ReadonlyRecord-605a625b.cjs.dev.js +568 -0
- package/dist/ReadonlyRecord-8db8bada.cjs.prod.js +568 -0
- package/dist/RedBlackTree-e6bd147c.cjs.dev.js +1669 -0
- package/dist/RedBlackTree-eb41ea8a.cjs.prod.js +1669 -0
- package/dist/Ref-30e5ee58.cjs.prod.js +282 -0
- package/dist/Ref-af783b72.cjs.dev.js +282 -0
- package/dist/Reloadable-2b8ba75d.cjs.prod.js +169 -0
- package/dist/Reloadable-b01c9297.cjs.dev.js +169 -0
- package/dist/Request-53592fe4.cjs.prod.js +190 -0
- package/dist/Request-d3b63af6.cjs.dev.js +190 -0
- package/dist/RequestBlock-1aa4c3bd.cjs.dev.js +124 -0
- package/dist/RequestBlock-8c3b51d1.cjs.prod.js +124 -0
- package/dist/RequestResolver-133197d5.cjs.prod.js +233 -0
- package/dist/RequestResolver-86c21b80.cjs.dev.js +233 -0
- package/dist/Resource-2530fe45.cjs.prod.js +118 -0
- package/dist/Resource-e50b4b25.cjs.dev.js +118 -0
- package/dist/Runtime-0d643f0c.cjs.prod.js +191 -0
- package/dist/Runtime-c4b887ff.cjs.dev.js +191 -0
- package/dist/RuntimeFlags-9d8fac5a.cjs.prod.js +381 -0
- package/dist/RuntimeFlags-f67e3984.cjs.dev.js +381 -0
- package/dist/RuntimeFlagsPatch-130e990c.cjs.dev.js +411 -0
- package/dist/RuntimeFlagsPatch-5570758d.cjs.prod.js +411 -0
- package/dist/STM-23270be2.cjs.prod.js +1447 -0
- package/dist/STM-5a4c9921.cjs.dev.js +1447 -0
- package/dist/Schedule-0444792d.cjs.prod.js +1159 -0
- package/dist/Schedule-b6c7b49a.cjs.dev.js +1159 -0
- package/dist/ScheduleDecision-369f2d2b.cjs.prod.js +106 -0
- package/dist/ScheduleDecision-ba8d0e87.cjs.dev.js +106 -0
- package/dist/ScheduleInterval-51f42533.cjs.dev.js +244 -0
- package/dist/ScheduleInterval-78037484.cjs.prod.js +244 -0
- package/dist/ScheduleIntervals-b0bfcf3b.cjs.dev.js +265 -0
- package/dist/ScheduleIntervals-db13140c.cjs.prod.js +265 -0
- package/dist/Scheduler-819ee02a.cjs.prod.js +358 -0
- package/dist/Scheduler-d080442d.cjs.dev.js +358 -0
- package/dist/Scope-311c7eb9.cjs.prod.js +143 -0
- package/dist/Scope-6ba9ec6d.cjs.dev.js +143 -0
- package/dist/ScopedCache-3f58b125.cjs.dev.js +467 -0
- package/dist/ScopedCache-8f99505c.cjs.prod.js +467 -0
- package/dist/ScopedRef-7946d287.cjs.prod.js +87 -0
- package/dist/ScopedRef-b92e1633.cjs.dev.js +87 -0
- package/dist/Sink-9f13da17.cjs.dev.js +1215 -0
- package/dist/Sink-9f82fc3b.cjs.prod.js +1215 -0
- package/dist/SortedMap-bb3311c3.cjs.prod.js +210 -0
- package/dist/SortedMap-f452cc44.cjs.dev.js +210 -0
- package/dist/SortedSet-424670fe.cjs.prod.js +311 -0
- package/dist/SortedSet-f90b14a2.cjs.dev.js +311 -0
- package/dist/Stream-14325ecb.cjs.dev.js +3469 -0
- package/dist/Stream-cf262c16.cjs.prod.js +3469 -0
- package/dist/StreamHaltStrategy-07f544a6.cjs.prod.js +214 -0
- package/dist/StreamHaltStrategy-66a53f66.cjs.dev.js +214 -0
- package/dist/String-23b18ca9.cjs.prod.js +694 -0
- package/dist/String-830aaa3e.cjs.dev.js +694 -0
- package/dist/Struct-14648d76.cjs.dev.js +141 -0
- package/dist/Struct-c6b00f29.cjs.prod.js +141 -0
- package/dist/SubscriptionRef-aa7bdc5f.cjs.prod.js +269 -0
- package/dist/SubscriptionRef-d3c1aa07.cjs.dev.js +269 -0
- package/dist/Supervisor-21087253.cjs.prod.js +170 -0
- package/dist/Supervisor-40dd7ce5.cjs.dev.js +170 -0
- package/dist/Symbol-55d0b3d8.cjs.prod.js +40 -0
- package/dist/Symbol-5d74a5f2.cjs.dev.js +40 -0
- package/dist/SynchronizedRef-3181eb0a.cjs.dev.js +212 -0
- package/dist/SynchronizedRef-c6e0884b.cjs.prod.js +212 -0
- package/dist/TArray-6767b4bd.cjs.prod.js +455 -0
- package/dist/TArray-a0a4c6e6.cjs.dev.js +455 -0
- package/dist/TDeferred-a9839479.cjs.prod.js +129 -0
- package/dist/TDeferred-ac2c4025.cjs.dev.js +129 -0
- package/dist/THub-25b77864.cjs.prod.js +570 -0
- package/dist/THub-38053ae1.cjs.dev.js +570 -0
- package/dist/TMap-91505efa.cjs.prod.js +463 -0
- package/dist/TMap-de8ac080.cjs.dev.js +463 -0
- package/dist/TPriorityQueue-00b65d1a.cjs.prod.js +381 -0
- package/dist/TPriorityQueue-96ff0e15.cjs.dev.js +381 -0
- package/dist/TQueue-5e242ca2.cjs.prod.js +353 -0
- package/dist/TQueue-707762bf.cjs.dev.js +353 -0
- package/dist/TRandom-5eb21d23.cjs.dev.js +203 -0
- package/dist/TRandom-ec9c7bf7.cjs.prod.js +203 -0
- package/dist/TReentrantLock-1b77d76f.cjs.dev.js +456 -0
- package/dist/TReentrantLock-c5a8401e.cjs.prod.js +456 -0
- package/dist/TRef-b87580d7.cjs.prod.js +152 -0
- package/dist/TRef-cf2e8ad7.cjs.dev.js +152 -0
- package/dist/TSemaphore-29503416.cjs.prod.js +197 -0
- package/dist/TSemaphore-50edec08.cjs.dev.js +197 -0
- package/dist/TSet-3c2568e9.cjs.prod.js +444 -0
- package/dist/TSet-bb4775ca.cjs.dev.js +444 -0
- package/dist/Take-684c9901.cjs.dev.js +236 -0
- package/dist/Take-b4c91438.cjs.prod.js +236 -0
- package/dist/TestAnnotation-73be7a68.cjs.dev.js +135 -0
- package/dist/TestAnnotation-b9b93d03.cjs.prod.js +135 -0
- package/dist/TestAnnotationMap-80c87410.cjs.dev.js +125 -0
- package/dist/TestAnnotationMap-e946bab5.cjs.prod.js +125 -0
- package/dist/TestAnnotations-5db95828.cjs.prod.js +97 -0
- package/dist/TestAnnotations-733b39ef.cjs.dev.js +97 -0
- package/dist/TestClock-89a36b89.cjs.prod.js +581 -0
- package/dist/TestClock-e2773846.cjs.dev.js +581 -0
- package/dist/TestConfig-1a73e844.cjs.prod.js +37 -0
- package/dist/TestConfig-e5ffa946.cjs.dev.js +37 -0
- package/dist/TestContext-3328163e.cjs.dev.js +41 -0
- package/dist/TestContext-917bf305.cjs.prod.js +41 -0
- package/dist/TestLive-465ad3ef.cjs.dev.js +60 -0
- package/dist/TestLive-f3232ac4.cjs.prod.js +60 -0
- package/dist/TestServices-605f726e.cjs.prod.js +341 -0
- package/dist/TestServices-921e5c42.cjs.dev.js +341 -0
- package/dist/TestSized-6c1abc21.cjs.dev.js +64 -0
- package/dist/TestSized-a9a87d64.cjs.prod.js +64 -0
- package/dist/Tracer-d06d0b61.cjs.prod.js +81 -0
- package/dist/Tracer-da182c8c.cjs.dev.js +81 -0
- package/dist/Tuple-27ecf3a1.cjs.prod.js +199 -0
- package/dist/Tuple-75d2a389.cjs.dev.js +199 -0
- package/dist/Unify-99be0499.cjs.dev.js +48 -0
- package/dist/Unify-e86fd412.cjs.prod.js +48 -0
- package/dist/Utils-864e1d48.cjs.prod.js +370 -0
- package/dist/Utils-b0c14d1b.cjs.dev.js +370 -0
- package/dist/boundaries-03c7494a.cjs.dev.js +54 -0
- package/dist/boundaries-5d1a46e1.cjs.prod.js +54 -0
- package/dist/cache-6cdc31f7.cjs.dev.js +523 -0
- package/dist/cache-ab7bbfbd.cjs.prod.js +523 -0
- package/dist/childExecutorDecision-2b30946c.cjs.prod.js +98 -0
- package/dist/childExecutorDecision-ad3db696.cjs.dev.js +98 -0
- package/dist/circular-4cb0b79d.cjs.dev.js +341 -0
- package/dist/circular-5b3558d9.cjs.prod.js +341 -0
- package/dist/circular-78011d6b.cjs.dev.js +107 -0
- package/dist/circular-81b4c556.cjs.prod.js +107 -0
- package/dist/config-10f2a1d1.cjs.dev.js +474 -0
- package/dist/config-78feb1ac.cjs.prod.js +474 -0
- package/dist/configError-1686533e.cjs.dev.js +323 -0
- package/dist/configError-6a3652f8.cjs.prod.js +323 -0
- package/dist/configProvider-2b177eac.cjs.prod.js +447 -0
- package/dist/configProvider-e2eb112d.cjs.dev.js +447 -0
- package/dist/configSecret-5812fa69.cjs.dev.js +74 -0
- package/dist/configSecret-ecb6c5b3.cjs.prod.js +74 -0
- package/dist/core-4ced6e17.cjs.prod.js +1072 -0
- package/dist/core-ac668be0.cjs.dev.js +3502 -0
- package/dist/core-c2eb171a.cjs.prod.js +3502 -0
- package/dist/core-d9eea905.cjs.dev.js +1072 -0
- package/dist/core-effect-a9b8ee08.cjs.dev.js +1030 -0
- package/dist/core-effect-bf806dd9.cjs.prod.js +1030 -0
- package/dist/dataSource-abccc876.cjs.prod.js +74 -0
- package/dist/dataSource-d5f79f4e.cjs.dev.js +74 -0
- package/dist/declarations/src/Bigint.d.ts +22 -22
- package/dist/declarations/src/Boolean.d.ts +15 -15
- package/dist/declarations/src/Brand.d.ts +20 -20
- package/dist/declarations/src/Cache.d.ts +14 -14
- package/dist/declarations/src/Cause.d.ts +81 -81
- package/dist/declarations/src/Channel.d.ts +117 -117
- package/dist/declarations/src/ChannelChildExecutorDecision.d.ts +16 -16
- package/dist/declarations/src/ChannelMergeDecision.d.ts +11 -11
- package/dist/declarations/src/ChannelMergeState.d.ts +17 -17
- package/dist/declarations/src/ChannelMergeStrategy.d.ts +13 -13
- package/dist/declarations/src/ChannelSingleProducerAsyncInput.d.ts +5 -5
- package/dist/declarations/src/ChannelUpstreamPullRequest.d.ts +13 -13
- package/dist/declarations/src/ChannelUpstreamPullStrategy.d.ts +13 -13
- package/dist/declarations/src/Chunk.d.ts +84 -84
- package/dist/declarations/src/Clock.d.ts +13 -13
- package/dist/declarations/src/Config.d.ts +40 -40
- package/dist/declarations/src/ConfigError.d.ts +31 -31
- package/dist/declarations/src/ConfigProvider.d.ts +27 -27
- package/dist/declarations/src/ConfigProviderPathPatch.d.ts +11 -11
- package/dist/declarations/src/ConfigSecret.d.ts +12 -12
- package/dist/declarations/src/Console.d.ts +26 -26
- package/dist/declarations/src/Context.d.ts +24 -24
- package/dist/declarations/src/Data.d.ts +22 -22
- package/dist/declarations/src/DefaultServices.d.ts +4 -4
- package/dist/declarations/src/Deferred.d.ts +26 -26
- package/dist/declarations/src/Differ.d.ts +34 -34
- package/dist/declarations/src/Duration.d.ts +42 -37
- package/dist/declarations/src/Duration.d.ts.map +1 -1
- package/dist/declarations/src/Effect.d.ts +351 -351
- package/dist/declarations/src/Effectable.d.ts +16 -16
- package/dist/declarations/src/Either.d.ts +35 -35
- package/dist/declarations/src/Encoding.d.ts +15 -15
- package/dist/declarations/src/Equal.d.ts +6 -6
- package/dist/declarations/src/Equivalence.d.ts +20 -20
- package/dist/declarations/src/Error.d.ts +4 -4
- package/dist/declarations/src/ExecutionStrategy.d.ts +12 -12
- package/dist/declarations/src/Exit.d.ts +41 -41
- package/dist/declarations/src/Fiber.d.ts +57 -57
- package/dist/declarations/src/FiberId.d.ts +23 -23
- package/dist/declarations/src/FiberRef.d.ts +49 -49
- package/dist/declarations/src/FiberRefs.d.ts +14 -14
- package/dist/declarations/src/FiberRefsPatch.d.ts +11 -11
- package/dist/declarations/src/FiberStatus.d.ts +14 -14
- package/dist/declarations/src/Function.d.ts +24 -24
- package/dist/declarations/src/GlobalValue.d.ts +1 -1
- package/dist/declarations/src/GroupBy.d.ts +9 -9
- package/dist/declarations/src/HKT.d.ts +5 -5
- package/dist/declarations/src/Hash.d.ts +12 -12
- package/dist/declarations/src/HashMap.d.ts +37 -37
- package/dist/declarations/src/HashSet.d.ts +28 -28
- package/dist/declarations/src/Hub.d.ts +16 -16
- package/dist/declarations/src/Inspectable.d.ts +6 -6
- package/dist/declarations/src/KeyedPool.d.ts +12 -12
- package/dist/declarations/src/Layer.d.ts +70 -70
- package/dist/declarations/src/List.d.ts +50 -50
- package/dist/declarations/src/LogLevel.d.ts +27 -27
- package/dist/declarations/src/LogSpan.d.ts +3 -3
- package/dist/declarations/src/Logger.d.ts +33 -33
- package/dist/declarations/src/Metric.d.ts +55 -55
- package/dist/declarations/src/MetricBoundaries.d.ts +8 -8
- package/dist/declarations/src/MetricHook.d.ts +20 -20
- package/dist/declarations/src/MetricKey.d.ts +21 -21
- package/dist/declarations/src/MetricKeyType.d.ts +35 -35
- package/dist/declarations/src/MetricLabel.d.ts +6 -6
- package/dist/declarations/src/MetricPair.d.ts +8 -8
- package/dist/declarations/src/MetricPolling.d.ts +11 -11
- package/dist/declarations/src/MetricRegistry.d.ts +5 -5
- package/dist/declarations/src/MetricState.d.ts +33 -33
- package/dist/declarations/src/MutableHashMap.d.ts +12 -12
- package/dist/declarations/src/MutableHashSet.d.ts +9 -9
- package/dist/declarations/src/MutableList.d.ts +13 -13
- package/dist/declarations/src/MutableQueue.d.ts +16 -16
- package/dist/declarations/src/MutableRef.d.ts +18 -18
- package/dist/declarations/src/NonEmptyIterable.d.ts +4 -4
- package/dist/declarations/src/Number.d.ts +22 -22
- package/dist/declarations/src/Option.d.ts +69 -69
- package/dist/declarations/src/Order.d.ts +28 -28
- package/dist/declarations/src/Ordering.d.ts +7 -7
- package/dist/declarations/src/Pipeable.d.ts +3 -3
- package/dist/declarations/src/Pool.d.ts +11 -11
- package/dist/declarations/src/Predicate.d.ts +42 -42
- package/dist/declarations/src/Queue.d.ts +44 -44
- package/dist/declarations/src/Random.d.ts +11 -11
- package/dist/declarations/src/ReadonlyArray.d.ts +139 -139
- package/dist/declarations/src/ReadonlyRecord.d.ts +25 -25
- package/dist/declarations/src/RedBlackTree.d.ts +40 -40
- package/dist/declarations/src/Ref.d.ts +20 -20
- package/dist/declarations/src/Reloadable.d.ts +13 -13
- package/dist/declarations/src/Request.d.ts +29 -29
- package/dist/declarations/src/RequestBlock.d.ts +16 -16
- package/dist/declarations/src/RequestResolver.d.ts +23 -23
- package/dist/declarations/src/Resource.d.ts +10 -10
- package/dist/declarations/src/Runtime.d.ts +22 -22
- package/dist/declarations/src/RuntimeFlags.d.ts +38 -38
- package/dist/declarations/src/RuntimeFlagsPatch.d.ts +18 -18
- package/dist/declarations/src/STM.d.ts +140 -140
- package/dist/declarations/src/Schedule.d.ts +106 -106
- package/dist/declarations/src/ScheduleDecision.d.ts +8 -8
- package/dist/declarations/src/ScheduleInterval.d.ts +16 -16
- package/dist/declarations/src/ScheduleIntervals.d.ts +14 -14
- package/dist/declarations/src/Scheduler.d.ts +34 -34
- package/dist/declarations/src/Scope.d.ts +18 -18
- package/dist/declarations/src/ScopedCache.d.ts +9 -9
- package/dist/declarations/src/ScopedRef.d.ts +10 -10
- package/dist/declarations/src/Sink.d.ts +115 -115
- package/dist/declarations/src/SortedMap.d.ts +21 -21
- package/dist/declarations/src/SortedSet.d.ts +24 -24
- package/dist/declarations/src/Stream.d.ts +303 -303
- package/dist/declarations/src/StreamEmit.d.ts +3 -3
- package/dist/declarations/src/StreamHaltStrategy.d.ts +16 -16
- package/dist/declarations/src/String.d.ts +50 -50
- package/dist/declarations/src/Struct.d.ts +6 -6
- package/dist/declarations/src/SubscriptionRef.d.ts +27 -27
- package/dist/declarations/src/Supervisor.d.ts +23 -23
- package/dist/declarations/src/Symbol.d.ts +3 -3
- package/dist/declarations/src/SynchronizedRef.d.ts +28 -28
- package/dist/declarations/src/TArray.d.ts +46 -46
- package/dist/declarations/src/TDeferred.d.ts +12 -12
- package/dist/declarations/src/THub.d.ts +18 -18
- package/dist/declarations/src/TMap.d.ts +46 -46
- package/dist/declarations/src/TPriorityQueue.d.ts +23 -23
- package/dist/declarations/src/TQueue.d.ts +36 -36
- package/dist/declarations/src/TRandom.d.ts +12 -12
- package/dist/declarations/src/TReentrantLock.d.ts +24 -24
- package/dist/declarations/src/TRef.d.ts +19 -19
- package/dist/declarations/src/TSemaphore.d.ts +17 -17
- package/dist/declarations/src/TSet.d.ts +35 -35
- package/dist/declarations/src/Take.d.ts +25 -25
- package/dist/declarations/src/TestAnnotation.d.ts +12 -12
- package/dist/declarations/src/TestAnnotationMap.d.ts +11 -11
- package/dist/declarations/src/TestAnnotations.d.ts +7 -7
- package/dist/declarations/src/TestClock.d.ts +16 -16
- package/dist/declarations/src/TestConfig.d.ts +4 -4
- package/dist/declarations/src/TestContext.d.ts +3 -3
- package/dist/declarations/src/TestLive.d.ts +6 -6
- package/dist/declarations/src/TestServices.d.ts +35 -35
- package/dist/declarations/src/TestSized.d.ts +7 -7
- package/dist/declarations/src/Tracer.d.ts +13 -13
- package/dist/declarations/src/Tuple.d.ts +12 -12
- package/dist/declarations/src/Types.d.ts +10 -10
- package/dist/declarations/src/Unify.d.ts +9 -9
- package/dist/declarations/src/Utils.d.ts +29 -29
- package/dist/declarations/src/index.d.ts +169 -141
- package/dist/declarations/src/index.d.ts.map +1 -1
- package/dist/defaultServices-4112c0c9.cjs.prod.js +388 -0
- package/dist/defaultServices-60c753dc.cjs.dev.js +388 -0
- package/dist/effect.cjs.dev.js +199 -193
- package/dist/effect.cjs.mjs +7 -1
- package/dist/effect.cjs.prod.js +199 -193
- package/dist/effect.esm.js +283 -197
- package/dist/fiber-90ffaf8c.cjs.prod.js +411 -0
- package/dist/fiber-da1a207c.cjs.dev.js +411 -0
- package/dist/fiberRefs-64c35250.cjs.prod.js +181 -0
- package/dist/fiberRefs-a7e00f7e.cjs.dev.js +181 -0
- package/dist/fiberRuntime-1c369a47.cjs.prod.js +3012 -0
- package/dist/fiberRuntime-e9680313.cjs.dev.js +3012 -0
- package/dist/groupBy-0cc85afb.cjs.prod.js +216 -0
- package/dist/groupBy-b204a881.cjs.dev.js +216 -0
- package/dist/hook-6c7550dc.cjs.prod.js +371 -0
- package/dist/hook-822704ea.cjs.dev.js +371 -0
- package/dist/key-330b98b1.cjs.prod.js +79 -0
- package/dist/key-a474fc0d.cjs.dev.js +79 -0
- package/dist/keyType-1e916ae2.cjs.dev.js +236 -0
- package/dist/keyType-8460e792.cjs.prod.js +236 -0
- package/dist/label-246fb11d.cjs.dev.js +44 -0
- package/dist/label-3e143765.cjs.prod.js +44 -0
- package/dist/layer-ae8eefad.cjs.dev.js +658 -0
- package/dist/layer-ffacc2c5.cjs.prod.js +658 -0
- package/dist/mergeDecision-e457a76b.cjs.dev.js +86 -0
- package/dist/mergeDecision-e483c280.cjs.prod.js +86 -0
- package/dist/mergeState-83204f38.cjs.dev.js +109 -0
- package/dist/mergeState-dba66248.cjs.prod.js +109 -0
- package/dist/mergeStrategy-845a1279.cjs.prod.js +72 -0
- package/dist/mergeStrategy-b19dc19a.cjs.dev.js +72 -0
- package/dist/pair-08a8685e.cjs.dev.js +42 -0
- package/dist/pair-e5443c93.cjs.prod.js +42 -0
- package/dist/patch-4671ab7f.cjs.dev.js +132 -0
- package/dist/patch-f27e9f08.cjs.prod.js +132 -0
- package/dist/pathPatch-ded405f6.cjs.prod.js +90 -0
- package/dist/pathPatch-e46d4168.cjs.dev.js +90 -0
- package/dist/pool-3f16af61.cjs.dev.js +278 -0
- package/dist/pool-59a31f55.cjs.prod.js +278 -0
- package/dist/query-193d0a89.cjs.dev.js +104 -0
- package/dist/query-fe4a82d6.cjs.prod.js +104 -0
- package/dist/queue-04ae7ec7.cjs.dev.js +538 -0
- package/dist/queue-b81aee38.cjs.prod.js +538 -0
- package/dist/registry-29905dcc.cjs.prod.js +114 -0
- package/dist/registry-c883cf52.cjs.dev.js +114 -0
- package/dist/runtime-3ae98f19.cjs.dev.js +288 -0
- package/dist/runtime-8c3f1bd3.cjs.prod.js +288 -0
- package/dist/schedule-479d8fcc.cjs.dev.js +956 -0
- package/dist/schedule-7e30db2d.cjs.prod.js +956 -0
- package/dist/scopedRef-16d9d192.cjs.dev.js +55 -0
- package/dist/scopedRef-40b5bb82.cjs.prod.js +55 -0
- package/dist/singleProducerAsyncInput-552122e6.cjs.dev.js +193 -0
- package/dist/singleProducerAsyncInput-c5ff73b7.cjs.prod.js +193 -0
- package/dist/sink-16a1a901.cjs.dev.js +3094 -0
- package/dist/sink-c9ae7558.cjs.prod.js +3094 -0
- package/dist/state-0d29362f.cjs.prod.js +227 -0
- package/dist/state-8a8a647c.cjs.dev.js +227 -0
- package/dist/stm-44f045e5.cjs.dev.js +678 -0
- package/dist/stm-59af7e62.cjs.prod.js +678 -0
- package/dist/stream-84a13e23.cjs.dev.js +3645 -0
- package/dist/stream-8acbee57.cjs.prod.js +3645 -0
- package/dist/synchronizedRef-58a64ffe.cjs.dev.js +62 -0
- package/dist/synchronizedRef-6cfe9354.cjs.prod.js +62 -0
- package/dist/tArray-a690480d.cjs.prod.js +330 -0
- package/dist/tArray-c0a3d1e2.cjs.dev.js +330 -0
- package/dist/tMap-1c1b10c4.cjs.dev.js +535 -0
- package/dist/tMap-8dfc92f5.cjs.prod.js +535 -0
- package/dist/tQueue-48a29f8b.cjs.prod.js +367 -0
- package/dist/tQueue-aaec000f.cjs.dev.js +367 -0
- package/dist/tRef-1df89632.cjs.dev.js +133 -0
- package/dist/tRef-cc473a9f.cjs.prod.js +133 -0
- package/dist/take-906e6ef4.cjs.prod.js +152 -0
- package/dist/take-e1c6b82a.cjs.dev.js +152 -0
- package/dist/upstreamPullRequest-705e868d.cjs.prod.js +79 -0
- package/dist/upstreamPullRequest-c08f06a4.cjs.dev.js +79 -0
- package/dist/upstreamPullStrategy-0ccf2960.cjs.dev.js +81 -0
- package/dist/upstreamPullStrategy-34452db1.cjs.prod.js +81 -0
- package/internal/Context.esm.js +208 -0
- package/internal/Data.esm.js +49 -0
- package/internal/Differ/ChunkPatch.esm.js +131 -0
- package/internal/Differ/ContextPatch.esm.js +158 -0
- package/internal/Differ/HashMapPatch.esm.js +133 -0
- package/internal/Differ/HashSetPatch.esm.js +107 -0
- package/internal/Differ/OrPatch.esm.js +196 -0
- package/internal/Differ.esm.js +130 -0
- package/internal/Effectable.esm.js +89 -0
- package/internal/Either.esm.js +95 -0
- package/internal/Encoding/Base64.esm.js +74 -0
- package/internal/Encoding/Base64Url.esm.js +24 -0
- package/internal/Encoding/Common.esm.js +21 -0
- package/internal/Encoding/Hex.esm.js +55 -0
- package/internal/HashMap/array.esm.js +51 -0
- package/internal/HashMap/bitwise.esm.js +34 -0
- package/internal/HashMap/config.esm.js +16 -0
- package/internal/HashMap/keySet.esm.js +8 -0
- package/internal/HashMap/node.esm.js +253 -0
- package/internal/HashMap.esm.js +366 -0
- package/internal/HashSet.esm.js +211 -0
- package/internal/Option.esm.js +75 -0
- package/internal/ReadonlyArray.esm.js +8 -0
- package/internal/RedBlackTree/iterator.esm.js +204 -0
- package/internal/RedBlackTree/node.esm.js +43 -0
- package/internal/RedBlackTree.esm.js +1042 -0
- package/internal/Stack.esm.js +9 -0
- package/internal/blockedRequests.esm.js +365 -0
- package/internal/cache.esm.js +514 -0
- package/internal/cause.esm.js +1067 -0
- package/internal/channel/channelExecutor.esm.js +692 -0
- package/internal/channel/channelState.esm.js +78 -0
- package/internal/channel/childExecutorDecision.esm.js +71 -0
- package/internal/channel/continuation.esm.js +58 -0
- package/internal/channel/mergeDecision.esm.js +69 -0
- package/internal/channel/mergeState.esm.js +82 -0
- package/internal/channel/mergeStrategy.esm.js +55 -0
- package/internal/channel/singleProducerAsyncInput.esm.js +191 -0
- package/internal/channel/subexecutor.esm.js +153 -0
- package/internal/channel/upstreamPullRequest.esm.js +62 -0
- package/internal/channel/upstreamPullStrategy.esm.js +62 -0
- package/internal/channel.esm.js +648 -0
- package/internal/clock.esm.js +82 -0
- package/internal/completedRequestMap.esm.js +7 -0
- package/internal/concurrency.esm.js +47 -0
- package/internal/config.esm.js +374 -0
- package/internal/configError.esm.js +276 -0
- package/internal/configProvider/pathPatch.esm.js +83 -0
- package/internal/configProvider.esm.js +365 -0
- package/internal/configSecret.esm.js +66 -0
- package/internal/console.esm.js +72 -0
- package/internal/core-effect.esm.js +875 -0
- package/internal/core-stream.esm.js +293 -0
- package/internal/core.esm.js +1745 -0
- package/internal/dataSource.esm.js +61 -0
- package/internal/defaultServices/console.esm.js +96 -0
- package/internal/defaultServices.esm.js +84 -0
- package/internal/deferred.esm.js +37 -0
- package/internal/effect/circular.esm.js +314 -0
- package/internal/executionStrategy.esm.js +61 -0
- package/internal/fiber.esm.js +257 -0
- package/internal/fiberId.esm.js +243 -0
- package/internal/fiberMessage.esm.js +54 -0
- package/internal/fiberRefs/patch.esm.js +127 -0
- package/internal/fiberRefs.esm.js +169 -0
- package/internal/fiberRuntime.esm.js +2003 -0
- package/internal/fiberScope.esm.js +58 -0
- package/internal/fiberStatus.esm.js +89 -0
- package/internal/groupBy.esm.js +208 -0
- package/internal/hub.esm.js +1102 -0
- package/internal/keyedPool.esm.js +161 -0
- package/internal/layer/circular.esm.js +84 -0
- package/internal/layer.esm.js +552 -0
- package/internal/logSpan.esm.js +15 -0
- package/internal/logger-circular.esm.js +21 -0
- package/internal/logger.esm.js +213 -0
- package/internal/metric/boundaries.esm.js +48 -0
- package/internal/metric/hook.esm.js +362 -0
- package/internal/metric/key.esm.js +68 -0
- package/internal/metric/keyType.esm.js +218 -0
- package/internal/metric/label.esm.js +40 -0
- package/internal/metric/pair.esm.js +38 -0
- package/internal/metric/polling.esm.js +74 -0
- package/internal/metric/registry.esm.js +111 -0
- package/internal/metric/state.esm.js +209 -0
- package/internal/metric.esm.js +204 -0
- package/internal/opCodes/cause.esm.js +31 -0
- package/internal/opCodes/channel.esm.js +71 -0
- package/internal/opCodes/channelChildExecutorDecision.esm.js +16 -0
- package/internal/opCodes/channelMergeDecision.esm.js +11 -0
- package/internal/opCodes/channelMergeState.esm.js +16 -0
- package/internal/opCodes/channelMergeStrategy.esm.js +11 -0
- package/internal/opCodes/channelState.esm.js +21 -0
- package/internal/opCodes/channelUpstreamPullRequest.esm.js +11 -0
- package/internal/opCodes/channelUpstreamPullStrategy.esm.js +11 -0
- package/internal/opCodes/config.esm.js +56 -0
- package/internal/opCodes/configError.esm.js +31 -0
- package/internal/opCodes/continuation.esm.js +11 -0
- package/internal/opCodes/deferred.esm.js +11 -0
- package/internal/opCodes/effect.esm.js +71 -0
- package/internal/opCodes/layer.esm.js +46 -0
- package/internal/opCodes/streamHaltStrategy.esm.js +21 -0
- package/internal/pool.esm.js +271 -0
- package/internal/query.esm.js +100 -0
- package/internal/queue.esm.js +505 -0
- package/internal/random.esm.js +58 -0
- package/internal/ref.esm.js +121 -0
- package/internal/reloadable.esm.js +62 -0
- package/internal/request.esm.js +81 -0
- package/internal/resource.esm.js +35 -0
- package/internal/ringBuffer.esm.js +56 -0
- package/internal/runtime.esm.js +268 -0
- package/internal/runtimeFlags.esm.js +137 -0
- package/internal/runtimeFlagsPatch.esm.js +57 -0
- package/internal/schedule/decision.esm.js +45 -0
- package/internal/schedule/interval.esm.js +85 -0
- package/internal/schedule/intervals.esm.js +135 -0
- package/internal/schedule.esm.js +844 -0
- package/internal/scopedCache.esm.js +406 -0
- package/internal/scopedRef.esm.js +49 -0
- package/internal/singleShotGen.esm.js +30 -0
- package/internal/sink.esm.js +918 -0
- package/internal/stm/core.esm.js +553 -0
- package/internal/stm/opCodes/stm.esm.js +56 -0
- package/internal/stm/opCodes/stmState.esm.js +16 -0
- package/internal/stm/opCodes/strategy.esm.js +16 -0
- package/internal/stm/opCodes/tExit.esm.js +26 -0
- package/internal/stm/opCodes/tryCommit.esm.js +11 -0
- package/internal/stm/stm/entry.esm.js +47 -0
- package/internal/stm/stm/journal.esm.js +96 -0
- package/internal/stm/stm/stmState.esm.js +104 -0
- package/internal/stm/stm/tExit.esm.js +113 -0
- package/internal/stm/stm/tryCommit.esm.js +25 -0
- package/internal/stm/stm/txnId.esm.js +15 -0
- package/internal/stm/stm/versioned.esm.js +8 -0
- package/internal/stm/stm.esm.js +584 -0
- package/internal/stm/tArray.esm.js +287 -0
- package/internal/stm/tDeferred.esm.js +49 -0
- package/internal/stm/tHub.esm.js +381 -0
- package/internal/stm/tMap.esm.js +492 -0
- package/internal/stm/tPriorityQueue.esm.js +156 -0
- package/internal/stm/tQueue.esm.js +317 -0
- package/internal/stm/tRandom.esm.js +89 -0
- package/internal/stm/tReentrantLock.esm.js +216 -0
- package/internal/stm/tRef.esm.js +117 -0
- package/internal/stm/tSemaphore.esm.js +73 -0
- package/internal/stm/tSet.esm.js +113 -0
- package/internal/stream/debounceState.esm.js +39 -0
- package/internal/stream/emit.esm.js +51 -0
- package/internal/stream/haltStrategy.esm.js +74 -0
- package/internal/stream/handoff.esm.js +79 -0
- package/internal/stream/handoffSignal.esm.js +40 -0
- package/internal/stream/pull.esm.js +10 -0
- package/internal/stream/sinkEndReason.esm.js +27 -0
- package/internal/stream/zipAllState.esm.js +65 -0
- package/internal/stream/zipChunksState.esm.js +41 -0
- package/internal/stream.esm.js +2984 -0
- package/internal/string-utils.esm.js +66 -0
- package/internal/subscriptionRef.esm.js +65 -0
- package/internal/supervisor/patch.esm.js +156 -0
- package/internal/supervisor.esm.js +204 -0
- package/internal/synchronizedRef.esm.js +53 -0
- package/internal/take.esm.js +130 -0
- package/internal/testing/suspendedWarningData.esm.js +66 -0
- package/internal/testing/warningData.esm.js +75 -0
- package/internal/timeout.esm.js +22 -0
- package/internal/tracer.esm.js +61 -0
- package/package.json +700 -554
- package/dist/Bigint-1c684209.esm.js +0 -370
- package/dist/Bigint-504df838.cjs.dev.js +0 -392
- package/dist/Bigint-d1a7e44e.cjs.prod.js +0 -392
- package/dist/Boolean-7513c999.cjs.prod.js +0 -264
- package/dist/Boolean-9427fc24.cjs.dev.js +0 -264
- package/dist/Boolean-f564d31a.esm.js +0 -248
- package/dist/Brand-c3918667.cjs.dev.js +0 -224
- package/dist/Brand-fa4e9f22.esm.js +0 -215
- package/dist/Brand-ff4af468.cjs.prod.js +0 -224
- package/dist/Cache-447337f2.esm.js +0 -120
- package/dist/Cache-4b4ea2b3.cjs.prod.js +0 -127
- package/dist/Cache-62ebdae3.cjs.dev.js +0 -127
- package/dist/Cause-8be0b9a6.esm.js +0 -730
- package/dist/Cause-b769f517.cjs.prod.js +0 -791
- package/dist/Cause-d77e20dc.cjs.dev.js +0 -791
- package/dist/Channel-2039c280.cjs.dev.js +0 -1217
- package/dist/Channel-806a0a5a.esm.js +0 -1109
- package/dist/Channel-dcff73a4.cjs.prod.js +0 -1217
- package/dist/ChannelChildExecutorDecision-2d3c20b1.esm.js +0 -125
- package/dist/ChannelChildExecutorDecision-adce4b58.cjs.dev.js +0 -136
- package/dist/ChannelChildExecutorDecision-fc90c987.cjs.prod.js +0 -136
- package/dist/ChannelMergeDecision-39e12893.cjs.prod.js +0 -78
- package/dist/ChannelMergeDecision-4488ba22.esm.js +0 -70
- package/dist/ChannelMergeDecision-f05da806.cjs.dev.js +0 -78
- package/dist/ChannelMergeState-65723a71.cjs.dev.js +0 -125
- package/dist/ChannelMergeState-937282d2.esm.js +0 -114
- package/dist/ChannelMergeState-ab626a77.cjs.prod.js +0 -125
- package/dist/ChannelMergeStrategy-c2f956a9.esm.js +0 -95
- package/dist/ChannelMergeStrategy-d5bdc89d.cjs.prod.js +0 -104
- package/dist/ChannelMergeStrategy-d956e3fa.cjs.dev.js +0 -104
- package/dist/ChannelSingleProducerAsyncInput-00708a29.esm.js +0 -52
- package/dist/ChannelSingleProducerAsyncInput-90f3b171.cjs.prod.js +0 -55
- package/dist/ChannelSingleProducerAsyncInput-ecc79242.cjs.dev.js +0 -55
- package/dist/ChannelUpstreamPullRequest-011526e6.esm.js +0 -95
- package/dist/ChannelUpstreamPullRequest-6a610523.cjs.dev.js +0 -104
- package/dist/ChannelUpstreamPullRequest-d7413c53.cjs.prod.js +0 -104
- package/dist/ChannelUpstreamPullStrategy-0af49b72.esm.js +0 -94
- package/dist/ChannelUpstreamPullStrategy-6e0a338e.cjs.prod.js +0 -103
- package/dist/ChannelUpstreamPullStrategy-90ec240c.cjs.dev.js +0 -103
- package/dist/Chunk-937f4423.cjs.dev.js +0 -1248
- package/dist/Chunk-98371336.esm.js +0 -1167
- package/dist/Chunk-f001938d.cjs.prod.js +0 -1248
- package/dist/Clock-27c1110d.cjs.prod.js +0 -97
- package/dist/Clock-589e9dc5.cjs.dev.js +0 -97
- package/dist/Clock-ab907687.esm.js +0 -88
- package/dist/Config-50e56bbd.cjs.prod.js +0 -393
- package/dist/Config-7e7f7335.cjs.dev.js +0 -393
- package/dist/Config-a3a06665.esm.js +0 -358
- package/dist/ConfigError-5801d561.esm.js +0 -206
- package/dist/ConfigError-684b6267.cjs.dev.js +0 -225
- package/dist/ConfigError-f5303a19.cjs.prod.js +0 -225
- package/dist/ConfigProvider-0aeb6513.esm.js +0 -220
- package/dist/ConfigProvider-b47b08f3.cjs.dev.js +0 -240
- package/dist/ConfigProvider-e278c5f7.cjs.prod.js +0 -240
- package/dist/ConfigProviderPathPatch-78826e8c.cjs.dev.js +0 -86
- package/dist/ConfigProviderPathPatch-97b52760.esm.js +0 -79
- package/dist/ConfigProviderPathPatch-bb5f5228.cjs.prod.js +0 -86
- package/dist/ConfigSecret-2db4c372.cjs.prod.js +0 -83
- package/dist/ConfigSecret-646df696.esm.js +0 -74
- package/dist/ConfigSecret-a10a12aa.cjs.dev.js +0 -83
- package/dist/Console-b92ceaf0.esm.js +0 -247
- package/dist/Console-d4590f3a.cjs.prod.js +0 -271
- package/dist/Console-f063615c.cjs.dev.js +0 -271
- package/dist/Context-119d62eb.cjs.prod.js +0 -327
- package/dist/Context-231e9c1b.cjs.prod.js +0 -222
- package/dist/Context-48179faa.esm.js +0 -312
- package/dist/Context-5099940c.cjs.dev.js +0 -222
- package/dist/Context-fcee7bba.esm.js +0 -208
- package/dist/Context-fdaa5c44.cjs.dev.js +0 -327
- package/dist/Data-3389525f.cjs.dev.js +0 -237
- package/dist/Data-815a1868.cjs.prod.js +0 -237
- package/dist/Data-bad1ffeb.esm.js +0 -224
- package/dist/DefaultServices-848d6929.cjs.dev.js +0 -34
- package/dist/DefaultServices-8c298120.esm.js +0 -30
- package/dist/DefaultServices-9ea98d30.cjs.prod.js +0 -34
- package/dist/Deferred-143efa7b.cjs.dev.js +0 -253
- package/dist/Deferred-554d3588.esm.js +0 -230
- package/dist/Deferred-77579e00.cjs.prod.js +0 -253
- package/dist/Differ-0069a8c0.cjs.dev.js +0 -992
- package/dist/Differ-3be1df41.esm.js +0 -975
- package/dist/Differ-cbfa45cb.cjs.prod.js +0 -992
- package/dist/Duration-205d0b80.cjs.prod.js +0 -500
- package/dist/Duration-5e9f2327.esm.js +0 -467
- package/dist/Duration-8b174e0b.cjs.dev.js +0 -500
- package/dist/Effect-6713972b.cjs.prod.js +0 -3740
- package/dist/Effect-d362f43a.cjs.dev.js +0 -3740
- package/dist/Effect-d5910dae.esm.js +0 -3417
- package/dist/Effectable-2c8e8441.cjs.prod.js +0 -99
- package/dist/Effectable-954172fc.cjs.prod.js +0 -181
- package/dist/Effectable-a76b6aa1.esm.js +0 -158
- package/dist/Effectable-bc017f96.cjs.dev.js +0 -99
- package/dist/Effectable-e85a1847.cjs.dev.js +0 -181
- package/dist/Effectable-ec9e4204.esm.js +0 -89
- package/dist/Either-09270bbc.esm.js +0 -473
- package/dist/Either-34ce9059.cjs.dev.js +0 -178
- package/dist/Either-41cb7522.cjs.prod.js +0 -178
- package/dist/Either-ae722a9e.cjs.dev.js +0 -502
- package/dist/Either-be9c40b9.esm.js +0 -163
- package/dist/Either-d995ebb4.cjs.prod.js +0 -502
- package/dist/Encoding-0d990bbf.esm.js +0 -295
- package/dist/Encoding-39f7d9a8.cjs.dev.js +0 -309
- package/dist/Encoding-82d009b9.cjs.prod.js +0 -309
- package/dist/Equal-7d4ae7e7.esm.js +0 -65
- package/dist/Equal-8654b1af.cjs.dev.js +0 -71
- package/dist/Equal-ed1e8c3c.cjs.prod.js +0 -71
- package/dist/Equivalence-87295c78.cjs.prod.js +0 -238
- package/dist/Equivalence-a4b5f56d.cjs.dev.js +0 -238
- package/dist/Equivalence-e5c9cba4.esm.js +0 -218
- package/dist/Error-7e84d828.esm.js +0 -53
- package/dist/Error-be89adc9.cjs.prod.js +0 -57
- package/dist/Error-e1ceeea7.cjs.dev.js +0 -57
- package/dist/ExecutionStrategy-080f0b2b.cjs.prod.js +0 -180
- package/dist/ExecutionStrategy-c6f7c490.esm.js +0 -168
- package/dist/ExecutionStrategy-cd9204b4.cjs.dev.js +0 -180
- package/dist/Exit-7a385294.cjs.dev.js +0 -408
- package/dist/Exit-e31718e3.esm.js +0 -371
- package/dist/Exit-eb04f98e.cjs.prod.js +0 -408
- package/dist/Fiber-1a996e3f.cjs.dev.js +0 -521
- package/dist/Fiber-38517971.esm.js +0 -473
- package/dist/Fiber-a7306b77.cjs.prod.js +0 -521
- package/dist/FiberId-3b23bc04.cjs.dev.js +0 -443
- package/dist/FiberId-556ab9ef.esm.js +0 -422
- package/dist/FiberId-95c92b7e.cjs.prod.js +0 -443
- package/dist/FiberRef-6f63843b.cjs.prod.js +0 -385
- package/dist/FiberRef-912b6248.cjs.dev.js +0 -385
- package/dist/FiberRef-b81d5a7e.esm.js +0 -338
- package/dist/FiberRefs-1a6a1b5f.cjs.prod.js +0 -135
- package/dist/FiberRefs-44fda74a.cjs.dev.js +0 -135
- package/dist/FiberRefs-a6ab4b8d.esm.js +0 -122
- package/dist/FiberRefsPatch-549967e3.cjs.prod.js +0 -90
- package/dist/FiberRefsPatch-56f10acc.cjs.dev.js +0 -90
- package/dist/FiberRefsPatch-f84453c3.esm.js +0 -84
- package/dist/FiberStatus-90291b8c.esm.js +0 -187
- package/dist/FiberStatus-db497d70.cjs.dev.js +0 -197
- package/dist/FiberStatus-ff18b445.cjs.prod.js +0 -197
- package/dist/Function-52fb7d21.esm.js +0 -516
- package/dist/Function-8336aeeb.cjs.prod.js +0 -538
- package/dist/Function-fd10bde3.cjs.dev.js +0 -538
- package/dist/GlobalValue-00457222.cjs.dev.js +0 -28
- package/dist/GlobalValue-c5f1e8e5.esm.js +0 -25
- package/dist/GlobalValue-f65cc41d.cjs.prod.js +0 -28
- package/dist/GroupBy-cabfa667.cjs.dev.js +0 -79
- package/dist/GroupBy-d0ad2148.cjs.prod.js +0 -79
- package/dist/GroupBy-eef333fa.esm.js +0 -72
- package/dist/HKT-1990744d.esm.js +0 -5
- package/dist/Hash-039222d1.esm.js +0 -179
- package/dist/Hash-2171bcec.cjs.prod.js +0 -192
- package/dist/Hash-9d5502e5.cjs.dev.js +0 -192
- package/dist/HashMap-2604a8b0.cjs.prod.js +0 -361
- package/dist/HashMap-e644e23b.esm.js +0 -327
- package/dist/HashMap-ee35ace5.cjs.dev.js +0 -361
- package/dist/HashSet-206ea53b.cjs.dev.js +0 -965
- package/dist/HashSet-286fb998.cjs.prod.js +0 -965
- package/dist/HashSet-43b520e9.cjs.dev.js +0 -283
- package/dist/HashSet-99f1529e.cjs.prod.js +0 -283
- package/dist/HashSet-d051e0ea.esm.js +0 -907
- package/dist/HashSet-dff2542b.esm.js +0 -256
- package/dist/Hub-4223bb07.cjs.prod.js +0 -1280
- package/dist/Hub-9f3d5c5d.esm.js +0 -1264
- package/dist/Hub-dd9d70e7.cjs.dev.js +0 -1280
- package/dist/Inspectable-46a7668e.cjs.prod.js +0 -50
- package/dist/Inspectable-654412c2.cjs.dev.js +0 -50
- package/dist/Inspectable-bda84223.esm.js +0 -45
- package/dist/KeyedPool-0b5851a2.cjs.prod.js +0 -282
- package/dist/KeyedPool-50b8f75b.esm.js +0 -273
- package/dist/KeyedPool-8b979aac.cjs.dev.js +0 -282
- package/dist/Layer-11122c64.cjs.dev.js +0 -687
- package/dist/Layer-79fa5f4a.cjs.prod.js +0 -687
- package/dist/Layer-f7be72db.esm.js +0 -623
- package/dist/List-48f2b78f.cjs.prod.js +0 -912
- package/dist/List-95e1e081.cjs.dev.js +0 -912
- package/dist/List-c066a506.esm.js +0 -865
- package/dist/LogLevel-2e6b00c7.esm.js +0 -222
- package/dist/LogLevel-a609dd63.cjs.prod.js +0 -240
- package/dist/LogLevel-c14e29fb.cjs.dev.js +0 -240
- package/dist/LogSpan-c216a78b.cjs.prod.js +0 -46
- package/dist/LogSpan-cd4b8f34.cjs.dev.js +0 -46
- package/dist/LogSpan-e5cf11a5.esm.js +0 -42
- package/dist/Logger-029fccab.cjs.prod.js +0 -275
- package/dist/Logger-28d5e7ff.cjs.dev.js +0 -275
- package/dist/Logger-52ffeafa.esm.js +0 -246
- package/dist/Metric-2b4867b2.cjs.dev.js +0 -488
- package/dist/Metric-cd4dfaba.cjs.prod.js +0 -488
- package/dist/Metric-f2c8888b.esm.js +0 -442
- package/dist/MetricBoundaries-8ef331f0.cjs.dev.js +0 -68
- package/dist/MetricBoundaries-9707829f.esm.js +0 -61
- package/dist/MetricBoundaries-fc377a5e.cjs.prod.js +0 -68
- package/dist/MetricHook-74ebef65.esm.js +0 -80
- package/dist/MetricHook-9d1ff9f5.cjs.prod.js +0 -90
- package/dist/MetricHook-ebd34eea.cjs.dev.js +0 -90
- package/dist/MetricKey-7536999c.cjs.dev.js +0 -130
- package/dist/MetricKey-d96ef128.cjs.prod.js +0 -130
- package/dist/MetricKey-fb261d1b.esm.js +0 -118
- package/dist/MetricKeyType-637f6694.cjs.prod.js +0 -187
- package/dist/MetricKeyType-6a10f955.esm.js +0 -168
- package/dist/MetricKeyType-ed70a508.cjs.dev.js +0 -187
- package/dist/MetricLabel-30df73d1.esm.js +0 -48
- package/dist/MetricLabel-b6a3c628.cjs.prod.js +0 -53
- package/dist/MetricLabel-e6d1cb96.cjs.dev.js +0 -53
- package/dist/MetricPair-5f5f6f1b.esm.js +0 -45
- package/dist/MetricPair-a1551790.cjs.prod.js +0 -50
- package/dist/MetricPair-f1f0edbd.cjs.dev.js +0 -50
- package/dist/MetricPolling-258af71e.esm.js +0 -167
- package/dist/MetricPolling-b2accbbd.cjs.dev.js +0 -177
- package/dist/MetricPolling-c6caba9d.cjs.prod.js +0 -177
- package/dist/MetricRegistry-2ae45fdf.cjs.dev.js +0 -38
- package/dist/MetricRegistry-44d3af51.esm.js +0 -34
- package/dist/MetricRegistry-d61eb47d.cjs.prod.js +0 -38
- package/dist/MetricState-a3499d98.cjs.prod.js +0 -191
- package/dist/MetricState-cd7a1775.cjs.dev.js +0 -191
- package/dist/MetricState-d4fcb7d0.esm.js +0 -172
- package/dist/MutableHashMap-b3ab7261.esm.js +0 -142
- package/dist/MutableHashMap-d6cb38d9.cjs.prod.js +0 -154
- package/dist/MutableHashMap-f08d01f5.cjs.dev.js +0 -154
- package/dist/MutableHashSet-9e2ea672.cjs.dev.js +0 -110
- package/dist/MutableHashSet-ec9f7a0b.esm.js +0 -101
- package/dist/MutableHashSet-fa860611.cjs.prod.js +0 -110
- package/dist/MutableList-4ef847b7.cjs.prod.js +0 -296
- package/dist/MutableList-85cf4e37.cjs.dev.js +0 -296
- package/dist/MutableList-8c671944.esm.js +0 -281
- package/dist/MutableQueue-3dfd5fea.cjs.dev.js +0 -215
- package/dist/MutableQueue-416dfcd9.cjs.prod.js +0 -215
- package/dist/MutableQueue-54a4b584.esm.js +0 -202
- package/dist/MutableRef-82c6fe46.cjs.prod.js +0 -194
- package/dist/MutableRef-cb4d2fc0.esm.js +0 -176
- package/dist/MutableRef-ef31c15d.cjs.dev.js +0 -194
- package/dist/NonEmptyIterable-26ed16e4.cjs.prod.js +0 -36
- package/dist/NonEmptyIterable-7ef320e0.esm.js +0 -33
- package/dist/NonEmptyIterable-b064c1af.cjs.dev.js +0 -36
- package/dist/Number-d021c8f9.cjs.prod.js +0 -417
- package/dist/Number-dc454336.esm.js +0 -394
- package/dist/Number-dddf713e.cjs.dev.js +0 -417
- package/dist/Option-1d073850.esm.js +0 -1135
- package/dist/Option-837ae0da.cjs.dev.js +0 -1198
- package/dist/Option-b07f2b1d.cjs.prod.js +0 -1198
- package/dist/Order-2f11aa24.esm.js +0 -293
- package/dist/Order-2f785421.cjs.prod.js +0 -321
- package/dist/Order-cbf22e18.cjs.dev.js +0 -321
- package/dist/Ordering-9892085c.esm.js +0 -97
- package/dist/Ordering-e20427cc.cjs.dev.js +0 -104
- package/dist/Ordering-f3e378ef.cjs.prod.js +0 -104
- package/dist/Pipeable-856ddd7c.cjs.prod.js +0 -52
- package/dist/Pipeable-ef202667.cjs.dev.js +0 -52
- package/dist/Pipeable-fe51dc02.esm.js +0 -49
- package/dist/Pool-68590a64.cjs.dev.js +0 -122
- package/dist/Pool-718f79ff.cjs.prod.js +0 -122
- package/dist/Pool-cdfcfabe.esm.js +0 -114
- package/dist/Predicate-52271838.esm.js +0 -677
- package/dist/Predicate-54d8c8de.cjs.dev.js +0 -718
- package/dist/Predicate-a3fd4088.cjs.prod.js +0 -718
- package/dist/Queue-48d0b9d4.cjs.dev.js +0 -394
- package/dist/Queue-9f8579c0.cjs.prod.js +0 -394
- package/dist/Queue-bbebbeda.esm.js +0 -362
- package/dist/Random-0bdc1bcb.cjs.prod.js +0 -104
- package/dist/Random-14987953.esm.js +0 -94
- package/dist/Random-f495bcbc.cjs.dev.js +0 -104
- package/dist/ReadonlyArray-199ff80e.esm.js +0 -1584
- package/dist/ReadonlyArray-3b1a15d8.cjs.dev.js +0 -10
- package/dist/ReadonlyArray-6fbc78a1.cjs.prod.js +0 -1721
- package/dist/ReadonlyArray-84c71385.esm.js +0 -8
- package/dist/ReadonlyArray-885e80a2.cjs.dev.js +0 -1721
- package/dist/ReadonlyArray-8adb9a46.cjs.prod.js +0 -10
- package/dist/ReadonlyRecord-4969b34f.cjs.prod.js +0 -568
- package/dist/ReadonlyRecord-c1f5d048.esm.js +0 -544
- package/dist/ReadonlyRecord-c6dc7deb.cjs.dev.js +0 -568
- package/dist/RedBlackTree-22839235.esm.js +0 -1632
- package/dist/RedBlackTree-59192950.cjs.prod.js +0 -1669
- package/dist/RedBlackTree-98a93ec6.cjs.dev.js +0 -1669
- package/dist/Ref-88c1d56d.cjs.prod.js +0 -282
- package/dist/Ref-8d85fc7a.cjs.dev.js +0 -282
- package/dist/Ref-9a9de951.esm.js +0 -248
- package/dist/Reloadable-10cfae17.esm.js +0 -159
- package/dist/Reloadable-3ca716d9.cjs.prod.js +0 -169
- package/dist/Reloadable-65bf6783.cjs.dev.js +0 -169
- package/dist/Request-5b794c27.cjs.dev.js +0 -190
- package/dist/Request-6d646956.cjs.prod.js +0 -190
- package/dist/Request-9f0b571a.esm.js +0 -175
- package/dist/RequestBlock-15e7d048.cjs.prod.js +0 -124
- package/dist/RequestBlock-6105623d.esm.js +0 -114
- package/dist/RequestBlock-ec5299d4.cjs.dev.js +0 -124
- package/dist/RequestResolver-10227a7b.esm.js +0 -213
- package/dist/RequestResolver-a3fe9b72.cjs.prod.js +0 -233
- package/dist/RequestResolver-bc7e6050.cjs.dev.js +0 -233
- package/dist/Resource-966460b5.cjs.dev.js +0 -118
- package/dist/Resource-9f1084b9.cjs.prod.js +0 -118
- package/dist/Resource-afd128d6.esm.js +0 -111
- package/dist/Runtime-15bf8fcd.cjs.prod.js +0 -191
- package/dist/Runtime-1a63e954.cjs.dev.js +0 -191
- package/dist/Runtime-4f6fc384.esm.js +0 -175
- package/dist/RuntimeFlags-4d3b4ba7.esm.js +0 -344
- package/dist/RuntimeFlags-a43dcce7.cjs.dev.js +0 -381
- package/dist/RuntimeFlags-ef10d73a.cjs.prod.js +0 -381
- package/dist/RuntimeFlagsPatch-0c131e8e.cjs.dev.js +0 -411
- package/dist/RuntimeFlagsPatch-a1da6096.esm.js +0 -365
- package/dist/RuntimeFlagsPatch-bfdf133d.cjs.prod.js +0 -411
- package/dist/STM-2bdad2bd.cjs.dev.js +0 -1447
- package/dist/STM-55e91604.esm.js +0 -1321
- package/dist/STM-e6749b84.cjs.prod.js +0 -1447
- package/dist/Schedule-35a9436e.cjs.prod.js +0 -1159
- package/dist/Schedule-d9b0f037.cjs.dev.js +0 -1159
- package/dist/Schedule-da001b13.esm.js +0 -1059
- package/dist/ScheduleDecision-2ab823c2.cjs.dev.js +0 -106
- package/dist/ScheduleDecision-369cf2a1.cjs.prod.js +0 -106
- package/dist/ScheduleDecision-e794f66d.esm.js +0 -99
- package/dist/ScheduleInterval-2db9be83.cjs.dev.js +0 -244
- package/dist/ScheduleInterval-3e9b8eca.cjs.prod.js +0 -244
- package/dist/ScheduleInterval-94e80ec4.esm.js +0 -229
- package/dist/ScheduleIntervals-ab412802.cjs.dev.js +0 -265
- package/dist/ScheduleIntervals-e6ed15fa.cjs.prod.js +0 -265
- package/dist/ScheduleIntervals-ef5cd7c5.esm.js +0 -252
- package/dist/Scheduler-44f252da.cjs.prod.js +0 -358
- package/dist/Scheduler-6122a3ee.cjs.dev.js +0 -358
- package/dist/Scheduler-d2f7e5c7.esm.js +0 -343
- package/dist/Scope-0ffde3bb.esm.js +0 -131
- package/dist/Scope-326194e2.cjs.prod.js +0 -143
- package/dist/Scope-3cf29072.cjs.dev.js +0 -143
- package/dist/ScopedCache-01a07a6d.cjs.prod.js +0 -467
- package/dist/ScopedCache-77c605e8.cjs.dev.js +0 -467
- package/dist/ScopedCache-9c558fd1.esm.js +0 -462
- package/dist/ScopedRef-2f0e2b33.cjs.dev.js +0 -87
- package/dist/ScopedRef-5c29a8a2.cjs.prod.js +0 -87
- package/dist/ScopedRef-dd8a823e.esm.js +0 -80
- package/dist/Sink-923b4ad8.esm.js +0 -1107
- package/dist/Sink-c4ca577a.cjs.prod.js +0 -1215
- package/dist/Sink-fa1f105b.cjs.dev.js +0 -1215
- package/dist/SortedMap-44f47d83.esm.js +0 -190
- package/dist/SortedMap-abf39a75.cjs.prod.js +0 -210
- package/dist/SortedMap-b04da739.cjs.dev.js +0 -210
- package/dist/SortedSet-3339ea7f.esm.js +0 -288
- package/dist/SortedSet-4efa4f05.cjs.dev.js +0 -311
- package/dist/SortedSet-b588ac70.cjs.prod.js +0 -311
- package/dist/Stack-765c2298.esm.js +0 -9
- package/dist/Stream-1d51d0be.esm.js +0 -3175
- package/dist/Stream-55dd689b.cjs.prod.js +0 -3469
- package/dist/Stream-b1eaedfc.cjs.dev.js +0 -3469
- package/dist/StreamEmit-bd696ab0.esm.js +0 -5
- package/dist/StreamHaltStrategy-292ed375.cjs.dev.js +0 -214
- package/dist/StreamHaltStrategy-506d4abb.cjs.prod.js +0 -214
- package/dist/StreamHaltStrategy-9864a080.esm.js +0 -201
- package/dist/String-9702a941.cjs.dev.js +0 -694
- package/dist/String-ba45d520.esm.js +0 -648
- package/dist/String-fa7c1c88.cjs.prod.js +0 -694
- package/dist/Struct-3d8b2a81.cjs.prod.js +0 -141
- package/dist/Struct-62f329c0.cjs.dev.js +0 -141
- package/dist/Struct-8bc142d1.esm.js +0 -134
- package/dist/SubscriptionRef-1eb76544.cjs.prod.js +0 -269
- package/dist/SubscriptionRef-33b302b6.esm.js +0 -245
- package/dist/SubscriptionRef-faf570c5.cjs.dev.js +0 -269
- package/dist/Supervisor-34de9985.cjs.dev.js +0 -170
- package/dist/Supervisor-3706300f.cjs.prod.js +0 -170
- package/dist/Supervisor-5b9943cf.esm.js +0 -160
- package/dist/Symbol-9ad0bde8.esm.js +0 -36
- package/dist/Symbol-e3ea5627.cjs.dev.js +0 -40
- package/dist/Symbol-e5af99ce.cjs.prod.js +0 -40
- package/dist/SynchronizedRef-01f585dc.cjs.prod.js +0 -212
- package/dist/SynchronizedRef-c389137f.esm.js +0 -187
- package/dist/SynchronizedRef-cda883b7.cjs.dev.js +0 -212
- package/dist/TArray-1200bf6a.esm.js +0 -412
- package/dist/TArray-97bc3f87.cjs.prod.js +0 -455
- package/dist/TArray-9bd73c38.cjs.dev.js +0 -455
- package/dist/TDeferred-875fd41c.esm.js +0 -120
- package/dist/TDeferred-bf21b756.cjs.prod.js +0 -129
- package/dist/TDeferred-f97247d3.cjs.dev.js +0 -129
- package/dist/THub-917198c0.esm.js +0 -553
- package/dist/THub-c4a3e52c.cjs.dev.js +0 -570
- package/dist/THub-d9d3b223.cjs.prod.js +0 -570
- package/dist/TMap-459696e5.cjs.dev.js +0 -463
- package/dist/TMap-786b8508.esm.js +0 -419
- package/dist/TMap-a6aab3c3.cjs.prod.js +0 -463
- package/dist/TPriorityQueue-31c32afb.esm.js +0 -360
- package/dist/TPriorityQueue-918056c3.cjs.prod.js +0 -381
- package/dist/TPriorityQueue-e8429066.cjs.dev.js +0 -381
- package/dist/TQueue-adee58b8.esm.js +0 -324
- package/dist/TQueue-b9593214.cjs.prod.js +0 -353
- package/dist/TQueue-d1c8153e.cjs.dev.js +0 -353
- package/dist/TRandom-65721a5b.cjs.prod.js +0 -203
- package/dist/TRandom-677ba64f.esm.js +0 -192
- package/dist/TRandom-79057bd9.cjs.dev.js +0 -203
- package/dist/TReentrantLock-0dbd6074.cjs.prod.js +0 -456
- package/dist/TReentrantLock-164c0898.cjs.dev.js +0 -456
- package/dist/TReentrantLock-65156c11.esm.js +0 -435
- package/dist/TRef-4a45f5af.cjs.dev.js +0 -152
- package/dist/TRef-edd5ff88.esm.js +0 -135
- package/dist/TRef-ff8497e4.cjs.prod.js +0 -152
- package/dist/TSemaphore-1f5dc074.cjs.dev.js +0 -197
- package/dist/TSemaphore-bccebfec.esm.js +0 -183
- package/dist/TSemaphore-d1096593.cjs.prod.js +0 -197
- package/dist/TSet-0f61d448.cjs.prod.js +0 -444
- package/dist/TSet-48903882.cjs.dev.js +0 -444
- package/dist/TSet-bd3a1de2.esm.js +0 -412
- package/dist/Take-1e6b1ba3.esm.js +0 -214
- package/dist/Take-7797160f.cjs.dev.js +0 -236
- package/dist/Take-d245cc08.cjs.prod.js +0 -236
- package/dist/TestAnnotation-5b23b64a.cjs.prod.js +0 -135
- package/dist/TestAnnotation-c2b6bb64.esm.js +0 -124
- package/dist/TestAnnotation-ca7ea5d9.cjs.dev.js +0 -135
- package/dist/TestAnnotationMap-5ef91d33.cjs.prod.js +0 -125
- package/dist/TestAnnotationMap-83b0e761.cjs.dev.js +0 -125
- package/dist/TestAnnotationMap-d180214b.esm.js +0 -114
- package/dist/TestAnnotations-758011e7.cjs.prod.js +0 -97
- package/dist/TestAnnotations-89733ab7.cjs.dev.js +0 -97
- package/dist/TestAnnotations-cf445345.esm.js +0 -91
- package/dist/TestClock-0a012f75.esm.js +0 -565
- package/dist/TestClock-0abac759.cjs.prod.js +0 -581
- package/dist/TestClock-3bdb0c0b.cjs.dev.js +0 -581
- package/dist/TestConfig-3f48c7f2.cjs.prod.js +0 -37
- package/dist/TestConfig-e52495c3.esm.js +0 -33
- package/dist/TestConfig-ff283076.cjs.dev.js +0 -37
- package/dist/TestContext-64f40523.esm.js +0 -36
- package/dist/TestContext-7a6420d3.cjs.prod.js +0 -41
- package/dist/TestContext-b44d97ae.cjs.dev.js +0 -41
- package/dist/TestLive-64c62bfe.cjs.dev.js +0 -60
- package/dist/TestLive-906c173d.cjs.prod.js +0 -60
- package/dist/TestLive-bfab4add.esm.js +0 -55
- package/dist/TestServices-844e305d.esm.js +0 -306
- package/dist/TestServices-944b625c.cjs.prod.js +0 -341
- package/dist/TestServices-f8c51bbd.cjs.dev.js +0 -341
- package/dist/TestSized-0fa739ff.cjs.prod.js +0 -64
- package/dist/TestSized-3a0fa658.esm.js +0 -58
- package/dist/TestSized-955a228e.cjs.dev.js +0 -64
- package/dist/Tracer-1610aba4.cjs.dev.js +0 -81
- package/dist/Tracer-700da80a.cjs.prod.js +0 -81
- package/dist/Tracer-b07052e2.esm.js +0 -75
- package/dist/Tuple-1fa12d6e.esm.js +0 -187
- package/dist/Tuple-73682170.cjs.prod.js +0 -199
- package/dist/Tuple-9822259f.cjs.dev.js +0 -199
- package/dist/Types-be3804ad.esm.js +0 -5
- package/dist/Unify-150ebcee.cjs.dev.js +0 -48
- package/dist/Unify-77f78d08.cjs.prod.js +0 -48
- package/dist/Unify-9d27a1f3.esm.js +0 -45
- package/dist/Utils-32587b0c.cjs.dev.js +0 -370
- package/dist/Utils-6484334f.cjs.prod.js +0 -370
- package/dist/Utils-657e8bfa.esm.js +0 -362
- package/dist/boundaries-6bacf30a.cjs.prod.js +0 -54
- package/dist/boundaries-8475a9b4.esm.js +0 -48
- package/dist/boundaries-c6f4c3da.cjs.dev.js +0 -54
- package/dist/cache-2fa366f0.esm.js +0 -514
- package/dist/cache-7b578624.cjs.prod.js +0 -523
- package/dist/cache-8db60799.cjs.dev.js +0 -523
- package/dist/childExecutorDecision-49f0f19c.esm.js +0 -85
- package/dist/childExecutorDecision-744cd5fb.cjs.prod.js +0 -98
- package/dist/childExecutorDecision-c1c3b8b6.cjs.dev.js +0 -98
- package/dist/circular-1dfea59d.cjs.prod.js +0 -107
- package/dist/circular-3ebc9b78.esm.js +0 -82
- package/dist/circular-604e98e5.cjs.prod.js +0 -341
- package/dist/circular-8088cc19.cjs.dev.js +0 -341
- package/dist/circular-cff58c30.esm.js +0 -311
- package/dist/circular-e5da795a.cjs.dev.js +0 -107
- package/dist/config-05de256b.cjs.dev.js +0 -474
- package/dist/config-3003c43a.cjs.prod.js +0 -474
- package/dist/config-64a67e36.esm.js +0 -428
- package/dist/configError-84c0742e.esm.js +0 -305
- package/dist/configError-a7c4fcc2.cjs.dev.js +0 -323
- package/dist/configError-b3dd6ec2.cjs.prod.js +0 -323
- package/dist/configProvider-35a1a3c7.cjs.prod.js +0 -447
- package/dist/configProvider-56d1b842.cjs.dev.js +0 -447
- package/dist/configProvider-cd15d971.esm.js +0 -428
- package/dist/configSecret-18ba6f6e.cjs.dev.js +0 -74
- package/dist/configSecret-3dd7ab72.cjs.prod.js +0 -74
- package/dist/configSecret-793e52b4.esm.js +0 -66
- package/dist/core-01c0ed9d.cjs.prod.js +0 -1072
- package/dist/core-218f7617.cjs.prod.js +0 -3502
- package/dist/core-5346c1e5.cjs.dev.js +0 -1072
- package/dist/core-9276b625.esm.js +0 -1032
- package/dist/core-9f5f0dc2.esm.js +0 -3225
- package/dist/core-bedc63fe.cjs.dev.js +0 -3502
- package/dist/core-effect-a839563d.cjs.dev.js +0 -1030
- package/dist/core-effect-e762d50b.esm.js +0 -902
- package/dist/core-effect-fea8dde9.cjs.prod.js +0 -1030
- package/dist/dataSource-43c62f8e.esm.js +0 -60
- package/dist/dataSource-8ab8a0ec.cjs.dev.js +0 -74
- package/dist/dataSource-cc1edaa1.cjs.prod.js +0 -74
- package/dist/defaultServices-1d4f144a.cjs.prod.js +0 -388
- package/dist/defaultServices-1f1298e8.cjs.dev.js +0 -388
- package/dist/defaultServices-86214de4.esm.js +0 -359
- package/dist/fiber-1511340a.esm.js +0 -363
- package/dist/fiber-18f7cf87.cjs.dev.js +0 -411
- package/dist/fiber-957d5291.cjs.prod.js +0 -411
- package/dist/fiberRefs-76ecbcfd.cjs.dev.js +0 -181
- package/dist/fiberRefs-b32de18b.esm.js +0 -169
- package/dist/fiberRefs-f0429b31.cjs.prod.js +0 -181
- package/dist/fiberRuntime-233db874.cjs.dev.js +0 -3012
- package/dist/fiberRuntime-5e42f85c.cjs.prod.js +0 -3012
- package/dist/fiberRuntime-98f09d31.esm.js +0 -2857
- package/dist/groupBy-36e6ca3f.cjs.prod.js +0 -216
- package/dist/groupBy-3a32c4b6.cjs.dev.js +0 -216
- package/dist/groupBy-8d753c19.esm.js +0 -206
- package/dist/hook-8fc9006f.esm.js +0 -362
- package/dist/hook-e169b712.cjs.prod.js +0 -371
- package/dist/hook-fe9f948d.cjs.dev.js +0 -371
- package/dist/key-215ea6fd.esm.js +0 -68
- package/dist/key-4824d1ad.cjs.prod.js +0 -79
- package/dist/key-d8dc829b.cjs.dev.js +0 -79
- package/dist/keyType-c980adcc.cjs.dev.js +0 -236
- package/dist/keyType-d85714ed.cjs.prod.js +0 -236
- package/dist/keyType-fefd9ef8.esm.js +0 -218
- package/dist/label-14b7d517.cjs.dev.js +0 -44
- package/dist/label-5cb21441.esm.js +0 -40
- package/dist/label-e78b2f8f.cjs.prod.js +0 -44
- package/dist/layer-3da5a933.cjs.prod.js +0 -658
- package/dist/layer-e1d1db03.cjs.dev.js +0 -658
- package/dist/layer-f8ec8454.esm.js +0 -596
- package/dist/mergeDecision-32146c34.esm.js +0 -78
- package/dist/mergeDecision-75feaab3.cjs.dev.js +0 -86
- package/dist/mergeDecision-a1822db2.cjs.prod.js +0 -86
- package/dist/mergeState-21728f0b.esm.js +0 -96
- package/dist/mergeState-2c24c562.cjs.prod.js +0 -109
- package/dist/mergeState-e9aa09b9.cjs.dev.js +0 -109
- package/dist/mergeStrategy-84dd9011.esm.js +0 -64
- package/dist/mergeStrategy-8fe47c7e.cjs.dev.js +0 -72
- package/dist/mergeStrategy-909bebb0.cjs.prod.js +0 -72
- package/dist/pair-67530b23.cjs.dev.js +0 -42
- package/dist/pair-cb46f77c.esm.js +0 -38
- package/dist/pair-fb591d12.cjs.prod.js +0 -42
- package/dist/patch-99e8591b.esm.js +0 -127
- package/dist/patch-cdcb5e42.cjs.dev.js +0 -132
- package/dist/patch-f440dab6.cjs.prod.js +0 -132
- package/dist/pathPatch-5ac830c8.esm.js +0 -83
- package/dist/pathPatch-75afe967.cjs.dev.js +0 -90
- package/dist/pathPatch-775a0838.cjs.prod.js +0 -90
- package/dist/pool-0da00d67.cjs.prod.js +0 -278
- package/dist/pool-54820a71.esm.js +0 -271
- package/dist/pool-bfa5c974.cjs.dev.js +0 -278
- package/dist/query-1685a476.esm.js +0 -97
- package/dist/query-3ab8cd4e.cjs.prod.js +0 -104
- package/dist/query-68bb7c45.cjs.dev.js +0 -104
- package/dist/queue-499cacee.cjs.prod.js +0 -538
- package/dist/queue-b79c472d.esm.js +0 -505
- package/dist/queue-bf262207.cjs.dev.js +0 -538
- package/dist/registry-38f0ed9d.esm.js +0 -111
- package/dist/registry-6f465b2f.cjs.prod.js +0 -114
- package/dist/registry-dfe7ed01.cjs.dev.js +0 -114
- package/dist/runtime-5b7472d5.cjs.dev.js +0 -288
- package/dist/runtime-68e90981.cjs.prod.js +0 -288
- package/dist/runtime-f91ca239.esm.js +0 -266
- package/dist/schedule-0d31f4cc.esm.js +0 -843
- package/dist/schedule-616cf1b8.cjs.prod.js +0 -956
- package/dist/schedule-d3f9b258.cjs.dev.js +0 -956
- package/dist/scopedRef-5e59cf54.cjs.prod.js +0 -55
- package/dist/scopedRef-730d8d35.cjs.dev.js +0 -55
- package/dist/scopedRef-e54a3d93.esm.js +0 -49
- package/dist/singleProducerAsyncInput-6508b7f1.cjs.dev.js +0 -193
- package/dist/singleProducerAsyncInput-c67ef1c6.esm.js +0 -191
- package/dist/singleProducerAsyncInput-d3225b4e.cjs.prod.js +0 -193
- package/dist/sink-05d54662.cjs.prod.js +0 -3094
- package/dist/sink-3105a90f.cjs.dev.js +0 -3094
- package/dist/sink-3f26fc31.esm.js +0 -2877
- package/dist/state-38610229.esm.js +0 -209
- package/dist/state-6d974829.cjs.dev.js +0 -227
- package/dist/state-abef4d59.cjs.prod.js +0 -227
- package/dist/stm-43c3b262.cjs.dev.js +0 -678
- package/dist/stm-d01a804c.esm.js +0 -582
- package/dist/stm-e1200304.cjs.prod.js +0 -678
- package/dist/stream-3ebec4f3.cjs.prod.js +0 -3649
- package/dist/stream-9270c6b1.esm.js +0 -3355
- package/dist/stream-b819c5b3.cjs.dev.js +0 -3649
- package/dist/synchronizedRef-5bbb64b2.cjs.prod.js +0 -62
- package/dist/synchronizedRef-e9682c8e.cjs.dev.js +0 -62
- package/dist/synchronizedRef-f7077a5f.esm.js +0 -53
- package/dist/tArray-0d2e8fae.cjs.dev.js +0 -330
- package/dist/tArray-442d22a4.cjs.prod.js +0 -330
- package/dist/tArray-fa2759e8.esm.js +0 -287
- package/dist/tMap-2a001015.cjs.prod.js +0 -535
- package/dist/tMap-2a98e9a7.esm.js +0 -492
- package/dist/tMap-2fd8c9e6.cjs.dev.js +0 -535
- package/dist/tQueue-13f8f402.esm.js +0 -331
- package/dist/tQueue-84a0d0eb.cjs.dev.js +0 -367
- package/dist/tQueue-e2e96d1f.cjs.prod.js +0 -367
- package/dist/tRef-4772a528.cjs.prod.js +0 -133
- package/dist/tRef-b5d0cc28.esm.js +0 -115
- package/dist/tRef-bbbdd134.cjs.dev.js +0 -133
- package/dist/take-68ed448f.cjs.dev.js +0 -152
- package/dist/take-7c168e8e.esm.js +0 -130
- package/dist/take-d293f721.cjs.prod.js +0 -152
- package/dist/timeout-4180303d.esm.js +0 -22
- package/dist/upstreamPullRequest-be86e51c.esm.js +0 -71
- package/dist/upstreamPullRequest-d2eaf7f5.cjs.prod.js +0 -79
- package/dist/upstreamPullRequest-f986731f.cjs.dev.js +0 -79
- package/dist/upstreamPullStrategy-08e7185f.cjs.prod.js +0 -81
- package/dist/upstreamPullStrategy-29c0b698.cjs.dev.js +0 -81
- package/dist/upstreamPullStrategy-d1505fa4.esm.js +0 -71
|
@@ -1,3649 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var Cause_dist_effectCause = require('./Cause-b769f517.cjs.prod.js');
|
|
4
|
-
var ChannelMergeDecision_dist_effectChannelMergeDecision = require('./ChannelMergeDecision-39e12893.cjs.prod.js');
|
|
5
|
-
var Chunk_dist_effectChunk = require('./Chunk-f001938d.cjs.prod.js');
|
|
6
|
-
var Clock_dist_effectClock = require('./Clock-27c1110d.cjs.prod.js');
|
|
7
|
-
var Context_dist_effectContext = require('./Context-119d62eb.cjs.prod.js');
|
|
8
|
-
var Deferred_dist_effectDeferred = require('./Deferred-77579e00.cjs.prod.js');
|
|
9
|
-
var Duration_dist_effectDuration = require('./Duration-205d0b80.cjs.prod.js');
|
|
10
|
-
var Effect_dist_effectEffect = require('./Effect-6713972b.cjs.prod.js');
|
|
11
|
-
var Either_dist_effectEither = require('./Either-d995ebb4.cjs.prod.js');
|
|
12
|
-
var Equal_dist_effectEqual = require('./Equal-ed1e8c3c.cjs.prod.js');
|
|
13
|
-
var Exit_dist_effectExit = require('./Exit-eb04f98e.cjs.prod.js');
|
|
14
|
-
var Fiber_dist_effectFiber = require('./Fiber-a7306b77.cjs.prod.js');
|
|
15
|
-
var Function_dist_effectFunction = require('./Function-8336aeeb.cjs.prod.js');
|
|
16
|
-
var Hub_dist_effectHub = require('./Hub-4223bb07.cjs.prod.js');
|
|
17
|
-
var Layer_dist_effectLayer = require('./Layer-79fa5f4a.cjs.prod.js');
|
|
18
|
-
var Option_dist_effectOption = require('./Option-b07f2b1d.cjs.prod.js');
|
|
19
|
-
var Pipeable_dist_effectPipeable = require('./Pipeable-856ddd7c.cjs.prod.js');
|
|
20
|
-
var Queue_dist_effectQueue = require('./Queue-9f8579c0.cjs.prod.js');
|
|
21
|
-
var Ref_dist_effectRef = require('./Ref-88c1d56d.cjs.prod.js');
|
|
22
|
-
var Runtime_dist_effectRuntime = require('./Runtime-15bf8fcd.cjs.prod.js');
|
|
23
|
-
var Schedule_dist_effectSchedule = require('./Schedule-35a9436e.cjs.prod.js');
|
|
24
|
-
var Scope_dist_effectScope = require('./Scope-326194e2.cjs.prod.js');
|
|
25
|
-
var StreamHaltStrategy_dist_effectStreamHaltStrategy = require('./StreamHaltStrategy-506d4abb.cjs.prod.js');
|
|
26
|
-
var sink = require('./sink-05d54662.cjs.prod.js');
|
|
27
|
-
var mergeStrategy = require('./mergeStrategy-909bebb0.cjs.prod.js');
|
|
28
|
-
var singleProducerAsyncInput = require('./singleProducerAsyncInput-d3225b4e.cjs.prod.js');
|
|
29
|
-
require('./GlobalValue-f65cc41d.cjs.prod.js');
|
|
30
|
-
require('./Effectable-954172fc.cjs.prod.js');
|
|
31
|
-
require('./Differ-cbfa45cb.cjs.prod.js');
|
|
32
|
-
require('./timeout-2a62e4b5.cjs.prod.js');
|
|
33
|
-
var take$2 = require('./take-d293f721.cjs.prod.js');
|
|
34
|
-
|
|
35
|
-
/** @internal */
|
|
36
|
-
class RingBuffer {
|
|
37
|
-
size = 0;
|
|
38
|
-
current = 0;
|
|
39
|
-
constructor(capacity) {
|
|
40
|
-
this.capacity = capacity;
|
|
41
|
-
this.array = Array.from({
|
|
42
|
-
length: capacity
|
|
43
|
-
}, Function_dist_effectFunction.constUndefined);
|
|
44
|
-
}
|
|
45
|
-
head() {
|
|
46
|
-
return Option_dist_effectOption.fromNullable(this.array[this.current]);
|
|
47
|
-
}
|
|
48
|
-
lastOrNull() {
|
|
49
|
-
if (this.size === 0) {
|
|
50
|
-
return undefined;
|
|
51
|
-
}
|
|
52
|
-
const index = this.current === 0 ? this.array.length - 1 : this.current - 1;
|
|
53
|
-
return this.array[index] ?? undefined;
|
|
54
|
-
}
|
|
55
|
-
put(value) {
|
|
56
|
-
this.array[this.current] = value;
|
|
57
|
-
this.increment();
|
|
58
|
-
}
|
|
59
|
-
dropLast() {
|
|
60
|
-
if (this.size > 0) {
|
|
61
|
-
this.decrement();
|
|
62
|
-
this.array[this.current] = undefined;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
toChunk() {
|
|
66
|
-
const begin = this.current - this.size;
|
|
67
|
-
const newArray = begin < 0 ? [...this.array.slice(this.capacity + begin, this.capacity), ...this.array.slice(0, this.current)] : this.array.slice(begin, this.current);
|
|
68
|
-
return Chunk_dist_effectChunk.fromIterable(newArray);
|
|
69
|
-
}
|
|
70
|
-
increment() {
|
|
71
|
-
if (this.size < this.capacity) {
|
|
72
|
-
this.size += 1;
|
|
73
|
-
}
|
|
74
|
-
this.current = (this.current + 1) % this.capacity;
|
|
75
|
-
}
|
|
76
|
-
decrement() {
|
|
77
|
-
this.size -= 1;
|
|
78
|
-
if (this.current > 0) {
|
|
79
|
-
this.current -= 1;
|
|
80
|
-
} else {
|
|
81
|
-
this.current = this.capacity - 1;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/** @internal */
|
|
87
|
-
|
|
88
|
-
/** @internal */
|
|
89
|
-
const OP_NOT_STARTED = "NotStarted";
|
|
90
|
-
|
|
91
|
-
/** @internal */
|
|
92
|
-
|
|
93
|
-
/** @internal */
|
|
94
|
-
const OP_PREVIOUS = "Previous";
|
|
95
|
-
|
|
96
|
-
/** @internal */
|
|
97
|
-
|
|
98
|
-
/** @internal */
|
|
99
|
-
const OP_CURRENT = "Current";
|
|
100
|
-
|
|
101
|
-
/** @internal */
|
|
102
|
-
|
|
103
|
-
/** @internal */
|
|
104
|
-
|
|
105
|
-
/** @internal */
|
|
106
|
-
|
|
107
|
-
/** @internal */
|
|
108
|
-
const notStarted = {
|
|
109
|
-
_tag: OP_NOT_STARTED
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
/** @internal */
|
|
113
|
-
const previous = fiber => ({
|
|
114
|
-
_tag: OP_PREVIOUS,
|
|
115
|
-
fiber
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
/** @internal */
|
|
119
|
-
const current = fiber => ({
|
|
120
|
-
_tag: OP_CURRENT,
|
|
121
|
-
fiber
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
/** @internal */
|
|
125
|
-
const make$2 = emit => {
|
|
126
|
-
const ops = {
|
|
127
|
-
chunk(as) {
|
|
128
|
-
return this(Effect_dist_effectEffect.succeed(as));
|
|
129
|
-
},
|
|
130
|
-
die(defect) {
|
|
131
|
-
return this(Effect_dist_effectEffect.die(defect));
|
|
132
|
-
},
|
|
133
|
-
dieMessage(message) {
|
|
134
|
-
return this(Effect_dist_effectEffect.dieMessage(message));
|
|
135
|
-
},
|
|
136
|
-
done(exit) {
|
|
137
|
-
return this(Effect_dist_effectEffect.suspend(() => Exit_dist_effectExit.mapBoth(exit, {
|
|
138
|
-
onFailure: Option_dist_effectOption.some,
|
|
139
|
-
onSuccess: Chunk_dist_effectChunk.of
|
|
140
|
-
})));
|
|
141
|
-
},
|
|
142
|
-
end() {
|
|
143
|
-
return this(Effect_dist_effectEffect.fail(Option_dist_effectOption.none()));
|
|
144
|
-
},
|
|
145
|
-
fail(e) {
|
|
146
|
-
return this(Effect_dist_effectEffect.fail(Option_dist_effectOption.some(e)));
|
|
147
|
-
},
|
|
148
|
-
fromEffect(effect) {
|
|
149
|
-
return this(Effect_dist_effectEffect.mapBoth(effect, {
|
|
150
|
-
onFailure: Option_dist_effectOption.some,
|
|
151
|
-
onSuccess: Chunk_dist_effectChunk.of
|
|
152
|
-
}));
|
|
153
|
-
},
|
|
154
|
-
fromEffectChunk(effect) {
|
|
155
|
-
return this(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some)));
|
|
156
|
-
},
|
|
157
|
-
halt(cause) {
|
|
158
|
-
return this(Effect_dist_effectEffect.failCause(Function_dist_effectFunction.pipe(cause, Cause_dist_effectCause.map(Option_dist_effectOption.some))));
|
|
159
|
-
},
|
|
160
|
-
single(value) {
|
|
161
|
-
return this(Effect_dist_effectEffect.succeed(Chunk_dist_effectChunk.of(value)));
|
|
162
|
-
}
|
|
163
|
-
};
|
|
164
|
-
return Object.assign(emit, ops);
|
|
165
|
-
};
|
|
166
|
-
|
|
167
|
-
/** @internal */
|
|
168
|
-
const HandoffTypeId = /*#__PURE__*/Symbol.for("effect/Stream/Handoff");
|
|
169
|
-
|
|
170
|
-
/** @internal */
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* A synchronous queue-like abstraction that allows a producer to offer an
|
|
174
|
-
* element and wait for it to be taken, and allows a consumer to wait for an
|
|
175
|
-
* element to be available.
|
|
176
|
-
*
|
|
177
|
-
* @internal
|
|
178
|
-
*/
|
|
179
|
-
|
|
180
|
-
/** @internal */
|
|
181
|
-
const OP_HANDOFF_STATE_EMPTY = "Empty";
|
|
182
|
-
|
|
183
|
-
/** @internal */
|
|
184
|
-
|
|
185
|
-
/** @internal */
|
|
186
|
-
const OP_HANDOFF_STATE_FULL = "Full";
|
|
187
|
-
|
|
188
|
-
/** @internal */
|
|
189
|
-
|
|
190
|
-
/** @internal */
|
|
191
|
-
|
|
192
|
-
/** @internal */
|
|
193
|
-
const handoffStateEmpty = notifyConsumer => ({
|
|
194
|
-
_tag: OP_HANDOFF_STATE_EMPTY,
|
|
195
|
-
notifyConsumer
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
/** @internal */
|
|
199
|
-
const handoffStateFull = (value, notifyProducer) => ({
|
|
200
|
-
_tag: OP_HANDOFF_STATE_FULL,
|
|
201
|
-
value,
|
|
202
|
-
notifyProducer
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
/** @internal */
|
|
206
|
-
const handoffStateMatch = (onEmpty, onFull) => {
|
|
207
|
-
return self => {
|
|
208
|
-
switch (self._tag) {
|
|
209
|
-
case OP_HANDOFF_STATE_EMPTY:
|
|
210
|
-
{
|
|
211
|
-
return onEmpty(self.notifyConsumer);
|
|
212
|
-
}
|
|
213
|
-
case OP_HANDOFF_STATE_FULL:
|
|
214
|
-
{
|
|
215
|
-
return onFull(self.value, self.notifyProducer);
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
/** @internal */
|
|
222
|
-
const handoffVariance = {
|
|
223
|
-
_A: _ => _
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
/** @internal */
|
|
227
|
-
const make$1 = () => Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.flatMap(deferred => Ref_dist_effectRef.make(handoffStateEmpty(deferred))), Effect_dist_effectEffect.map(ref => ({
|
|
228
|
-
[HandoffTypeId]: handoffVariance,
|
|
229
|
-
ref
|
|
230
|
-
})));
|
|
231
|
-
|
|
232
|
-
/** @internal */
|
|
233
|
-
const offer = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, value) => {
|
|
234
|
-
return Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred.make(), deferred => Effect_dist_effectEffect.flatten(Ref_dist_effectRef.modify(self.ref, state => Function_dist_effectFunction.pipe(state, handoffStateMatch(notifyConsumer => [Effect_dist_effectEffect.zipRight(Deferred_dist_effectDeferred.succeed(notifyConsumer, void 0), Deferred_dist_effectDeferred._await(deferred)), handoffStateFull(value, deferred)], (_, notifyProducer) => [Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred._await(notifyProducer), () => Function_dist_effectFunction.pipe(self, offer(value))), state])))));
|
|
235
|
-
});
|
|
236
|
-
|
|
237
|
-
/** @internal */
|
|
238
|
-
const take$1 = self => Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred.make(), deferred => Effect_dist_effectEffect.flatten(Ref_dist_effectRef.modify(self.ref, state => Function_dist_effectFunction.pipe(state, handoffStateMatch(notifyConsumer => [Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred._await(notifyConsumer), () => take$1(self)), state], (value, notifyProducer) => [Effect_dist_effectEffect.as(Deferred_dist_effectDeferred.succeed(notifyProducer, void 0), value), handoffStateEmpty(deferred)])))));
|
|
239
|
-
|
|
240
|
-
/** @internal */
|
|
241
|
-
|
|
242
|
-
/** @internal */
|
|
243
|
-
const OP_EMIT = "Emit";
|
|
244
|
-
|
|
245
|
-
/** @internal */
|
|
246
|
-
|
|
247
|
-
/** @internal */
|
|
248
|
-
const OP_HALT = "Halt";
|
|
249
|
-
|
|
250
|
-
/** @internal */
|
|
251
|
-
|
|
252
|
-
/** @internal */
|
|
253
|
-
const OP_END = "End";
|
|
254
|
-
|
|
255
|
-
/** @internal */
|
|
256
|
-
|
|
257
|
-
/** @internal */
|
|
258
|
-
|
|
259
|
-
/** @internal */
|
|
260
|
-
|
|
261
|
-
/** @internal */
|
|
262
|
-
const emit = elements => ({
|
|
263
|
-
_tag: OP_EMIT,
|
|
264
|
-
elements
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
/** @internal */
|
|
268
|
-
const halt = cause => ({
|
|
269
|
-
_tag: OP_HALT,
|
|
270
|
-
cause
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
/** @internal */
|
|
274
|
-
const end$1 = reason => ({
|
|
275
|
-
_tag: OP_END,
|
|
276
|
-
reason
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
/** @internal */
|
|
280
|
-
const end = () => Effect_dist_effectEffect.fail(Option_dist_effectOption.none());
|
|
281
|
-
|
|
282
|
-
/** @internal */
|
|
283
|
-
const failCause$1 = cause => Effect_dist_effectEffect.mapError(Effect_dist_effectEffect.failCause(cause), Option_dist_effectOption.some);
|
|
284
|
-
|
|
285
|
-
/** @internal */
|
|
286
|
-
|
|
287
|
-
/** @internal */
|
|
288
|
-
const OP_SCHEDULE_END = "ScheduleEnd";
|
|
289
|
-
|
|
290
|
-
/** @internal */
|
|
291
|
-
|
|
292
|
-
/** @internal */
|
|
293
|
-
const OP_UPSTREAM_END = "UpstreamEnd";
|
|
294
|
-
|
|
295
|
-
/** @internal */
|
|
296
|
-
|
|
297
|
-
/** @internal */
|
|
298
|
-
|
|
299
|
-
/** @internal */
|
|
300
|
-
|
|
301
|
-
/** @internal */
|
|
302
|
-
const ScheduleEnd = {
|
|
303
|
-
_tag: OP_SCHEDULE_END
|
|
304
|
-
};
|
|
305
|
-
|
|
306
|
-
/** @internal */
|
|
307
|
-
const UpstreamEnd = {
|
|
308
|
-
_tag: OP_UPSTREAM_END
|
|
309
|
-
};
|
|
310
|
-
|
|
311
|
-
/** @internal */
|
|
312
|
-
|
|
313
|
-
/** @internal */
|
|
314
|
-
const OP_DRAIN_LEFT = "DrainLeft";
|
|
315
|
-
|
|
316
|
-
/** @internal */
|
|
317
|
-
|
|
318
|
-
/** @internal */
|
|
319
|
-
const OP_DRAIN_RIGHT = "DrainRight";
|
|
320
|
-
|
|
321
|
-
/** @internal */
|
|
322
|
-
|
|
323
|
-
/** @internal */
|
|
324
|
-
const OP_PULL_BOTH$1 = "PullBoth";
|
|
325
|
-
|
|
326
|
-
/** @internal */
|
|
327
|
-
|
|
328
|
-
/** @internal */
|
|
329
|
-
const OP_PULL_LEFT$1 = "PullLeft";
|
|
330
|
-
|
|
331
|
-
/** @internal */
|
|
332
|
-
|
|
333
|
-
/** @internal */
|
|
334
|
-
const OP_PULL_RIGHT$1 = "PullRight";
|
|
335
|
-
|
|
336
|
-
/** @internal */
|
|
337
|
-
|
|
338
|
-
/** @internal */
|
|
339
|
-
|
|
340
|
-
/** @internal */
|
|
341
|
-
|
|
342
|
-
/** @internal */
|
|
343
|
-
|
|
344
|
-
/** @internal */
|
|
345
|
-
|
|
346
|
-
/** @internal */
|
|
347
|
-
|
|
348
|
-
/** @internal */
|
|
349
|
-
const DrainLeft = {
|
|
350
|
-
_tag: OP_DRAIN_LEFT
|
|
351
|
-
};
|
|
352
|
-
|
|
353
|
-
/** @internal */
|
|
354
|
-
const DrainRight = {
|
|
355
|
-
_tag: OP_DRAIN_RIGHT
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
/** @internal */
|
|
359
|
-
const PullBoth$1 = {
|
|
360
|
-
_tag: OP_PULL_BOTH$1
|
|
361
|
-
};
|
|
362
|
-
|
|
363
|
-
/** @internal */
|
|
364
|
-
const PullLeft$1 = rightChunk => ({
|
|
365
|
-
_tag: OP_PULL_LEFT$1,
|
|
366
|
-
rightChunk
|
|
367
|
-
});
|
|
368
|
-
|
|
369
|
-
/** @internal */
|
|
370
|
-
const PullRight$1 = leftChunk => ({
|
|
371
|
-
_tag: OP_PULL_RIGHT$1,
|
|
372
|
-
leftChunk
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
/** @internal */
|
|
376
|
-
|
|
377
|
-
/** @internal */
|
|
378
|
-
const OP_PULL_BOTH = "PullBoth";
|
|
379
|
-
|
|
380
|
-
/** @internal */
|
|
381
|
-
|
|
382
|
-
/** @internal */
|
|
383
|
-
const OP_PULL_LEFT = "PullLet";
|
|
384
|
-
|
|
385
|
-
/** @internal */
|
|
386
|
-
|
|
387
|
-
/** @internal */
|
|
388
|
-
const OP_PULL_RIGHT = "PullRight";
|
|
389
|
-
|
|
390
|
-
/** @internal */
|
|
391
|
-
|
|
392
|
-
/** @internal */
|
|
393
|
-
|
|
394
|
-
/** @internal */
|
|
395
|
-
|
|
396
|
-
/** @internal */
|
|
397
|
-
|
|
398
|
-
/** @internal */
|
|
399
|
-
const PullBoth = {
|
|
400
|
-
_tag: OP_PULL_BOTH
|
|
401
|
-
};
|
|
402
|
-
|
|
403
|
-
/** @internal */
|
|
404
|
-
const PullLeft = rightChunk => ({
|
|
405
|
-
_tag: OP_PULL_LEFT,
|
|
406
|
-
rightChunk
|
|
407
|
-
});
|
|
408
|
-
|
|
409
|
-
/** @internal */
|
|
410
|
-
const PullRight = leftChunk => ({
|
|
411
|
-
_tag: OP_PULL_RIGHT,
|
|
412
|
-
leftChunk
|
|
413
|
-
});
|
|
414
|
-
|
|
415
|
-
/** @internal */
|
|
416
|
-
const StreamSymbolKey = "effect/Stream";
|
|
417
|
-
|
|
418
|
-
/** @internal */
|
|
419
|
-
const StreamTypeId = /*#__PURE__*/Symbol.for(StreamSymbolKey);
|
|
420
|
-
|
|
421
|
-
/** @internal */
|
|
422
|
-
const streamVariance = {
|
|
423
|
-
_R: _ => _,
|
|
424
|
-
_E: _ => _,
|
|
425
|
-
_A: _ => _
|
|
426
|
-
};
|
|
427
|
-
|
|
428
|
-
/** @internal */
|
|
429
|
-
class StreamImpl {
|
|
430
|
-
[StreamTypeId] = streamVariance;
|
|
431
|
-
constructor(channel) {
|
|
432
|
-
this.channel = channel;
|
|
433
|
-
}
|
|
434
|
-
pipe() {
|
|
435
|
-
return Pipeable_dist_effectPipeable.pipeArguments(this, arguments);
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
/** @internal */
|
|
440
|
-
const isStream = u => typeof u === "object" && u != null && StreamTypeId in u || Effect_dist_effectEffect.isEffect(u);
|
|
441
|
-
|
|
442
|
-
/** @internal */
|
|
443
|
-
const DefaultChunkSize = 4096;
|
|
444
|
-
|
|
445
|
-
/** @internal */
|
|
446
|
-
const acquireRelease = (acquire, release) => scoped(Effect_dist_effectEffect.acquireRelease(acquire, release));
|
|
447
|
-
|
|
448
|
-
/** @internal */
|
|
449
|
-
const aggregate = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink) => aggregateWithin(self, sink, Schedule_dist_effectSchedule.forever));
|
|
450
|
-
|
|
451
|
-
/** @internal */
|
|
452
|
-
const aggregateWithin = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, sink, schedule) => filterMap(aggregateWithinEither(self, sink, schedule), _ => Either_dist_effectEither.match(_, {
|
|
453
|
-
onLeft: Option_dist_effectOption.none,
|
|
454
|
-
onRight: Option_dist_effectOption.some
|
|
455
|
-
})));
|
|
456
|
-
|
|
457
|
-
/** @internal */
|
|
458
|
-
const aggregateWithinEither = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, sink$1, schedule) => {
|
|
459
|
-
const layer = Effect_dist_effectEffect.all([make$1(), Ref_dist_effectRef.make(ScheduleEnd), Ref_dist_effectRef.make(Chunk_dist_effectChunk.empty()), Schedule_dist_effectSchedule.driver(schedule), Ref_dist_effectRef.make(false), Ref_dist_effectRef.make(false)]);
|
|
460
|
-
return Function_dist_effectFunction.pipe(fromEffect(layer), flatMap(([handoff, sinkEndReason, sinkLeftovers, scheduleDriver, consumed, endAfterEmit]) => {
|
|
461
|
-
const handoffProducer = sink.readWithCause({
|
|
462
|
-
onInput: input => sink.flatMap(sink.fromEffect(Function_dist_effectFunction.pipe(handoff, offer(emit(input)), Effect_dist_effectEffect.when(() => Chunk_dist_effectChunk.isNonEmpty(input)))), () => handoffProducer),
|
|
463
|
-
onFailure: cause => sink.fromEffect(offer(handoff, halt(cause))),
|
|
464
|
-
onDone: () => sink.fromEffect(offer(handoff, end$1(UpstreamEnd)))
|
|
465
|
-
});
|
|
466
|
-
const handoffConsumer = Function_dist_effectFunction.pipe(Ref_dist_effectRef.getAndSet(sinkLeftovers, Chunk_dist_effectChunk.empty()), Effect_dist_effectEffect.flatMap(leftovers => {
|
|
467
|
-
if (Chunk_dist_effectChunk.isNonEmpty(leftovers)) {
|
|
468
|
-
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(consumed, true), Effect_dist_effectEffect.zipRight(Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(sink.write(leftovers), sink.flatMap(() => handoffConsumer)))));
|
|
469
|
-
}
|
|
470
|
-
return Function_dist_effectFunction.pipe(take$1(handoff), Effect_dist_effectEffect.map(signal => {
|
|
471
|
-
switch (signal._tag) {
|
|
472
|
-
case OP_EMIT:
|
|
473
|
-
{
|
|
474
|
-
return Function_dist_effectFunction.pipe(sink.fromEffect(Ref_dist_effectRef.set(consumed, true)), sink.zipRight(sink.write(signal.elements)), sink.zipRight(sink.fromEffect(Ref_dist_effectRef.get(endAfterEmit))), sink.flatMap(bool => bool ? sink.unit : handoffConsumer));
|
|
475
|
-
}
|
|
476
|
-
case OP_HALT:
|
|
477
|
-
{
|
|
478
|
-
return sink.failCause(signal.cause);
|
|
479
|
-
}
|
|
480
|
-
case OP_END:
|
|
481
|
-
{
|
|
482
|
-
if (signal.reason._tag === OP_SCHEDULE_END) {
|
|
483
|
-
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(consumed), Effect_dist_effectEffect.map(bool => bool ? sink.fromEffect(Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(sinkEndReason, ScheduleEnd), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(endAfterEmit, true)))) : Function_dist_effectFunction.pipe(sink.fromEffect(Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(sinkEndReason, ScheduleEnd), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(endAfterEmit, true)))), sink.flatMap(() => handoffConsumer))), sink.unwrap);
|
|
484
|
-
}
|
|
485
|
-
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(sinkEndReason, signal.reason), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(endAfterEmit, true)), sink.fromEffect);
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
}));
|
|
489
|
-
}), sink.unwrap);
|
|
490
|
-
const timeout = lastB => scheduleDriver.next(lastB);
|
|
491
|
-
const scheduledAggregator = (sinkFiber, scheduleFiber, scope) => {
|
|
492
|
-
const forkSink = Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(consumed, false), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(endAfterEmit, false)), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(handoffConsumer, sink.pipeToOrFail(sink.toChannel(sink$1)), sink.collectElements, sink.run, Effect_dist_effectEffect.forkIn(scope))));
|
|
493
|
-
const handleSide = (leftovers, b, c) => Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(sinkLeftovers, Chunk_dist_effectChunk.flatten(leftovers)), Effect_dist_effectEffect.zipRight(Effect_dist_effectEffect.map(Ref_dist_effectRef.get(sinkEndReason), reason => {
|
|
494
|
-
switch (reason._tag) {
|
|
495
|
-
case OP_SCHEDULE_END:
|
|
496
|
-
{
|
|
497
|
-
return Function_dist_effectFunction.pipe(Effect_dist_effectEffect.all([Ref_dist_effectRef.get(consumed), forkSink, Function_dist_effectFunction.pipe(timeout(Option_dist_effectOption.some(b)), Effect_dist_effectEffect.forkIn(scope))]), Effect_dist_effectEffect.map(([wasConsumed, sinkFiber, scheduleFiber]) => {
|
|
498
|
-
const toWrite = Function_dist_effectFunction.pipe(c, Option_dist_effectOption.match({
|
|
499
|
-
onNone: () => Chunk_dist_effectChunk.of(Either_dist_effectEither.right(b)),
|
|
500
|
-
onSome: c => Chunk_dist_effectChunk.make(Either_dist_effectEither.right(b), Either_dist_effectEither.left(c))
|
|
501
|
-
}));
|
|
502
|
-
if (wasConsumed) {
|
|
503
|
-
return Function_dist_effectFunction.pipe(sink.write(toWrite), sink.flatMap(() => scheduledAggregator(sinkFiber, scheduleFiber, scope)));
|
|
504
|
-
}
|
|
505
|
-
return scheduledAggregator(sinkFiber, scheduleFiber, scope);
|
|
506
|
-
}), sink.unwrap);
|
|
507
|
-
}
|
|
508
|
-
case OP_UPSTREAM_END:
|
|
509
|
-
{
|
|
510
|
-
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(consumed), Effect_dist_effectEffect.map(wasConsumed => wasConsumed ? sink.write(Chunk_dist_effectChunk.of(Either_dist_effectEither.right(b))) : sink.unit), sink.unwrap);
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
})), sink.unwrap);
|
|
514
|
-
return sink.unwrap(Effect_dist_effectEffect.raceWith(Fiber_dist_effectFiber.join(sinkFiber), Fiber_dist_effectFiber.join(scheduleFiber), {
|
|
515
|
-
onSelfDone: (sinkExit, _) => Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(scheduleFiber), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.suspend(() => sinkExit), Effect_dist_effectEffect.map(([leftovers, b]) => handleSide(leftovers, b, Option_dist_effectOption.none()))))),
|
|
516
|
-
onOtherDone: (scheduleExit, _) => Effect_dist_effectEffect.matchCauseEffect(Effect_dist_effectEffect.suspend(() => scheduleExit), {
|
|
517
|
-
onFailure: cause => Either_dist_effectEither.match(Cause_dist_effectCause.failureOrCause(cause), {
|
|
518
|
-
onLeft: () => Function_dist_effectFunction.pipe(handoff, offer(end$1(ScheduleEnd)), Effect_dist_effectEffect.forkDaemon, Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(sinkFiber), Effect_dist_effectEffect.map(([leftovers, b]) => handleSide(leftovers, b, Option_dist_effectOption.none()))))),
|
|
519
|
-
onRight: cause => Function_dist_effectFunction.pipe(handoff, offer(halt(cause)), Effect_dist_effectEffect.forkDaemon, Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(sinkFiber), Effect_dist_effectEffect.map(([leftovers, b]) => handleSide(leftovers, b, Option_dist_effectOption.none())))))
|
|
520
|
-
}),
|
|
521
|
-
onSuccess: c => Function_dist_effectFunction.pipe(handoff, offer(end$1(ScheduleEnd)), Effect_dist_effectEffect.forkDaemon, Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(sinkFiber), Effect_dist_effectEffect.map(([leftovers, b]) => handleSide(leftovers, b, Option_dist_effectOption.some(c))))))
|
|
522
|
-
})
|
|
523
|
-
}));
|
|
524
|
-
};
|
|
525
|
-
return unwrapScoped(Function_dist_effectFunction.pipe(self, toChannel, sink.pipeTo(handoffProducer), sink.run, Effect_dist_effectEffect.forkScoped, Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(handoffConsumer, sink.pipeToOrFail(sink.toChannel(sink$1)), sink.collectElements, sink.run, Effect_dist_effectEffect.forkScoped, Effect_dist_effectEffect.flatMap(sinkFiber => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.forkScoped(timeout(Option_dist_effectOption.none())), Effect_dist_effectEffect.flatMap(scheduleFiber => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.scope, Effect_dist_effectEffect.map(scope => new StreamImpl(scheduledAggregator(sinkFiber, scheduleFiber, scope)))))))))));
|
|
526
|
-
}));
|
|
527
|
-
});
|
|
528
|
-
|
|
529
|
-
/** @internal */
|
|
530
|
-
const as = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, value) => map(self, () => value));
|
|
531
|
-
|
|
532
|
-
/** @internal */
|
|
533
|
-
const _async = (register, outputBuffer = 16) => asyncOption(cb => {
|
|
534
|
-
register(cb);
|
|
535
|
-
return Option_dist_effectOption.none();
|
|
536
|
-
}, outputBuffer);
|
|
537
|
-
|
|
538
|
-
/** @internal */
|
|
539
|
-
const asyncEffect = (register, outputBuffer = 16) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.bounded(outputBuffer), queue => Queue_dist_effectQueue.shutdown(queue)), Effect_dist_effectEffect.flatMap(output => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.runtime(), Effect_dist_effectEffect.flatMap(runtime => Function_dist_effectFunction.pipe(register(make$2(k => Function_dist_effectFunction.pipe(take$2.fromPull(k), Effect_dist_effectEffect.flatMap(take => Queue_dist_effectQueue.offer(output, take)), Effect_dist_effectEffect.asUnit, Runtime_dist_effectRuntime.runPromiseExit(runtime)).then(exit => {
|
|
540
|
-
if (Exit_dist_effectExit.isFailure(exit)) {
|
|
541
|
-
if (!Cause_dist_effectCause.isInterrupted(exit.cause)) {
|
|
542
|
-
throw Cause_dist_effectCause.squash(exit.cause);
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
}))), Effect_dist_effectEffect.map(() => {
|
|
546
|
-
const loop = Function_dist_effectFunction.pipe(Queue_dist_effectQueue.take(output), Effect_dist_effectEffect.flatMap(take$2.done), Effect_dist_effectEffect.match({
|
|
547
|
-
onFailure: maybeError => Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.shutdown(output)), sink.zipRight(Option_dist_effectOption.match(maybeError, {
|
|
548
|
-
onNone: () => sink.unit,
|
|
549
|
-
onSome: sink.fail
|
|
550
|
-
}))),
|
|
551
|
-
onSuccess: chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => loop))
|
|
552
|
-
}), sink.unwrap);
|
|
553
|
-
return loop;
|
|
554
|
-
}))))), sink.unwrapScoped, fromChannel);
|
|
555
|
-
|
|
556
|
-
/** @internal */
|
|
557
|
-
const asyncInterrupt = (register, outputBuffer = 16) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.bounded(outputBuffer), queue => Queue_dist_effectQueue.shutdown(queue)), Effect_dist_effectEffect.flatMap(output => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.runtime(), Effect_dist_effectEffect.flatMap(runtime => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.sync(() => register(make$2(k => Function_dist_effectFunction.pipe(take$2.fromPull(k), Effect_dist_effectEffect.flatMap(take => Queue_dist_effectQueue.offer(output, take)), Effect_dist_effectEffect.asUnit, Runtime_dist_effectRuntime.runPromiseExit(runtime)).then(exit => {
|
|
558
|
-
if (Exit_dist_effectExit.isFailure(exit)) {
|
|
559
|
-
if (!Cause_dist_effectCause.isInterrupted(exit.cause)) {
|
|
560
|
-
throw Cause_dist_effectCause.squash(exit.cause);
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
})))), Effect_dist_effectEffect.map(Either_dist_effectEither.match({
|
|
564
|
-
onLeft: canceler => {
|
|
565
|
-
const loop = Function_dist_effectFunction.pipe(Queue_dist_effectQueue.take(output), Effect_dist_effectEffect.flatMap(take$2.done), Effect_dist_effectEffect.match({
|
|
566
|
-
onFailure: maybeError => sink.zipRight(sink.fromEffect(Queue_dist_effectQueue.shutdown(output)), Option_dist_effectOption.match(maybeError, {
|
|
567
|
-
onNone: () => sink.unit,
|
|
568
|
-
onSome: sink.fail
|
|
569
|
-
})),
|
|
570
|
-
onSuccess: chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => loop))
|
|
571
|
-
}), sink.unwrap);
|
|
572
|
-
return Function_dist_effectFunction.pipe(fromChannel(loop), ensuring(canceler));
|
|
573
|
-
},
|
|
574
|
-
onRight: stream => unwrap(Function_dist_effectFunction.pipe(Queue_dist_effectQueue.shutdown(output), Effect_dist_effectEffect.as(stream)))
|
|
575
|
-
})))))), unwrapScoped);
|
|
576
|
-
|
|
577
|
-
/** @internal */
|
|
578
|
-
const asyncOption = (register, outputBuffer = 16) => asyncInterrupt(emit => Option_dist_effectOption.match(register(emit), {
|
|
579
|
-
onNone: () => Either_dist_effectEither.left(Effect_dist_effectEffect.unit),
|
|
580
|
-
onSome: Either_dist_effectEither.right
|
|
581
|
-
}), outputBuffer);
|
|
582
|
-
|
|
583
|
-
/** @internal */
|
|
584
|
-
const asyncScoped = (register, outputBuffer = 16) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.bounded(outputBuffer), queue => Queue_dist_effectQueue.shutdown(queue)), Effect_dist_effectEffect.flatMap(output => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.runtime(), Effect_dist_effectEffect.flatMap(runtime => Function_dist_effectFunction.pipe(register(make$2(k => Function_dist_effectFunction.pipe(take$2.fromPull(k), Effect_dist_effectEffect.flatMap(take => Queue_dist_effectQueue.offer(output, take)), Effect_dist_effectEffect.asUnit, Runtime_dist_effectRuntime.runPromiseExit(runtime)).then(exit => {
|
|
585
|
-
if (Exit_dist_effectExit.isFailure(exit)) {
|
|
586
|
-
if (!Cause_dist_effectCause.isInterrupted(exit.cause)) {
|
|
587
|
-
throw Cause_dist_effectCause.squash(exit.cause);
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
}))), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.make(false)), Effect_dist_effectEffect.flatMap(ref => Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(ref), Effect_dist_effectEffect.map(isDone => isDone ? end() : Function_dist_effectFunction.pipe(Queue_dist_effectQueue.take(output), Effect_dist_effectEffect.flatMap(take$2.done), Effect_dist_effectEffect.onError(() => Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(ref, true), Effect_dist_effectEffect.zipRight(Queue_dist_effectQueue.shutdown(output)))))))))))), scoped, flatMap(repeatEffectChunkOption));
|
|
591
|
-
|
|
592
|
-
/** @internal */
|
|
593
|
-
const branchAfter = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, n, f) => suspend(() => {
|
|
594
|
-
const buffering = acc => sink.readWith({
|
|
595
|
-
onInput: input => {
|
|
596
|
-
const nextSize = acc.length + input.length;
|
|
597
|
-
if (nextSize >= n) {
|
|
598
|
-
const [b1, b2] = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.splitAt(n - acc.length));
|
|
599
|
-
return running(Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(b1)), b2);
|
|
600
|
-
}
|
|
601
|
-
return buffering(Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(input)));
|
|
602
|
-
},
|
|
603
|
-
onFailure: sink.fail,
|
|
604
|
-
onDone: () => running(acc, Chunk_dist_effectChunk.empty())
|
|
605
|
-
});
|
|
606
|
-
const running = (prefix, leftover) => sink.pipeTo(sink.zipRight(sink.write(leftover), sink.identityChannel()), toChannel(f(prefix)));
|
|
607
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(buffering(Chunk_dist_effectChunk.empty()))));
|
|
608
|
-
}));
|
|
609
|
-
|
|
610
|
-
/** @internal */
|
|
611
|
-
const broadcast = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, n, maximumLag) => Function_dist_effectFunction.pipe(self, broadcastedQueues(n, maximumLag), Effect_dist_effectEffect.map(tuple => tuple.map(queue => flattenTake(fromQueue(queue, {
|
|
612
|
-
shutdown: true
|
|
613
|
-
}))))));
|
|
614
|
-
|
|
615
|
-
/** @internal */
|
|
616
|
-
const broadcastDynamic = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, maximumLag) => Function_dist_effectFunction.pipe(self, broadcastedQueuesDynamic(maximumLag), Effect_dist_effectEffect.map(effect => flattenTake(flatMap(scoped(effect), fromQueue)))));
|
|
617
|
-
|
|
618
|
-
/** @internal */
|
|
619
|
-
const broadcastedQueues = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, n, maximumLag) => Effect_dist_effectEffect.flatMap(Hub_dist_effectHub.bounded(maximumLag), hub => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.all(Array.from({
|
|
620
|
-
length: n
|
|
621
|
-
}, () => Hub_dist_effectHub.subscribe(hub))), Effect_dist_effectEffect.tap(() => Effect_dist_effectEffect.forkScoped(runIntoHubScoped(self, hub))))));
|
|
622
|
-
|
|
623
|
-
/** @internal */
|
|
624
|
-
const broadcastedQueuesDynamic = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, maximumLag) => Effect_dist_effectEffect.map(toHub(self, maximumLag), Hub_dist_effectHub.subscribe));
|
|
625
|
-
|
|
626
|
-
/** @internal */
|
|
627
|
-
const buffer = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
628
|
-
if (options.capacity === "unbounded") {
|
|
629
|
-
return bufferUnbounded(self);
|
|
630
|
-
} else if (options.strategy === "dropping") {
|
|
631
|
-
return bufferDropping(self, options.capacity);
|
|
632
|
-
} else if (options.strategy === "sliding") {
|
|
633
|
-
return bufferSliding(self, options.capacity);
|
|
634
|
-
}
|
|
635
|
-
const queue = toQueueOfElements(self, options);
|
|
636
|
-
return new StreamImpl(sink.unwrapScoped(Effect_dist_effectEffect.map(queue, queue => {
|
|
637
|
-
const process = Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.take(queue)), sink.flatMap(Exit_dist_effectExit.match({
|
|
638
|
-
onFailure: cause => Function_dist_effectFunction.pipe(Cause_dist_effectCause.flipCauseOption(cause), Option_dist_effectOption.match({
|
|
639
|
-
onNone: () => sink.unit,
|
|
640
|
-
onSome: sink.failCause
|
|
641
|
-
})),
|
|
642
|
-
onSuccess: value => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(value)), () => process)
|
|
643
|
-
})));
|
|
644
|
-
return process;
|
|
645
|
-
})));
|
|
646
|
-
});
|
|
647
|
-
|
|
648
|
-
/** @internal */
|
|
649
|
-
const bufferChunks = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
650
|
-
if (options.strategy === "dropping") {
|
|
651
|
-
return bufferChunksDropping(self, options.capacity);
|
|
652
|
-
} else if (options.strategy === "sliding") {
|
|
653
|
-
return bufferChunksSliding(self, options.capacity);
|
|
654
|
-
}
|
|
655
|
-
const queue = toQueue(self, options);
|
|
656
|
-
return new StreamImpl(sink.unwrapScoped(Effect_dist_effectEffect.map(queue, queue => {
|
|
657
|
-
const process = Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.take(queue)), sink.flatMap(take$2.match({
|
|
658
|
-
onEnd: () => sink.unit,
|
|
659
|
-
onFailure: sink.failCause,
|
|
660
|
-
onSuccess: value => Function_dist_effectFunction.pipe(sink.write(value), sink.flatMap(() => process))
|
|
661
|
-
})));
|
|
662
|
-
return process;
|
|
663
|
-
})));
|
|
664
|
-
});
|
|
665
|
-
const bufferChunksDropping = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => {
|
|
666
|
-
const queue = Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.dropping(capacity), queue => Queue_dist_effectQueue.shutdown(queue));
|
|
667
|
-
return new StreamImpl(bufferSignal(queue, toChannel(self)));
|
|
668
|
-
});
|
|
669
|
-
const bufferChunksSliding = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => {
|
|
670
|
-
const queue = Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.sliding(capacity), queue => Queue_dist_effectQueue.shutdown(queue));
|
|
671
|
-
return new StreamImpl(bufferSignal(queue, toChannel(self)));
|
|
672
|
-
});
|
|
673
|
-
const bufferDropping = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => {
|
|
674
|
-
const queue = Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.dropping(capacity), queue => Queue_dist_effectQueue.shutdown(queue));
|
|
675
|
-
return new StreamImpl(bufferSignal(queue, toChannel(rechunk(1)(self))));
|
|
676
|
-
});
|
|
677
|
-
const bufferSliding = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => {
|
|
678
|
-
const queue = Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.sliding(capacity), queue => Queue_dist_effectQueue.shutdown(queue));
|
|
679
|
-
return new StreamImpl(bufferSignal(queue, toChannel(Function_dist_effectFunction.pipe(self, rechunk(1)))));
|
|
680
|
-
});
|
|
681
|
-
const bufferUnbounded = self => {
|
|
682
|
-
const queue = toQueue(self, {
|
|
683
|
-
strategy: "unbounded"
|
|
684
|
-
});
|
|
685
|
-
return new StreamImpl(sink.unwrapScoped(Effect_dist_effectEffect.map(queue, queue => {
|
|
686
|
-
const process = Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.take(queue)), sink.flatMap(take$2.match({
|
|
687
|
-
onEnd: () => sink.unit,
|
|
688
|
-
onFailure: sink.failCause,
|
|
689
|
-
onSuccess: value => sink.flatMap(sink.write(value), () => process)
|
|
690
|
-
})));
|
|
691
|
-
return process;
|
|
692
|
-
})));
|
|
693
|
-
};
|
|
694
|
-
|
|
695
|
-
/** @internal */
|
|
696
|
-
const bufferSignal = (scoped, bufferChannel) => {
|
|
697
|
-
const producer = (queue, ref) => {
|
|
698
|
-
const terminate = take => Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(ref), Effect_dist_effectEffect.tap(Deferred_dist_effectDeferred._await), Effect_dist_effectEffect.zipRight(Deferred_dist_effectDeferred.make()), Effect_dist_effectEffect.flatMap(deferred => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.offer(queue, [take, deferred]), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(ref, deferred)), Effect_dist_effectEffect.zipRight(Deferred_dist_effectDeferred._await(deferred)))), Effect_dist_effectEffect.asUnit, sink.fromEffect);
|
|
699
|
-
return sink.readWithCause({
|
|
700
|
-
onInput: input => Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.flatMap(deferred => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.offer(queue, [take$2.chunk(input), deferred]), Effect_dist_effectEffect.flatMap(added => Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(ref, deferred), Effect_dist_effectEffect.when(() => added))))), Effect_dist_effectEffect.asUnit, sink.fromEffect, sink.flatMap(() => producer(queue, ref))),
|
|
701
|
-
onFailure: error => terminate(take$2.failCause(error)),
|
|
702
|
-
onDone: () => terminate(take$2.end)
|
|
703
|
-
});
|
|
704
|
-
};
|
|
705
|
-
const consumer = queue => {
|
|
706
|
-
const process = Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.take(queue)), sink.flatMap(([take, deferred]) => sink.zipRight(sink.fromEffect(Deferred_dist_effectDeferred.succeed(deferred, void 0)), take$2.match(take, {
|
|
707
|
-
onEnd: () => sink.unit,
|
|
708
|
-
onFailure: sink.failCause,
|
|
709
|
-
onSuccess: value => Function_dist_effectFunction.pipe(sink.write(value), sink.flatMap(() => process))
|
|
710
|
-
}))));
|
|
711
|
-
return process;
|
|
712
|
-
};
|
|
713
|
-
return sink.unwrapScoped(Function_dist_effectFunction.pipe(scoped, Effect_dist_effectEffect.flatMap(queue => Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.tap(start => Deferred_dist_effectDeferred.succeed(start, void 0)), Effect_dist_effectEffect.flatMap(start => Function_dist_effectFunction.pipe(Ref_dist_effectRef.make(start), Effect_dist_effectEffect.flatMap(ref => Function_dist_effectFunction.pipe(bufferChannel, sink.pipeTo(producer(queue, ref)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.as(consumer(queue))))))));
|
|
714
|
-
};
|
|
715
|
-
|
|
716
|
-
/** @internal */
|
|
717
|
-
const catchAll = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => catchAllCause(self, cause => Either_dist_effectEither.match(Cause_dist_effectCause.failureOrCause(cause), {
|
|
718
|
-
onLeft: f,
|
|
719
|
-
onRight: failCause
|
|
720
|
-
})));
|
|
721
|
-
|
|
722
|
-
/** @internal */
|
|
723
|
-
const catchAllCause = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.catchAllCause(cause => toChannel(f(cause))))));
|
|
724
|
-
|
|
725
|
-
/** @internal */
|
|
726
|
-
const catchSome = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => Function_dist_effectFunction.pipe(self, catchAll(error => Function_dist_effectFunction.pipe(pf(error), Option_dist_effectOption.getOrElse(() => fail(error))))));
|
|
727
|
-
|
|
728
|
-
/** @internal */
|
|
729
|
-
const catchSomeCause = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => Function_dist_effectFunction.pipe(self, catchAllCause(cause => Function_dist_effectFunction.pipe(pf(cause), Option_dist_effectOption.getOrElse(() => failCause(cause))))));
|
|
730
|
-
|
|
731
|
-
/* @internal */
|
|
732
|
-
const catchTag = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, k, f) => catchAll(self, e => {
|
|
733
|
-
if ("_tag" in e && e["_tag"] === k) {
|
|
734
|
-
return f(e);
|
|
735
|
-
}
|
|
736
|
-
return fail(e);
|
|
737
|
-
}));
|
|
738
|
-
|
|
739
|
-
/** @internal */
|
|
740
|
-
const catchTags = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, cases) => catchAll(self, e => {
|
|
741
|
-
const keys = Object.keys(cases);
|
|
742
|
-
if ("_tag" in e && keys.includes(e["_tag"])) {
|
|
743
|
-
return cases[e["_tag"]](e);
|
|
744
|
-
}
|
|
745
|
-
return fail(e);
|
|
746
|
-
}));
|
|
747
|
-
|
|
748
|
-
/** @internal */
|
|
749
|
-
const changes = self => Function_dist_effectFunction.pipe(self, changesWith((x, y) => Equal_dist_effectEqual.equals(y)(x)));
|
|
750
|
-
|
|
751
|
-
/** @internal */
|
|
752
|
-
const changesWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
753
|
-
const writer = last => sink.readWithCause({
|
|
754
|
-
onInput: input => {
|
|
755
|
-
const [newLast, newChunk] = Chunk_dist_effectChunk.reduce(input, [last, Chunk_dist_effectChunk.empty()], ([option, outputs], output) => {
|
|
756
|
-
if (Option_dist_effectOption.isSome(option) && f(option.value, output)) {
|
|
757
|
-
return [Option_dist_effectOption.some(output), outputs];
|
|
758
|
-
}
|
|
759
|
-
return [Option_dist_effectOption.some(output), Function_dist_effectFunction.pipe(outputs, Chunk_dist_effectChunk.append(output))];
|
|
760
|
-
});
|
|
761
|
-
return sink.flatMap(sink.write(newChunk), () => writer(newLast));
|
|
762
|
-
},
|
|
763
|
-
onFailure: sink.failCause,
|
|
764
|
-
onDone: () => sink.unit
|
|
765
|
-
});
|
|
766
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer(Option_dist_effectOption.none()))));
|
|
767
|
-
});
|
|
768
|
-
|
|
769
|
-
/** @internal */
|
|
770
|
-
const changesWithEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
771
|
-
const writer = last => sink.readWithCause({
|
|
772
|
-
onInput: input => Function_dist_effectFunction.pipe(input, Effect_dist_effectEffect.reduce([last, Chunk_dist_effectChunk.empty()], ([option, outputs], output) => {
|
|
773
|
-
if (Option_dist_effectOption.isSome(option)) {
|
|
774
|
-
return Function_dist_effectFunction.pipe(f(option.value, output), Effect_dist_effectEffect.map(bool => bool ? [Option_dist_effectOption.some(output), outputs] : [Option_dist_effectOption.some(output), Function_dist_effectFunction.pipe(outputs, Chunk_dist_effectChunk.append(output))]));
|
|
775
|
-
}
|
|
776
|
-
return Effect_dist_effectEffect.succeed([Option_dist_effectOption.some(output), Function_dist_effectFunction.pipe(outputs, Chunk_dist_effectChunk.append(output))]);
|
|
777
|
-
}), sink.fromEffect, sink.flatMap(([newLast, newChunk]) => Function_dist_effectFunction.pipe(sink.write(newChunk), sink.flatMap(() => writer(newLast))))),
|
|
778
|
-
onFailure: sink.failCause,
|
|
779
|
-
onDone: () => sink.unit
|
|
780
|
-
});
|
|
781
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer(Option_dist_effectOption.none()))));
|
|
782
|
-
});
|
|
783
|
-
|
|
784
|
-
/** @internal */
|
|
785
|
-
const chunks = self => Function_dist_effectFunction.pipe(self, mapChunks(Chunk_dist_effectChunk.of));
|
|
786
|
-
|
|
787
|
-
/** @internal */
|
|
788
|
-
const chunksWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => flattenChunks(f(chunks(self))));
|
|
789
|
-
const unsome = effect => Effect_dist_effectEffect.catchAll(Effect_dist_effectEffect.asSome(effect), o => o._tag === "None" ? Effect_dist_effectEffect.succeedNone : Effect_dist_effectEffect.fail(o.value));
|
|
790
|
-
|
|
791
|
-
/** @internal */
|
|
792
|
-
const combine = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, that, s, f) => {
|
|
793
|
-
const producer = (handoff, latch) => Function_dist_effectFunction.pipe(sink.fromEffect(take$1(latch)), sink.zipRight(sink.readWithCause({
|
|
794
|
-
onInput: input => sink.flatMap(sink.fromEffect(Function_dist_effectFunction.pipe(handoff, offer(Exit_dist_effectExit.succeed(input)))), () => producer(handoff, latch)),
|
|
795
|
-
onFailure: cause => sink.fromEffect(offer(handoff, Exit_dist_effectExit.failCause(Function_dist_effectFunction.pipe(cause, Cause_dist_effectCause.map(Option_dist_effectOption.some))))),
|
|
796
|
-
onDone: () => sink.flatMap(sink.fromEffect(offer(handoff, Exit_dist_effectExit.fail(Option_dist_effectOption.none()))), () => producer(handoff, latch))
|
|
797
|
-
})));
|
|
798
|
-
return new StreamImpl(sink.unwrapScoped(Effect_dist_effectEffect.gen(function* ($) {
|
|
799
|
-
const left = yield* $(make$1());
|
|
800
|
-
const right = yield* $(make$1());
|
|
801
|
-
const latchL = yield* $(make$1());
|
|
802
|
-
const latchR = yield* $(make$1());
|
|
803
|
-
yield* $(toChannel(self), sink.concatMap(sink.writeChunk), sink.pipeTo(producer(left, latchL)), sink.runScoped, Effect_dist_effectEffect.forkScoped);
|
|
804
|
-
yield* $(toChannel(that), sink.concatMap(sink.writeChunk), sink.pipeTo(producer(right, latchR)), sink.runScoped, Effect_dist_effectEffect.forkScoped);
|
|
805
|
-
const pullLeft = Function_dist_effectFunction.pipe(latchL, offer(void 0),
|
|
806
|
-
// TODO: remove
|
|
807
|
-
Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(take$1(left), Effect_dist_effectEffect.flatMap(exit => Effect_dist_effectEffect.suspend(() => exit)))));
|
|
808
|
-
const pullRight = Function_dist_effectFunction.pipe(latchR, offer(void 0),
|
|
809
|
-
// TODO: remove
|
|
810
|
-
Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(take$1(right), Effect_dist_effectEffect.flatMap(exit => Effect_dist_effectEffect.suspend(() => exit)))));
|
|
811
|
-
return toChannel(unfoldEffect(s, s => Effect_dist_effectEffect.flatMap(f(s, pullLeft, pullRight), unsome)));
|
|
812
|
-
})));
|
|
813
|
-
});
|
|
814
|
-
|
|
815
|
-
/** @internal */
|
|
816
|
-
const combineChunks = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, that, s, f) => {
|
|
817
|
-
const producer = (handoff, latch) => sink.zipRight(sink.fromEffect(take$1(latch)), sink.readWithCause({
|
|
818
|
-
onInput: input => sink.flatMap(sink.fromEffect(Function_dist_effectFunction.pipe(handoff, offer(take$2.chunk(input)))), () => producer(handoff, latch)),
|
|
819
|
-
onFailure: cause => sink.fromEffect(offer(handoff, take$2.failCause(cause))),
|
|
820
|
-
onDone: () => sink.fromEffect(offer(handoff, take$2.end))
|
|
821
|
-
}));
|
|
822
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.all([make$1(), make$1(), make$1(), make$1()]), Effect_dist_effectEffect.tap(([left, _, latchL]) => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(producer(left, latchL)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.tap(([_, right, __, latchR]) => Function_dist_effectFunction.pipe(toChannel(that), sink.pipeTo(producer(right, latchR)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.map(([left, right, latchL, latchR]) => {
|
|
823
|
-
const pullLeft = Function_dist_effectFunction.pipe(latchL, offer(void 0), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(take$1(left), Effect_dist_effectEffect.flatMap(take$2.done))));
|
|
824
|
-
const pullRight = Function_dist_effectFunction.pipe(latchR, offer(void 0), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(take$1(right), Effect_dist_effectEffect.flatMap(take$2.done))));
|
|
825
|
-
return toChannel(unfoldChunkEffect(s, s => Effect_dist_effectEffect.flatMap(f(s, pullLeft, pullRight), unsome)));
|
|
826
|
-
}), sink.unwrapScoped));
|
|
827
|
-
});
|
|
828
|
-
|
|
829
|
-
/** @internal */
|
|
830
|
-
const concat = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.zipRight(toChannel(that)))));
|
|
831
|
-
|
|
832
|
-
/** @internal */
|
|
833
|
-
const concatAll = streams => suspend(() => Function_dist_effectFunction.pipe(streams, Chunk_dist_effectChunk.reduce(empty, (x, y) => concat(y)(x))));
|
|
834
|
-
|
|
835
|
-
/** @internal */
|
|
836
|
-
const cross = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, crossWith(that, (a, a2) => [a, a2])));
|
|
837
|
-
|
|
838
|
-
/** @internal */
|
|
839
|
-
const crossLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, crossWith(that, (a, _) => a)));
|
|
840
|
-
|
|
841
|
-
/** @internal */
|
|
842
|
-
const crossRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => flatMap(self, () => that));
|
|
843
|
-
|
|
844
|
-
/** @internal */
|
|
845
|
-
const crossWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => Function_dist_effectFunction.pipe(self, flatMap(a => Function_dist_effectFunction.pipe(that, map(b => f(a, b))))));
|
|
846
|
-
|
|
847
|
-
/** @internal */
|
|
848
|
-
const debounce = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, duration) => Function_dist_effectFunction.pipe(singleProducerAsyncInput.make(), Effect_dist_effectEffect.flatMap(input => Effect_dist_effectEffect.transplant(grafter => Function_dist_effectFunction.pipe(make$1(), Effect_dist_effectEffect.map(handoff => {
|
|
849
|
-
const enqueue = last => Function_dist_effectFunction.pipe(Clock_dist_effectClock.sleep(duration), Effect_dist_effectEffect.as(last), Effect_dist_effectEffect.fork, grafter, Effect_dist_effectEffect.map(fiber => consumer(previous(fiber))));
|
|
850
|
-
const producer = sink.readWithCause({
|
|
851
|
-
onInput: input => Option_dist_effectOption.match(Chunk_dist_effectChunk.last(input), {
|
|
852
|
-
onNone: () => producer,
|
|
853
|
-
onSome: last => sink.flatMap(sink.fromEffect(offer(handoff, emit(Chunk_dist_effectChunk.of(last)))), () => producer)
|
|
854
|
-
}),
|
|
855
|
-
onFailure: cause => sink.fromEffect(offer(handoff, halt(cause))),
|
|
856
|
-
onDone: () => sink.fromEffect(offer(handoff, end$1(UpstreamEnd)))
|
|
857
|
-
});
|
|
858
|
-
const consumer = state => {
|
|
859
|
-
switch (state._tag) {
|
|
860
|
-
case OP_NOT_STARTED:
|
|
861
|
-
{
|
|
862
|
-
return Function_dist_effectFunction.pipe(take$1(handoff), Effect_dist_effectEffect.map(signal => {
|
|
863
|
-
switch (signal._tag) {
|
|
864
|
-
case OP_EMIT:
|
|
865
|
-
{
|
|
866
|
-
return sink.unwrap(enqueue(signal.elements));
|
|
867
|
-
}
|
|
868
|
-
case OP_HALT:
|
|
869
|
-
{
|
|
870
|
-
return sink.failCause(signal.cause);
|
|
871
|
-
}
|
|
872
|
-
case OP_END:
|
|
873
|
-
{
|
|
874
|
-
return sink.unit;
|
|
875
|
-
}
|
|
876
|
-
}
|
|
877
|
-
}), sink.unwrap);
|
|
878
|
-
}
|
|
879
|
-
case OP_PREVIOUS:
|
|
880
|
-
{
|
|
881
|
-
return sink.unwrap(Effect_dist_effectEffect.raceWith(Fiber_dist_effectFiber.join(state.fiber), take$1(handoff), {
|
|
882
|
-
onSelfDone: (leftExit, current$1) => Exit_dist_effectExit.match(leftExit, {
|
|
883
|
-
onFailure: cause => Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(current$1), Effect_dist_effectEffect.as(sink.failCause(cause))),
|
|
884
|
-
onSuccess: chunk => Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => consumer(current(current$1)))))
|
|
885
|
-
}),
|
|
886
|
-
onOtherDone: (rightExit, previous) => Exit_dist_effectExit.match(rightExit, {
|
|
887
|
-
onFailure: cause => Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(previous), Effect_dist_effectEffect.as(sink.failCause(cause))),
|
|
888
|
-
onSuccess: signal => {
|
|
889
|
-
switch (signal._tag) {
|
|
890
|
-
case OP_EMIT:
|
|
891
|
-
{
|
|
892
|
-
return Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(previous), Effect_dist_effectEffect.zipRight(enqueue(signal.elements)));
|
|
893
|
-
}
|
|
894
|
-
case OP_HALT:
|
|
895
|
-
{
|
|
896
|
-
return Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(previous), Effect_dist_effectEffect.as(sink.failCause(signal.cause)));
|
|
897
|
-
}
|
|
898
|
-
case OP_END:
|
|
899
|
-
{
|
|
900
|
-
return Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(previous), Effect_dist_effectEffect.map(chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.zipRight(sink.unit))));
|
|
901
|
-
}
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
})
|
|
905
|
-
}));
|
|
906
|
-
}
|
|
907
|
-
case OP_CURRENT:
|
|
908
|
-
{
|
|
909
|
-
return Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(state.fiber), Effect_dist_effectEffect.map(signal => {
|
|
910
|
-
switch (signal._tag) {
|
|
911
|
-
case OP_EMIT:
|
|
912
|
-
{
|
|
913
|
-
return sink.unwrap(enqueue(signal.elements));
|
|
914
|
-
}
|
|
915
|
-
case OP_HALT:
|
|
916
|
-
{
|
|
917
|
-
return sink.failCause(signal.cause);
|
|
918
|
-
}
|
|
919
|
-
case OP_END:
|
|
920
|
-
{
|
|
921
|
-
return sink.unit;
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
}), sink.unwrap);
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
};
|
|
928
|
-
const debounceChannel = Function_dist_effectFunction.pipe(sink.fromInput(input), sink.pipeTo(producer), sink.run, Effect_dist_effectEffect.forkScoped, Effect_dist_effectEffect.as(Function_dist_effectFunction.pipe(consumer(notStarted), sink.embedInput(input))), sink.unwrapScoped);
|
|
929
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(debounceChannel)));
|
|
930
|
-
})))), unwrap));
|
|
931
|
-
|
|
932
|
-
/** @internal */
|
|
933
|
-
const die = defect => fromEffect(Effect_dist_effectEffect.die(defect));
|
|
934
|
-
|
|
935
|
-
/** @internal */
|
|
936
|
-
const dieSync = evaluate => fromEffect(Effect_dist_effectEffect.dieSync(evaluate));
|
|
937
|
-
|
|
938
|
-
/** @internal */
|
|
939
|
-
const dieMessage = message => fromEffect(Effect_dist_effectEffect.dieMessage(message));
|
|
940
|
-
|
|
941
|
-
/** @internal */
|
|
942
|
-
const distributedWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.flatMap(deferred => Function_dist_effectFunction.pipe(self, distributedWithDynamic({
|
|
943
|
-
maximumLag: options.maximumLag,
|
|
944
|
-
decide: a => Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred._await(deferred), f => f(a))
|
|
945
|
-
}), Effect_dist_effectEffect.flatMap(next => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.all(Chunk_dist_effectChunk.map(Chunk_dist_effectChunk.range(0, options.size - 1), id => Effect_dist_effectEffect.map(next, ([key, queue]) => [[key, id], queue]))), Effect_dist_effectEffect.map(Chunk_dist_effectChunk.unsafeFromArray), Effect_dist_effectEffect.flatMap(entries => {
|
|
946
|
-
const [mappings, queues] = Chunk_dist_effectChunk.reduceRight(entries, [new Map(), Chunk_dist_effectChunk.empty()], ([mappings, queues], [mapping, queue]) => [mappings.set(mapping[0], mapping[1]), Function_dist_effectFunction.pipe(queues, Chunk_dist_effectChunk.prepend(queue))]);
|
|
947
|
-
return Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.succeed(deferred, a => Effect_dist_effectEffect.map(options.decide(a), f => key => Function_dist_effectFunction.pipe(f(mappings.get(key))))), Effect_dist_effectEffect.as(Array.from(queues)));
|
|
948
|
-
})))))));
|
|
949
|
-
|
|
950
|
-
/** @internal */
|
|
951
|
-
const distributedWithDynamicId = {
|
|
952
|
-
ref: 0
|
|
953
|
-
};
|
|
954
|
-
const newDistributedWithDynamicId = () => {
|
|
955
|
-
const current = distributedWithDynamicId.ref;
|
|
956
|
-
distributedWithDynamicId.ref = current + 1;
|
|
957
|
-
return current;
|
|
958
|
-
};
|
|
959
|
-
|
|
960
|
-
/** @internal */
|
|
961
|
-
const distributedWithDynamic = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => distributedWithDynamicCallback(self, options.maximumLag, options.decide, () => Effect_dist_effectEffect.unit));
|
|
962
|
-
const distributedWithDynamicCallback = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, maximumLag, decide, done) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Ref_dist_effectRef.make(new Map()), (ref, _) => Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(ref), Effect_dist_effectEffect.flatMap(queues => Function_dist_effectFunction.pipe(queues.values(), Effect_dist_effectEffect.forEach(Queue_dist_effectQueue.shutdown))))), Effect_dist_effectEffect.flatMap(queuesRef => Effect_dist_effectEffect.gen(function* ($) {
|
|
963
|
-
const offer = a => Function_dist_effectFunction.pipe(decide(a), Effect_dist_effectEffect.flatMap(shouldProcess => Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(queuesRef), Effect_dist_effectEffect.flatMap(queues => Function_dist_effectFunction.pipe(queues.entries(), Effect_dist_effectEffect.reduce(Chunk_dist_effectChunk.empty(), (acc, [id, queue]) => {
|
|
964
|
-
if (shouldProcess(id)) {
|
|
965
|
-
return Function_dist_effectFunction.pipe(Queue_dist_effectQueue.offer(queue, Exit_dist_effectExit.succeed(a)), Effect_dist_effectEffect.matchCauseEffect({
|
|
966
|
-
onFailure: cause =>
|
|
967
|
-
// Ignore all downstream queues that were shut
|
|
968
|
-
// down and remove them later
|
|
969
|
-
Cause_dist_effectCause.isInterrupted(cause) ? Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.prepend(id))) : Effect_dist_effectEffect.failCause(cause),
|
|
970
|
-
onSuccess: () => Effect_dist_effectEffect.succeed(acc)
|
|
971
|
-
}));
|
|
972
|
-
}
|
|
973
|
-
return Effect_dist_effectEffect.succeed(acc);
|
|
974
|
-
}), Effect_dist_effectEffect.flatMap(ids => {
|
|
975
|
-
if (Chunk_dist_effectChunk.isNonEmpty(ids)) {
|
|
976
|
-
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.update(queuesRef, map => {
|
|
977
|
-
for (const id of ids) {
|
|
978
|
-
map.delete(id);
|
|
979
|
-
}
|
|
980
|
-
return map;
|
|
981
|
-
}));
|
|
982
|
-
}
|
|
983
|
-
return Effect_dist_effectEffect.unit;
|
|
984
|
-
}))))), Effect_dist_effectEffect.asUnit);
|
|
985
|
-
const queuesLock = yield* $(Effect_dist_effectEffect.makeSemaphore(1));
|
|
986
|
-
const newQueue = yield* $(Ref_dist_effectRef.make(Function_dist_effectFunction.pipe(Queue_dist_effectQueue.bounded(maximumLag), Effect_dist_effectEffect.flatMap(queue => {
|
|
987
|
-
const id = newDistributedWithDynamicId();
|
|
988
|
-
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.update(queuesRef, map => map.set(id, queue)), Effect_dist_effectEffect.as([id, queue]));
|
|
989
|
-
}))));
|
|
990
|
-
const finalize = endTake =>
|
|
991
|
-
// Make sure that no queues are currently being added
|
|
992
|
-
queuesLock.withPermits(1)(Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(newQueue, Function_dist_effectFunction.pipe(
|
|
993
|
-
// All newly created queues should end immediately
|
|
994
|
-
Queue_dist_effectQueue.bounded(1), Effect_dist_effectEffect.tap(queue => Queue_dist_effectQueue.offer(queue, endTake)), Effect_dist_effectEffect.flatMap(queue => {
|
|
995
|
-
const id = newDistributedWithDynamicId();
|
|
996
|
-
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.update(queuesRef, map => map.set(id, queue)), Effect_dist_effectEffect.as([id, queue]));
|
|
997
|
-
}))), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(queuesRef), Effect_dist_effectEffect.flatMap(map => Function_dist_effectFunction.pipe(Chunk_dist_effectChunk.fromIterable(map.values()), Effect_dist_effectEffect.forEach(queue => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.offer(queue, endTake), Effect_dist_effectEffect.catchSomeCause(cause => Cause_dist_effectCause.isInterrupted(cause) ? Option_dist_effectOption.some(Effect_dist_effectEffect.unit) : Option_dist_effectOption.none()))))))), Effect_dist_effectEffect.zipRight(done(endTake)), Effect_dist_effectEffect.asUnit));
|
|
998
|
-
yield* $(self, runForEachScoped(offer), Effect_dist_effectEffect.matchCauseEffect({
|
|
999
|
-
onFailure: cause => finalize(Exit_dist_effectExit.failCause(Function_dist_effectFunction.pipe(cause, Cause_dist_effectCause.map(Option_dist_effectOption.some)))),
|
|
1000
|
-
onSuccess: () => finalize(Exit_dist_effectExit.fail(Option_dist_effectOption.none()))
|
|
1001
|
-
}), Effect_dist_effectEffect.forkScoped);
|
|
1002
|
-
return queuesLock.withPermits(1)(Effect_dist_effectEffect.flatten(Ref_dist_effectRef.get(newQueue)));
|
|
1003
|
-
}))));
|
|
1004
|
-
|
|
1005
|
-
/** @internal */
|
|
1006
|
-
const drain = self => new StreamImpl(sink.drain(toChannel(self)));
|
|
1007
|
-
|
|
1008
|
-
/** @internal */
|
|
1009
|
-
const drainFork = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(fromEffect(Deferred_dist_effectDeferred.make()), flatMap(backgroundDied => Function_dist_effectFunction.pipe(scoped(Function_dist_effectFunction.pipe(that, runForEachScoped(() => Effect_dist_effectEffect.unit), Effect_dist_effectEffect.catchAllCause(cause => Deferred_dist_effectDeferred.failCause(backgroundDied, cause)), Effect_dist_effectEffect.forkScoped)), crossRight(Function_dist_effectFunction.pipe(self, interruptWhenDeferred(backgroundDied)))))));
|
|
1010
|
-
|
|
1011
|
-
/** @internal */
|
|
1012
|
-
const drop = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => {
|
|
1013
|
-
const loop = r => sink.readWith({
|
|
1014
|
-
onInput: input => {
|
|
1015
|
-
const dropped = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.drop(r));
|
|
1016
|
-
const leftover = Math.max(0, r - input.length);
|
|
1017
|
-
const more = Chunk_dist_effectChunk.isEmpty(input) || leftover > 0;
|
|
1018
|
-
if (more) {
|
|
1019
|
-
return loop(leftover);
|
|
1020
|
-
}
|
|
1021
|
-
return Function_dist_effectFunction.pipe(sink.write(dropped), sink.zipRight(sink.identityChannel()));
|
|
1022
|
-
},
|
|
1023
|
-
onFailure: sink.fail,
|
|
1024
|
-
onDone: () => sink.unit
|
|
1025
|
-
});
|
|
1026
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop(n))));
|
|
1027
|
-
});
|
|
1028
|
-
|
|
1029
|
-
/** @internal */
|
|
1030
|
-
const dropRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => {
|
|
1031
|
-
if (n <= 0) {
|
|
1032
|
-
return identityStream();
|
|
1033
|
-
}
|
|
1034
|
-
return suspend(() => {
|
|
1035
|
-
const queue = new RingBuffer(n);
|
|
1036
|
-
const reader = sink.readWith({
|
|
1037
|
-
onInput: input => {
|
|
1038
|
-
const outputs = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.filterMap(elem => {
|
|
1039
|
-
const head = queue.head();
|
|
1040
|
-
queue.put(elem);
|
|
1041
|
-
return head;
|
|
1042
|
-
}));
|
|
1043
|
-
return Function_dist_effectFunction.pipe(sink.write(outputs), sink.flatMap(() => reader));
|
|
1044
|
-
},
|
|
1045
|
-
onFailure: sink.fail,
|
|
1046
|
-
onDone: () => sink.unit
|
|
1047
|
-
});
|
|
1048
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(reader)));
|
|
1049
|
-
});
|
|
1050
|
-
});
|
|
1051
|
-
|
|
1052
|
-
/** @internal */
|
|
1053
|
-
const dropUntil = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => drop(dropWhile(self, a => !predicate(a)), 1));
|
|
1054
|
-
|
|
1055
|
-
/** @internal */
|
|
1056
|
-
const dropUntilEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1057
|
-
const loop = sink.readWith({
|
|
1058
|
-
onInput: input => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.dropUntil(input, predicate), Effect_dist_effectEffect.map(Chunk_dist_effectChunk.unsafeFromArray), Effect_dist_effectEffect.map(leftover => {
|
|
1059
|
-
const more = Chunk_dist_effectChunk.isEmpty(leftover);
|
|
1060
|
-
if (more) {
|
|
1061
|
-
return sink.suspend(() => loop);
|
|
1062
|
-
}
|
|
1063
|
-
return Function_dist_effectFunction.pipe(sink.write(leftover), sink.zipRight(sink.identityChannel()));
|
|
1064
|
-
}), sink.unwrap),
|
|
1065
|
-
onFailure: sink.fail,
|
|
1066
|
-
onDone: () => sink.unit
|
|
1067
|
-
});
|
|
1068
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop)));
|
|
1069
|
-
});
|
|
1070
|
-
|
|
1071
|
-
/** @internal */
|
|
1072
|
-
const dropWhile = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1073
|
-
const loop = sink.readWith({
|
|
1074
|
-
onInput: input => {
|
|
1075
|
-
const output = Chunk_dist_effectChunk.dropWhile(input, predicate);
|
|
1076
|
-
if (Chunk_dist_effectChunk.isEmpty(output)) {
|
|
1077
|
-
return sink.suspend(() => loop);
|
|
1078
|
-
}
|
|
1079
|
-
return sink.zipRight(sink.write(output), sink.identityChannel());
|
|
1080
|
-
},
|
|
1081
|
-
onFailure: sink.fail,
|
|
1082
|
-
onDone: sink.succeedNow
|
|
1083
|
-
});
|
|
1084
|
-
return new StreamImpl(sink.pipeToOrFail(toChannel(self), loop));
|
|
1085
|
-
});
|
|
1086
|
-
|
|
1087
|
-
/** @internal */
|
|
1088
|
-
const dropWhileEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1089
|
-
const loop = sink.readWith({
|
|
1090
|
-
onInput: input => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.dropWhile(input, predicate), Effect_dist_effectEffect.map(Chunk_dist_effectChunk.unsafeFromArray), Effect_dist_effectEffect.map(leftover => {
|
|
1091
|
-
const more = Chunk_dist_effectChunk.isEmpty(leftover);
|
|
1092
|
-
if (more) {
|
|
1093
|
-
return sink.suspend(() => loop);
|
|
1094
|
-
}
|
|
1095
|
-
return sink.zipRight(sink.write(leftover), sink.identityChannel());
|
|
1096
|
-
}), sink.unwrap),
|
|
1097
|
-
onFailure: sink.fail,
|
|
1098
|
-
onDone: () => sink.unit
|
|
1099
|
-
});
|
|
1100
|
-
return new StreamImpl(sink.pipeToOrFail(toChannel(self), loop));
|
|
1101
|
-
});
|
|
1102
|
-
|
|
1103
|
-
/** @internal */
|
|
1104
|
-
const either = self => Function_dist_effectFunction.pipe(self, map(Either_dist_effectEither.right), catchAll(error => make(Either_dist_effectEither.left(error))));
|
|
1105
|
-
|
|
1106
|
-
/** @internal */
|
|
1107
|
-
const empty = /*#__PURE__*/new StreamImpl( /*#__PURE__*/sink.write( /*#__PURE__*/Chunk_dist_effectChunk.empty()));
|
|
1108
|
-
|
|
1109
|
-
/** @internal */
|
|
1110
|
-
const ensuring = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, finalizer) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.ensuring(finalizer))));
|
|
1111
|
-
|
|
1112
|
-
/** @internal */
|
|
1113
|
-
const ensuringWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, finalizer) => new StreamImpl(sink.ensuringWith(toChannel(self), finalizer)));
|
|
1114
|
-
|
|
1115
|
-
/** @internal */
|
|
1116
|
-
const context = () => fromEffect(Effect_dist_effectEffect.context());
|
|
1117
|
-
|
|
1118
|
-
/** @internal */
|
|
1119
|
-
const contextWith = f => Function_dist_effectFunction.pipe(context(), map(f));
|
|
1120
|
-
|
|
1121
|
-
/** @internal */
|
|
1122
|
-
const contextWithEffect = f => Function_dist_effectFunction.pipe(context(), mapEffectSequential(f));
|
|
1123
|
-
|
|
1124
|
-
/** @internal */
|
|
1125
|
-
const contextWithStream = f => Function_dist_effectFunction.pipe(context(), flatMap(f));
|
|
1126
|
-
|
|
1127
|
-
/** @internal */
|
|
1128
|
-
const execute = effect => drain(fromEffect(effect));
|
|
1129
|
-
|
|
1130
|
-
/** @internal */
|
|
1131
|
-
const fail = error => fromEffectOption(Effect_dist_effectEffect.fail(Option_dist_effectOption.some(error)));
|
|
1132
|
-
|
|
1133
|
-
/** @internal */
|
|
1134
|
-
const failSync = evaluate => fromEffectOption(Effect_dist_effectEffect.failSync(() => Option_dist_effectOption.some(evaluate())));
|
|
1135
|
-
|
|
1136
|
-
/** @internal */
|
|
1137
|
-
const failCause = cause => fromEffect(Effect_dist_effectEffect.failCause(cause));
|
|
1138
|
-
|
|
1139
|
-
/** @internal */
|
|
1140
|
-
const failCauseSync = evaluate => fromEffect(Effect_dist_effectEffect.failCauseSync(evaluate));
|
|
1141
|
-
|
|
1142
|
-
/** @internal */
|
|
1143
|
-
const filter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => mapChunks(self, Chunk_dist_effectChunk.filter(predicate)));
|
|
1144
|
-
|
|
1145
|
-
/** @internal */
|
|
1146
|
-
const filterEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
1147
|
-
const loop = iterator => {
|
|
1148
|
-
const next = iterator.next();
|
|
1149
|
-
if (next.done) {
|
|
1150
|
-
return sink.readWithCause({
|
|
1151
|
-
onInput: input => loop(input[Symbol.iterator]()),
|
|
1152
|
-
onFailure: sink.failCause,
|
|
1153
|
-
onDone: sink.succeed
|
|
1154
|
-
});
|
|
1155
|
-
} else {
|
|
1156
|
-
return Function_dist_effectFunction.pipe(f(next.value), Effect_dist_effectEffect.map(bool => bool ? Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(next.value)), sink.flatMap(() => loop(iterator))) : loop(iterator)), sink.unwrap);
|
|
1157
|
-
}
|
|
1158
|
-
};
|
|
1159
|
-
return new StreamImpl(sink.suspend(() => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]())))));
|
|
1160
|
-
});
|
|
1161
|
-
|
|
1162
|
-
/** @internal */
|
|
1163
|
-
const filterMap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => mapChunks(self, Chunk_dist_effectChunk.filterMap(pf)));
|
|
1164
|
-
|
|
1165
|
-
/** @internal */
|
|
1166
|
-
const filterMapEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => suspend(() => {
|
|
1167
|
-
const loop = iterator => {
|
|
1168
|
-
const next = iterator.next();
|
|
1169
|
-
if (next.done) {
|
|
1170
|
-
return sink.readWithCause({
|
|
1171
|
-
onInput: input => loop(input[Symbol.iterator]()),
|
|
1172
|
-
onFailure: sink.failCause,
|
|
1173
|
-
onDone: sink.succeed
|
|
1174
|
-
});
|
|
1175
|
-
} else {
|
|
1176
|
-
return Function_dist_effectFunction.pipe(pf(next.value), Option_dist_effectOption.match({
|
|
1177
|
-
onNone: () => Effect_dist_effectEffect.sync(() => loop(iterator)),
|
|
1178
|
-
onSome: Effect_dist_effectEffect.map(a2 => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(a2)), () => loop(iterator)))
|
|
1179
|
-
}), sink.unwrap);
|
|
1180
|
-
}
|
|
1181
|
-
};
|
|
1182
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]()))));
|
|
1183
|
-
}));
|
|
1184
|
-
|
|
1185
|
-
/** @internal */
|
|
1186
|
-
const filterMapWhile = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => {
|
|
1187
|
-
const loop = sink.readWith({
|
|
1188
|
-
onInput: input => {
|
|
1189
|
-
const mapped = Chunk_dist_effectChunk.filterMapWhile(input, pf);
|
|
1190
|
-
if (mapped.length === input.length) {
|
|
1191
|
-
return Function_dist_effectFunction.pipe(sink.write(mapped), sink.flatMap(() => loop));
|
|
1192
|
-
}
|
|
1193
|
-
return sink.write(mapped);
|
|
1194
|
-
},
|
|
1195
|
-
onFailure: sink.fail,
|
|
1196
|
-
onDone: sink.succeed
|
|
1197
|
-
});
|
|
1198
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop)));
|
|
1199
|
-
});
|
|
1200
|
-
|
|
1201
|
-
/** @internal */
|
|
1202
|
-
const filterMapWhileEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => suspend(() => {
|
|
1203
|
-
const loop = iterator => {
|
|
1204
|
-
const next = iterator.next();
|
|
1205
|
-
if (next.done) {
|
|
1206
|
-
return sink.readWithCause({
|
|
1207
|
-
onInput: input => loop(input[Symbol.iterator]()),
|
|
1208
|
-
onFailure: sink.failCause,
|
|
1209
|
-
onDone: sink.succeed
|
|
1210
|
-
});
|
|
1211
|
-
} else {
|
|
1212
|
-
return sink.unwrap(Option_dist_effectOption.match(pf(next.value), {
|
|
1213
|
-
onNone: () => Effect_dist_effectEffect.succeed(sink.unit),
|
|
1214
|
-
onSome: Effect_dist_effectEffect.map(a2 => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(a2)), () => loop(iterator)))
|
|
1215
|
-
}));
|
|
1216
|
-
}
|
|
1217
|
-
};
|
|
1218
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]()))));
|
|
1219
|
-
}));
|
|
1220
|
-
|
|
1221
|
-
/** @internal */
|
|
1222
|
-
const finalizer = finalizer => acquireRelease(Effect_dist_effectEffect.unit, () => finalizer);
|
|
1223
|
-
|
|
1224
|
-
/** @internal */
|
|
1225
|
-
const find = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1226
|
-
const loop = sink.readWith({
|
|
1227
|
-
onInput: input => Option_dist_effectOption.match(Chunk_dist_effectChunk.findFirst(input, predicate), {
|
|
1228
|
-
onNone: () => loop,
|
|
1229
|
-
onSome: n => sink.write(Chunk_dist_effectChunk.of(n))
|
|
1230
|
-
}),
|
|
1231
|
-
onFailure: sink.fail,
|
|
1232
|
-
onDone: () => sink.unit
|
|
1233
|
-
});
|
|
1234
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop)));
|
|
1235
|
-
});
|
|
1236
|
-
|
|
1237
|
-
/** @internal */
|
|
1238
|
-
const findEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1239
|
-
const loop = sink.readWith({
|
|
1240
|
-
onInput: input => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.findFirst(input, predicate), Effect_dist_effectEffect.map(Option_dist_effectOption.match({
|
|
1241
|
-
onNone: () => loop,
|
|
1242
|
-
onSome: n => sink.write(Chunk_dist_effectChunk.of(n))
|
|
1243
|
-
})), sink.unwrap),
|
|
1244
|
-
onFailure: sink.fail,
|
|
1245
|
-
onDone: () => sink.unit
|
|
1246
|
-
});
|
|
1247
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop)));
|
|
1248
|
-
});
|
|
1249
|
-
|
|
1250
|
-
/** @internal */
|
|
1251
|
-
const flatMap = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof args[0] !== "function", (self, f, options) => {
|
|
1252
|
-
const bufferSize = options?.bufferSize ?? 16;
|
|
1253
|
-
if (options?.switch) {
|
|
1254
|
-
return matchConcurrency(options?.concurrency, () => flatMapParSwitchBuffer(self, 1, bufferSize, f), n => flatMapParSwitchBuffer(self, n, bufferSize, f));
|
|
1255
|
-
}
|
|
1256
|
-
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)))))), n => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mergeMap(out => toChannel(f(out)), {
|
|
1257
|
-
concurrency: n,
|
|
1258
|
-
bufferSize
|
|
1259
|
-
}))));
|
|
1260
|
-
});
|
|
1261
|
-
|
|
1262
|
-
/** @internal */
|
|
1263
|
-
const matchConcurrency = (concurrency, sequential, bounded) => {
|
|
1264
|
-
switch (concurrency) {
|
|
1265
|
-
case undefined:
|
|
1266
|
-
return sequential();
|
|
1267
|
-
case "unbounded":
|
|
1268
|
-
return bounded(Number.POSITIVE_INFINITY);
|
|
1269
|
-
default:
|
|
1270
|
-
return concurrency > 1 ? bounded(concurrency) : sequential();
|
|
1271
|
-
}
|
|
1272
|
-
};
|
|
1273
|
-
const flatMapParSwitchBuffer = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, n, bufferSize, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mergeMap(out => toChannel(f(out)), {
|
|
1274
|
-
concurrency: n,
|
|
1275
|
-
mergeStrategy: mergeStrategy.BufferSliding(),
|
|
1276
|
-
bufferSize
|
|
1277
|
-
}))));
|
|
1278
|
-
|
|
1279
|
-
/** @internal */
|
|
1280
|
-
const flatten = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, options) => flatMap(self, Function_dist_effectFunction.identity, options));
|
|
1281
|
-
|
|
1282
|
-
/** @internal */
|
|
1283
|
-
const flattenChunks = self => {
|
|
1284
|
-
const flatten = sink.readWithCause({
|
|
1285
|
-
onInput: chunks => sink.flatMap(sink.writeChunk(chunks), () => flatten),
|
|
1286
|
-
onFailure: sink.failCause,
|
|
1287
|
-
onDone: () => sink.unit
|
|
1288
|
-
});
|
|
1289
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(flatten)));
|
|
1290
|
-
};
|
|
1291
|
-
|
|
1292
|
-
/** @internal */
|
|
1293
|
-
const flattenEffect = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, options) => options?.unordered ? flatMap(self, a => fromEffect(a), {
|
|
1294
|
-
concurrency: options.concurrency
|
|
1295
|
-
}) : matchConcurrency(options?.concurrency, () => mapEffectSequential(self, Function_dist_effectFunction.identity), n => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mapOutEffectPar(Function_dist_effectFunction.identity, n), sink.mapOut(Chunk_dist_effectChunk.of)))));
|
|
1296
|
-
|
|
1297
|
-
/** @internal */
|
|
1298
|
-
const flattenExitOption = self => {
|
|
1299
|
-
const processChunk = (chunk, cont) => {
|
|
1300
|
-
const [toEmit, rest] = Function_dist_effectFunction.pipe(chunk, Chunk_dist_effectChunk.splitWhere(exit => !Exit_dist_effectExit.isSuccess(exit)));
|
|
1301
|
-
const next = Function_dist_effectFunction.pipe(Chunk_dist_effectChunk.head(rest), Option_dist_effectOption.match({
|
|
1302
|
-
onNone: () => cont,
|
|
1303
|
-
onSome: Exit_dist_effectExit.match({
|
|
1304
|
-
onFailure: cause => Option_dist_effectOption.match(Cause_dist_effectCause.flipCauseOption(cause), {
|
|
1305
|
-
onNone: () => sink.unit,
|
|
1306
|
-
onSome: sink.failCause
|
|
1307
|
-
}),
|
|
1308
|
-
onSuccess: () => sink.unit
|
|
1309
|
-
})
|
|
1310
|
-
}));
|
|
1311
|
-
return Function_dist_effectFunction.pipe(sink.write(Function_dist_effectFunction.pipe(toEmit, Chunk_dist_effectChunk.filterMap(exit => Exit_dist_effectExit.isSuccess(exit) ? Option_dist_effectOption.some(exit.value) : Option_dist_effectOption.none()))), sink.flatMap(() => next));
|
|
1312
|
-
};
|
|
1313
|
-
const process = sink.readWithCause({
|
|
1314
|
-
onInput: chunk => processChunk(chunk, process),
|
|
1315
|
-
onFailure: cause => sink.failCause(cause),
|
|
1316
|
-
onDone: () => sink.unit
|
|
1317
|
-
});
|
|
1318
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(process)));
|
|
1319
|
-
};
|
|
1320
|
-
|
|
1321
|
-
/** @internal */
|
|
1322
|
-
const flattenIterables = self => Function_dist_effectFunction.pipe(self, map(Chunk_dist_effectChunk.fromIterable), flattenChunks);
|
|
1323
|
-
|
|
1324
|
-
/** @internal */
|
|
1325
|
-
const flattenTake = self => flattenChunks(flattenExitOption(Function_dist_effectFunction.pipe(self, map(take => take.exit))));
|
|
1326
|
-
|
|
1327
|
-
/** @internal */
|
|
1328
|
-
const forever = self => new StreamImpl(sink.repeated(toChannel(self)));
|
|
1329
|
-
|
|
1330
|
-
/** @internal */
|
|
1331
|
-
const fromAsyncIterable = (iterable, onError) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Effect_dist_effectEffect.sync(() => iterable[Symbol.asyncIterator]()), iterator => iterator.return ? Effect_dist_effectEffect.promise(async () => iterator.return()) : Effect_dist_effectEffect.unit), Effect_dist_effectEffect.map(iterator => repeatEffectOption(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.tryPromise({
|
|
1332
|
-
try: async () => iterator.next(),
|
|
1333
|
-
catch: reason => Option_dist_effectOption.some(onError(reason))
|
|
1334
|
-
}), Effect_dist_effectEffect.flatMap(result => result.done ? Effect_dist_effectEffect.fail(Option_dist_effectOption.none()) : Effect_dist_effectEffect.succeed(result.value))))), unwrapScoped);
|
|
1335
|
-
|
|
1336
|
-
/** @internal */
|
|
1337
|
-
const fromChannel = channel => new StreamImpl(channel);
|
|
1338
|
-
|
|
1339
|
-
/** @internal */
|
|
1340
|
-
const toChannel = stream => {
|
|
1341
|
-
if (Effect_dist_effectEffect.isEffect(stream)) {
|
|
1342
|
-
return toChannel(fromEffect(stream));
|
|
1343
|
-
}
|
|
1344
|
-
return stream.channel;
|
|
1345
|
-
};
|
|
1346
|
-
|
|
1347
|
-
/** @internal */
|
|
1348
|
-
const fromChunk = chunk => new StreamImpl(Chunk_dist_effectChunk.isEmpty(chunk) ? sink.unit : sink.write(chunk));
|
|
1349
|
-
|
|
1350
|
-
/** @internal */
|
|
1351
|
-
const fromChunkHub = (hub, options) => {
|
|
1352
|
-
if (options?.scoped) {
|
|
1353
|
-
const effect = Effect_dist_effectEffect.map(Hub_dist_effectHub.subscribe(hub), fromChunkQueue);
|
|
1354
|
-
return options.shutdown ? Effect_dist_effectEffect.map(effect, ensuring(Hub_dist_effectHub.shutdown(hub))) : effect;
|
|
1355
|
-
}
|
|
1356
|
-
const stream = flatMap(scoped(Hub_dist_effectHub.subscribe(hub)), fromChunkQueue);
|
|
1357
|
-
return options?.shutdown ? ensuring(stream, Hub_dist_effectHub.shutdown(hub)) : stream;
|
|
1358
|
-
};
|
|
1359
|
-
|
|
1360
|
-
/** @internal */
|
|
1361
|
-
const fromChunkQueue = (queue, options) => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.take(queue), Effect_dist_effectEffect.catchAllCause(cause => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.isShutdown(queue), Effect_dist_effectEffect.flatMap(isShutdown => isShutdown && Cause_dist_effectCause.isInterrupted(cause) ? end() : failCause$1(cause)))), repeatEffectChunkOption, options?.shutdown ? ensuring(Queue_dist_effectQueue.shutdown(queue)) : Function_dist_effectFunction.identity);
|
|
1362
|
-
|
|
1363
|
-
/** @internal */
|
|
1364
|
-
const fromChunks = (...chunks) => Function_dist_effectFunction.pipe(fromIterable(chunks), flatMap(fromChunk));
|
|
1365
|
-
|
|
1366
|
-
/** @internal */
|
|
1367
|
-
const fromEffect = effect => Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some), fromEffectOption);
|
|
1368
|
-
|
|
1369
|
-
/** @internal */
|
|
1370
|
-
const fromEffectOption = effect => new StreamImpl(sink.unwrap(Effect_dist_effectEffect.match(effect, {
|
|
1371
|
-
onFailure: Option_dist_effectOption.match({
|
|
1372
|
-
onNone: () => sink.unit,
|
|
1373
|
-
onSome: sink.fail
|
|
1374
|
-
}),
|
|
1375
|
-
onSuccess: a => sink.write(Chunk_dist_effectChunk.of(a))
|
|
1376
|
-
})));
|
|
1377
|
-
|
|
1378
|
-
/** @internal */
|
|
1379
|
-
const fromHub = (hub, options) => {
|
|
1380
|
-
const maxChunkSize = options?.maxChunkSize ?? DefaultChunkSize;
|
|
1381
|
-
if (options?.scoped) {
|
|
1382
|
-
const effect = Effect_dist_effectEffect.map(Hub_dist_effectHub.subscribe(hub), queue => fromQueue(queue, {
|
|
1383
|
-
maxChunkSize,
|
|
1384
|
-
shutdown: true
|
|
1385
|
-
}));
|
|
1386
|
-
return options.shutdown ? Effect_dist_effectEffect.map(effect, ensuring(Hub_dist_effectHub.shutdown(hub))) : effect;
|
|
1387
|
-
}
|
|
1388
|
-
const stream = flatMap(scoped(Hub_dist_effectHub.subscribe(hub)), queue => fromQueue(queue, {
|
|
1389
|
-
maxChunkSize
|
|
1390
|
-
}));
|
|
1391
|
-
return options?.shutdown ? ensuring(stream, Hub_dist_effectHub.shutdown(hub)) : stream;
|
|
1392
|
-
};
|
|
1393
|
-
|
|
1394
|
-
/** @internal */
|
|
1395
|
-
const fromIterable = iterable => suspend(() => Chunk_dist_effectChunk.isChunk(iterable) ? fromChunk(iterable) : fromIteratorSucceed(iterable[Symbol.iterator]()));
|
|
1396
|
-
|
|
1397
|
-
/** @internal */
|
|
1398
|
-
const fromIterableEffect = effect => Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.map(fromIterable), unwrap);
|
|
1399
|
-
|
|
1400
|
-
/** @internal */
|
|
1401
|
-
const fromIteratorSucceed = (iterator, maxChunkSize = DefaultChunkSize) => {
|
|
1402
|
-
return Function_dist_effectFunction.pipe(Effect_dist_effectEffect.sync(() => {
|
|
1403
|
-
let builder = [];
|
|
1404
|
-
const loop = iterator => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.sync(() => {
|
|
1405
|
-
let next = iterator.next();
|
|
1406
|
-
if (maxChunkSize === 1) {
|
|
1407
|
-
if (next.done) {
|
|
1408
|
-
return sink.unit;
|
|
1409
|
-
}
|
|
1410
|
-
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(next.value)), sink.flatMap(() => loop(iterator)));
|
|
1411
|
-
}
|
|
1412
|
-
builder = [];
|
|
1413
|
-
let count = 0;
|
|
1414
|
-
while (count < maxChunkSize && !next.done) {
|
|
1415
|
-
builder.push(next.value);
|
|
1416
|
-
next = iterator.next();
|
|
1417
|
-
count = count + 1;
|
|
1418
|
-
}
|
|
1419
|
-
if (count > 0) {
|
|
1420
|
-
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.unsafeFromArray(builder)), sink.flatMap(() => loop(iterator)));
|
|
1421
|
-
}
|
|
1422
|
-
return sink.unit;
|
|
1423
|
-
}), sink.unwrap);
|
|
1424
|
-
return new StreamImpl(loop(iterator));
|
|
1425
|
-
}), unwrap);
|
|
1426
|
-
};
|
|
1427
|
-
|
|
1428
|
-
/** @internal */
|
|
1429
|
-
const fromPull = effect => Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.map(repeatEffectChunkOption), unwrapScoped);
|
|
1430
|
-
|
|
1431
|
-
/** @internal */
|
|
1432
|
-
const fromQueue = (queue, options) => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.takeBetween(queue, 1, options?.maxChunkSize ?? DefaultChunkSize), Effect_dist_effectEffect.catchAllCause(cause => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.isShutdown(queue), Effect_dist_effectEffect.flatMap(isShutdown => isShutdown && Cause_dist_effectCause.isInterrupted(cause) ? end() : failCause$1(cause)))), repeatEffectChunkOption, options?.shutdown ? ensuring(Queue_dist_effectQueue.shutdown(queue)) : Function_dist_effectFunction.identity);
|
|
1433
|
-
|
|
1434
|
-
/** @internal */
|
|
1435
|
-
const fromSchedule = schedule => Function_dist_effectFunction.pipe(Schedule_dist_effectSchedule.driver(schedule), Effect_dist_effectEffect.map(driver => repeatEffectOption(driver.next(void 0))), unwrap);
|
|
1436
|
-
|
|
1437
|
-
/** @internal */
|
|
1438
|
-
const fromReadableStream = (evaluate, onError) => unwrapScoped(Effect_dist_effectEffect.map(Effect_dist_effectEffect.acquireRelease(Effect_dist_effectEffect.sync(() => evaluate().getReader()), reader => Effect_dist_effectEffect.promise(() => reader.cancel())), reader => repeatEffectOption(Effect_dist_effectEffect.flatMap(Effect_dist_effectEffect.tryPromise({
|
|
1439
|
-
try: () => reader.read(),
|
|
1440
|
-
catch: reason => Option_dist_effectOption.some(onError(reason))
|
|
1441
|
-
}), ({
|
|
1442
|
-
done,
|
|
1443
|
-
value
|
|
1444
|
-
}) => done ? Effect_dist_effectEffect.fail(Option_dist_effectOption.none()) : Effect_dist_effectEffect.succeed(value)))));
|
|
1445
|
-
|
|
1446
|
-
/** @internal */
|
|
1447
|
-
const fromReadableStreamByob = (evaluate, onError, allocSize = 4096) => unwrapScoped(Effect_dist_effectEffect.map(Effect_dist_effectEffect.acquireRelease(Effect_dist_effectEffect.sync(() => evaluate().getReader({
|
|
1448
|
-
mode: "byob"
|
|
1449
|
-
})), reader => Effect_dist_effectEffect.promise(() => reader.cancel())), reader => catchAll(forever(readChunkStreamByobReader(reader, onError, allocSize)), error => typeof error === "object" && error !== null && "_tag" in error && error._tag === "EOF" ? empty : fail(error))));
|
|
1450
|
-
const readChunkStreamByobReader = (reader, onError, size) => {
|
|
1451
|
-
const buffer = new ArrayBuffer(size);
|
|
1452
|
-
return paginateEffect(0, offset => Effect_dist_effectEffect.flatMap(Effect_dist_effectEffect.tryPromise({
|
|
1453
|
-
try: () => reader.read(new Uint8Array(buffer, offset, buffer.byteLength - offset)),
|
|
1454
|
-
catch: reason => onError(reason)
|
|
1455
|
-
}), ({
|
|
1456
|
-
done,
|
|
1457
|
-
value
|
|
1458
|
-
}) => {
|
|
1459
|
-
if (done) {
|
|
1460
|
-
return Effect_dist_effectEffect.fail({
|
|
1461
|
-
_tag: "EOF"
|
|
1462
|
-
});
|
|
1463
|
-
}
|
|
1464
|
-
const newOffset = offset + value.byteLength;
|
|
1465
|
-
return Effect_dist_effectEffect.succeed([value, newOffset >= buffer.byteLength ? Option_dist_effectOption.none() : Option_dist_effectOption.some(newOffset)]);
|
|
1466
|
-
}));
|
|
1467
|
-
};
|
|
1468
|
-
|
|
1469
|
-
/** @internal */
|
|
1470
|
-
const groupAdjacentBy = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
1471
|
-
const groupAdjacentByChunk = (state, chunk) => {
|
|
1472
|
-
if (Chunk_dist_effectChunk.isEmpty(chunk)) {
|
|
1473
|
-
return [state, Chunk_dist_effectChunk.empty()];
|
|
1474
|
-
}
|
|
1475
|
-
const builder = [];
|
|
1476
|
-
let from = 0;
|
|
1477
|
-
let until = 0;
|
|
1478
|
-
let key = undefined;
|
|
1479
|
-
let previousChunk = Chunk_dist_effectChunk.empty();
|
|
1480
|
-
switch (state._tag) {
|
|
1481
|
-
case "Some":
|
|
1482
|
-
{
|
|
1483
|
-
const tuple = state.value;
|
|
1484
|
-
key = tuple[0];
|
|
1485
|
-
let loop = true;
|
|
1486
|
-
while (loop && until < chunk.length) {
|
|
1487
|
-
const input = Chunk_dist_effectChunk.unsafeGet(chunk, until);
|
|
1488
|
-
const updatedKey = f(input);
|
|
1489
|
-
if (!Equal_dist_effectEqual.equals(key, updatedKey)) {
|
|
1490
|
-
builder.push([key, Chunk_dist_effectChunk.unsafeFromArray(Array.from(tuple[1]).slice(from, until))]);
|
|
1491
|
-
key = updatedKey;
|
|
1492
|
-
from = until;
|
|
1493
|
-
loop = false;
|
|
1494
|
-
}
|
|
1495
|
-
until = until + 1;
|
|
1496
|
-
}
|
|
1497
|
-
if (loop) {
|
|
1498
|
-
previousChunk = tuple[1];
|
|
1499
|
-
}
|
|
1500
|
-
break;
|
|
1501
|
-
}
|
|
1502
|
-
case "None":
|
|
1503
|
-
{
|
|
1504
|
-
key = f(Chunk_dist_effectChunk.unsafeGet(chunk, until));
|
|
1505
|
-
until = until + 1;
|
|
1506
|
-
break;
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
while (until < chunk.length) {
|
|
1510
|
-
const input = Chunk_dist_effectChunk.unsafeGet(chunk, until);
|
|
1511
|
-
const updatedKey = f(input);
|
|
1512
|
-
if (!Equal_dist_effectEqual.equals(key, updatedKey)) {
|
|
1513
|
-
builder.push([key, Chunk_dist_effectChunk.unsafeFromArray(Array.from(chunk).slice(from, until))]);
|
|
1514
|
-
key = updatedKey;
|
|
1515
|
-
from = until;
|
|
1516
|
-
}
|
|
1517
|
-
until = until + 1;
|
|
1518
|
-
}
|
|
1519
|
-
const nonEmptyChunk = Chunk_dist_effectChunk.appendAll(previousChunk, Chunk_dist_effectChunk.unsafeFromArray(Array.from(chunk).slice(from, until)));
|
|
1520
|
-
const output = Chunk_dist_effectChunk.unsafeFromArray(builder);
|
|
1521
|
-
return [Option_dist_effectOption.some([key, nonEmptyChunk]), output];
|
|
1522
|
-
};
|
|
1523
|
-
const groupAdjacent = state => sink.readWithCause({
|
|
1524
|
-
onInput: input => {
|
|
1525
|
-
const [updatedState, output] = groupAdjacentByChunk(state, input);
|
|
1526
|
-
return Chunk_dist_effectChunk.isEmpty(output) ? groupAdjacent(updatedState) : sink.flatMap(sink.write(output), () => groupAdjacent(updatedState));
|
|
1527
|
-
},
|
|
1528
|
-
onFailure: cause => Option_dist_effectOption.match(state, {
|
|
1529
|
-
onNone: () => sink.failCause(cause),
|
|
1530
|
-
onSome: output => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(output)), () => sink.failCause(cause))
|
|
1531
|
-
}),
|
|
1532
|
-
onDone: done => Option_dist_effectOption.match(state, {
|
|
1533
|
-
onNone: () => sink.succeedNow(done),
|
|
1534
|
-
onSome: output => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(output)), () => sink.succeedNow(done))
|
|
1535
|
-
})
|
|
1536
|
-
});
|
|
1537
|
-
return new StreamImpl(sink.pipeToOrFail(toChannel(self), groupAdjacent(Option_dist_effectOption.none())));
|
|
1538
|
-
});
|
|
1539
|
-
|
|
1540
|
-
/** @internal */
|
|
1541
|
-
const grouped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, chunkSize) => Function_dist_effectFunction.pipe(self, rechunk(chunkSize), chunks));
|
|
1542
|
-
|
|
1543
|
-
/** @internal */
|
|
1544
|
-
const groupedWithin = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, chunkSize, duration) => aggregateWithin(self, sink.collectAllN(chunkSize), Schedule_dist_effectSchedule.spaced(duration)));
|
|
1545
|
-
|
|
1546
|
-
/** @internal */
|
|
1547
|
-
const haltWhen = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, effect) => {
|
|
1548
|
-
const writer = fiber => Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.poll(fiber), Effect_dist_effectEffect.map(Option_dist_effectOption.match({
|
|
1549
|
-
onNone: () => sink.readWith({
|
|
1550
|
-
onInput: input => sink.flatMap(sink.write(input), () => writer(fiber)),
|
|
1551
|
-
onFailure: sink.fail,
|
|
1552
|
-
onDone: () => sink.unit
|
|
1553
|
-
}),
|
|
1554
|
-
onSome: Exit_dist_effectExit.match({
|
|
1555
|
-
onFailure: sink.failCause,
|
|
1556
|
-
onSuccess: () => sink.unit
|
|
1557
|
-
})
|
|
1558
|
-
})), sink.unwrap);
|
|
1559
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.forkScoped(effect), Effect_dist_effectEffect.map(fiber => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer(fiber)))), sink.unwrapScoped));
|
|
1560
|
-
});
|
|
1561
|
-
|
|
1562
|
-
/** @internal */
|
|
1563
|
-
const haltAfter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, duration) => Function_dist_effectFunction.pipe(self, haltWhen(Clock_dist_effectClock.sleep(duration))));
|
|
1564
|
-
|
|
1565
|
-
/** @internal */
|
|
1566
|
-
const haltWhenDeferred = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, deferred) => {
|
|
1567
|
-
const writer = Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.poll(deferred), Effect_dist_effectEffect.map(Option_dist_effectOption.match({
|
|
1568
|
-
onNone: () => sink.readWith({
|
|
1569
|
-
onInput: input => Function_dist_effectFunction.pipe(sink.write(input), sink.flatMap(() => writer)),
|
|
1570
|
-
onFailure: sink.fail,
|
|
1571
|
-
onDone: () => sink.unit
|
|
1572
|
-
}),
|
|
1573
|
-
onSome: effect => sink.unwrap(Effect_dist_effectEffect.match(effect, {
|
|
1574
|
-
onFailure: sink.fail,
|
|
1575
|
-
onSuccess: () => sink.unit
|
|
1576
|
-
}))
|
|
1577
|
-
})), sink.unwrap);
|
|
1578
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer)));
|
|
1579
|
-
});
|
|
1580
|
-
|
|
1581
|
-
/** @internal */
|
|
1582
|
-
const identityStream = () => new StreamImpl(sink.identityChannel());
|
|
1583
|
-
|
|
1584
|
-
/** @internal */
|
|
1585
|
-
const interleave = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, interleaveWith(that, forever(make(true, false)))));
|
|
1586
|
-
|
|
1587
|
-
/** @internal */
|
|
1588
|
-
const interleaveWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, decider) => {
|
|
1589
|
-
const producer = handoff => sink.readWithCause({
|
|
1590
|
-
onInput: value => sink.flatMap(sink.fromEffect(offer(handoff, take$2.of(value))), () => producer(handoff)),
|
|
1591
|
-
onFailure: cause => sink.fromEffect(offer(handoff, take$2.failCause(cause))),
|
|
1592
|
-
onDone: () => sink.fromEffect(offer(handoff, take$2.end))
|
|
1593
|
-
});
|
|
1594
|
-
return new StreamImpl(sink.unwrapScoped(Function_dist_effectFunction.pipe(make$1(), Effect_dist_effectEffect.zip(make$1()), Effect_dist_effectEffect.tap(([left]) => Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.pipeTo(producer(left)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.tap(([_, right]) => Function_dist_effectFunction.pipe(toChannel(that), sink.concatMap(sink.writeChunk), sink.pipeTo(producer(right)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.map(([left, right]) => {
|
|
1595
|
-
const process = (leftDone, rightDone) => sink.readWithCause({
|
|
1596
|
-
onInput: bool => {
|
|
1597
|
-
if (bool && !leftDone) {
|
|
1598
|
-
return Function_dist_effectFunction.pipe(sink.fromEffect(take$1(left)), sink.flatMap(take$2.match({
|
|
1599
|
-
onEnd: () => rightDone ? sink.unit : process(true, rightDone),
|
|
1600
|
-
onFailure: sink.failCause,
|
|
1601
|
-
onSuccess: chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => process(leftDone, rightDone)))
|
|
1602
|
-
})));
|
|
1603
|
-
}
|
|
1604
|
-
if (!bool && !rightDone) {
|
|
1605
|
-
return Function_dist_effectFunction.pipe(sink.fromEffect(take$1(right)), sink.flatMap(take$2.match({
|
|
1606
|
-
onEnd: () => leftDone ? sink.unit : process(leftDone, true),
|
|
1607
|
-
onFailure: sink.failCause,
|
|
1608
|
-
onSuccess: chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => process(leftDone, rightDone)))
|
|
1609
|
-
})));
|
|
1610
|
-
}
|
|
1611
|
-
return process(leftDone, rightDone);
|
|
1612
|
-
},
|
|
1613
|
-
onFailure: sink.failCause,
|
|
1614
|
-
onDone: () => sink.unit
|
|
1615
|
-
});
|
|
1616
|
-
return Function_dist_effectFunction.pipe(toChannel(decider), sink.concatMap(sink.writeChunk), sink.pipeTo(process(false, false)));
|
|
1617
|
-
}))));
|
|
1618
|
-
});
|
|
1619
|
-
|
|
1620
|
-
/** @internal */
|
|
1621
|
-
const intersperse = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, element) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(sink.suspend(() => {
|
|
1622
|
-
const writer = isFirst => sink.readWithCause({
|
|
1623
|
-
onInput: chunk => {
|
|
1624
|
-
const builder = [];
|
|
1625
|
-
let flagResult = isFirst;
|
|
1626
|
-
for (const output of chunk) {
|
|
1627
|
-
if (flagResult) {
|
|
1628
|
-
flagResult = false;
|
|
1629
|
-
builder.push(output);
|
|
1630
|
-
} else {
|
|
1631
|
-
builder.push(element);
|
|
1632
|
-
builder.push(output);
|
|
1633
|
-
}
|
|
1634
|
-
}
|
|
1635
|
-
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.unsafeFromArray(builder)), sink.flatMap(() => writer(flagResult)));
|
|
1636
|
-
},
|
|
1637
|
-
onFailure: sink.failCause,
|
|
1638
|
-
onDone: () => sink.unit
|
|
1639
|
-
});
|
|
1640
|
-
return writer(true);
|
|
1641
|
-
})))));
|
|
1642
|
-
|
|
1643
|
-
/** @internal */
|
|
1644
|
-
const intersperseAffixes = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, {
|
|
1645
|
-
end,
|
|
1646
|
-
middle,
|
|
1647
|
-
start
|
|
1648
|
-
}) => Function_dist_effectFunction.pipe(make(start), concat(Function_dist_effectFunction.pipe(self, intersperse(middle))), concat(make(end))));
|
|
1649
|
-
|
|
1650
|
-
/** @internal */
|
|
1651
|
-
const interruptAfter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, duration) => Function_dist_effectFunction.pipe(self, interruptWhen(Clock_dist_effectClock.sleep(duration))));
|
|
1652
|
-
|
|
1653
|
-
/** @internal */
|
|
1654
|
-
const interruptWhen = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, effect) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.interruptWhen(effect))));
|
|
1655
|
-
|
|
1656
|
-
/** @internal */
|
|
1657
|
-
const interruptWhenDeferred = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, deferred) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.interruptWhenDeferred(deferred))));
|
|
1658
|
-
|
|
1659
|
-
/** @internal */
|
|
1660
|
-
const iterate = (value, next) => unfold(value, a => Option_dist_effectOption.some([a, next(a)]));
|
|
1661
|
-
|
|
1662
|
-
/** @internal */
|
|
1663
|
-
const make = (...as) => fromIterable(as);
|
|
1664
|
-
|
|
1665
|
-
/** @internal */
|
|
1666
|
-
const map = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapOut(Chunk_dist_effectChunk.map(f)))));
|
|
1667
|
-
|
|
1668
|
-
/** @internal */
|
|
1669
|
-
const mapAccum = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => {
|
|
1670
|
-
const accumulator = s => sink.readWith({
|
|
1671
|
-
onInput: input => {
|
|
1672
|
-
const [nextS, chunk] = Chunk_dist_effectChunk.mapAccum(input, s, f);
|
|
1673
|
-
return sink.flatMap(sink.write(chunk), () => accumulator(nextS));
|
|
1674
|
-
},
|
|
1675
|
-
onFailure: sink.fail,
|
|
1676
|
-
onDone: () => sink.unit
|
|
1677
|
-
});
|
|
1678
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(accumulator(s))));
|
|
1679
|
-
});
|
|
1680
|
-
|
|
1681
|
-
/** @internal */
|
|
1682
|
-
const mapAccumEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => suspend(() => {
|
|
1683
|
-
const accumulator = s => sink.readWith({
|
|
1684
|
-
onInput: input => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.suspend(() => {
|
|
1685
|
-
const outputs = [];
|
|
1686
|
-
const emit = output => Effect_dist_effectEffect.sync(() => {
|
|
1687
|
-
outputs.push(output);
|
|
1688
|
-
});
|
|
1689
|
-
return Function_dist_effectFunction.pipe(input, Effect_dist_effectEffect.reduce(s, (s, a) => Function_dist_effectFunction.pipe(f(s, a), Effect_dist_effectEffect.flatMap(([s, a]) => Function_dist_effectFunction.pipe(emit(a), Effect_dist_effectEffect.as(s))))), Effect_dist_effectEffect.match({
|
|
1690
|
-
onFailure: error => {
|
|
1691
|
-
if (outputs.length !== 0) {
|
|
1692
|
-
return sink.zipRight(sink.write(Chunk_dist_effectChunk.unsafeFromArray(outputs)), sink.fail(error));
|
|
1693
|
-
}
|
|
1694
|
-
return sink.fail(error);
|
|
1695
|
-
},
|
|
1696
|
-
onSuccess: s => sink.flatMap(sink.write(Chunk_dist_effectChunk.unsafeFromArray(outputs)), () => accumulator(s))
|
|
1697
|
-
}));
|
|
1698
|
-
}), sink.unwrap),
|
|
1699
|
-
onFailure: sink.fail,
|
|
1700
|
-
onDone: () => sink.unit
|
|
1701
|
-
});
|
|
1702
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(accumulator(s))));
|
|
1703
|
-
}));
|
|
1704
|
-
|
|
1705
|
-
/** @internal */
|
|
1706
|
-
const mapBoth = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => Function_dist_effectFunction.pipe(self, mapError(options.onFailure), map(options.onSuccess)));
|
|
1707
|
-
|
|
1708
|
-
/** @internal */
|
|
1709
|
-
const mapChunks = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapOut(f))));
|
|
1710
|
-
|
|
1711
|
-
/** @internal */
|
|
1712
|
-
const mapChunksEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapOutEffect(f))));
|
|
1713
|
-
|
|
1714
|
-
/** @internal */
|
|
1715
|
-
const mapConcat = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapConcatChunk(a => Chunk_dist_effectChunk.fromIterable(f(a)))));
|
|
1716
|
-
|
|
1717
|
-
/** @internal */
|
|
1718
|
-
const mapConcatChunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapChunks(Chunk_dist_effectChunk.flatMap(f))));
|
|
1719
|
-
|
|
1720
|
-
/** @internal */
|
|
1721
|
-
const mapConcatChunkEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapEffectSequential(f), mapConcatChunk(Function_dist_effectFunction.identity)));
|
|
1722
|
-
|
|
1723
|
-
/** @internal */
|
|
1724
|
-
const mapConcatEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapEffectSequential(a => Function_dist_effectFunction.pipe(f(a), Effect_dist_effectEffect.map(Chunk_dist_effectChunk.fromIterable))), mapConcatChunk(Function_dist_effectFunction.identity)));
|
|
1725
|
-
|
|
1726
|
-
/** @internal */
|
|
1727
|
-
const mapEffectSequential = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
1728
|
-
const loop = iterator => {
|
|
1729
|
-
const next = iterator.next();
|
|
1730
|
-
if (next.done) {
|
|
1731
|
-
return sink.readWithCause({
|
|
1732
|
-
onInput: elem => loop(elem[Symbol.iterator]()),
|
|
1733
|
-
onFailure: sink.failCause,
|
|
1734
|
-
onDone: sink.succeed
|
|
1735
|
-
});
|
|
1736
|
-
} else {
|
|
1737
|
-
const value = next.value;
|
|
1738
|
-
return sink.unwrap(Effect_dist_effectEffect.map(f(value), a2 => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(a2)), () => loop(iterator))));
|
|
1739
|
-
}
|
|
1740
|
-
};
|
|
1741
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(sink.suspend(() => loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]())))));
|
|
1742
|
-
});
|
|
1743
|
-
|
|
1744
|
-
/** @internal */
|
|
1745
|
-
const mapEffectPar = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, n, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mapOutEffectPar(f, n), sink.mapOut(Chunk_dist_effectChunk.of))));
|
|
1746
|
-
|
|
1747
|
-
/** @internal */
|
|
1748
|
-
const mapError = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapError(f))));
|
|
1749
|
-
|
|
1750
|
-
/** @internal */
|
|
1751
|
-
const mapErrorCause = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapErrorCause(f))));
|
|
1752
|
-
|
|
1753
|
-
/** @internal */
|
|
1754
|
-
const merge = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[1]), (self, that, options) => mergeWith(self, that, {
|
|
1755
|
-
onSelf: Function_dist_effectFunction.identity,
|
|
1756
|
-
onOther: Function_dist_effectFunction.identity,
|
|
1757
|
-
haltStrategy: options?.haltStrategy
|
|
1758
|
-
}));
|
|
1759
|
-
|
|
1760
|
-
/** @internal */
|
|
1761
|
-
const mergeAll = /*#__PURE__*/Function_dist_effectFunction.dual(args => Symbol.iterator in args[0], (streams, options) => flatten(fromIterable(streams), options));
|
|
1762
|
-
|
|
1763
|
-
/** @internal */
|
|
1764
|
-
const mergeEither = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => mergeWith(self, that, {
|
|
1765
|
-
onSelf: Either_dist_effectEither.left,
|
|
1766
|
-
onOther: Either_dist_effectEither.right
|
|
1767
|
-
}));
|
|
1768
|
-
|
|
1769
|
-
/** @internal */
|
|
1770
|
-
const mergeLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, merge(drain(that))));
|
|
1771
|
-
|
|
1772
|
-
/** @internal */
|
|
1773
|
-
const mergeRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(drain(self), merge(that)));
|
|
1774
|
-
|
|
1775
|
-
/** @internal */
|
|
1776
|
-
const mergeWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, other, options) => {
|
|
1777
|
-
const strategy = options.haltStrategy ? StreamHaltStrategy_dist_effectStreamHaltStrategy.fromInput(options.haltStrategy) : StreamHaltStrategy_dist_effectStreamHaltStrategy.Both;
|
|
1778
|
-
const handler = terminate => exit => terminate || !Exit_dist_effectExit.isSuccess(exit) ?
|
|
1779
|
-
// TODO: remove
|
|
1780
|
-
ChannelMergeDecision_dist_effectChannelMergeDecision.Done(Effect_dist_effectEffect.suspend(() => exit)) : ChannelMergeDecision_dist_effectChannelMergeDecision.Await(exit => Effect_dist_effectEffect.suspend(() => exit));
|
|
1781
|
-
return new StreamImpl(sink.mergeWith(toChannel(map(self, options.onSelf)), {
|
|
1782
|
-
other: toChannel(map(other, options.onOther)),
|
|
1783
|
-
onSelfDone: handler(strategy._tag === "Either" || strategy._tag === "Left"),
|
|
1784
|
-
onOtherDone: handler(strategy._tag === "Either" || strategy._tag === "Right")
|
|
1785
|
-
}));
|
|
1786
|
-
});
|
|
1787
|
-
|
|
1788
|
-
/** @internal */
|
|
1789
|
-
const mkString = self => run(self, sink.mkString);
|
|
1790
|
-
|
|
1791
|
-
/** @internal */
|
|
1792
|
-
const never = /*#__PURE__*/fromEffect(Effect_dist_effectEffect.never);
|
|
1793
|
-
|
|
1794
|
-
/** @internal */
|
|
1795
|
-
const onError = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, cleanup) => Function_dist_effectFunction.pipe(self, catchAllCause(cause => fromEffect(Function_dist_effectFunction.pipe(cleanup(cause), Effect_dist_effectEffect.zipRight(Effect_dist_effectEffect.failCause(cause)))))));
|
|
1796
|
-
|
|
1797
|
-
/** @internal */
|
|
1798
|
-
const onDone = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, cleanup) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.ensuringWith(exit => Exit_dist_effectExit.isSuccess(exit) ? cleanup() : Effect_dist_effectEffect.unit))));
|
|
1799
|
-
|
|
1800
|
-
/** @internal */
|
|
1801
|
-
const orDie = self => Function_dist_effectFunction.pipe(self, orDieWith(Function_dist_effectFunction.identity));
|
|
1802
|
-
|
|
1803
|
-
/** @internal */
|
|
1804
|
-
const orDieWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.orDieWith(f))));
|
|
1805
|
-
|
|
1806
|
-
/** @internal */
|
|
1807
|
-
const orElse = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.orElse(() => toChannel(that())))));
|
|
1808
|
-
|
|
1809
|
-
/** @internal */
|
|
1810
|
-
const orElseEither = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, map(Either_dist_effectEither.left), orElse(() => Function_dist_effectFunction.pipe(that(), map(Either_dist_effectEither.right)))));
|
|
1811
|
-
|
|
1812
|
-
/** @internal */
|
|
1813
|
-
const orElseFail = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, error) => Function_dist_effectFunction.pipe(self, orElse(() => failSync(error))));
|
|
1814
|
-
|
|
1815
|
-
/** @internal */
|
|
1816
|
-
const orElseIfEmpty = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, element) => Function_dist_effectFunction.pipe(self, orElseIfEmptyChunk(() => Chunk_dist_effectChunk.of(element()))));
|
|
1817
|
-
|
|
1818
|
-
/** @internal */
|
|
1819
|
-
const orElseIfEmptyChunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, chunk) => Function_dist_effectFunction.pipe(self, orElseIfEmptyStream(() => new StreamImpl(sink.write(chunk())))));
|
|
1820
|
-
|
|
1821
|
-
/** @internal */
|
|
1822
|
-
const orElseIfEmptyStream = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, stream) => {
|
|
1823
|
-
const writer = sink.readWith({
|
|
1824
|
-
onInput: input => {
|
|
1825
|
-
if (Chunk_dist_effectChunk.isEmpty(input)) {
|
|
1826
|
-
return sink.suspend(() => writer);
|
|
1827
|
-
}
|
|
1828
|
-
return Function_dist_effectFunction.pipe(sink.write(input), sink.zipRight(sink.identityChannel()));
|
|
1829
|
-
},
|
|
1830
|
-
onFailure: sink.fail,
|
|
1831
|
-
onDone: () => sink.suspend(() => toChannel(stream()))
|
|
1832
|
-
});
|
|
1833
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer)));
|
|
1834
|
-
});
|
|
1835
|
-
|
|
1836
|
-
/** @internal */
|
|
1837
|
-
const orElseSucceed = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, value) => Function_dist_effectFunction.pipe(self, orElse(() => sync(value))));
|
|
1838
|
-
|
|
1839
|
-
/** @internal */
|
|
1840
|
-
const paginate = (s, f) => paginateChunk(s, s => {
|
|
1841
|
-
const page = f(s);
|
|
1842
|
-
return [Chunk_dist_effectChunk.of(page[0]), page[1]];
|
|
1843
|
-
});
|
|
1844
|
-
|
|
1845
|
-
/** @internal */
|
|
1846
|
-
const paginateChunk = (s, f) => {
|
|
1847
|
-
const loop = s => {
|
|
1848
|
-
const page = f(s);
|
|
1849
|
-
return Option_dist_effectOption.match(page[1], {
|
|
1850
|
-
onNone: () => sink.zipRight(sink.write(page[0]), sink.unit),
|
|
1851
|
-
onSome: s => sink.flatMap(sink.write(page[0]), () => loop(s))
|
|
1852
|
-
});
|
|
1853
|
-
};
|
|
1854
|
-
return new StreamImpl(sink.suspend(() => loop(s)));
|
|
1855
|
-
};
|
|
1856
|
-
|
|
1857
|
-
/** @internal */
|
|
1858
|
-
const paginateChunkEffect = (s, f) => {
|
|
1859
|
-
const loop = s => sink.unwrap(Effect_dist_effectEffect.map(f(s), ([chunk, option]) => Option_dist_effectOption.match(option, {
|
|
1860
|
-
onNone: () => sink.zipRight(sink.write(chunk), sink.unit),
|
|
1861
|
-
onSome: s => sink.flatMap(sink.write(chunk), () => loop(s))
|
|
1862
|
-
})));
|
|
1863
|
-
return new StreamImpl(sink.suspend(() => loop(s)));
|
|
1864
|
-
};
|
|
1865
|
-
|
|
1866
|
-
/** @internal */
|
|
1867
|
-
const paginateEffect = (s, f) => paginateChunkEffect(s, s => Function_dist_effectFunction.pipe(f(s), Effect_dist_effectEffect.map(([a, s]) => [Chunk_dist_effectChunk.of(a), s])));
|
|
1868
|
-
|
|
1869
|
-
/** @internal */
|
|
1870
|
-
const peel = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => {
|
|
1871
|
-
const OP_EMIT = "Emit";
|
|
1872
|
-
const OP_HALT = "Halt";
|
|
1873
|
-
const OP_END = "End";
|
|
1874
|
-
return Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.flatMap(deferred => Function_dist_effectFunction.pipe(make$1(), Effect_dist_effectEffect.map(handoff => {
|
|
1875
|
-
const consumer = sink.foldSink(sink.collectLeftover(sink$1), {
|
|
1876
|
-
onFailure: error => sink.zipRight$1(sink.fromEffect$1(Deferred_dist_effectDeferred.fail(deferred, error)), sink.fail$1(error)),
|
|
1877
|
-
onSuccess: ([z, leftovers]) => {
|
|
1878
|
-
const loop = sink.readWithCause({
|
|
1879
|
-
onInput: elements => sink.flatMap(sink.fromEffect(offer(handoff, {
|
|
1880
|
-
_tag: OP_EMIT,
|
|
1881
|
-
elements
|
|
1882
|
-
})), () => loop),
|
|
1883
|
-
onFailure: cause => sink.zipRight(sink.fromEffect(offer(handoff, {
|
|
1884
|
-
_tag: OP_HALT,
|
|
1885
|
-
cause
|
|
1886
|
-
})), sink.failCause(cause)),
|
|
1887
|
-
onDone: _ => sink.zipRight(sink.fromEffect(offer(handoff, {
|
|
1888
|
-
_tag: OP_END
|
|
1889
|
-
})), sink.unit)
|
|
1890
|
-
});
|
|
1891
|
-
return sink.fromChannel(Function_dist_effectFunction.pipe(sink.fromEffect(Deferred_dist_effectDeferred.succeed(deferred, z)), sink.zipRight(sink.fromEffect(Function_dist_effectFunction.pipe(handoff, offer({
|
|
1892
|
-
_tag: OP_EMIT,
|
|
1893
|
-
elements: leftovers
|
|
1894
|
-
})))), sink.zipRight(loop)));
|
|
1895
|
-
}
|
|
1896
|
-
});
|
|
1897
|
-
const producer = Function_dist_effectFunction.pipe(take$1(handoff), Effect_dist_effectEffect.map(signal => {
|
|
1898
|
-
switch (signal._tag) {
|
|
1899
|
-
case OP_EMIT:
|
|
1900
|
-
{
|
|
1901
|
-
return Function_dist_effectFunction.pipe(sink.write(signal.elements), sink.flatMap(() => producer));
|
|
1902
|
-
}
|
|
1903
|
-
case OP_HALT:
|
|
1904
|
-
{
|
|
1905
|
-
return sink.failCause(signal.cause);
|
|
1906
|
-
}
|
|
1907
|
-
case OP_END:
|
|
1908
|
-
{
|
|
1909
|
-
return sink.unit;
|
|
1910
|
-
}
|
|
1911
|
-
}
|
|
1912
|
-
}), sink.unwrap);
|
|
1913
|
-
return Function_dist_effectFunction.pipe(self, tapErrorCause(cause => Deferred_dist_effectDeferred.failCause(deferred, cause)), run(consumer), Effect_dist_effectEffect.forkScoped, Effect_dist_effectEffect.zipRight(Deferred_dist_effectDeferred._await(deferred)), Effect_dist_effectEffect.map(z => [z, new StreamImpl(producer)]));
|
|
1914
|
-
}))), Effect_dist_effectEffect.flatten);
|
|
1915
|
-
});
|
|
1916
|
-
|
|
1917
|
-
/** @internal */
|
|
1918
|
-
const partition = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof args[1] === "function", (self, predicate, options) => partitionEither(self, a => Effect_dist_effectEffect.succeed(predicate(a) ? Either_dist_effectEither.left(a) : Either_dist_effectEither.right(a)), options));
|
|
1919
|
-
|
|
1920
|
-
/** @internal */
|
|
1921
|
-
const partitionEither = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof args[1] === "function", (self, predicate, options) => Function_dist_effectFunction.pipe(mapEffectSequential(self, predicate), distributedWith({
|
|
1922
|
-
size: 2,
|
|
1923
|
-
maximumLag: options?.bufferSize ?? 16,
|
|
1924
|
-
decide: Either_dist_effectEither.match({
|
|
1925
|
-
onLeft: () => Effect_dist_effectEffect.succeed(n => n === 0),
|
|
1926
|
-
onRight: () => Effect_dist_effectEffect.succeed(n => n === 1)
|
|
1927
|
-
})
|
|
1928
|
-
}), Effect_dist_effectEffect.flatMap(([queue1, queue2]) => Effect_dist_effectEffect.succeed([filterMap(flattenExitOption(fromQueue(queue1, {
|
|
1929
|
-
shutdown: true
|
|
1930
|
-
})), _ => Either_dist_effectEither.match(_, {
|
|
1931
|
-
onLeft: Option_dist_effectOption.some,
|
|
1932
|
-
onRight: Option_dist_effectOption.none
|
|
1933
|
-
})), filterMap(flattenExitOption(fromQueue(queue2, {
|
|
1934
|
-
shutdown: true
|
|
1935
|
-
})), _ => Either_dist_effectEither.match(_, {
|
|
1936
|
-
onLeft: Option_dist_effectOption.none,
|
|
1937
|
-
onRight: Option_dist_effectOption.some
|
|
1938
|
-
}))]))));
|
|
1939
|
-
|
|
1940
|
-
/** @internal */
|
|
1941
|
-
const pipeThrough = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(sink.toChannel(sink$1)))));
|
|
1942
|
-
|
|
1943
|
-
/** @internal */
|
|
1944
|
-
const pipeThroughChannel = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, channel) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(channel))));
|
|
1945
|
-
|
|
1946
|
-
/** @internal */
|
|
1947
|
-
const pipeThroughChannelOrFail = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, chan) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(chan))));
|
|
1948
|
-
|
|
1949
|
-
/** @internal */
|
|
1950
|
-
const prepend = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, values) => new StreamImpl(sink.zipRight(sink.write(values), toChannel(self))));
|
|
1951
|
-
|
|
1952
|
-
/** @internal */
|
|
1953
|
-
const provideContext = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, context) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.provideContext(context))));
|
|
1954
|
-
|
|
1955
|
-
/** @internal */
|
|
1956
|
-
const provideLayer = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, layer) => new StreamImpl(sink.unwrapScoped(Function_dist_effectFunction.pipe(Layer_dist_effectLayer.build(layer), Effect_dist_effectEffect.map(env => Function_dist_effectFunction.pipe(toChannel(self), sink.provideContext(env)))))));
|
|
1957
|
-
|
|
1958
|
-
/** @internal */
|
|
1959
|
-
const provideService = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, resource) => provideServiceEffect(self, tag, Effect_dist_effectEffect.succeed(resource)));
|
|
1960
|
-
|
|
1961
|
-
/** @internal */
|
|
1962
|
-
const provideServiceEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, effect) => provideServiceStream(self, tag, fromEffect(effect)));
|
|
1963
|
-
|
|
1964
|
-
/** @internal */
|
|
1965
|
-
const provideServiceStream = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, stream) => contextWithStream(env => flatMap(stream, service => Function_dist_effectFunction.pipe(self, provideContext(Context_dist_effectContext.add(env, tag, service))))));
|
|
1966
|
-
|
|
1967
|
-
/** @internal */
|
|
1968
|
-
const mapInputContext = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => contextWithStream(env => Function_dist_effectFunction.pipe(self, provideContext(f(env)))));
|
|
1969
|
-
|
|
1970
|
-
/** @internal */
|
|
1971
|
-
const provideSomeLayer = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, layer) =>
|
|
1972
|
-
// @ts-expect-error
|
|
1973
|
-
Function_dist_effectFunction.pipe(self, provideLayer(Function_dist_effectFunction.pipe(Layer_dist_effectLayer.context(), Layer_dist_effectLayer.merge(layer)))));
|
|
1974
|
-
|
|
1975
|
-
/** @internal */
|
|
1976
|
-
const range = (min, max, chunkSize = DefaultChunkSize) => suspend(() => {
|
|
1977
|
-
if (min > max) {
|
|
1978
|
-
return empty;
|
|
1979
|
-
}
|
|
1980
|
-
const go = (min, max, chunkSize) => {
|
|
1981
|
-
const remaining = max - min + 1;
|
|
1982
|
-
if (remaining > chunkSize) {
|
|
1983
|
-
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.range(min, min + chunkSize - 1)), sink.flatMap(() => go(min + chunkSize, max, chunkSize)));
|
|
1984
|
-
}
|
|
1985
|
-
return sink.write(Chunk_dist_effectChunk.range(min, min + remaining - 1));
|
|
1986
|
-
};
|
|
1987
|
-
return new StreamImpl(go(min, max, chunkSize));
|
|
1988
|
-
});
|
|
1989
|
-
|
|
1990
|
-
/** @internal */
|
|
1991
|
-
const rechunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => suspend(() => {
|
|
1992
|
-
const target = Math.max(n, 1);
|
|
1993
|
-
const process = rechunkProcess(new StreamRechunker(target), target);
|
|
1994
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(process)));
|
|
1995
|
-
}));
|
|
1996
|
-
|
|
1997
|
-
/** @internal */
|
|
1998
|
-
const rechunkProcess = (rechunker, target) => sink.readWithCause({
|
|
1999
|
-
onInput: chunk => {
|
|
2000
|
-
if (chunk.length === target && rechunker.isEmpty()) {
|
|
2001
|
-
return sink.flatMap(sink.write(chunk), () => rechunkProcess(rechunker, target));
|
|
2002
|
-
}
|
|
2003
|
-
if (chunk.length > 0) {
|
|
2004
|
-
const chunks = [];
|
|
2005
|
-
let result = undefined;
|
|
2006
|
-
let index = 0;
|
|
2007
|
-
while (index < chunk.length) {
|
|
2008
|
-
while (index < chunk.length && result === undefined) {
|
|
2009
|
-
result = rechunker.write(Function_dist_effectFunction.pipe(chunk, Chunk_dist_effectChunk.unsafeGet(index)));
|
|
2010
|
-
index = index + 1;
|
|
2011
|
-
}
|
|
2012
|
-
if (result !== undefined) {
|
|
2013
|
-
chunks.push(result);
|
|
2014
|
-
result = undefined;
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2017
|
-
return sink.flatMap(sink.writeAll(...chunks), () => rechunkProcess(rechunker, target));
|
|
2018
|
-
}
|
|
2019
|
-
return sink.suspend(() => rechunkProcess(rechunker, target));
|
|
2020
|
-
},
|
|
2021
|
-
onFailure: cause => sink.zipRight(rechunker.emitIfNotEmpty(), sink.failCause(cause)),
|
|
2022
|
-
onDone: () => rechunker.emitIfNotEmpty()
|
|
2023
|
-
});
|
|
2024
|
-
|
|
2025
|
-
/** @internal */
|
|
2026
|
-
class StreamRechunker {
|
|
2027
|
-
builder = [];
|
|
2028
|
-
pos = 0;
|
|
2029
|
-
constructor(n) {
|
|
2030
|
-
this.n = n;
|
|
2031
|
-
}
|
|
2032
|
-
isEmpty() {
|
|
2033
|
-
return this.pos === 0;
|
|
2034
|
-
}
|
|
2035
|
-
write(elem) {
|
|
2036
|
-
this.builder.push(elem);
|
|
2037
|
-
this.pos += 1;
|
|
2038
|
-
if (this.pos === this.n) {
|
|
2039
|
-
const result = Chunk_dist_effectChunk.unsafeFromArray(this.builder);
|
|
2040
|
-
this.builder = [];
|
|
2041
|
-
this.pos = 0;
|
|
2042
|
-
return result;
|
|
2043
|
-
}
|
|
2044
|
-
return undefined;
|
|
2045
|
-
}
|
|
2046
|
-
emitIfNotEmpty() {
|
|
2047
|
-
if (this.pos !== 0) {
|
|
2048
|
-
return sink.write(Chunk_dist_effectChunk.unsafeFromArray(this.builder));
|
|
2049
|
-
}
|
|
2050
|
-
return sink.unit;
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
/** @internal */
|
|
2055
|
-
const refineOrDie = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => Function_dist_effectFunction.pipe(self, refineOrDieWith(pf, Function_dist_effectFunction.identity)));
|
|
2056
|
-
|
|
2057
|
-
/** @internal */
|
|
2058
|
-
const refineOrDieWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, pf, f) => new StreamImpl(sink.catchAll(toChannel(self), error => Option_dist_effectOption.match(pf(error), {
|
|
2059
|
-
onNone: () => sink.failCause(Cause_dist_effectCause.die(f(error))),
|
|
2060
|
-
onSome: sink.fail
|
|
2061
|
-
}))));
|
|
2062
|
-
|
|
2063
|
-
/** @internal */
|
|
2064
|
-
const repeat = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => filterMap(repeatEither(self, schedule), _ => Either_dist_effectEither.match(_, {
|
|
2065
|
-
onLeft: Option_dist_effectOption.none,
|
|
2066
|
-
onRight: Option_dist_effectOption.some
|
|
2067
|
-
})));
|
|
2068
|
-
|
|
2069
|
-
/** @internal */
|
|
2070
|
-
const repeatEffect = effect => repeatEffectOption(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some)));
|
|
2071
|
-
|
|
2072
|
-
/** @internal */
|
|
2073
|
-
const repeatEffectChunk = effect => repeatEffectChunkOption(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some)));
|
|
2074
|
-
|
|
2075
|
-
/** @internal */
|
|
2076
|
-
const repeatEffectChunkOption = effect => unfoldChunkEffect(effect, effect => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.map(effect, chunk => Option_dist_effectOption.some([chunk, effect])), Effect_dist_effectEffect.catchAll(Option_dist_effectOption.match({
|
|
2077
|
-
onNone: () => Effect_dist_effectEffect.succeed(Option_dist_effectOption.none()),
|
|
2078
|
-
onSome: Effect_dist_effectEffect.fail
|
|
2079
|
-
}))));
|
|
2080
|
-
|
|
2081
|
-
/** @internal */
|
|
2082
|
-
const repeatEffectOption = effect => repeatEffectChunkOption(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.map(Chunk_dist_effectChunk.of)));
|
|
2083
|
-
|
|
2084
|
-
/** @internal */
|
|
2085
|
-
const repeatEither = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => repeatWith(self, schedule, {
|
|
2086
|
-
onElement: a => Either_dist_effectEither.right(a),
|
|
2087
|
-
onSchedule: Either_dist_effectEither.left
|
|
2088
|
-
}));
|
|
2089
|
-
|
|
2090
|
-
/** @internal */
|
|
2091
|
-
const repeatElements = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => filterMap(repeatElementsWith(self, schedule, {
|
|
2092
|
-
onElement: a => Option_dist_effectOption.some(a),
|
|
2093
|
-
onSchedule: Option_dist_effectOption.none
|
|
2094
|
-
}), Function_dist_effectFunction.identity));
|
|
2095
|
-
|
|
2096
|
-
/** @internal */
|
|
2097
|
-
const repeatElementsWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, schedule, options) => {
|
|
2098
|
-
const driver = Function_dist_effectFunction.pipe(Schedule_dist_effectSchedule.driver(schedule), Effect_dist_effectEffect.map(driver => {
|
|
2099
|
-
const feed = input => Option_dist_effectOption.match(Chunk_dist_effectChunk.head(input), {
|
|
2100
|
-
onNone: () => loop,
|
|
2101
|
-
onSome: a => sink.zipRight(sink.write(Chunk_dist_effectChunk.of(options.onElement(a))), step(Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.drop(1)), a))
|
|
2102
|
-
});
|
|
2103
|
-
const step = (input, a) => {
|
|
2104
|
-
const advance = Function_dist_effectFunction.pipe(driver.next(a), Effect_dist_effectEffect.as(Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(options.onElement(a))), sink.flatMap(() => step(input, a)))));
|
|
2105
|
-
const reset = Function_dist_effectFunction.pipe(driver.last(), Effect_dist_effectEffect.orDie, Effect_dist_effectEffect.flatMap(b => Function_dist_effectFunction.pipe(driver.reset(), Effect_dist_effectEffect.map(() => Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(options.onSchedule(b))), sink.zipRight(feed(input)))))));
|
|
2106
|
-
return Function_dist_effectFunction.pipe(advance, Effect_dist_effectEffect.orElse(() => reset), sink.unwrap);
|
|
2107
|
-
};
|
|
2108
|
-
const loop = sink.readWith({
|
|
2109
|
-
onInput: feed,
|
|
2110
|
-
onFailure: sink.fail,
|
|
2111
|
-
onDone: () => sink.unit
|
|
2112
|
-
});
|
|
2113
|
-
return loop;
|
|
2114
|
-
}), sink.unwrap);
|
|
2115
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(driver)));
|
|
2116
|
-
});
|
|
2117
|
-
|
|
2118
|
-
/** @internal */
|
|
2119
|
-
const repeatValue = value => new StreamImpl(sink.repeated(sink.write(Chunk_dist_effectChunk.of(value))));
|
|
2120
|
-
|
|
2121
|
-
/** @internal */
|
|
2122
|
-
const repeatWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, schedule, options) => {
|
|
2123
|
-
return Function_dist_effectFunction.pipe(Schedule_dist_effectSchedule.driver(schedule), Effect_dist_effectEffect.map(driver => {
|
|
2124
|
-
const scheduleOutput = Function_dist_effectFunction.pipe(driver.last(), Effect_dist_effectEffect.orDie, Effect_dist_effectEffect.map(options.onSchedule));
|
|
2125
|
-
const process = Function_dist_effectFunction.pipe(self, map(options.onElement), toChannel);
|
|
2126
|
-
const loop = sink.unwrap(Effect_dist_effectEffect.match(driver.next(void 0), {
|
|
2127
|
-
onFailure: () => sink.unit,
|
|
2128
|
-
onSuccess: () => Function_dist_effectFunction.pipe(process, sink.zipRight(Function_dist_effectFunction.pipe(scheduleOutput, Effect_dist_effectEffect.map(c => Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(c)), sink.flatMap(() => loop))), sink.unwrap)))
|
|
2129
|
-
}));
|
|
2130
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(process, sink.zipRight(loop)));
|
|
2131
|
-
}), unwrap);
|
|
2132
|
-
});
|
|
2133
|
-
|
|
2134
|
-
/** @internal */
|
|
2135
|
-
const repeatWithSchedule = (value, schedule) => repeatEffectWithSchedule(Effect_dist_effectEffect.succeed(value), schedule);
|
|
2136
|
-
|
|
2137
|
-
/** @internal */
|
|
2138
|
-
const repeatEffectWithSchedule = (effect, schedule) => flatMap(fromEffect(Effect_dist_effectEffect.zip(effect, Schedule_dist_effectSchedule.driver(schedule))), ([a, driver]) => concat(succeed(a), unfoldEffect(a, s => Effect_dist_effectEffect.matchEffect(driver.next(s), {
|
|
2139
|
-
onFailure: Effect_dist_effectEffect.succeed,
|
|
2140
|
-
onSuccess: () => Effect_dist_effectEffect.map(effect, nextA => Option_dist_effectOption.some([nextA, nextA]))
|
|
2141
|
-
}))));
|
|
2142
|
-
|
|
2143
|
-
/** @internal */
|
|
2144
|
-
const retry = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => unwrap(Effect_dist_effectEffect.map(Schedule_dist_effectSchedule.driver(schedule), driver => {
|
|
2145
|
-
const loop = catchAll(self, error => unwrap(Effect_dist_effectEffect.matchEffect(driver.next(error), {
|
|
2146
|
-
onFailure: () => Effect_dist_effectEffect.fail(error),
|
|
2147
|
-
onSuccess: () => Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(loop, tap(() => driver.reset())))
|
|
2148
|
-
})));
|
|
2149
|
-
return loop;
|
|
2150
|
-
})));
|
|
2151
|
-
|
|
2152
|
-
/** @internal */
|
|
2153
|
-
const run = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(sink.toChannel(sink$1)), sink.runDrain));
|
|
2154
|
-
|
|
2155
|
-
/** @internal */
|
|
2156
|
-
const runCollect = self => Function_dist_effectFunction.pipe(self, run(sink.collectAll()));
|
|
2157
|
-
|
|
2158
|
-
/** @internal */
|
|
2159
|
-
const runCount = self => Function_dist_effectFunction.pipe(self, run(sink.count));
|
|
2160
|
-
|
|
2161
|
-
/** @internal */
|
|
2162
|
-
const runDrain = self => Function_dist_effectFunction.pipe(self, run(sink.drain$1));
|
|
2163
|
-
|
|
2164
|
-
/** @internal */
|
|
2165
|
-
const runFold = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScoped(s, Function_dist_effectFunction.constTrue, f), Effect_dist_effectEffect.scoped));
|
|
2166
|
-
|
|
2167
|
-
/** @internal */
|
|
2168
|
-
const runFoldEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScopedEffect(s, Function_dist_effectFunction.constTrue, f), Effect_dist_effectEffect.scoped));
|
|
2169
|
-
|
|
2170
|
-
/** @internal */
|
|
2171
|
-
const runFoldScoped = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScoped(s, Function_dist_effectFunction.constTrue, f)));
|
|
2172
|
-
|
|
2173
|
-
/** @internal */
|
|
2174
|
-
const runFoldScopedEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScopedEffect(s, Function_dist_effectFunction.constTrue, f)));
|
|
2175
|
-
|
|
2176
|
-
/** @internal */
|
|
2177
|
-
const runFoldWhile = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, s, cont, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScoped(s, cont, f), Effect_dist_effectEffect.scoped));
|
|
2178
|
-
|
|
2179
|
-
/** @internal */
|
|
2180
|
-
const runFoldWhileEffect = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, s, cont, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScopedEffect(s, cont, f), Effect_dist_effectEffect.scoped));
|
|
2181
|
-
|
|
2182
|
-
/** @internal */
|
|
2183
|
-
const runFoldWhileScoped = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, s, cont, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.fold(s, cont, f))));
|
|
2184
|
-
|
|
2185
|
-
/** @internal */
|
|
2186
|
-
const runFoldWhileScopedEffect = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, s, cont, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.foldEffect(s, cont, f))));
|
|
2187
|
-
|
|
2188
|
-
/** @internal */
|
|
2189
|
-
const runForEach = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, run(sink.forEach(f))));
|
|
2190
|
-
|
|
2191
|
-
/** @internal */
|
|
2192
|
-
const runForEachChunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, run(sink.forEachChunk(f))));
|
|
2193
|
-
|
|
2194
|
-
/** @internal */
|
|
2195
|
-
const runForEachChunkScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.forEachChunk(f))));
|
|
2196
|
-
|
|
2197
|
-
/** @internal */
|
|
2198
|
-
const runForEachScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.forEach(f))));
|
|
2199
|
-
|
|
2200
|
-
/** @internal */
|
|
2201
|
-
const runForEachWhile = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, run(sink.forEachWhile(f))));
|
|
2202
|
-
|
|
2203
|
-
/** @internal */
|
|
2204
|
-
const runForEachWhileScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.forEachWhile(f))));
|
|
2205
|
-
|
|
2206
|
-
/** @internal */
|
|
2207
|
-
const runHead = self => Function_dist_effectFunction.pipe(self, run(sink.head()));
|
|
2208
|
-
|
|
2209
|
-
/** @internal */
|
|
2210
|
-
const runIntoHub = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, hub) => Function_dist_effectFunction.pipe(self, runIntoQueue(hub)));
|
|
2211
|
-
|
|
2212
|
-
/** @internal */
|
|
2213
|
-
const runIntoHubScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, hub) => Function_dist_effectFunction.pipe(self, runIntoQueueScoped(hub)));
|
|
2214
|
-
|
|
2215
|
-
/** @internal */
|
|
2216
|
-
const runIntoQueue = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, queue) => Function_dist_effectFunction.pipe(self, runIntoQueueScoped(queue), Effect_dist_effectEffect.scoped));
|
|
2217
|
-
|
|
2218
|
-
/** @internal */
|
|
2219
|
-
const runIntoQueueElementsScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, queue) => {
|
|
2220
|
-
const writer = sink.readWithCause({
|
|
2221
|
-
onInput: input => sink.flatMap(sink.fromEffect(Queue_dist_effectQueue.offerAll(queue, Chunk_dist_effectChunk.map(input, Exit_dist_effectExit.succeed))), () => writer),
|
|
2222
|
-
onFailure: cause => sink.fromEffect(Queue_dist_effectQueue.offer(queue, Exit_dist_effectExit.failCause(Cause_dist_effectCause.map(cause, Option_dist_effectOption.some)))),
|
|
2223
|
-
onDone: () => sink.fromEffect(Queue_dist_effectQueue.offer(queue, Exit_dist_effectExit.fail(Option_dist_effectOption.none())))
|
|
2224
|
-
});
|
|
2225
|
-
return Function_dist_effectFunction.pipe(sink.pipeTo(toChannel(self), writer), sink.drain, sink.runScoped, Effect_dist_effectEffect.asUnit);
|
|
2226
|
-
});
|
|
2227
|
-
|
|
2228
|
-
/** @internal */
|
|
2229
|
-
const runIntoQueueScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, queue) => {
|
|
2230
|
-
const writer = sink.readWithCause({
|
|
2231
|
-
onInput: input => sink.flatMap(sink.write(take$2.chunk(input)), () => writer),
|
|
2232
|
-
onFailure: cause => sink.write(take$2.failCause(cause)),
|
|
2233
|
-
onDone: () => sink.write(take$2.end)
|
|
2234
|
-
});
|
|
2235
|
-
return Function_dist_effectFunction.pipe(sink.pipeTo(toChannel(self), writer), sink.mapOutEffect(take => Queue_dist_effectQueue.offer(queue, take)), sink.drain, sink.runScoped, Effect_dist_effectEffect.asUnit);
|
|
2236
|
-
});
|
|
2237
|
-
|
|
2238
|
-
/** @internal */
|
|
2239
|
-
const runLast = self => Function_dist_effectFunction.pipe(self, run(sink.last()));
|
|
2240
|
-
|
|
2241
|
-
/** @internal */
|
|
2242
|
-
const runScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(sink.toChannel(sink$1)), sink.drain, sink.runScoped));
|
|
2243
|
-
|
|
2244
|
-
/** @internal */
|
|
2245
|
-
const runSum = self => Function_dist_effectFunction.pipe(self, run(sink.sum));
|
|
2246
|
-
|
|
2247
|
-
/** @internal */
|
|
2248
|
-
const scan = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, scanEffect(s, (s, a) => Effect_dist_effectEffect.succeed(f(s, a)))));
|
|
2249
|
-
|
|
2250
|
-
/** @internal */
|
|
2251
|
-
const scanReduce = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, scanReduceEffect((a2, a) => Effect_dist_effectEffect.succeed(f(a2, a)))));
|
|
2252
|
-
|
|
2253
|
-
/** @internal */
|
|
2254
|
-
const scanReduceEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapAccumEffect(Option_dist_effectOption.none(), (option, a) => {
|
|
2255
|
-
switch (option._tag) {
|
|
2256
|
-
case "None":
|
|
2257
|
-
{
|
|
2258
|
-
return Effect_dist_effectEffect.succeed([Option_dist_effectOption.some(a), a]);
|
|
2259
|
-
}
|
|
2260
|
-
case "Some":
|
|
2261
|
-
{
|
|
2262
|
-
return Function_dist_effectFunction.pipe(f(option.value, a), Effect_dist_effectEffect.map(b => [Option_dist_effectOption.some(b), b]));
|
|
2263
|
-
}
|
|
2264
|
-
}
|
|
2265
|
-
})));
|
|
2266
|
-
|
|
2267
|
-
/** @internal */
|
|
2268
|
-
const schedule = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => filterMap(scheduleWith(self, schedule, {
|
|
2269
|
-
onElement: Option_dist_effectOption.some,
|
|
2270
|
-
onSchedule: Option_dist_effectOption.none
|
|
2271
|
-
}), Function_dist_effectFunction.identity));
|
|
2272
|
-
|
|
2273
|
-
/** @internal */
|
|
2274
|
-
const scheduleWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, schedule, options) => {
|
|
2275
|
-
const loop = (driver, iterator) => {
|
|
2276
|
-
const next = iterator.next();
|
|
2277
|
-
if (next.done) {
|
|
2278
|
-
return sink.readWithCause({
|
|
2279
|
-
onInput: chunk => loop(driver, chunk[Symbol.iterator]()),
|
|
2280
|
-
onFailure: sink.failCause,
|
|
2281
|
-
onDone: sink.succeedNow
|
|
2282
|
-
});
|
|
2283
|
-
}
|
|
2284
|
-
return sink.unwrap(Effect_dist_effectEffect.matchEffect(driver.next(next.value), {
|
|
2285
|
-
onFailure: () => Function_dist_effectFunction.pipe(driver.last(), Effect_dist_effectEffect.orDie, Effect_dist_effectEffect.map(b => Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.make(options.onElement(next.value), options.onSchedule(b))), sink.flatMap(() => loop(driver, iterator)))), Effect_dist_effectEffect.zipLeft(driver.reset())),
|
|
2286
|
-
onSuccess: () => Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(options.onElement(next.value))), sink.flatMap(() => loop(driver, iterator))))
|
|
2287
|
-
}));
|
|
2288
|
-
};
|
|
2289
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(sink.fromEffect(Schedule_dist_effectSchedule.driver(schedule)), sink.flatMap(driver => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(driver, Chunk_dist_effectChunk.empty()[Symbol.iterator]()))))));
|
|
2290
|
-
});
|
|
2291
|
-
|
|
2292
|
-
/** @internal */
|
|
2293
|
-
const scanEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => new StreamImpl(Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(s)), sink.flatMap(() => toChannel(Function_dist_effectFunction.pipe(self, mapAccumEffect(s, (s, a) => Function_dist_effectFunction.pipe(f(s, a), Effect_dist_effectEffect.map(s => [s, s])))))))));
|
|
2294
|
-
|
|
2295
|
-
/** @internal */
|
|
2296
|
-
const scoped = effect => new StreamImpl(sink.ensuring(sink.scoped(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.map(Chunk_dist_effectChunk.of))), Effect_dist_effectEffect.unit));
|
|
2297
|
-
|
|
2298
|
-
/** @internal */
|
|
2299
|
-
const some = self => Function_dist_effectFunction.pipe(self, mapError(Option_dist_effectOption.some), someOrFail(() => Option_dist_effectOption.none()));
|
|
2300
|
-
|
|
2301
|
-
/** @internal */
|
|
2302
|
-
const someOrElse = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, fallback) => Function_dist_effectFunction.pipe(self, map(Option_dist_effectOption.getOrElse(fallback))));
|
|
2303
|
-
|
|
2304
|
-
/** @internal */
|
|
2305
|
-
const someOrFail = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, error) => mapEffectSequential(self, Option_dist_effectOption.match({
|
|
2306
|
-
onNone: () => Effect_dist_effectEffect.failSync(error),
|
|
2307
|
-
onSome: Effect_dist_effectEffect.succeed
|
|
2308
|
-
})));
|
|
2309
|
-
|
|
2310
|
-
/** @internal */
|
|
2311
|
-
const sliding = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, chunkSize) => slidingSize(self, chunkSize, 1));
|
|
2312
|
-
|
|
2313
|
-
/** @internal */
|
|
2314
|
-
const slidingSize = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, chunkSize, stepSize) => {
|
|
2315
|
-
if (chunkSize <= 0 || stepSize <= 0) {
|
|
2316
|
-
return die(Cause_dist_effectCause.IllegalArgumentException("Invalid bounds - `chunkSize` and `stepSize` must be greater than zero"));
|
|
2317
|
-
}
|
|
2318
|
-
return new StreamImpl(sink.suspend(() => {
|
|
2319
|
-
const queue = new RingBuffer(chunkSize);
|
|
2320
|
-
const emitOnStreamEnd = (queueSize, channelEnd) => {
|
|
2321
|
-
if (queueSize < chunkSize) {
|
|
2322
|
-
const items = queue.toChunk();
|
|
2323
|
-
const result = Chunk_dist_effectChunk.isEmpty(items) ? Chunk_dist_effectChunk.empty() : Chunk_dist_effectChunk.of(items);
|
|
2324
|
-
return Function_dist_effectFunction.pipe(sink.write(result), sink.flatMap(() => channelEnd));
|
|
2325
|
-
}
|
|
2326
|
-
const lastEmitIndex = queueSize - (queueSize - chunkSize) % stepSize;
|
|
2327
|
-
if (lastEmitIndex === queueSize) {
|
|
2328
|
-
return channelEnd;
|
|
2329
|
-
}
|
|
2330
|
-
const leftovers = queueSize - (lastEmitIndex - chunkSize + stepSize);
|
|
2331
|
-
const lastItems = Function_dist_effectFunction.pipe(queue.toChunk(), Chunk_dist_effectChunk.takeRight(leftovers));
|
|
2332
|
-
const result = Chunk_dist_effectChunk.isEmpty(lastItems) ? Chunk_dist_effectChunk.empty() : Chunk_dist_effectChunk.of(lastItems);
|
|
2333
|
-
return Function_dist_effectFunction.pipe(sink.write(result), sink.flatMap(() => channelEnd));
|
|
2334
|
-
};
|
|
2335
|
-
const reader = queueSize => sink.readWithCause({
|
|
2336
|
-
onInput: input => sink.flatMap(sink.write(Chunk_dist_effectChunk.filterMap(input, (element, index) => {
|
|
2337
|
-
queue.put(element);
|
|
2338
|
-
const currentIndex = queueSize + index + 1;
|
|
2339
|
-
if (currentIndex < chunkSize || (currentIndex - chunkSize) % stepSize > 0) {
|
|
2340
|
-
return Option_dist_effectOption.none();
|
|
2341
|
-
}
|
|
2342
|
-
return Option_dist_effectOption.some(queue.toChunk());
|
|
2343
|
-
})), () => reader(queueSize + input.length)),
|
|
2344
|
-
onFailure: cause => emitOnStreamEnd(queueSize, sink.failCause(cause)),
|
|
2345
|
-
onDone: () => emitOnStreamEnd(queueSize, sink.unit)
|
|
2346
|
-
});
|
|
2347
|
-
return Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(reader(0)));
|
|
2348
|
-
}));
|
|
2349
|
-
});
|
|
2350
|
-
|
|
2351
|
-
/** @internal */
|
|
2352
|
-
const split = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
2353
|
-
const split = (leftovers, input) => {
|
|
2354
|
-
const [chunk, remaining] = Function_dist_effectFunction.pipe(leftovers, Chunk_dist_effectChunk.appendAll(input), Chunk_dist_effectChunk.splitWhere(predicate));
|
|
2355
|
-
if (Chunk_dist_effectChunk.isEmpty(chunk) || Chunk_dist_effectChunk.isEmpty(remaining)) {
|
|
2356
|
-
return loop(Function_dist_effectFunction.pipe(chunk, Chunk_dist_effectChunk.appendAll(Function_dist_effectFunction.pipe(remaining, Chunk_dist_effectChunk.drop(1)))));
|
|
2357
|
-
}
|
|
2358
|
-
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(chunk)), sink.flatMap(() => split(Chunk_dist_effectChunk.empty(), Function_dist_effectFunction.pipe(remaining, Chunk_dist_effectChunk.drop(1)))));
|
|
2359
|
-
};
|
|
2360
|
-
const loop = leftovers => sink.readWith({
|
|
2361
|
-
onInput: input => split(leftovers, input),
|
|
2362
|
-
onFailure: sink.fail,
|
|
2363
|
-
onDone: () => {
|
|
2364
|
-
if (Chunk_dist_effectChunk.isEmpty(leftovers)) {
|
|
2365
|
-
return sink.unit;
|
|
2366
|
-
}
|
|
2367
|
-
if (Option_dist_effectOption.isNone(Function_dist_effectFunction.pipe(leftovers, Chunk_dist_effectChunk.findFirst(predicate)))) {
|
|
2368
|
-
return sink.zipRight(sink.write(Chunk_dist_effectChunk.of(leftovers)), sink.unit);
|
|
2369
|
-
}
|
|
2370
|
-
return sink.zipRight(split(Chunk_dist_effectChunk.empty(), leftovers), sink.unit);
|
|
2371
|
-
}
|
|
2372
|
-
});
|
|
2373
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(Chunk_dist_effectChunk.empty()))));
|
|
2374
|
-
});
|
|
2375
|
-
|
|
2376
|
-
/** @internal */
|
|
2377
|
-
const splitOnChunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, delimiter) => {
|
|
2378
|
-
const next = (leftover, delimiterIndex) => sink.readWithCause({
|
|
2379
|
-
onInput: inputChunk => {
|
|
2380
|
-
let buffer;
|
|
2381
|
-
const [carry, delimiterCursor] = Function_dist_effectFunction.pipe(inputChunk, Chunk_dist_effectChunk.reduce([Function_dist_effectFunction.pipe(leftover, Option_dist_effectOption.getOrElse(() => Chunk_dist_effectChunk.empty())), delimiterIndex], ([carry, delimiterCursor], a) => {
|
|
2382
|
-
const concatenated = Function_dist_effectFunction.pipe(carry, Chunk_dist_effectChunk.append(a));
|
|
2383
|
-
if (delimiterCursor < delimiter.length && Equal_dist_effectEqual.equals(a, Function_dist_effectFunction.pipe(delimiter, Chunk_dist_effectChunk.unsafeGet(delimiterCursor)))) {
|
|
2384
|
-
if (delimiterCursor + 1 === delimiter.length) {
|
|
2385
|
-
if (buffer === undefined) {
|
|
2386
|
-
buffer = [];
|
|
2387
|
-
}
|
|
2388
|
-
buffer.push(Function_dist_effectFunction.pipe(concatenated, Chunk_dist_effectChunk.take(concatenated.length - delimiter.length)));
|
|
2389
|
-
return [Chunk_dist_effectChunk.empty(), 0];
|
|
2390
|
-
}
|
|
2391
|
-
return [concatenated, delimiterCursor + 1];
|
|
2392
|
-
}
|
|
2393
|
-
return [concatenated, Equal_dist_effectEqual.equals(a, Function_dist_effectFunction.pipe(delimiter, Chunk_dist_effectChunk.unsafeGet(0))) ? 1 : 0];
|
|
2394
|
-
}));
|
|
2395
|
-
const output = buffer === undefined ? Chunk_dist_effectChunk.empty() : Chunk_dist_effectChunk.unsafeFromArray(buffer);
|
|
2396
|
-
return sink.flatMap(sink.write(output), () => next(Chunk_dist_effectChunk.isNonEmpty(carry) ? Option_dist_effectOption.some(carry) : Option_dist_effectOption.none(), delimiterCursor));
|
|
2397
|
-
},
|
|
2398
|
-
onFailure: cause => Option_dist_effectOption.match(leftover, {
|
|
2399
|
-
onNone: () => sink.failCause(cause),
|
|
2400
|
-
onSome: chunk => sink.zipRight(sink.write(Chunk_dist_effectChunk.of(chunk)), sink.failCause(cause))
|
|
2401
|
-
}),
|
|
2402
|
-
onDone: done => Option_dist_effectOption.match(leftover, {
|
|
2403
|
-
onNone: () => sink.succeed(done),
|
|
2404
|
-
onSome: chunk => sink.zipRight(sink.write(Chunk_dist_effectChunk.of(chunk)), sink.succeed(done))
|
|
2405
|
-
})
|
|
2406
|
-
});
|
|
2407
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(next(Option_dist_effectOption.none(), 0))));
|
|
2408
|
-
});
|
|
2409
|
-
|
|
2410
|
-
/** @internal */
|
|
2411
|
-
const splitLines = self => suspend(() => {
|
|
2412
|
-
let stringBuilder = "";
|
|
2413
|
-
let midCRLF = false;
|
|
2414
|
-
const splitLinesChunk = chunk => {
|
|
2415
|
-
const chunkBuilder = [];
|
|
2416
|
-
Chunk_dist_effectChunk.map(chunk, str => {
|
|
2417
|
-
if (str.length !== 0) {
|
|
2418
|
-
let from = 0;
|
|
2419
|
-
let indexOfCR = str.indexOf("\r");
|
|
2420
|
-
let indexOfLF = str.indexOf("\n");
|
|
2421
|
-
if (midCRLF) {
|
|
2422
|
-
if (indexOfLF === 0) {
|
|
2423
|
-
chunkBuilder.push(stringBuilder);
|
|
2424
|
-
stringBuilder = "";
|
|
2425
|
-
from = 1;
|
|
2426
|
-
indexOfLF = str.indexOf("\n", from);
|
|
2427
|
-
} else {
|
|
2428
|
-
stringBuilder = stringBuilder + "\r";
|
|
2429
|
-
}
|
|
2430
|
-
midCRLF = false;
|
|
2431
|
-
}
|
|
2432
|
-
while (indexOfCR !== -1 || indexOfLF !== -1) {
|
|
2433
|
-
if (indexOfCR === -1 || indexOfLF !== -1 && indexOfLF < indexOfCR) {
|
|
2434
|
-
if (stringBuilder.length === 0) {
|
|
2435
|
-
chunkBuilder.push(str.substring(from, indexOfLF));
|
|
2436
|
-
} else {
|
|
2437
|
-
chunkBuilder.push(stringBuilder + str.substring(from, indexOfLF));
|
|
2438
|
-
stringBuilder = "";
|
|
2439
|
-
}
|
|
2440
|
-
from = indexOfLF + 1;
|
|
2441
|
-
indexOfLF = str.indexOf("\n", from);
|
|
2442
|
-
} else {
|
|
2443
|
-
if (str.length === indexOfCR + 1) {
|
|
2444
|
-
midCRLF = true;
|
|
2445
|
-
indexOfCR = -1;
|
|
2446
|
-
} else {
|
|
2447
|
-
if (indexOfLF === indexOfCR + 1) {
|
|
2448
|
-
if (stringBuilder.length === 0) {
|
|
2449
|
-
chunkBuilder.push(str.substring(from, indexOfCR));
|
|
2450
|
-
} else {
|
|
2451
|
-
stringBuilder = stringBuilder + str.substring(from, indexOfCR);
|
|
2452
|
-
chunkBuilder.push(stringBuilder);
|
|
2453
|
-
stringBuilder = "";
|
|
2454
|
-
}
|
|
2455
|
-
from = indexOfCR + 2;
|
|
2456
|
-
indexOfCR = str.indexOf("\r", from);
|
|
2457
|
-
indexOfLF = str.indexOf("\n", from);
|
|
2458
|
-
} else {
|
|
2459
|
-
indexOfCR = str.indexOf("\r", indexOfCR + 1);
|
|
2460
|
-
}
|
|
2461
|
-
}
|
|
2462
|
-
}
|
|
2463
|
-
}
|
|
2464
|
-
if (midCRLF) {
|
|
2465
|
-
stringBuilder = stringBuilder + str.substring(from, str.length - 1);
|
|
2466
|
-
} else {
|
|
2467
|
-
stringBuilder = stringBuilder + str.substring(from, str.length);
|
|
2468
|
-
}
|
|
2469
|
-
}
|
|
2470
|
-
});
|
|
2471
|
-
return Chunk_dist_effectChunk.unsafeFromArray(chunkBuilder);
|
|
2472
|
-
};
|
|
2473
|
-
const loop = sink.readWithCause({
|
|
2474
|
-
onInput: input => {
|
|
2475
|
-
const out = splitLinesChunk(input);
|
|
2476
|
-
return Chunk_dist_effectChunk.isEmpty(out) ? loop : sink.flatMap(sink.write(out), () => loop);
|
|
2477
|
-
},
|
|
2478
|
-
onFailure: cause => stringBuilder.length === 0 ? sink.failCause(cause) : sink.flatMap(sink.write(Chunk_dist_effectChunk.of(stringBuilder)), () => sink.failCause(cause)),
|
|
2479
|
-
onDone: done => stringBuilder.length === 0 ? sink.succeed(done) : sink.flatMap(sink.write(Chunk_dist_effectChunk.of(stringBuilder)), () => sink.succeed(done))
|
|
2480
|
-
});
|
|
2481
|
-
return new StreamImpl(sink.pipeTo(toChannel(self), loop));
|
|
2482
|
-
});
|
|
2483
|
-
|
|
2484
|
-
/** @internal */
|
|
2485
|
-
const succeed = value => fromChunk(Chunk_dist_effectChunk.of(value));
|
|
2486
|
-
|
|
2487
|
-
/** @internal */
|
|
2488
|
-
const sync = evaluate => suspend(() => fromChunk(Chunk_dist_effectChunk.of(evaluate())));
|
|
2489
|
-
|
|
2490
|
-
/** @internal */
|
|
2491
|
-
const suspend = stream => new StreamImpl(sink.suspend(() => toChannel(stream())));
|
|
2492
|
-
|
|
2493
|
-
/** @internal */
|
|
2494
|
-
const take = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => {
|
|
2495
|
-
if (!Number.isInteger(n)) {
|
|
2496
|
-
return die(Cause_dist_effectCause.IllegalArgumentException(`${n} must be an integer`));
|
|
2497
|
-
}
|
|
2498
|
-
const loop = n => sink.readWith({
|
|
2499
|
-
onInput: input => {
|
|
2500
|
-
const taken = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.take(Math.min(n, Number.POSITIVE_INFINITY)));
|
|
2501
|
-
const leftover = Math.max(0, n - taken.length);
|
|
2502
|
-
const more = leftover > 0;
|
|
2503
|
-
if (more) {
|
|
2504
|
-
return Function_dist_effectFunction.pipe(sink.write(taken), sink.flatMap(() => loop(leftover)));
|
|
2505
|
-
}
|
|
2506
|
-
return sink.write(taken);
|
|
2507
|
-
},
|
|
2508
|
-
onFailure: sink.fail,
|
|
2509
|
-
onDone: sink.succeed
|
|
2510
|
-
});
|
|
2511
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(0 < n ? loop(n) : sink.unit)));
|
|
2512
|
-
});
|
|
2513
|
-
|
|
2514
|
-
/** @internal */
|
|
2515
|
-
const takeRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => {
|
|
2516
|
-
if (n <= 0) {
|
|
2517
|
-
return empty;
|
|
2518
|
-
}
|
|
2519
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.succeed(new RingBuffer(n)), Effect_dist_effectEffect.map(queue => {
|
|
2520
|
-
const reader = sink.readWith({
|
|
2521
|
-
onInput: input => {
|
|
2522
|
-
for (const element of input) {
|
|
2523
|
-
queue.put(element);
|
|
2524
|
-
}
|
|
2525
|
-
return reader;
|
|
2526
|
-
},
|
|
2527
|
-
onFailure: sink.fail,
|
|
2528
|
-
onDone: () => Function_dist_effectFunction.pipe(sink.write(queue.toChunk()), sink.zipRight(sink.unit))
|
|
2529
|
-
});
|
|
2530
|
-
return Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(reader));
|
|
2531
|
-
}), sink.unwrap));
|
|
2532
|
-
});
|
|
2533
|
-
|
|
2534
|
-
/** @internal */
|
|
2535
|
-
const takeUntil = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
2536
|
-
const loop = sink.readWith({
|
|
2537
|
-
onInput: input => {
|
|
2538
|
-
const taken = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.takeWhile(a => !predicate(a)));
|
|
2539
|
-
const last = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.drop(taken.length), Chunk_dist_effectChunk.take(1));
|
|
2540
|
-
if (Chunk_dist_effectChunk.isEmpty(last)) {
|
|
2541
|
-
return Function_dist_effectFunction.pipe(sink.write(taken), sink.flatMap(() => loop));
|
|
2542
|
-
}
|
|
2543
|
-
return sink.write(Function_dist_effectFunction.pipe(taken, Chunk_dist_effectChunk.appendAll(last)));
|
|
2544
|
-
},
|
|
2545
|
-
onFailure: sink.fail,
|
|
2546
|
-
onDone: sink.succeed
|
|
2547
|
-
});
|
|
2548
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop)));
|
|
2549
|
-
});
|
|
2550
|
-
|
|
2551
|
-
/** @internal */
|
|
2552
|
-
const takeUntilEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
2553
|
-
const loop = iterator => {
|
|
2554
|
-
const next = iterator.next();
|
|
2555
|
-
if (next.done) {
|
|
2556
|
-
return sink.readWithCause({
|
|
2557
|
-
onInput: elem => loop(elem[Symbol.iterator]()),
|
|
2558
|
-
onFailure: sink.failCause,
|
|
2559
|
-
onDone: sink.succeed
|
|
2560
|
-
});
|
|
2561
|
-
}
|
|
2562
|
-
return Function_dist_effectFunction.pipe(predicate(next.value), Effect_dist_effectEffect.map(bool => bool ? sink.write(Chunk_dist_effectChunk.of(next.value)) : Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(next.value)), sink.flatMap(() => loop(iterator)))), sink.unwrap);
|
|
2563
|
-
};
|
|
2564
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]()))));
|
|
2565
|
-
});
|
|
2566
|
-
|
|
2567
|
-
/** @internal */
|
|
2568
|
-
const takeWhile = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
2569
|
-
const loop = sink.readWith({
|
|
2570
|
-
onInput: input => {
|
|
2571
|
-
const taken = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.takeWhile(predicate));
|
|
2572
|
-
const more = taken.length === input.length;
|
|
2573
|
-
if (more) {
|
|
2574
|
-
return Function_dist_effectFunction.pipe(sink.write(taken), sink.flatMap(() => loop));
|
|
2575
|
-
}
|
|
2576
|
-
return sink.write(taken);
|
|
2577
|
-
},
|
|
2578
|
-
onFailure: sink.fail,
|
|
2579
|
-
onDone: sink.succeed
|
|
2580
|
-
});
|
|
2581
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop)));
|
|
2582
|
-
});
|
|
2583
|
-
|
|
2584
|
-
/** @internal */
|
|
2585
|
-
const tap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => mapEffectSequential(self, a => Effect_dist_effectEffect.as(f(a), a)));
|
|
2586
|
-
|
|
2587
|
-
/** @internal */
|
|
2588
|
-
const tapBoth = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, {
|
|
2589
|
-
onFailure,
|
|
2590
|
-
onSuccess
|
|
2591
|
-
}) => Function_dist_effectFunction.pipe(self, tapError(onFailure), tap(onSuccess)));
|
|
2592
|
-
|
|
2593
|
-
/** @internal */
|
|
2594
|
-
const tapError = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => catchAll(self, error => fromEffect(Effect_dist_effectEffect.zipRight(f(error), Effect_dist_effectEffect.fail(error)))));
|
|
2595
|
-
|
|
2596
|
-
/** @internal */
|
|
2597
|
-
const tapErrorCause = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
2598
|
-
const loop = sink.readWithCause({
|
|
2599
|
-
onInput: chunk => sink.flatMap(sink.write(chunk), () => loop),
|
|
2600
|
-
onFailure: cause => sink.fromEffect(Effect_dist_effectEffect.zipRight(f(cause), Effect_dist_effectEffect.failCause(cause))),
|
|
2601
|
-
onDone: sink.succeedNow
|
|
2602
|
-
});
|
|
2603
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop)));
|
|
2604
|
-
});
|
|
2605
|
-
|
|
2606
|
-
/** @internal */
|
|
2607
|
-
const tapSink = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => Function_dist_effectFunction.pipe(fromEffect(Effect_dist_effectEffect.all([Queue_dist_effectQueue.bounded(1), Deferred_dist_effectDeferred.make()])), flatMap(([queue, deferred]) => {
|
|
2608
|
-
const right = flattenTake(fromQueue(queue, {
|
|
2609
|
-
maxChunkSize: 1
|
|
2610
|
-
}));
|
|
2611
|
-
const loop = sink.readWithCause({
|
|
2612
|
-
onInput: chunk => Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.offer(queue, take$2.chunk(chunk))), sink.foldCauseChannel({
|
|
2613
|
-
onFailure: () => sink.flatMap(sink.write(chunk), () => sink.identityChannel()),
|
|
2614
|
-
onSuccess: () => sink.flatMap(sink.write(chunk), () => loop)
|
|
2615
|
-
})),
|
|
2616
|
-
onFailure: cause => Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.offer(queue, take$2.failCause(cause))), sink.foldCauseChannel({
|
|
2617
|
-
onFailure: () => sink.failCause(cause),
|
|
2618
|
-
onSuccess: () => sink.failCause(cause)
|
|
2619
|
-
})),
|
|
2620
|
-
onDone: () => Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.offer(queue, take$2.end)), sink.foldCauseChannel({
|
|
2621
|
-
onFailure: () => sink.unit,
|
|
2622
|
-
onSuccess: () => sink.unit
|
|
2623
|
-
}))
|
|
2624
|
-
});
|
|
2625
|
-
return Function_dist_effectFunction.pipe(new StreamImpl(Function_dist_effectFunction.pipe(sink.pipeTo(toChannel(self), loop), sink.ensuring(Effect_dist_effectEffect.zipRight(Effect_dist_effectEffect.forkDaemon(Queue_dist_effectQueue.offer(queue, take$2.end)), Deferred_dist_effectDeferred._await(deferred))))), merge(execute(Function_dist_effectFunction.pipe(run(right, sink$1), Effect_dist_effectEffect.ensuring(Effect_dist_effectEffect.zipRight(Queue_dist_effectQueue.shutdown(queue), Deferred_dist_effectDeferred.succeed(deferred, void 0)))))));
|
|
2626
|
-
})));
|
|
2627
|
-
|
|
2628
|
-
/** @internal */
|
|
2629
|
-
const throttle = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => throttleEffect(self, {
|
|
2630
|
-
...options,
|
|
2631
|
-
cost: chunk => Effect_dist_effectEffect.succeed(options.cost(chunk))
|
|
2632
|
-
}));
|
|
2633
|
-
|
|
2634
|
-
/** @internal */
|
|
2635
|
-
const throttleEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
2636
|
-
if (options.strategy === "enforce") {
|
|
2637
|
-
return throttleEnforceEffect(self, options.cost, options.units, options.duration, options.burst ?? 0);
|
|
2638
|
-
}
|
|
2639
|
-
return throttleShapeEffect(self, options.cost, options.units, options.duration, options.burst ?? 0);
|
|
2640
|
-
});
|
|
2641
|
-
const throttleEnforceEffect = (self, cost, units, duration, burst) => {
|
|
2642
|
-
const loop = (tokens, timestampMillis) => sink.readWithCause({
|
|
2643
|
-
onInput: input => Function_dist_effectFunction.pipe(cost(input), Effect_dist_effectEffect.zip(Clock_dist_effectClock.currentTimeMillis), Effect_dist_effectEffect.map(([weight, currentTimeMillis]) => {
|
|
2644
|
-
const elapsed = currentTimeMillis - timestampMillis;
|
|
2645
|
-
const cycles = elapsed / Duration_dist_effectDuration.toMillis(duration);
|
|
2646
|
-
const sum = tokens + cycles * units;
|
|
2647
|
-
const max = units + burst < 0 ? Number.POSITIVE_INFINITY : units + burst;
|
|
2648
|
-
const available = sum < 0 ? max : Math.min(sum, max);
|
|
2649
|
-
if (weight <= available) {
|
|
2650
|
-
return Function_dist_effectFunction.pipe(sink.write(input), sink.flatMap(() => loop(available - weight, currentTimeMillis)));
|
|
2651
|
-
}
|
|
2652
|
-
return loop(tokens, timestampMillis);
|
|
2653
|
-
}), sink.unwrap),
|
|
2654
|
-
onFailure: sink.failCause,
|
|
2655
|
-
onDone: () => sink.unit
|
|
2656
|
-
});
|
|
2657
|
-
const throttled = Function_dist_effectFunction.pipe(Clock_dist_effectClock.currentTimeMillis, Effect_dist_effectEffect.map(currentTimeMillis => loop(units, currentTimeMillis)), sink.unwrap);
|
|
2658
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(throttled)));
|
|
2659
|
-
};
|
|
2660
|
-
const throttleShapeEffect = (self, costFn, units, duration, burst) => {
|
|
2661
|
-
const loop = (tokens, timestampMillis) => sink.readWithCause({
|
|
2662
|
-
onInput: input => Function_dist_effectFunction.pipe(costFn(input), Effect_dist_effectEffect.zip(Clock_dist_effectClock.currentTimeMillis), Effect_dist_effectEffect.map(([weight, currentTimeMillis]) => {
|
|
2663
|
-
const elapsed = currentTimeMillis - timestampMillis;
|
|
2664
|
-
const cycles = elapsed / Duration_dist_effectDuration.toMillis(duration);
|
|
2665
|
-
const sum = tokens + cycles * units;
|
|
2666
|
-
const max = units + burst < 0 ? Number.POSITIVE_INFINITY : units + burst;
|
|
2667
|
-
const available = sum < 0 ? max : Math.min(sum, max);
|
|
2668
|
-
const remaining = available - weight;
|
|
2669
|
-
const waitCycles = remaining >= 0 ? 0 : -remaining / units;
|
|
2670
|
-
const delay = Duration_dist_effectDuration.millis(Math.max(0, waitCycles * Duration_dist_effectDuration.toMillis(duration)));
|
|
2671
|
-
if (Duration_dist_effectDuration.greaterThan(delay, Duration_dist_effectDuration.zero)) {
|
|
2672
|
-
return Function_dist_effectFunction.pipe(sink.fromEffect(Clock_dist_effectClock.sleep(delay)), sink.zipRight(sink.write(input)), sink.flatMap(() => loop(remaining, currentTimeMillis)));
|
|
2673
|
-
}
|
|
2674
|
-
return sink.flatMap(sink.write(input), () => loop(remaining, currentTimeMillis));
|
|
2675
|
-
}), sink.unwrap),
|
|
2676
|
-
onFailure: sink.failCause,
|
|
2677
|
-
onDone: () => sink.unit
|
|
2678
|
-
});
|
|
2679
|
-
const throttled = Function_dist_effectFunction.pipe(Clock_dist_effectClock.currentTimeMillis, Effect_dist_effectEffect.map(currentTimeMillis => loop(units, currentTimeMillis)), sink.unwrap);
|
|
2680
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(throttled)));
|
|
2681
|
-
};
|
|
2682
|
-
|
|
2683
|
-
/** @internal */
|
|
2684
|
-
const tick = interval => repeatWithSchedule(void 0, Schedule_dist_effectSchedule.spaced(interval));
|
|
2685
|
-
|
|
2686
|
-
/** @internal */
|
|
2687
|
-
const timeout = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, duration) => Function_dist_effectFunction.pipe(toPull(self), Effect_dist_effectEffect.map(Effect_dist_effectEffect.timeoutFail({
|
|
2688
|
-
onTimeout: () => Option_dist_effectOption.none(),
|
|
2689
|
-
duration
|
|
2690
|
-
})), fromPull));
|
|
2691
|
-
|
|
2692
|
-
/** @internal */
|
|
2693
|
-
const timeoutFail = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, error, duration) => Function_dist_effectFunction.pipe(self, timeoutTo(duration, failSync(error))));
|
|
2694
|
-
|
|
2695
|
-
/** @internal */
|
|
2696
|
-
const timeoutFailCause = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, cause, duration) => Function_dist_effectFunction.pipe(toPull(self), Effect_dist_effectEffect.map(Effect_dist_effectEffect.timeoutFailCause({
|
|
2697
|
-
onTimeout: () => Cause_dist_effectCause.map(cause(), Option_dist_effectOption.some),
|
|
2698
|
-
duration
|
|
2699
|
-
})), fromPull));
|
|
2700
|
-
|
|
2701
|
-
/** @internal */
|
|
2702
|
-
const timeoutTo = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, duration, that) => {
|
|
2703
|
-
const StreamTimeout = Cause_dist_effectCause.RuntimeException("Stream Timeout");
|
|
2704
|
-
return Function_dist_effectFunction.pipe(self, timeoutFailCause(() => Cause_dist_effectCause.die(StreamTimeout), duration), catchSomeCause(cause => Cause_dist_effectCause.isDieType(cause) && Cause_dist_effectCause.isRuntimeException(cause.defect) && cause.defect.message !== undefined && cause.defect.message === "Stream Timeout" ? Option_dist_effectOption.some(that) : Option_dist_effectOption.none()));
|
|
2705
|
-
});
|
|
2706
|
-
|
|
2707
|
-
/** @internal */
|
|
2708
|
-
const toHub = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Hub_dist_effectHub.bounded(capacity), hub => Hub_dist_effectHub.shutdown(hub)), Effect_dist_effectEffect.tap(hub => Function_dist_effectFunction.pipe(self, runIntoHubScoped(hub), Effect_dist_effectEffect.forkScoped))));
|
|
2709
|
-
|
|
2710
|
-
/** @internal */
|
|
2711
|
-
const toPull = self => Effect_dist_effectEffect.map(sink.toPull(toChannel(self)), pull => Function_dist_effectFunction.pipe(pull, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some), Effect_dist_effectEffect.flatMap(Either_dist_effectEither.match({
|
|
2712
|
-
onLeft: () => Effect_dist_effectEffect.fail(Option_dist_effectOption.none()),
|
|
2713
|
-
onRight: Effect_dist_effectEffect.succeed
|
|
2714
|
-
}))));
|
|
2715
|
-
|
|
2716
|
-
/** @internal */
|
|
2717
|
-
const toQueue = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, options) => Effect_dist_effectEffect.tap(Effect_dist_effectEffect.acquireRelease(options?.strategy === "unbounded" ? Queue_dist_effectQueue.unbounded() : options?.strategy === "dropping" ? Queue_dist_effectQueue.dropping(options.capacity ?? 2) : options?.strategy === "sliding" ? Queue_dist_effectQueue.sliding(options.capacity ?? 2) : Queue_dist_effectQueue.bounded(options?.capacity ?? 2), queue => Queue_dist_effectQueue.shutdown(queue)), queue => Effect_dist_effectEffect.forkScoped(runIntoQueueScoped(self, queue))));
|
|
2718
|
-
|
|
2719
|
-
/** @internal */
|
|
2720
|
-
const toQueueOfElements = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, options) => Effect_dist_effectEffect.tap(Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.bounded(options?.capacity ?? 2), queue => Queue_dist_effectQueue.shutdown(queue)), queue => Effect_dist_effectEffect.forkScoped(runIntoQueueElementsScoped(self, queue))));
|
|
2721
|
-
|
|
2722
|
-
/** @internal */
|
|
2723
|
-
const toReadableStream = source => {
|
|
2724
|
-
let pull;
|
|
2725
|
-
let scope;
|
|
2726
|
-
return new ReadableStream({
|
|
2727
|
-
start(controller) {
|
|
2728
|
-
scope = Effect_dist_effectEffect.runSync(Scope_dist_effectScope.make());
|
|
2729
|
-
pull = Function_dist_effectFunction.pipe(toPull(source), Scope_dist_effectScope.use(scope), Effect_dist_effectEffect.runSync, Effect_dist_effectEffect.tap(chunk => Effect_dist_effectEffect.sync(() => {
|
|
2730
|
-
Chunk_dist_effectChunk.map(chunk, a => {
|
|
2731
|
-
controller.enqueue(a);
|
|
2732
|
-
});
|
|
2733
|
-
})), Effect_dist_effectEffect.tapErrorCause(() => Scope_dist_effectScope.close(scope, Exit_dist_effectExit.unit)), Effect_dist_effectEffect.catchTags({
|
|
2734
|
-
"None": () => Effect_dist_effectEffect.sync(() => {
|
|
2735
|
-
controller.close();
|
|
2736
|
-
}),
|
|
2737
|
-
"Some": error => Effect_dist_effectEffect.sync(() => {
|
|
2738
|
-
controller.error(error.value);
|
|
2739
|
-
})
|
|
2740
|
-
}), Effect_dist_effectEffect.asUnit);
|
|
2741
|
-
},
|
|
2742
|
-
pull() {
|
|
2743
|
-
return Effect_dist_effectEffect.runPromise(pull);
|
|
2744
|
-
},
|
|
2745
|
-
cancel() {
|
|
2746
|
-
return Effect_dist_effectEffect.runPromise(Scope_dist_effectScope.close(scope, Exit_dist_effectExit.unit));
|
|
2747
|
-
}
|
|
2748
|
-
});
|
|
2749
|
-
};
|
|
2750
|
-
|
|
2751
|
-
/** @internal */
|
|
2752
|
-
const transduce = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => {
|
|
2753
|
-
const newChannel = sink.suspend(() => {
|
|
2754
|
-
const leftovers = {
|
|
2755
|
-
ref: Chunk_dist_effectChunk.empty()
|
|
2756
|
-
};
|
|
2757
|
-
const upstreamDone = {
|
|
2758
|
-
ref: false
|
|
2759
|
-
};
|
|
2760
|
-
const buffer = sink.suspend(() => {
|
|
2761
|
-
const leftover = leftovers.ref;
|
|
2762
|
-
if (Chunk_dist_effectChunk.isEmpty(leftover)) {
|
|
2763
|
-
return sink.readWith({
|
|
2764
|
-
onInput: input => Function_dist_effectFunction.pipe(sink.write(input), sink.flatMap(() => buffer)),
|
|
2765
|
-
onFailure: sink.fail,
|
|
2766
|
-
onDone: sink.succeedNow
|
|
2767
|
-
});
|
|
2768
|
-
}
|
|
2769
|
-
leftovers.ref = Chunk_dist_effectChunk.empty();
|
|
2770
|
-
return Function_dist_effectFunction.pipe(sink.writeChunk(leftover), sink.flatMap(() => buffer));
|
|
2771
|
-
});
|
|
2772
|
-
const concatAndGet = chunk => {
|
|
2773
|
-
const leftover = leftovers.ref;
|
|
2774
|
-
const concatenated = Chunk_dist_effectChunk.appendAll(leftover, Chunk_dist_effectChunk.filter(chunk, chunk => chunk.length !== 0));
|
|
2775
|
-
leftovers.ref = concatenated;
|
|
2776
|
-
return concatenated;
|
|
2777
|
-
};
|
|
2778
|
-
const upstreamMarker = sink.readWith({
|
|
2779
|
-
onInput: input => sink.flatMap(sink.write(input), () => upstreamMarker),
|
|
2780
|
-
onFailure: sink.fail,
|
|
2781
|
-
onDone: done => sink.zipRight(sink.sync(() => {
|
|
2782
|
-
upstreamDone.ref = true;
|
|
2783
|
-
}), sink.succeedNow(done))
|
|
2784
|
-
});
|
|
2785
|
-
const transducer = Function_dist_effectFunction.pipe(sink$1, sink.toChannel, sink.collectElements, sink.flatMap(([leftover, z]) => Function_dist_effectFunction.pipe(sink.succeed([upstreamDone.ref, concatAndGet(leftover)]), sink.flatMap(([done, newLeftovers]) => {
|
|
2786
|
-
const nextChannel = done && Chunk_dist_effectChunk.isEmpty(newLeftovers) ? sink.unit : transducer;
|
|
2787
|
-
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(z)), sink.flatMap(() => nextChannel));
|
|
2788
|
-
}))));
|
|
2789
|
-
return Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(upstreamMarker), sink.pipeTo(buffer), sink.pipeToOrFail(transducer));
|
|
2790
|
-
});
|
|
2791
|
-
return new StreamImpl(newChannel);
|
|
2792
|
-
});
|
|
2793
|
-
|
|
2794
|
-
/** @internal */
|
|
2795
|
-
const unfold = (s, f) => unfoldChunk(s, s => Function_dist_effectFunction.pipe(f(s), Option_dist_effectOption.map(([a, s]) => [Chunk_dist_effectChunk.of(a), s])));
|
|
2796
|
-
|
|
2797
|
-
/** @internal */
|
|
2798
|
-
const unfoldChunk = (s, f) => {
|
|
2799
|
-
const loop = s => Option_dist_effectOption.match(f(s), {
|
|
2800
|
-
onNone: () => sink.unit,
|
|
2801
|
-
onSome: ([chunk, s]) => sink.flatMap(sink.write(chunk), () => loop(s))
|
|
2802
|
-
});
|
|
2803
|
-
return new StreamImpl(sink.suspend(() => loop(s)));
|
|
2804
|
-
};
|
|
2805
|
-
|
|
2806
|
-
/** @internal */
|
|
2807
|
-
const unfoldChunkEffect = (s, f) => suspend(() => {
|
|
2808
|
-
const loop = s => sink.unwrap(Effect_dist_effectEffect.map(f(s), Option_dist_effectOption.match({
|
|
2809
|
-
onNone: () => sink.unit,
|
|
2810
|
-
onSome: ([chunk, s]) => sink.flatMap(sink.write(chunk), () => loop(s))
|
|
2811
|
-
})));
|
|
2812
|
-
return new StreamImpl(loop(s));
|
|
2813
|
-
});
|
|
2814
|
-
|
|
2815
|
-
/** @internal */
|
|
2816
|
-
const unfoldEffect = (s, f) => unfoldChunkEffect(s, s => Function_dist_effectFunction.pipe(f(s), Effect_dist_effectEffect.map(Option_dist_effectOption.map(([a, s]) => [Chunk_dist_effectChunk.of(a), s]))));
|
|
2817
|
-
|
|
2818
|
-
/** @internal */
|
|
2819
|
-
const unit = /*#__PURE__*/succeed(void 0);
|
|
2820
|
-
|
|
2821
|
-
/** @internal */
|
|
2822
|
-
const unwrap = effect => flatten(fromEffect(effect));
|
|
2823
|
-
|
|
2824
|
-
/** @internal */
|
|
2825
|
-
const unwrapScoped = effect => flatten(scoped(effect));
|
|
2826
|
-
|
|
2827
|
-
/** @internal */
|
|
2828
|
-
const updateService = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, f) => Function_dist_effectFunction.pipe(self, mapInputContext(context => Function_dist_effectFunction.pipe(context, Context_dist_effectContext.add(tag, f(Function_dist_effectFunction.pipe(context, Context_dist_effectContext.unsafeGet(tag))))))));
|
|
2829
|
-
|
|
2830
|
-
/** @internal */
|
|
2831
|
-
const when = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => Function_dist_effectFunction.pipe(self, whenEffect(Effect_dist_effectEffect.sync(predicate))));
|
|
2832
|
-
|
|
2833
|
-
/** @internal */
|
|
2834
|
-
const whenCase = (evaluate, pf) => whenCaseEffect(pf)(Effect_dist_effectEffect.sync(evaluate));
|
|
2835
|
-
|
|
2836
|
-
/** @internal */
|
|
2837
|
-
const whenCaseEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => Function_dist_effectFunction.pipe(fromEffect(self), flatMap(a => Function_dist_effectFunction.pipe(pf(a), Option_dist_effectOption.getOrElse(() => empty)))));
|
|
2838
|
-
|
|
2839
|
-
/** @internal */
|
|
2840
|
-
const whenEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, effect) => Function_dist_effectFunction.pipe(fromEffect(effect), flatMap(bool => bool ? self : empty)));
|
|
2841
|
-
|
|
2842
|
-
/** @internal */
|
|
2843
|
-
const withSpan = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, name, options) => unwrapScoped(Effect_dist_effectEffect.as(Effect_dist_effectEffect.withSpanScoped(name, options), self)));
|
|
2844
|
-
|
|
2845
|
-
/** @internal */
|
|
2846
|
-
const zip = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipWith(that, (a, a2) => [a, a2])));
|
|
2847
|
-
|
|
2848
|
-
/** @internal */
|
|
2849
|
-
const zipFlatten = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipWith(that, (a, a2) => [...a, a2])));
|
|
2850
|
-
|
|
2851
|
-
/** @internal */
|
|
2852
|
-
const zipAll = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => zipAllWith(self, {
|
|
2853
|
-
other: options.other,
|
|
2854
|
-
onSelf: a => [a, options.defaultOther],
|
|
2855
|
-
onOther: a2 => [options.defaultSelf, a2],
|
|
2856
|
-
onBoth: (a, a2) => [a, a2]
|
|
2857
|
-
}));
|
|
2858
|
-
|
|
2859
|
-
/** @internal */
|
|
2860
|
-
const zipAllLeft = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, other, defaultSelf) => zipAllWith(self, {
|
|
2861
|
-
other,
|
|
2862
|
-
onSelf: Function_dist_effectFunction.identity,
|
|
2863
|
-
onOther: () => defaultSelf,
|
|
2864
|
-
onBoth: a => a
|
|
2865
|
-
}));
|
|
2866
|
-
|
|
2867
|
-
/** @internal */
|
|
2868
|
-
const zipAllRight = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, other, defaultRight) => zipAllWith(self, {
|
|
2869
|
-
other,
|
|
2870
|
-
onSelf: () => defaultRight,
|
|
2871
|
-
onOther: Function_dist_effectFunction.identity,
|
|
2872
|
-
onBoth: (_, a2) => a2
|
|
2873
|
-
}));
|
|
2874
|
-
|
|
2875
|
-
/** @internal */
|
|
2876
|
-
const zipAllSortedByKey = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => zipAllSortedByKeyWith(self, {
|
|
2877
|
-
other: options.other,
|
|
2878
|
-
onSelf: a => [a, options.defaultOther],
|
|
2879
|
-
onOther: a2 => [options.defaultSelf, a2],
|
|
2880
|
-
onBoth: (a, a2) => [a, a2],
|
|
2881
|
-
order: options.order
|
|
2882
|
-
}));
|
|
2883
|
-
|
|
2884
|
-
/** @internal */
|
|
2885
|
-
const zipAllSortedByKeyLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => zipAllSortedByKeyWith(self, {
|
|
2886
|
-
other: options.other,
|
|
2887
|
-
onSelf: Function_dist_effectFunction.identity,
|
|
2888
|
-
onOther: () => options.defaultSelf,
|
|
2889
|
-
onBoth: a => a,
|
|
2890
|
-
order: options.order
|
|
2891
|
-
}));
|
|
2892
|
-
|
|
2893
|
-
/** @internal */
|
|
2894
|
-
const zipAllSortedByKeyRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => zipAllSortedByKeyWith(self, {
|
|
2895
|
-
other: options.other,
|
|
2896
|
-
onSelf: () => options.defaultOther,
|
|
2897
|
-
onOther: Function_dist_effectFunction.identity,
|
|
2898
|
-
onBoth: (_, a2) => a2,
|
|
2899
|
-
order: options.order
|
|
2900
|
-
}));
|
|
2901
|
-
|
|
2902
|
-
/** @internal */
|
|
2903
|
-
const zipAllSortedByKeyWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
2904
|
-
const pull = (state, pullLeft, pullRight) => {
|
|
2905
|
-
switch (state._tag) {
|
|
2906
|
-
case OP_DRAIN_LEFT:
|
|
2907
|
-
{
|
|
2908
|
-
return Function_dist_effectFunction.pipe(pullLeft, Effect_dist_effectEffect.match({
|
|
2909
|
-
onFailure: Exit_dist_effectExit.fail,
|
|
2910
|
-
onSuccess: leftChunk => Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(leftChunk, ([k, a]) => [k, options.onSelf(a)]), DrainLeft])
|
|
2911
|
-
}));
|
|
2912
|
-
}
|
|
2913
|
-
case OP_DRAIN_RIGHT:
|
|
2914
|
-
{
|
|
2915
|
-
return Function_dist_effectFunction.pipe(pullRight, Effect_dist_effectEffect.match({
|
|
2916
|
-
onFailure: Exit_dist_effectExit.fail,
|
|
2917
|
-
onSuccess: rightChunk => Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(rightChunk, ([k, a2]) => [k, options.onOther(a2)]), DrainRight])
|
|
2918
|
-
}));
|
|
2919
|
-
}
|
|
2920
|
-
case OP_PULL_BOTH$1:
|
|
2921
|
-
{
|
|
2922
|
-
return Function_dist_effectFunction.pipe(unsome(pullLeft), Effect_dist_effectEffect.zip(unsome(pullRight), {
|
|
2923
|
-
concurrent: true
|
|
2924
|
-
}), Effect_dist_effectEffect.matchEffect({
|
|
2925
|
-
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error))),
|
|
2926
|
-
onSuccess: ([leftOption, rightOption]) => {
|
|
2927
|
-
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
2928
|
-
if (Chunk_dist_effectChunk.isEmpty(leftOption.value) && Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
2929
|
-
return pull(PullBoth$1, pullLeft, pullRight);
|
|
2930
|
-
}
|
|
2931
|
-
if (Chunk_dist_effectChunk.isEmpty(leftOption.value)) {
|
|
2932
|
-
return pull(PullLeft$1(rightOption.value), pullLeft, pullRight);
|
|
2933
|
-
}
|
|
2934
|
-
if (Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
2935
|
-
return pull(PullRight$1(leftOption.value), pullLeft, pullRight);
|
|
2936
|
-
}
|
|
2937
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(merge(leftOption.value, rightOption.value)));
|
|
2938
|
-
}
|
|
2939
|
-
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isNone(rightOption)) {
|
|
2940
|
-
if (Chunk_dist_effectChunk.isEmpty(leftOption.value)) {
|
|
2941
|
-
return pull(DrainLeft, pullLeft, pullRight);
|
|
2942
|
-
}
|
|
2943
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Function_dist_effectFunction.pipe(leftOption.value, Chunk_dist_effectChunk.map(([k, a]) => [k, options.onSelf(a)])), DrainLeft]));
|
|
2944
|
-
}
|
|
2945
|
-
if (Option_dist_effectOption.isNone(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
2946
|
-
if (Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
2947
|
-
return pull(DrainRight, pullLeft, pullRight);
|
|
2948
|
-
}
|
|
2949
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Function_dist_effectFunction.pipe(rightOption.value, Chunk_dist_effectChunk.map(([k, a2]) => [k, options.onOther(a2)])), DrainRight]));
|
|
2950
|
-
}
|
|
2951
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.none()));
|
|
2952
|
-
}
|
|
2953
|
-
}));
|
|
2954
|
-
}
|
|
2955
|
-
case OP_PULL_LEFT$1:
|
|
2956
|
-
{
|
|
2957
|
-
return Effect_dist_effectEffect.matchEffect(pullLeft, {
|
|
2958
|
-
onFailure: Option_dist_effectOption.match({
|
|
2959
|
-
onNone: () => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Function_dist_effectFunction.pipe(state.rightChunk, Chunk_dist_effectChunk.map(([k, a2]) => [k, options.onOther(a2)])), DrainRight])),
|
|
2960
|
-
onSome: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error)))
|
|
2961
|
-
}),
|
|
2962
|
-
onSuccess: leftChunk => Chunk_dist_effectChunk.isEmpty(leftChunk) ? pull(PullLeft$1(state.rightChunk), pullLeft, pullRight) : Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(merge(leftChunk, state.rightChunk)))
|
|
2963
|
-
});
|
|
2964
|
-
}
|
|
2965
|
-
case OP_PULL_RIGHT$1:
|
|
2966
|
-
{
|
|
2967
|
-
return Effect_dist_effectEffect.matchEffect(pullRight, {
|
|
2968
|
-
onFailure: Option_dist_effectOption.match({
|
|
2969
|
-
onNone: () => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(state.leftChunk, ([k, a]) => [k, options.onSelf(a)]), DrainLeft])),
|
|
2970
|
-
onSome: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error)))
|
|
2971
|
-
}),
|
|
2972
|
-
onSuccess: rightChunk => Chunk_dist_effectChunk.isEmpty(rightChunk) ? pull(PullRight$1(state.leftChunk), pullLeft, pullRight) : Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(merge(state.leftChunk, rightChunk)))
|
|
2973
|
-
});
|
|
2974
|
-
}
|
|
2975
|
-
}
|
|
2976
|
-
};
|
|
2977
|
-
const merge = (leftChunk, rightChunk) => {
|
|
2978
|
-
const hasNext = (chunk, index) => index < chunk.length - 1;
|
|
2979
|
-
const builder = [];
|
|
2980
|
-
let state = undefined;
|
|
2981
|
-
let leftIndex = 0;
|
|
2982
|
-
let rightIndex = 0;
|
|
2983
|
-
let leftTuple = Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.unsafeGet(leftIndex));
|
|
2984
|
-
let rightTuple = Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.unsafeGet(rightIndex));
|
|
2985
|
-
let k1 = leftTuple[0];
|
|
2986
|
-
let a = leftTuple[1];
|
|
2987
|
-
let k2 = rightTuple[0];
|
|
2988
|
-
let a2 = rightTuple[1];
|
|
2989
|
-
let loop = true;
|
|
2990
|
-
while (loop) {
|
|
2991
|
-
const compare = options.order(k1, k2);
|
|
2992
|
-
if (compare === 0) {
|
|
2993
|
-
builder.push([k1, options.onBoth(a, a2)]);
|
|
2994
|
-
if (hasNext(leftChunk, leftIndex) && hasNext(rightChunk, rightIndex)) {
|
|
2995
|
-
leftIndex = leftIndex + 1;
|
|
2996
|
-
rightIndex = rightIndex + 1;
|
|
2997
|
-
leftTuple = Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.unsafeGet(leftIndex));
|
|
2998
|
-
rightTuple = Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.unsafeGet(rightIndex));
|
|
2999
|
-
k1 = leftTuple[0];
|
|
3000
|
-
a = leftTuple[1];
|
|
3001
|
-
k2 = rightTuple[0];
|
|
3002
|
-
a2 = rightTuple[1];
|
|
3003
|
-
} else if (hasNext(leftChunk, leftIndex)) {
|
|
3004
|
-
state = PullRight$1(Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.drop(leftIndex + 1)));
|
|
3005
|
-
loop = false;
|
|
3006
|
-
} else if (hasNext(rightChunk, rightIndex)) {
|
|
3007
|
-
state = PullLeft$1(Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.drop(rightIndex + 1)));
|
|
3008
|
-
loop = false;
|
|
3009
|
-
} else {
|
|
3010
|
-
state = PullBoth$1;
|
|
3011
|
-
loop = false;
|
|
3012
|
-
}
|
|
3013
|
-
} else if (compare < 0) {
|
|
3014
|
-
builder.push([k1, options.onSelf(a)]);
|
|
3015
|
-
if (hasNext(leftChunk, leftIndex)) {
|
|
3016
|
-
leftIndex = leftIndex + 1;
|
|
3017
|
-
leftTuple = Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.unsafeGet(leftIndex));
|
|
3018
|
-
k1 = leftTuple[0];
|
|
3019
|
-
a = leftTuple[1];
|
|
3020
|
-
} else {
|
|
3021
|
-
const rightBuilder = [];
|
|
3022
|
-
rightBuilder.push(rightTuple);
|
|
3023
|
-
while (hasNext(rightChunk, rightIndex)) {
|
|
3024
|
-
rightIndex = rightIndex + 1;
|
|
3025
|
-
rightTuple = Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.unsafeGet(rightIndex));
|
|
3026
|
-
rightBuilder.push(rightTuple);
|
|
3027
|
-
}
|
|
3028
|
-
state = PullLeft$1(Chunk_dist_effectChunk.unsafeFromArray(rightBuilder));
|
|
3029
|
-
loop = false;
|
|
3030
|
-
}
|
|
3031
|
-
} else {
|
|
3032
|
-
builder.push([k2, options.onOther(a2)]);
|
|
3033
|
-
if (hasNext(rightChunk, rightIndex)) {
|
|
3034
|
-
rightIndex = rightIndex + 1;
|
|
3035
|
-
rightTuple = Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.unsafeGet(rightIndex));
|
|
3036
|
-
k2 = rightTuple[0];
|
|
3037
|
-
a2 = rightTuple[1];
|
|
3038
|
-
} else {
|
|
3039
|
-
const leftBuilder = [];
|
|
3040
|
-
leftBuilder.push(leftTuple);
|
|
3041
|
-
while (hasNext(leftChunk, leftIndex)) {
|
|
3042
|
-
leftIndex = leftIndex + 1;
|
|
3043
|
-
leftTuple = Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.unsafeGet(leftIndex));
|
|
3044
|
-
leftBuilder.push(leftTuple);
|
|
3045
|
-
}
|
|
3046
|
-
state = PullRight$1(Chunk_dist_effectChunk.unsafeFromArray(leftBuilder));
|
|
3047
|
-
loop = false;
|
|
3048
|
-
}
|
|
3049
|
-
}
|
|
3050
|
-
}
|
|
3051
|
-
return [Chunk_dist_effectChunk.unsafeFromArray(builder), state];
|
|
3052
|
-
};
|
|
3053
|
-
return combineChunks(self, options.other, PullBoth$1, pull);
|
|
3054
|
-
});
|
|
3055
|
-
|
|
3056
|
-
/** @internal */
|
|
3057
|
-
const zipAllWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
3058
|
-
const pull = (state, pullLeft, pullRight) => {
|
|
3059
|
-
switch (state._tag) {
|
|
3060
|
-
case OP_DRAIN_LEFT:
|
|
3061
|
-
{
|
|
3062
|
-
return Effect_dist_effectEffect.matchEffect(pullLeft, {
|
|
3063
|
-
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(error)),
|
|
3064
|
-
onSuccess: leftChunk => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(leftChunk, options.onSelf), DrainLeft]))
|
|
3065
|
-
});
|
|
3066
|
-
}
|
|
3067
|
-
case OP_DRAIN_RIGHT:
|
|
3068
|
-
{
|
|
3069
|
-
return Effect_dist_effectEffect.matchEffect(pullRight, {
|
|
3070
|
-
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(error)),
|
|
3071
|
-
onSuccess: rightChunk => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(rightChunk, options.onOther), DrainRight]))
|
|
3072
|
-
});
|
|
3073
|
-
}
|
|
3074
|
-
case OP_PULL_BOTH$1:
|
|
3075
|
-
{
|
|
3076
|
-
return Function_dist_effectFunction.pipe(unsome(pullLeft), Effect_dist_effectEffect.zip(unsome(pullRight), {
|
|
3077
|
-
concurrent: true
|
|
3078
|
-
}), Effect_dist_effectEffect.matchEffect({
|
|
3079
|
-
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error))),
|
|
3080
|
-
onSuccess: ([leftOption, rightOption]) => {
|
|
3081
|
-
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
3082
|
-
if (Chunk_dist_effectChunk.isEmpty(leftOption.value) && Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
3083
|
-
return pull(PullBoth$1, pullLeft, pullRight);
|
|
3084
|
-
}
|
|
3085
|
-
if (Chunk_dist_effectChunk.isEmpty(leftOption.value)) {
|
|
3086
|
-
return pull(PullLeft$1(rightOption.value), pullLeft, pullRight);
|
|
3087
|
-
}
|
|
3088
|
-
if (Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
3089
|
-
return pull(PullRight$1(leftOption.value), pullLeft, pullRight);
|
|
3090
|
-
}
|
|
3091
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(leftOption.value, rightOption.value, options.onBoth)));
|
|
3092
|
-
}
|
|
3093
|
-
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isNone(rightOption)) {
|
|
3094
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(leftOption.value, options.onSelf), DrainLeft]));
|
|
3095
|
-
}
|
|
3096
|
-
if (Option_dist_effectOption.isNone(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
3097
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(rightOption.value, options.onOther), DrainRight]));
|
|
3098
|
-
}
|
|
3099
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.none()));
|
|
3100
|
-
}
|
|
3101
|
-
}));
|
|
3102
|
-
}
|
|
3103
|
-
case OP_PULL_LEFT$1:
|
|
3104
|
-
{
|
|
3105
|
-
return Effect_dist_effectEffect.matchEffect(pullLeft, {
|
|
3106
|
-
onFailure: Option_dist_effectOption.match({
|
|
3107
|
-
onNone: () => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(state.rightChunk, options.onOther), DrainRight])),
|
|
3108
|
-
onSome: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error)))
|
|
3109
|
-
}),
|
|
3110
|
-
onSuccess: leftChunk => {
|
|
3111
|
-
if (Chunk_dist_effectChunk.isEmpty(leftChunk)) {
|
|
3112
|
-
return pull(PullLeft$1(state.rightChunk), pullLeft, pullRight);
|
|
3113
|
-
}
|
|
3114
|
-
if (Chunk_dist_effectChunk.isEmpty(state.rightChunk)) {
|
|
3115
|
-
return pull(PullRight$1(leftChunk), pullLeft, pullRight);
|
|
3116
|
-
}
|
|
3117
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(leftChunk, state.rightChunk, options.onBoth)));
|
|
3118
|
-
}
|
|
3119
|
-
});
|
|
3120
|
-
}
|
|
3121
|
-
case OP_PULL_RIGHT$1:
|
|
3122
|
-
{
|
|
3123
|
-
return Effect_dist_effectEffect.matchEffect(pullRight, {
|
|
3124
|
-
onFailure: Option_dist_effectOption.match({
|
|
3125
|
-
onNone: () => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(state.leftChunk, options.onSelf), DrainLeft])),
|
|
3126
|
-
onSome: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error)))
|
|
3127
|
-
}),
|
|
3128
|
-
onSuccess: rightChunk => {
|
|
3129
|
-
if (Chunk_dist_effectChunk.isEmpty(rightChunk)) {
|
|
3130
|
-
return pull(PullRight$1(state.leftChunk), pullLeft, pullRight);
|
|
3131
|
-
}
|
|
3132
|
-
if (Chunk_dist_effectChunk.isEmpty(state.leftChunk)) {
|
|
3133
|
-
return pull(PullLeft$1(rightChunk), pullLeft, pullRight);
|
|
3134
|
-
}
|
|
3135
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(state.leftChunk, rightChunk, options.onBoth)));
|
|
3136
|
-
}
|
|
3137
|
-
});
|
|
3138
|
-
}
|
|
3139
|
-
}
|
|
3140
|
-
};
|
|
3141
|
-
const zip = (leftChunk, rightChunk, f) => {
|
|
3142
|
-
const [output, either] = zipChunks(leftChunk, rightChunk, f);
|
|
3143
|
-
switch (either._tag) {
|
|
3144
|
-
case "Left":
|
|
3145
|
-
{
|
|
3146
|
-
if (Chunk_dist_effectChunk.isEmpty(either.left)) {
|
|
3147
|
-
return [output, PullBoth$1];
|
|
3148
|
-
}
|
|
3149
|
-
return [output, PullRight$1(either.left)];
|
|
3150
|
-
}
|
|
3151
|
-
case "Right":
|
|
3152
|
-
{
|
|
3153
|
-
if (Chunk_dist_effectChunk.isEmpty(either.right)) {
|
|
3154
|
-
return [output, PullBoth$1];
|
|
3155
|
-
}
|
|
3156
|
-
return [output, PullLeft$1(either.right)];
|
|
3157
|
-
}
|
|
3158
|
-
}
|
|
3159
|
-
};
|
|
3160
|
-
return combineChunks(self, options.other, PullBoth$1, pull);
|
|
3161
|
-
});
|
|
3162
|
-
|
|
3163
|
-
/** @internal */
|
|
3164
|
-
const zipLatest = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipLatestWith(that, (a, a2) => [a, a2])));
|
|
3165
|
-
|
|
3166
|
-
/** @internal */
|
|
3167
|
-
const zipLatestWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => {
|
|
3168
|
-
const pullNonEmpty = pull => Function_dist_effectFunction.pipe(pull, Effect_dist_effectEffect.flatMap(chunk => Chunk_dist_effectChunk.isEmpty(chunk) ? pullNonEmpty(pull) : Effect_dist_effectEffect.succeed(chunk)));
|
|
3169
|
-
return Function_dist_effectFunction.pipe(toPull(self), Effect_dist_effectEffect.map(pullNonEmpty), Effect_dist_effectEffect.zip(Function_dist_effectFunction.pipe(toPull(that), Effect_dist_effectEffect.map(pullNonEmpty))), Effect_dist_effectEffect.flatMap(([left, right]) => Function_dist_effectFunction.pipe(fromEffectOption(Effect_dist_effectEffect.raceWith(left, right, {
|
|
3170
|
-
onSelfDone: (leftDone, rightFiber) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.suspend(() => leftDone), Effect_dist_effectEffect.zipWith(Fiber_dist_effectFiber.join(rightFiber), (l, r) => [l, r, true])),
|
|
3171
|
-
onOtherDone: (rightDone, leftFiber) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.suspend(() => rightDone), Effect_dist_effectEffect.zipWith(Fiber_dist_effectFiber.join(leftFiber), (l, r) => [r, l, false]))
|
|
3172
|
-
})), flatMap(([l, r, leftFirst]) => Function_dist_effectFunction.pipe(fromEffect(Ref_dist_effectRef.make([Chunk_dist_effectChunk.unsafeLast(l), Chunk_dist_effectChunk.unsafeLast(r)])), flatMap(latest => Function_dist_effectFunction.pipe(fromChunk(leftFirst ? Function_dist_effectFunction.pipe(r, Chunk_dist_effectChunk.map(a2 => f(Chunk_dist_effectChunk.unsafeLast(l), a2))) : Function_dist_effectFunction.pipe(l, Chunk_dist_effectChunk.map(a => f(a, Chunk_dist_effectChunk.unsafeLast(r))))), concat(Function_dist_effectFunction.pipe(repeatEffectOption(left), mergeEither(repeatEffectOption(right)), mapEffectSequential(Either_dist_effectEither.match({
|
|
3173
|
-
onLeft: leftChunk => Function_dist_effectFunction.pipe(Ref_dist_effectRef.modify(latest, ([_, rightLatest]) => [Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.map(a => f(a, rightLatest))), [Chunk_dist_effectChunk.unsafeLast(leftChunk), rightLatest]])),
|
|
3174
|
-
onRight: rightChunk => Function_dist_effectFunction.pipe(Ref_dist_effectRef.modify(latest, ([leftLatest, _]) => [Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.map(a2 => f(leftLatest, a2))), [leftLatest, Chunk_dist_effectChunk.unsafeLast(rightChunk)]]))
|
|
3175
|
-
})), flatMap(fromChunk))))))), toPull)), fromPull);
|
|
3176
|
-
});
|
|
3177
|
-
|
|
3178
|
-
/** @internal */
|
|
3179
|
-
const zipLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipWithChunks(that, (left, right) => {
|
|
3180
|
-
if (left.length > right.length) {
|
|
3181
|
-
return [Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.take(right.length)), Either_dist_effectEither.left(Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.take(right.length)))];
|
|
3182
|
-
}
|
|
3183
|
-
return [left, Either_dist_effectEither.right(Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.drop(left.length)))];
|
|
3184
|
-
})));
|
|
3185
|
-
|
|
3186
|
-
/** @internal */
|
|
3187
|
-
const zipRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipWithChunks(that, (left, right) => {
|
|
3188
|
-
if (left.length > right.length) {
|
|
3189
|
-
return [right, Either_dist_effectEither.left(Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.take(right.length)))];
|
|
3190
|
-
}
|
|
3191
|
-
return [Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.take(left.length)), Either_dist_effectEither.right(Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.drop(left.length)))];
|
|
3192
|
-
})));
|
|
3193
|
-
|
|
3194
|
-
/** @internal */
|
|
3195
|
-
const zipWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => Function_dist_effectFunction.pipe(self, zipWithChunks(that, (leftChunk, rightChunk) => zipChunks(leftChunk, rightChunk, f))));
|
|
3196
|
-
|
|
3197
|
-
/** @internal */
|
|
3198
|
-
const zipWithChunks = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => {
|
|
3199
|
-
const pull = (state, pullLeft, pullRight) => {
|
|
3200
|
-
switch (state._tag) {
|
|
3201
|
-
case OP_PULL_BOTH:
|
|
3202
|
-
{
|
|
3203
|
-
return Function_dist_effectFunction.pipe(unsome(pullLeft), Effect_dist_effectEffect.zip(unsome(pullRight), {
|
|
3204
|
-
concurrent: true
|
|
3205
|
-
}), Effect_dist_effectEffect.matchEffect({
|
|
3206
|
-
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error))),
|
|
3207
|
-
onSuccess: ([leftOption, rightOption]) => {
|
|
3208
|
-
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
3209
|
-
if (Chunk_dist_effectChunk.isEmpty(leftOption.value) && Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
3210
|
-
return pull(PullBoth, pullLeft, pullRight);
|
|
3211
|
-
}
|
|
3212
|
-
if (Chunk_dist_effectChunk.isEmpty(leftOption.value)) {
|
|
3213
|
-
return pull(PullLeft(rightOption.value), pullLeft, pullRight);
|
|
3214
|
-
}
|
|
3215
|
-
if (Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
3216
|
-
return pull(PullRight(leftOption.value), pullLeft, pullRight);
|
|
3217
|
-
}
|
|
3218
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(leftOption.value, rightOption.value)));
|
|
3219
|
-
}
|
|
3220
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.none()));
|
|
3221
|
-
}
|
|
3222
|
-
}));
|
|
3223
|
-
}
|
|
3224
|
-
case OP_PULL_LEFT:
|
|
3225
|
-
{
|
|
3226
|
-
return Effect_dist_effectEffect.matchEffect(pullLeft, {
|
|
3227
|
-
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(error)),
|
|
3228
|
-
onSuccess: leftChunk => {
|
|
3229
|
-
if (Chunk_dist_effectChunk.isEmpty(leftChunk)) {
|
|
3230
|
-
return pull(PullLeft(state.rightChunk), pullLeft, pullRight);
|
|
3231
|
-
}
|
|
3232
|
-
if (Chunk_dist_effectChunk.isEmpty(state.rightChunk)) {
|
|
3233
|
-
return pull(PullRight(leftChunk), pullLeft, pullRight);
|
|
3234
|
-
}
|
|
3235
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(leftChunk, state.rightChunk)));
|
|
3236
|
-
}
|
|
3237
|
-
});
|
|
3238
|
-
}
|
|
3239
|
-
case OP_PULL_RIGHT:
|
|
3240
|
-
{
|
|
3241
|
-
return Effect_dist_effectEffect.matchEffect(pullRight, {
|
|
3242
|
-
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(error)),
|
|
3243
|
-
onSuccess: rightChunk => {
|
|
3244
|
-
if (Chunk_dist_effectChunk.isEmpty(rightChunk)) {
|
|
3245
|
-
return pull(PullRight(state.leftChunk), pullLeft, pullRight);
|
|
3246
|
-
}
|
|
3247
|
-
if (Chunk_dist_effectChunk.isEmpty(state.leftChunk)) {
|
|
3248
|
-
return pull(PullLeft(rightChunk), pullLeft, pullRight);
|
|
3249
|
-
}
|
|
3250
|
-
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(state.leftChunk, rightChunk)));
|
|
3251
|
-
}
|
|
3252
|
-
});
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
};
|
|
3256
|
-
const zip = (leftChunk, rightChunk) => {
|
|
3257
|
-
const [output, either] = f(leftChunk, rightChunk);
|
|
3258
|
-
switch (either._tag) {
|
|
3259
|
-
case "Left":
|
|
3260
|
-
{
|
|
3261
|
-
if (Chunk_dist_effectChunk.isEmpty(either.left)) {
|
|
3262
|
-
return [output, PullBoth];
|
|
3263
|
-
}
|
|
3264
|
-
return [output, PullRight(either.left)];
|
|
3265
|
-
}
|
|
3266
|
-
case "Right":
|
|
3267
|
-
{
|
|
3268
|
-
if (Chunk_dist_effectChunk.isEmpty(either.right)) {
|
|
3269
|
-
return [output, PullBoth];
|
|
3270
|
-
}
|
|
3271
|
-
return [output, PullLeft(either.right)];
|
|
3272
|
-
}
|
|
3273
|
-
}
|
|
3274
|
-
};
|
|
3275
|
-
return Function_dist_effectFunction.pipe(self, combineChunks(that, PullBoth, pull));
|
|
3276
|
-
});
|
|
3277
|
-
|
|
3278
|
-
/** @internal */
|
|
3279
|
-
const zipWithIndex = self => Function_dist_effectFunction.pipe(self, mapAccum(0, (index, a) => [index + 1, [a, index]]));
|
|
3280
|
-
|
|
3281
|
-
/** @internal */
|
|
3282
|
-
const zipWithNext = self => {
|
|
3283
|
-
const process = last => sink.readWithCause({
|
|
3284
|
-
onInput: input => {
|
|
3285
|
-
const [newLast, chunk] = Chunk_dist_effectChunk.mapAccum(input, last, (prev, curr) => [Option_dist_effectOption.some(curr), Function_dist_effectFunction.pipe(prev, Option_dist_effectOption.map(a => [a, curr]))]);
|
|
3286
|
-
const output = Chunk_dist_effectChunk.filterMap(chunk, option => Option_dist_effectOption.isSome(option) ? Option_dist_effectOption.some([option.value[0], Option_dist_effectOption.some(option.value[1])]) : Option_dist_effectOption.none());
|
|
3287
|
-
return sink.flatMap(sink.write(output), () => process(newLast));
|
|
3288
|
-
},
|
|
3289
|
-
onFailure: sink.failCause,
|
|
3290
|
-
onDone: () => Option_dist_effectOption.match(last, {
|
|
3291
|
-
onNone: () => sink.unit,
|
|
3292
|
-
onSome: value => sink.zipRight(sink.write(Chunk_dist_effectChunk.of([value, Option_dist_effectOption.none()])), sink.unit)
|
|
3293
|
-
})
|
|
3294
|
-
});
|
|
3295
|
-
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(process(Option_dist_effectOption.none()))));
|
|
3296
|
-
};
|
|
3297
|
-
|
|
3298
|
-
/** @internal */
|
|
3299
|
-
const zipWithPrevious = self => Function_dist_effectFunction.pipe(self, mapAccum(Option_dist_effectOption.none(), (prev, curr) => [Option_dist_effectOption.some(curr), [prev, curr]]));
|
|
3300
|
-
|
|
3301
|
-
/** @internal */
|
|
3302
|
-
const zipWithPreviousAndNext = self => Function_dist_effectFunction.pipe(zipWithNext(zipWithPrevious(self)), map(([[prev, curr], next]) => [prev, curr, Function_dist_effectFunction.pipe(next, Option_dist_effectOption.map(tuple => tuple[1]))]));
|
|
3303
|
-
|
|
3304
|
-
/** @internal */
|
|
3305
|
-
const zipChunks = (left, right, f) => {
|
|
3306
|
-
if (left.length > right.length) {
|
|
3307
|
-
return [Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.take(right.length), Chunk_dist_effectChunk.zipWith(right, f)), Either_dist_effectEither.left(Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.drop(right.length)))];
|
|
3308
|
-
}
|
|
3309
|
-
return [Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.zipWith(Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.take(left.length)), f)), Either_dist_effectEither.right(Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.drop(left.length)))];
|
|
3310
|
-
};
|
|
3311
|
-
|
|
3312
|
-
// Do notation
|
|
3313
|
-
|
|
3314
|
-
/** @internal */
|
|
3315
|
-
const Do = /*#__PURE__*/succeed({});
|
|
3316
|
-
|
|
3317
|
-
/** @internal */
|
|
3318
|
-
const bind = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof args[0] !== "string", (self, tag, f, options) => flatMap(self, k => map(f(k), a => ({
|
|
3319
|
-
...k,
|
|
3320
|
-
[tag]: a
|
|
3321
|
-
})), options));
|
|
3322
|
-
|
|
3323
|
-
/* @internal */
|
|
3324
|
-
const bindTo = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, tag) => map(self, a => ({
|
|
3325
|
-
[tag]: a
|
|
3326
|
-
})));
|
|
3327
|
-
|
|
3328
|
-
/* @internal */
|
|
3329
|
-
const let_ = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, f) => map(self, k => ({
|
|
3330
|
-
...k,
|
|
3331
|
-
[tag]: f(k)
|
|
3332
|
-
})));
|
|
3333
|
-
|
|
3334
|
-
// Circular with Channel
|
|
3335
|
-
|
|
3336
|
-
/** @internal */
|
|
3337
|
-
const channelToStream = self => {
|
|
3338
|
-
return new StreamImpl(self);
|
|
3339
|
-
};
|
|
3340
|
-
|
|
3341
|
-
// =============================================================================
|
|
3342
|
-
// encoding
|
|
3343
|
-
// =============================================================================
|
|
3344
|
-
|
|
3345
|
-
/** @internal */
|
|
3346
|
-
const decodeText = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, encoding = "utf-8") => suspend(() => {
|
|
3347
|
-
const decoder = new TextDecoder(encoding);
|
|
3348
|
-
return map(self, s => decoder.decode(s));
|
|
3349
|
-
}));
|
|
3350
|
-
|
|
3351
|
-
/** @internal */
|
|
3352
|
-
const encodeText = self => suspend(() => {
|
|
3353
|
-
const encoder = new TextEncoder();
|
|
3354
|
-
return map(self, s => encoder.encode(s));
|
|
3355
|
-
});
|
|
3356
|
-
|
|
3357
|
-
exports.DefaultChunkSize = DefaultChunkSize;
|
|
3358
|
-
exports.Do = Do;
|
|
3359
|
-
exports.StreamTypeId = StreamTypeId;
|
|
3360
|
-
exports._async = _async;
|
|
3361
|
-
exports.acquireRelease = acquireRelease;
|
|
3362
|
-
exports.aggregate = aggregate;
|
|
3363
|
-
exports.aggregateWithin = aggregateWithin;
|
|
3364
|
-
exports.aggregateWithinEither = aggregateWithinEither;
|
|
3365
|
-
exports.as = as;
|
|
3366
|
-
exports.asyncEffect = asyncEffect;
|
|
3367
|
-
exports.asyncInterrupt = asyncInterrupt;
|
|
3368
|
-
exports.asyncOption = asyncOption;
|
|
3369
|
-
exports.asyncScoped = asyncScoped;
|
|
3370
|
-
exports.bind = bind;
|
|
3371
|
-
exports.bindTo = bindTo;
|
|
3372
|
-
exports.branchAfter = branchAfter;
|
|
3373
|
-
exports.broadcast = broadcast;
|
|
3374
|
-
exports.broadcastDynamic = broadcastDynamic;
|
|
3375
|
-
exports.broadcastedQueues = broadcastedQueues;
|
|
3376
|
-
exports.broadcastedQueuesDynamic = broadcastedQueuesDynamic;
|
|
3377
|
-
exports.buffer = buffer;
|
|
3378
|
-
exports.bufferChunks = bufferChunks;
|
|
3379
|
-
exports.catchAll = catchAll;
|
|
3380
|
-
exports.catchAllCause = catchAllCause;
|
|
3381
|
-
exports.catchSome = catchSome;
|
|
3382
|
-
exports.catchSomeCause = catchSomeCause;
|
|
3383
|
-
exports.catchTag = catchTag;
|
|
3384
|
-
exports.catchTags = catchTags;
|
|
3385
|
-
exports.changes = changes;
|
|
3386
|
-
exports.changesWith = changesWith;
|
|
3387
|
-
exports.changesWithEffect = changesWithEffect;
|
|
3388
|
-
exports.channelToStream = channelToStream;
|
|
3389
|
-
exports.chunks = chunks;
|
|
3390
|
-
exports.chunksWith = chunksWith;
|
|
3391
|
-
exports.combine = combine;
|
|
3392
|
-
exports.combineChunks = combineChunks;
|
|
3393
|
-
exports.concat = concat;
|
|
3394
|
-
exports.concatAll = concatAll;
|
|
3395
|
-
exports.context = context;
|
|
3396
|
-
exports.contextWith = contextWith;
|
|
3397
|
-
exports.contextWithEffect = contextWithEffect;
|
|
3398
|
-
exports.contextWithStream = contextWithStream;
|
|
3399
|
-
exports.cross = cross;
|
|
3400
|
-
exports.crossLeft = crossLeft;
|
|
3401
|
-
exports.crossRight = crossRight;
|
|
3402
|
-
exports.crossWith = crossWith;
|
|
3403
|
-
exports.debounce = debounce;
|
|
3404
|
-
exports.decodeText = decodeText;
|
|
3405
|
-
exports.die = die;
|
|
3406
|
-
exports.dieMessage = dieMessage;
|
|
3407
|
-
exports.dieSync = dieSync;
|
|
3408
|
-
exports.distributedWith = distributedWith;
|
|
3409
|
-
exports.distributedWithDynamic = distributedWithDynamic;
|
|
3410
|
-
exports.distributedWithDynamicCallback = distributedWithDynamicCallback;
|
|
3411
|
-
exports.drain = drain;
|
|
3412
|
-
exports.drainFork = drainFork;
|
|
3413
|
-
exports.drop = drop;
|
|
3414
|
-
exports.dropRight = dropRight;
|
|
3415
|
-
exports.dropUntil = dropUntil;
|
|
3416
|
-
exports.dropUntilEffect = dropUntilEffect;
|
|
3417
|
-
exports.dropWhile = dropWhile;
|
|
3418
|
-
exports.dropWhileEffect = dropWhileEffect;
|
|
3419
|
-
exports.either = either;
|
|
3420
|
-
exports.empty = empty;
|
|
3421
|
-
exports.encodeText = encodeText;
|
|
3422
|
-
exports.ensuring = ensuring;
|
|
3423
|
-
exports.ensuringWith = ensuringWith;
|
|
3424
|
-
exports.execute = execute;
|
|
3425
|
-
exports.fail = fail;
|
|
3426
|
-
exports.failCause = failCause;
|
|
3427
|
-
exports.failCauseSync = failCauseSync;
|
|
3428
|
-
exports.failSync = failSync;
|
|
3429
|
-
exports.filter = filter;
|
|
3430
|
-
exports.filterEffect = filterEffect;
|
|
3431
|
-
exports.filterMap = filterMap;
|
|
3432
|
-
exports.filterMapEffect = filterMapEffect;
|
|
3433
|
-
exports.filterMapWhile = filterMapWhile;
|
|
3434
|
-
exports.filterMapWhileEffect = filterMapWhileEffect;
|
|
3435
|
-
exports.finalizer = finalizer;
|
|
3436
|
-
exports.find = find;
|
|
3437
|
-
exports.findEffect = findEffect;
|
|
3438
|
-
exports.flatMap = flatMap;
|
|
3439
|
-
exports.flatten = flatten;
|
|
3440
|
-
exports.flattenChunks = flattenChunks;
|
|
3441
|
-
exports.flattenEffect = flattenEffect;
|
|
3442
|
-
exports.flattenExitOption = flattenExitOption;
|
|
3443
|
-
exports.flattenIterables = flattenIterables;
|
|
3444
|
-
exports.flattenTake = flattenTake;
|
|
3445
|
-
exports.forever = forever;
|
|
3446
|
-
exports.fromAsyncIterable = fromAsyncIterable;
|
|
3447
|
-
exports.fromChannel = fromChannel;
|
|
3448
|
-
exports.fromChunk = fromChunk;
|
|
3449
|
-
exports.fromChunkHub = fromChunkHub;
|
|
3450
|
-
exports.fromChunkQueue = fromChunkQueue;
|
|
3451
|
-
exports.fromChunks = fromChunks;
|
|
3452
|
-
exports.fromEffect = fromEffect;
|
|
3453
|
-
exports.fromEffectOption = fromEffectOption;
|
|
3454
|
-
exports.fromHub = fromHub;
|
|
3455
|
-
exports.fromIterable = fromIterable;
|
|
3456
|
-
exports.fromIterableEffect = fromIterableEffect;
|
|
3457
|
-
exports.fromIteratorSucceed = fromIteratorSucceed;
|
|
3458
|
-
exports.fromPull = fromPull;
|
|
3459
|
-
exports.fromQueue = fromQueue;
|
|
3460
|
-
exports.fromReadableStream = fromReadableStream;
|
|
3461
|
-
exports.fromReadableStreamByob = fromReadableStreamByob;
|
|
3462
|
-
exports.fromSchedule = fromSchedule;
|
|
3463
|
-
exports.groupAdjacentBy = groupAdjacentBy;
|
|
3464
|
-
exports.grouped = grouped;
|
|
3465
|
-
exports.groupedWithin = groupedWithin;
|
|
3466
|
-
exports.haltAfter = haltAfter;
|
|
3467
|
-
exports.haltWhen = haltWhen;
|
|
3468
|
-
exports.haltWhenDeferred = haltWhenDeferred;
|
|
3469
|
-
exports.identityStream = identityStream;
|
|
3470
|
-
exports.interleave = interleave;
|
|
3471
|
-
exports.interleaveWith = interleaveWith;
|
|
3472
|
-
exports.interruptAfter = interruptAfter;
|
|
3473
|
-
exports.interruptWhen = interruptWhen;
|
|
3474
|
-
exports.interruptWhenDeferred = interruptWhenDeferred;
|
|
3475
|
-
exports.intersperse = intersperse;
|
|
3476
|
-
exports.intersperseAffixes = intersperseAffixes;
|
|
3477
|
-
exports.iterate = iterate;
|
|
3478
|
-
exports.let_ = let_;
|
|
3479
|
-
exports.make = make;
|
|
3480
|
-
exports.map = map;
|
|
3481
|
-
exports.mapAccum = mapAccum;
|
|
3482
|
-
exports.mapAccumEffect = mapAccumEffect;
|
|
3483
|
-
exports.mapBoth = mapBoth;
|
|
3484
|
-
exports.mapChunks = mapChunks;
|
|
3485
|
-
exports.mapChunksEffect = mapChunksEffect;
|
|
3486
|
-
exports.mapConcat = mapConcat;
|
|
3487
|
-
exports.mapConcatChunk = mapConcatChunk;
|
|
3488
|
-
exports.mapConcatChunkEffect = mapConcatChunkEffect;
|
|
3489
|
-
exports.mapConcatEffect = mapConcatEffect;
|
|
3490
|
-
exports.mapEffectPar = mapEffectPar;
|
|
3491
|
-
exports.mapEffectSequential = mapEffectSequential;
|
|
3492
|
-
exports.mapError = mapError;
|
|
3493
|
-
exports.mapErrorCause = mapErrorCause;
|
|
3494
|
-
exports.mapInputContext = mapInputContext;
|
|
3495
|
-
exports.matchConcurrency = matchConcurrency;
|
|
3496
|
-
exports.merge = merge;
|
|
3497
|
-
exports.mergeAll = mergeAll;
|
|
3498
|
-
exports.mergeEither = mergeEither;
|
|
3499
|
-
exports.mergeLeft = mergeLeft;
|
|
3500
|
-
exports.mergeRight = mergeRight;
|
|
3501
|
-
exports.mergeWith = mergeWith;
|
|
3502
|
-
exports.mkString = mkString;
|
|
3503
|
-
exports.never = never;
|
|
3504
|
-
exports.onDone = onDone;
|
|
3505
|
-
exports.onError = onError;
|
|
3506
|
-
exports.orDie = orDie;
|
|
3507
|
-
exports.orDieWith = orDieWith;
|
|
3508
|
-
exports.orElse = orElse;
|
|
3509
|
-
exports.orElseEither = orElseEither;
|
|
3510
|
-
exports.orElseFail = orElseFail;
|
|
3511
|
-
exports.orElseIfEmpty = orElseIfEmpty;
|
|
3512
|
-
exports.orElseIfEmptyChunk = orElseIfEmptyChunk;
|
|
3513
|
-
exports.orElseIfEmptyStream = orElseIfEmptyStream;
|
|
3514
|
-
exports.orElseSucceed = orElseSucceed;
|
|
3515
|
-
exports.paginate = paginate;
|
|
3516
|
-
exports.paginateChunk = paginateChunk;
|
|
3517
|
-
exports.paginateChunkEffect = paginateChunkEffect;
|
|
3518
|
-
exports.paginateEffect = paginateEffect;
|
|
3519
|
-
exports.partition = partition;
|
|
3520
|
-
exports.partitionEither = partitionEither;
|
|
3521
|
-
exports.peel = peel;
|
|
3522
|
-
exports.pipeThrough = pipeThrough;
|
|
3523
|
-
exports.pipeThroughChannel = pipeThroughChannel;
|
|
3524
|
-
exports.pipeThroughChannelOrFail = pipeThroughChannelOrFail;
|
|
3525
|
-
exports.prepend = prepend;
|
|
3526
|
-
exports.provideContext = provideContext;
|
|
3527
|
-
exports.provideLayer = provideLayer;
|
|
3528
|
-
exports.provideService = provideService;
|
|
3529
|
-
exports.provideServiceEffect = provideServiceEffect;
|
|
3530
|
-
exports.provideServiceStream = provideServiceStream;
|
|
3531
|
-
exports.provideSomeLayer = provideSomeLayer;
|
|
3532
|
-
exports.range = range;
|
|
3533
|
-
exports.rechunk = rechunk;
|
|
3534
|
-
exports.refineOrDie = refineOrDie;
|
|
3535
|
-
exports.refineOrDieWith = refineOrDieWith;
|
|
3536
|
-
exports.repeat = repeat;
|
|
3537
|
-
exports.repeatEffect = repeatEffect;
|
|
3538
|
-
exports.repeatEffectChunk = repeatEffectChunk;
|
|
3539
|
-
exports.repeatEffectChunkOption = repeatEffectChunkOption;
|
|
3540
|
-
exports.repeatEffectOption = repeatEffectOption;
|
|
3541
|
-
exports.repeatEffectWithSchedule = repeatEffectWithSchedule;
|
|
3542
|
-
exports.repeatEither = repeatEither;
|
|
3543
|
-
exports.repeatElements = repeatElements;
|
|
3544
|
-
exports.repeatElementsWith = repeatElementsWith;
|
|
3545
|
-
exports.repeatValue = repeatValue;
|
|
3546
|
-
exports.repeatWith = repeatWith;
|
|
3547
|
-
exports.retry = retry;
|
|
3548
|
-
exports.run = run;
|
|
3549
|
-
exports.runCollect = runCollect;
|
|
3550
|
-
exports.runCount = runCount;
|
|
3551
|
-
exports.runDrain = runDrain;
|
|
3552
|
-
exports.runFold = runFold;
|
|
3553
|
-
exports.runFoldEffect = runFoldEffect;
|
|
3554
|
-
exports.runFoldScoped = runFoldScoped;
|
|
3555
|
-
exports.runFoldScopedEffect = runFoldScopedEffect;
|
|
3556
|
-
exports.runFoldWhile = runFoldWhile;
|
|
3557
|
-
exports.runFoldWhileEffect = runFoldWhileEffect;
|
|
3558
|
-
exports.runFoldWhileScoped = runFoldWhileScoped;
|
|
3559
|
-
exports.runFoldWhileScopedEffect = runFoldWhileScopedEffect;
|
|
3560
|
-
exports.runForEach = runForEach;
|
|
3561
|
-
exports.runForEachChunk = runForEachChunk;
|
|
3562
|
-
exports.runForEachChunkScoped = runForEachChunkScoped;
|
|
3563
|
-
exports.runForEachScoped = runForEachScoped;
|
|
3564
|
-
exports.runForEachWhile = runForEachWhile;
|
|
3565
|
-
exports.runForEachWhileScoped = runForEachWhileScoped;
|
|
3566
|
-
exports.runHead = runHead;
|
|
3567
|
-
exports.runIntoHub = runIntoHub;
|
|
3568
|
-
exports.runIntoHubScoped = runIntoHubScoped;
|
|
3569
|
-
exports.runIntoQueue = runIntoQueue;
|
|
3570
|
-
exports.runIntoQueueElementsScoped = runIntoQueueElementsScoped;
|
|
3571
|
-
exports.runIntoQueueScoped = runIntoQueueScoped;
|
|
3572
|
-
exports.runLast = runLast;
|
|
3573
|
-
exports.runScoped = runScoped;
|
|
3574
|
-
exports.runSum = runSum;
|
|
3575
|
-
exports.scan = scan;
|
|
3576
|
-
exports.scanEffect = scanEffect;
|
|
3577
|
-
exports.scanReduce = scanReduce;
|
|
3578
|
-
exports.scanReduceEffect = scanReduceEffect;
|
|
3579
|
-
exports.schedule = schedule;
|
|
3580
|
-
exports.scheduleWith = scheduleWith;
|
|
3581
|
-
exports.scoped = scoped;
|
|
3582
|
-
exports.sliding = sliding;
|
|
3583
|
-
exports.slidingSize = slidingSize;
|
|
3584
|
-
exports.some = some;
|
|
3585
|
-
exports.someOrElse = someOrElse;
|
|
3586
|
-
exports.someOrFail = someOrFail;
|
|
3587
|
-
exports.split = split;
|
|
3588
|
-
exports.splitLines = splitLines;
|
|
3589
|
-
exports.splitOnChunk = splitOnChunk;
|
|
3590
|
-
exports.succeed = succeed;
|
|
3591
|
-
exports.suspend = suspend;
|
|
3592
|
-
exports.sync = sync;
|
|
3593
|
-
exports.take = take;
|
|
3594
|
-
exports.takeRight = takeRight;
|
|
3595
|
-
exports.takeUntil = takeUntil;
|
|
3596
|
-
exports.takeUntilEffect = takeUntilEffect;
|
|
3597
|
-
exports.takeWhile = takeWhile;
|
|
3598
|
-
exports.tap = tap;
|
|
3599
|
-
exports.tapBoth = tapBoth;
|
|
3600
|
-
exports.tapError = tapError;
|
|
3601
|
-
exports.tapErrorCause = tapErrorCause;
|
|
3602
|
-
exports.tapSink = tapSink;
|
|
3603
|
-
exports.throttle = throttle;
|
|
3604
|
-
exports.throttleEffect = throttleEffect;
|
|
3605
|
-
exports.tick = tick;
|
|
3606
|
-
exports.timeout = timeout;
|
|
3607
|
-
exports.timeoutFail = timeoutFail;
|
|
3608
|
-
exports.timeoutFailCause = timeoutFailCause;
|
|
3609
|
-
exports.timeoutTo = timeoutTo;
|
|
3610
|
-
exports.toChannel = toChannel;
|
|
3611
|
-
exports.toHub = toHub;
|
|
3612
|
-
exports.toPull = toPull;
|
|
3613
|
-
exports.toQueue = toQueue;
|
|
3614
|
-
exports.toQueueOfElements = toQueueOfElements;
|
|
3615
|
-
exports.toReadableStream = toReadableStream;
|
|
3616
|
-
exports.transduce = transduce;
|
|
3617
|
-
exports.unfold = unfold;
|
|
3618
|
-
exports.unfoldChunk = unfoldChunk;
|
|
3619
|
-
exports.unfoldChunkEffect = unfoldChunkEffect;
|
|
3620
|
-
exports.unfoldEffect = unfoldEffect;
|
|
3621
|
-
exports.unit = unit;
|
|
3622
|
-
exports.unwrap = unwrap;
|
|
3623
|
-
exports.unwrapScoped = unwrapScoped;
|
|
3624
|
-
exports.updateService = updateService;
|
|
3625
|
-
exports.when = when;
|
|
3626
|
-
exports.whenCase = whenCase;
|
|
3627
|
-
exports.whenCaseEffect = whenCaseEffect;
|
|
3628
|
-
exports.whenEffect = whenEffect;
|
|
3629
|
-
exports.withSpan = withSpan;
|
|
3630
|
-
exports.zip = zip;
|
|
3631
|
-
exports.zipAll = zipAll;
|
|
3632
|
-
exports.zipAllLeft = zipAllLeft;
|
|
3633
|
-
exports.zipAllRight = zipAllRight;
|
|
3634
|
-
exports.zipAllSortedByKey = zipAllSortedByKey;
|
|
3635
|
-
exports.zipAllSortedByKeyLeft = zipAllSortedByKeyLeft;
|
|
3636
|
-
exports.zipAllSortedByKeyRight = zipAllSortedByKeyRight;
|
|
3637
|
-
exports.zipAllSortedByKeyWith = zipAllSortedByKeyWith;
|
|
3638
|
-
exports.zipAllWith = zipAllWith;
|
|
3639
|
-
exports.zipFlatten = zipFlatten;
|
|
3640
|
-
exports.zipLatest = zipLatest;
|
|
3641
|
-
exports.zipLatestWith = zipLatestWith;
|
|
3642
|
-
exports.zipLeft = zipLeft;
|
|
3643
|
-
exports.zipRight = zipRight;
|
|
3644
|
-
exports.zipWith = zipWith;
|
|
3645
|
-
exports.zipWithChunks = zipWithChunks;
|
|
3646
|
-
exports.zipWithIndex = zipWithIndex;
|
|
3647
|
-
exports.zipWithNext = zipWithNext;
|
|
3648
|
-
exports.zipWithPrevious = zipWithPrevious;
|
|
3649
|
-
exports.zipWithPreviousAndNext = zipWithPreviousAndNext;
|