effect 4.0.0-beta.4 → 4.0.0-beta.41
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 +213 -385
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +149 -102
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +82 -45
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +87 -38
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +39 -32
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +32 -29
- package/dist/BigInt.js.map +1 -1
- package/dist/Brand.d.ts +1 -1
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +1 -1
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +2 -2
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +6 -5
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +33 -2
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +19 -0
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +130 -35
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +96 -45
- package/dist/Channel.js.map +1 -1
- package/dist/Chunk.d.ts +112 -304
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +56 -88
- package/dist/Chunk.js.map +1 -1
- package/dist/Combiner.d.ts +280 -13
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +198 -7
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +169 -9
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +69 -11
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +1 -1
- package/dist/Cron.d.ts +11 -7
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +120 -63
- package/dist/Cron.js.map +1 -1
- package/dist/Data.d.ts +535 -366
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +132 -79
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +72 -253
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +15 -60
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +7 -5
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +7 -5
- package/dist/Deferred.js.map +1 -1
- package/dist/Duration.d.ts +62 -32
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +108 -78
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +1225 -951
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +398 -338
- package/dist/Effect.js.map +1 -1
- package/dist/Encoding.d.ts +194 -0
- package/dist/Encoding.d.ts.map +1 -0
- package/dist/Encoding.js +352 -0
- package/dist/Encoding.js.map +1 -0
- package/dist/Equal.d.ts +276 -109
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +124 -48
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +60 -3
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +70 -13
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +374 -0
- package/dist/ErrorReporter.d.ts.map +1 -0
- package/dist/ErrorReporter.js +245 -0
- package/dist/ErrorReporter.js.map +1 -0
- package/dist/Exit.d.ts +24 -12
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +8 -4
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +5 -3
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +9 -8
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +8 -7
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +20 -19
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +6 -6
- package/dist/FiberMap.js.map +1 -1
- package/dist/FileSystem.d.ts +18 -17
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +17 -13
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +34 -38
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +15 -13
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +131 -47
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +229 -51
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +1 -9
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +2 -10
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +65 -65
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +60 -62
- package/dist/Graph.js.map +1 -1
- package/dist/HashMap.d.ts +26 -19
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +7 -5
- package/dist/HashMap.js.map +1 -1
- package/dist/Iterable.d.ts +50 -50
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +106 -34
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonSchema.d.ts +299 -10
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +323 -4
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +175 -0
- package/dist/Latch.d.ts.map +1 -0
- package/dist/Latch.js +130 -0
- package/dist/Latch.js.map +1 -0
- package/dist/Layer.d.ts +306 -129
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +93 -48
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +9 -8
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +3 -3
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +32 -0
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +28 -100
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +29 -95
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +2 -3
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +2 -2
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +21 -9
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Metric.d.ts +4 -6
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +3 -5
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +7 -0
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +8 -0
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +7 -0
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +8 -0
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/Newtype.d.ts +291 -0
- package/dist/Newtype.d.ts.map +1 -0
- package/dist/Newtype.js +161 -0
- package/dist/Newtype.js.map +1 -0
- package/dist/Number.d.ts +74 -18
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +34 -15
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +947 -18
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +454 -5
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +25 -16
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +15 -9
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +6 -1
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +19 -14
- package/dist/Order.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +146 -15
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +174 -61
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Pipeable.d.ts +17 -0
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +19 -1
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +10 -9
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +2 -2
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +6 -4
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +7 -5
- package/dist/Pool.js.map +1 -1
- package/dist/PubSub.d.ts +8 -6
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +18 -10
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +1 -1
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +9 -6
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +7 -5
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +35 -1
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +46 -12
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +2 -2
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +1 -1
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +1 -1
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/Record.d.ts +63 -160
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +37 -56
- package/dist/Record.js.map +1 -1
- package/dist/Reducer.d.ts +166 -7
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +135 -1
- package/dist/Reducer.js.map +1 -1
- package/dist/References.d.ts +242 -226
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +240 -247
- package/dist/References.js.map +1 -1
- package/dist/Request.d.ts +1 -1
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +2 -1
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +25 -45
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +10 -30
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +2 -1
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +1 -1
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +1 -2
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +66 -0
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +79 -6
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +174 -291
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +160 -134
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +34 -123
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +31 -123
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +2722 -247
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +1947 -224
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +7 -2
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +131 -25
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +5 -5
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +18 -18
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaParser.d.ts +44 -54
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +55 -2
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +46 -45
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +49 -24
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +107 -3
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +173 -13
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/ScopedCache.d.ts +2 -2
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +1 -1
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Semaphore.d.ts +307 -0
- package/dist/Semaphore.d.ts.map +1 -0
- package/dist/Semaphore.js +222 -0
- package/dist/Semaphore.js.map +1 -0
- package/dist/ServiceMap.d.ts +76 -52
- package/dist/ServiceMap.d.ts.map +1 -1
- package/dist/ServiceMap.js +45 -29
- package/dist/ServiceMap.js.map +1 -1
- package/dist/Sink.d.ts +18 -15
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +53 -6
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +16 -4
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +18 -0
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +284 -431
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +189 -88
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +114 -47
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +29 -47
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +23 -7
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +22 -0
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +3 -3
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +85 -117
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +2 -1
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +2 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Terminal.d.ts +2 -1
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +5 -4
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +2 -1
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +44 -31
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +13 -9
- package/dist/Trie.js.map +1 -1
- package/dist/TxChunk.d.ts +37 -37
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +3 -3
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +328 -0
- package/dist/TxDeferred.d.ts.map +1 -0
- package/dist/TxDeferred.js +197 -0
- package/dist/TxDeferred.js.map +1 -0
- package/dist/TxHashMap.d.ts +159 -140
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +51 -44
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +36 -36
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +16 -15
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +609 -0
- package/dist/TxPriorityQueue.d.ts.map +1 -0
- package/dist/TxPriorityQueue.js +416 -0
- package/dist/TxPriorityQueue.js.map +1 -0
- package/dist/TxPubSub.d.ts +585 -0
- package/dist/TxPubSub.d.ts.map +1 -0
- package/dist/TxPubSub.js +521 -0
- package/dist/TxPubSub.js.map +1 -0
- package/dist/TxQueue.d.ts +32 -32
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +26 -26
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +523 -0
- package/dist/TxReentrantLock.d.ts.map +1 -0
- package/dist/TxReentrantLock.js +504 -0
- package/dist/TxReentrantLock.js.map +1 -0
- package/dist/TxRef.d.ts +34 -34
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +21 -14
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +170 -10
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +23 -8
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +508 -0
- package/dist/TxSubscriptionRef.d.ts.map +1 -0
- package/dist/TxSubscriptionRef.js +293 -0
- package/dist/TxSubscriptionRef.js.map +1 -0
- package/dist/Types.d.ts +80 -23
- package/dist/Types.d.ts.map +1 -1
- package/dist/Utils.d.ts +137 -65
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +38 -66
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +806 -55
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +806 -55
- package/dist/index.js.map +1 -1
- package/dist/internal/core.js +11 -3
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/dateTime.js +77 -71
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/effect.js +284 -201
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/hashMap.js +7 -5
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/option.js +6 -0
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/random.d.ts +2 -0
- package/dist/internal/random.d.ts.map +1 -0
- package/dist/internal/random.js +13 -0
- package/dist/internal/random.js.map +1 -0
- package/dist/internal/rcRef.js +3 -2
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/references.d.ts +2 -0
- package/dist/internal/references.d.ts.map +1 -0
- package/dist/internal/references.js +51 -0
- package/dist/internal/references.js.map +1 -0
- package/dist/internal/request.js +2 -2
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/schema/annotations.js +2 -0
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/representation.js +75 -106
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/internal/schema/schema.js +1 -0
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/internal/schema/to-codec.js +7 -10
- package/dist/internal/schema/to-codec.js.map +1 -1
- package/dist/internal/trie.js +8 -7
- package/dist/internal/trie.js.map +1 -1
- package/dist/testing/TestClock.d.ts +8 -7
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +6 -4
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +266 -32
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +296 -23
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.d.ts +64 -1
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +64 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +136 -54
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +28 -23
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +4 -0
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +35 -7
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +38 -44
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +130 -0
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -0
- package/dist/unstable/ai/EmbeddingModel.js +127 -0
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -0
- package/dist/unstable/ai/LanguageModel.d.ts +117 -47
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +258 -59
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +183 -88
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +57 -12
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +66 -13
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +193 -51
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +25 -7
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +22 -6
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +4 -0
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +20 -20
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Response.d.ts +26 -26
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +1 -1
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +38 -0
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -0
- package/dist/unstable/ai/ResponseIdTracker.js +68 -0
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -0
- package/dist/unstable/ai/Tool.d.ts +34 -4
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +28 -10
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +1 -1
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +4 -11
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +22 -1
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +22 -1
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/ai/internal/codec-transformer.js +0 -5
- package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +2 -4
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +1 -3
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +27 -60
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +25 -57
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +3 -2
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +65 -10
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +371 -58
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +328 -67
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +16 -0
- package/dist/unstable/cli/Completions.d.ts.map +1 -0
- package/dist/unstable/cli/Completions.js +23 -0
- package/dist/unstable/cli/Completions.js.map +1 -0
- package/dist/unstable/cli/Flag.d.ts +2 -2
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +1 -1
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +125 -0
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -0
- package/dist/unstable/cli/GlobalFlag.js +118 -0
- package/dist/unstable/cli/GlobalFlag.js.map +1 -0
- package/dist/unstable/cli/HelpDoc.d.ts +81 -11
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/Param.d.ts +4 -4
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +7 -7
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +2 -2
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +1 -1
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.js +259 -85
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.d.ts +8 -0
- package/dist/unstable/cli/index.d.ts.map +1 -1
- package/dist/unstable/cli/index.js +8 -0
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +40 -14
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +72 -46
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/CommandDescriptor.js +16 -4
- package/dist/unstable/cli/internal/completions/CommandDescriptor.js.map +1 -1
- package/dist/unstable/cli/internal/config.js +42 -0
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cli/internal/help.d.ts +33 -0
- package/dist/unstable/cli/internal/help.d.ts.map +1 -0
- package/dist/unstable/cli/internal/help.js +125 -0
- package/dist/unstable/cli/internal/help.js.map +1 -0
- package/dist/unstable/cli/internal/parser.js +61 -43
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +1 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +18 -0
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +21 -1
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +3 -2
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +35 -29
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +1 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +10 -8
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +8 -7
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +1 -1
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +2 -2
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +4 -4
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +18 -15
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +15 -7
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +33 -10
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +36 -20
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +8 -7
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +4 -3
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +1 -1
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +1 -1
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +9 -8
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +2 -1
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +11 -9
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.js +3 -3
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +2 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +51 -39
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +26 -25
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +24 -24
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +25 -19
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +24 -18
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js +2 -1
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +2 -1
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +4 -3
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +40 -40
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +9 -2
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +9 -9
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +4 -4
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +1 -1
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +2 -2
- package/dist/unstable/eventlog/EventJournal.js +2 -2
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +3 -2
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +6 -6
- package/dist/unstable/eventlog/SqlEventLogJournal.js +2 -2
- package/dist/unstable/eventlog/SqlEventLogJournal.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +52 -7
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +27 -6
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +5 -1
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +19 -2
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +40 -11
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +1 -1
- package/dist/unstable/http/HttpClient.d.ts +117 -15
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +191 -13
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +7 -7
- package/dist/unstable/http/HttpClientRequest.d.ts +43 -15
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +131 -21
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +2 -1
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +6 -1
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +7 -5
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +46 -54
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +3 -2
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +4 -4
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +3 -3
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -6
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +24 -32
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +3 -2
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +2 -1
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +7 -7
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +2 -2
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +22 -34
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +39 -45
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +15 -3
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +301 -7
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +2 -2
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +5 -5
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +50 -3
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +236 -1
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +69 -0
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -0
- package/dist/unstable/http/HttpStaticServer.js +353 -0
- package/dist/unstable/http/HttpStaticServer.js.map +1 -0
- package/dist/unstable/http/HttpTraceContext.d.ts +3 -2
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +27 -15
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +3 -3
- package/dist/unstable/http/Url.d.ts +604 -0
- package/dist/unstable/http/Url.d.ts.map +1 -0
- package/dist/unstable/http/Url.js +256 -0
- package/dist/unstable/http/Url.js.map +1 -0
- package/dist/unstable/http/UrlParams.d.ts +19 -10
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +6 -7
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.d.ts +8 -0
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +8 -0
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/http/internal/preResponseHandler.d.ts +2 -0
- package/dist/unstable/http/internal/preResponseHandler.d.ts.map +1 -0
- package/dist/unstable/http/internal/preResponseHandler.js +10 -0
- package/dist/unstable/http/internal/preResponseHandler.js.map +1 -0
- package/dist/unstable/httpapi/HttpApi.d.ts +4 -4
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +11 -5
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +40 -27
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +83 -7
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +78 -10
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +207 -101
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +49 -43
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +31 -14
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +125 -32
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +4 -3
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +46 -15
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +32 -3
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +6 -0
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +6 -3
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +20 -2
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +1 -0
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +34 -26
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +12 -12
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +2 -2
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +3 -3
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +4 -4
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +7 -4
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +4 -4
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +4 -4
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +7 -3
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +6 -6
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -2
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +1 -1
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +6 -5
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +2 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +12 -12
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +12 -11
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +1 -1
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +2 -2
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +3 -3
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +1 -1
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +5 -128
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +1 -65
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +45 -7
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +21 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +73 -12
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +108 -25
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +17 -15
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +45 -15
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +6 -0
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +54 -11
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +9 -9
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +47 -21
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +39 -0
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -0
- package/dist/unstable/reactivity/Hydration.js +76 -0
- package/dist/unstable/reactivity/Hydration.js.map +1 -0
- package/dist/unstable/reactivity/index.d.ts +4 -0
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +4 -0
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +6 -5
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +4 -3
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +5 -26
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +53 -43
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +3 -5
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +8 -8
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +13 -0
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +17 -2
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +39 -11
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +6 -10
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +20 -19
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +3 -2
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +22 -1
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +15 -0
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +6 -6
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +6 -6
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +6 -5
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +12 -9
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +3 -3
- package/dist/unstable/sql/Migrator.d.ts +1 -1
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +2 -2
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +1 -1
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +237 -17
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +260 -4
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +2 -2
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +3 -3
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +17 -8
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +17 -6
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +17 -7
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/Statement.js +0 -1
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +2 -1
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +5 -0
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +13 -0
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +3 -3
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +3 -3
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +8 -8
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +5 -4
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +1 -1
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +17 -5
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +153 -12
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +2 -2
- package/src/Array.ts +304 -447
- package/src/BigDecimal.ts +117 -66
- package/src/BigInt.ts +49 -41
- package/src/Brand.ts +1 -1
- package/src/Cache.ts +9 -8
- package/src/Cause.ts +37 -2
- package/src/Channel.ts +582 -154
- package/src/Chunk.ts +149 -331
- package/src/Combiner.ts +280 -13
- package/src/Config.ts +195 -25
- package/src/Cron.ts +155 -63
- package/src/Data.ts +539 -376
- package/src/DateTime.ts +75 -256
- package/src/Deferred.ts +8 -6
- package/src/Duration.ts +122 -66
- package/src/Effect.ts +1484 -1157
- package/src/Encoding.ts +879 -0
- package/src/Equal.ts +278 -111
- package/src/Equivalence.ts +114 -52
- package/src/ErrorReporter.ts +458 -0
- package/src/Exit.ts +24 -12
- package/src/Fiber.ts +12 -3
- package/src/FiberHandle.ts +10 -9
- package/src/FiberMap.ts +22 -22
- package/src/FileSystem.ts +34 -31
- package/src/Filter.ts +52 -63
- package/src/Formatter.ts +253 -51
- package/src/Function.ts +2 -10
- package/src/Graph.ts +131 -117
- package/src/HashMap.ts +26 -19
- package/src/Iterable.ts +117 -63
- package/src/JsonSchema.ts +383 -10
- package/src/Latch.ts +194 -0
- package/src/Layer.ts +394 -160
- package/src/LayerMap.ts +11 -9
- package/src/LogLevel.ts +37 -0
- package/src/Logger.ts +33 -100
- package/src/ManagedRuntime.ts +35 -22
- package/src/Metric.ts +6 -8
- package/src/MutableHashMap.ts +9 -0
- package/src/MutableHashSet.ts +9 -0
- package/src/Newtype.ts +308 -0
- package/src/Number.ts +85 -26
- package/src/Optic.ts +948 -19
- package/src/Option.ts +34 -24
- package/src/Order.ts +39 -32
- package/src/PartitionedSemaphore.ts +288 -56
- package/src/Pipeable.ts +32 -1
- package/src/PlatformError.ts +5 -5
- package/src/Pool.ts +13 -11
- package/src/PubSub.ts +30 -20
- package/src/Pull.ts +1 -1
- package/src/Queue.ts +11 -9
- package/src/Random.ts +51 -14
- package/src/RcMap.ts +5 -5
- package/src/RcRef.ts +1 -1
- package/src/Record.ts +94 -199
- package/src/Reducer.ts +166 -7
- package/src/References.ts +283 -287
- package/src/Request.ts +3 -2
- package/src/RequestResolver.ts +29 -49
- package/src/Resource.ts +2 -1
- package/src/Result.ts +2 -4
- package/src/Runtime.ts +102 -6
- package/src/Schedule.ts +458 -449
- package/src/Scheduler.ts +49 -126
- package/src/Schema.ts +3298 -392
- package/src/SchemaAST.ts +172 -33
- package/src/SchemaGetter.ts +19 -21
- package/src/SchemaParser.ts +92 -27
- package/src/SchemaRepresentation.ts +51 -26
- package/src/SchemaTransformation.ts +198 -13
- package/src/ScopedCache.ts +3 -3
- package/src/Semaphore.ts +444 -0
- package/src/ServiceMap.ts +144 -97
- package/src/Sink.ts +83 -28
- package/src/Stdio.ts +27 -4
- package/src/Stream.ts +687 -617
- package/src/String.ts +122 -69
- package/src/Struct.ts +33 -7
- package/src/SubscriptionRef.ts +101 -120
- package/src/SynchronizedRef.ts +3 -2
- package/src/Terminal.ts +2 -1
- package/src/Tracer.ts +6 -5
- package/src/Trie.ts +44 -31
- package/src/TxChunk.ts +72 -53
- package/src/TxDeferred.ts +394 -0
- package/src/TxHashMap.ts +409 -343
- package/src/TxHashSet.ts +113 -118
- package/src/TxPriorityQueue.ts +766 -0
- package/src/TxPubSub.ts +789 -0
- package/src/TxQueue.ts +241 -251
- package/src/TxReentrantLock.ts +753 -0
- package/src/TxRef.ts +50 -38
- package/src/TxSemaphore.ts +217 -44
- package/src/TxSubscriptionRef.ts +639 -0
- package/src/Types.ts +73 -19
- package/src/Utils.ts +137 -111
- package/src/index.ts +816 -56
- package/src/internal/core.ts +12 -5
- package/src/internal/dateTime.ts +91 -96
- package/src/internal/effect.ts +844 -432
- package/src/internal/hashMap.ts +12 -10
- package/src/internal/option.ts +7 -0
- package/src/internal/random.ts +20 -0
- package/src/internal/rcRef.ts +4 -3
- package/src/internal/references.ts +72 -0
- package/src/internal/request.ts +2 -2
- package/src/internal/schema/annotations.ts +2 -0
- package/src/internal/schema/representation.ts +73 -94
- package/src/internal/schema/schema.ts +1 -0
- package/src/internal/schema/to-codec.ts +7 -17
- package/src/internal/trie.ts +21 -15
- package/src/testing/TestClock.ts +13 -11
- package/src/testing/TestSchema.ts +332 -35
- package/src/testing/index.ts +64 -1
- package/src/unstable/ai/AiError.ts +111 -54
- package/src/unstable/ai/AnthropicStructuredOutput.ts +4 -0
- package/src/unstable/ai/Chat.ts +134 -85
- package/src/unstable/ai/EmbeddingModel.ts +209 -0
- package/src/unstable/ai/LanguageModel.ts +683 -253
- package/src/unstable/ai/McpSchema.ts +73 -13
- package/src/unstable/ai/McpServer.ts +271 -61
- package/src/unstable/ai/Model.ts +40 -9
- package/src/unstable/ai/OpenAiStructuredOutput.ts +4 -0
- package/src/unstable/ai/Prompt.ts +37 -37
- package/src/unstable/ai/Response.ts +25 -25
- package/src/unstable/ai/ResponseIdTracker.ts +97 -0
- package/src/unstable/ai/Tool.ts +42 -16
- package/src/unstable/ai/Toolkit.ts +5 -14
- package/src/unstable/ai/index.ts +24 -1
- package/src/unstable/ai/internal/codec-transformer.ts +0 -7
- package/src/unstable/cli/Argument.ts +2 -4
- package/src/unstable/cli/CliError.ts +47 -59
- package/src/unstable/cli/CliOutput.ts +85 -13
- package/src/unstable/cli/Command.ts +801 -192
- package/src/unstable/cli/Completions.ts +36 -0
- package/src/unstable/cli/Flag.ts +2 -2
- package/src/unstable/cli/GlobalFlag.ts +242 -0
- package/src/unstable/cli/HelpDoc.ts +91 -11
- package/src/unstable/cli/Param.ts +15 -11
- package/src/unstable/cli/Primitive.ts +2 -2
- package/src/unstable/cli/Prompt.ts +265 -101
- package/src/unstable/cli/index.ts +10 -0
- package/src/unstable/cli/internal/command.ts +109 -63
- package/src/unstable/cli/internal/completions/CommandDescriptor.ts +10 -4
- package/src/unstable/cli/internal/config.ts +49 -0
- package/src/unstable/cli/internal/help.ts +171 -0
- package/src/unstable/cli/internal/parser.ts +71 -63
- package/src/unstable/cluster/ClusterCron.ts +2 -2
- package/src/unstable/cluster/ClusterSchema.ts +29 -1
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +62 -37
- package/src/unstable/cluster/DeliverAt.ts +1 -1
- package/src/unstable/cluster/Entity.ts +25 -22
- package/src/unstable/cluster/EntityAddress.ts +1 -1
- package/src/unstable/cluster/EntityResource.ts +4 -4
- package/src/unstable/cluster/Envelope.ts +1 -1
- package/src/unstable/cluster/K8sHttpClient.ts +5 -5
- package/src/unstable/cluster/Message.ts +28 -15
- package/src/unstable/cluster/MessageStorage.ts +66 -36
- package/src/unstable/cluster/Reply.ts +7 -4
- package/src/unstable/cluster/Runner.ts +1 -1
- package/src/unstable/cluster/RunnerAddress.ts +1 -1
- package/src/unstable/cluster/RunnerServer.ts +10 -13
- package/src/unstable/cluster/Runners.ts +14 -12
- package/src/unstable/cluster/ShardId.ts +2 -2
- package/src/unstable/cluster/Sharding.ts +66 -49
- package/src/unstable/cluster/ShardingConfig.ts +36 -37
- package/src/unstable/cluster/SqlMessageStorage.ts +31 -19
- package/src/unstable/cluster/SqlRunnerStorage.ts +1 -1
- package/src/unstable/cluster/internal/entityManager.ts +50 -34
- package/src/unstable/cluster/internal/entityReaper.ts +2 -1
- package/src/unstable/cluster/internal/resourceRef.ts +2 -1
- package/src/unstable/devtools/DevToolsClient.ts +23 -18
- package/src/unstable/devtools/DevToolsSchema.ts +16 -3
- package/src/unstable/encoding/Ndjson.ts +17 -17
- package/src/unstable/encoding/Sse.ts +3 -5
- package/src/unstable/eventlog/EventJournal.ts +2 -2
- package/src/unstable/eventlog/EventLog.ts +3 -2
- package/src/unstable/eventlog/SqlEventLogJournal.ts +2 -2
- package/src/unstable/http/Cookies.ts +94 -11
- package/src/unstable/http/Etag.ts +5 -3
- package/src/unstable/http/Headers.ts +68 -18
- package/src/unstable/http/HttpClient.ts +376 -34
- package/src/unstable/http/HttpClientRequest.ts +151 -39
- package/src/unstable/http/HttpClientResponse.ts +12 -6
- package/src/unstable/http/HttpEffect.ts +54 -68
- package/src/unstable/http/HttpIncomingMessage.ts +3 -2
- package/src/unstable/http/HttpMethod.ts +16 -4
- package/src/unstable/http/HttpMiddleware.ts +25 -39
- package/src/unstable/http/HttpPlatform.ts +3 -2
- package/src/unstable/http/HttpRouter.ts +9 -9
- package/src/unstable/http/HttpServer.ts +3 -9
- package/src/unstable/http/HttpServerError.ts +45 -47
- package/src/unstable/http/HttpServerRequest.ts +407 -16
- package/src/unstable/http/HttpServerRespondable.ts +6 -6
- package/src/unstable/http/HttpServerResponse.ts +345 -7
- package/src/unstable/http/HttpStaticServer.ts +456 -0
- package/src/unstable/http/HttpTraceContext.ts +31 -17
- package/src/unstable/http/Multipart.ts +2 -2
- package/src/unstable/http/Url.ts +650 -0
- package/src/unstable/http/UrlParams.ts +31 -19
- package/src/unstable/http/index.ts +10 -0
- package/src/unstable/http/internal/preResponseHandler.ts +15 -0
- package/src/unstable/httpapi/HttpApi.ts +6 -6
- package/src/unstable/httpapi/HttpApiBuilder.ts +106 -41
- package/src/unstable/httpapi/HttpApiClient.ts +180 -28
- package/src/unstable/httpapi/HttpApiEndpoint.ts +216 -104
- package/src/unstable/httpapi/HttpApiError.ts +108 -30
- package/src/unstable/httpapi/HttpApiGroup.ts +7 -6
- package/src/unstable/httpapi/HttpApiMiddleware.ts +83 -22
- package/src/unstable/httpapi/HttpApiScalar.ts +6 -0
- package/src/unstable/httpapi/HttpApiSchema.ts +21 -3
- package/src/unstable/httpapi/HttpApiSecurity.ts +3 -3
- package/src/unstable/httpapi/OpenApi.ts +44 -29
- package/src/unstable/observability/Otlp.ts +12 -12
- package/src/unstable/observability/OtlpExporter.ts +8 -5
- package/src/unstable/observability/OtlpLogger.ts +13 -9
- package/src/unstable/observability/OtlpMetrics.ts +4 -4
- package/src/unstable/observability/OtlpTracer.ts +12 -8
- package/src/unstable/persistence/KeyValueStore.ts +6 -6
- package/src/unstable/persistence/Persistable.ts +3 -3
- package/src/unstable/persistence/PersistedCache.ts +20 -9
- package/src/unstable/persistence/PersistedQueue.ts +25 -24
- package/src/unstable/persistence/Persistence.ts +3 -3
- package/src/unstable/persistence/RateLimiter.ts +4 -4
- package/src/unstable/process/ChildProcess.ts +6 -208
- package/src/unstable/process/ChildProcessSpawner.ts +75 -14
- package/src/unstable/reactivity/Atom.ts +212 -54
- package/src/unstable/reactivity/AtomHttpApi.ts +81 -41
- package/src/unstable/reactivity/AtomRegistry.ts +66 -12
- package/src/unstable/reactivity/AtomRpc.ts +51 -20
- package/src/unstable/reactivity/Hydration.ts +112 -0
- package/src/unstable/reactivity/index.ts +5 -0
- package/src/unstable/rpc/Rpc.ts +12 -12
- package/src/unstable/rpc/RpcClient.ts +67 -96
- package/src/unstable/rpc/RpcGroup.ts +7 -7
- package/src/unstable/rpc/RpcMiddleware.ts +15 -9
- package/src/unstable/rpc/RpcSchema.ts +23 -5
- package/src/unstable/rpc/RpcSerialization.ts +49 -11
- package/src/unstable/rpc/RpcServer.ts +31 -35
- package/src/unstable/rpc/Utils.ts +3 -2
- package/src/unstable/schema/Model.ts +31 -0
- package/src/unstable/schema/VariantSchema.ts +10 -10
- package/src/unstable/socket/Socket.ts +31 -27
- package/src/unstable/sql/Migrator.ts +7 -5
- package/src/unstable/sql/SqlClient.ts +6 -4
- package/src/unstable/sql/SqlError.ts +365 -11
- package/src/unstable/sql/SqlModel.ts +5 -5
- package/src/unstable/sql/SqlResolver.ts +17 -7
- package/src/unstable/sql/SqlSchema.ts +42 -26
- package/src/unstable/sql/Statement.ts +0 -1
- package/src/unstable/workers/Worker.ts +2 -1
- package/src/unstable/workflow/Activity.ts +23 -0
- package/src/unstable/workflow/DurableClock.ts +8 -8
- package/src/unstable/workflow/DurableDeferred.ts +8 -8
- package/src/unstable/workflow/Workflow.ts +7 -3
- package/src/unstable/workflow/WorkflowEngine.ts +211 -19
- package/dist/NullOr.d.ts +0 -149
- package/dist/NullOr.d.ts.map +0 -1
- package/dist/NullOr.js +0 -152
- package/dist/NullOr.js.map +0 -1
- package/dist/encoding/Base64.d.ts +0 -67
- package/dist/encoding/Base64.d.ts.map +0 -1
- package/dist/encoding/Base64.js +0 -146
- package/dist/encoding/Base64.js.map +0 -1
- package/dist/encoding/Base64Url.d.ts +0 -60
- package/dist/encoding/Base64Url.d.ts.map +0 -1
- package/dist/encoding/Base64Url.js +0 -89
- package/dist/encoding/Base64Url.js.map +0 -1
- package/dist/encoding/EncodingError.d.ts +0 -31
- package/dist/encoding/EncodingError.d.ts.map +0 -1
- package/dist/encoding/EncodingError.js +0 -22
- package/dist/encoding/EncodingError.js.map +0 -1
- package/dist/encoding/Hex.d.ts +0 -61
- package/dist/encoding/Hex.d.ts.map +0 -1
- package/dist/encoding/Hex.js +0 -115
- package/dist/encoding/Hex.js.map +0 -1
- package/dist/encoding/index.d.ts +0 -26
- package/dist/encoding/index.d.ts.map +0 -1
- package/dist/encoding/index.js +0 -27
- package/dist/encoding/index.js.map +0 -1
- package/dist/unstable/cli/internal/builtInFlags.d.ts +0 -7
- package/dist/unstable/cli/internal/builtInFlags.d.ts.map +0 -1
- package/dist/unstable/cli/internal/builtInFlags.js +0 -44
- package/dist/unstable/cli/internal/builtInFlags.js.map +0 -1
- package/dist/unstable/cli/internal/completions/Completions.d.ts +0 -2
- package/dist/unstable/cli/internal/completions/Completions.d.ts.map +0 -1
- package/dist/unstable/cli/internal/completions/Completions.js +0 -23
- package/dist/unstable/cli/internal/completions/Completions.js.map +0 -1
- package/src/NullOr.ts +0 -204
- package/src/encoding/Base64.ts +0 -366
- package/src/encoding/Base64Url.ts +0 -104
- package/src/encoding/EncodingError.ts +0 -35
- package/src/encoding/Hex.ts +0 -390
- package/src/encoding/index.ts +0 -31
- package/src/unstable/cli/internal/builtInFlags.ts +0 -78
- package/src/unstable/cli/internal/completions/Completions.ts +0 -31
package/dist/Layer.d.ts
CHANGED
|
@@ -19,12 +19,14 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { NonEmptyReadonlyArray } from "./Array.ts";
|
|
21
21
|
import type * as Cause from "./Cause.ts";
|
|
22
|
+
import type * as Channel from "./Channel.ts";
|
|
22
23
|
import type { Effect } from "./Effect.ts";
|
|
23
24
|
import type * as Exit from "./Exit.ts";
|
|
24
25
|
import type { LazyArg } from "./Function.ts";
|
|
25
26
|
import { type Pipeable } from "./Pipeable.ts";
|
|
26
27
|
import * as Scope from "./Scope.ts";
|
|
27
28
|
import * as ServiceMap from "./ServiceMap.ts";
|
|
29
|
+
import type * as Stream from "./Stream.ts";
|
|
28
30
|
import * as Tracer from "./Tracer.ts";
|
|
29
31
|
import type * as Types from "./Types.ts";
|
|
30
32
|
declare const TypeId = "~effect/Layer";
|
|
@@ -112,7 +114,7 @@ declare const MemoMapTypeId = "~effect/Layer/MemoMap";
|
|
|
112
114
|
* const scope = yield* Effect.scope
|
|
113
115
|
*
|
|
114
116
|
* const dbLayer = Layer.succeed(Database)({
|
|
115
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
117
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
116
118
|
* })
|
|
117
119
|
* const services = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope)
|
|
118
120
|
*
|
|
@@ -139,7 +141,7 @@ export interface MemoMap {
|
|
|
139
141
|
* }>()("Database") {}
|
|
140
142
|
*
|
|
141
143
|
* const dbLayer = Layer.succeed(Database)({
|
|
142
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
144
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
143
145
|
* })
|
|
144
146
|
* const notALayer = { someProperty: "value" }
|
|
145
147
|
*
|
|
@@ -223,7 +225,7 @@ export declare const fromBuildMemo: <ROut, E, RIn>(build: (memoMap: MemoMap, sco
|
|
|
223
225
|
* const scope = yield* Effect.scope
|
|
224
226
|
*
|
|
225
227
|
* const dbLayer = Layer.succeed(Database)({
|
|
226
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
228
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
227
229
|
* })
|
|
228
230
|
* const services = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope)
|
|
229
231
|
*
|
|
@@ -252,7 +254,7 @@ export declare const makeMemoMapUnsafe: () => MemoMap;
|
|
|
252
254
|
* const scope = yield* Effect.scope
|
|
253
255
|
*
|
|
254
256
|
* const dbLayer = Layer.succeed(Database)({
|
|
255
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
257
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
256
258
|
* })
|
|
257
259
|
* const services = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope)
|
|
258
260
|
*
|
|
@@ -300,13 +302,13 @@ export declare class CurrentMemoMap extends CurrentMemoMap_base {
|
|
|
300
302
|
*
|
|
301
303
|
* // Build database layer with memoization
|
|
302
304
|
* const dbLayer = Layer.succeed(Database)({
|
|
303
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
305
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
304
306
|
* })
|
|
305
307
|
* const dbServices = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope)
|
|
306
308
|
*
|
|
307
309
|
* // Build logger layer with same memoization (reuses memo if same layer)
|
|
308
310
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
309
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
311
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
310
312
|
* })
|
|
311
313
|
* const loggerServices = yield* Layer.buildWithMemoMap(
|
|
312
314
|
* loggerLayer,
|
|
@@ -348,13 +350,13 @@ export declare const buildWithMemoMap: {
|
|
|
348
350
|
*
|
|
349
351
|
* // Build database layer with memoization
|
|
350
352
|
* const dbLayer = Layer.succeed(Database)({
|
|
351
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
353
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
352
354
|
* })
|
|
353
355
|
* const dbServices = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope)
|
|
354
356
|
*
|
|
355
357
|
* // Build logger layer with same memoization (reuses memo if same layer)
|
|
356
358
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
357
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
359
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
358
360
|
* })
|
|
359
361
|
* const loggerServices = yield* Layer.buildWithMemoMap(
|
|
360
362
|
* loggerLayer,
|
|
@@ -396,13 +398,13 @@ export declare const buildWithMemoMap: {
|
|
|
396
398
|
*
|
|
397
399
|
* // Build database layer with memoization
|
|
398
400
|
* const dbLayer = Layer.succeed(Database)({
|
|
399
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
401
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
400
402
|
* })
|
|
401
403
|
* const dbServices = yield* Layer.buildWithMemoMap(dbLayer, memoMap, scope)
|
|
402
404
|
*
|
|
403
405
|
* // Build logger layer with same memoization (reuses memo if same layer)
|
|
404
406
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
405
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
407
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
406
408
|
* })
|
|
407
409
|
* const loggerServices = yield* Layer.buildWithMemoMap(
|
|
408
410
|
* loggerLayer,
|
|
@@ -436,7 +438,7 @@ export declare const buildWithMemoMap: {
|
|
|
436
438
|
* // Build a layer to get its services
|
|
437
439
|
* const program = Effect.gen(function*() {
|
|
438
440
|
* const dbLayer = Layer.succeed(Database)({
|
|
439
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
441
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
440
442
|
* })
|
|
441
443
|
*
|
|
442
444
|
* // Build the layer into ServiceMap - automatically manages scope and memoization
|
|
@@ -478,7 +480,7 @@ export declare const build: <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect<
|
|
|
478
480
|
* scope,
|
|
479
481
|
* Effect.sync(() => console.log("Database closed"))
|
|
480
482
|
* )
|
|
481
|
-
* return { query: (sql: string) => Effect.succeed(`Result: ${sql}`) }
|
|
483
|
+
* return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`)) }
|
|
482
484
|
* }))
|
|
483
485
|
*
|
|
484
486
|
* // Build with specific scope - resources tied to this scope
|
|
@@ -519,7 +521,7 @@ export declare const buildWithScope: {
|
|
|
519
521
|
* scope,
|
|
520
522
|
* Effect.sync(() => console.log("Database closed"))
|
|
521
523
|
* )
|
|
522
|
-
* return { query: (sql: string) => Effect.succeed(`Result: ${sql}`) }
|
|
524
|
+
* return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`)) }
|
|
523
525
|
* }))
|
|
524
526
|
*
|
|
525
527
|
* // Build with specific scope - resources tied to this scope
|
|
@@ -560,7 +562,7 @@ export declare const buildWithScope: {
|
|
|
560
562
|
* scope,
|
|
561
563
|
* Effect.sync(() => console.log("Database closed"))
|
|
562
564
|
* )
|
|
563
|
-
* return { query: (sql: string) => Effect.succeed(`Result: ${sql}`) }
|
|
565
|
+
* return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`)) }
|
|
564
566
|
* }))
|
|
565
567
|
*
|
|
566
568
|
* // Build with specific scope - resources tied to this scope
|
|
@@ -594,11 +596,11 @@ export declare const buildWithScope: {
|
|
|
594
596
|
*
|
|
595
597
|
* // Create layers from concrete service implementations
|
|
596
598
|
* const databaseLayer = Layer.succeed(Database)({
|
|
597
|
-
* query: (sql: string) => Effect.succeed(`Query result: ${sql}`)
|
|
599
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Query result: ${sql}`))
|
|
598
600
|
* })
|
|
599
601
|
*
|
|
600
602
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
601
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
603
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
602
604
|
* })
|
|
603
605
|
*
|
|
604
606
|
* // Use the layers in a program
|
|
@@ -637,11 +639,11 @@ export declare const succeed: {
|
|
|
637
639
|
*
|
|
638
640
|
* // Create layers from concrete service implementations
|
|
639
641
|
* const databaseLayer = Layer.succeed(Database)({
|
|
640
|
-
* query: (sql: string) => Effect.succeed(`Query result: ${sql}`)
|
|
642
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Query result: ${sql}`))
|
|
641
643
|
* })
|
|
642
644
|
*
|
|
643
645
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
644
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
646
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
645
647
|
* })
|
|
646
648
|
*
|
|
647
649
|
* // Use the layers in a program
|
|
@@ -662,7 +664,7 @@ export declare const succeed: {
|
|
|
662
664
|
* @since 2.0.0
|
|
663
665
|
* @category constructors
|
|
664
666
|
*/
|
|
665
|
-
<I, S>(service: ServiceMap.
|
|
667
|
+
<I, S>(service: ServiceMap.Key<I, S>): (resource: S) => Layer<I>;
|
|
666
668
|
/**
|
|
667
669
|
* Constructs a layer from the specified value.
|
|
668
670
|
*
|
|
@@ -680,11 +682,11 @@ export declare const succeed: {
|
|
|
680
682
|
*
|
|
681
683
|
* // Create layers from concrete service implementations
|
|
682
684
|
* const databaseLayer = Layer.succeed(Database)({
|
|
683
|
-
* query: (sql: string) => Effect.succeed(`Query result: ${sql}`)
|
|
685
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Query result: ${sql}`))
|
|
684
686
|
* })
|
|
685
687
|
*
|
|
686
688
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
687
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
689
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
688
690
|
* })
|
|
689
691
|
*
|
|
690
692
|
* // Use the layers in a program
|
|
@@ -705,7 +707,7 @@ export declare const succeed: {
|
|
|
705
707
|
* @since 2.0.0
|
|
706
708
|
* @category constructors
|
|
707
709
|
*/
|
|
708
|
-
<I, S>(service: ServiceMap.
|
|
710
|
+
<I, S>(service: ServiceMap.Key<I, S>, resource: Types.NoInfer<S>): Layer<I>;
|
|
709
711
|
};
|
|
710
712
|
/**
|
|
711
713
|
* Constructs a layer from the specified value, which must return one or more
|
|
@@ -727,7 +729,7 @@ export declare const succeed: {
|
|
|
727
729
|
* }>()("Logger") {}
|
|
728
730
|
*
|
|
729
731
|
* const services = ServiceMap.make(Database, {
|
|
730
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
732
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
731
733
|
* })
|
|
732
734
|
* .pipe(
|
|
733
735
|
* ServiceMap.add(Logger, {
|
|
@@ -804,7 +806,7 @@ export declare const sync: {
|
|
|
804
806
|
* @since 2.0.0
|
|
805
807
|
* @category constructors
|
|
806
808
|
*/
|
|
807
|
-
<I, S>(service: ServiceMap.
|
|
809
|
+
<I, S>(service: ServiceMap.Key<I, S>): (evaluate: LazyArg<S>) => Layer<I>;
|
|
808
810
|
/**
|
|
809
811
|
* Lazily constructs a layer from the specified value.
|
|
810
812
|
*
|
|
@@ -827,7 +829,7 @@ export declare const sync: {
|
|
|
827
829
|
* @since 2.0.0
|
|
828
830
|
* @category constructors
|
|
829
831
|
*/
|
|
830
|
-
<I, S>(service: ServiceMap.
|
|
832
|
+
<I, S>(service: ServiceMap.Key<I, S>, evaluate: LazyArg<S>): Layer<I>;
|
|
831
833
|
};
|
|
832
834
|
/**
|
|
833
835
|
* Lazily constructs a layer from the specified value, which must return one or more
|
|
@@ -918,7 +920,7 @@ export declare const effect: {
|
|
|
918
920
|
* @since 2.0.0
|
|
919
921
|
* @category constructors
|
|
920
922
|
*/
|
|
921
|
-
<I, S>(service: ServiceMap.
|
|
923
|
+
<I, S>(service: ServiceMap.Key<I, S>): <E, R>(effect: Effect<S, E, R>) => Layer<I, E, Exclude<R, Scope.Scope>>;
|
|
922
924
|
/**
|
|
923
925
|
* Constructs a layer from the specified scoped effect.
|
|
924
926
|
*
|
|
@@ -950,7 +952,7 @@ export declare const effect: {
|
|
|
950
952
|
* @since 2.0.0
|
|
951
953
|
* @category constructors
|
|
952
954
|
*/
|
|
953
|
-
<I, S, E, R>(service: ServiceMap.
|
|
955
|
+
<I, S, E, R>(service: ServiceMap.Key<I, S>, effect: Effect<S, E, R>): Layer<I, E, Exclude<R, Scope.Scope>>;
|
|
954
956
|
};
|
|
955
957
|
/**
|
|
956
958
|
* Constructs a layer from the specified scoped effect, which must return one
|
|
@@ -1022,7 +1024,7 @@ export declare const effectDiscard: <X, E, R>(effect: Effect<X, E, R>) => Layer<
|
|
|
1022
1024
|
* }>()("Database") {}
|
|
1023
1025
|
*
|
|
1024
1026
|
* const layerEffect = Effect.succeed(
|
|
1025
|
-
* Layer.succeed(Database)({ query: (sql: string) => Effect.succeed("result") })
|
|
1027
|
+
* Layer.succeed(Database)({ query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result")) })
|
|
1026
1028
|
* )
|
|
1027
1029
|
*
|
|
1028
1030
|
* const unwrappedLayer = Layer.unwrap(layerEffect)
|
|
@@ -1051,10 +1053,10 @@ export declare const unwrap: <A, E1, R1, E, R>(self: Effect<Layer<A, E1, R1>, E,
|
|
|
1051
1053
|
* }>()("Logger") {}
|
|
1052
1054
|
*
|
|
1053
1055
|
* const dbLayer = Layer.succeed(Database)({
|
|
1054
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
1056
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
1055
1057
|
* })
|
|
1056
1058
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1057
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
1059
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
1058
1060
|
* })
|
|
1059
1061
|
*
|
|
1060
1062
|
* const mergedLayer = Layer.mergeAll(dbLayer, loggerLayer)
|
|
@@ -1083,10 +1085,10 @@ export declare const mergeAll: <Layers extends [Layer<never, any, any>, ...Array
|
|
|
1083
1085
|
* }>()("Logger") {}
|
|
1084
1086
|
*
|
|
1085
1087
|
* const dbLayer = Layer.succeed(Database)({
|
|
1086
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
1088
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
1087
1089
|
* })
|
|
1088
1090
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1089
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
1091
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
1090
1092
|
* })
|
|
1091
1093
|
*
|
|
1092
1094
|
* const mergedLayer = Layer.merge(dbLayer, loggerLayer)
|
|
@@ -1115,10 +1117,10 @@ export declare const merge: {
|
|
|
1115
1117
|
* }>()("Logger") {}
|
|
1116
1118
|
*
|
|
1117
1119
|
* const dbLayer = Layer.succeed(Database)({
|
|
1118
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
1120
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
1119
1121
|
* })
|
|
1120
1122
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1121
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
1123
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
1122
1124
|
* })
|
|
1123
1125
|
*
|
|
1124
1126
|
* const mergedLayer = Layer.merge(dbLayer, loggerLayer)
|
|
@@ -1147,10 +1149,10 @@ export declare const merge: {
|
|
|
1147
1149
|
* }>()("Logger") {}
|
|
1148
1150
|
*
|
|
1149
1151
|
* const dbLayer = Layer.succeed(Database)({
|
|
1150
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
1152
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
1151
1153
|
* })
|
|
1152
1154
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1153
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
1155
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
1154
1156
|
* })
|
|
1155
1157
|
*
|
|
1156
1158
|
* const mergedLayer = Layer.merge(dbLayer, loggerLayer)
|
|
@@ -1179,10 +1181,10 @@ export declare const merge: {
|
|
|
1179
1181
|
* }>()("Logger") {}
|
|
1180
1182
|
*
|
|
1181
1183
|
* const dbLayer = Layer.succeed(Database)({
|
|
1182
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
1184
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
1183
1185
|
* })
|
|
1184
1186
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1185
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
1187
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
1186
1188
|
* })
|
|
1187
1189
|
*
|
|
1188
1190
|
* const mergedLayer = Layer.merge(dbLayer, loggerLayer)
|
|
@@ -1211,10 +1213,10 @@ export declare const merge: {
|
|
|
1211
1213
|
* }>()("Logger") {}
|
|
1212
1214
|
*
|
|
1213
1215
|
* const dbLayer = Layer.succeed(Database)({
|
|
1214
|
-
* query: (sql: string) => Effect.succeed("result")
|
|
1216
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed("result"))
|
|
1215
1217
|
* })
|
|
1216
1218
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1217
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
1219
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
1218
1220
|
* })
|
|
1219
1221
|
*
|
|
1220
1222
|
* const mergedLayer = Layer.merge(dbLayer, loggerLayer)
|
|
@@ -1251,11 +1253,11 @@ export declare const merge: {
|
|
|
1251
1253
|
*
|
|
1252
1254
|
* // Create dependency layers
|
|
1253
1255
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1254
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1256
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1255
1257
|
* })
|
|
1256
1258
|
*
|
|
1257
1259
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1258
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1260
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1259
1261
|
* })
|
|
1260
1262
|
*
|
|
1261
1263
|
* // UserService depends on Database and Logger
|
|
@@ -1264,8 +1266,7 @@ export declare const merge: {
|
|
|
1264
1266
|
* const logger = yield* Logger
|
|
1265
1267
|
*
|
|
1266
1268
|
* return {
|
|
1267
|
-
* getUser: (id: string)
|
|
1268
|
-
* Effect.gen(function*() {
|
|
1269
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1269
1270
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1270
1271
|
* const result = yield* database.query(
|
|
1271
1272
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1319,11 +1320,11 @@ export declare const provide: {
|
|
|
1319
1320
|
*
|
|
1320
1321
|
* // Create dependency layers
|
|
1321
1322
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1322
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1323
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1323
1324
|
* })
|
|
1324
1325
|
*
|
|
1325
1326
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1326
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1327
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1327
1328
|
* })
|
|
1328
1329
|
*
|
|
1329
1330
|
* // UserService depends on Database and Logger
|
|
@@ -1332,8 +1333,7 @@ export declare const provide: {
|
|
|
1332
1333
|
* const logger = yield* Logger
|
|
1333
1334
|
*
|
|
1334
1335
|
* return {
|
|
1335
|
-
* getUser: (id: string)
|
|
1336
|
-
* Effect.gen(function*() {
|
|
1336
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1337
1337
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1338
1338
|
* const result = yield* database.query(
|
|
1339
1339
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1387,11 +1387,11 @@ export declare const provide: {
|
|
|
1387
1387
|
*
|
|
1388
1388
|
* // Create dependency layers
|
|
1389
1389
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1390
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1390
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1391
1391
|
* })
|
|
1392
1392
|
*
|
|
1393
1393
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1394
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1394
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1395
1395
|
* })
|
|
1396
1396
|
*
|
|
1397
1397
|
* // UserService depends on Database and Logger
|
|
@@ -1400,8 +1400,7 @@ export declare const provide: {
|
|
|
1400
1400
|
* const logger = yield* Logger
|
|
1401
1401
|
*
|
|
1402
1402
|
* return {
|
|
1403
|
-
* getUser: (id: string)
|
|
1404
|
-
* Effect.gen(function*() {
|
|
1403
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1405
1404
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1406
1405
|
* const result = yield* database.query(
|
|
1407
1406
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1455,11 +1454,11 @@ export declare const provide: {
|
|
|
1455
1454
|
*
|
|
1456
1455
|
* // Create dependency layers
|
|
1457
1456
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1458
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1457
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1459
1458
|
* })
|
|
1460
1459
|
*
|
|
1461
1460
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1462
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1461
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1463
1462
|
* })
|
|
1464
1463
|
*
|
|
1465
1464
|
* // UserService depends on Database and Logger
|
|
@@ -1468,8 +1467,7 @@ export declare const provide: {
|
|
|
1468
1467
|
* const logger = yield* Logger
|
|
1469
1468
|
*
|
|
1470
1469
|
* return {
|
|
1471
|
-
* getUser: (id: string)
|
|
1472
|
-
* Effect.gen(function*() {
|
|
1470
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1473
1471
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1474
1472
|
* const result = yield* database.query(
|
|
1475
1473
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1523,11 +1521,11 @@ export declare const provide: {
|
|
|
1523
1521
|
*
|
|
1524
1522
|
* // Create dependency layers
|
|
1525
1523
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1526
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1524
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1527
1525
|
* })
|
|
1528
1526
|
*
|
|
1529
1527
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1530
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1528
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1531
1529
|
* })
|
|
1532
1530
|
*
|
|
1533
1531
|
* // UserService depends on Database and Logger
|
|
@@ -1536,8 +1534,7 @@ export declare const provide: {
|
|
|
1536
1534
|
* const logger = yield* Logger
|
|
1537
1535
|
*
|
|
1538
1536
|
* return {
|
|
1539
|
-
* getUser: (id: string)
|
|
1540
|
-
* Effect.gen(function*() {
|
|
1537
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1541
1538
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1542
1539
|
* const result = yield* database.query(
|
|
1543
1540
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1592,11 +1589,11 @@ export declare const provide: {
|
|
|
1592
1589
|
*
|
|
1593
1590
|
* // Create dependency layers
|
|
1594
1591
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1595
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1592
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1596
1593
|
* })
|
|
1597
1594
|
*
|
|
1598
1595
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1599
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1596
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1600
1597
|
* })
|
|
1601
1598
|
*
|
|
1602
1599
|
* // UserService depends on Database and Logger
|
|
@@ -1605,8 +1602,7 @@ export declare const provide: {
|
|
|
1605
1602
|
* const logger = yield* Logger
|
|
1606
1603
|
*
|
|
1607
1604
|
* return {
|
|
1608
|
-
* getUser: (id: string)
|
|
1609
|
-
* Effect.gen(function*() {
|
|
1605
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1610
1606
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1611
1607
|
* const result = yield* database.query(
|
|
1612
1608
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1666,11 +1662,11 @@ export declare const provideMerge: {
|
|
|
1666
1662
|
*
|
|
1667
1663
|
* // Create dependency layers
|
|
1668
1664
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1669
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1665
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1670
1666
|
* })
|
|
1671
1667
|
*
|
|
1672
1668
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1673
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1669
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1674
1670
|
* })
|
|
1675
1671
|
*
|
|
1676
1672
|
* // UserService depends on Database and Logger
|
|
@@ -1679,8 +1675,7 @@ export declare const provideMerge: {
|
|
|
1679
1675
|
* const logger = yield* Logger
|
|
1680
1676
|
*
|
|
1681
1677
|
* return {
|
|
1682
|
-
* getUser: (id: string)
|
|
1683
|
-
* Effect.gen(function*() {
|
|
1678
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1684
1679
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1685
1680
|
* const result = yield* database.query(
|
|
1686
1681
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1740,11 +1735,11 @@ export declare const provideMerge: {
|
|
|
1740
1735
|
*
|
|
1741
1736
|
* // Create dependency layers
|
|
1742
1737
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1743
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1738
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1744
1739
|
* })
|
|
1745
1740
|
*
|
|
1746
1741
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1747
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1742
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1748
1743
|
* })
|
|
1749
1744
|
*
|
|
1750
1745
|
* // UserService depends on Database and Logger
|
|
@@ -1753,8 +1748,7 @@ export declare const provideMerge: {
|
|
|
1753
1748
|
* const logger = yield* Logger
|
|
1754
1749
|
*
|
|
1755
1750
|
* return {
|
|
1756
|
-
* getUser: (id: string)
|
|
1757
|
-
* Effect.gen(function*() {
|
|
1751
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1758
1752
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1759
1753
|
* const result = yield* database.query(
|
|
1760
1754
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1814,11 +1808,11 @@ export declare const provideMerge: {
|
|
|
1814
1808
|
*
|
|
1815
1809
|
* // Create dependency layers
|
|
1816
1810
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1817
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1811
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1818
1812
|
* })
|
|
1819
1813
|
*
|
|
1820
1814
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1821
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1815
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1822
1816
|
* })
|
|
1823
1817
|
*
|
|
1824
1818
|
* // UserService depends on Database and Logger
|
|
@@ -1827,8 +1821,7 @@ export declare const provideMerge: {
|
|
|
1827
1821
|
* const logger = yield* Logger
|
|
1828
1822
|
*
|
|
1829
1823
|
* return {
|
|
1830
|
-
* getUser: (id: string)
|
|
1831
|
-
* Effect.gen(function*() {
|
|
1824
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1832
1825
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1833
1826
|
* const result = yield* database.query(
|
|
1834
1827
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1888,11 +1881,11 @@ export declare const provideMerge: {
|
|
|
1888
1881
|
*
|
|
1889
1882
|
* // Create dependency layers
|
|
1890
1883
|
* const databaseLayer = Layer.succeed(Database)({
|
|
1891
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
1884
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
1892
1885
|
* })
|
|
1893
1886
|
*
|
|
1894
1887
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1895
|
-
* log: (msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`))
|
|
1888
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(`[LOG] ${msg}`)))
|
|
1896
1889
|
* })
|
|
1897
1890
|
*
|
|
1898
1891
|
* // UserService depends on Database and Logger
|
|
@@ -1901,8 +1894,7 @@ export declare const provideMerge: {
|
|
|
1901
1894
|
* const logger = yield* Logger
|
|
1902
1895
|
*
|
|
1903
1896
|
* return {
|
|
1904
|
-
* getUser: (id: string)
|
|
1905
|
-
* Effect.gen(function*() {
|
|
1897
|
+
* getUser: Effect.fn("UserService.getUser")(function*(id: string) {
|
|
1906
1898
|
* yield* logger.log(`Looking up user ${id}`)
|
|
1907
1899
|
* const result = yield* database.query(
|
|
1908
1900
|
* `SELECT * FROM users WHERE id = ${id}`
|
|
@@ -1970,18 +1962,19 @@ export declare const provideMerge: {
|
|
|
1970
1962
|
*
|
|
1971
1963
|
* // Create database layer based on config
|
|
1972
1964
|
* const dbLayer = Layer.succeed(Database)({
|
|
1973
|
-
* query: (sql: string) =>
|
|
1965
|
+
* query: Effect.fn("Database.query")((sql: string) =>
|
|
1974
1966
|
* Effect.succeed(
|
|
1975
1967
|
* `Querying ${config.dbUrl}: ${sql}`
|
|
1976
|
-
* )
|
|
1968
|
+
* ))
|
|
1977
1969
|
* })
|
|
1978
1970
|
*
|
|
1979
1971
|
* // Create logger layer based on config
|
|
1980
1972
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
1981
|
-
* log: (msg: string) =>
|
|
1973
|
+
* log: Effect.fn("Logger.log")((msg: string) =>
|
|
1982
1974
|
* config.logLevel === "debug"
|
|
1983
1975
|
* ? Effect.sync(() => console.log(`[DEBUG] ${msg}`))
|
|
1984
1976
|
* : Effect.sync(() => console.log(msg))
|
|
1977
|
+
* )
|
|
1985
1978
|
* })
|
|
1986
1979
|
*
|
|
1987
1980
|
* // Return combined layer
|
|
@@ -2040,18 +2033,19 @@ export declare const flatMap: {
|
|
|
2040
2033
|
*
|
|
2041
2034
|
* // Create database layer based on config
|
|
2042
2035
|
* const dbLayer = Layer.succeed(Database)({
|
|
2043
|
-
* query: (sql: string) =>
|
|
2036
|
+
* query: Effect.fn("Database.query")((sql: string) =>
|
|
2044
2037
|
* Effect.succeed(
|
|
2045
2038
|
* `Querying ${config.dbUrl}: ${sql}`
|
|
2046
|
-
* )
|
|
2039
|
+
* ))
|
|
2047
2040
|
* })
|
|
2048
2041
|
*
|
|
2049
2042
|
* // Create logger layer based on config
|
|
2050
2043
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
2051
|
-
* log: (msg: string) =>
|
|
2044
|
+
* log: Effect.fn("Logger.log")((msg: string) =>
|
|
2052
2045
|
* config.logLevel === "debug"
|
|
2053
2046
|
* ? Effect.sync(() => console.log(`[DEBUG] ${msg}`))
|
|
2054
2047
|
* : Effect.sync(() => console.log(msg))
|
|
2048
|
+
* )
|
|
2055
2049
|
* })
|
|
2056
2050
|
*
|
|
2057
2051
|
* // Return combined layer
|
|
@@ -2110,18 +2104,19 @@ export declare const flatMap: {
|
|
|
2110
2104
|
*
|
|
2111
2105
|
* // Create database layer based on config
|
|
2112
2106
|
* const dbLayer = Layer.succeed(Database)({
|
|
2113
|
-
* query: (sql: string) =>
|
|
2107
|
+
* query: Effect.fn("Database.query")((sql: string) =>
|
|
2114
2108
|
* Effect.succeed(
|
|
2115
2109
|
* `Querying ${config.dbUrl}: ${sql}`
|
|
2116
|
-
* )
|
|
2110
|
+
* ))
|
|
2117
2111
|
* })
|
|
2118
2112
|
*
|
|
2119
2113
|
* // Create logger layer based on config
|
|
2120
2114
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
2121
|
-
* log: (msg: string) =>
|
|
2115
|
+
* log: Effect.fn("Logger.log")((msg: string) =>
|
|
2122
2116
|
* config.logLevel === "debug"
|
|
2123
2117
|
* ? Effect.sync(() => console.log(`[DEBUG] ${msg}`))
|
|
2124
2118
|
* : Effect.sync(() => console.log(msg))
|
|
2119
|
+
* )
|
|
2125
2120
|
* })
|
|
2126
2121
|
*
|
|
2127
2122
|
* // Return combined layer
|
|
@@ -2148,6 +2143,90 @@ export declare const flatMap: {
|
|
|
2148
2143
|
*/
|
|
2149
2144
|
<A, E, R, A2, E2, R2>(self: Layer<A, E, R>, f: (context: ServiceMap.ServiceMap<A>) => Layer<A2, E2, R2>): Layer<A2, E | E2, R | R2>;
|
|
2150
2145
|
};
|
|
2146
|
+
/**
|
|
2147
|
+
* Performs the specified effect if this layer succeeds.
|
|
2148
|
+
*
|
|
2149
|
+
* @since 4.0.0
|
|
2150
|
+
* @category sequencing
|
|
2151
|
+
*/
|
|
2152
|
+
export declare const tap: {
|
|
2153
|
+
/**
|
|
2154
|
+
* Performs the specified effect if this layer succeeds.
|
|
2155
|
+
*
|
|
2156
|
+
* @since 4.0.0
|
|
2157
|
+
* @category sequencing
|
|
2158
|
+
*/
|
|
2159
|
+
<ROut, XR extends ROut, RIn2, E2, X>(f: (context: ServiceMap.ServiceMap<XR>) => Effect<X, E2, RIn2>): <RIn, E>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
|
|
2160
|
+
/**
|
|
2161
|
+
* Performs the specified effect if this layer succeeds.
|
|
2162
|
+
*
|
|
2163
|
+
* @since 4.0.0
|
|
2164
|
+
* @category sequencing
|
|
2165
|
+
*/
|
|
2166
|
+
<RIn, E, ROut, XR extends ROut, RIn2, E2, X>(self: Layer<ROut, E, RIn>, f: (context: ServiceMap.ServiceMap<XR>) => Effect<X, E2, RIn2>): Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
|
|
2167
|
+
};
|
|
2168
|
+
/**
|
|
2169
|
+
* Performs the specified effect if this layer fails.
|
|
2170
|
+
*
|
|
2171
|
+
* @since 4.0.0
|
|
2172
|
+
* @category sequencing
|
|
2173
|
+
*/
|
|
2174
|
+
export declare const tapError: {
|
|
2175
|
+
/**
|
|
2176
|
+
* Performs the specified effect if this layer fails.
|
|
2177
|
+
*
|
|
2178
|
+
* @since 4.0.0
|
|
2179
|
+
* @category sequencing
|
|
2180
|
+
*/
|
|
2181
|
+
<E, XE extends E, RIn2, E2, X>(f: (e: XE) => Effect<X, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
|
|
2182
|
+
/**
|
|
2183
|
+
* Performs the specified effect if this layer fails.
|
|
2184
|
+
*
|
|
2185
|
+
* @since 4.0.0
|
|
2186
|
+
* @category sequencing
|
|
2187
|
+
*/
|
|
2188
|
+
<RIn, E, XE extends E, ROut, RIn2, E2, X>(self: Layer<ROut, E, RIn>, f: (e: XE) => Effect<X, E2, RIn2>): Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
|
|
2189
|
+
};
|
|
2190
|
+
/**
|
|
2191
|
+
* Performs the specified effect if this layer fails.
|
|
2192
|
+
*
|
|
2193
|
+
* **Previously Known As**
|
|
2194
|
+
*
|
|
2195
|
+
* This API replaces the following from Effect 3.x:
|
|
2196
|
+
*
|
|
2197
|
+
* - `Layer.tapErrorCause`
|
|
2198
|
+
*
|
|
2199
|
+
* @since 4.0.0
|
|
2200
|
+
* @category sequencing
|
|
2201
|
+
*/
|
|
2202
|
+
export declare const tapCause: {
|
|
2203
|
+
/**
|
|
2204
|
+
* Performs the specified effect if this layer fails.
|
|
2205
|
+
*
|
|
2206
|
+
* **Previously Known As**
|
|
2207
|
+
*
|
|
2208
|
+
* This API replaces the following from Effect 3.x:
|
|
2209
|
+
*
|
|
2210
|
+
* - `Layer.tapErrorCause`
|
|
2211
|
+
*
|
|
2212
|
+
* @since 4.0.0
|
|
2213
|
+
* @category sequencing
|
|
2214
|
+
*/
|
|
2215
|
+
<E, XE extends E, RIn2, E2, X>(f: (cause: Cause.Cause<XE>) => Effect<X, E2, RIn2>): <RIn, ROut>(self: Layer<ROut, E, RIn>) => Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
|
|
2216
|
+
/**
|
|
2217
|
+
* Performs the specified effect if this layer fails.
|
|
2218
|
+
*
|
|
2219
|
+
* **Previously Known As**
|
|
2220
|
+
*
|
|
2221
|
+
* This API replaces the following from Effect 3.x:
|
|
2222
|
+
*
|
|
2223
|
+
* - `Layer.tapErrorCause`
|
|
2224
|
+
*
|
|
2225
|
+
* @since 4.0.0
|
|
2226
|
+
* @category sequencing
|
|
2227
|
+
*/
|
|
2228
|
+
<RIn, E, XE extends E, ROut, RIn2, E2, X>(self: Layer<ROut, E, RIn>, f: (cause: Cause.Cause<XE>) => Effect<X, E2, RIn2>): Layer<ROut, E | E2, RIn | Exclude<RIn2, Scope.Scope>>;
|
|
2229
|
+
};
|
|
2151
2230
|
/**
|
|
2152
2231
|
* Translates effect failure into death of the fiber, making all failures
|
|
2153
2232
|
* unchecked and not a part of the type of the layer.
|
|
@@ -2169,10 +2248,10 @@ export declare const flatMap: {
|
|
|
2169
2248
|
* // Simulate a database connection that might fail
|
|
2170
2249
|
* const shouldFail = Math.random() > 0.5
|
|
2171
2250
|
* if (shouldFail) {
|
|
2172
|
-
* yield*
|
|
2251
|
+
* return yield* new DatabaseError({ message: "Connection failed" })
|
|
2173
2252
|
* }
|
|
2174
2253
|
*
|
|
2175
|
-
* return { query: (sql: string) => Effect.succeed(`Result: ${sql}`) }
|
|
2254
|
+
* return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`)) }
|
|
2176
2255
|
* }))
|
|
2177
2256
|
*
|
|
2178
2257
|
* // Convert failures to fiber death - removes error from type
|
|
@@ -2310,8 +2389,8 @@ export declare const catchTag: {
|
|
|
2310
2389
|
*
|
|
2311
2390
|
* // Primary database layer that might fail
|
|
2312
2391
|
* const primaryDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() {
|
|
2313
|
-
* yield*
|
|
2314
|
-
* return { query: (sql: string) => Effect.succeed(`Primary: ${sql}`) }
|
|
2392
|
+
* return yield* new DatabaseError({ message: "Primary DB unreachable" })
|
|
2393
|
+
* return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Primary: ${sql}`)) }
|
|
2315
2394
|
* }))
|
|
2316
2395
|
*
|
|
2317
2396
|
* // Fallback layers for different error causes
|
|
@@ -2320,11 +2399,12 @@ export declare const catchTag: {
|
|
|
2320
2399
|
* // For any cause/error, fallback to in-memory database
|
|
2321
2400
|
* return Layer.mergeAll(
|
|
2322
2401
|
* Layer.succeed(Database)({
|
|
2323
|
-
* query: (sql: string) => Effect.succeed(`Memory: ${sql}`)
|
|
2402
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`))
|
|
2324
2403
|
* }),
|
|
2325
2404
|
* Layer.succeed(Logger)({
|
|
2326
|
-
* log: (msg: string) =>
|
|
2405
|
+
* log: Effect.fn("Logger.log")((msg: string) =>
|
|
2327
2406
|
* Effect.sync(() => console.log(`[FALLBACK] ${msg}`))
|
|
2407
|
+
* )
|
|
2328
2408
|
* })
|
|
2329
2409
|
* )
|
|
2330
2410
|
* })
|
|
@@ -2367,8 +2447,8 @@ export declare const catchCause: {
|
|
|
2367
2447
|
*
|
|
2368
2448
|
* // Primary database layer that might fail
|
|
2369
2449
|
* const primaryDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() {
|
|
2370
|
-
* yield*
|
|
2371
|
-
* return { query: (sql: string) => Effect.succeed(`Primary: ${sql}`) }
|
|
2450
|
+
* return yield* new DatabaseError({ message: "Primary DB unreachable" })
|
|
2451
|
+
* return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Primary: ${sql}`)) }
|
|
2372
2452
|
* }))
|
|
2373
2453
|
*
|
|
2374
2454
|
* // Fallback layers for different error causes
|
|
@@ -2377,11 +2457,12 @@ export declare const catchCause: {
|
|
|
2377
2457
|
* // For any cause/error, fallback to in-memory database
|
|
2378
2458
|
* return Layer.mergeAll(
|
|
2379
2459
|
* Layer.succeed(Database)({
|
|
2380
|
-
* query: (sql: string) => Effect.succeed(`Memory: ${sql}`)
|
|
2460
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`))
|
|
2381
2461
|
* }),
|
|
2382
2462
|
* Layer.succeed(Logger)({
|
|
2383
|
-
* log: (msg: string) =>
|
|
2463
|
+
* log: Effect.fn("Logger.log")((msg: string) =>
|
|
2384
2464
|
* Effect.sync(() => console.log(`[FALLBACK] ${msg}`))
|
|
2465
|
+
* )
|
|
2385
2466
|
* })
|
|
2386
2467
|
* )
|
|
2387
2468
|
* })
|
|
@@ -2424,8 +2505,8 @@ export declare const catchCause: {
|
|
|
2424
2505
|
*
|
|
2425
2506
|
* // Primary database layer that might fail
|
|
2426
2507
|
* const primaryDatabaseLayer = Layer.effect(Database)(Effect.gen(function*() {
|
|
2427
|
-
* yield*
|
|
2428
|
-
* return { query: (sql: string) => Effect.succeed(`Primary: ${sql}`) }
|
|
2508
|
+
* return yield* new DatabaseError({ message: "Primary DB unreachable" })
|
|
2509
|
+
* return { query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Primary: ${sql}`)) }
|
|
2429
2510
|
* }))
|
|
2430
2511
|
*
|
|
2431
2512
|
* // Fallback layers for different error causes
|
|
@@ -2434,11 +2515,12 @@ export declare const catchCause: {
|
|
|
2434
2515
|
* // For any cause/error, fallback to in-memory database
|
|
2435
2516
|
* return Layer.mergeAll(
|
|
2436
2517
|
* Layer.succeed(Database)({
|
|
2437
|
-
* query: (sql: string) => Effect.succeed(`Memory: ${sql}`)
|
|
2518
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Memory: ${sql}`))
|
|
2438
2519
|
* }),
|
|
2439
2520
|
* Layer.succeed(Logger)({
|
|
2440
|
-
* log: (msg: string) =>
|
|
2521
|
+
* log: Effect.fn("Logger.log")((msg: string) =>
|
|
2441
2522
|
* Effect.sync(() => console.log(`[FALLBACK] ${msg}`))
|
|
2523
|
+
* )
|
|
2442
2524
|
* })
|
|
2443
2525
|
* )
|
|
2444
2526
|
* })
|
|
@@ -2494,7 +2576,7 @@ export declare const updateService: {
|
|
|
2494
2576
|
* @since 3.13.0
|
|
2495
2577
|
* @category utils
|
|
2496
2578
|
*/
|
|
2497
|
-
<I, A>(service: ServiceMap.
|
|
2579
|
+
<I, A>(service: ServiceMap.Key<I, A>, f: (a: A) => A): <A1, E1, R1>(layer: Layer<A1, E1, R1>) => Layer<A1, E1, I | R1>;
|
|
2498
2580
|
/**
|
|
2499
2581
|
* Updates a service in the context with a new implementation.
|
|
2500
2582
|
*
|
|
@@ -2513,7 +2595,7 @@ export declare const updateService: {
|
|
|
2513
2595
|
* @since 3.13.0
|
|
2514
2596
|
* @category utils
|
|
2515
2597
|
*/
|
|
2516
|
-
<A1, E1, R1, I, A>(layer: Layer<A1, E1, R1>, service: ServiceMap.
|
|
2598
|
+
<A1, E1, R1, I, A>(layer: Layer<A1, E1, R1>, service: ServiceMap.Key<I, A>, f: (a: A) => A): Layer<A1, E1, I | R1>;
|
|
2517
2599
|
};
|
|
2518
2600
|
/**
|
|
2519
2601
|
* Creates a fresh version of this layer that will not be shared.
|
|
@@ -2532,10 +2614,11 @@ export declare const updateService: {
|
|
|
2532
2614
|
* const ref = yield* Ref.make(0)
|
|
2533
2615
|
* return {
|
|
2534
2616
|
* count: 0,
|
|
2535
|
-
* increment: () =>
|
|
2617
|
+
* increment: Effect.fn("Counter.increment")(() =>
|
|
2536
2618
|
* Ref.update(ref, (n) => n + 1).pipe(
|
|
2537
2619
|
* Effect.flatMap(() => Ref.get(ref))
|
|
2538
2620
|
* )
|
|
2621
|
+
* )
|
|
2539
2622
|
* }
|
|
2540
2623
|
* }))
|
|
2541
2624
|
*
|
|
@@ -2588,13 +2671,11 @@ export declare const fresh: <A, E, R>(self: Layer<A, E, R>) => Layer<A, E, R>;
|
|
|
2588
2671
|
* yield* Console.log("Starting HTTP server...")
|
|
2589
2672
|
*
|
|
2590
2673
|
* return {
|
|
2591
|
-
* start: ()
|
|
2592
|
-
* Effect.gen(function*() {
|
|
2674
|
+
* start: Effect.fn("HttpServer.start")(function*() {
|
|
2593
2675
|
* yield* Console.log("Server listening on port 3000")
|
|
2594
2676
|
* return "Server started"
|
|
2595
2677
|
* }),
|
|
2596
|
-
* stop: ()
|
|
2597
|
-
* Effect.gen(function*() {
|
|
2678
|
+
* stop: Effect.fn("HttpServer.stop")(function*() {
|
|
2598
2679
|
* yield* Console.log("Server stopped gracefully")
|
|
2599
2680
|
* return "Server stopped"
|
|
2600
2681
|
* })
|
|
@@ -2602,7 +2683,7 @@ export declare const fresh: <A, E, R>(self: Layer<A, E, R>) => Layer<A, E, R>;
|
|
|
2602
2683
|
* }))
|
|
2603
2684
|
*
|
|
2604
2685
|
* const loggerLayer = Layer.succeed(Logger)({
|
|
2605
|
-
* log: (msg: string) => Console.log(`[LOG] ${msg}`)
|
|
2686
|
+
* log: Effect.fn("Logger.log")((msg: string) => Console.log(`[LOG] ${msg}`))
|
|
2606
2687
|
* })
|
|
2607
2688
|
*
|
|
2608
2689
|
* // Application layer combining all services
|
|
@@ -2634,10 +2715,11 @@ export declare const launch: <RIn, E, ROut>(self: Layer<ROut, E, RIn>) => Effect
|
|
|
2634
2715
|
* @category Testing
|
|
2635
2716
|
*/
|
|
2636
2717
|
export type PartialEffectful<A extends object> = Types.Simplify<{
|
|
2637
|
-
[K in keyof A as A[K] extends
|
|
2718
|
+
[K in keyof A as A[K] extends AnyEffectOrStream ? K : never]?: A[K];
|
|
2638
2719
|
} & {
|
|
2639
|
-
[K in keyof A as A[K] extends
|
|
2720
|
+
[K in keyof A as A[K] extends AnyEffectOrStream ? never : K]: A[K];
|
|
2640
2721
|
}>;
|
|
2722
|
+
type AnyEffectOrStream = Effect<any, any, any> | Stream.Stream<any, any, any> | Channel.Channel<any, any, any, any, any, any, any> | ((...args: any) => Effect<any, any, any>) | ((...args: any) => Stream.Stream<any, any, any>) | ((...args: any) => Channel.Channel<any, any, any, any, any, any, any>);
|
|
2641
2723
|
/**
|
|
2642
2724
|
* Creates a mock layer for testing purposes. You can provide a partial
|
|
2643
2725
|
* implementation of the service, and any methods not provided will
|
|
@@ -2660,7 +2742,7 @@ export type PartialEffectful<A extends object> = Types.Simplify<{
|
|
|
2660
2742
|
* }>()("UserService") {}
|
|
2661
2743
|
*
|
|
2662
2744
|
* // Create a partial mock - only implement what you need for testing
|
|
2663
|
-
* const testUserLayer = Layer.mock(UserService
|
|
2745
|
+
* const testUserLayer = Layer.mock(UserService, {
|
|
2664
2746
|
* config: { apiUrl: "https://test-api.com" }, // Required - non-Effect property
|
|
2665
2747
|
* getUser: (id: string) => Effect.succeed({ id, name: "Test User" }) // Mock implementation
|
|
2666
2748
|
* // deleteUser and updateUser are omitted - will throw UnimplementedError if called
|
|
@@ -2684,7 +2766,102 @@ export type PartialEffectful<A extends object> = Types.Simplify<{
|
|
|
2684
2766
|
* @since 4.0.0
|
|
2685
2767
|
* @category Testing
|
|
2686
2768
|
*/
|
|
2687
|
-
export declare const mock:
|
|
2769
|
+
export declare const mock: {
|
|
2770
|
+
/**
|
|
2771
|
+
* Creates a mock layer for testing purposes. You can provide a partial
|
|
2772
|
+
* implementation of the service, and any methods not provided will
|
|
2773
|
+
* throw an unimplemented defect when called.
|
|
2774
|
+
*
|
|
2775
|
+
* @example
|
|
2776
|
+
* ```ts
|
|
2777
|
+
* import { Effect, Layer, ServiceMap } from "effect"
|
|
2778
|
+
*
|
|
2779
|
+
* class UserService extends ServiceMap.Service<UserService, {
|
|
2780
|
+
* readonly config: { apiUrl: string }
|
|
2781
|
+
* readonly getUser: (
|
|
2782
|
+
* id: string
|
|
2783
|
+
* ) => Effect.Effect<{ id: string; name: string }, Error>
|
|
2784
|
+
* readonly deleteUser: (id: string) => Effect.Effect<void, Error>
|
|
2785
|
+
* readonly updateUser: (
|
|
2786
|
+
* id: string,
|
|
2787
|
+
* data: object
|
|
2788
|
+
* ) => Effect.Effect<{ id: string; name: string }, Error>
|
|
2789
|
+
* }>()("UserService") {}
|
|
2790
|
+
*
|
|
2791
|
+
* // Create a partial mock - only implement what you need for testing
|
|
2792
|
+
* const testUserLayer = Layer.mock(UserService, {
|
|
2793
|
+
* config: { apiUrl: "https://test-api.com" }, // Required - non-Effect property
|
|
2794
|
+
* getUser: (id: string) => Effect.succeed({ id, name: "Test User" }) // Mock implementation
|
|
2795
|
+
* // deleteUser and updateUser are omitted - will throw UnimplementedError if called
|
|
2796
|
+
* })
|
|
2797
|
+
*
|
|
2798
|
+
* // Use in tests
|
|
2799
|
+
* const testProgram = Effect.gen(function*() {
|
|
2800
|
+
* const userService = yield* UserService
|
|
2801
|
+
*
|
|
2802
|
+
* // This works - we provided an implementation
|
|
2803
|
+
* const user = yield* userService.getUser("123")
|
|
2804
|
+
* console.log(user.name) // "Test User"
|
|
2805
|
+
*
|
|
2806
|
+
* // This would throw - we didn't implement deleteUser
|
|
2807
|
+
* // yield* userService.deleteUser("123") // UnimplementedError
|
|
2808
|
+
* }).pipe(
|
|
2809
|
+
* Effect.provide(testUserLayer)
|
|
2810
|
+
* )
|
|
2811
|
+
* ```
|
|
2812
|
+
*
|
|
2813
|
+
* @since 4.0.0
|
|
2814
|
+
* @category Testing
|
|
2815
|
+
*/
|
|
2816
|
+
<I, S extends object>(service: ServiceMap.Key<I, S>): (implementation: PartialEffectful<S>) => Layer<I>;
|
|
2817
|
+
/**
|
|
2818
|
+
* Creates a mock layer for testing purposes. You can provide a partial
|
|
2819
|
+
* implementation of the service, and any methods not provided will
|
|
2820
|
+
* throw an unimplemented defect when called.
|
|
2821
|
+
*
|
|
2822
|
+
* @example
|
|
2823
|
+
* ```ts
|
|
2824
|
+
* import { Effect, Layer, ServiceMap } from "effect"
|
|
2825
|
+
*
|
|
2826
|
+
* class UserService extends ServiceMap.Service<UserService, {
|
|
2827
|
+
* readonly config: { apiUrl: string }
|
|
2828
|
+
* readonly getUser: (
|
|
2829
|
+
* id: string
|
|
2830
|
+
* ) => Effect.Effect<{ id: string; name: string }, Error>
|
|
2831
|
+
* readonly deleteUser: (id: string) => Effect.Effect<void, Error>
|
|
2832
|
+
* readonly updateUser: (
|
|
2833
|
+
* id: string,
|
|
2834
|
+
* data: object
|
|
2835
|
+
* ) => Effect.Effect<{ id: string; name: string }, Error>
|
|
2836
|
+
* }>()("UserService") {}
|
|
2837
|
+
*
|
|
2838
|
+
* // Create a partial mock - only implement what you need for testing
|
|
2839
|
+
* const testUserLayer = Layer.mock(UserService, {
|
|
2840
|
+
* config: { apiUrl: "https://test-api.com" }, // Required - non-Effect property
|
|
2841
|
+
* getUser: (id: string) => Effect.succeed({ id, name: "Test User" }) // Mock implementation
|
|
2842
|
+
* // deleteUser and updateUser are omitted - will throw UnimplementedError if called
|
|
2843
|
+
* })
|
|
2844
|
+
*
|
|
2845
|
+
* // Use in tests
|
|
2846
|
+
* const testProgram = Effect.gen(function*() {
|
|
2847
|
+
* const userService = yield* UserService
|
|
2848
|
+
*
|
|
2849
|
+
* // This works - we provided an implementation
|
|
2850
|
+
* const user = yield* userService.getUser("123")
|
|
2851
|
+
* console.log(user.name) // "Test User"
|
|
2852
|
+
*
|
|
2853
|
+
* // This would throw - we didn't implement deleteUser
|
|
2854
|
+
* // yield* userService.deleteUser("123") // UnimplementedError
|
|
2855
|
+
* }).pipe(
|
|
2856
|
+
* Effect.provide(testUserLayer)
|
|
2857
|
+
* )
|
|
2858
|
+
* ```
|
|
2859
|
+
*
|
|
2860
|
+
* @since 4.0.0
|
|
2861
|
+
* @category Testing
|
|
2862
|
+
*/
|
|
2863
|
+
<I, S extends object>(service: ServiceMap.Key<I, S>, implementation: Types.NoInfer<PartialEffectful<S>>): Layer<I>;
|
|
2864
|
+
};
|
|
2688
2865
|
/**
|
|
2689
2866
|
* Ensures that an layer's success type extends a given type `ROut`.
|
|
2690
2867
|
*
|
|
@@ -2815,7 +2992,7 @@ export interface SpanOptions extends Tracer.SpanOptions {
|
|
|
2815
2992
|
* yield* Console.log((parentSpan as Tracer.Span).name) // "database-init"
|
|
2816
2993
|
*
|
|
2817
2994
|
* return {
|
|
2818
|
-
* query: (sql: string) => Effect.succeed(`Result: ${sql}`)
|
|
2995
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`))
|
|
2819
2996
|
* }
|
|
2820
2997
|
* })).pipe(Layer.provide(Layer.span("database-init")))
|
|
2821
2998
|
*
|
|
@@ -2859,7 +3036,7 @@ export declare const span: (name: string, options?: SpanOptions) => Layer<Tracer
|
|
|
2859
3036
|
* yield* Console.log(parentSpan.spanId) // "42"
|
|
2860
3037
|
*
|
|
2861
3038
|
* return {
|
|
2862
|
-
* query: (sql: string) => Effect.succeed(`Result: ${sql}`)
|
|
3039
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`))
|
|
2863
3040
|
* }
|
|
2864
3041
|
* })
|
|
2865
3042
|
* ).pipe(Layer.provide(Layer.parentSpan(Tracer.externalSpan({
|
|
@@ -2897,14 +3074,14 @@ export declare const parentSpan: (span: Tracer.AnySpan) => Layer<Tracer.ParentSp
|
|
|
2897
3074
|
* yield* Effect.log("Connecting to database")
|
|
2898
3075
|
* yield* Effect.sleep("100 millis")
|
|
2899
3076
|
* return {
|
|
2900
|
-
* query: (sql: string) => Effect.succeed(`Result: ${sql}`)
|
|
3077
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`))
|
|
2901
3078
|
* }
|
|
2902
3079
|
* })).pipe(Layer.withSpan("database-initialization", {
|
|
2903
3080
|
* attributes: { dbType: "postgres" }
|
|
2904
3081
|
* }))
|
|
2905
3082
|
*
|
|
2906
3083
|
* const loggerLayer = Layer.succeed(Logger, {
|
|
2907
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
3084
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
2908
3085
|
* }).pipe(Layer.withSpan("logger-initialization"))
|
|
2909
3086
|
*
|
|
2910
3087
|
* // Combine traced layers
|
|
@@ -2956,14 +3133,14 @@ export declare const withSpan: {
|
|
|
2956
3133
|
* yield* Effect.log("Connecting to database")
|
|
2957
3134
|
* yield* Effect.sleep("100 millis")
|
|
2958
3135
|
* return {
|
|
2959
|
-
* query: (sql: string) => Effect.succeed(`Result: ${sql}`)
|
|
3136
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`))
|
|
2960
3137
|
* }
|
|
2961
3138
|
* })).pipe(Layer.withSpan("database-initialization", {
|
|
2962
3139
|
* attributes: { dbType: "postgres" }
|
|
2963
3140
|
* }))
|
|
2964
3141
|
*
|
|
2965
3142
|
* const loggerLayer = Layer.succeed(Logger, {
|
|
2966
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
3143
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
2967
3144
|
* }).pipe(Layer.withSpan("logger-initialization"))
|
|
2968
3145
|
*
|
|
2969
3146
|
* // Combine traced layers
|
|
@@ -3015,14 +3192,14 @@ export declare const withSpan: {
|
|
|
3015
3192
|
* yield* Effect.log("Connecting to database")
|
|
3016
3193
|
* yield* Effect.sleep("100 millis")
|
|
3017
3194
|
* return {
|
|
3018
|
-
* query: (sql: string) => Effect.succeed(`Result: ${sql}`)
|
|
3195
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`Result: ${sql}`))
|
|
3019
3196
|
* }
|
|
3020
3197
|
* })).pipe(Layer.withSpan("database-initialization", {
|
|
3021
3198
|
* attributes: { dbType: "postgres" }
|
|
3022
3199
|
* }))
|
|
3023
3200
|
*
|
|
3024
3201
|
* const loggerLayer = Layer.succeed(Logger, {
|
|
3025
|
-
* log: (msg: string) => Effect.sync(() => console.log(msg))
|
|
3202
|
+
* log: Effect.fn("Logger.log")((msg: string) => Effect.sync(() => console.log(msg)))
|
|
3026
3203
|
* }).pipe(Layer.withSpan("logger-initialization"))
|
|
3027
3204
|
*
|
|
3028
3205
|
* // Combine traced layers
|
|
@@ -3073,14 +3250,14 @@ export declare const withSpan: {
|
|
|
3073
3250
|
* const DatabaseLayer = Layer.effect(Database, Effect.gen(function*() {
|
|
3074
3251
|
* yield* Effect.log("Connecting to database")
|
|
3075
3252
|
* return {
|
|
3076
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
3253
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
3077
3254
|
* }
|
|
3078
3255
|
* }))
|
|
3079
3256
|
*
|
|
3080
3257
|
* const CacheLayer = Layer.effect(Cache, Effect.gen(function*() {
|
|
3081
3258
|
* yield* Effect.log("Connecting to cache")
|
|
3082
3259
|
* return {
|
|
3083
|
-
* get: (key: string) => Effect.succeed(`Cache: ${key}`)
|
|
3260
|
+
* get: Effect.fn("Cache.get")((key: string) => Effect.succeed(`Cache: ${key}`))
|
|
3084
3261
|
* }
|
|
3085
3262
|
* }))
|
|
3086
3263
|
*
|
|
@@ -3133,14 +3310,14 @@ export declare const withParentSpan: {
|
|
|
3133
3310
|
* const DatabaseLayer = Layer.effect(Database, Effect.gen(function*() {
|
|
3134
3311
|
* yield* Effect.log("Connecting to database")
|
|
3135
3312
|
* return {
|
|
3136
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
3313
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
3137
3314
|
* }
|
|
3138
3315
|
* }))
|
|
3139
3316
|
*
|
|
3140
3317
|
* const CacheLayer = Layer.effect(Cache, Effect.gen(function*() {
|
|
3141
3318
|
* yield* Effect.log("Connecting to cache")
|
|
3142
3319
|
* return {
|
|
3143
|
-
* get: (key: string) => Effect.succeed(`Cache: ${key}`)
|
|
3320
|
+
* get: Effect.fn("Cache.get")((key: string) => Effect.succeed(`Cache: ${key}`))
|
|
3144
3321
|
* }
|
|
3145
3322
|
* }))
|
|
3146
3323
|
*
|
|
@@ -3193,14 +3370,14 @@ export declare const withParentSpan: {
|
|
|
3193
3370
|
* const DatabaseLayer = Layer.effect(Database, Effect.gen(function*() {
|
|
3194
3371
|
* yield* Effect.log("Connecting to database")
|
|
3195
3372
|
* return {
|
|
3196
|
-
* query: (sql: string) => Effect.succeed(`DB: ${sql}`)
|
|
3373
|
+
* query: Effect.fn("Database.query")((sql: string) => Effect.succeed(`DB: ${sql}`))
|
|
3197
3374
|
* }
|
|
3198
3375
|
* }))
|
|
3199
3376
|
*
|
|
3200
3377
|
* const CacheLayer = Layer.effect(Cache, Effect.gen(function*() {
|
|
3201
3378
|
* yield* Effect.log("Connecting to cache")
|
|
3202
3379
|
* return {
|
|
3203
|
-
* get: (key: string) => Effect.succeed(`Cache: ${key}`)
|
|
3380
|
+
* get: Effect.fn("Cache.get")((key: string) => Effect.succeed(`Cache: ${key}`))
|
|
3204
3381
|
* }
|
|
3205
3382
|
* }))
|
|
3206
3383
|
*
|