effect 2.0.0-next.52 → 2.0.0-next.53
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/BigDecimal/dist/effect-BigDecimal.cjs.dev.js +6 -6
- package/BigDecimal/dist/effect-BigDecimal.cjs.prod.js +6 -6
- package/BigDecimal/dist/effect-BigDecimal.esm.js +2 -1
- package/BigInt/dist/effect-BigInt.cjs.dev.js +4 -4
- package/BigInt/dist/effect-BigInt.cjs.prod.js +4 -4
- package/Brand/dist/effect-Brand.cjs.dev.js +5 -5
- package/Brand/dist/effect-Brand.cjs.prod.js +5 -5
- package/Cache/dist/effect-Cache.cjs.dev.js +31 -30
- package/Cache/dist/effect-Cache.cjs.prod.js +31 -30
- package/Cause/dist/effect-Cause.cjs.dev.js +10 -10
- package/Cause/dist/effect-Cause.cjs.prod.js +10 -10
- package/Channel/dist/effect-Channel.cjs.dev.js +49 -48
- package/Channel/dist/effect-Channel.cjs.prod.js +49 -48
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +2 -1
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +2 -1
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +2 -1
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +2 -1
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +2 -1
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +2 -1
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +2 -1
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +2 -1
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +38 -37
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +38 -37
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +2 -1
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +2 -1
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +2 -1
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +2 -1
- package/Chunk/dist/effect-Chunk.cjs.dev.js +6 -6
- package/Chunk/dist/effect-Chunk.cjs.prod.js +6 -6
- package/Chunk/dist/effect-Chunk.esm.js +3 -3
- package/Clock/dist/effect-Clock.cjs.dev.js +16 -16
- package/Clock/dist/effect-Clock.cjs.prod.js +16 -16
- package/Config/dist/effect-Config.cjs.dev.js +13 -13
- package/Config/dist/effect-Config.cjs.prod.js +13 -13
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +6 -6
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +6 -6
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +15 -15
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +15 -15
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +7 -7
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +7 -7
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +6 -6
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +6 -6
- package/Console/dist/effect-Console.cjs.dev.js +35 -34
- package/Console/dist/effect-Console.cjs.prod.js +35 -34
- package/Context/dist/effect-Context.cjs.dev.js +5 -5
- package/Context/dist/effect-Context.cjs.prod.js +5 -5
- package/Data/dist/effect-Data.cjs.dev.js +36 -36
- package/Data/dist/effect-Data.cjs.prod.js +36 -36
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +16 -16
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +16 -16
- package/Deferred/dist/effect-Deferred.cjs.dev.js +10 -10
- package/Deferred/dist/effect-Deferred.cjs.prod.js +10 -10
- package/Differ/dist/effect-Differ.cjs.dev.js +7 -7
- package/Differ/dist/effect-Differ.cjs.prod.js +7 -7
- package/Duration/dist/effect-Duration.cjs.dev.js +5 -5
- package/Duration/dist/effect-Duration.cjs.prod.js +5 -5
- package/Duration/dist/effect-Duration.esm.js +2 -2
- package/Effect/dist/effect-Effect.cjs.dev.js +37 -36
- package/Effect/dist/effect-Effect.cjs.prod.js +37 -36
- package/Effectable/dist/effect-Effectable.cjs.dev.js +3 -3
- package/Effectable/dist/effect-Effectable.cjs.prod.js +3 -3
- package/Either/dist/effect-Either.cjs.dev.js +4 -4
- package/Either/dist/effect-Either.cjs.prod.js +4 -4
- package/Encoding/dist/effect-Encoding.cjs.dev.js +6 -6
- package/Encoding/dist/effect-Encoding.cjs.prod.js +6 -6
- package/Equal/dist/effect-Equal.cjs.dev.js +3 -3
- package/Equal/dist/effect-Equal.cjs.prod.js +3 -3
- package/Equal/dist/effect-Equal.esm.js +2 -1
- package/Exit/dist/effect-Exit.cjs.dev.js +10 -10
- package/Exit/dist/effect-Exit.cjs.prod.js +10 -10
- package/Fiber/dist/effect-Fiber.cjs.dev.js +32 -31
- package/Fiber/dist/effect-Fiber.cjs.prod.js +32 -31
- package/FiberId/dist/effect-FiberId.cjs.dev.js +7 -7
- package/FiberId/dist/effect-FiberId.cjs.prod.js +7 -7
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +32 -31
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +32 -31
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +11 -11
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +11 -11
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +12 -12
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +12 -12
- package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +3 -3
- package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +3 -3
- package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +3 -18
- package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +3 -18
- package/GlobalValue/dist/effect-GlobalValue.esm.js +3 -1
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +50 -49
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +50 -49
- package/Hash/dist/effect-Hash.cjs.dev.js +3 -3
- package/Hash/dist/effect-Hash.cjs.prod.js +3 -3
- package/Hash/dist/effect-Hash.esm.js +2 -1
- package/HashMap/dist/effect-HashMap.cjs.dev.js +6 -6
- package/HashMap/dist/effect-HashMap.cjs.prod.js +6 -6
- package/HashSet/dist/effect-HashSet.cjs.dev.js +6 -6
- package/HashSet/dist/effect-HashSet.cjs.prod.js +6 -6
- package/Inspectable/dist/effect-Inspectable.cjs.dev.js +4 -1
- package/Inspectable/dist/effect-Inspectable.cjs.prod.js +4 -1
- package/Inspectable/dist/effect-Inspectable.esm.js +3 -1
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +31 -30
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +31 -30
- package/LICENSE +21 -0
- package/Layer/dist/effect-Layer.cjs.dev.js +38 -37
- package/Layer/dist/effect-Layer.cjs.prod.js +38 -37
- package/List/dist/effect-List.cjs.dev.js +8 -7
- package/List/dist/effect-List.cjs.prod.js +8 -7
- package/List/dist/effect-List.esm.js +5 -4
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +10 -10
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +10 -10
- package/Logger/dist/effect-Logger.cjs.dev.js +35 -34
- package/Logger/dist/effect-Logger.cjs.prod.js +35 -34
- package/Match/dist/effect-Match.cjs.dev.js +4 -4
- package/Match/dist/effect-Match.cjs.prod.js +4 -4
- package/Metric/dist/effect-Metric.cjs.dev.js +29 -28
- package/Metric/dist/effect-Metric.cjs.prod.js +29 -28
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +6 -6
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +6 -6
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +8 -8
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +8 -8
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +9 -9
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +9 -9
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +6 -6
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +6 -6
- package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +3 -3
- package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +3 -3
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +32 -31
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +32 -31
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +10 -10
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +10 -10
- package/MetricState/dist/effect-MetricState.cjs.dev.js +3 -3
- package/MetricState/dist/effect-MetricState.cjs.prod.js +3 -3
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +6 -6
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +6 -6
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +6 -6
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +6 -6
- package/MutableList/dist/effect-MutableList.cjs.dev.js +1 -0
- package/MutableList/dist/effect-MutableList.cjs.prod.js +1 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +5 -5
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +5 -5
- package/MutableRef/dist/effect-MutableRef.cjs.dev.js +2 -2
- package/MutableRef/dist/effect-MutableRef.cjs.prod.js +2 -2
- package/Number/dist/effect-Number.cjs.dev.js +3 -3
- package/Number/dist/effect-Number.cjs.prod.js +3 -3
- package/Option/dist/effect-Option.cjs.dev.js +5 -5
- package/Option/dist/effect-Option.cjs.prod.js +5 -5
- package/Pool/dist/effect-Pool.cjs.dev.js +32 -31
- package/Pool/dist/effect-Pool.cjs.prod.js +32 -31
- package/Predicate/dist/effect-Predicate.cjs.dev.js +15 -3
- package/Predicate/dist/effect-Predicate.cjs.mjs +1 -0
- package/Predicate/dist/effect-Predicate.cjs.prod.js +15 -3
- package/Predicate/dist/effect-Predicate.esm.js +15 -4
- package/PubSub/dist/effect-PubSub.cjs.dev.js +31 -30
- package/PubSub/dist/effect-PubSub.cjs.prod.js +31 -30
- package/Queue/dist/effect-Queue.cjs.dev.js +31 -30
- package/Queue/dist/effect-Queue.cjs.prod.js +31 -30
- package/Random/dist/effect-Random.cjs.dev.js +16 -16
- package/Random/dist/effect-Random.cjs.prod.js +16 -16
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +5 -5
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +5 -5
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +5 -5
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +5 -5
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +5 -5
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +5 -5
- package/Ref/dist/effect-Ref.cjs.dev.js +11 -11
- package/Ref/dist/effect-Ref.cjs.prod.js +11 -11
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +36 -35
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +36 -35
- package/Request/dist/effect-Request.cjs.dev.js +31 -30
- package/Request/dist/effect-Request.cjs.prod.js +31 -30
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +38 -37
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +38 -37
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +52 -39
- package/RequestResolver/dist/effect-RequestResolver.cjs.mjs +2 -1
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +52 -39
- package/RequestResolver/dist/effect-RequestResolver.esm.js +14 -3
- package/Resource/dist/effect-Resource.cjs.dev.js +34 -33
- package/Resource/dist/effect-Resource.cjs.prod.js +34 -33
- package/Runtime/dist/effect-Runtime.cjs.dev.js +33 -32
- package/Runtime/dist/effect-Runtime.cjs.prod.js +33 -32
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +36 -35
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +36 -35
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +8 -8
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +8 -8
- package/STM/dist/effect-STM.cjs.dev.js +52 -51
- package/STM/dist/effect-STM.cjs.prod.js +52 -51
- package/Schedule/dist/effect-Schedule.cjs.dev.js +22 -22
- package/Schedule/dist/effect-Schedule.cjs.prod.js +22 -22
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +5 -5
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +5 -5
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +5 -5
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +5 -5
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +5 -5
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +5 -5
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +10 -10
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +10 -10
- package/Scope/dist/effect-Scope.cjs.dev.js +30 -29
- package/Scope/dist/effect-Scope.cjs.prod.js +30 -29
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +37 -37
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +37 -37
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +34 -33
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +34 -33
- package/Sink/dist/effect-Sink.cjs.dev.js +47 -46
- package/Sink/dist/effect-Sink.cjs.prod.js +47 -46
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +5 -5
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +5 -5
- package/SortedMap/dist/effect-SortedMap.esm.js +2 -2
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +5 -5
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +5 -5
- package/SortedSet/dist/effect-SortedSet.esm.js +2 -2
- package/Stream/dist/effect-Stream.cjs.dev.js +69 -49
- package/Stream/dist/effect-Stream.cjs.mjs +2 -0
- package/Stream/dist/effect-Stream.cjs.prod.js +69 -49
- package/Stream/dist/effect-Stream.esm.js +19 -2
- package/Streamable/dist/effect-Streamable.cjs.dev.js +50 -49
- package/Streamable/dist/effect-Streamable.cjs.prod.js +50 -49
- package/String/dist/effect-String.cjs.dev.js +4 -4
- package/String/dist/effect-String.cjs.prod.js +4 -4
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +49 -48
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +49 -48
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +36 -35
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +36 -35
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +33 -32
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +33 -32
- package/TArray/dist/effect-TArray.cjs.dev.js +54 -53
- package/TArray/dist/effect-TArray.cjs.prod.js +54 -53
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +53 -52
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +53 -52
- package/TMap/dist/effect-TMap.cjs.dev.js +55 -54
- package/TMap/dist/effect-TMap.cjs.prod.js +55 -54
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +52 -51
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +52 -51
- package/TPubSub/dist/effect-TPubSub.cjs.dev.js +54 -53
- package/TPubSub/dist/effect-TPubSub.cjs.prod.js +54 -53
- package/TQueue/dist/effect-TQueue.cjs.dev.js +54 -53
- package/TQueue/dist/effect-TQueue.cjs.prod.js +54 -53
- package/TRandom/dist/effect-TRandom.cjs.dev.js +53 -52
- package/TRandom/dist/effect-TRandom.cjs.prod.js +53 -52
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +52 -51
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +52 -51
- package/TRef/dist/effect-TRef.cjs.dev.js +52 -51
- package/TRef/dist/effect-TRef.cjs.prod.js +52 -51
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +53 -52
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +53 -52
- package/TSet/dist/effect-TSet.cjs.dev.js +55 -54
- package/TSet/dist/effect-TSet.cjs.prod.js +55 -54
- package/Take/dist/effect-Take.cjs.dev.js +38 -37
- package/Take/dist/effect-Take.cjs.prod.js +38 -37
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +8 -10
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +8 -10
- package/TestAnnotation/dist/effect-TestAnnotation.esm.js +2 -3
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +2 -3
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +2 -3
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.esm.js +2 -3
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +23 -25
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +23 -25
- package/TestAnnotations/dist/effect-TestAnnotations.esm.js +2 -3
- package/TestClock/dist/effect-TestClock.cjs.dev.js +35 -34
- package/TestClock/dist/effect-TestClock.cjs.prod.js +35 -34
- package/TestConfig/dist/effect-TestConfig.cjs.dev.js +5 -5
- package/TestConfig/dist/effect-TestConfig.cjs.prod.js +5 -5
- package/TestContext/dist/effect-TestContext.cjs.dev.js +37 -36
- package/TestContext/dist/effect-TestContext.cjs.prod.js +37 -36
- package/TestLive/dist/effect-TestLive.cjs.dev.js +16 -16
- package/TestLive/dist/effect-TestLive.cjs.prod.js +16 -16
- package/TestServices/dist/effect-TestServices.cjs.dev.js +37 -36
- package/TestServices/dist/effect-TestServices.cjs.prod.js +37 -36
- package/TestSized/dist/effect-TestSized.cjs.dev.js +10 -10
- package/TestSized/dist/effect-TestSized.cjs.prod.js +10 -10
- package/Tracer/dist/effect-Tracer.cjs.dev.js +16 -16
- package/Tracer/dist/effect-Tracer.cjs.prod.js +16 -16
- package/dist/{Context-607e9b4c.cjs.dev.js → Context-036c4ad6.cjs.dev.js} +6 -5
- package/dist/{Context-c91d8ca0.cjs.prod.js → Context-fee14876.cjs.prod.js} +6 -5
- package/dist/{Effectable-6a8a05f1.cjs.prod.js → Effectable-c85356be.cjs.prod.js} +3 -1
- package/dist/{Effectable-71c10ab9.cjs.dev.js → Effectable-ed77aaf6.cjs.dev.js} +3 -1
- package/dist/{Either-e7500e90.cjs.dev.js → Either-97ac081f.cjs.dev.js} +4 -3
- package/dist/{Either-a3f96c60.cjs.prod.js → Either-bf376fff.cjs.prod.js} +4 -3
- package/dist/{FiberId-88cc0067.cjs.prod.js → FiberId-796388a1.cjs.prod.js} +3 -4
- package/dist/{FiberId-f329d0e3.cjs.dev.js → FiberId-fe3586bc.cjs.dev.js} +3 -4
- package/dist/GlobalValue-344581cf.cjs.prod.js +25 -0
- package/dist/GlobalValue-871500cb.cjs.dev.js +25 -0
- package/dist/{HashSet-09ade044.cjs.prod.js → HashSet-39a1799a.cjs.prod.js} +4 -4
- package/dist/{HashSet-e9659fd4.cjs.dev.js → HashSet-5a5d7603.cjs.dev.js} +4 -4
- package/dist/{Option-01caa9d4.cjs.dev.js → Option-0d3f5ddc.cjs.dev.js} +3 -2
- package/dist/{Option-dd52e82a.cjs.prod.js → Option-3fe68dcf.cjs.prod.js} +3 -2
- package/dist/{Ref-d3a3826b.cjs.dev.js → Ref-891bdaff.cjs.dev.js} +1 -1
- package/dist/{Ref-50f14c13.cjs.prod.js → Ref-c9491538.cjs.prod.js} +1 -1
- package/dist/{boundaries-ce70e4e4.cjs.dev.js → boundaries-0a4ac5a1.cjs.dev.js} +2 -3
- package/dist/{boundaries-0e5ddf7b.cjs.prod.js → boundaries-73e251d3.cjs.prod.js} +2 -3
- package/dist/{cache-2a5d8381.cjs.dev.js → cache-43514e60.cjs.dev.js} +7 -6
- package/dist/{cache-8f0c08cb.cjs.prod.js → cache-acead124.cjs.prod.js} +7 -6
- package/dist/{childExecutorDecision-b5842db5.cjs.prod.js → childExecutorDecision-3293bb05.cjs.prod.js} +2 -1
- package/dist/{childExecutorDecision-2eed6e25.cjs.dev.js → childExecutorDecision-54722bbb.cjs.dev.js} +2 -1
- package/dist/{circular-4f03acf3.cjs.prod.js → circular-373616ea.cjs.prod.js} +4 -4
- package/dist/{circular-2effda94.cjs.dev.js → circular-58cf4c81.cjs.dev.js} +4 -4
- package/dist/{circular-acb40239.cjs.prod.js → circular-970b753f.cjs.prod.js} +8 -8
- package/dist/{circular-39e86dc8.cjs.dev.js → circular-cf851085.cjs.dev.js} +8 -8
- package/dist/{config-beaa306c.cjs.dev.js → config-314f1860.cjs.dev.js} +5 -4
- package/dist/{config-00e6170c.cjs.prod.js → config-5cd5d919.cjs.prod.js} +5 -4
- package/dist/{configError-834bedc1.cjs.dev.js → configError-acc57114.cjs.dev.js} +2 -1
- package/dist/{configError-72f57cd6.cjs.prod.js → configError-b699bbc8.cjs.prod.js} +2 -1
- package/dist/{configProvider-290d13e7.cjs.prod.js → configProvider-20bd7c45.cjs.prod.js} +4 -4
- package/dist/{configProvider-aef50f41.cjs.dev.js → configProvider-db30779f.cjs.dev.js} +4 -4
- package/dist/{configSecret-80d3e36b.cjs.prod.js → configSecret-bb56a002.cjs.prod.js} +2 -3
- package/dist/{configSecret-abf643d8.cjs.dev.js → configSecret-bd8a1267.cjs.dev.js} +2 -3
- package/dist/{core-279496f0.cjs.prod.js → core-093a4458.cjs.prod.js} +8 -11
- package/dist/{core-35439f06.cjs.prod.js → core-26e932c3.cjs.prod.js} +24 -39
- package/dist/{core-7445bfd4.cjs.dev.js → core-40eb64fd.cjs.dev.js} +8 -11
- package/dist/{core-a0828fef.cjs.dev.js → core-908ae0ff.cjs.dev.js} +24 -39
- package/dist/{core-effect-460f968a.cjs.prod.js → core-effect-90338498.cjs.prod.js} +9 -9
- package/dist/{core-effect-02a7f1d7.cjs.dev.js → core-effect-a83699c2.cjs.dev.js} +9 -9
- package/dist/{dataSource-da4a602c.cjs.dev.js → dataSource-0355fe3b.cjs.dev.js} +31 -5
- package/dist/{dataSource-94fb44f9.cjs.prod.js → dataSource-6269c095.cjs.prod.js} +31 -5
- package/dist/declarations/src/BigDecimal.d.ts.map +1 -1
- package/dist/declarations/src/Chunk.d.ts.map +1 -1
- package/dist/declarations/src/Duration.d.ts.map +1 -1
- package/dist/declarations/src/Effect.d.ts +1 -0
- package/dist/declarations/src/Effect.d.ts.map +1 -1
- package/dist/declarations/src/Equal.d.ts.map +1 -1
- package/dist/declarations/src/GlobalValue.d.ts.map +1 -1
- package/dist/declarations/src/Hash.d.ts.map +1 -1
- package/dist/declarations/src/Inspectable.d.ts.map +1 -1
- package/dist/declarations/src/List.d.ts +2 -2
- package/dist/declarations/src/List.d.ts.map +1 -1
- package/dist/declarations/src/Predicate.d.ts +17 -0
- package/dist/declarations/src/Predicate.d.ts.map +1 -1
- package/dist/declarations/src/RequestResolver.d.ts +18 -2
- package/dist/declarations/src/RequestResolver.d.ts.map +1 -1
- package/dist/declarations/src/SortedMap.d.ts.map +1 -1
- package/dist/declarations/src/SortedSet.d.ts.map +1 -1
- package/dist/declarations/src/Stream.d.ts +15 -0
- package/dist/declarations/src/Stream.d.ts.map +1 -1
- package/dist/declarations/src/TestAnnotation.d.ts.map +1 -1
- package/dist/declarations/src/TestAnnotationMap.d.ts.map +1 -1
- package/dist/declarations/src/TestAnnotations.d.ts.map +1 -1
- package/dist/{defaultServices-61911fd4.cjs.prod.js → defaultServices-3f72f0d6.cjs.prod.js} +6 -5
- package/dist/{defaultServices-f3f93337.cjs.dev.js → defaultServices-d02bba35.cjs.dev.js} +6 -5
- package/dist/{fiber-f67dca7d.cjs.prod.js → fiber-52ffd4d9.cjs.prod.js} +6 -5
- package/dist/{fiber-cac583ce.cjs.dev.js → fiber-98ad468a.cjs.dev.js} +6 -5
- package/dist/{fiberRefs-6bd9745e.cjs.dev.js → fiberRefs-a89aceb0.cjs.dev.js} +1 -1
- package/dist/{fiberRefs-59b59378.cjs.prod.js → fiberRefs-fdf6d432.cjs.prod.js} +1 -1
- package/dist/{fiberRuntime-976a3e6f.cjs.dev.js → fiberRuntime-1d260336.cjs.dev.js} +28 -29
- package/dist/{fiberRuntime-26f406c3.cjs.prod.js → fiberRuntime-79c9da2a.cjs.prod.js} +28 -29
- package/dist/{groupBy-7fc93bc9.cjs.dev.js → groupBy-026dfa76.cjs.dev.js} +6 -5
- package/dist/{groupBy-8977b420.cjs.prod.js → groupBy-7ba748d0.cjs.prod.js} +6 -5
- package/dist/{hook-13f4db1e.cjs.dev.js → hook-4a05a62b.cjs.dev.js} +1 -1
- package/dist/{hook-8a020c3f.cjs.prod.js → hook-8cb43707.cjs.prod.js} +1 -1
- package/dist/{key-2cf383a2.cjs.prod.js → key-78bcadf6.cjs.prod.js} +4 -3
- package/dist/{key-4b5f6a7d.cjs.dev.js → key-ef346a50.cjs.dev.js} +4 -3
- package/dist/{keyType-36962f62.cjs.dev.js → keyType-08477e45.cjs.dev.js} +7 -18
- package/dist/{keyType-2ae6a00e.cjs.prod.js → keyType-d5b19a16.cjs.prod.js} +7 -18
- package/dist/{label-a588e6cd.cjs.prod.js → label-5fc84f90.cjs.prod.js} +2 -3
- package/dist/{label-b0cebeae.cjs.dev.js → label-b8010065.cjs.dev.js} +2 -3
- package/dist/{layer-c197624f.cjs.dev.js → layer-4689c0e4.cjs.dev.js} +11 -12
- package/dist/{layer-abbc91aa.cjs.prod.js → layer-50892276.cjs.prod.js} +11 -12
- package/dist/{mergeDecision-be41e797.cjs.dev.js → mergeDecision-09945b33.cjs.dev.js} +2 -1
- package/dist/{mergeDecision-07c6b5c9.cjs.prod.js → mergeDecision-f0313041.cjs.prod.js} +2 -1
- package/dist/{mergeState-8153ce39.cjs.dev.js → mergeState-1e12f9c8.cjs.dev.js} +2 -3
- package/dist/{mergeState-75990fa2.cjs.prod.js → mergeState-be337f1d.cjs.prod.js} +2 -3
- package/dist/{mergeStrategy-81ea5b80.cjs.dev.js → mergeStrategy-773913bc.cjs.dev.js} +2 -1
- package/dist/{mergeStrategy-3dd6e55f.cjs.prod.js → mergeStrategy-b3ff69de.cjs.prod.js} +2 -1
- package/dist/{patch-b7689042.cjs.prod.js → patch-1dd9bcaf.cjs.prod.js} +1 -1
- package/dist/{patch-2d425849.cjs.dev.js → patch-75c9c3b7.cjs.dev.js} +1 -1
- package/dist/{pathPatch-18fa425e.cjs.dev.js → pathPatch-552d6f51.cjs.dev.js} +1 -1
- package/dist/{pathPatch-b6020485.cjs.prod.js → pathPatch-7a1c5858.cjs.prod.js} +1 -1
- package/dist/{pool-810c2214.cjs.dev.js → pool-47c496db.cjs.dev.js} +7 -6
- package/dist/{pool-868dfa39.cjs.prod.js → pool-efd82406.cjs.prod.js} +7 -6
- package/dist/{query-927b504e.cjs.prod.js → query-0d958b01.cjs.prod.js} +4 -4
- package/dist/{query-c6684e39.cjs.dev.js → query-c332a171.cjs.dev.js} +4 -4
- package/dist/{queue-a0fc274d.cjs.dev.js → queue-7960c85e.cjs.dev.js} +5 -4
- package/dist/{queue-062806c7.cjs.prod.js → queue-d90b5d13.cjs.prod.js} +5 -4
- package/dist/{registry-9268ec7c.cjs.prod.js → registry-d7841ef0.cjs.prod.js} +2 -2
- package/dist/{registry-e5ad2d74.cjs.dev.js → registry-e3bbc631.cjs.dev.js} +2 -2
- package/dist/{runtime-340bd70b.cjs.dev.js → runtime-aed87fb4.cjs.dev.js} +8 -8
- package/dist/{runtime-ce0ad0ed.cjs.prod.js → runtime-cfb89e00.cjs.prod.js} +8 -8
- package/dist/{schedule-74c6207a.cjs.dev.js → schedule-19d92d87.cjs.dev.js} +3 -3
- package/dist/{schedule-04b40c50.cjs.prod.js → schedule-f4dc6913.cjs.prod.js} +3 -3
- package/dist/{scopedRef-4f0dd122.cjs.dev.js → scopedRef-7ca29150.cjs.dev.js} +6 -6
- package/dist/{scopedRef-d429ec83.cjs.prod.js → scopedRef-bc19c091.cjs.prod.js} +6 -6
- package/dist/{singleProducerAsyncInput-72c05452.cjs.dev.js → singleProducerAsyncInput-bc0cbb44.cjs.dev.js} +1 -1
- package/dist/{singleProducerAsyncInput-06a9076a.cjs.prod.js → singleProducerAsyncInput-f2c61f5a.cjs.prod.js} +1 -1
- package/dist/{sink-301d2bb4.cjs.dev.js → sink-4b05b297.cjs.dev.js} +13 -12
- package/dist/{sink-46df55d3.cjs.prod.js → sink-dc8bd92a.cjs.prod.js} +13 -12
- package/dist/{state-40d5dc71.cjs.prod.js → state-96db6911.cjs.prod.js} +7 -18
- package/dist/{state-620f7a22.cjs.dev.js → state-c39eeee2.cjs.dev.js} +7 -18
- package/dist/{stm-c0489b43.cjs.prod.js → stm-0c8ec1e9.cjs.prod.js} +3 -3
- package/dist/{stm-0b50e3c1.cjs.dev.js → stm-5fe40084.cjs.dev.js} +3 -3
- package/dist/{stream-44cdd7cb.cjs.dev.js → stream-127fa2f5.cjs.dev.js} +26 -7
- package/dist/{stream-0c3160ef.cjs.prod.js → stream-230b00be.cjs.prod.js} +26 -7
- package/dist/{synchronizedRef-2f71b820.cjs.prod.js → synchronizedRef-4e480ff3.cjs.prod.js} +1 -1
- package/dist/{synchronizedRef-78797507.cjs.dev.js → synchronizedRef-bc0be41f.cjs.dev.js} +1 -1
- package/dist/{tArray-006f45b0.cjs.prod.js → tArray-9e0a3d9f.cjs.prod.js} +3 -3
- package/dist/{tArray-556355cd.cjs.dev.js → tArray-bceb72f4.cjs.dev.js} +3 -3
- package/dist/{tMap-52d00ffb.cjs.dev.js → tMap-020a5ea4.cjs.dev.js} +4 -4
- package/dist/{tMap-9680b82b.cjs.prod.js → tMap-111ba646.cjs.prod.js} +4 -4
- package/dist/{tQueue-ca56a2a8.cjs.dev.js → tQueue-721bc394.cjs.dev.js} +6 -9
- package/dist/{tQueue-51cf109e.cjs.prod.js → tQueue-780b6596.cjs.prod.js} +6 -9
- package/dist/{tRef-b98e2e2a.cjs.dev.js → tRef-35b07161.cjs.dev.js} +1 -1
- package/dist/{tRef-4a2a9689.cjs.prod.js → tRef-93c769f2.cjs.prod.js} +1 -1
- package/dist/{upstreamPullRequest-c89f818d.cjs.prod.js → upstreamPullRequest-4eb9ab38.cjs.prod.js} +2 -1
- package/dist/{upstreamPullRequest-7a694281.cjs.dev.js → upstreamPullRequest-fc0d09a3.cjs.dev.js} +2 -1
- package/dist/{upstreamPullStrategy-f9f1ab57.cjs.dev.js → upstreamPullStrategy-69f33916.cjs.dev.js} +2 -1
- package/dist/{upstreamPullStrategy-63cc8967.cjs.prod.js → upstreamPullStrategy-bf9f0ad1.cjs.prod.js} +2 -1
- package/internal/Context.esm.js +3 -2
- package/internal/Effectable.esm.js +3 -1
- package/internal/Either.esm.js +2 -1
- package/internal/Encoding/Common.esm.js +3 -1
- package/internal/HashMap/node.esm.js +2 -1
- package/internal/HashMap.esm.js +2 -2
- package/internal/HashSet.esm.js +2 -2
- package/internal/Option.esm.js +2 -1
- package/internal/RedBlackTree.esm.js +2 -2
- package/internal/blockedRequests.esm.js +2 -3
- package/internal/cache.esm.js +2 -1
- package/internal/cause.esm.js +9 -16
- package/internal/channel/childExecutorDecision.esm.js +2 -1
- package/internal/channel/mergeDecision.esm.js +2 -1
- package/internal/channel/mergeState.esm.js +2 -3
- package/internal/channel/mergeStrategy.esm.js +2 -1
- package/internal/channel/upstreamPullRequest.esm.js +2 -1
- package/internal/channel/upstreamPullStrategy.esm.js +2 -1
- package/internal/channel.esm.js +2 -1
- package/internal/clock.esm.js +3 -2
- package/internal/config.esm.js +2 -1
- package/internal/configError.esm.js +2 -1
- package/internal/configSecret.esm.js +2 -3
- package/internal/core-effect.esm.js +3 -3
- package/internal/core-stream.esm.js +2 -1
- package/internal/core.esm.js +9 -13
- package/internal/dataSource.esm.js +30 -5
- package/internal/effect/circular.esm.js +2 -2
- package/internal/fiber.esm.js +2 -1
- package/internal/fiberId.esm.js +2 -3
- package/internal/fiberRuntime.esm.js +12 -10
- package/internal/fiberStatus.esm.js +2 -1
- package/internal/groupBy.esm.js +2 -1
- package/internal/layer.esm.js +3 -4
- package/internal/metric/boundaries.esm.js +2 -3
- package/internal/metric/key.esm.js +2 -1
- package/internal/metric/keyType.esm.js +7 -18
- package/internal/metric/label.esm.js +2 -3
- package/internal/metric/state.esm.js +7 -18
- package/internal/pool.esm.js +2 -1
- package/internal/queue.esm.js +3 -2
- package/internal/request.esm.js +2 -1
- package/internal/runtime.esm.js +4 -4
- package/internal/sink.esm.js +2 -1
- package/internal/stm/core.esm.js +4 -2
- package/internal/stm/stm/stmState.esm.js +2 -3
- package/internal/stm/stm/tExit.esm.js +2 -3
- package/internal/stm/tQueue.esm.js +3 -6
- package/internal/stream.esm.js +21 -4
- package/internal/supervisor.esm.js +2 -3
- package/internal/version.esm.js +3 -0
- package/package.json +11 -9
- package/src/BigDecimal.ts +2 -1
- package/src/Chunk.ts +5 -3
- package/src/Duration.ts +2 -2
- package/src/Effect.ts +1 -0
- package/src/Equal.ts +2 -1
- package/src/GlobalValue.ts +3 -1
- package/src/Hash.ts +2 -1
- package/src/Inspectable.ts +3 -1
- package/src/List.ts +8 -7
- package/src/Predicate.ts +21 -4
- package/src/RequestResolver.ts +25 -3
- package/src/SortedMap.ts +2 -2
- package/src/SortedSet.ts +2 -2
- package/src/Stream.ts +17 -0
- package/src/TestAnnotation.ts +2 -3
- package/src/TestAnnotationMap.ts +2 -3
- package/src/TestAnnotations.ts +2 -3
- package/src/internal/Context.ts +3 -2
- package/src/internal/Effectable.ts +3 -1
- package/src/internal/Either.ts +2 -2
- package/src/internal/Encoding/Common.ts +2 -2
- package/src/internal/HashMap/node.ts +2 -1
- package/src/internal/HashMap.ts +2 -2
- package/src/internal/HashSet.ts +2 -2
- package/src/internal/Option.ts +2 -2
- package/src/internal/RedBlackTree.ts +2 -2
- package/src/internal/blockedRequests.ts +2 -3
- package/src/internal/cache.ts +2 -1
- package/src/internal/cause.ts +15 -23
- package/src/internal/channel/channelState.ts +2 -2
- package/src/internal/channel/childExecutorDecision.ts +2 -1
- package/src/internal/channel/mergeDecision.ts +2 -2
- package/src/internal/channel/mergeState.ts +3 -3
- package/src/internal/channel/mergeStrategy.ts +2 -2
- package/src/internal/channel/upstreamPullRequest.ts +2 -1
- package/src/internal/channel/upstreamPullStrategy.ts +2 -1
- package/src/internal/channel.ts +2 -2
- package/src/internal/clock.ts +5 -5
- package/src/internal/config.ts +2 -3
- package/src/internal/configError.ts +2 -2
- package/src/internal/configSecret.ts +2 -3
- package/src/internal/core-effect.ts +3 -3
- package/src/internal/core-stream.ts +2 -1
- package/src/internal/core.ts +8 -16
- package/src/internal/dataSource.ts +47 -3
- package/src/internal/effect/circular.ts +1 -1
- package/src/internal/fiber.ts +2 -2
- package/src/internal/fiberId.ts +2 -3
- package/src/internal/fiberRuntime.ts +15 -8
- package/src/internal/fiberStatus.ts +2 -2
- package/src/internal/groupBy.ts +2 -2
- package/src/internal/layer.ts +2 -3
- package/src/internal/metric/boundaries.ts +3 -3
- package/src/internal/metric/key.ts +2 -1
- package/src/internal/metric/keyType.ts +13 -18
- package/src/internal/metric/label.ts +2 -3
- package/src/internal/metric/state.ts +12 -18
- package/src/internal/pool.ts +2 -2
- package/src/internal/queue.ts +3 -4
- package/src/internal/request.ts +2 -2
- package/src/internal/runtime.ts +2 -3
- package/src/internal/sink.ts +2 -2
- package/src/internal/stm/core.ts +4 -3
- package/src/internal/stm/stm/stmState.ts +2 -3
- package/src/internal/stm/stm/tExit.ts +2 -3
- package/src/internal/stm/tQueue.ts +3 -7
- package/src/internal/stream.ts +26 -6
- package/src/internal/supervisor.ts +3 -3
- package/src/internal/version.ts +1 -0
- /package/dist/{RuntimeFlagsPatch-233ac7d7.cjs.prod.js → RuntimeFlagsPatch-2bc2f1c5.cjs.prod.js} +0 -0
- /package/dist/{RuntimeFlagsPatch-063c5864.cjs.dev.js → RuntimeFlagsPatch-5a4ff83e.cjs.dev.js} +0 -0
- /package/dist/{take-07165139.cjs.prod.js → take-23720f78.cjs.prod.js} +0 -0
- /package/dist/{take-689a29d5.cjs.dev.js → take-472621b6.cjs.dev.js} +0 -0
package/internal/stm/core.esm.js
CHANGED
|
@@ -18,8 +18,10 @@ import { isSuccess, succeed as succeed$2, interrupt as interrupt$2, retry as ret
|
|
|
18
18
|
import { suspend, done } from './stm/tryCommit.esm.js';
|
|
19
19
|
import { make } from './stm/txnId.esm.js';
|
|
20
20
|
import { pipeArguments } from '../../Pipeable/dist/effect-Pipeable.esm.js';
|
|
21
|
+
import { hasProperty } from '../../Predicate/dist/effect-Predicate.esm.js';
|
|
21
22
|
import { StreamTypeId } from '../../Stream/dist/effect-Stream.esm.js';
|
|
22
23
|
import { ChannelTypeId } from '../core-stream.esm.js';
|
|
24
|
+
import { effectVariance } from '../Effectable.esm.js';
|
|
23
25
|
import { SinkTypeId } from '../sink.esm.js';
|
|
24
26
|
|
|
25
27
|
/** @internal */
|
|
@@ -72,7 +74,7 @@ class STMPrimitive {
|
|
|
72
74
|
}
|
|
73
75
|
constructor(i0) {
|
|
74
76
|
this.i0 = i0;
|
|
75
|
-
this[EffectTypeId] =
|
|
77
|
+
this[EffectTypeId] = effectVariance;
|
|
76
78
|
this[StreamTypeId] = stmVariance;
|
|
77
79
|
this[SinkTypeId] = stmVariance;
|
|
78
80
|
this[ChannelTypeId] = stmVariance;
|
|
@@ -92,7 +94,7 @@ class STMPrimitive {
|
|
|
92
94
|
}
|
|
93
95
|
|
|
94
96
|
/** @internal */
|
|
95
|
-
const isSTM = u =>
|
|
97
|
+
const isSTM = u => hasProperty(u, STMTypeId);
|
|
96
98
|
|
|
97
99
|
/** @internal */
|
|
98
100
|
const commit = self => unsafeAtomically(self, constVoid, constVoid);
|
|
@@ -4,6 +4,7 @@ import { pipe } from '../../../Function/dist/effect-Function.esm.js';
|
|
|
4
4
|
import { symbol, combine, hash } from '../../../Hash/dist/effect-Hash.esm.js';
|
|
5
5
|
import { OP_DONE, OP_RUNNING, OP_INTERRUPTED } from '../opCodes/stmState.esm.js';
|
|
6
6
|
import { OP_RETRY, OP_SUCCEED, OP_INTERRUPT, OP_DIE, OP_FAIL } from '../opCodes/tExit.esm.js';
|
|
7
|
+
import { hasProperty } from '../../../Predicate/dist/effect-Predicate.esm.js';
|
|
7
8
|
|
|
8
9
|
/** @internal */
|
|
9
10
|
const STMStateSymbolKey = "effect/STM/State";
|
|
@@ -22,9 +23,7 @@ const STMStateTypeId = /*#__PURE__*/Symbol.for(STMStateSymbolKey);
|
|
|
22
23
|
/** @internal */
|
|
23
24
|
|
|
24
25
|
/** @internal */
|
|
25
|
-
const isSTMState = u =>
|
|
26
|
-
return typeof u === "object" && u != null && STMStateTypeId in u;
|
|
27
|
-
};
|
|
26
|
+
const isSTMState = u => hasProperty(u, STMStateTypeId);
|
|
28
27
|
|
|
29
28
|
/** @internal */
|
|
30
29
|
const isRunning = self => {
|
|
@@ -2,6 +2,7 @@ import { symbol as symbol$1, equals } from '../../../Equal/dist/effect-Equal.esm
|
|
|
2
2
|
import { pipe } from '../../../Function/dist/effect-Function.esm.js';
|
|
3
3
|
import { symbol, combine, hash } from '../../../Hash/dist/effect-Hash.esm.js';
|
|
4
4
|
import { OP_SUCCEED, OP_FAIL, OP_DIE, OP_INTERRUPT, OP_RETRY } from '../opCodes/tExit.esm.js';
|
|
5
|
+
import { hasProperty } from '../../../Predicate/dist/effect-Predicate.esm.js';
|
|
5
6
|
|
|
6
7
|
/** @internal */
|
|
7
8
|
const TExitSymbolKey = "effect/TExit";
|
|
@@ -32,9 +33,7 @@ const variance = {
|
|
|
32
33
|
/** @internal */
|
|
33
34
|
|
|
34
35
|
/** @internal */
|
|
35
|
-
const isExit = u =>
|
|
36
|
-
return typeof u === "object" && u != null && TExitTypeId in u;
|
|
37
|
-
};
|
|
36
|
+
const isExit = u => hasProperty(u, TExitTypeId);
|
|
38
37
|
|
|
39
38
|
/** @internal */
|
|
40
39
|
const isSuccess = self => {
|
|
@@ -5,6 +5,7 @@ import { OP_SLIDING_STRATEGY, OP_DROPPING_STRATEGY, OP_BACKPRESSURE_STRATEGY } f
|
|
|
5
5
|
import { suspend, unit } from './stm.esm.js';
|
|
6
6
|
import { make, unsafeGet, unsafeSet } from './tRef.esm.js';
|
|
7
7
|
import { fromNullable } from '../../Option/dist/effect-Option.esm.js';
|
|
8
|
+
import { hasProperty } from '../../Predicate/dist/effect-Predicate.esm.js';
|
|
8
9
|
import { head } from '../../ReadonlyArray/dist/effect-ReadonlyArray.esm.js';
|
|
9
10
|
import { interruptAs } from '../../STM/dist/effect-STM.esm.js';
|
|
10
11
|
|
|
@@ -218,14 +219,10 @@ const isTQueue = u => {
|
|
|
218
219
|
};
|
|
219
220
|
|
|
220
221
|
/** @internal */
|
|
221
|
-
const isTEnqueue = u =>
|
|
222
|
-
return typeof u === "object" && u != null && TEnqueueTypeId in u;
|
|
223
|
-
};
|
|
222
|
+
const isTEnqueue = u => hasProperty(u, TEnqueueTypeId);
|
|
224
223
|
|
|
225
224
|
/** @internal */
|
|
226
|
-
const isTDequeue = u =>
|
|
227
|
-
return typeof u === "object" && u != null && TDequeueTypeId in u;
|
|
228
|
-
};
|
|
225
|
+
const isTDequeue = u => hasProperty(u, TDequeueTypeId);
|
|
229
226
|
|
|
230
227
|
/** @internal */
|
|
231
228
|
const awaitShutdown = self => self.awaitShutdown;
|
package/internal/stream.esm.js
CHANGED
|
@@ -14,6 +14,7 @@ import { dual, pipe, identity, constTrue } from '../Function/dist/effect-Functio
|
|
|
14
14
|
import { build, context as context$1, merge as merge$1 } from '../Layer/dist/effect-Layer.esm.js';
|
|
15
15
|
import { none, some as some$1, match as match$2, getOrElse, map as map$4, isSome, isNone } from '../Option/dist/effect-Option.esm.js';
|
|
16
16
|
import { pipeArguments } from '../Pipeable/dist/effect-Pipeable.esm.js';
|
|
17
|
+
import { isTagged, hasProperty } from '../Predicate/dist/effect-Predicate.esm.js';
|
|
17
18
|
import { bounded as bounded$1, subscribe, shutdown as shutdown$1 } from '../PubSub/dist/effect-PubSub.esm.js';
|
|
18
19
|
import { take as take$2, shutdown, bounded, dropping, sliding as sliding$1, isShutdown, takeBetween, offerAll, offer as offer$1, unbounded } from '../Queue/dist/effect-Queue.esm.js';
|
|
19
20
|
import { make as make$2, getAndSet, set, get, update, modify } from '../Ref/dist/effect-Ref.esm.js';
|
|
@@ -25,7 +26,7 @@ import { unwrap as unwrap$1, zipRight as zipRight$2, pipeToOrFail, unwrapScoped
|
|
|
25
26
|
import { run as run$1, runScoped as runScoped$1 } from './channel/channelExecutor.esm.js';
|
|
26
27
|
import { BufferSliding } from './channel/mergeStrategy.esm.js';
|
|
27
28
|
import { make as make$5 } from './channel/singleProducerAsyncInput.esm.js';
|
|
28
|
-
import { readWithCause, flatMap as flatMap$1, fromEffect as fromEffect$1, write, failCause as failCause$1, unit as unit$1,
|
|
29
|
+
import { pipeTo, readWithCause, flatMap as flatMap$1, fromEffect as fromEffect$1, write, failCause as failCause$1, unit as unit$1, collectElements, fail as fail$1, catchAllCause as catchAllCause$1, readWith, suspend as suspend$2, succeedNow, ensuringWith as ensuringWith$1, succeed as succeed$3, provideContext as provideContext$1, foldCauseChannel, sync as sync$2, embedInput } from './core-stream.esm.js';
|
|
29
30
|
import { RingBuffer } from './ringBuffer.esm.js';
|
|
30
31
|
import { toChannel as toChannel$1, collectAllN, mkString as mkString$1, foldSink, collectLeftover, zipRight as zipRight$3, fromEffect as fromEffect$2, fail as fail$5, fromChannel as fromChannel$1, collectAll, count, drain as drain$2, fold, foldEffect, forEach as forEach$1, forEachChunk, forEachWhile, head, last, sum } from './sink.esm.js';
|
|
31
32
|
import { OP_CURRENT, OP_PREVIOUS, current, OP_NOT_STARTED, notStarted, previous } from './stream/debounceState.esm.js';
|
|
@@ -64,11 +65,27 @@ class StreamImpl {
|
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
/** @internal */
|
|
67
|
-
const isStream = u =>
|
|
68
|
+
const isStream = u => hasProperty(u, StreamTypeId) || isEffect(u);
|
|
68
69
|
|
|
69
70
|
/** @internal */
|
|
70
71
|
const DefaultChunkSize = 4096;
|
|
71
72
|
|
|
73
|
+
/** @internal */
|
|
74
|
+
const accumulate = self => chunks(accumulateChunks(self));
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
const accumulateChunks = self => {
|
|
78
|
+
const accumulator = s => readWith({
|
|
79
|
+
onInput: input => {
|
|
80
|
+
const next = appendAll(s, input);
|
|
81
|
+
return flatMap$1(write(next), () => accumulator(next));
|
|
82
|
+
},
|
|
83
|
+
onFailure: fail$1,
|
|
84
|
+
onDone: () => unit$1
|
|
85
|
+
});
|
|
86
|
+
return new StreamImpl(pipeTo(toChannel(self), accumulator(empty$1())));
|
|
87
|
+
};
|
|
88
|
+
|
|
72
89
|
/** @internal */
|
|
73
90
|
const acquireRelease = (acquire, release) => scoped(acquireRelease$1(acquire, release));
|
|
74
91
|
|
|
@@ -1076,7 +1093,7 @@ const fromReadableStream = (evaluate, onError) => unwrapScoped(map$1(acquireRele
|
|
|
1076
1093
|
/** @internal */
|
|
1077
1094
|
const fromReadableStreamByob = (evaluate, onError, allocSize = 4096) => unwrapScoped(map$1(acquireRelease$1(sync$1(() => evaluate().getReader({
|
|
1078
1095
|
mode: "byob"
|
|
1079
|
-
})), reader => promise(() => reader.cancel())), reader => catchAll(forever(readChunkStreamByobReader(reader, onError, allocSize)), error =>
|
|
1096
|
+
})), reader => promise(() => reader.cancel())), reader => catchAll(forever(readChunkStreamByobReader(reader, onError, allocSize)), error => isTagged(error, "EOF") ? empty : fail(error))));
|
|
1080
1097
|
const readChunkStreamByobReader = (reader, onError, size) => {
|
|
1081
1098
|
const buffer = new ArrayBuffer(size);
|
|
1082
1099
|
return paginateEffect(0, offset => flatMap$2(tryPromise({
|
|
@@ -2987,4 +3004,4 @@ const encodeText = self => suspend(() => {
|
|
|
2987
3004
|
return map(self, s => encoder.encode(s));
|
|
2988
3005
|
});
|
|
2989
3006
|
|
|
2990
|
-
export { DefaultChunkSize, Do, StreamImpl, StreamTypeId, _async, acquireRelease, aggregate, aggregateWithin, aggregateWithinEither, as, asyncEffect, asyncInterrupt, asyncOption, asyncScoped, bind, bindTo, branchAfter, broadcast, broadcastDynamic, broadcastedQueues, broadcastedQueuesDynamic, buffer, bufferChunks, catchAll, catchAllCause, catchSome, catchSomeCause, catchTag, catchTags, changes, changesWith, changesWithEffect, channelToStream, chunks, chunksWith, combine, combineChunks, concat, concatAll, context, contextWith, contextWithEffect, contextWithStream, cross, crossLeft, crossRight, crossWith, debounce, decodeText, die, dieMessage, dieSync, distributedWith, distributedWithDynamic, distributedWithDynamicCallback, drain, drainFork, drop, dropRight, dropUntil, dropUntilEffect, dropWhile, dropWhileEffect, either, empty, encodeText, ensuring, ensuringWith, execute, fail, failCause, failCauseSync, failSync, filter, filterEffect, filterMap, filterMapEffect, filterMapWhile, filterMapWhileEffect, finalizer, find, findEffect, flatMap, flatten, flattenChunks, flattenEffect, flattenExitOption, flattenIterables, flattenTake, forever, fromAsyncIterable, fromChannel, fromChunk, fromChunkPubSub, fromChunkQueue, fromChunks, fromEffect, fromEffectOption, fromIterable, fromIterableEffect, fromIteratorSucceed, fromPubSub, fromPull, fromQueue, fromReadableStream, fromReadableStreamByob, fromSchedule, groupAdjacentBy, grouped, groupedWithin, haltAfter, haltWhen, haltWhenDeferred, identityStream, interleave, interleaveWith, interruptAfter, interruptWhen, interruptWhenDeferred, intersperse, intersperseAffixes, isStream, iterate, let_, make, map, mapAccum, mapAccumEffect, mapBoth, mapChunks, mapChunksEffect, mapConcat, mapConcatChunk, mapConcatChunkEffect, mapConcatEffect, mapEffectPar, mapEffectSequential, mapError, mapErrorCause, mapInputContext, matchConcurrency, merge, mergeAll, mergeEither, mergeLeft, mergeRight, mergeWith, mkString, never, onDone, onError, orDie, orDieWith, orElse, orElseEither, orElseFail, orElseIfEmpty, orElseIfEmptyChunk, orElseIfEmptyStream, orElseSucceed, paginate, paginateChunk, paginateChunkEffect, paginateEffect, partition, partitionEither, peel, pipeThrough, pipeThroughChannel, pipeThroughChannelOrFail, prepend, provideContext, provideLayer, provideService, provideServiceEffect, provideServiceStream, provideSomeLayer, range, rechunk, refineOrDie, refineOrDieWith, repeat, repeatEffect, repeatEffectChunk, repeatEffectChunkOption, repeatEffectOption, repeatEffectWithSchedule, repeatEither, repeatElements, repeatElementsWith, repeatValue, repeatWith, repeatWithSchedule, retry, run, runCollect, runCount, runDrain, runFold, runFoldEffect, runFoldScoped, runFoldScopedEffect, runFoldWhile, runFoldWhileEffect, runFoldWhileScoped, runFoldWhileScopedEffect, runForEach, runForEachChunk, runForEachChunkScoped, runForEachScoped, runForEachWhile, runForEachWhileScoped, runHead, runIntoPubSub, runIntoPubSubScoped, runIntoQueue, runIntoQueueElementsScoped, runIntoQueueScoped, runLast, runScoped, runSum, scan, scanEffect, scanReduce, scanReduceEffect, schedule, scheduleWith, scoped, sliding, slidingSize, some, someOrElse, someOrFail, split, splitLines, splitOnChunk, succeed, suspend, sync, take, takeRight, takeUntil, takeUntilEffect, takeWhile, tap, tapBoth, tapError, tapErrorCause, tapSink, throttle, throttleEffect, tick, timeout, timeoutFail, timeoutFailCause, timeoutTo, toChannel, toPubSub, toPull, toQueue, toQueueOfElements, toReadableStream, transduce, unfold, unfoldChunk, unfoldChunkEffect, unfoldEffect, unit, unwrap, unwrapScoped, updateService, when, whenCase, whenCaseEffect, whenEffect, withSpan, zip, zipAll, zipAllLeft, zipAllRight, zipAllSortedByKey, zipAllSortedByKeyLeft, zipAllSortedByKeyRight, zipAllSortedByKeyWith, zipAllWith, zipFlatten, zipLatest, zipLatestWith, zipLeft, zipRight, zipWith, zipWithChunks, zipWithIndex, zipWithNext, zipWithPrevious, zipWithPreviousAndNext };
|
|
3007
|
+
export { DefaultChunkSize, Do, StreamImpl, StreamTypeId, _async, accumulate, accumulateChunks, acquireRelease, aggregate, aggregateWithin, aggregateWithinEither, as, asyncEffect, asyncInterrupt, asyncOption, asyncScoped, bind, bindTo, branchAfter, broadcast, broadcastDynamic, broadcastedQueues, broadcastedQueuesDynamic, buffer, bufferChunks, catchAll, catchAllCause, catchSome, catchSomeCause, catchTag, catchTags, changes, changesWith, changesWithEffect, channelToStream, chunks, chunksWith, combine, combineChunks, concat, concatAll, context, contextWith, contextWithEffect, contextWithStream, cross, crossLeft, crossRight, crossWith, debounce, decodeText, die, dieMessage, dieSync, distributedWith, distributedWithDynamic, distributedWithDynamicCallback, drain, drainFork, drop, dropRight, dropUntil, dropUntilEffect, dropWhile, dropWhileEffect, either, empty, encodeText, ensuring, ensuringWith, execute, fail, failCause, failCauseSync, failSync, filter, filterEffect, filterMap, filterMapEffect, filterMapWhile, filterMapWhileEffect, finalizer, find, findEffect, flatMap, flatten, flattenChunks, flattenEffect, flattenExitOption, flattenIterables, flattenTake, forever, fromAsyncIterable, fromChannel, fromChunk, fromChunkPubSub, fromChunkQueue, fromChunks, fromEffect, fromEffectOption, fromIterable, fromIterableEffect, fromIteratorSucceed, fromPubSub, fromPull, fromQueue, fromReadableStream, fromReadableStreamByob, fromSchedule, groupAdjacentBy, grouped, groupedWithin, haltAfter, haltWhen, haltWhenDeferred, identityStream, interleave, interleaveWith, interruptAfter, interruptWhen, interruptWhenDeferred, intersperse, intersperseAffixes, isStream, iterate, let_, make, map, mapAccum, mapAccumEffect, mapBoth, mapChunks, mapChunksEffect, mapConcat, mapConcatChunk, mapConcatChunkEffect, mapConcatEffect, mapEffectPar, mapEffectSequential, mapError, mapErrorCause, mapInputContext, matchConcurrency, merge, mergeAll, mergeEither, mergeLeft, mergeRight, mergeWith, mkString, never, onDone, onError, orDie, orDieWith, orElse, orElseEither, orElseFail, orElseIfEmpty, orElseIfEmptyChunk, orElseIfEmptyStream, orElseSucceed, paginate, paginateChunk, paginateChunkEffect, paginateEffect, partition, partitionEither, peel, pipeThrough, pipeThroughChannel, pipeThroughChannelOrFail, prepend, provideContext, provideLayer, provideService, provideServiceEffect, provideServiceStream, provideSomeLayer, range, rechunk, refineOrDie, refineOrDieWith, repeat, repeatEffect, repeatEffectChunk, repeatEffectChunkOption, repeatEffectOption, repeatEffectWithSchedule, repeatEither, repeatElements, repeatElementsWith, repeatValue, repeatWith, repeatWithSchedule, retry, run, runCollect, runCount, runDrain, runFold, runFoldEffect, runFoldScoped, runFoldScopedEffect, runFoldWhile, runFoldWhileEffect, runFoldWhileScoped, runFoldWhileScopedEffect, runForEach, runForEachChunk, runForEachChunkScoped, runForEachScoped, runForEachWhile, runForEachWhileScoped, runHead, runIntoPubSub, runIntoPubSubScoped, runIntoQueue, runIntoQueueElementsScoped, runIntoQueueScoped, runLast, runScoped, runSum, scan, scanEffect, scanReduce, scanReduceEffect, schedule, scheduleWith, scoped, sliding, slidingSize, some, someOrElse, someOrFail, split, splitLines, splitOnChunk, succeed, suspend, sync, take, takeRight, takeUntil, takeUntilEffect, takeWhile, tap, tapBoth, tapError, tapErrorCause, tapSink, throttle, throttleEffect, tick, timeout, timeoutFail, timeoutFailCause, timeoutTo, toChannel, toPubSub, toPull, toQueue, toQueueOfElements, toReadableStream, transduce, unfold, unfoldChunk, unfoldChunkEffect, unfoldEffect, unit, unwrap, unwrapScoped, updateService, when, whenCase, whenCaseEffect, whenEffect, withSpan, zip, zipAll, zipAllLeft, zipAllRight, zipAllSortedByKey, zipAllSortedByKeyLeft, zipAllSortedByKeyRight, zipAllSortedByKeyWith, zipAllWith, zipFlatten, zipLatest, zipLatestWith, zipLeft, zipRight, zipWith, zipWithChunks, zipWithIndex, zipWithNext, zipWithPrevious, zipWithPreviousAndNext };
|
|
@@ -2,6 +2,7 @@ import { pipe } from '../Function/dist/effect-Function.esm.js';
|
|
|
2
2
|
import { globalValue } from '../GlobalValue/dist/effect-GlobalValue.esm.js';
|
|
3
3
|
import { map, zip, sync, unit } from './core.esm.js';
|
|
4
4
|
import { get, set } from '../MutableRef/dist/effect-MutableRef.esm.js';
|
|
5
|
+
import { hasProperty, isTagged } from '../Predicate/dist/effect-Predicate.esm.js';
|
|
5
6
|
import { add, remove } from '../SortedSet/dist/effect-SortedSet.esm.js';
|
|
6
7
|
|
|
7
8
|
/** @internal */
|
|
@@ -86,9 +87,7 @@ class Zip {
|
|
|
86
87
|
return new Zip(this, right);
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
|
-
const isZip = self =>
|
|
90
|
-
return typeof self === "object" && self !== null && SupervisorTypeId in self && "_tag" in self && self._tag === "Zip";
|
|
91
|
-
};
|
|
90
|
+
const isZip = self => hasProperty(self, SupervisorTypeId) && isTagged(self, "Zip");
|
|
92
91
|
class Track {
|
|
93
92
|
[SupervisorTypeId] = supervisorVariance;
|
|
94
93
|
fibers = new Set();
|
package/package.json
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "effect",
|
|
3
|
-
"version": "2.0.0-next.
|
|
4
|
-
"packageManager": "pnpm@8.
|
|
3
|
+
"version": "2.0.0-next.53",
|
|
4
|
+
"packageManager": "pnpm@8.10.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
+
"author": "Michael Arnaldi <michael.arnaldi@effectful.co>",
|
|
9
|
+
"license": "MIT",
|
|
8
10
|
"sideEffects": false,
|
|
9
11
|
"preconstruct": {
|
|
10
12
|
"distFilenameStrategy": "full",
|
|
@@ -23,8 +25,6 @@
|
|
|
23
25
|
"type": "git",
|
|
24
26
|
"url": "https://github.com/Effect-TS/effect.git"
|
|
25
27
|
},
|
|
26
|
-
"author": "Michael Arnaldi <ma@matechs.com>",
|
|
27
|
-
"license": "MIT",
|
|
28
28
|
"bugs": {
|
|
29
29
|
"url": "https://github.com/Effect-TS/effect/issues"
|
|
30
30
|
},
|
|
@@ -1062,9 +1062,10 @@
|
|
|
1062
1062
|
"@babel/preset-typescript": "^7.23.0",
|
|
1063
1063
|
"@changesets/changelog-github": "^0.4.8",
|
|
1064
1064
|
"@changesets/cli": "^2.26.2",
|
|
1065
|
-
"@
|
|
1065
|
+
"@edge-runtime/vm": "^3.1.6",
|
|
1066
1066
|
"@effect/build-utils": "^0.1.9",
|
|
1067
|
-
"@effect/docgen": "^0.2.
|
|
1067
|
+
"@effect/docgen": "^0.2.1",
|
|
1068
|
+
"@effect/dtslint": "^0.0.3",
|
|
1068
1069
|
"@effect/eslint-plugin": "^0.1.2",
|
|
1069
1070
|
"@effect/language-service": "^0.0.21",
|
|
1070
1071
|
"@preconstruct/cli": "^2.8.1",
|
|
@@ -1082,6 +1083,7 @@
|
|
|
1082
1083
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
|
1083
1084
|
"eslint-plugin-sort-destructure-keys": "^1.5.0",
|
|
1084
1085
|
"fast-check": "^3.13.1",
|
|
1086
|
+
"jsdom": "^22.1.0",
|
|
1085
1087
|
"madge": "^6.1.0",
|
|
1086
1088
|
"prettier": "^3.0.3",
|
|
1087
1089
|
"ts-node": "^10.9.1",
|
|
@@ -1091,18 +1093,18 @@
|
|
|
1091
1093
|
},
|
|
1092
1094
|
"scripts": {
|
|
1093
1095
|
"build": "pnpm gen && preconstruct fix && preconstruct build && pnpm gen",
|
|
1094
|
-
"gen": "build-utils prepare-v1",
|
|
1096
|
+
"gen": "build-utils prepare-v1 && node scripts/version.mjs",
|
|
1095
1097
|
"clean": "node scripts/clean.mjs",
|
|
1096
1098
|
"test": "vitest",
|
|
1097
1099
|
"check": "tsc -p tsconfig.json",
|
|
1098
1100
|
"coverage": "vitest run --coverage",
|
|
1099
1101
|
"circular": "madge --extensions ts --circular --no-color --no-spinner --warning src",
|
|
1100
|
-
"update-version": "changeset version && pnpm install --no-frozen-lockfile",
|
|
1102
|
+
"update-version": "changeset version && pnpm install --no-frozen-lockfile && node scripts/version.mjs",
|
|
1101
1103
|
"lint": "eslint src test",
|
|
1102
1104
|
"lint-fix": "eslint src test --fix",
|
|
1103
1105
|
"fix": "preconstruct fix",
|
|
1104
1106
|
"docgen": "docgen",
|
|
1105
|
-
"dtslint": "dtslint
|
|
1107
|
+
"dtslint": "dtslint dtslint",
|
|
1106
1108
|
"dtslint-clean": "dtslint --installAll"
|
|
1107
1109
|
}
|
|
1108
1110
|
}
|
package/src/BigDecimal.ts
CHANGED
|
@@ -23,6 +23,7 @@ import * as Option from "./Option"
|
|
|
23
23
|
import * as order from "./Order"
|
|
24
24
|
import type { Ordering } from "./Ordering"
|
|
25
25
|
import { type Pipeable, pipeArguments } from "./Pipeable"
|
|
26
|
+
import { hasProperty } from "./Predicate"
|
|
26
27
|
|
|
27
28
|
const DEFAULT_PRECISION = 100
|
|
28
29
|
|
|
@@ -84,7 +85,7 @@ const BigDecimalProto: Omit<BigDecimal, "value" | "scale" | "normalized"> = {
|
|
|
84
85
|
* @since 2.0.0
|
|
85
86
|
* @category guards
|
|
86
87
|
*/
|
|
87
|
-
export const isBigDecimal = (u: unknown): u is BigDecimal =>
|
|
88
|
+
export const isBigDecimal = (u: unknown): u is BigDecimal => hasProperty(u, TypeId)
|
|
88
89
|
|
|
89
90
|
/**
|
|
90
91
|
* Creates a `BigDecimal` from a `bigint` value and a scale.
|
package/src/Chunk.ts
CHANGED
|
@@ -15,7 +15,7 @@ import * as Order from "./Order"
|
|
|
15
15
|
import type { Pipeable } from "./Pipeable"
|
|
16
16
|
import { pipeArguments } from "./Pipeable"
|
|
17
17
|
import type { Predicate, Refinement } from "./Predicate"
|
|
18
|
-
import {
|
|
18
|
+
import { hasProperty } from "./Predicate"
|
|
19
19
|
import * as RA from "./ReadonlyArray"
|
|
20
20
|
import type { NonEmptyReadonlyArray } from "./ReadonlyArray"
|
|
21
21
|
|
|
@@ -116,7 +116,9 @@ const emptyArray: ReadonlyArray<never> = []
|
|
|
116
116
|
* @since 2.0.0
|
|
117
117
|
*/
|
|
118
118
|
export const getEquivalence = <A>(isEquivalent: Equivalence.Equivalence<A>): Equivalence.Equivalence<Chunk<A>> =>
|
|
119
|
-
Equivalence.make((self, that) =>
|
|
119
|
+
Equivalence.make((self, that) =>
|
|
120
|
+
self.length === that.length && toReadonlyArray(self).every((value, i) => isEquivalent(value, unsafeGet(that, i)))
|
|
121
|
+
)
|
|
120
122
|
|
|
121
123
|
const _equivalence = getEquivalence(Equal.equals)
|
|
122
124
|
|
|
@@ -212,7 +214,7 @@ const makeChunk = <A>(backing: Backing<A>): Chunk<A> => {
|
|
|
212
214
|
export const isChunk: {
|
|
213
215
|
<A>(u: Iterable<A>): u is Chunk<A>
|
|
214
216
|
(u: unknown): u is Chunk<unknown>
|
|
215
|
-
} = (u: unknown): u is Chunk<unknown> =>
|
|
217
|
+
} = (u: unknown): u is Chunk<unknown> => hasProperty(u, TypeId)
|
|
216
218
|
|
|
217
219
|
const _empty = makeChunk<never>({ _tag: "IEmpty" })
|
|
218
220
|
|
package/src/Duration.ts
CHANGED
|
@@ -11,7 +11,7 @@ import * as Option from "./Option"
|
|
|
11
11
|
import * as order from "./Order"
|
|
12
12
|
import type { Pipeable } from "./Pipeable"
|
|
13
13
|
import { pipeArguments } from "./Pipeable"
|
|
14
|
-
import { isBigInt, isNumber } from "./Predicate"
|
|
14
|
+
import { hasProperty, isBigInt, isNumber } from "./Predicate"
|
|
15
15
|
|
|
16
16
|
const TypeId: unique symbol = Symbol.for("effect/Duration")
|
|
17
17
|
|
|
@@ -162,7 +162,7 @@ const make = (input: number | bigint): Duration => {
|
|
|
162
162
|
* @since 2.0.0
|
|
163
163
|
* @category guards
|
|
164
164
|
*/
|
|
165
|
-
export const isDuration = (u: unknown): u is Duration =>
|
|
165
|
+
export const isDuration = (u: unknown): u is Duration => hasProperty(u, TypeId)
|
|
166
166
|
|
|
167
167
|
/**
|
|
168
168
|
* @since 2.0.0
|
package/src/Effect.ts
CHANGED
package/src/Equal.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { Equivalence } from "./Equivalence"
|
|
5
5
|
import * as Hash from "./Hash"
|
|
6
|
+
import { hasProperty } from "./Predicate"
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* @since 2.0.0
|
|
@@ -55,7 +56,7 @@ function compareBoth(self: unknown, that: unknown) {
|
|
|
55
56
|
* @since 2.0.0
|
|
56
57
|
* @category guards
|
|
57
58
|
*/
|
|
58
|
-
export const isEqual = (u: unknown): u is Equal =>
|
|
59
|
+
export const isEqual = (u: unknown): u is Equal => hasProperty(u, symbol)
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
62
|
* @since 2.0.0
|
package/src/GlobalValue.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @since 2.0.0
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import { moduleVersion } from "./internal/version"
|
|
5
|
+
|
|
6
|
+
const globalStoreId = Symbol.for(`effect/GlobalValue/globalStoreId/${moduleVersion}`)
|
|
5
7
|
|
|
6
8
|
if (!(globalStoreId in globalThis)) {
|
|
7
9
|
;(globalThis as any)[globalStoreId] = new Map()
|
package/src/Hash.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { pipe } from "./Function"
|
|
5
5
|
import { globalValue } from "./GlobalValue"
|
|
6
|
+
import { hasProperty } from "./Predicate"
|
|
6
7
|
import { PCGRandom } from "./Utils"
|
|
7
8
|
|
|
8
9
|
/** @internal */
|
|
@@ -98,7 +99,7 @@ export const optimize = (n: number): number => (n & 0xbfffffff) | ((n >>> 1) & 0
|
|
|
98
99
|
* @since 2.0.0
|
|
99
100
|
* @category guards
|
|
100
101
|
*/
|
|
101
|
-
export const isHash = (u: unknown): u is Hash =>
|
|
102
|
+
export const isHash = (u: unknown): u is Hash => hasProperty(u, symbol)
|
|
102
103
|
|
|
103
104
|
/**
|
|
104
105
|
* @since 2.0.0
|
package/src/Inspectable.ts
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* @since 2.0.0
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import { hasProperty, isFunction } from "./Predicate"
|
|
6
|
+
|
|
5
7
|
/**
|
|
6
8
|
* @since 2.0.0
|
|
7
9
|
* @category symbols
|
|
@@ -29,7 +31,7 @@ export interface Inspectable {
|
|
|
29
31
|
*/
|
|
30
32
|
export const toJSON = (x: unknown): unknown => {
|
|
31
33
|
if (
|
|
32
|
-
|
|
34
|
+
hasProperty(x, "toJSON") && isFunction(x["toJSON"]) &&
|
|
33
35
|
x["toJSON"].length === 0
|
|
34
36
|
) {
|
|
35
37
|
return x.toJSON()
|
package/src/List.ts
CHANGED
|
@@ -32,7 +32,7 @@ import * as Option from "./Option"
|
|
|
32
32
|
import type { Pipeable } from "./Pipeable"
|
|
33
33
|
import { pipeArguments } from "./Pipeable"
|
|
34
34
|
import type { Predicate, Refinement } from "./Predicate"
|
|
35
|
-
import {
|
|
35
|
+
import { hasProperty } from "./Predicate"
|
|
36
36
|
import * as ReadonlyArray from "./ReadonlyArray"
|
|
37
37
|
|
|
38
38
|
/**
|
|
@@ -206,7 +206,7 @@ const _Nil = Object.create(NilProto) as Nil<never>
|
|
|
206
206
|
export const isList: {
|
|
207
207
|
<A>(u: Iterable<A>): u is List<A>
|
|
208
208
|
(u: unknown): u is List<unknown>
|
|
209
|
-
} = (u: unknown): u is List<unknown> =>
|
|
209
|
+
} = (u: unknown): u is List<unknown> => hasProperty(u, TypeId)
|
|
210
210
|
|
|
211
211
|
/**
|
|
212
212
|
* Returns `true` if the specified value is a `List.Nil<A>`, `false` otherwise.
|
|
@@ -671,8 +671,8 @@ export const flatMap: {
|
|
|
671
671
|
* @since 2.0.0
|
|
672
672
|
*/
|
|
673
673
|
export const flatMapNonEmpty: {
|
|
674
|
-
<A, B>(f: (a: A
|
|
675
|
-
<A, B>(self: Cons<A>, f: (a: A
|
|
674
|
+
<A, B>(f: (a: A) => Cons<B>): (self: Cons<A>) => Cons<B>
|
|
675
|
+
<A, B>(self: Cons<A>, f: (a: A) => Cons<B>): Cons<B>
|
|
676
676
|
} = flatMap as any
|
|
677
677
|
|
|
678
678
|
/**
|
|
@@ -734,15 +734,16 @@ export declare namespace List {
|
|
|
734
734
|
export const map: {
|
|
735
735
|
<T extends List<any>, B>(f: (a: List.Infer<T>, i: number) => B): (self: T) => List.With<T, B>
|
|
736
736
|
<T extends List<any>, B>(self: T, f: (a: List.Infer<T>, i: number) => B): List.With<T, B>
|
|
737
|
-
} = dual(2, <A, B>(self: List<A>, f: (a: A) => B): List<B> => {
|
|
737
|
+
} = dual(2, <A, B>(self: List<A>, f: (a: A, i: number) => B): List<B> => {
|
|
738
738
|
if (isNil(self)) {
|
|
739
739
|
return self as unknown as List<B>
|
|
740
740
|
} else {
|
|
741
|
-
|
|
741
|
+
let i = 0
|
|
742
|
+
const head = makeCons(f(self.head, i++), _Nil)
|
|
742
743
|
let nextHead = head
|
|
743
744
|
let rest = self.tail
|
|
744
745
|
while (!isNil(rest)) {
|
|
745
|
-
const next = makeCons(f(rest.head), _Nil)
|
|
746
|
+
const next = makeCons(f(rest.head, i++), _Nil)
|
|
746
747
|
nextHead.tail = next
|
|
747
748
|
nextHead = next
|
|
748
749
|
rest = rest.tail
|
package/src/Predicate.ts
CHANGED
|
@@ -282,7 +282,25 @@ export const isUnknown: (input: unknown) => input is unknown = (_): _ is unknown
|
|
|
282
282
|
* @since 2.0.0
|
|
283
283
|
*/
|
|
284
284
|
export const isObject = (input: unknown): input is object =>
|
|
285
|
-
(typeof input === "object" && input
|
|
285
|
+
(typeof input === "object" && input !== null) || isFunction(input)
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Checks whether a value is an `object` containing a specified property key.
|
|
289
|
+
*
|
|
290
|
+
* @param property - The field to check within the object.
|
|
291
|
+
* @param self - The value to examine.
|
|
292
|
+
*
|
|
293
|
+
* @category guards
|
|
294
|
+
* @since 2.0.0
|
|
295
|
+
*/
|
|
296
|
+
export const hasProperty: {
|
|
297
|
+
<P extends PropertyKey>(property: P): (self: unknown) => self is { [K in P]: unknown }
|
|
298
|
+
<P extends PropertyKey>(self: unknown, property: P): self is { [K in P]: unknown }
|
|
299
|
+
} = dual(
|
|
300
|
+
2,
|
|
301
|
+
<P extends PropertyKey>(self: unknown, property: P): self is { [K in P]: unknown } =>
|
|
302
|
+
isObject(self) && (property in self)
|
|
303
|
+
)
|
|
286
304
|
|
|
287
305
|
/**
|
|
288
306
|
* Tests if a value is an `object` with a property `_tag` that matches the given tag.
|
|
@@ -308,8 +326,7 @@ export const isTagged: {
|
|
|
308
326
|
<K extends string>(self: unknown, tag: K): self is { _tag: K }
|
|
309
327
|
} = dual(
|
|
310
328
|
2,
|
|
311
|
-
<K extends string>(self: unknown, tag: K): self is { _tag: K } =>
|
|
312
|
-
isObject(self) && "_tag" in self && self["_tag"] === tag
|
|
329
|
+
<K extends string>(self: unknown, tag: K): self is { _tag: K } => hasProperty(self, "_tag") && self["_tag"] === tag
|
|
313
330
|
)
|
|
314
331
|
|
|
315
332
|
/**
|
|
@@ -421,7 +438,7 @@ export const isDate = (input: unknown): input is Date => input instanceof Date
|
|
|
421
438
|
* @category guards
|
|
422
439
|
* @since 2.0.0
|
|
423
440
|
*/
|
|
424
|
-
export const isIterable = (input: unknown): input is Iterable<unknown> =>
|
|
441
|
+
export const isIterable = (input: unknown): input is Iterable<unknown> => hasProperty(input, Symbol.iterator)
|
|
425
442
|
|
|
426
443
|
/**
|
|
427
444
|
* A guard that succeeds when the input is a record.
|
package/src/RequestResolver.ts
CHANGED
|
@@ -231,7 +231,7 @@ export const fromFunction: <A extends Request.Request<never, any>>(
|
|
|
231
231
|
* @category constructors
|
|
232
232
|
*/
|
|
233
233
|
export const fromFunctionBatched: <A extends Request.Request<never, any>>(
|
|
234
|
-
f: (chunk: Array<A>) =>
|
|
234
|
+
f: (chunk: Array<A>) => Iterable<Request.Request.Success<A>>
|
|
235
235
|
) => RequestResolver<A, never> = internal.fromFunctionBatched
|
|
236
236
|
|
|
237
237
|
/**
|
|
@@ -240,9 +240,31 @@ export const fromFunctionBatched: <A extends Request.Request<never, any>>(
|
|
|
240
240
|
* @since 2.0.0
|
|
241
241
|
* @category constructors
|
|
242
242
|
*/
|
|
243
|
-
export const
|
|
243
|
+
export const fromEffect: <R, A extends Request.Request<any, any>>(
|
|
244
244
|
f: (a: A) => Effect.Effect<R, Request.Request.Error<A>, Request.Request.Success<A>>
|
|
245
|
-
) => RequestResolver<A, R> = internal.
|
|
245
|
+
) => RequestResolver<A, R> = internal.fromEffect
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Constructs a data source from a list of tags paired to functions, that takes
|
|
249
|
+
* a list of requests and returns a list of results of the same size. Each item
|
|
250
|
+
* in the result list must correspond to the item at the same index in the
|
|
251
|
+
* request list.
|
|
252
|
+
*
|
|
253
|
+
* @since 2.0.0
|
|
254
|
+
* @category constructors
|
|
255
|
+
*/
|
|
256
|
+
export const fromEffectTagged: <A extends Request.Request<any, any> & { readonly _tag: string }>() => <
|
|
257
|
+
Fns extends {
|
|
258
|
+
readonly [Tag in A["_tag"]]: [Extract<A, { readonly _tag: Tag }>] extends [infer Req]
|
|
259
|
+
? Req extends Request.Request<infer ReqE, infer ReqA>
|
|
260
|
+
? (requests: Array<Req>) => Effect.Effect<any, ReqE, Iterable<ReqA>>
|
|
261
|
+
: never
|
|
262
|
+
: never
|
|
263
|
+
}
|
|
264
|
+
>(
|
|
265
|
+
fns: Fns
|
|
266
|
+
) => RequestResolver<A, ReturnType<Fns[keyof Fns]> extends Effect.Effect<infer R, infer _E, infer _A> ? R : never> =
|
|
267
|
+
internal.fromEffectTagged
|
|
246
268
|
|
|
247
269
|
/**
|
|
248
270
|
* A data source that never executes requests.
|
package/src/SortedMap.ts
CHANGED
|
@@ -10,7 +10,7 @@ import * as Option from "./Option"
|
|
|
10
10
|
import type { Order } from "./Order"
|
|
11
11
|
import type { Pipeable } from "./Pipeable"
|
|
12
12
|
import { pipeArguments } from "./Pipeable"
|
|
13
|
-
import {
|
|
13
|
+
import { hasProperty } from "./Predicate"
|
|
14
14
|
import * as RBT from "./RedBlackTree"
|
|
15
15
|
|
|
16
16
|
const TypeId: unique symbol = Symbol.for("effect/SortedMap")
|
|
@@ -72,7 +72,7 @@ const makeImpl = <K, V>(tree: RBT.RedBlackTree<K, V>): SortedMap<K, V> => {
|
|
|
72
72
|
export const isSortedMap: {
|
|
73
73
|
<K, V>(u: Iterable<readonly [K, V]>): u is SortedMap<K, V>
|
|
74
74
|
(u: unknown): u is SortedMap<unknown, unknown>
|
|
75
|
-
} = (u: unknown): u is SortedMap<unknown, unknown> =>
|
|
75
|
+
} = (u: unknown): u is SortedMap<unknown, unknown> => hasProperty(u, TypeId)
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* @since 2.0.0
|
package/src/SortedSet.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { Order } from "./Order"
|
|
|
11
11
|
import type { Pipeable } from "./Pipeable"
|
|
12
12
|
import { pipeArguments } from "./Pipeable"
|
|
13
13
|
import type { Predicate, Refinement } from "./Predicate"
|
|
14
|
-
import {
|
|
14
|
+
import { hasProperty } from "./Predicate"
|
|
15
15
|
import * as RBT from "./RedBlackTree"
|
|
16
16
|
|
|
17
17
|
const TypeId: unique symbol = Symbol.for("effect/SortedSet")
|
|
@@ -77,7 +77,7 @@ const fromTree = <A>(keyTree: RBT.RedBlackTree<A, boolean>): SortedSet<A> => {
|
|
|
77
77
|
export const isSortedSet: {
|
|
78
78
|
<A>(u: Iterable<A>): u is SortedSet<A>
|
|
79
79
|
(u: unknown): u is SortedSet<unknown>
|
|
80
|
-
} = (u: unknown): u is SortedSet<unknown> =>
|
|
80
|
+
} = (u: unknown): u is SortedSet<unknown> => hasProperty(u, TypeId)
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* @since 2.0.0
|
package/src/Stream.ts
CHANGED
|
@@ -144,6 +144,23 @@ export declare namespace Stream {
|
|
|
144
144
|
*/
|
|
145
145
|
export const DefaultChunkSize: number = internal.DefaultChunkSize
|
|
146
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Collects each underlying Chunk of the stream into a new chunk, and emits it
|
|
149
|
+
* on each pull.
|
|
150
|
+
*
|
|
151
|
+
* @since 2.0.0
|
|
152
|
+
* @category utils
|
|
153
|
+
*/
|
|
154
|
+
export const accumulate: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, Chunk.Chunk<A>> = internal.accumulate
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Re-chunks the elements of the stream by accumulating each underlying chunk.
|
|
158
|
+
*
|
|
159
|
+
* @since 2.0.0
|
|
160
|
+
* @category utils
|
|
161
|
+
*/
|
|
162
|
+
export const accumulateChunks: <R, E, A>(self: Stream<R, E, A>) => Stream<R, E, A> = internal.accumulateChunks
|
|
163
|
+
|
|
147
164
|
/**
|
|
148
165
|
* Creates a stream from a single value that will get cleaned up after the
|
|
149
166
|
* stream is consumed.
|
package/src/TestAnnotation.ts
CHANGED
|
@@ -10,6 +10,7 @@ import { pipe } from "./Function"
|
|
|
10
10
|
import * as Hash from "./Hash"
|
|
11
11
|
import * as HashSet from "./HashSet"
|
|
12
12
|
import type * as MutableRef from "./MutableRef"
|
|
13
|
+
import { hasProperty } from "./Predicate"
|
|
13
14
|
import type * as SortedSet from "./SortedSet"
|
|
14
15
|
|
|
15
16
|
/** @internal */
|
|
@@ -62,9 +63,7 @@ class TestAnnotationImpl<A> implements Equal.Equal {
|
|
|
62
63
|
/**
|
|
63
64
|
* @since 2.0.0
|
|
64
65
|
*/
|
|
65
|
-
export const isTestAnnotation = (u: unknown): u is TestAnnotation<unknown> =>
|
|
66
|
-
return typeof u === "object" && u != null && TestAnnotationTypeId in u
|
|
67
|
-
}
|
|
66
|
+
export const isTestAnnotation = (u: unknown): u is TestAnnotation<unknown> => hasProperty(u, TestAnnotationTypeId)
|
|
68
67
|
|
|
69
68
|
/**
|
|
70
69
|
* @since 2.0.0
|
package/src/TestAnnotationMap.ts
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* @since 2.0.0
|
|
3
3
|
*/
|
|
4
4
|
import { dual, pipe } from "./Function"
|
|
5
|
+
import { hasProperty } from "./Predicate"
|
|
5
6
|
import type * as TestAnnotation from "./TestAnnotation"
|
|
6
7
|
|
|
7
8
|
/**
|
|
@@ -35,9 +36,7 @@ class TestAnnotationMapImpl implements TestAnnotationMap {
|
|
|
35
36
|
/**
|
|
36
37
|
* @since 2.0.0
|
|
37
38
|
*/
|
|
38
|
-
export const isTestAnnotationMap = (u: unknown): u is TestAnnotationMap =>
|
|
39
|
-
return typeof u === "object" && u != null && TestAnnotationMapTypeId in u
|
|
40
|
-
}
|
|
39
|
+
export const isTestAnnotationMap = (u: unknown): u is TestAnnotationMap => hasProperty(u, TestAnnotationMapTypeId)
|
|
41
40
|
|
|
42
41
|
/**
|
|
43
42
|
* @since 2.0.0
|