effect 4.0.0-beta.65 → 4.0.0-beta.67
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/dist/Array.d.ts +113 -67
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +28 -18
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +404 -337
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +190 -146
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +167 -97
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +87 -47
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +62 -31
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +30 -15
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +20 -1
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +16 -0
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +236 -132
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +133 -57
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +77 -65
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +43 -36
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +1518 -575
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +661 -287
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +119 -10
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +45 -6
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +548 -379
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +238 -170
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +15 -8
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +8 -4
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +2 -4
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +2 -4
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +5 -4
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +9 -8
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +1 -1
- package/dist/ConfigProvider.js +1 -1
- package/dist/Console.d.ts +76 -50
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +69 -46
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +386 -138
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +144 -62
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +69 -48
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +96 -36
- package/dist/Cron.js.map +1 -1
- package/dist/Data.d.ts +3 -2
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +875 -444
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +376 -217
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +367 -174
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +145 -71
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +42 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Differ.js +36 -0
- package/dist/Duration.d.ts +329 -185
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +174 -106
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2445 -2356
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +906 -758
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +38 -3
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +3 -3
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +78 -28
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +75 -27
- package/dist/Encoding.js.map +1 -1
- package/dist/Equivalence.d.ts +14 -19
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +14 -19
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +66 -82
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +38 -29
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +96 -12
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +21 -6
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +7 -5
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +72 -40
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +39 -21
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +119 -58
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +122 -40
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +288 -160
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +176 -74
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +93 -52
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +97 -34
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +104 -73
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +53 -39
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +166 -88
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +68 -42
- package/dist/Filter.js.map +1 -1
- package/dist/Function.d.ts +154 -86
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +53 -37
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +682 -365
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +308 -157
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +29 -13
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +31 -18
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +25 -15
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +444 -256
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +223 -105
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +36 -17
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +75 -8
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +194 -104
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +93 -38
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +20 -9
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +16 -6
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +309 -149
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +129 -65
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +4 -3
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +4 -3
- package/dist/JsonPatch.js.map +1 -1
- package/dist/Latch.d.ts +98 -15
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +41 -10
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +412 -309
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +262 -181
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +95 -21
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +58 -14
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +92 -131
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +25 -15
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +155 -99
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +211 -184
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +75 -17
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +22 -16
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +133 -157
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +85 -76
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +325 -284
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +217 -212
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +117 -58
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +52 -29
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +52 -30
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +94 -38
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +92 -49
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +123 -71
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +99 -62
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +79 -60
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +3 -0
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +36 -39
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +34 -20
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +116 -64
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +54 -30
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +1 -2
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +0 -1
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +38 -53
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +87 -11
- package/dist/Option.js.map +1 -1
- package/dist/Ordering.d.ts +43 -28
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +4 -2
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +225 -40
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +113 -17
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +77 -13
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +48 -4
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +71 -15
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +59 -12
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +74 -6
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +68 -5
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +66 -31
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +26 -24
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +16 -21
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +9 -14
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +9 -2
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +7 -1
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +364 -262
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +245 -174
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +94 -25
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +61 -13
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +284 -150
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +216 -113
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +54 -35
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +36 -24
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +151 -141
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +66 -20
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +69 -32
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +33 -16
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +273 -129
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +117 -57
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +3 -3
- package/dist/Redactable.js +2 -2
- package/dist/Redacted.d.ts +63 -33
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +30 -14
- package/dist/Redacted.js.map +1 -1
- package/dist/Ref.d.ts +81 -52
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +54 -35
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +73 -31
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +66 -30
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +11 -5
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +11 -5
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +158 -34
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +67 -12
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +261 -116
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +77 -41
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +13 -7
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +44 -6
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +26 -16
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +6 -6
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +43 -18
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +35 -16
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +545 -576
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +261 -247
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +43 -6
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +33 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +815 -294
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +287 -193
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +24 -15
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +13 -9
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +26 -13
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +24 -11
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +1 -8
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +194 -25
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +220 -26
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +2 -2
- package/dist/SchemaTransformation.d.ts +61 -41
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +56 -33
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +7 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +23 -0
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +102 -43
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +57 -23
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +138 -46
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +80 -19
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +28 -8
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +25 -5
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +64 -28
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +22 -13
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +458 -200
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +240 -89
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +43 -6
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +33 -4
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +1899 -1186
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +868 -525
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +171 -95
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +125 -67
- package/dist/String.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +308 -203
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +125 -76
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +13 -5
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +13 -5
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +278 -62
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +116 -23
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +26 -2
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +4 -1
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +39 -7
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +10 -4
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +229 -55
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +94 -18
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +213 -142
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +88 -60
- package/dist/Trie.js.map +1 -1
- package/dist/TxChunk.d.ts +182 -146
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +73 -56
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +43 -29
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +22 -15
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +362 -222
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +171 -98
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +178 -104
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +84 -43
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +93 -62
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +54 -36
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +77 -49
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +60 -37
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +279 -241
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +147 -101
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +69 -46
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +48 -32
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +69 -40
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +35 -20
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +101 -54
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +76 -34
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +72 -48
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +33 -22
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +34 -34
- package/dist/UndefinedOr.d.ts +48 -25
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +28 -25
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +71 -116
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +20 -6
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +4 -0
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +4 -0
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +81 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -32
- package/dist/index.js.map +1 -1
- package/dist/internal/concurrency.js +2 -2
- package/dist/internal/concurrency.js.map +1 -1
- package/dist/internal/core.js +8 -20
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js +20 -19
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/executionPlan.js +2 -2
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/option.js +5 -8
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/result.js +5 -8
- package/dist/internal/result.js.map +1 -1
- package/dist/internal/schema/schema.js +1 -1
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +6 -3
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +6 -3
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts +39 -34
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +42 -12
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +39 -30
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +25 -10
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.js +7 -7
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +197 -130
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +166 -102
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -2
- package/dist/unstable/ai/Chat.d.ts +65 -41
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +51 -33
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +12 -11
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +9 -8
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +28 -18
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +18 -11
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +36 -30
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +21 -15
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +339 -119
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +264 -98
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +53 -19
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +65 -17
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +13 -7
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +11 -9
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -2
- package/dist/unstable/ai/Prompt.d.ts +194 -168
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +75 -66
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +153 -140
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +43 -48
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +43 -4
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +27 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +42 -32
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +14 -10
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +13 -8
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +10 -6
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +153 -84
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +97 -44
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +33 -42
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +35 -36
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +42 -24
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +42 -24
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +226 -134
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +101 -65
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +72 -26
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +86 -23
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +43 -13
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +30 -6
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +218 -117
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +45 -31
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +7 -7
- package/dist/unstable/cli/Completions.js +1 -1
- package/dist/unstable/cli/Flag.d.ts +235 -142
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +111 -71
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +42 -14
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +30 -7
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +35 -10
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/HelpDoc.js +21 -0
- package/dist/unstable/cli/Param.d.ts +79 -31
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +161 -99
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +79 -42
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +66 -35
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +178 -47
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +111 -31
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.d.ts.map +1 -1
- package/dist/unstable/cli/internal/ansi.js +13 -0
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +7 -7
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +12 -10
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/config.d.ts +3 -0
- package/dist/unstable/cli/internal/config.d.ts.map +1 -1
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cli/internal/lexer.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +35 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +35 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +56 -7
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +56 -7
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +39 -5
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +39 -5
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +61 -8
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +61 -8
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +14 -2
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +36 -3
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +39 -4
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +11 -3
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +75 -16
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +78 -13
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +30 -2
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +30 -2
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts +18 -3
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.js +15 -2
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +34 -2
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +24 -2
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +17 -2
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +40 -8
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +43 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +11 -4
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts +27 -3
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityType.js +24 -2
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +105 -23
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +88 -14
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +88 -13
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +88 -13
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +49 -6
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +31 -6
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.d.ts +24 -3
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.js +21 -2
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +102 -13
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +86 -10
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +127 -21
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +71 -11
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +101 -12
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +64 -8
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +47 -17
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +47 -17
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +34 -2
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +34 -2
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +40 -12
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +40 -12
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +7 -4
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +31 -4
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +42 -5
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +38 -4
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +73 -10
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +70 -9
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +51 -5
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +47 -4
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +10 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +35 -4
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +65 -9
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +67 -10
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -6
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -4
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +23 -1
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +23 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts +15 -1
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.js +15 -1
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +21 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +21 -1
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +89 -19
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +48 -13
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +8 -2
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +29 -2
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +11 -3
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +27 -3
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +11 -3
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +46 -7
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +18 -1
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +18 -1
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/internal/hash.js +12 -0
- package/dist/unstable/cluster/internal/hash.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts +26 -3
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/devtools/DevTools.js +26 -3
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +20 -5
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +32 -5
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +184 -44
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +102 -20
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +27 -2
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +21 -1
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +81 -12
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +75 -9
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +149 -21
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +97 -13
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +109 -18
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +69 -13
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +115 -30
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +22 -2
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +50 -17
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +24 -6
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +104 -20
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +108 -16
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +151 -31
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +111 -20
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +42 -6
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +38 -5
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +96 -22
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +72 -16
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +35 -8
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +54 -8
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +17 -3
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +17 -3
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +32 -6
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +52 -6
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +74 -16
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +90 -16
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +59 -15
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +73 -14
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +10 -2
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +28 -2
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +32 -3
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +32 -3
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts +10 -2
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +28 -2
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +156 -77
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +93 -39
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +40 -7
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +27 -4
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +29 -3
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +33 -4
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/FindMyWay.d.ts +1 -1
- package/dist/unstable/http/FindMyWay.js +1 -1
- package/dist/unstable/http/Headers.d.ts +182 -36
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +86 -16
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +114 -26
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +100 -22
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +205 -96
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +85 -39
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +68 -12
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +71 -9
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +318 -100
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +153 -47
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +59 -16
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +44 -11
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +42 -16
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +33 -13
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +47 -7
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +44 -6
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +35 -5
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +23 -1
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +37 -11
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +70 -31
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +34 -3
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +35 -4
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +194 -45
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +122 -28
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +151 -22
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +77 -12
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +90 -10
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +82 -8
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +125 -21
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +112 -31
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +32 -6
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +43 -5
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +390 -67
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +209 -38
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +22 -4
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +22 -4
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +53 -6
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +47 -5
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +178 -28
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +130 -20
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts +1 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +1 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Node.js +1 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Search.js +1 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +1 -1
- package/dist/unstable/http/Multipasta/Web.js +1 -1
- package/dist/unstable/http/Multipasta.d.ts +1 -1
- package/dist/unstable/http/Multipasta.js +1 -1
- package/dist/unstable/http/Template.d.ts +53 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +26 -0
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +56 -42
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +29 -15
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +233 -49
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +116 -23
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +49 -14
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +14 -8
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +55 -16
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +47 -9
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +58 -15
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +43 -7
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +214 -59
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +53 -9
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +81 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +98 -1
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +87 -20
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +5 -2
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +113 -22
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -6
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +19 -4
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +32 -2
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +67 -30
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +48 -27
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +74 -17
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +38 -5
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts +5 -2
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +24 -2
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +9 -2
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +28 -3
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +86 -15
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +73 -15
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +33 -3
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js +14 -3
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +8 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +32 -1
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +14 -2
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +29 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +15 -4
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +32 -2
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +49 -12
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +47 -5
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +28 -3
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +28 -3
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +16 -2
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +32 -2
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +32 -12
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +7 -5
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/observability/index.d.ts +2 -1
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +2 -1
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +93 -18
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +81 -21
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +76 -15
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +22 -5
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +27 -2
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +24 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +73 -16
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +60 -13
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +97 -16
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +90 -14
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +97 -21
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +82 -17
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +26 -5
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +36 -4
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +89 -109
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +74 -23
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +22 -11
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +11 -6
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.d.ts +2 -1
- package/dist/unstable/process/index.d.ts.map +1 -1
- package/dist/unstable/process/index.js +2 -1
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +196 -59
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +121 -36
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +539 -130
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +256 -62
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +41 -2
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +35 -1
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +51 -7
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +29 -3
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +135 -21
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +69 -10
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +36 -2
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +29 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +28 -5
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +35 -3
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +95 -13
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +61 -7
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +255 -56
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +44 -11
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +81 -19
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +53 -13
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +26 -2
- package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +26 -2
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +51 -8
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +3 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +128 -32
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +23 -7
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +100 -20
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +39 -3
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +38 -4
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +34 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +60 -13
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +56 -12
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +73 -23
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +70 -23
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.d.ts +20 -1
- package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcTest.js +20 -1
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +40 -6
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js +17 -5
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts +8 -0
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +8 -0
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +130 -52
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +79 -34
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +104 -24
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +22 -6
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +167 -34
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +124 -29
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +58 -10
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +43 -5
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts +35 -4
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +45 -5
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +34 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +38 -1
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +31 -0
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js +22 -0
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +99 -0
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +114 -0
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +26 -5
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +8 -4
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +56 -13
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +44 -10
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +29 -8
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +29 -8
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/SqlStream.d.ts +3 -0
- package/dist/unstable/sql/SqlStream.d.ts.map +1 -1
- package/dist/unstable/sql/SqlStream.js +23 -0
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +124 -0
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +82 -0
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +1 -1
- package/dist/unstable/sql/index.js +1 -1
- package/dist/unstable/workers/Transferable.d.ts +65 -13
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +53 -10
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +60 -8
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +43 -4
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +31 -9
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.js +44 -7
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +32 -3
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +24 -1
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.d.ts +1 -1
- package/dist/unstable/workers/index.js +1 -1
- package/dist/unstable/workflow/Activity.d.ts +61 -10
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +21 -6
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +12 -3
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +22 -2
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +126 -31
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +76 -13
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +145 -0
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -0
- package/dist/unstable/workflow/DurableQueue.js +200 -0
- package/dist/unstable/workflow/DurableQueue.js.map +1 -0
- package/dist/unstable/workflow/Workflow.d.ts +100 -31
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +76 -20
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +40 -5
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +16 -4
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +32 -2
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +2 -2
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts +36 -2
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +12 -6
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/dist/unstable/workflow/index.d.ts +4 -0
- package/dist/unstable/workflow/index.d.ts.map +1 -1
- package/dist/unstable/workflow/index.js +4 -0
- package/dist/unstable/workflow/index.js.map +1 -1
- package/package.json +11 -11
- package/src/Array.ts +113 -67
- package/src/BigDecimal.ts +404 -337
- package/src/BigInt.ts +167 -97
- package/src/Boolean.ts +62 -31
- package/src/Brand.ts +20 -1
- package/src/Cache.ts +331 -164
- package/src/Cause.ts +77 -65
- package/src/Channel.ts +1585 -607
- package/src/ChannelSchema.ts +137 -12
- package/src/Chunk.ts +549 -380
- package/src/Clock.ts +15 -8
- package/src/Combiner.ts +2 -4
- package/src/Config.ts +12 -10
- package/src/ConfigProvider.ts +1 -1
- package/src/Console.ts +88 -58
- package/src/Context.ts +397 -149
- package/src/Cron.ts +111 -48
- package/src/Data.ts +3 -2
- package/src/DateTime.ts +876 -445
- package/src/Deferred.ts +367 -174
- package/src/Differ.ts +42 -0
- package/src/Duration.ts +329 -185
- package/src/Effect.ts +2474 -2395
- package/src/Effectable.ts +39 -4
- package/src/Encoding.ts +78 -28
- package/src/Equivalence.ts +14 -19
- package/src/ErrorReporter.ts +66 -82
- package/src/ExecutionPlan.ts +97 -13
- package/src/Exit.ts +7 -5
- package/src/Fiber.ts +72 -40
- package/src/FiberHandle.ts +158 -58
- package/src/FiberMap.ts +329 -164
- package/src/FiberSet.ts +130 -52
- package/src/FileSystem.ts +106 -74
- package/src/Filter.ts +166 -88
- package/src/Function.ts +154 -86
- package/src/Graph.ts +682 -365
- package/src/HKT.ts +29 -13
- package/src/Hash.ts +31 -18
- package/src/HashMap.ts +444 -256
- package/src/HashRing.ts +94 -17
- package/src/HashSet.ts +194 -104
- package/src/Inspectable.ts +22 -10
- package/src/Iterable.ts +309 -149
- package/src/JsonPatch.ts +4 -3
- package/src/Latch.ts +98 -15
- package/src/Layer.ts +488 -345
- package/src/LayerMap.ts +98 -25
- package/src/LogLevel.ts +92 -131
- package/src/Logger.ts +357 -288
- package/src/ManagedRuntime.ts +75 -17
- package/src/Match.ts +133 -157
- package/src/Metric.ts +355 -304
- package/src/MutableHashMap.ts +161 -84
- package/src/MutableHashSet.ts +122 -52
- package/src/MutableList.ts +141 -81
- package/src/MutableRef.ts +130 -90
- package/src/Newtype.ts +3 -0
- package/src/NonEmptyIterable.ts +36 -39
- package/src/Number.ts +116 -64
- package/src/Optic.ts +1 -2
- package/src/Option.ts +41 -53
- package/src/Ordering.ts +43 -28
- package/src/PartitionedSemaphore.ts +225 -40
- package/src/Path.ts +77 -13
- package/src/Pipeable.ts +76 -21
- package/src/PlatformError.ts +74 -6
- package/src/Pool.ts +94 -31
- package/src/Predicate.ts +16 -21
- package/src/PrimaryKey.ts +9 -2
- package/src/PubSub.ts +364 -262
- package/src/Pull.ts +94 -25
- package/src/Queue.ts +284 -150
- package/src/Random.ts +54 -35
- package/src/RcMap.ts +151 -141
- package/src/RcRef.ts +69 -32
- package/src/Record.ts +273 -129
- package/src/Redactable.ts +3 -3
- package/src/Redacted.ts +63 -33
- package/src/Ref.ts +161 -104
- package/src/References.ts +73 -31
- package/src/RegExp.ts +11 -5
- package/src/Request.ts +158 -34
- package/src/RequestResolver.ts +277 -119
- package/src/Resource.ts +45 -7
- package/src/Result.ts +31 -18
- package/src/Runtime.ts +45 -19
- package/src/Schedule.ts +575 -600
- package/src/Scheduler.ts +43 -6
- package/src/Schema.ts +845 -319
- package/src/SchemaAST.ts +25 -16
- package/src/SchemaGetter.ts +32 -17
- package/src/SchemaIssue.ts +1 -8
- package/src/SchemaParser.ts +262 -38
- package/src/SchemaTransformation.ts +61 -41
- package/src/SchemaUtils.ts +23 -0
- package/src/Scope.ts +102 -43
- package/src/ScopedCache.ts +192 -56
- package/src/ScopedRef.ts +28 -8
- package/src/Semaphore.ts +64 -28
- package/src/Sink.ts +458 -200
- package/src/Stdio.ts +43 -6
- package/src/Stream.ts +2043 -1256
- package/src/String.ts +171 -95
- package/src/SubscriptionRef.ts +308 -203
- package/src/Symbol.ts +13 -5
- package/src/SynchronizedRef.ts +278 -62
- package/src/Take.ts +26 -2
- package/src/Terminal.ts +40 -7
- package/src/Tracer.ts +229 -55
- package/src/Trie.ts +213 -142
- package/src/TxChunk.ts +182 -146
- package/src/TxDeferred.ts +43 -29
- package/src/TxHashMap.ts +370 -230
- package/src/TxHashSet.ts +250 -152
- package/src/TxPriorityQueue.ts +96 -64
- package/src/TxPubSub.ts +77 -49
- package/src/TxQueue.ts +279 -241
- package/src/TxReentrantLock.ts +70 -47
- package/src/TxRef.ts +70 -41
- package/src/TxSemaphore.ts +101 -54
- package/src/TxSubscriptionRef.ts +72 -48
- package/src/Types.ts +34 -34
- package/src/UndefinedOr.ts +48 -25
- package/src/Unify.ts +71 -116
- package/src/Utils.ts +4 -0
- package/src/index.ts +81 -32
- package/src/internal/concurrency.ts +2 -2
- package/src/internal/core.ts +12 -23
- package/src/internal/effect.ts +25 -29
- package/src/internal/executionPlan.ts +2 -2
- package/src/internal/option.ts +5 -8
- package/src/internal/result.ts +5 -8
- package/src/internal/schema/schema.ts +1 -1
- package/src/testing/FastCheck.ts +6 -3
- package/src/testing/TestClock.ts +63 -34
- package/src/testing/TestConsole.ts +49 -30
- package/src/testing/TestSchema.ts +8 -8
- package/src/unstable/ai/AiError.ts +187 -120
- package/src/unstable/ai/AnthropicStructuredOutput.ts +2 -2
- package/src/unstable/ai/Chat.ts +69 -43
- package/src/unstable/ai/EmbeddingModel.ts +12 -11
- package/src/unstable/ai/IdGenerator.ts +28 -18
- package/src/unstable/ai/LanguageModel.ts +47 -46
- package/src/unstable/ai/McpSchema.ts +339 -119
- package/src/unstable/ai/McpServer.ts +78 -21
- package/src/unstable/ai/Model.ts +23 -18
- package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
- package/src/unstable/ai/Prompt.ts +210 -184
- package/src/unstable/ai/Response.ts +159 -147
- package/src/unstable/ai/ResponseIdTracker.ts +43 -4
- package/src/unstable/ai/Telemetry.ts +42 -32
- package/src/unstable/ai/Tokenizer.ts +13 -8
- package/src/unstable/ai/Tool.ts +154 -85
- package/src/unstable/ai/Toolkit.ts +81 -84
- package/src/unstable/ai/index.ts +42 -24
- package/src/unstable/cli/Argument.ts +226 -134
- package/src/unstable/cli/CliError.ts +96 -26
- package/src/unstable/cli/CliOutput.ts +43 -13
- package/src/unstable/cli/Command.ts +225 -125
- package/src/unstable/cli/Completions.ts +7 -7
- package/src/unstable/cli/Flag.ts +235 -142
- package/src/unstable/cli/GlobalFlag.ts +42 -14
- package/src/unstable/cli/HelpDoc.ts +35 -10
- package/src/unstable/cli/Param.ts +328 -190
- package/src/unstable/cli/Primitive.ts +79 -42
- package/src/unstable/cli/Prompt.ts +210 -58
- package/src/unstable/cli/internal/ansi.ts +13 -0
- package/src/unstable/cli/internal/command.ts +17 -15
- package/src/unstable/cli/internal/config.ts +3 -0
- package/src/unstable/cli/internal/lexer.ts +11 -0
- package/src/unstable/cluster/ClusterCron.ts +35 -1
- package/src/unstable/cluster/ClusterError.ts +56 -7
- package/src/unstable/cluster/ClusterMetrics.ts +39 -5
- package/src/unstable/cluster/ClusterSchema.ts +61 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +36 -3
- package/src/unstable/cluster/DeliverAt.ts +39 -4
- package/src/unstable/cluster/Entity.ts +110 -19
- package/src/unstable/cluster/EntityAddress.ts +30 -2
- package/src/unstable/cluster/EntityId.ts +18 -3
- package/src/unstable/cluster/EntityProxy.ts +34 -2
- package/src/unstable/cluster/EntityProxyServer.ts +44 -8
- package/src/unstable/cluster/EntityResource.ts +43 -6
- package/src/unstable/cluster/EntityType.ts +27 -3
- package/src/unstable/cluster/Envelope.ts +128 -23
- package/src/unstable/cluster/HttpRunner.ts +88 -13
- package/src/unstable/cluster/K8sHttpClient.ts +49 -6
- package/src/unstable/cluster/MachineId.ts +24 -3
- package/src/unstable/cluster/Message.ts +102 -13
- package/src/unstable/cluster/MessageStorage.ts +128 -22
- package/src/unstable/cluster/Reply.ts +101 -12
- package/src/unstable/cluster/Runner.ts +47 -17
- package/src/unstable/cluster/RunnerAddress.ts +34 -2
- package/src/unstable/cluster/RunnerHealth.ts +40 -12
- package/src/unstable/cluster/RunnerServer.ts +31 -4
- package/src/unstable/cluster/RunnerStorage.ts +42 -5
- package/src/unstable/cluster/Runners.ts +73 -10
- package/src/unstable/cluster/ShardId.ts +51 -5
- package/src/unstable/cluster/Sharding.ts +35 -4
- package/src/unstable/cluster/ShardingConfig.ts +76 -11
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +31 -7
- package/src/unstable/cluster/SingleRunner.ts +23 -1
- package/src/unstable/cluster/Singleton.ts +15 -1
- package/src/unstable/cluster/SingletonAddress.ts +21 -1
- package/src/unstable/cluster/Snowflake.ts +89 -19
- package/src/unstable/cluster/SocketRunner.ts +29 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +27 -3
- package/src/unstable/cluster/SqlRunnerStorage.ts +46 -7
- package/src/unstable/cluster/TestRunner.ts +18 -1
- package/src/unstable/cluster/internal/hash.ts +12 -0
- package/src/unstable/devtools/DevTools.ts +26 -3
- package/src/unstable/devtools/DevToolsClient.ts +32 -5
- package/src/unstable/devtools/DevToolsSchema.ts +201 -44
- package/src/unstable/devtools/DevToolsServer.ts +27 -2
- package/src/unstable/encoding/Msgpack.ts +97 -12
- package/src/unstable/encoding/Ndjson.ts +149 -21
- package/src/unstable/encoding/Sse.ts +109 -18
- package/src/unstable/eventlog/Event.ts +131 -30
- package/src/unstable/eventlog/EventGroup.ts +50 -17
- package/src/unstable/eventlog/EventJournal.ts +120 -20
- package/src/unstable/eventlog/EventLog.ts +151 -31
- package/src/unstable/eventlog/EventLogEncryption.ts +42 -6
- package/src/unstable/eventlog/EventLogMessage.ts +92 -18
- package/src/unstable/eventlog/EventLogRemote.ts +54 -8
- package/src/unstable/eventlog/EventLogServer.ts +33 -3
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +52 -6
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +90 -16
- package/src/unstable/eventlog/EventLogSessionAuth.ts +77 -15
- package/src/unstable/eventlog/SqlEventJournal.ts +28 -2
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +32 -3
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +28 -2
- package/src/unstable/http/Cookies.ts +156 -77
- package/src/unstable/http/Etag.ts +40 -7
- package/src/unstable/http/FetchHttpClient.ts +33 -4
- package/src/unstable/http/FindMyWay.ts +1 -1
- package/src/unstable/http/Headers.ts +252 -50
- package/src/unstable/http/HttpBody.ts +130 -28
- package/src/unstable/http/HttpClient.ts +206 -97
- package/src/unstable/http/HttpClientError.ts +80 -12
- package/src/unstable/http/HttpClientRequest.ts +320 -102
- package/src/unstable/http/HttpClientResponse.ts +59 -16
- package/src/unstable/http/HttpEffect.ts +66 -18
- package/src/unstable/http/HttpIncomingMessage.ts +47 -7
- package/src/unstable/http/HttpMethod.ts +35 -5
- package/src/unstable/http/HttpMiddleware.ts +63 -16
- package/src/unstable/http/HttpPlatform.ts +35 -4
- package/src/unstable/http/HttpRouter.ts +221 -57
- package/src/unstable/http/HttpServer.ts +152 -23
- package/src/unstable/http/HttpServerError.ts +90 -10
- package/src/unstable/http/HttpServerRequest.ts +136 -32
- package/src/unstable/http/HttpServerRespondable.ts +49 -6
- package/src/unstable/http/HttpServerResponse.ts +395 -72
- package/src/unstable/http/HttpStaticServer.ts +22 -4
- package/src/unstable/http/HttpTraceContext.ts +53 -6
- package/src/unstable/http/Multipart.ts +179 -29
- package/src/unstable/http/Multipasta/HeadersParser.ts +1 -1
- package/src/unstable/http/Multipasta/Node.ts +1 -1
- package/src/unstable/http/Multipasta/Search.ts +1 -1
- package/src/unstable/http/Multipasta/Web.ts +1 -1
- package/src/unstable/http/Multipasta.ts +1 -1
- package/src/unstable/http/Template.ts +53 -0
- package/src/unstable/http/Url.ts +56 -42
- package/src/unstable/http/UrlParams.ts +233 -49
- package/src/unstable/httpapi/HttpApi.ts +49 -14
- package/src/unstable/httpapi/HttpApiBuilder.ts +86 -20
- package/src/unstable/httpapi/HttpApiClient.ts +80 -16
- package/src/unstable/httpapi/HttpApiEndpoint.ts +238 -59
- package/src/unstable/httpapi/HttpApiError.ts +100 -1
- package/src/unstable/httpapi/HttpApiGroup.ts +87 -20
- package/src/unstable/httpapi/HttpApiMiddleware.ts +113 -23
- package/src/unstable/httpapi/HttpApiScalar.ts +38 -4
- package/src/unstable/httpapi/HttpApiSchema.ts +67 -30
- package/src/unstable/httpapi/HttpApiSecurity.ts +74 -17
- package/src/unstable/httpapi/HttpApiSwagger.ts +24 -2
- package/src/unstable/httpapi/HttpApiTest.ts +31 -3
- package/src/unstable/httpapi/OpenApi.ts +115 -15
- package/src/unstable/observability/Otlp.ts +33 -3
- package/src/unstable/observability/OtlpExporter.ts +32 -1
- package/src/unstable/observability/OtlpLogger.ts +31 -2
- package/src/unstable/observability/OtlpMetrics.ts +37 -4
- package/src/unstable/observability/OtlpResource.ts +68 -12
- package/src/unstable/observability/OtlpSerialization.ts +28 -3
- package/src/unstable/observability/OtlpTracer.ts +38 -2
- package/src/unstable/observability/PrometheusMetrics.ts +32 -12
- package/src/unstable/observability/index.ts +2 -1
- package/src/unstable/persistence/KeyValueStore.ts +108 -28
- package/src/unstable/persistence/Persistable.ts +76 -15
- package/src/unstable/persistence/PersistedCache.ts +27 -2
- package/src/unstable/persistence/PersistedQueue.ts +98 -16
- package/src/unstable/persistence/Persistence.ts +97 -16
- package/src/unstable/persistence/RateLimiter.ts +98 -22
- package/src/unstable/persistence/Redis.ts +42 -5
- package/src/unstable/process/ChildProcess.ts +100 -79
- package/src/unstable/process/ChildProcessSpawner.ts +22 -11
- package/src/unstable/process/index.ts +2 -1
- package/src/unstable/reactivity/AsyncResult.ts +202 -61
- package/src/unstable/reactivity/Atom.ts +597 -143
- package/src/unstable/reactivity/AtomHttpApi.ts +41 -2
- package/src/unstable/reactivity/AtomRef.ts +51 -7
- package/src/unstable/reactivity/AtomRegistry.ts +141 -22
- package/src/unstable/reactivity/AtomRpc.ts +36 -2
- package/src/unstable/reactivity/Hydration.ts +45 -5
- package/src/unstable/reactivity/Reactivity.ts +95 -13
- package/src/unstable/rpc/Rpc.ts +255 -56
- package/src/unstable/rpc/RpcClient.ts +108 -20
- package/src/unstable/rpc/RpcClientError.ts +26 -2
- package/src/unstable/rpc/RpcGroup.ts +51 -8
- package/src/unstable/rpc/RpcMessage.ts +128 -32
- package/src/unstable/rpc/RpcMiddleware.ts +100 -20
- package/src/unstable/rpc/RpcSchema.ts +38 -4
- package/src/unstable/rpc/RpcSerialization.ts +60 -13
- package/src/unstable/rpc/RpcServer.ts +108 -25
- package/src/unstable/rpc/RpcTest.ts +20 -1
- package/src/unstable/rpc/RpcWorker.ts +42 -8
- package/src/unstable/rpc/Utils.ts +31 -0
- package/src/unstable/schema/Model.ts +148 -52
- package/src/unstable/schema/VariantSchema.ts +104 -24
- package/src/unstable/socket/Socket.ts +168 -35
- package/src/unstable/socket/SocketServer.ts +58 -10
- package/src/unstable/sql/Migrator.ts +57 -5
- package/src/unstable/sql/SqlClient.ts +55 -2
- package/src/unstable/sql/SqlConnection.ts +31 -0
- package/src/unstable/sql/SqlError.ts +117 -0
- package/src/unstable/sql/SqlModel.ts +26 -5
- package/src/unstable/sql/SqlResolver.ts +56 -13
- package/src/unstable/sql/SqlSchema.ts +29 -8
- package/src/unstable/sql/SqlStream.ts +23 -0
- package/src/unstable/sql/Statement.ts +141 -0
- package/src/unstable/sql/index.ts +1 -1
- package/src/unstable/workers/Transferable.ts +65 -13
- package/src/unstable/workers/Worker.ts +60 -8
- package/src/unstable/workers/WorkerError.ts +50 -9
- package/src/unstable/workers/WorkerRunner.ts +32 -3
- package/src/unstable/workers/index.ts +1 -1
- package/src/unstable/workflow/Activity.ts +62 -11
- package/src/unstable/workflow/DurableClock.ts +26 -3
- package/src/unstable/workflow/DurableDeferred.ts +146 -31
- package/src/unstable/workflow/DurableQueue.ts +366 -0
- package/src/unstable/workflow/Workflow.ts +122 -32
- package/src/unstable/workflow/WorkflowEngine.ts +40 -5
- package/src/unstable/workflow/WorkflowProxy.ts +32 -2
- package/src/unstable/workflow/WorkflowProxyServer.ts +40 -6
- package/src/unstable/workflow/index.ts +5 -0
package/src/Sink.ts
CHANGED
|
@@ -1,4 +1,36 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* The `Sink` module provides composable consumers for `Stream` values. A
|
|
3
|
+
* `Sink<A, In, L, E, R>` pulls input elements of type `In`, may require
|
|
4
|
+
* services `R`, may fail with `E`, and eventually produces a result `A` plus
|
|
5
|
+
* any leftover input `L` that was read but not consumed.
|
|
6
|
+
*
|
|
7
|
+
* **Mental model**
|
|
8
|
+
*
|
|
9
|
+
* - A sink is the terminal consumer used by `Stream.run`
|
|
10
|
+
* - Sinks can consume zero, one, many, or all input elements before finishing
|
|
11
|
+
* - Leftovers allow one sink to stop early without losing already-pulled input
|
|
12
|
+
* - Sink composition preserves typed errors and service requirements
|
|
13
|
+
* - Most sinks are built from `Channel` internally, but users compose them with
|
|
14
|
+
* the higher-level APIs in this module
|
|
15
|
+
*
|
|
16
|
+
* **Common tasks**
|
|
17
|
+
*
|
|
18
|
+
* - Create simple sinks: {@link succeed}, {@link fail}, {@link fromEffect}
|
|
19
|
+
* - Fold input: {@link fold}, {@link foldEffect}, {@link foldLeft}
|
|
20
|
+
* - Collect values: {@link collectAll}, {@link collectAllN}, {@link collectAllWhile}
|
|
21
|
+
* - Count or drain input: {@link count}, {@link drain}
|
|
22
|
+
* - Transform results: {@link map}, {@link mapEffect}, {@link as}
|
|
23
|
+
* - Combine sinks: {@link zip}, {@link zipWith}, {@link race}
|
|
24
|
+
* - Filter and refine input: {@link filterInput}, {@link filterInputEffect}
|
|
25
|
+
*
|
|
26
|
+
* **Gotchas**
|
|
27
|
+
*
|
|
28
|
+
* - A sink can finish before the stream is exhausted; check leftover-aware
|
|
29
|
+
* combinators when composing parsers or protocol decoders
|
|
30
|
+
* - `In` is contravariant, so a sink that accepts broader input can be used
|
|
31
|
+
* where narrower input is expected
|
|
32
|
+
* - Resource and service requirements are tracked in the `R` type parameter
|
|
33
|
+
*
|
|
2
34
|
* @since 2.0.0
|
|
3
35
|
*/
|
|
4
36
|
import type { NonEmptyReadonlyArray } from "./Array.ts"
|
|
@@ -36,7 +68,8 @@ const TypeId = "~effect/Sink"
|
|
|
36
68
|
* and will eventually yield a value of type `A` together with a remainder of
|
|
37
69
|
* type `L` (i.e. any leftovers).
|
|
38
70
|
*
|
|
39
|
-
*
|
|
71
|
+
* **Example** (Running a sink with a stream)
|
|
72
|
+
*
|
|
40
73
|
* ```ts
|
|
41
74
|
* import { Effect } from "effect"
|
|
42
75
|
* import * as Sink from "effect/Sink"
|
|
@@ -53,8 +86,8 @@ const TypeId = "~effect/Sink"
|
|
|
53
86
|
* // Output: 42
|
|
54
87
|
* ```
|
|
55
88
|
*
|
|
56
|
-
* @since 2.0.0
|
|
57
89
|
* @category models
|
|
90
|
+
* @since 2.0.0
|
|
58
91
|
*/
|
|
59
92
|
export interface Sink<out A, in In = unknown, out L = never, out E = never, out R = never>
|
|
60
93
|
extends Sink.Variance<A, In, L, E, R>, Pipeable
|
|
@@ -69,33 +102,28 @@ export interface Sink<out A, in In = unknown, out L = never, out E = never, out
|
|
|
69
102
|
}
|
|
70
103
|
|
|
71
104
|
/**
|
|
72
|
-
*
|
|
105
|
+
* Tuple returned when a `Sink` finishes.
|
|
106
|
+
*
|
|
107
|
+
* The first element is the sink result. The optional second element contains a
|
|
108
|
+
* non-empty array of leftover input that was pulled but not consumed.
|
|
109
|
+
*
|
|
73
110
|
* @category models
|
|
111
|
+
* @since 2.0.0
|
|
74
112
|
*/
|
|
75
113
|
export type End<A, L = never> = readonly [value: A, leftover?: NonEmptyReadonlyArray<L> | undefined]
|
|
76
114
|
|
|
77
115
|
const endVoid = Effect.succeed([void 0] as End<void, never>)
|
|
78
116
|
|
|
79
117
|
/**
|
|
80
|
-
*
|
|
81
|
-
* to provide proper type inference when using Sink with other Effect types.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```ts
|
|
85
|
-
* import type { Effect } from "effect"
|
|
86
|
-
* import type * as Sink from "effect/Sink"
|
|
87
|
-
* import type * as Unify from "effect/Unify"
|
|
88
|
-
*
|
|
89
|
-
* // SinkUnify helps unify Sink and Effect types
|
|
90
|
-
* declare const sink: Sink.Sink<number>
|
|
91
|
-
* declare const effect: Effect.Effect<string>
|
|
118
|
+
* Type-level unification support for `Sink` values.
|
|
92
119
|
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
120
|
+
* This preserves the result, input, leftover, error, and service type
|
|
121
|
+
* parameters when Effect's `Unify` machinery normalizes generic values that
|
|
122
|
+
* include sinks. Users normally do not need to reference this interface
|
|
123
|
+
* directly.
|
|
96
124
|
*
|
|
97
|
-
* @since 2.0.0
|
|
98
125
|
* @category models
|
|
126
|
+
* @since 2.0.0
|
|
99
127
|
*/
|
|
100
128
|
export interface SinkUnify<A extends { [Unify.typeSymbol]?: any }> extends Effect.EffectUnify<A> {
|
|
101
129
|
Sink?: () => A[Unify.typeSymbol] extends
|
|
@@ -111,16 +139,11 @@ export interface SinkUnify<A extends { [Unify.typeSymbol]?: any }> extends Effec
|
|
|
111
139
|
}
|
|
112
140
|
|
|
113
141
|
/**
|
|
114
|
-
*
|
|
115
|
-
* Part of the internal type system machinery.
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* ```ts
|
|
119
|
-
* import type * as Sink from "effect/Sink"
|
|
142
|
+
* Marker used by Effect's `Unify` machinery for `Sink` values.
|
|
120
143
|
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
144
|
+
* It prevents the inherited `Effect` unifier from being selected when
|
|
145
|
+
* sink-specific unification should preserve the `Sink` type parameters. Users
|
|
146
|
+
* normally do not need to reference this interface directly.
|
|
124
147
|
*
|
|
125
148
|
* @category models
|
|
126
149
|
* @since 2.0.0
|
|
@@ -132,53 +155,32 @@ export interface SinkUnifyIgnore {
|
|
|
132
155
|
/**
|
|
133
156
|
* Namespace containing types and interfaces for Sink variance and type relationships.
|
|
134
157
|
*
|
|
135
|
-
* @example
|
|
136
|
-
* ```ts
|
|
137
|
-
* import type * as Sink from "effect/Sink"
|
|
138
|
-
*
|
|
139
|
-
* // The Sink namespace contains internal type definitions
|
|
140
|
-
* // These are used internally for type safety and variance
|
|
141
|
-
* type SinkType<A, In, L, E, R> = Sink.Sink<A, In, L, E, R>
|
|
142
|
-
* ```
|
|
143
|
-
*
|
|
144
|
-
* @since 2.0.0
|
|
145
158
|
* @category models
|
|
159
|
+
* @since 2.0.0
|
|
146
160
|
*/
|
|
147
161
|
export declare namespace Sink {
|
|
148
162
|
/**
|
|
149
|
-
*
|
|
150
|
-
* Used internally to track how type parameters flow through the Sink.
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* ```ts
|
|
154
|
-
* import type * as Sink from "effect/Sink"
|
|
163
|
+
* Type-level variance marker for `Sink`.
|
|
155
164
|
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* ```
|
|
165
|
+
* The result `A`, leftovers `L`, errors `E`, and services `R` are
|
|
166
|
+
* covariant. The input type `In` is contravariant because values flow into
|
|
167
|
+
* the sink.
|
|
160
168
|
*
|
|
161
|
-
* @since 2.0.0
|
|
162
169
|
* @category models
|
|
170
|
+
* @since 2.0.0
|
|
163
171
|
*/
|
|
164
172
|
export interface Variance<out A, in In, out L, out E, out R> {
|
|
165
173
|
readonly [TypeId]: VarianceStruct<A, In, L, E, R>
|
|
166
174
|
}
|
|
167
175
|
/**
|
|
168
|
-
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* @example
|
|
172
|
-
* ```ts
|
|
173
|
-
* import type * as Sink from "effect/Sink"
|
|
176
|
+
* Structural encoding used by `Sink.Variance` to record each `Sink` type
|
|
177
|
+
* parameter's variance.
|
|
174
178
|
*
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
* type SinkInstance = Sink.Sink<number, string>
|
|
178
|
-
* ```
|
|
179
|
+
* `_A`, `_L`, `_E`, and `_R` are covariant markers. `_In` is a
|
|
180
|
+
* contravariant marker.
|
|
179
181
|
*
|
|
180
|
-
* @since 2.0.0
|
|
181
182
|
* @category models
|
|
183
|
+
* @since 2.0.0
|
|
182
184
|
*/
|
|
183
185
|
export interface VarianceStruct<out A, in In, out L, out E, out R> {
|
|
184
186
|
_A: Types.Covariant<A>
|
|
@@ -207,7 +209,8 @@ const SinkProto = {
|
|
|
207
209
|
/**
|
|
208
210
|
* Checks if a value is a Sink.
|
|
209
211
|
*
|
|
210
|
-
*
|
|
212
|
+
* **Example** (Checking for a sink)
|
|
213
|
+
*
|
|
211
214
|
* ```ts
|
|
212
215
|
* import { Sink } from "effect"
|
|
213
216
|
*
|
|
@@ -218,16 +221,16 @@ const SinkProto = {
|
|
|
218
221
|
* console.log(Sink.isSink(notStream)) // false
|
|
219
222
|
* ```
|
|
220
223
|
*
|
|
221
|
-
* @since 2.0.0
|
|
222
224
|
* @category guards
|
|
225
|
+
* @since 2.0.0
|
|
223
226
|
*/
|
|
224
227
|
export const isSink = (u: unknown): u is Sink<unknown, never, unknown, unknown, unknown> => hasProperty(u, TypeId)
|
|
225
228
|
|
|
226
229
|
/**
|
|
227
230
|
* Creates a sink from a `Channel`.
|
|
228
231
|
*
|
|
229
|
-
* @since 2.0.0
|
|
230
232
|
* @category constructors
|
|
233
|
+
* @since 2.0.0
|
|
231
234
|
*/
|
|
232
235
|
export const fromChannel = <L, In, E, A, R>(
|
|
233
236
|
channel: Channel.Channel<
|
|
@@ -248,8 +251,14 @@ export const fromChannel = <L, In, E, A, R>(
|
|
|
248
251
|
)
|
|
249
252
|
|
|
250
253
|
/**
|
|
251
|
-
*
|
|
254
|
+
* Creates a `Sink` from a low-level transform function.
|
|
255
|
+
*
|
|
256
|
+
* The transform receives the upstream pull of non-empty input arrays and the
|
|
257
|
+
* active scope, and returns an effect that completes with the sink's `End`
|
|
258
|
+
* value.
|
|
259
|
+
*
|
|
252
260
|
* @category constructors
|
|
261
|
+
* @since 4.0.0
|
|
253
262
|
*/
|
|
254
263
|
export const fromTransform = <In, A, E, R, L = never>(
|
|
255
264
|
transform: (
|
|
@@ -265,7 +274,8 @@ export const fromTransform = <In, A, E, R, L = never>(
|
|
|
265
274
|
/**
|
|
266
275
|
* Creates a `Channel` from a Sink.
|
|
267
276
|
*
|
|
268
|
-
*
|
|
277
|
+
* **Example** (Converting a sink to a channel)
|
|
278
|
+
*
|
|
269
279
|
* ```ts
|
|
270
280
|
* import { Sink } from "effect"
|
|
271
281
|
*
|
|
@@ -274,8 +284,8 @@ export const fromTransform = <In, A, E, R, L = never>(
|
|
|
274
284
|
* const channel = Sink.toChannel(sink)
|
|
275
285
|
* ```
|
|
276
286
|
*
|
|
277
|
-
* @since 2.0.0
|
|
278
287
|
* @category constructors
|
|
288
|
+
* @since 2.0.0
|
|
279
289
|
*/
|
|
280
290
|
export const toChannel = <A, In, L, E, R>(
|
|
281
291
|
self: Sink<A, In, L, E, R>
|
|
@@ -288,8 +298,14 @@ export const toChannel = <A, In, L, E, R>(
|
|
|
288
298
|
)
|
|
289
299
|
|
|
290
300
|
/**
|
|
291
|
-
*
|
|
301
|
+
* Creates a pipe-style constructor for sinks over input type `In`.
|
|
302
|
+
*
|
|
303
|
+
* The returned function exposes the sink input as a `Stream<In>`, applies the
|
|
304
|
+
* provided pipeline, and uses the final effect's success value as the sink
|
|
305
|
+
* result.
|
|
306
|
+
*
|
|
292
307
|
* @category constructors
|
|
308
|
+
* @since 4.0.0
|
|
293
309
|
*/
|
|
294
310
|
export const make = <In>(): make.Constructor<In> => (...fns: []) =>
|
|
295
311
|
fromTransform((upstream, scope) =>
|
|
@@ -302,10 +318,19 @@ export const make = <In>(): make.Constructor<In> => (...fns: []) =>
|
|
|
302
318
|
)
|
|
303
319
|
|
|
304
320
|
/**
|
|
321
|
+
* Companion namespace containing overload types for the pipe-style sink
|
|
322
|
+
* constructor returned by `Sink.make`.
|
|
323
|
+
*
|
|
305
324
|
* @since 4.0.0
|
|
306
325
|
*/
|
|
307
326
|
export declare namespace make {
|
|
308
327
|
/**
|
|
328
|
+
* Overloaded function type returned by `Sink.make`.
|
|
329
|
+
*
|
|
330
|
+
* The first pipeline function receives the sink input as a `Stream<In>`. The
|
|
331
|
+
* final pipeline step must return an `Effect`, whose success value becomes
|
|
332
|
+
* the sink result.
|
|
333
|
+
*
|
|
309
334
|
* @since 4.0.0
|
|
310
335
|
*/
|
|
311
336
|
export interface Constructor<In> {
|
|
@@ -399,24 +424,40 @@ export declare namespace make {
|
|
|
399
424
|
}
|
|
400
425
|
|
|
401
426
|
/**
|
|
402
|
-
*
|
|
427
|
+
* Creates a sink that ignores upstream input and completes from an effect that
|
|
428
|
+
* already returns an `End`.
|
|
429
|
+
*
|
|
430
|
+
* Use this when the effect needs to provide both the result value and optional
|
|
431
|
+
* leftovers.
|
|
432
|
+
*
|
|
403
433
|
* @category constructors
|
|
434
|
+
* @since 4.0.0
|
|
404
435
|
*/
|
|
405
436
|
export const fromEffectEnd = <A, E, R, L = never>(
|
|
406
437
|
effect: Effect.Effect<End<A, L>, E, R>
|
|
407
438
|
): Sink<A, unknown, L, E, R> => fromTransform(() => effect)
|
|
408
439
|
|
|
409
440
|
/**
|
|
410
|
-
*
|
|
441
|
+
* Creates a sink that ignores upstream input and completes with the success
|
|
442
|
+
* value of the provided effect.
|
|
443
|
+
*
|
|
444
|
+
* If the effect fails, the sink fails with the same error.
|
|
445
|
+
*
|
|
411
446
|
* @category constructors
|
|
447
|
+
* @since 4.0.0
|
|
412
448
|
*/
|
|
413
449
|
export const fromEffect = <A, E, R>(
|
|
414
450
|
effect: Effect.Effect<A, E, R>
|
|
415
451
|
): Sink<A, unknown, never, E, R> => fromEffectEnd(Effect.map(effect, (a) => [a]))
|
|
416
452
|
|
|
417
453
|
/**
|
|
418
|
-
*
|
|
454
|
+
* Creates a sink that offers every consumed input element to a queue.
|
|
455
|
+
*
|
|
456
|
+
* When the upstream stream ends, the sink ends the queue and completes with
|
|
457
|
+
* `void`.
|
|
458
|
+
*
|
|
419
459
|
* @category constructors
|
|
460
|
+
* @since 2.0.0
|
|
420
461
|
*/
|
|
421
462
|
export const fromQueue = <A>(
|
|
422
463
|
queue: Queue.Queue<A, Cause.Done>
|
|
@@ -433,8 +474,12 @@ export const fromQueue = <A>(
|
|
|
433
474
|
)
|
|
434
475
|
|
|
435
476
|
/**
|
|
436
|
-
*
|
|
477
|
+
* Creates a sink that publishes every consumed input element to a `PubSub`.
|
|
478
|
+
*
|
|
479
|
+
* The sink completes with `void` when the upstream stream ends.
|
|
480
|
+
*
|
|
437
481
|
* @category constructors
|
|
482
|
+
* @since 2.0.0
|
|
438
483
|
*/
|
|
439
484
|
export const fromPubSub = <A>(
|
|
440
485
|
pubsub: PubSub.PubSub<A>
|
|
@@ -443,7 +488,8 @@ export const fromPubSub = <A>(
|
|
|
443
488
|
/**
|
|
444
489
|
* A sink that immediately ends with the specified value.
|
|
445
490
|
*
|
|
446
|
-
*
|
|
491
|
+
* **Example** (Succeeding with a value)
|
|
492
|
+
*
|
|
447
493
|
* ```ts
|
|
448
494
|
* import { Effect, Sink, Stream } from "effect"
|
|
449
495
|
*
|
|
@@ -458,8 +504,8 @@ export const fromPubSub = <A>(
|
|
|
458
504
|
* // Output: 42
|
|
459
505
|
* ```
|
|
460
506
|
*
|
|
461
|
-
* @since 2.0.0
|
|
462
507
|
* @category constructors
|
|
508
|
+
* @since 2.0.0
|
|
463
509
|
*/
|
|
464
510
|
export const succeed = <A, L = never>(a: A, leftovers?: NonEmptyReadonlyArray<L> | undefined): Sink<A, unknown, L> =>
|
|
465
511
|
fromEffectEnd(Effect.succeed([a, leftovers]))
|
|
@@ -467,16 +513,16 @@ export const succeed = <A, L = never>(a: A, leftovers?: NonEmptyReadonlyArray<L>
|
|
|
467
513
|
/**
|
|
468
514
|
* A sink that immediately ends with the specified lazily evaluated value.
|
|
469
515
|
*
|
|
470
|
-
* @since 2.0.0
|
|
471
516
|
* @category constructors
|
|
517
|
+
* @since 2.0.0
|
|
472
518
|
*/
|
|
473
519
|
export const sync = <A>(a: LazyArg<A>): Sink<A> => fromEffect(Effect.sync(a))
|
|
474
520
|
|
|
475
521
|
/**
|
|
476
522
|
* A sink that is created from a lazily evaluated sink.
|
|
477
523
|
*
|
|
478
|
-
* @since 2.0.0
|
|
479
524
|
* @category constructors
|
|
525
|
+
* @since 2.0.0
|
|
480
526
|
*/
|
|
481
527
|
export const suspend = <A, In, L, E, R>(evaluate: LazyArg<Sink<A, In, L, E, R>>): Sink<A, In, L, E, R> =>
|
|
482
528
|
fromTransform((upstream, scope) => evaluate().transform(upstream, scope))
|
|
@@ -484,7 +530,8 @@ export const suspend = <A, In, L, E, R>(evaluate: LazyArg<Sink<A, In, L, E, R>>)
|
|
|
484
530
|
/**
|
|
485
531
|
* A sink that always fails with the specified error.
|
|
486
532
|
*
|
|
487
|
-
*
|
|
533
|
+
* **Example** (Failing with an error)
|
|
534
|
+
*
|
|
488
535
|
* ```ts
|
|
489
536
|
* import { Effect, Sink, Stream } from "effect"
|
|
490
537
|
*
|
|
@@ -499,15 +546,16 @@ export const suspend = <A, In, L, E, R>(evaluate: LazyArg<Sink<A, In, L, E, R>>)
|
|
|
499
546
|
* // Output: Error: Sink failed
|
|
500
547
|
* ```
|
|
501
548
|
*
|
|
502
|
-
* @since 2.0.0
|
|
503
549
|
* @category constructors
|
|
550
|
+
* @since 2.0.0
|
|
504
551
|
*/
|
|
505
552
|
export const fail = <E>(e: E): Sink<never, unknown, never, E> => fromEffectEnd(Effect.fail(e))
|
|
506
553
|
|
|
507
554
|
/**
|
|
508
555
|
* A sink that always fails with the specified lazily evaluated error.
|
|
509
556
|
*
|
|
510
|
-
*
|
|
557
|
+
* **Example** (Failing with a lazy error)
|
|
558
|
+
*
|
|
511
559
|
* ```ts
|
|
512
560
|
* import { Effect, Sink, Stream } from "effect"
|
|
513
561
|
*
|
|
@@ -522,8 +570,8 @@ export const fail = <E>(e: E): Sink<never, unknown, never, E> => fromEffectEnd(E
|
|
|
522
570
|
* // Output: Error: Lazy error
|
|
523
571
|
* ```
|
|
524
572
|
*
|
|
525
|
-
* @since 2.0.0
|
|
526
573
|
* @category constructors
|
|
574
|
+
* @since 2.0.0
|
|
527
575
|
*/
|
|
528
576
|
export const failSync = <E>(evaluate: LazyArg<E>): Sink<never, unknown, never, E> =>
|
|
529
577
|
fromEffectEnd(Effect.failSync(evaluate))
|
|
@@ -531,7 +579,8 @@ export const failSync = <E>(evaluate: LazyArg<E>): Sink<never, unknown, never, E
|
|
|
531
579
|
/**
|
|
532
580
|
* Creates a sink halting with a specified `Cause`.
|
|
533
581
|
*
|
|
534
|
-
*
|
|
582
|
+
* **Example** (Failing with a cause)
|
|
583
|
+
*
|
|
535
584
|
* ```ts
|
|
536
585
|
* import { Cause, Effect, Sink, Stream } from "effect"
|
|
537
586
|
*
|
|
@@ -546,8 +595,8 @@ export const failSync = <E>(evaluate: LazyArg<E>): Sink<never, unknown, never, E
|
|
|
546
595
|
* // Output: Error: Custom cause
|
|
547
596
|
* ```
|
|
548
597
|
*
|
|
549
|
-
* @since 2.0.0
|
|
550
598
|
* @category constructors
|
|
599
|
+
* @since 2.0.0
|
|
551
600
|
*/
|
|
552
601
|
export const failCause = <E>(cause: Cause.Cause<E>): Sink<never, unknown, never, E> =>
|
|
553
602
|
fromEffectEnd(Effect.failCause(cause))
|
|
@@ -555,7 +604,8 @@ export const failCause = <E>(cause: Cause.Cause<E>): Sink<never, unknown, never,
|
|
|
555
604
|
/**
|
|
556
605
|
* Creates a sink halting with a specified lazily evaluated `Cause`.
|
|
557
606
|
*
|
|
558
|
-
*
|
|
607
|
+
* **Example** (Failing with a lazy cause)
|
|
608
|
+
*
|
|
559
609
|
* ```ts
|
|
560
610
|
* import { Cause, Effect, Sink, Stream } from "effect"
|
|
561
611
|
*
|
|
@@ -570,8 +620,8 @@ export const failCause = <E>(cause: Cause.Cause<E>): Sink<never, unknown, never,
|
|
|
570
620
|
* // Output: Error: Lazy cause
|
|
571
621
|
* ```
|
|
572
622
|
*
|
|
573
|
-
* @since 2.0.0
|
|
574
623
|
* @category constructors
|
|
624
|
+
* @since 2.0.0
|
|
575
625
|
*/
|
|
576
626
|
export const failCauseSync = <E>(evaluate: LazyArg<Cause.Cause<E>>): Sink<never, unknown, never, E> =>
|
|
577
627
|
fromEffectEnd(Effect.failCauseSync(evaluate))
|
|
@@ -579,7 +629,8 @@ export const failCauseSync = <E>(evaluate: LazyArg<Cause.Cause<E>>): Sink<never,
|
|
|
579
629
|
/**
|
|
580
630
|
* Creates a sink halting with a specified defect.
|
|
581
631
|
*
|
|
582
|
-
*
|
|
632
|
+
* **Example** (Dying with a defect)
|
|
633
|
+
*
|
|
583
634
|
* ```ts
|
|
584
635
|
* import { Effect, Sink, Stream } from "effect"
|
|
585
636
|
*
|
|
@@ -594,24 +645,28 @@ export const failCauseSync = <E>(evaluate: LazyArg<Cause.Cause<E>>): Sink<never,
|
|
|
594
645
|
* // Output: Error: Defect error
|
|
595
646
|
* ```
|
|
596
647
|
*
|
|
597
|
-
* @since 2.0.0
|
|
598
648
|
* @category constructors
|
|
649
|
+
* @since 2.0.0
|
|
599
650
|
*/
|
|
600
651
|
export const die = (defect: unknown): Sink<never> => fromEffectEnd(Effect.die(defect))
|
|
601
652
|
|
|
602
653
|
/**
|
|
603
654
|
* A sink that never completes.
|
|
604
655
|
*
|
|
605
|
-
* @since 2.0.0
|
|
606
656
|
* @category constructors
|
|
657
|
+
* @since 2.0.0
|
|
607
658
|
*/
|
|
608
659
|
export const never: Sink<unknown> = fromEffectEnd(Effect.never)
|
|
609
660
|
|
|
610
661
|
/**
|
|
611
|
-
*
|
|
662
|
+
* Drops leftovers produced by a sink.
|
|
663
|
+
*
|
|
664
|
+
* The sink result is preserved, but any leftover elements are discarded
|
|
665
|
+
* instead of being returned to downstream sink composition. This does not
|
|
666
|
+
* continue pulling additional elements from the upstream stream.
|
|
612
667
|
*
|
|
613
|
-
* @since 2.0.0
|
|
614
668
|
* @category utils
|
|
669
|
+
* @since 2.0.0
|
|
615
670
|
*/
|
|
616
671
|
export const ignoreLeftover = <A, In, L, E, R>(self: Sink<A, In, L, E, R>): Sink<A, In, never, E, R> =>
|
|
617
672
|
mapEnd(self, ([a]) => [a])
|
|
@@ -619,8 +674,8 @@ export const ignoreLeftover = <A, In, L, E, R>(self: Sink<A, In, L, E, R>): Sink
|
|
|
619
674
|
/**
|
|
620
675
|
* Drains elements from the stream by ignoring all inputs.
|
|
621
676
|
*
|
|
622
|
-
* @since 2.0.0
|
|
623
677
|
* @category constructors
|
|
678
|
+
* @since 2.0.0
|
|
624
679
|
*/
|
|
625
680
|
export const drain: Sink<void, unknown> = fromTransform((upstream) =>
|
|
626
681
|
Pull.catchDone(
|
|
@@ -633,8 +688,8 @@ export const drain: Sink<void, unknown> = fromTransform((upstream) =>
|
|
|
633
688
|
* A sink that folds its inputs with the provided function, termination
|
|
634
689
|
* predicate and initial state.
|
|
635
690
|
*
|
|
636
|
-
* @since 2.0.0
|
|
637
691
|
* @category folding
|
|
692
|
+
* @since 2.0.0
|
|
638
693
|
*/
|
|
639
694
|
export const fold = <S, In, E = never, R = never>(
|
|
640
695
|
s: LazyArg<S>,
|
|
@@ -661,8 +716,14 @@ export const fold = <S, In, E = never, R = never>(
|
|
|
661
716
|
})
|
|
662
717
|
|
|
663
718
|
/**
|
|
664
|
-
*
|
|
719
|
+
* Folds non-empty input arrays into state with an effectful function.
|
|
720
|
+
*
|
|
721
|
+
* The initial state is evaluated lazily. After each pulled array is folded,
|
|
722
|
+
* the sink continues while `contFn` returns `true`; otherwise it completes
|
|
723
|
+
* with the current state.
|
|
724
|
+
*
|
|
665
725
|
* @category folding
|
|
726
|
+
* @since 2.0.0
|
|
666
727
|
*/
|
|
667
728
|
export const foldArray = <S, In, E = never, R = never>(
|
|
668
729
|
s: LazyArg<S>,
|
|
@@ -684,8 +745,14 @@ export const foldArray = <S, In, E = never, R = never>(
|
|
|
684
745
|
})
|
|
685
746
|
|
|
686
747
|
/**
|
|
687
|
-
*
|
|
748
|
+
* Folds input elements into state until the specified maximum number of
|
|
749
|
+
* elements has been consumed or the upstream stream ends.
|
|
750
|
+
*
|
|
751
|
+
* If the sink stops in the middle of a pulled array, the remaining elements
|
|
752
|
+
* from that array are returned as leftovers.
|
|
753
|
+
*
|
|
688
754
|
* @category folding
|
|
755
|
+
* @since 2.0.0
|
|
689
756
|
*/
|
|
690
757
|
export const foldUntil = <S, In, E = never, R = never>(
|
|
691
758
|
s: LazyArg<S>,
|
|
@@ -703,8 +770,8 @@ export const foldUntil = <S, In, E = never, R = never>(
|
|
|
703
770
|
/**
|
|
704
771
|
* A sink that returns whether all elements satisfy the specified predicate.
|
|
705
772
|
*
|
|
706
|
-
* @since 2.0.0
|
|
707
773
|
* @category constructors
|
|
774
|
+
* @since 2.0.0
|
|
708
775
|
*/
|
|
709
776
|
export const every = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
|
|
710
777
|
fold(
|
|
@@ -716,8 +783,8 @@ export const every = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
|
|
|
716
783
|
/**
|
|
717
784
|
* A sink that returns whether an element satisfies the specified predicate.
|
|
718
785
|
*
|
|
719
|
-
* @since 2.0.0
|
|
720
786
|
* @category constructors
|
|
787
|
+
* @since 2.0.0
|
|
721
788
|
*/
|
|
722
789
|
export const some = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
|
|
723
790
|
fold(
|
|
@@ -729,22 +796,22 @@ export const some = <In>(predicate: Predicate<In>): Sink<boolean, In, In> =>
|
|
|
729
796
|
/**
|
|
730
797
|
* Transforms this sink's result.
|
|
731
798
|
*
|
|
732
|
-
* @since 2.0.0
|
|
733
799
|
* @category mapping
|
|
800
|
+
* @since 2.0.0
|
|
734
801
|
*/
|
|
735
802
|
export const map: {
|
|
736
803
|
/**
|
|
737
804
|
* Transforms this sink's result.
|
|
738
805
|
*
|
|
739
|
-
* @since 2.0.0
|
|
740
806
|
* @category mapping
|
|
807
|
+
* @since 2.0.0
|
|
741
808
|
*/
|
|
742
809
|
<A, A2>(f: (a: A) => A2): <In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L, E, R>
|
|
743
810
|
/**
|
|
744
811
|
* Transforms this sink's result.
|
|
745
812
|
*
|
|
746
|
-
* @since 2.0.0
|
|
747
813
|
* @category mapping
|
|
814
|
+
* @since 2.0.0
|
|
748
815
|
*/
|
|
749
816
|
<A, In, L, E, R, A2>(self: Sink<A, In, L, E, R>, f: (a: A) => A2): Sink<A2, In, L, E, R>
|
|
750
817
|
} = dual(
|
|
@@ -756,22 +823,22 @@ export const map: {
|
|
|
756
823
|
/**
|
|
757
824
|
* Set the sink's result to a constant value.
|
|
758
825
|
*
|
|
759
|
-
* @since 2.0.0
|
|
760
826
|
* @category mapping
|
|
827
|
+
* @since 2.0.0
|
|
761
828
|
*/
|
|
762
829
|
export const as: {
|
|
763
830
|
/**
|
|
764
831
|
* Set the sink's result to a constant value.
|
|
765
832
|
*
|
|
766
|
-
* @since 2.0.0
|
|
767
833
|
* @category mapping
|
|
834
|
+
* @since 2.0.0
|
|
768
835
|
*/
|
|
769
836
|
<A2>(a2: A2): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L, E, R>
|
|
770
837
|
/**
|
|
771
838
|
* Set the sink's result to a constant value.
|
|
772
839
|
*
|
|
773
|
-
* @since 2.0.0
|
|
774
840
|
* @category mapping
|
|
841
|
+
* @since 2.0.0
|
|
775
842
|
*/
|
|
776
843
|
<A, In, L, E, R, A2>(self: Sink<A, In, L, E, R>, a2: A2): Sink<A2, In, L, E, R>
|
|
777
844
|
} = dual(
|
|
@@ -782,22 +849,22 @@ export const as: {
|
|
|
782
849
|
/**
|
|
783
850
|
* Transforms this sink's input elements.
|
|
784
851
|
*
|
|
785
|
-
* @since 2.0.0
|
|
786
852
|
* @category mapping
|
|
853
|
+
* @since 2.0.0
|
|
787
854
|
*/
|
|
788
855
|
export const mapInput: {
|
|
789
856
|
/**
|
|
790
857
|
* Transforms this sink's input elements.
|
|
791
858
|
*
|
|
792
|
-
* @since 2.0.0
|
|
793
859
|
* @category mapping
|
|
860
|
+
* @since 2.0.0
|
|
794
861
|
*/
|
|
795
862
|
<In0, In>(f: (input: In0) => In): <A, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In0, L, E, R>
|
|
796
863
|
/**
|
|
797
864
|
* Transforms this sink's input elements.
|
|
798
865
|
*
|
|
799
|
-
* @since 2.0.0
|
|
800
866
|
* @category mapping
|
|
867
|
+
* @since 2.0.0
|
|
801
868
|
*/
|
|
802
869
|
<A, In, L, E, R, In0>(self: Sink<A, In, L, E, R>, f: (input: In0) => In): Sink<A, In0, L, E, R>
|
|
803
870
|
} = dual(
|
|
@@ -809,22 +876,22 @@ export const mapInput: {
|
|
|
809
876
|
/**
|
|
810
877
|
* Effectfully transforms this sink's input elements.
|
|
811
878
|
*
|
|
812
|
-
* @since 2.0.0
|
|
813
879
|
* @category mapping
|
|
880
|
+
* @since 2.0.0
|
|
814
881
|
*/
|
|
815
882
|
export const mapInputEffect: {
|
|
816
883
|
/**
|
|
817
884
|
* Effectfully transforms this sink's input elements.
|
|
818
885
|
*
|
|
819
|
-
* @since 2.0.0
|
|
820
886
|
* @category mapping
|
|
887
|
+
* @since 2.0.0
|
|
821
888
|
*/
|
|
822
889
|
<In0, In, E2, R2>(f: (input: In0) => Effect.Effect<In, E2, R2>): <A, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In0, L, E2 | E, R2 | R>
|
|
823
890
|
/**
|
|
824
891
|
* Effectfully transforms this sink's input elements.
|
|
825
892
|
*
|
|
826
|
-
* @since 2.0.0
|
|
827
893
|
* @category mapping
|
|
894
|
+
* @since 2.0.0
|
|
828
895
|
*/
|
|
829
896
|
<A, In, L, E, R, In0, E2, R2>(self: Sink<A, In, L, E, R>, f: (input: In0) => Effect.Effect<In, E2, R2>): Sink<A, In0, L, E | E2, R | R2>
|
|
830
897
|
} = dual(
|
|
@@ -836,26 +903,29 @@ export const mapInputEffect: {
|
|
|
836
903
|
)
|
|
837
904
|
|
|
838
905
|
/**
|
|
839
|
-
* Transforms
|
|
906
|
+
* Transforms each non-empty array of upstream input before it is fed to this
|
|
907
|
+
* sink.
|
|
840
908
|
*
|
|
841
|
-
* @since 4.0.0
|
|
842
909
|
* @category mapping
|
|
910
|
+
* @since 4.0.0
|
|
843
911
|
*/
|
|
844
912
|
export const mapInputArray: {
|
|
845
913
|
/**
|
|
846
|
-
* Transforms
|
|
914
|
+
* Transforms each non-empty array of upstream input before it is fed to this
|
|
915
|
+
* sink.
|
|
847
916
|
*
|
|
848
|
-
* @since 4.0.0
|
|
849
917
|
* @category mapping
|
|
918
|
+
* @since 4.0.0
|
|
850
919
|
*/
|
|
851
920
|
<In0, In>(
|
|
852
921
|
f: (input: Arr.NonEmptyReadonlyArray<In0>) => Arr.NonEmptyReadonlyArray<In>
|
|
853
922
|
): <A, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In0, L, E, R>
|
|
854
923
|
/**
|
|
855
|
-
* Transforms
|
|
924
|
+
* Transforms each non-empty array of upstream input before it is fed to this
|
|
925
|
+
* sink.
|
|
856
926
|
*
|
|
857
|
-
* @since 4.0.0
|
|
858
927
|
* @category mapping
|
|
928
|
+
* @since 4.0.0
|
|
859
929
|
*/
|
|
860
930
|
<A, In, L, E, R, In0>(
|
|
861
931
|
self: Sink<A, In, L, E, R>,
|
|
@@ -870,26 +940,29 @@ export const mapInputArray: {
|
|
|
870
940
|
)
|
|
871
941
|
|
|
872
942
|
/**
|
|
873
|
-
* Effectfully transforms
|
|
943
|
+
* Effectfully transforms each non-empty array of upstream input before it is
|
|
944
|
+
* fed to this sink.
|
|
874
945
|
*
|
|
875
|
-
* @since 4.0.0
|
|
876
946
|
* @category mapping
|
|
947
|
+
* @since 4.0.0
|
|
877
948
|
*/
|
|
878
949
|
export const mapInputArrayEffect: {
|
|
879
950
|
/**
|
|
880
|
-
* Effectfully transforms
|
|
951
|
+
* Effectfully transforms each non-empty array of upstream input before it is
|
|
952
|
+
* fed to this sink.
|
|
881
953
|
*
|
|
882
|
-
* @since 4.0.0
|
|
883
954
|
* @category mapping
|
|
955
|
+
* @since 4.0.0
|
|
884
956
|
*/
|
|
885
957
|
<In0, In, E2, R2>(
|
|
886
958
|
f: (input: Arr.NonEmptyReadonlyArray<In0>) => Effect.Effect<Arr.NonEmptyReadonlyArray<In>, E2, R2>
|
|
887
959
|
): <A, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In0, L, E2 | E, R2 | R>
|
|
888
960
|
/**
|
|
889
|
-
* Effectfully transforms
|
|
961
|
+
* Effectfully transforms each non-empty array of upstream input before it is
|
|
962
|
+
* fed to this sink.
|
|
890
963
|
*
|
|
891
|
-
* @since 4.0.0
|
|
892
964
|
* @category mapping
|
|
965
|
+
* @since 4.0.0
|
|
893
966
|
*/
|
|
894
967
|
<A, In, L, E, R, In0, E2, R2>(
|
|
895
968
|
self: Sink<A, In, L, E, R>,
|
|
@@ -910,24 +983,30 @@ export const mapInputArrayEffect: {
|
|
|
910
983
|
)
|
|
911
984
|
|
|
912
985
|
/**
|
|
913
|
-
* Transforms this sink
|
|
986
|
+
* Transforms the full `End` produced by this sink.
|
|
987
|
+
*
|
|
988
|
+
* This can change both the result value and the optional leftovers.
|
|
914
989
|
*
|
|
915
|
-
* @since 4.0.0
|
|
916
990
|
* @category mapping
|
|
991
|
+
* @since 4.0.0
|
|
917
992
|
*/
|
|
918
993
|
export const mapEnd: {
|
|
919
994
|
/**
|
|
920
|
-
* Transforms this sink
|
|
995
|
+
* Transforms the full `End` produced by this sink.
|
|
996
|
+
*
|
|
997
|
+
* This can change both the result value and the optional leftovers.
|
|
921
998
|
*
|
|
922
|
-
* @since 4.0.0
|
|
923
999
|
* @category mapping
|
|
1000
|
+
* @since 4.0.0
|
|
924
1001
|
*/
|
|
925
1002
|
<A, L, A2, L2 = never>(f: (a: End<A, L>) => End<A2, L2>): <In, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L2, E, R>
|
|
926
1003
|
/**
|
|
927
|
-
* Transforms this sink
|
|
1004
|
+
* Transforms the full `End` produced by this sink.
|
|
1005
|
+
*
|
|
1006
|
+
* This can change both the result value and the optional leftovers.
|
|
928
1007
|
*
|
|
929
|
-
* @since 4.0.0
|
|
930
1008
|
* @category mapping
|
|
1009
|
+
* @since 4.0.0
|
|
931
1010
|
*/
|
|
932
1011
|
<A, In, L, E, R, A2, L2 = never>(self: Sink<A, In, L, E, R>, f: (a: End<A, L>) => End<A2, L2>): Sink<A2, In, L2, E, R>
|
|
933
1012
|
} = dual(
|
|
@@ -950,24 +1029,33 @@ const transformEffect = <A, In, L, E, R, A2, E2, R2, L2 = never>(
|
|
|
950
1029
|
): Sink<A2, In, L2, E2, R2> => fromTransform((upstream, scope) => f(self.transform(upstream, scope)))
|
|
951
1030
|
|
|
952
1031
|
/**
|
|
953
|
-
* Effectfully transforms this sink
|
|
1032
|
+
* Effectfully transforms the full `End` produced by this sink.
|
|
1033
|
+
*
|
|
1034
|
+
* This can change both the result value and the optional leftovers, and the
|
|
1035
|
+
* transformation can fail or require services.
|
|
954
1036
|
*
|
|
955
|
-
* @since 4.0.0
|
|
956
1037
|
* @category mapping
|
|
1038
|
+
* @since 4.0.0
|
|
957
1039
|
*/
|
|
958
1040
|
export const mapEffectEnd: {
|
|
959
1041
|
/**
|
|
960
|
-
* Effectfully transforms this sink
|
|
1042
|
+
* Effectfully transforms the full `End` produced by this sink.
|
|
1043
|
+
*
|
|
1044
|
+
* This can change both the result value and the optional leftovers, and the
|
|
1045
|
+
* transformation can fail or require services.
|
|
961
1046
|
*
|
|
962
|
-
* @since 4.0.0
|
|
963
1047
|
* @category mapping
|
|
1048
|
+
* @since 4.0.0
|
|
964
1049
|
*/
|
|
965
1050
|
<A, L, A2, E2, R2, L2 = never>(f: (end: End<A, L>) => Effect.Effect<End<A2, L2>, E2, R2>): <In, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L2, E2 | E, R2 | R>
|
|
966
1051
|
/**
|
|
967
|
-
* Effectfully transforms this sink
|
|
1052
|
+
* Effectfully transforms the full `End` produced by this sink.
|
|
1053
|
+
*
|
|
1054
|
+
* This can change both the result value and the optional leftovers, and the
|
|
1055
|
+
* transformation can fail or require services.
|
|
968
1056
|
*
|
|
969
|
-
* @since 4.0.0
|
|
970
1057
|
* @category mapping
|
|
1058
|
+
* @since 4.0.0
|
|
971
1059
|
*/
|
|
972
1060
|
<A, In, L, E, R, A2, E2, R2, L2 = never>(
|
|
973
1061
|
self: Sink<A, In, L, E, R>,
|
|
@@ -981,22 +1069,22 @@ export const mapEffectEnd: {
|
|
|
981
1069
|
/**
|
|
982
1070
|
* Effectfully transforms this sink's result.
|
|
983
1071
|
*
|
|
984
|
-
* @since 2.0.0
|
|
985
1072
|
* @category mapping
|
|
1073
|
+
* @since 2.0.0
|
|
986
1074
|
*/
|
|
987
1075
|
export const mapEffect: {
|
|
988
1076
|
/**
|
|
989
1077
|
* Effectfully transforms this sink's result.
|
|
990
1078
|
*
|
|
991
|
-
* @since 2.0.0
|
|
992
1079
|
* @category mapping
|
|
1080
|
+
* @since 2.0.0
|
|
993
1081
|
*/
|
|
994
1082
|
<A, A2, E2, R2>(f: (a: A) => Effect.Effect<A2, E2, R2>): <In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A2, In, L, E2 | E, R2 | R>
|
|
995
1083
|
/**
|
|
996
1084
|
* Effectfully transforms this sink's result.
|
|
997
1085
|
*
|
|
998
|
-
* @since 2.0.0
|
|
999
1086
|
* @category mapping
|
|
1087
|
+
* @since 2.0.0
|
|
1000
1088
|
*/
|
|
1001
1089
|
<A, In, L, E, R, A2, E2, R2>(self: Sink<A, In, L, E, R>, f: (a: A) => Effect.Effect<A2, E2, R2>): Sink<A2, In, L, E | E2, R | R2>
|
|
1002
1090
|
} = dual(2, <A, In, L, E, R, A2, E2, R2>(
|
|
@@ -1007,22 +1095,22 @@ export const mapEffect: {
|
|
|
1007
1095
|
/**
|
|
1008
1096
|
* Transforms the errors emitted by this sink using `f`.
|
|
1009
1097
|
*
|
|
1010
|
-
* @since 2.0.0
|
|
1011
1098
|
* @category mapping
|
|
1099
|
+
* @since 2.0.0
|
|
1012
1100
|
*/
|
|
1013
1101
|
export const mapError: {
|
|
1014
1102
|
/**
|
|
1015
1103
|
* Transforms the errors emitted by this sink using `f`.
|
|
1016
1104
|
*
|
|
1017
|
-
* @since 2.0.0
|
|
1018
1105
|
* @category mapping
|
|
1106
|
+
* @since 2.0.0
|
|
1019
1107
|
*/
|
|
1020
1108
|
<E, E2>(f: (error: E) => E2): <A, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E2, R>
|
|
1021
1109
|
/**
|
|
1022
1110
|
* Transforms the errors emitted by this sink using `f`.
|
|
1023
1111
|
*
|
|
1024
|
-
* @since 2.0.0
|
|
1025
1112
|
* @category mapping
|
|
1113
|
+
* @since 2.0.0
|
|
1026
1114
|
*/
|
|
1027
1115
|
<A, In, L, E, R, E2>(self: Sink<A, In, L, E, R>, f: (error: E) => E2): Sink<A, In, L, E2, R>
|
|
1028
1116
|
} = dual(2, <A, In, L, E, R, E2>(
|
|
@@ -1033,22 +1121,22 @@ export const mapError: {
|
|
|
1033
1121
|
/**
|
|
1034
1122
|
* Transforms the leftovers emitted by this sink using `f`.
|
|
1035
1123
|
*
|
|
1036
|
-
* @since 2.0.0
|
|
1037
1124
|
* @category mapping
|
|
1125
|
+
* @since 2.0.0
|
|
1038
1126
|
*/
|
|
1039
1127
|
export const mapLeftover: {
|
|
1040
1128
|
/**
|
|
1041
1129
|
* Transforms the leftovers emitted by this sink using `f`.
|
|
1042
1130
|
*
|
|
1043
|
-
* @since 2.0.0
|
|
1044
1131
|
* @category mapping
|
|
1132
|
+
* @since 2.0.0
|
|
1045
1133
|
*/
|
|
1046
1134
|
<L, L2>(f: (leftover: L) => L2): <A, In, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L2, E, R>
|
|
1047
1135
|
/**
|
|
1048
1136
|
* Transforms the leftovers emitted by this sink using `f`.
|
|
1049
1137
|
*
|
|
1050
|
-
* @since 2.0.0
|
|
1051
1138
|
* @category mapping
|
|
1139
|
+
* @since 2.0.0
|
|
1052
1140
|
*/
|
|
1053
1141
|
<A, In, L, E, R, L2>(self: Sink<A, In, L, E, R>, f: (leftover: L) => L2): Sink<A, In, L2, E, R>
|
|
1054
1142
|
} = dual(2, <A, In, L, E, R, L2>(
|
|
@@ -1057,8 +1145,14 @@ export const mapLeftover: {
|
|
|
1057
1145
|
): Sink<A, In, L2, E, R> => mapEnd(self, ([a, l]) => [a, l && Arr.map(l, f)]))
|
|
1058
1146
|
|
|
1059
1147
|
/**
|
|
1060
|
-
*
|
|
1148
|
+
* Collects up to `n` input elements into an array.
|
|
1149
|
+
*
|
|
1150
|
+
* If `n` is less than or equal to zero, the sink completes with an empty array.
|
|
1151
|
+
* If more elements are pulled than needed, the remaining elements from the same
|
|
1152
|
+
* array are returned as leftovers.
|
|
1153
|
+
*
|
|
1061
1154
|
* @category collecting
|
|
1155
|
+
* @since 2.0.0
|
|
1062
1156
|
*/
|
|
1063
1157
|
export const take = <In>(n: number): Sink<Array<In>, In, In> =>
|
|
1064
1158
|
fromTransform((upstream) => {
|
|
@@ -1099,8 +1193,8 @@ export const take = <In>(n: number): Sink<Array<In>, In, In> =>
|
|
|
1099
1193
|
*
|
|
1100
1194
|
* This function essentially runs sinks in sequence.
|
|
1101
1195
|
*
|
|
1102
|
-
* @since 2.0.0
|
|
1103
1196
|
* @category sequencing
|
|
1197
|
+
* @since 2.0.0
|
|
1104
1198
|
*/
|
|
1105
1199
|
export const flatMap: {
|
|
1106
1200
|
/**
|
|
@@ -1110,8 +1204,8 @@ export const flatMap: {
|
|
|
1110
1204
|
*
|
|
1111
1205
|
* This function essentially runs sinks in sequence.
|
|
1112
1206
|
*
|
|
1113
|
-
* @since 2.0.0
|
|
1114
1207
|
* @category sequencing
|
|
1208
|
+
* @since 2.0.0
|
|
1115
1209
|
*/
|
|
1116
1210
|
<A, A1, L, In1 extends L, L1, E1, R1>(f: (a: A) => Sink<A1, In1, L1, E1, R1>): <In, E, R>(self: Sink<A, In, L, E, R>) => Sink<A1, In & In1, L1 | L, E1 | E, R1 | R>
|
|
1117
1211
|
/**
|
|
@@ -1121,8 +1215,8 @@ export const flatMap: {
|
|
|
1121
1215
|
*
|
|
1122
1216
|
* This function essentially runs sinks in sequence.
|
|
1123
1217
|
*
|
|
1124
|
-
* @since 2.0.0
|
|
1125
1218
|
* @category sequencing
|
|
1219
|
+
* @since 2.0.0
|
|
1126
1220
|
*/
|
|
1127
1221
|
<A, In, L, E, R, A1, In1 extends L, L1, E1, R1>(self: Sink<A, In, L, E, R>, f: (a: A) => Sink<A1, In1, L1, E1, R1>): Sink<A1, In & In1, L | L1, E | E1, R | R1>
|
|
1128
1222
|
} = dual(2, <A, In, L, E, R, A1, In1 extends L, L1, E1, R1>(
|
|
@@ -1158,8 +1252,8 @@ export const flatMap: {
|
|
|
1158
1252
|
* A sink that reduces its inputs using the provided function `f` starting from
|
|
1159
1253
|
* the provided `initial` state while the specified `predicate` returns `true`.
|
|
1160
1254
|
*
|
|
1161
|
-
* @since 2.0.0
|
|
1162
1255
|
* @category reducing
|
|
1256
|
+
* @since 2.0.0
|
|
1163
1257
|
*/
|
|
1164
1258
|
export const reduceWhile = <S, In>(
|
|
1165
1259
|
initial: LazyArg<S>,
|
|
@@ -1195,8 +1289,8 @@ export const reduceWhile = <S, In>(
|
|
|
1195
1289
|
* starting from the provided `initial` state while the specified `predicate`
|
|
1196
1290
|
* returns `true`.
|
|
1197
1291
|
*
|
|
1198
|
-
* @since 2.0.0
|
|
1199
1292
|
* @category reducing
|
|
1293
|
+
* @since 2.0.0
|
|
1200
1294
|
*/
|
|
1201
1295
|
export const reduceWhileEffect = <S, In, E, R>(
|
|
1202
1296
|
initial: LazyArg<S>,
|
|
@@ -1236,8 +1330,8 @@ export const reduceWhileEffect = <S, In, E, R>(
|
|
|
1236
1330
|
* A sink that reduces its inputs using the provided function `f` starting from
|
|
1237
1331
|
* the provided `initial` state while the specified `predicate` returns `true`.
|
|
1238
1332
|
*
|
|
1239
|
-
* @since 4.0.0
|
|
1240
1333
|
* @category reducing
|
|
1334
|
+
* @since 4.0.0
|
|
1241
1335
|
*/
|
|
1242
1336
|
export const reduceWhileArray = <S, In>(
|
|
1243
1337
|
initial: LazyArg<S>,
|
|
@@ -1269,8 +1363,8 @@ export const reduceWhileArray = <S, In>(
|
|
|
1269
1363
|
* starting from the provided `initial` state while the specified `predicate`
|
|
1270
1364
|
* returns `true`.
|
|
1271
1365
|
*
|
|
1272
|
-
* @since 4.0.0
|
|
1273
1366
|
* @category reducing
|
|
1367
|
+
* @since 4.0.0
|
|
1274
1368
|
*/
|
|
1275
1369
|
export const reduceWhileArrayEffect = <S, In, E, R>(
|
|
1276
1370
|
initial: LazyArg<S>,
|
|
@@ -1300,8 +1394,8 @@ export const reduceWhileArrayEffect = <S, In, E, R>(
|
|
|
1300
1394
|
* A sink that reduces its inputs using the provided function `f` starting from
|
|
1301
1395
|
* the provided `initial` state.
|
|
1302
1396
|
*
|
|
1303
|
-
* @since 2.0.0
|
|
1304
1397
|
* @category reducing
|
|
1398
|
+
* @since 2.0.0
|
|
1305
1399
|
*/
|
|
1306
1400
|
export const reduce = <S, In>(initial: LazyArg<S>, f: (s: S, input: In) => S): Sink<S, In> =>
|
|
1307
1401
|
reduceArray(initial, (s, arr) => {
|
|
@@ -1315,8 +1409,8 @@ export const reduce = <S, In>(initial: LazyArg<S>, f: (s: S, input: In) => S): S
|
|
|
1315
1409
|
* A sink that reduces its inputs using the provided function `f` starting from
|
|
1316
1410
|
* the specified `initial` state.
|
|
1317
1411
|
*
|
|
1318
|
-
* @since 2.0.0
|
|
1319
1412
|
* @category reducing
|
|
1413
|
+
* @since 2.0.0
|
|
1320
1414
|
*/
|
|
1321
1415
|
export const reduceArray = <S, In>(
|
|
1322
1416
|
initial: LazyArg<S>,
|
|
@@ -1338,8 +1432,8 @@ export const reduceArray = <S, In>(
|
|
|
1338
1432
|
* A sink that reduces its inputs using the provided effectful function `f`
|
|
1339
1433
|
* starting from the specified `initial` state.
|
|
1340
1434
|
*
|
|
1341
|
-
* @since 2.0.0
|
|
1342
1435
|
* @category reducing
|
|
1436
|
+
* @since 2.0.0
|
|
1343
1437
|
*/
|
|
1344
1438
|
export const reduceEffect = <S, In, E, R>(
|
|
1345
1439
|
initial: LazyArg<S>,
|
|
@@ -1351,8 +1445,8 @@ const head_ = reduceWhile(Option.none<unknown>, Option.isNone, (_, in_) => Optio
|
|
|
1351
1445
|
/**
|
|
1352
1446
|
* Creates a sink containing the first value.
|
|
1353
1447
|
*
|
|
1354
|
-
* @since 2.0.0
|
|
1355
1448
|
* @category constructors
|
|
1449
|
+
* @since 2.0.0
|
|
1356
1450
|
*/
|
|
1357
1451
|
export const head = <In>(): Sink<Option.Option<In>, In, In> => head_ as any
|
|
1358
1452
|
|
|
@@ -1361,30 +1455,30 @@ const last_ = reduceArray(Option.none<unknown>, (_, arr) => Arr.last(arr))
|
|
|
1361
1455
|
/**
|
|
1362
1456
|
* Creates a sink containing the last value.
|
|
1363
1457
|
*
|
|
1364
|
-
* @since 2.0.0
|
|
1365
1458
|
* @category constructors
|
|
1459
|
+
* @since 2.0.0
|
|
1366
1460
|
*/
|
|
1367
1461
|
export const last = <In>(): Sink<Option.Option<In>, In> => last_ as any
|
|
1368
1462
|
|
|
1369
1463
|
/**
|
|
1370
1464
|
* Creates a sink containing the first matching value.
|
|
1371
1465
|
*
|
|
1372
|
-
* @since 4.0.0
|
|
1373
1466
|
* @category constructors
|
|
1467
|
+
* @since 4.0.0
|
|
1374
1468
|
*/
|
|
1375
1469
|
export const find: {
|
|
1376
1470
|
/**
|
|
1377
1471
|
* Creates a sink containing the first matching value.
|
|
1378
1472
|
*
|
|
1379
|
-
* @since 4.0.0
|
|
1380
1473
|
* @category constructors
|
|
1474
|
+
* @since 4.0.0
|
|
1381
1475
|
*/
|
|
1382
1476
|
<In, Out extends In>(refinement: Refinement<In, Out>): Sink<Option.Option<Out>, In, In>
|
|
1383
1477
|
/**
|
|
1384
1478
|
* Creates a sink containing the first matching value.
|
|
1385
1479
|
*
|
|
1386
|
-
* @since 4.0.0
|
|
1387
1480
|
* @category constructors
|
|
1481
|
+
* @since 4.0.0
|
|
1388
1482
|
*/
|
|
1389
1483
|
<In>(predicate: Predicate<In>): Sink<Option.Option<In>, In, In>
|
|
1390
1484
|
} = <In>(predicate: Predicate<In>): Sink<Option.Option<In>, In, In> =>
|
|
@@ -1397,8 +1491,8 @@ export const find: {
|
|
|
1397
1491
|
/**
|
|
1398
1492
|
* Creates a sink containing the first matching value.
|
|
1399
1493
|
*
|
|
1400
|
-
* @since 4.0.0
|
|
1401
1494
|
* @category constructors
|
|
1495
|
+
* @since 4.0.0
|
|
1402
1496
|
*/
|
|
1403
1497
|
export const findEffect = <In, E, R>(
|
|
1404
1498
|
predicate: (input: In) => Effect.Effect<boolean, E, R>
|
|
@@ -1412,8 +1506,8 @@ export const findEffect = <In, E, R>(
|
|
|
1412
1506
|
/**
|
|
1413
1507
|
* Creates a sink which sums up its inputs.
|
|
1414
1508
|
*
|
|
1415
|
-
* @since 2.0.0
|
|
1416
1509
|
* @category constructors
|
|
1510
|
+
* @since 2.0.0
|
|
1417
1511
|
*/
|
|
1418
1512
|
export const sum: Sink<number, number> = reduceArray(() => 0, (s, arr) => {
|
|
1419
1513
|
for (let i = 0; i < arr.length; i++) {
|
|
@@ -1425,16 +1519,16 @@ export const sum: Sink<number, number> = reduceArray(() => 0, (s, arr) => {
|
|
|
1425
1519
|
/**
|
|
1426
1520
|
* A sink that counts the number of elements fed to it.
|
|
1427
1521
|
*
|
|
1428
|
-
* @since 2.0.0
|
|
1429
1522
|
* @category constructors
|
|
1523
|
+
* @since 2.0.0
|
|
1430
1524
|
*/
|
|
1431
1525
|
export const count: Sink<number, unknown> = reduceArray(() => 0, (s, arr) => s + arr.length)
|
|
1432
1526
|
|
|
1433
1527
|
/**
|
|
1434
1528
|
* Accumulates incoming elements into an array.
|
|
1435
1529
|
*
|
|
1436
|
-
* @since 2.0.0
|
|
1437
1530
|
* @category constructors
|
|
1531
|
+
* @since 2.0.0
|
|
1438
1532
|
*/
|
|
1439
1533
|
export const collect = <In>(): Sink<Array<In>, In> =>
|
|
1440
1534
|
reduceArray(Arr.empty<In>, (s, arr) => {
|
|
@@ -1443,18 +1537,36 @@ export const collect = <In>(): Sink<Array<In>, In> =>
|
|
|
1443
1537
|
})
|
|
1444
1538
|
|
|
1445
1539
|
/**
|
|
1446
|
-
*
|
|
1540
|
+
* Collects the longest input prefix whose elements satisfy the predicate or
|
|
1541
|
+
* refinement.
|
|
1542
|
+
*
|
|
1543
|
+
* The first failing input is consumed and excluded from the result. Any later
|
|
1544
|
+
* elements from the same pulled array are returned as leftovers.
|
|
1545
|
+
*
|
|
1447
1546
|
* @category constructors
|
|
1547
|
+
* @since 4.0.0
|
|
1448
1548
|
*/
|
|
1449
1549
|
export const takeWhile: {
|
|
1450
1550
|
/**
|
|
1451
|
-
*
|
|
1551
|
+
* Collects the longest input prefix whose elements satisfy the predicate or
|
|
1552
|
+
* refinement.
|
|
1553
|
+
*
|
|
1554
|
+
* The first failing input is consumed and excluded from the result. Any later
|
|
1555
|
+
* elements from the same pulled array are returned as leftovers.
|
|
1556
|
+
*
|
|
1452
1557
|
* @category constructors
|
|
1558
|
+
* @since 4.0.0
|
|
1453
1559
|
*/
|
|
1454
1560
|
<In, Out extends In>(refinement: Refinement<In, Out>): Sink<Array<Out>, In, In>
|
|
1455
1561
|
/**
|
|
1456
|
-
*
|
|
1562
|
+
* Collects the longest input prefix whose elements satisfy the predicate or
|
|
1563
|
+
* refinement.
|
|
1564
|
+
*
|
|
1565
|
+
* The first failing input is consumed and excluded from the result. Any later
|
|
1566
|
+
* elements from the same pulled array are returned as leftovers.
|
|
1567
|
+
*
|
|
1457
1568
|
* @category constructors
|
|
1569
|
+
* @since 4.0.0
|
|
1458
1570
|
*/
|
|
1459
1571
|
<In>(predicate: Predicate<In>): Sink<Array<In>, In, In>
|
|
1460
1572
|
} = <In>(predicate: Predicate<In>): Sink<Array<In>, In, In> =>
|
|
@@ -1479,8 +1591,15 @@ export const takeWhile: {
|
|
|
1479
1591
|
})
|
|
1480
1592
|
|
|
1481
1593
|
/**
|
|
1482
|
-
*
|
|
1594
|
+
* Applies a `Filter` to input elements while it succeeds, collecting each
|
|
1595
|
+
* successful output.
|
|
1596
|
+
*
|
|
1597
|
+
* The first input for which the filter fails is consumed and excluded from the
|
|
1598
|
+
* result. Any later elements from the same pulled array are returned as
|
|
1599
|
+
* leftovers.
|
|
1600
|
+
*
|
|
1483
1601
|
* @category constructors
|
|
1602
|
+
* @since 4.0.0
|
|
1484
1603
|
*/
|
|
1485
1604
|
export const takeWhileFilter = <In, Out, X>(
|
|
1486
1605
|
filter: Filter.Filter<In, Out, X>
|
|
@@ -1507,13 +1626,25 @@ export const takeWhileFilter = <In, Out, X>(
|
|
|
1507
1626
|
})
|
|
1508
1627
|
|
|
1509
1628
|
/**
|
|
1510
|
-
*
|
|
1629
|
+
* Effectfully collects input elements while the predicate succeeds.
|
|
1630
|
+
*
|
|
1631
|
+
* The first input for which the predicate returns `false` is consumed and
|
|
1632
|
+
* excluded from the result. Any later elements from the same pulled array are
|
|
1633
|
+
* returned as leftovers.
|
|
1634
|
+
*
|
|
1511
1635
|
* @category constructors
|
|
1636
|
+
* @since 4.0.0
|
|
1512
1637
|
*/
|
|
1513
1638
|
export const takeWhileEffect: {
|
|
1514
1639
|
/**
|
|
1515
|
-
*
|
|
1640
|
+
* Effectfully collects input elements while the predicate succeeds.
|
|
1641
|
+
*
|
|
1642
|
+
* The first input for which the predicate returns `false` is consumed and
|
|
1643
|
+
* excluded from the result. Any later elements from the same pulled array are
|
|
1644
|
+
* returned as leftovers.
|
|
1645
|
+
*
|
|
1516
1646
|
* @category constructors
|
|
1647
|
+
* @since 4.0.0
|
|
1517
1648
|
*/
|
|
1518
1649
|
<In, E, R>(predicate: (input: In) => Effect.Effect<boolean, E, R>): Sink<Array<In>, In, In, E, R>
|
|
1519
1650
|
} = <In, E, R>(
|
|
@@ -1552,8 +1683,15 @@ export const takeWhileEffect: {
|
|
|
1552
1683
|
})
|
|
1553
1684
|
|
|
1554
1685
|
/**
|
|
1555
|
-
*
|
|
1686
|
+
* Effectfully applies a `FilterEffect` to input elements while it succeeds,
|
|
1687
|
+
* collecting each successful output.
|
|
1688
|
+
*
|
|
1689
|
+
* The first input for which the filter fails is consumed and excluded from the
|
|
1690
|
+
* result. Any later elements from the same pulled array are returned as
|
|
1691
|
+
* leftovers.
|
|
1692
|
+
*
|
|
1556
1693
|
* @category constructors
|
|
1694
|
+
* @since 4.0.0
|
|
1557
1695
|
*/
|
|
1558
1696
|
export const takeWhileFilterEffect = <In, Out, X, E, R>(
|
|
1559
1697
|
filter: Filter.FilterEffect<In, Out, X, E, R>
|
|
@@ -1585,8 +1723,11 @@ export const takeWhileFilterEffect = <In, Out, X, E, R>(
|
|
|
1585
1723
|
})
|
|
1586
1724
|
|
|
1587
1725
|
/**
|
|
1588
|
-
*
|
|
1726
|
+
* Collects input elements until the predicate returns `true`, including the
|
|
1727
|
+
* matching element in the result.
|
|
1728
|
+
*
|
|
1589
1729
|
* @category constructors
|
|
1730
|
+
* @since 4.0.0
|
|
1590
1731
|
*/
|
|
1591
1732
|
export const takeUntil = <In>(predicate: Predicate<In>): Sink<Array<In>, In, In> =>
|
|
1592
1733
|
suspend(() => {
|
|
@@ -1599,8 +1740,13 @@ export const takeUntil = <In>(predicate: Predicate<In>): Sink<Array<In>, In, In>
|
|
|
1599
1740
|
})
|
|
1600
1741
|
|
|
1601
1742
|
/**
|
|
1602
|
-
*
|
|
1743
|
+
* Effectfully collects input elements until the predicate returns `true`,
|
|
1744
|
+
* including the matching element in the result.
|
|
1745
|
+
*
|
|
1746
|
+
* If the predicate effect fails, the sink fails with the same error.
|
|
1747
|
+
*
|
|
1603
1748
|
* @category constructors
|
|
1749
|
+
* @since 4.0.0
|
|
1604
1750
|
*/
|
|
1605
1751
|
export const takeUntilEffect = <In, E, R>(
|
|
1606
1752
|
predicate: (input: In) => Effect.Effect<boolean, E, R>
|
|
@@ -1622,7 +1768,8 @@ export const takeUntilEffect = <In, E, R>(
|
|
|
1622
1768
|
* A sink that executes the provided effectful function for every item fed
|
|
1623
1769
|
* to it.
|
|
1624
1770
|
*
|
|
1625
|
-
*
|
|
1771
|
+
* **Example** (Running effects for each item)
|
|
1772
|
+
*
|
|
1626
1773
|
* ```ts
|
|
1627
1774
|
* import { Console, Effect, Sink, Stream } from "effect"
|
|
1628
1775
|
*
|
|
@@ -1640,8 +1787,8 @@ export const takeUntilEffect = <In, E, R>(
|
|
|
1640
1787
|
* // Processing: 3
|
|
1641
1788
|
* ```
|
|
1642
1789
|
*
|
|
1643
|
-
* @since 2.0.0
|
|
1644
1790
|
* @category constructors
|
|
1791
|
+
* @since 2.0.0
|
|
1645
1792
|
*/
|
|
1646
1793
|
export const forEach = <In, X, E, R>(
|
|
1647
1794
|
f: (input: In) => Effect.Effect<X, E, R>
|
|
@@ -1651,7 +1798,8 @@ export const forEach = <In, X, E, R>(
|
|
|
1651
1798
|
* A sink that executes the provided effectful function for every Chunk fed
|
|
1652
1799
|
* to it.
|
|
1653
1800
|
*
|
|
1654
|
-
*
|
|
1801
|
+
* **Example** (Running effects for each chunk)
|
|
1802
|
+
*
|
|
1655
1803
|
* ```ts
|
|
1656
1804
|
* import { Console, Effect, Sink, Stream } from "effect"
|
|
1657
1805
|
*
|
|
@@ -1670,8 +1818,8 @@ export const forEach = <In, X, E, R>(
|
|
|
1670
1818
|
* // Output: Processing chunk of 5 items: [1, 2, 3, 4, 5]
|
|
1671
1819
|
* ```
|
|
1672
1820
|
*
|
|
1673
|
-
* @since 4.0.0
|
|
1674
1821
|
* @category constructors
|
|
1822
|
+
* @since 4.0.0
|
|
1675
1823
|
*/
|
|
1676
1824
|
export const forEachArray = <In, X, E, R>(
|
|
1677
1825
|
f: (input: NonEmptyReadonlyArray<In>) => Effect.Effect<X, E, R>
|
|
@@ -1685,8 +1833,13 @@ export const forEachArray = <In, X, E, R>(
|
|
|
1685
1833
|
)
|
|
1686
1834
|
|
|
1687
1835
|
/**
|
|
1688
|
-
*
|
|
1836
|
+
* Runs an effectful function for each input element while it returns `true`.
|
|
1837
|
+
*
|
|
1838
|
+
* The sink stops consuming input when the function returns `false` or when the
|
|
1839
|
+
* upstream stream ends, and completes with `void`.
|
|
1840
|
+
*
|
|
1689
1841
|
* @category constructors
|
|
1842
|
+
* @since 2.0.0
|
|
1690
1843
|
*/
|
|
1691
1844
|
export const forEachWhile = <In, E, R>(
|
|
1692
1845
|
f: (input: In) => Effect.Effect<boolean, E, R>
|
|
@@ -1700,8 +1853,14 @@ export const forEachWhile = <In, E, R>(
|
|
|
1700
1853
|
}))
|
|
1701
1854
|
|
|
1702
1855
|
/**
|
|
1703
|
-
*
|
|
1856
|
+
* Runs an effectful function for each non-empty input array while it returns
|
|
1857
|
+
* `true`.
|
|
1858
|
+
*
|
|
1859
|
+
* The sink stops consuming input when the function returns `false` or when the
|
|
1860
|
+
* upstream stream ends, and completes with `void`.
|
|
1861
|
+
*
|
|
1704
1862
|
* @category constructors
|
|
1863
|
+
* @since 2.0.0
|
|
1705
1864
|
*/
|
|
1706
1865
|
export const forEachWhileArray = <In, E, R>(
|
|
1707
1866
|
f: (input: NonEmptyReadonlyArray<In>) => Effect.Effect<boolean, E, R>
|
|
@@ -1718,7 +1877,8 @@ export const forEachWhileArray = <In, E, R>(
|
|
|
1718
1877
|
/**
|
|
1719
1878
|
* Creates a sink produced from a scoped effect.
|
|
1720
1879
|
*
|
|
1721
|
-
*
|
|
1880
|
+
* **Example** (Unwrapping a sink effect)
|
|
1881
|
+
*
|
|
1722
1882
|
* ```ts
|
|
1723
1883
|
* import { Console, Effect, Sink, Stream } from "effect"
|
|
1724
1884
|
*
|
|
@@ -1739,8 +1899,8 @@ export const forEachWhileArray = <In, E, R>(
|
|
|
1739
1899
|
* // Item: 3
|
|
1740
1900
|
* ```
|
|
1741
1901
|
*
|
|
1742
|
-
* @since 2.0.0
|
|
1743
1902
|
* @category constructors
|
|
1903
|
+
* @since 2.0.0
|
|
1744
1904
|
*/
|
|
1745
1905
|
export const unwrap = <A, In, L, E, R, R2>(
|
|
1746
1906
|
effect: Effect.Effect<Sink<A, In, L, E, R2>, E, R>
|
|
@@ -1750,24 +1910,24 @@ export const unwrap = <A, In, L, E, R, R2>(
|
|
|
1750
1910
|
* Summarize a sink by running an effect when the sink starts and again when
|
|
1751
1911
|
* it completes.
|
|
1752
1912
|
*
|
|
1753
|
-
* @since 2.0.0
|
|
1754
1913
|
* @category utils
|
|
1914
|
+
* @since 2.0.0
|
|
1755
1915
|
*/
|
|
1756
1916
|
export const summarized: {
|
|
1757
1917
|
/**
|
|
1758
1918
|
* Summarize a sink by running an effect when the sink starts and again when
|
|
1759
1919
|
* it completes.
|
|
1760
1920
|
*
|
|
1761
|
-
* @since 2.0.0
|
|
1762
1921
|
* @category utils
|
|
1922
|
+
* @since 2.0.0
|
|
1763
1923
|
*/
|
|
1764
1924
|
<A2, E2, R2, A3>(summary: Effect.Effect<A2, E2, R2>, f: (start: A2, end: A2) => A3): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<[A, A3], In, L, E2 | E, R2 | R>
|
|
1765
1925
|
/**
|
|
1766
1926
|
* Summarize a sink by running an effect when the sink starts and again when
|
|
1767
1927
|
* it completes.
|
|
1768
1928
|
*
|
|
1769
|
-
* @since 2.0.0
|
|
1770
1929
|
* @category utils
|
|
1930
|
+
* @since 2.0.0
|
|
1771
1931
|
*/
|
|
1772
1932
|
<A, In, L, E, R, A2, E2, R2, A3>(
|
|
1773
1933
|
self: Sink<A, In, L, E, R>,
|
|
@@ -1789,8 +1949,8 @@ export const summarized: {
|
|
|
1789
1949
|
/**
|
|
1790
1950
|
* Returns the sink that executes this one and times its execution.
|
|
1791
1951
|
*
|
|
1792
|
-
* @since 2.0.0
|
|
1793
1952
|
* @category utils
|
|
1953
|
+
* @since 2.0.0
|
|
1794
1954
|
*/
|
|
1795
1955
|
export const withDuration = <A, In, L, E, R>(
|
|
1796
1956
|
self: Sink<A, In, L, E, R>
|
|
@@ -1798,24 +1958,41 @@ export const withDuration = <A, In, L, E, R>(
|
|
|
1798
1958
|
summarized(self, Clock.currentTimeNanos, (start, end) => Duration.nanos(end - start))
|
|
1799
1959
|
|
|
1800
1960
|
/**
|
|
1801
|
-
*
|
|
1961
|
+
* A sink that drains all input and returns the elapsed duration.
|
|
1962
|
+
*
|
|
1802
1963
|
* @category constructors
|
|
1964
|
+
* @since 2.0.0
|
|
1803
1965
|
*/
|
|
1804
1966
|
export const timed: Sink<Duration.Duration, unknown> = map(withDuration(drain), ([, duration]) => duration)
|
|
1805
1967
|
|
|
1806
1968
|
/**
|
|
1807
|
-
*
|
|
1969
|
+
* Provides a `Context` to this sink.
|
|
1970
|
+
*
|
|
1971
|
+
* Services contained in the provided context are removed from the sink's
|
|
1972
|
+
* service requirements.
|
|
1973
|
+
*
|
|
1808
1974
|
* @category Services
|
|
1975
|
+
* @since 4.0.0
|
|
1809
1976
|
*/
|
|
1810
1977
|
export const provideContext: {
|
|
1811
1978
|
/**
|
|
1812
|
-
*
|
|
1979
|
+
* Provides a `Context` to this sink.
|
|
1980
|
+
*
|
|
1981
|
+
* Services contained in the provided context are removed from the sink's
|
|
1982
|
+
* service requirements.
|
|
1983
|
+
*
|
|
1813
1984
|
* @category Services
|
|
1985
|
+
* @since 4.0.0
|
|
1814
1986
|
*/
|
|
1815
1987
|
<Provided>(context: Context.Context<Provided>): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E, Exclude<R, Provided>>
|
|
1816
1988
|
/**
|
|
1817
|
-
*
|
|
1989
|
+
* Provides a `Context` to this sink.
|
|
1990
|
+
*
|
|
1991
|
+
* Services contained in the provided context are removed from the sink's
|
|
1992
|
+
* service requirements.
|
|
1993
|
+
*
|
|
1818
1994
|
* @category Services
|
|
1995
|
+
* @since 4.0.0
|
|
1819
1996
|
*/
|
|
1820
1997
|
<A, In, L, E, R, Provided>(self: Sink<A, In, L, E, R>, context: Context.Context<Provided>): Sink<A, In, L, E, Exclude<R, Provided>>
|
|
1821
1998
|
} = dual(2, <A, In, L, E, R, Provided>(
|
|
@@ -1829,18 +2006,33 @@ export const provideContext: {
|
|
|
1829
2006
|
))
|
|
1830
2007
|
|
|
1831
2008
|
/**
|
|
1832
|
-
*
|
|
2009
|
+
* Provides a single service implementation to this sink.
|
|
2010
|
+
*
|
|
2011
|
+
* The service identified by `key` is removed from the sink's service
|
|
2012
|
+
* requirements.
|
|
2013
|
+
*
|
|
1833
2014
|
* @category Services
|
|
2015
|
+
* @since 4.0.0
|
|
1834
2016
|
*/
|
|
1835
2017
|
export const provideService: {
|
|
1836
2018
|
/**
|
|
1837
|
-
*
|
|
2019
|
+
* Provides a single service implementation to this sink.
|
|
2020
|
+
*
|
|
2021
|
+
* The service identified by `key` is removed from the sink's service
|
|
2022
|
+
* requirements.
|
|
2023
|
+
*
|
|
1838
2024
|
* @category Services
|
|
2025
|
+
* @since 4.0.0
|
|
1839
2026
|
*/
|
|
1840
2027
|
<I, S>(key: Context.Key<I, S>, value: Types.NoInfer<S>): <A, In, L, E, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E, Exclude<R, I>>
|
|
1841
2028
|
/**
|
|
1842
|
-
*
|
|
2029
|
+
* Provides a single service implementation to this sink.
|
|
2030
|
+
*
|
|
2031
|
+
* The service identified by `key` is removed from the sink's service
|
|
2032
|
+
* requirements.
|
|
2033
|
+
*
|
|
1843
2034
|
* @category Services
|
|
2035
|
+
* @since 4.0.0
|
|
1844
2036
|
*/
|
|
1845
2037
|
<A, In, L, E, R, I, S>(
|
|
1846
2038
|
self: Sink<A, In, L, E, R>,
|
|
@@ -1859,18 +2051,36 @@ export const provideService: {
|
|
|
1859
2051
|
))
|
|
1860
2052
|
|
|
1861
2053
|
/**
|
|
1862
|
-
*
|
|
2054
|
+
* Runs a fallback sink if this sink fails with a typed error.
|
|
2055
|
+
*
|
|
2056
|
+
* The fallback is built from the error and continues consuming from the same
|
|
2057
|
+
* upstream stream. If the upstream stream had already ended, the fallback sees
|
|
2058
|
+
* the upstream end instead.
|
|
2059
|
+
*
|
|
1863
2060
|
* @category Error handling
|
|
2061
|
+
* @since 2.0.0
|
|
1864
2062
|
*/
|
|
1865
2063
|
export const orElse: {
|
|
1866
2064
|
/**
|
|
1867
|
-
*
|
|
2065
|
+
* Runs a fallback sink if this sink fails with a typed error.
|
|
2066
|
+
*
|
|
2067
|
+
* The fallback is built from the error and continues consuming from the same
|
|
2068
|
+
* upstream stream. If the upstream stream had already ended, the fallback sees
|
|
2069
|
+
* the upstream end instead.
|
|
2070
|
+
*
|
|
1868
2071
|
* @category Error handling
|
|
2072
|
+
* @since 2.0.0
|
|
1869
2073
|
*/
|
|
1870
2074
|
<E, A2, In2, L2, E2, R2>(f: (error: Types.NoInfer<E>) => Sink<A2, In2, L2, E2, R2>): <A, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A2 | A, In & In2, L2 | L, E2 | E, R2 | R>
|
|
1871
2075
|
/**
|
|
1872
|
-
*
|
|
2076
|
+
* Runs a fallback sink if this sink fails with a typed error.
|
|
2077
|
+
*
|
|
2078
|
+
* The fallback is built from the error and continues consuming from the same
|
|
2079
|
+
* upstream stream. If the upstream stream had already ended, the fallback sees
|
|
2080
|
+
* the upstream end instead.
|
|
2081
|
+
*
|
|
1873
2082
|
* @category Error handling
|
|
2083
|
+
* @since 2.0.0
|
|
1874
2084
|
*/
|
|
1875
2085
|
<A, In, L, E, R, A2, In2, L2, E2, R2>(self: Sink<A, In, L, E, R>, f: (error: E) => Sink<A2, In2, L2, E2, R2>): Sink<A | A2, In & In2, L | L2, E | E2, R | R2>
|
|
1876
2086
|
} = dual(2, <A, In, L, E, R, A2, In2, L2, E2, R2>(
|
|
@@ -1899,18 +2109,36 @@ export const orElse: {
|
|
|
1899
2109
|
}))
|
|
1900
2110
|
|
|
1901
2111
|
/**
|
|
1902
|
-
*
|
|
2112
|
+
* Handles failures from this sink by inspecting the full `Cause`.
|
|
2113
|
+
*
|
|
2114
|
+
* When this sink fails, the handler effect is run and its success value
|
|
2115
|
+
* becomes the sink result. If the handler fails, the returned sink fails with
|
|
2116
|
+
* that error.
|
|
2117
|
+
*
|
|
1903
2118
|
* @category Error handling
|
|
2119
|
+
* @since 4.0.0
|
|
1904
2120
|
*/
|
|
1905
2121
|
export const catchCause: {
|
|
1906
2122
|
/**
|
|
1907
|
-
*
|
|
2123
|
+
* Handles failures from this sink by inspecting the full `Cause`.
|
|
2124
|
+
*
|
|
2125
|
+
* When this sink fails, the handler effect is run and its success value
|
|
2126
|
+
* becomes the sink result. If the handler fails, the returned sink fails with
|
|
2127
|
+
* that error.
|
|
2128
|
+
*
|
|
1908
2129
|
* @category Error handling
|
|
2130
|
+
* @since 4.0.0
|
|
1909
2131
|
*/
|
|
1910
2132
|
<E, A2, E2, R2>(f: (error: Cause.Cause<Types.NoInfer<E>>) => Effect.Effect<A2, E2, R2>): <A, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A2 | A, In, L, E, R2 | R>
|
|
1911
2133
|
/**
|
|
1912
|
-
*
|
|
2134
|
+
* Handles failures from this sink by inspecting the full `Cause`.
|
|
2135
|
+
*
|
|
2136
|
+
* When this sink fails, the handler effect is run and its success value
|
|
2137
|
+
* becomes the sink result. If the handler fails, the returned sink fails with
|
|
2138
|
+
* that error.
|
|
2139
|
+
*
|
|
1913
2140
|
* @category Error handling
|
|
2141
|
+
* @since 4.0.0
|
|
1914
2142
|
*/
|
|
1915
2143
|
<A, In, L, E, R, A2, E2, R2>(
|
|
1916
2144
|
self: Sink<A, In, L, E, R>,
|
|
@@ -1944,25 +2172,40 @@ const catch_: {
|
|
|
1944
2172
|
|
|
1945
2173
|
export {
|
|
1946
2174
|
/**
|
|
1947
|
-
* @since 4.0.0
|
|
1948
2175
|
* @category Error handling
|
|
2176
|
+
* @since 4.0.0
|
|
1949
2177
|
*/
|
|
1950
2178
|
catch_ as catch
|
|
1951
2179
|
}
|
|
1952
2180
|
|
|
1953
2181
|
/**
|
|
1954
|
-
*
|
|
2182
|
+
* Runs an effect after this sink completes, fails, or is interrupted.
|
|
2183
|
+
*
|
|
2184
|
+
* The effect receives the sink's `Exit` for the result value. The original
|
|
2185
|
+
* sink result and leftovers are preserved unless the finalizer itself fails.
|
|
2186
|
+
*
|
|
1955
2187
|
* @category Finalization
|
|
2188
|
+
* @since 4.0.0
|
|
1956
2189
|
*/
|
|
1957
2190
|
export const onExit: {
|
|
1958
2191
|
/**
|
|
1959
|
-
*
|
|
2192
|
+
* Runs an effect after this sink completes, fails, or is interrupted.
|
|
2193
|
+
*
|
|
2194
|
+
* The effect receives the sink's `Exit` for the result value. The original
|
|
2195
|
+
* sink result and leftovers are preserved unless the finalizer itself fails.
|
|
2196
|
+
*
|
|
1960
2197
|
* @category Finalization
|
|
2198
|
+
* @since 4.0.0
|
|
1961
2199
|
*/
|
|
1962
2200
|
<A, E, X, E2, R2>(f: (exit: Exit.Exit<A, E>) => Effect.Effect<X, E2, R2>): <In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E | E2, R2 | R>
|
|
1963
2201
|
/**
|
|
1964
|
-
*
|
|
2202
|
+
* Runs an effect after this sink completes, fails, or is interrupted.
|
|
2203
|
+
*
|
|
2204
|
+
* The effect receives the sink's `Exit` for the result value. The original
|
|
2205
|
+
* sink result and leftovers are preserved unless the finalizer itself fails.
|
|
2206
|
+
*
|
|
1965
2207
|
* @category Finalization
|
|
2208
|
+
* @since 4.0.0
|
|
1966
2209
|
*/
|
|
1967
2210
|
<A, In, L, E, R, X, E2, R2>(
|
|
1968
2211
|
self: Sink<A, In, L, E, R>,
|
|
@@ -1978,18 +2221,33 @@ export const onExit: {
|
|
|
1978
2221
|
))
|
|
1979
2222
|
|
|
1980
2223
|
/**
|
|
1981
|
-
*
|
|
2224
|
+
* Runs a finalizer effect after this sink completes, fails, or is interrupted.
|
|
2225
|
+
*
|
|
2226
|
+
* The original sink result and leftovers are preserved unless the finalizer
|
|
2227
|
+
* itself fails.
|
|
2228
|
+
*
|
|
1982
2229
|
* @category Finalization
|
|
2230
|
+
* @since 4.0.0
|
|
1983
2231
|
*/
|
|
1984
2232
|
export const ensuring: {
|
|
1985
2233
|
/**
|
|
1986
|
-
*
|
|
2234
|
+
* Runs a finalizer effect after this sink completes, fails, or is interrupted.
|
|
2235
|
+
*
|
|
2236
|
+
* The original sink result and leftovers are preserved unless the finalizer
|
|
2237
|
+
* itself fails.
|
|
2238
|
+
*
|
|
1987
2239
|
* @category Finalization
|
|
2240
|
+
* @since 4.0.0
|
|
1988
2241
|
*/
|
|
1989
2242
|
<X, E2, R2>(effect: Effect.Effect<X, E2, R2>): <A, E, In, L, R>(self: Sink<A, In, L, E, R>) => Sink<A, In, L, E | E2, R2 | R>
|
|
1990
2243
|
/**
|
|
1991
|
-
*
|
|
2244
|
+
* Runs a finalizer effect after this sink completes, fails, or is interrupted.
|
|
2245
|
+
*
|
|
2246
|
+
* The original sink result and leftovers are preserved unless the finalizer
|
|
2247
|
+
* itself fails.
|
|
2248
|
+
*
|
|
1992
2249
|
* @category Finalization
|
|
2250
|
+
* @since 4.0.0
|
|
1993
2251
|
*/
|
|
1994
2252
|
<A, In, L, E, R, X, E2, R2>(self: Sink<A, In, L, E, R>, effect: Effect.Effect<X, E2, R2>): Sink<A, In, L, E | E2, R | R2>
|
|
1995
2253
|
} = dual(2, <A, In, L, E, R, X, E2, R2>(
|