effect 4.0.0-beta.70 → 4.0.0-beta.72
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 +1483 -239
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +617 -164
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +646 -52
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +331 -28
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +474 -18
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +292 -14
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +239 -19
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +163 -13
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.d.ts +53 -8
- package/dist/Brand.d.ts.map +1 -1
- package/dist/Brand.js +82 -11
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +73 -12
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +53 -15
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +488 -200
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +349 -129
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +539 -158
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +222 -89
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +81 -6
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js +45 -4
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +179 -54
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +65 -22
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +60 -3
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +31 -1
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +21 -21
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +14 -18
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +135 -50
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +109 -37
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +52 -29
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +21 -21
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +32 -7
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +32 -7
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +503 -48
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +191 -17
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +116 -6
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +92 -6
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +30 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +30 -1
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +92 -47
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +16 -12
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +313 -128
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +167 -68
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +345 -79
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +131 -12
- package/dist/Deferred.js.map +1 -1
- package/dist/Differ.d.ts +5 -0
- package/dist/Differ.d.ts.map +1 -1
- package/dist/Duration.d.ts +203 -50
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +112 -32
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2006 -810
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +785 -350
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +16 -2
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +16 -2
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +100 -8
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +141 -8
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +10 -11
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +7 -8
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +46 -43
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +43 -35
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +135 -16
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +93 -12
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +96 -26
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +28 -2
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +149 -101
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +117 -80
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +321 -72
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +152 -3
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +6 -6
- package/dist/FiberHandle.js +4 -4
- package/dist/FiberMap.d.ts +18 -18
- package/dist/FiberMap.js +8 -8
- package/dist/FiberSet.d.ts +21 -13
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +17 -9
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +79 -16
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +93 -33
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +221 -2
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +155 -2
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +4 -6
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +3 -5
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +164 -18
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +116 -15
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +297 -25
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +75 -12
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +59 -26
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +95 -19
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +119 -17
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +35 -37
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +13 -15
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts +210 -9
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +95 -5
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +16 -16
- package/dist/HashSet.js +6 -6
- package/dist/Inspectable.d.ts +47 -4
- package/dist/Inspectable.d.ts.map +1 -1
- package/dist/Inspectable.js +74 -17
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +261 -81
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +123 -43
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +34 -19
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +52 -44
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +5 -5
- package/dist/JsonPointer.js +5 -5
- package/dist/JsonSchema.d.ts +77 -33
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +45 -31
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +158 -13
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +79 -4
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +297 -101
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +94 -36
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +9 -2
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +1 -2
- package/dist/LayerMap.js.map +1 -1
- package/dist/LogLevel.d.ts +96 -21
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +68 -9
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +21 -7
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +26 -13
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +82 -10
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +33 -2
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +215 -42
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +242 -59
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +68 -41
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +60 -33
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +285 -40
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +128 -7
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +111 -4
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +98 -39
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +24 -6
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +23 -5
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +141 -4
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +73 -2
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +20 -11
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +6 -6
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +22 -6
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +6 -1
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +434 -17
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +268 -13
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +26 -33
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +18 -25
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +186 -150
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +75 -72
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +93 -120
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +149 -142
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +37 -5
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +22 -3
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts +238 -15
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +106 -8
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +34 -6
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +19 -5
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +29 -4
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +16 -4
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +53 -4
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +45 -4
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +140 -14
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +63 -8
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +98 -168
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +109 -120
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +75 -9
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +70 -9
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +241 -66
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +187 -52
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +148 -3
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +69 -2
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +167 -59
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +163 -55
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +71 -16
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +35 -0
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +171 -9
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +49 -3
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +73 -18
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +23 -3
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +174 -53
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +128 -23
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +27 -23
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +22 -18
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +82 -4
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +64 -4
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +17 -7
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +2 -4
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +168 -32
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +135 -30
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +226 -30
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +162 -23
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +15 -2
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +49 -3
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +218 -35
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +57 -10
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +213 -29
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +99 -11
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +62 -3
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +52 -3
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +380 -57
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +176 -32
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +124 -14
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +150 -25
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +436 -115
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +344 -107
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +53 -4
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +42 -3
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +934 -239
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +655 -217
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +239 -28
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +239 -28
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +127 -129
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +115 -117
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +45 -56
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +39 -50
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +254 -15
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +295 -33
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +106 -77
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +101 -71
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +92 -56
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +86 -50
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/SchemaUtils.d.ts +9 -0
- package/dist/SchemaUtils.d.ts.map +1 -1
- package/dist/SchemaUtils.js +38 -11
- package/dist/SchemaUtils.js.map +1 -1
- package/dist/Scope.d.ts +127 -25
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +91 -21
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts +364 -19
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +155 -7
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +69 -7
- package/dist/ScopedRef.d.ts.map +1 -1
- package/dist/ScopedRef.js +49 -5
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +348 -29
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +103 -8
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +343 -45
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +194 -26
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +72 -17
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +62 -16
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +774 -224
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +333 -91
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +219 -47
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +179 -29
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +54 -110
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +26 -42
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +341 -105
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +162 -44
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +25 -7
- package/dist/Symbol.d.ts.map +1 -1
- package/dist/Symbol.js +25 -7
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +529 -29
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +193 -11
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.d.ts +36 -13
- package/dist/Take.d.ts.map +1 -1
- package/dist/Take.js +5 -0
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +76 -20
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +41 -5
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +74 -7
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +74 -7
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +67 -30
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +7 -7
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +96 -108
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +42 -52
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +42 -9
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +42 -9
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +85 -2
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +56 -2
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +20 -20
- package/dist/TxHashMap.js +8 -8
- package/dist/TxHashSet.d.ts +14 -14
- package/dist/TxHashSet.js +6 -6
- package/dist/TxPriorityQueue.d.ts +43 -8
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +41 -6
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +98 -8
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +70 -8
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +58 -17
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +10 -10
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +88 -16
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +78 -14
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +113 -8
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +82 -8
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +173 -14
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +130 -14
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +206 -3
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +111 -3
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +68 -13
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.d.ts +171 -30
- package/dist/UndefinedOr.d.ts.map +1 -1
- package/dist/UndefinedOr.js +115 -30
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +130 -22
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +36 -12
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +21 -16
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +14 -6
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +0 -5205
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -5205
- package/dist/index.js.map +1 -1
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/request.js +3 -1
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/schema/arbitrary.js +11 -1
- package/dist/internal/schema/arbitrary.js.map +1 -1
- package/dist/internal/schema/representation.js +21 -12
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +69 -0
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +73 -9
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +79 -30
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +69 -31
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.d.ts +0 -107
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +0 -107
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +33 -5
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +33 -5
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +9 -0
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +43 -11
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +45 -6
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +73 -33
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +104 -8
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +103 -7
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +8 -3
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +8 -3
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +51 -7
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +50 -6
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +299 -169
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +278 -147
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +108 -14
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +80 -10
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +35 -13
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +34 -12
- 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 +48 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +24 -3
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +23 -2
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +71 -13
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +35 -1
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +34 -12
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +33 -11
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +40 -27
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +34 -26
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +41 -25
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +41 -25
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +85 -24
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +84 -23
- 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 +1 -1
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +0 -560
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +0 -560
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/cli/Argument.js +1 -1
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +3 -3
- package/dist/unstable/cli/CliError.js +3 -3
- package/dist/unstable/cli/CliOutput.d.ts +1 -1
- package/dist/unstable/cli/Command.d.ts +136 -8
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +50 -4
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.d.ts +13 -0
- package/dist/unstable/cli/Completions.d.ts.map +1 -1
- package/dist/unstable/cli/Completions.js +41 -1
- package/dist/unstable/cli/Completions.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +24 -12
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +18 -6
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +39 -8
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +39 -8
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +128 -2
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +59 -7
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +3 -3
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +59 -10
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +37 -7
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +51 -9
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.d.ts +0 -220
- package/dist/unstable/cli/index.d.ts.map +1 -1
- package/dist/unstable/cli/index.js +0 -220
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +61 -22
- package/dist/unstable/cluster/ClusterError.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterError.js +61 -22
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.d.ts +58 -5
- package/dist/unstable/cluster/ClusterMetrics.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js +58 -5
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +87 -26
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +87 -26
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +49 -10
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.d.ts +6 -1
- package/dist/unstable/cluster/DeliverAt.d.ts.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js +6 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +33 -6
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +32 -5
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +19 -0
- package/dist/unstable/cluster/EntityAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js +19 -0
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.d.ts +44 -7
- package/dist/unstable/cluster/EntityId.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityId.js +44 -7
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +5 -6
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityResource.js +4 -5
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.d.ts +19 -0
- package/dist/unstable/cluster/EntityType.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityType.js +19 -0
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +11 -11
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +11 -11
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +42 -22
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +42 -22
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +33 -14
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.d.ts +35 -9
- package/dist/unstable/cluster/MachineId.d.ts.map +1 -1
- package/dist/unstable/cluster/MachineId.js +35 -9
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +11 -11
- package/dist/unstable/cluster/Message.js +11 -11
- package/dist/unstable/cluster/MessageStorage.d.ts +38 -24
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +37 -23
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +18 -8
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +18 -8
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +47 -14
- package/dist/unstable/cluster/Runner.d.ts.map +1 -1
- package/dist/unstable/cluster/Runner.js +47 -14
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +52 -10
- package/dist/unstable/cluster/RunnerAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js +52 -10
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +33 -16
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +33 -16
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +19 -4
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +19 -4
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +25 -1
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +24 -0
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +24 -2
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +24 -2
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +27 -3
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +63 -20
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +60 -16
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +61 -17
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts +27 -14
- package/dist/unstable/cluster/ShardingRegistrationEvent.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js +28 -15
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.d.ts +26 -1
- package/dist/unstable/cluster/SingleRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js +26 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.d.ts +51 -9
- package/dist/unstable/cluster/Singleton.d.ts.map +1 -1
- package/dist/unstable/cluster/Singleton.js +51 -9
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +27 -13
- package/dist/unstable/cluster/SingletonAddress.d.ts.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +27 -13
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +19 -5
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +19 -5
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +27 -1
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +27 -1
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.d.ts +38 -0
- package/dist/unstable/cluster/SqlMessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +73 -13
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts +20 -0
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +20 -0
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.d.ts +25 -14
- package/dist/unstable/cluster/TestRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/TestRunner.js +25 -14
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/index.d.ts +0 -790
- package/dist/unstable/cluster/index.d.ts.map +1 -1
- package/dist/unstable/cluster/index.js +0 -790
- package/dist/unstable/cluster/index.js.map +1 -1
- package/dist/unstable/devtools/DevTools.d.ts +41 -11
- package/dist/unstable/devtools/DevTools.d.ts.map +1 -1
- package/dist/unstable/devtools/DevTools.js +41 -11
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +38 -0
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +68 -11
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js +24 -16
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.d.ts +20 -13
- package/dist/unstable/devtools/DevToolsServer.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js +20 -13
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/devtools/index.d.ts +0 -58
- package/dist/unstable/devtools/index.d.ts.map +1 -1
- package/dist/unstable/devtools/index.js +0 -58
- package/dist/unstable/devtools/index.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts +2 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +30 -14
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +28 -14
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +28 -14
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +38 -17
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +3 -3
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/index.d.ts +0 -49
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +0 -49
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +28 -13
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +23 -15
- package/dist/unstable/eventlog/EventGroup.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventGroup.js +22 -14
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +7 -7
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +36 -19
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +63 -25
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +61 -23
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +8 -3
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +8 -3
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +49 -40
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +28 -28
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +14 -4
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +14 -4
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +7 -2
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +7 -2
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +24 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +24 -2
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +82 -7
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +119 -22
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +33 -7
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +68 -24
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts +21 -0
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +50 -14
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts +39 -15
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js +39 -15
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +30 -11
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/index.d.ts +0 -240
- package/dist/unstable/eventlog/index.d.ts.map +1 -1
- package/dist/unstable/eventlog/index.js +0 -240
- package/dist/unstable/eventlog/index.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +99 -52
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +77 -30
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +43 -13
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +43 -13
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +59 -17
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +59 -17
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +60 -22
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +58 -20
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +6 -2
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +59 -15
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +66 -30
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +17 -7
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +15 -14
- package/dist/unstable/http/HttpClientError.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientError.js +39 -22
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +37 -16
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +37 -16
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +35 -16
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +33 -14
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +3 -3
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +3 -3
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +46 -20
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +46 -20
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +19 -14
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +54 -26
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +34 -21
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +34 -21
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +41 -28
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +39 -26
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +53 -21
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +20 -5
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +28 -14
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +64 -42
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +48 -26
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +30 -13
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +29 -12
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.d.ts +32 -19
- package/dist/unstable/http/HttpTraceContext.d.ts.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js +32 -19
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +39 -19
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +39 -19
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.d.ts +27 -14
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +25 -12
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +41 -28
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +32 -17
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +43 -28
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +40 -25
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.d.ts +0 -452
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +0 -452
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +50 -26
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +3 -3
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +3 -3
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +39 -25
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +28 -16
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +51 -23
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +37 -17
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +34 -23
- 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 +49 -25
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +49 -25
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +4 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js +28 -16
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +43 -43
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +42 -42
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +54 -24
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +54 -24
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js +28 -16
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +7 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +45 -27
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/httpapi/index.d.ts +0 -311
- package/dist/unstable/httpapi/index.d.ts.map +1 -1
- package/dist/unstable/httpapi/index.js +0 -311
- package/dist/unstable/httpapi/index.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +31 -16
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +31 -15
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +33 -15
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +27 -16
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +27 -16
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +3 -3
- package/dist/unstable/observability/PrometheusMetrics.js +3 -3
- package/dist/unstable/observability/index.d.ts +0 -183
- package/dist/unstable/observability/index.d.ts.map +1 -1
- package/dist/unstable/observability/index.js +0 -183
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +12 -4
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +10 -2
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +8 -3
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistable.js +8 -3
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +29 -16
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +27 -14
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +10 -5
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +9 -4
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +20 -10
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +19 -9
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +33 -15
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/persistence/index.d.ts +0 -147
- package/dist/unstable/persistence/index.d.ts.map +1 -1
- package/dist/unstable/persistence/index.js +0 -147
- package/dist/unstable/persistence/index.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +14 -14
- package/dist/unstable/process/ChildProcess.js +7 -7
- package/dist/unstable/process/ChildProcessSpawner.d.ts +17 -5
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +17 -5
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.d.ts +0 -45
- package/dist/unstable/process/index.d.ts.map +1 -1
- package/dist/unstable/process/index.js +0 -45
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +74 -22
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +52 -20
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +81 -35
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +70 -32
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.d.ts +32 -16
- package/dist/unstable/reactivity/AtomRef.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js +52 -25
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +81 -20
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +81 -20
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +6 -1
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +37 -17
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +44 -21
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +44 -21
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/reactivity/index.d.ts +0 -166
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +0 -166
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +47 -32
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +15 -11
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +27 -12
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +27 -12
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +31 -17
- package/dist/unstable/rpc/RpcClientError.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +31 -17
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +29 -18
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +37 -19
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +4 -4
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +31 -21
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +31 -21
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +30 -20
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +30 -20
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +50 -33
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +48 -31
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +22 -17
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +22 -17
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.d.ts +31 -15
- package/dist/unstable/rpc/RpcTest.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcTest.js +31 -15
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +29 -14
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/index.d.ts +0 -272
- package/dist/unstable/rpc/index.d.ts.map +1 -1
- package/dist/unstable/rpc/index.js +0 -272
- package/dist/unstable/rpc/index.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +32 -33
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +25 -26
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +1 -1
- package/dist/unstable/schema/VariantSchema.js +1 -1
- package/dist/unstable/schema/index.d.ts +0 -37
- package/dist/unstable/schema/index.d.ts.map +1 -1
- package/dist/unstable/schema/index.js +0 -37
- package/dist/unstable/schema/index.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +8 -2
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +8 -2
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +2 -2
- package/dist/unstable/socket/SocketServer.js +1 -1
- package/dist/unstable/socket/index.d.ts +0 -44
- package/dist/unstable/socket/index.d.ts.map +1 -1
- package/dist/unstable/socket/index.js +0 -44
- package/dist/unstable/socket/index.js.map +1 -1
- package/dist/unstable/sql/Migrator.d.ts.map +1 -1
- package/dist/unstable/sql/Migrator.js +39 -18
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +7 -2
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -2
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +1 -1
- package/dist/unstable/sql/SqlConnection.js +1 -1
- package/dist/unstable/sql/SqlError.d.ts +2 -2
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +33 -17
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +3 -3
- package/dist/unstable/sql/SqlResolver.js +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +51 -21
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +51 -21
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +1 -1
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +34 -14
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.d.ts +0 -178
- package/dist/unstable/sql/index.d.ts.map +1 -1
- package/dist/unstable/sql/index.js +0 -178
- package/dist/unstable/sql/index.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +32 -21
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +32 -21
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +37 -24
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +35 -22
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +1 -1
- package/dist/unstable/workers/WorkerError.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerError.js +32 -16
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +31 -20
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +31 -20
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.d.ts +0 -80
- package/dist/unstable/workers/index.d.ts.map +1 -1
- package/dist/unstable/workers/index.js +0 -80
- package/dist/unstable/workers/index.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +2 -2
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +25 -13
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +12 -12
- package/dist/unstable/workflow/DurableDeferred.js +7 -7
- package/dist/unstable/workflow/DurableQueue.d.ts +36 -18
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +36 -18
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +22 -23
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +17 -18
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +26 -8
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +25 -7
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/index.d.ts +0 -160
- package/dist/unstable/workflow/index.d.ts.map +1 -1
- package/dist/unstable/workflow/index.js +0 -160
- package/dist/unstable/workflow/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Array.ts +1557 -312
- package/src/BigDecimal.ts +646 -52
- package/src/BigInt.ts +474 -18
- package/src/Boolean.ts +239 -19
- package/src/Brand.ts +102 -11
- package/src/Cache.ts +96 -24
- package/src/Cause.ts +488 -200
- package/src/Channel.ts +647 -191
- package/src/ChannelSchema.ts +99 -6
- package/src/Chunk.ts +187 -54
- package/src/Clock.ts +60 -3
- package/src/Combiner.ts +21 -21
- package/src/Config.ts +135 -50
- package/src/ConfigProvider.ts +52 -29
- package/src/Console.ts +32 -7
- package/src/Context.ts +516 -50
- package/src/Cron.ts +116 -6
- package/src/Crypto.ts +30 -1
- package/src/Data.ts +92 -47
- package/src/DateTime.ts +313 -128
- package/src/Deferred.ts +345 -79
- package/src/Differ.ts +5 -0
- package/src/Duration.ts +203 -50
- package/src/Effect.ts +2044 -816
- package/src/Effectable.ts +16 -2
- package/src/Encoding.ts +146 -9
- package/src/Equal.ts +10 -11
- package/src/Equivalence.ts +49 -46
- package/src/ErrorReporter.ts +135 -16
- package/src/ExecutionPlan.ts +96 -26
- package/src/Exit.ts +149 -101
- package/src/Fiber.ts +321 -72
- package/src/FiberHandle.ts +6 -6
- package/src/FiberMap.ts +20 -20
- package/src/FiberSet.ts +21 -13
- package/src/FileSystem.ts +119 -39
- package/src/Filter.ts +221 -2
- package/src/Formatter.ts +4 -6
- package/src/Function.ts +164 -18
- package/src/Graph.ts +297 -25
- package/src/HKT.ts +59 -26
- package/src/Hash.ts +143 -23
- package/src/HashMap.ts +35 -37
- package/src/HashRing.ts +210 -9
- package/src/HashSet.ts +16 -16
- package/src/Inspectable.ts +86 -17
- package/src/Iterable.ts +261 -81
- package/src/JsonPatch.ts +79 -56
- package/src/JsonPointer.ts +5 -5
- package/src/JsonSchema.ts +77 -33
- package/src/Latch.ts +164 -13
- package/src/Layer.ts +297 -101
- package/src/LayerMap.ts +9 -2
- package/src/LogLevel.ts +96 -21
- package/src/Logger.ts +31 -15
- package/src/ManagedRuntime.ts +82 -10
- package/src/Match.ts +250 -59
- package/src/Metric.ts +68 -41
- package/src/MutableHashMap.ts +381 -52
- package/src/MutableHashSet.ts +145 -41
- package/src/MutableList.ts +24 -6
- package/src/MutableRef.ts +141 -4
- package/src/Newtype.ts +20 -11
- package/src/NonEmptyIterable.ts +22 -6
- package/src/Number.ts +434 -17
- package/src/Optic.ts +26 -33
- package/src/Option.ts +186 -150
- package/src/Order.ts +163 -161
- package/src/Ordering.ts +37 -5
- package/src/PartitionedSemaphore.ts +238 -15
- package/src/Path.ts +34 -6
- package/src/Pipeable.ts +29 -4
- package/src/PlatformError.ts +53 -4
- package/src/Pool.ts +174 -32
- package/src/Predicate.ts +151 -196
- package/src/PrimaryKey.ts +75 -9
- package/src/PubSub.ts +241 -66
- package/src/Pull.ts +148 -3
- package/src/Queue.ts +167 -59
- package/src/Random.ts +71 -16
- package/src/RcMap.ts +171 -9
- package/src/RcRef.ts +73 -18
- package/src/Record.ts +174 -53
- package/src/Redactable.ts +27 -23
- package/src/Redacted.ts +82 -4
- package/src/Reducer.ts +17 -7
- package/src/Ref.ts +332 -54
- package/src/References.ts +226 -30
- package/src/RegExp.ts +49 -3
- package/src/Request.ts +218 -35
- package/src/RequestResolver.ts +268 -36
- package/src/Resource.ts +62 -3
- package/src/Result.ts +380 -57
- package/src/Runtime.ts +172 -32
- package/src/Schedule.ts +510 -145
- package/src/Scheduler.ts +53 -4
- package/src/Schema.ts +975 -264
- package/src/SchemaAST.ts +239 -28
- package/src/SchemaGetter.ts +127 -129
- package/src/SchemaIssue.ts +45 -56
- package/src/SchemaParser.ts +295 -33
- package/src/SchemaRepresentation.ts +106 -77
- package/src/SchemaTransformation.ts +92 -56
- package/src/SchemaUtils.ts +38 -11
- package/src/Scope.ts +127 -25
- package/src/ScopedCache.ts +418 -21
- package/src/ScopedRef.ts +69 -7
- package/src/Semaphore.ts +348 -29
- package/src/Sink.ts +343 -45
- package/src/Stdio.ts +72 -17
- package/src/Stream.ts +880 -242
- package/src/String.ts +221 -49
- package/src/Struct.ts +54 -110
- package/src/SubscriptionRef.ts +341 -105
- package/src/Symbol.ts +25 -7
- package/src/SynchronizedRef.ts +529 -29
- package/src/Take.ts +36 -13
- package/src/Terminal.ts +76 -20
- package/src/Tracer.ts +74 -7
- package/src/Trie.ts +67 -30
- package/src/Tuple.ts +96 -108
- package/src/TxChunk.ts +42 -9
- package/src/TxDeferred.ts +85 -2
- package/src/TxHashMap.ts +22 -22
- package/src/TxHashSet.ts +22 -22
- package/src/TxPriorityQueue.ts +43 -8
- package/src/TxPubSub.ts +98 -8
- package/src/TxQueue.ts +58 -17
- package/src/TxReentrantLock.ts +88 -16
- package/src/TxRef.ts +113 -8
- package/src/TxSemaphore.ts +173 -14
- package/src/TxSubscriptionRef.ts +206 -3
- package/src/Types.ts +68 -13
- package/src/UndefinedOr.ts +171 -30
- package/src/Unify.ts +130 -22
- package/src/Utils.ts +21 -16
- package/src/index.ts +0 -5205
- package/src/internal/effect.ts +59 -29
- package/src/internal/request.ts +3 -1
- package/src/internal/schema/arbitrary.ts +14 -1
- package/src/internal/schema/representation.ts +37 -14
- package/src/testing/TestConsole.ts +105 -9
- package/src/testing/TestSchema.ts +81 -31
- package/src/testing/index.ts +0 -107
- package/src/unstable/ai/AiError.ts +33 -5
- package/src/unstable/ai/AnthropicStructuredOutput.ts +43 -11
- package/src/unstable/ai/Chat.ts +82 -33
- package/src/unstable/ai/EmbeddingModel.ts +104 -8
- package/src/unstable/ai/IdGenerator.ts +8 -3
- package/src/unstable/ai/LanguageModel.ts +51 -7
- package/src/unstable/ai/McpSchema.ts +299 -169
- package/src/unstable/ai/McpServer.ts +108 -14
- package/src/unstable/ai/Model.ts +35 -13
- package/src/unstable/ai/OpenAiStructuredOutput.ts +48 -1
- package/src/unstable/ai/Prompt.ts +24 -3
- package/src/unstable/ai/Response.ts +71 -13
- package/src/unstable/ai/ResponseIdTracker.ts +34 -12
- package/src/unstable/ai/Telemetry.ts +40 -27
- package/src/unstable/ai/Tokenizer.ts +41 -25
- package/src/unstable/ai/Tool.ts +85 -24
- package/src/unstable/ai/Toolkit.ts +32 -4
- package/src/unstable/ai/index.ts +0 -560
- package/src/unstable/cli/Argument.ts +1 -1
- package/src/unstable/cli/CliError.ts +3 -3
- package/src/unstable/cli/CliOutput.ts +1 -1
- package/src/unstable/cli/Command.ts +136 -8
- package/src/unstable/cli/Completions.ts +41 -1
- package/src/unstable/cli/Flag.ts +24 -12
- package/src/unstable/cli/GlobalFlag.ts +39 -8
- package/src/unstable/cli/Param.ts +137 -11
- package/src/unstable/cli/Primitive.ts +59 -10
- package/src/unstable/cli/Prompt.ts +63 -14
- package/src/unstable/cli/index.ts +0 -220
- package/src/unstable/cli/internal/parser.ts +1 -1
- package/src/unstable/cluster/ClusterCron.ts +1 -1
- package/src/unstable/cluster/ClusterError.ts +61 -22
- package/src/unstable/cluster/ClusterMetrics.ts +58 -5
- package/src/unstable/cluster/ClusterSchema.ts +87 -26
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +63 -11
- package/src/unstable/cluster/DeliverAt.ts +6 -1
- package/src/unstable/cluster/Entity.ts +33 -6
- package/src/unstable/cluster/EntityAddress.ts +19 -0
- package/src/unstable/cluster/EntityId.ts +44 -7
- package/src/unstable/cluster/EntityResource.ts +5 -6
- package/src/unstable/cluster/EntityType.ts +19 -0
- package/src/unstable/cluster/Envelope.ts +11 -11
- package/src/unstable/cluster/HttpRunner.ts +42 -22
- package/src/unstable/cluster/K8sHttpClient.ts +32 -13
- package/src/unstable/cluster/MachineId.ts +35 -9
- package/src/unstable/cluster/Message.ts +11 -11
- package/src/unstable/cluster/MessageStorage.ts +38 -24
- package/src/unstable/cluster/Reply.ts +18 -8
- package/src/unstable/cluster/Runner.ts +47 -14
- package/src/unstable/cluster/RunnerAddress.ts +52 -10
- package/src/unstable/cluster/RunnerHealth.ts +33 -16
- package/src/unstable/cluster/RunnerServer.ts +19 -4
- package/src/unstable/cluster/Runners.ts +25 -1
- package/src/unstable/cluster/ShardId.ts +24 -2
- package/src/unstable/cluster/Sharding.ts +63 -20
- package/src/unstable/cluster/ShardingConfig.ts +60 -16
- package/src/unstable/cluster/ShardingRegistrationEvent.ts +27 -14
- package/src/unstable/cluster/SingleRunner.ts +26 -1
- package/src/unstable/cluster/Singleton.ts +51 -9
- package/src/unstable/cluster/SingletonAddress.ts +27 -13
- package/src/unstable/cluster/Snowflake.ts +19 -5
- package/src/unstable/cluster/SocketRunner.ts +27 -1
- package/src/unstable/cluster/SqlMessageStorage.ts +73 -13
- package/src/unstable/cluster/SqlRunnerStorage.ts +20 -0
- package/src/unstable/cluster/TestRunner.ts +25 -14
- package/src/unstable/cluster/index.ts +0 -790
- package/src/unstable/devtools/DevTools.ts +41 -11
- package/src/unstable/devtools/DevToolsClient.ts +68 -11
- package/src/unstable/devtools/DevToolsSchema.ts +24 -16
- package/src/unstable/devtools/DevToolsServer.ts +18 -11
- package/src/unstable/devtools/index.ts +0 -58
- package/src/unstable/encoding/Msgpack.ts +30 -14
- package/src/unstable/encoding/Ndjson.ts +28 -14
- package/src/unstable/encoding/Sse.ts +38 -17
- package/src/unstable/encoding/index.ts +0 -49
- package/src/unstable/eventlog/Event.ts +30 -15
- package/src/unstable/eventlog/EventGroup.ts +23 -15
- package/src/unstable/eventlog/EventJournal.ts +38 -21
- package/src/unstable/eventlog/EventLog.ts +63 -25
- package/src/unstable/eventlog/EventLogEncryption.ts +8 -3
- package/src/unstable/eventlog/EventLogMessage.ts +49 -40
- package/src/unstable/eventlog/EventLogRemote.ts +14 -4
- package/src/unstable/eventlog/EventLogServer.ts +36 -17
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +24 -2
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +119 -22
- package/src/unstable/eventlog/EventLogSessionAuth.ts +68 -24
- package/src/unstable/eventlog/SqlEventJournal.ts +50 -14
- package/src/unstable/eventlog/SqlEventLogServerEncrypted.ts +39 -15
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +30 -11
- package/src/unstable/eventlog/index.ts +0 -240
- package/src/unstable/http/Cookies.ts +97 -50
- package/src/unstable/http/Etag.ts +43 -13
- package/src/unstable/http/FetchHttpClient.ts +59 -17
- package/src/unstable/http/Headers.ts +62 -24
- package/src/unstable/http/HttpBody.ts +59 -15
- package/src/unstable/http/HttpClient.ts +119 -33
- package/src/unstable/http/HttpClientError.ts +41 -24
- package/src/unstable/http/HttpClientRequest.ts +37 -16
- package/src/unstable/http/HttpClientResponse.ts +33 -14
- package/src/unstable/http/HttpEffect.ts +35 -18
- package/src/unstable/http/HttpMethod.ts +46 -20
- package/src/unstable/http/HttpRouter.ts +58 -30
- package/src/unstable/http/HttpServer.ts +34 -21
- package/src/unstable/http/HttpServerError.ts +41 -28
- package/src/unstable/http/HttpServerRequest.ts +51 -19
- package/src/unstable/http/HttpServerRespondable.ts +28 -14
- package/src/unstable/http/HttpServerResponse.ts +66 -44
- package/src/unstable/http/HttpStaticServer.ts +29 -12
- package/src/unstable/http/HttpTraceContext.ts +32 -19
- package/src/unstable/http/Multipart.ts +39 -19
- package/src/unstable/http/Template.ts +25 -12
- package/src/unstable/http/Url.ts +41 -28
- package/src/unstable/http/UrlParams.ts +43 -28
- package/src/unstable/http/index.ts +0 -452
- package/src/unstable/httpapi/HttpApi.ts +48 -24
- package/src/unstable/httpapi/HttpApiBuilder.ts +40 -26
- package/src/unstable/httpapi/HttpApiClient.ts +28 -16
- package/src/unstable/httpapi/HttpApiEndpoint.ts +51 -23
- package/src/unstable/httpapi/HttpApiError.ts +38 -18
- package/src/unstable/httpapi/HttpApiGroup.ts +34 -23
- package/src/unstable/httpapi/HttpApiMiddleware.ts +49 -25
- package/src/unstable/httpapi/HttpApiScalar.ts +32 -17
- package/src/unstable/httpapi/HttpApiSchema.ts +43 -43
- package/src/unstable/httpapi/HttpApiSecurity.ts +54 -24
- package/src/unstable/httpapi/HttpApiSwagger.ts +28 -16
- package/src/unstable/httpapi/HttpApiTest.ts +1 -1
- package/src/unstable/httpapi/OpenApi.ts +43 -25
- package/src/unstable/httpapi/index.ts +0 -311
- package/src/unstable/observability/Otlp.ts +31 -16
- package/src/unstable/observability/OtlpLogger.ts +31 -15
- package/src/unstable/observability/OtlpResource.ts +33 -15
- package/src/unstable/observability/OtlpSerialization.ts +25 -14
- package/src/unstable/observability/PrometheusMetrics.ts +3 -3
- package/src/unstable/observability/index.ts +0 -183
- package/src/unstable/persistence/KeyValueStore.ts +12 -4
- package/src/unstable/persistence/Persistable.ts +8 -3
- package/src/unstable/persistence/PersistedCache.ts +27 -14
- package/src/unstable/persistence/PersistedQueue.ts +10 -5
- package/src/unstable/persistence/RateLimiter.ts +20 -10
- package/src/unstable/persistence/Redis.ts +33 -15
- package/src/unstable/persistence/index.ts +0 -147
- package/src/unstable/process/ChildProcess.ts +14 -14
- package/src/unstable/process/ChildProcessSpawner.ts +17 -5
- package/src/unstable/process/index.ts +0 -45
- package/src/unstable/reactivity/AsyncResult.ts +96 -24
- package/src/unstable/reactivity/Atom.ts +89 -35
- package/src/unstable/reactivity/AtomRef.ts +58 -25
- package/src/unstable/reactivity/AtomRegistry.ts +79 -18
- package/src/unstable/reactivity/Hydration.ts +37 -17
- package/src/unstable/reactivity/Reactivity.ts +42 -19
- package/src/unstable/reactivity/index.ts +0 -166
- package/src/unstable/rpc/Rpc.ts +47 -32
- package/src/unstable/rpc/RpcClient.ts +58 -34
- package/src/unstable/rpc/RpcClientError.ts +29 -15
- package/src/unstable/rpc/RpcGroup.ts +28 -17
- package/src/unstable/rpc/RpcMessage.ts +37 -19
- package/src/unstable/rpc/RpcMiddleware.ts +31 -21
- package/src/unstable/rpc/RpcSchema.ts +30 -20
- package/src/unstable/rpc/RpcSerialization.ts +48 -31
- package/src/unstable/rpc/RpcServer.ts +53 -40
- package/src/unstable/rpc/RpcTest.ts +29 -13
- package/src/unstable/rpc/RpcWorker.ts +29 -14
- package/src/unstable/rpc/index.ts +0 -272
- package/src/unstable/schema/Model.ts +32 -33
- package/src/unstable/schema/VariantSchema.ts +1 -1
- package/src/unstable/schema/index.ts +0 -37
- package/src/unstable/socket/Socket.ts +8 -2
- package/src/unstable/socket/SocketServer.ts +2 -2
- package/src/unstable/socket/index.ts +0 -44
- package/src/unstable/sql/Migrator.ts +39 -18
- package/src/unstable/sql/SqlClient.ts +7 -2
- package/src/unstable/sql/SqlConnection.ts +1 -1
- package/src/unstable/sql/SqlError.ts +33 -17
- package/src/unstable/sql/SqlResolver.ts +3 -3
- package/src/unstable/sql/SqlSchema.ts +51 -21
- package/src/unstable/sql/Statement.ts +35 -15
- package/src/unstable/sql/index.ts +0 -178
- package/src/unstable/workers/Transferable.ts +32 -21
- package/src/unstable/workers/Worker.ts +35 -22
- package/src/unstable/workers/WorkerError.ts +35 -19
- package/src/unstable/workers/WorkerRunner.ts +29 -18
- package/src/unstable/workers/index.ts +0 -80
- package/src/unstable/workflow/DurableClock.ts +25 -13
- package/src/unstable/workflow/DurableDeferred.ts +12 -12
- package/src/unstable/workflow/DurableQueue.ts +34 -16
- package/src/unstable/workflow/Workflow.ts +22 -23
- package/src/unstable/workflow/WorkflowEngine.ts +26 -8
- package/src/unstable/workflow/index.ts +0 -160
package/src/Context.ts
CHANGED
|
@@ -1,12 +1,51 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
2
|
+
* The `Context` module implements Effect's typed service environment. A
|
|
3
|
+
* `Context<Services>` is an immutable collection of service implementations,
|
|
4
|
+
* keyed by `Context.Service` or `Context.Reference` values. The type parameter
|
|
5
|
+
* records which service identifiers are present so effects can require
|
|
6
|
+
* dependencies without passing every implementation as an argument.
|
|
7
|
+
*
|
|
8
|
+
* **Mental model**
|
|
9
|
+
*
|
|
10
|
+
* - A service key is both a runtime identifier and a typed handle for one
|
|
11
|
+
* dependency
|
|
12
|
+
* - `Context.Service` creates keys for dependencies that must be provided by
|
|
13
|
+
* the surrounding context
|
|
14
|
+
* - `Context.Reference` creates keys that have a cached default value when no
|
|
15
|
+
* explicit implementation is stored
|
|
16
|
+
* - A `Context` value stores implementations, while Effect fibers carry the
|
|
17
|
+
* active context used to satisfy service requirements
|
|
18
|
+
* - Context operations such as {@link add}, {@link merge}, {@link pick}, and
|
|
19
|
+
* {@link omit} return new contexts instead of mutating the original one
|
|
20
|
+
*
|
|
21
|
+
* **Common tasks**
|
|
22
|
+
*
|
|
23
|
+
* - Create service keys: {@link Service}, {@link Reference}
|
|
24
|
+
* - Build contexts: {@link empty}, {@link make}, {@link add}, {@link merge}
|
|
25
|
+
* - Read services: {@link get}, {@link getOption}, {@link getOrElse}
|
|
26
|
+
* - Keep or remove selected services: {@link pick}, {@link omit}
|
|
27
|
+
*
|
|
28
|
+
* **Example** (Building and reading a context)
|
|
29
|
+
*
|
|
30
|
+
* ```ts
|
|
31
|
+
* import { Context } from "effect"
|
|
32
|
+
*
|
|
33
|
+
* const Logger = Context.Service<{ log: (message: string) => void }>("Logger")
|
|
34
|
+
*
|
|
35
|
+
* const context = Context.make(Logger, {
|
|
36
|
+
* log: (message) => console.log(message)
|
|
37
|
+
* })
|
|
38
|
+
*
|
|
39
|
+
* const logger = Context.get(context, Logger)
|
|
40
|
+
* logger.log("started")
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* **Gotchas**
|
|
44
|
+
*
|
|
45
|
+
* - The service key string is the runtime identity; reusing the same string for
|
|
46
|
+
* unrelated services makes them occupy the same slot
|
|
47
|
+
* - `Context.Reference` defaults are used only when no explicit value is stored
|
|
48
|
+
* for that key
|
|
10
49
|
*
|
|
11
50
|
* @since 4.0.0
|
|
12
51
|
*/
|
|
@@ -27,7 +66,7 @@ import type * as Types from "./Types.ts"
|
|
|
27
66
|
* String literal type used as the runtime type identifier for `Context`
|
|
28
67
|
* service keys.
|
|
29
68
|
*
|
|
30
|
-
* @category
|
|
69
|
+
* @category type IDs
|
|
31
70
|
* @since 4.0.0
|
|
32
71
|
*/
|
|
33
72
|
export type ServiceTypeId = "~effect/Context/Service"
|
|
@@ -36,7 +75,7 @@ export type ServiceTypeId = "~effect/Context/Service"
|
|
|
36
75
|
* Runtime type identifier attached to `Context` service keys and used by
|
|
37
76
|
* `isKey` to recognize them.
|
|
38
77
|
*
|
|
39
|
-
* @category
|
|
78
|
+
* @category type IDs
|
|
40
79
|
* @since 4.0.0
|
|
41
80
|
*/
|
|
42
81
|
export const ServiceTypeId: ServiceTypeId = "~effect/Context/Service"
|
|
@@ -44,6 +83,11 @@ export const ServiceTypeId: ServiceTypeId = "~effect/Context/Service"
|
|
|
44
83
|
/**
|
|
45
84
|
* Typed identifier for a service stored in a `Context`.
|
|
46
85
|
*
|
|
86
|
+
* **When to use**
|
|
87
|
+
*
|
|
88
|
+
* Use as the typed handle for storing, retrieving, and requiring a specific
|
|
89
|
+
* service in a `Context`.
|
|
90
|
+
*
|
|
47
91
|
* **Details**
|
|
48
92
|
*
|
|
49
93
|
* `Identifier` tracks the requirement in Effect types, while `Shape` is the
|
|
@@ -51,6 +95,9 @@ export const ServiceTypeId: ServiceTypeId = "~effect/Context/Service"
|
|
|
51
95
|
* so yielding it inside `Effect.gen` retrieves the service from the current
|
|
52
96
|
* fiber context.
|
|
53
97
|
*
|
|
98
|
+
* @see {@link Service} for creating required service keys
|
|
99
|
+
* @see {@link Reference} for creating service keys with default values
|
|
100
|
+
*
|
|
54
101
|
* @category models
|
|
55
102
|
* @since 4.0.0
|
|
56
103
|
*/
|
|
@@ -98,10 +145,17 @@ export interface Service<in out Identifier, in out Shape> extends Key<Identifier
|
|
|
98
145
|
/**
|
|
99
146
|
* Class-style service key produced by `Context.Service<Self, Shape>()("Id")`.
|
|
100
147
|
*
|
|
148
|
+
* **When to use**
|
|
149
|
+
*
|
|
150
|
+
* Use when declaring a service as a class so the class value can serve as the
|
|
151
|
+
* `Context` key.
|
|
152
|
+
*
|
|
101
153
|
* **Details**
|
|
102
154
|
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
155
|
+
* The class itself is the `Context` key, and its string `key` identifies the
|
|
156
|
+
* service at runtime.
|
|
157
|
+
*
|
|
158
|
+
* @see {@link Service} for creating function-style keys or class-style service keys
|
|
105
159
|
*
|
|
106
160
|
* @category models
|
|
107
161
|
* @since 4.0.0
|
|
@@ -137,6 +191,11 @@ export declare namespace ServiceClass {
|
|
|
137
191
|
/**
|
|
138
192
|
* Creates a `Context` service key.
|
|
139
193
|
*
|
|
194
|
+
* **When to use**
|
|
195
|
+
*
|
|
196
|
+
* Use when a dependency must be provided by the surrounding context. Use
|
|
197
|
+
* `Reference` when a dependency should have a default value.
|
|
198
|
+
*
|
|
140
199
|
* **Details**
|
|
141
200
|
*
|
|
142
201
|
* Call `Context.Service("Key")` for a function-style key, or use the two-stage
|
|
@@ -144,6 +203,12 @@ export declare namespace ServiceClass {
|
|
|
144
203
|
* declarations. The returned key can be yielded as an Effect and passed to
|
|
145
204
|
* `Context.make`, `Context.add`, and the Context getter functions.
|
|
146
205
|
*
|
|
206
|
+
* **Gotchas**
|
|
207
|
+
*
|
|
208
|
+
* The string key is the runtime identity of the service. Reusing the same key
|
|
209
|
+
* string for unrelated services makes them occupy the same slot in a
|
|
210
|
+
* `Context`.
|
|
211
|
+
*
|
|
147
212
|
* **Example** (Creating service keys)
|
|
148
213
|
*
|
|
149
214
|
* ```ts
|
|
@@ -166,6 +231,8 @@ export declare namespace ServiceClass {
|
|
|
166
231
|
* const config = Context.make(Config, { port: 8080 })
|
|
167
232
|
* ```
|
|
168
233
|
*
|
|
234
|
+
* @see {@link Reference} for service keys with default values
|
|
235
|
+
*
|
|
169
236
|
* @category constructors
|
|
170
237
|
* @since 4.0.0
|
|
171
238
|
*/
|
|
@@ -173,6 +240,11 @@ export const Service: {
|
|
|
173
240
|
/**
|
|
174
241
|
* Creates a `Context` service key.
|
|
175
242
|
*
|
|
243
|
+
* **When to use**
|
|
244
|
+
*
|
|
245
|
+
* Use when a dependency must be provided by the surrounding context. Use
|
|
246
|
+
* `Reference` when a dependency should have a default value.
|
|
247
|
+
*
|
|
176
248
|
* **Details**
|
|
177
249
|
*
|
|
178
250
|
* Call `Context.Service("Key")` for a function-style key, or use the two-stage
|
|
@@ -180,6 +252,12 @@ export const Service: {
|
|
|
180
252
|
* declarations. The returned key can be yielded as an Effect and passed to
|
|
181
253
|
* `Context.make`, `Context.add`, and the Context getter functions.
|
|
182
254
|
*
|
|
255
|
+
* **Gotchas**
|
|
256
|
+
*
|
|
257
|
+
* The string key is the runtime identity of the service. Reusing the same key
|
|
258
|
+
* string for unrelated services makes them occupy the same slot in a
|
|
259
|
+
* `Context`.
|
|
260
|
+
*
|
|
183
261
|
* **Example** (Creating service keys)
|
|
184
262
|
*
|
|
185
263
|
* ```ts
|
|
@@ -202,6 +280,8 @@ export const Service: {
|
|
|
202
280
|
* const config = Context.make(Config, { port: 8080 })
|
|
203
281
|
* ```
|
|
204
282
|
*
|
|
283
|
+
* @see {@link Reference} for service keys with default values
|
|
284
|
+
*
|
|
205
285
|
* @category constructors
|
|
206
286
|
* @since 4.0.0
|
|
207
287
|
*/
|
|
@@ -209,6 +289,11 @@ export const Service: {
|
|
|
209
289
|
/**
|
|
210
290
|
* Creates a `Context` service key.
|
|
211
291
|
*
|
|
292
|
+
* **When to use**
|
|
293
|
+
*
|
|
294
|
+
* Use when a dependency must be provided by the surrounding context. Use
|
|
295
|
+
* `Reference` when a dependency should have a default value.
|
|
296
|
+
*
|
|
212
297
|
* **Details**
|
|
213
298
|
*
|
|
214
299
|
* Call `Context.Service("Key")` for a function-style key, or use the two-stage
|
|
@@ -216,6 +301,12 @@ export const Service: {
|
|
|
216
301
|
* declarations. The returned key can be yielded as an Effect and passed to
|
|
217
302
|
* `Context.make`, `Context.add`, and the Context getter functions.
|
|
218
303
|
*
|
|
304
|
+
* **Gotchas**
|
|
305
|
+
*
|
|
306
|
+
* The string key is the runtime identity of the service. Reusing the same key
|
|
307
|
+
* string for unrelated services makes them occupy the same slot in a
|
|
308
|
+
* `Context`.
|
|
309
|
+
*
|
|
219
310
|
* **Example** (Creating service keys)
|
|
220
311
|
*
|
|
221
312
|
* ```ts
|
|
@@ -238,6 +329,8 @@ export const Service: {
|
|
|
238
329
|
* const config = Context.make(Config, { port: 8080 })
|
|
239
330
|
* ```
|
|
240
331
|
*
|
|
332
|
+
* @see {@link Reference} for service keys with default values
|
|
333
|
+
*
|
|
241
334
|
* @category constructors
|
|
242
335
|
* @since 4.0.0
|
|
243
336
|
*/
|
|
@@ -258,6 +351,11 @@ export const Service: {
|
|
|
258
351
|
/**
|
|
259
352
|
* Creates a `Context` service key.
|
|
260
353
|
*
|
|
354
|
+
* **When to use**
|
|
355
|
+
*
|
|
356
|
+
* Use when a dependency must be provided by the surrounding context. Use
|
|
357
|
+
* `Reference` when a dependency should have a default value.
|
|
358
|
+
*
|
|
261
359
|
* **Details**
|
|
262
360
|
*
|
|
263
361
|
* Call `Context.Service("Key")` for a function-style key, or use the two-stage
|
|
@@ -265,6 +363,12 @@ export const Service: {
|
|
|
265
363
|
* declarations. The returned key can be yielded as an Effect and passed to
|
|
266
364
|
* `Context.make`, `Context.add`, and the Context getter functions.
|
|
267
365
|
*
|
|
366
|
+
* **Gotchas**
|
|
367
|
+
*
|
|
368
|
+
* The string key is the runtime identity of the service. Reusing the same key
|
|
369
|
+
* string for unrelated services makes them occupy the same slot in a
|
|
370
|
+
* `Context`.
|
|
371
|
+
*
|
|
268
372
|
* **Example** (Creating service keys)
|
|
269
373
|
*
|
|
270
374
|
* ```ts
|
|
@@ -287,6 +391,8 @@ export const Service: {
|
|
|
287
391
|
* const config = Context.make(Config, { port: 8080 })
|
|
288
392
|
* ```
|
|
289
393
|
*
|
|
394
|
+
* @see {@link Reference} for service keys with default values
|
|
395
|
+
*
|
|
290
396
|
* @category constructors
|
|
291
397
|
* @since 4.0.0
|
|
292
398
|
*/
|
|
@@ -604,7 +710,22 @@ const Proto: Omit<Context<never>, "mapUnsafe" | "mutable"> = {
|
|
|
604
710
|
}
|
|
605
711
|
|
|
606
712
|
/**
|
|
607
|
-
* Checks
|
|
713
|
+
* Checks whether the provided argument is a `Context`.
|
|
714
|
+
*
|
|
715
|
+
* **When to use**
|
|
716
|
+
*
|
|
717
|
+
* Use to narrow an unknown value before passing it to APIs that require a
|
|
718
|
+
* `Context`.
|
|
719
|
+
*
|
|
720
|
+
* **Details**
|
|
721
|
+
*
|
|
722
|
+
* This checks the runtime `Context` marker and does not inspect which services
|
|
723
|
+
* the context contains.
|
|
724
|
+
*
|
|
725
|
+
* **Gotchas**
|
|
726
|
+
*
|
|
727
|
+
* This guard only proves that the value is a `Context`; it does not prove that
|
|
728
|
+
* any specific service is present.
|
|
608
729
|
*
|
|
609
730
|
* **Example** (Checking for contexts)
|
|
610
731
|
*
|
|
@@ -615,13 +736,16 @@ const Proto: Omit<Context<never>, "mapUnsafe" | "mutable"> = {
|
|
|
615
736
|
* assert.strictEqual(Context.isContext(Context.empty()), true)
|
|
616
737
|
* ```
|
|
617
738
|
*
|
|
739
|
+
* @see {@link isKey} for checking service keys
|
|
740
|
+
* @see {@link isReference} for checking references with defaults
|
|
741
|
+
*
|
|
618
742
|
* @category guards
|
|
619
743
|
* @since 2.0.0
|
|
620
744
|
*/
|
|
621
745
|
export const isContext = (u: unknown): u is Context<never> => hasProperty(u, TypeId)
|
|
622
746
|
|
|
623
747
|
/**
|
|
624
|
-
* Checks
|
|
748
|
+
* Checks whether the provided argument is a `Key`.
|
|
625
749
|
*
|
|
626
750
|
* **Example** (Checking for keys)
|
|
627
751
|
*
|
|
@@ -638,7 +762,7 @@ export const isContext = (u: unknown): u is Context<never> => hasProperty(u, Typ
|
|
|
638
762
|
export const isKey = (u: unknown): u is Key<any, any> => hasProperty(u, ServiceTypeId)
|
|
639
763
|
|
|
640
764
|
/**
|
|
641
|
-
* Checks
|
|
765
|
+
* Checks whether the provided argument is a `Reference`.
|
|
642
766
|
*
|
|
643
767
|
* **Example** (Checking for references)
|
|
644
768
|
*
|
|
@@ -704,6 +828,16 @@ export const make = <I, S>(
|
|
|
704
828
|
/**
|
|
705
829
|
* Adds a service to a given `Context`.
|
|
706
830
|
*
|
|
831
|
+
* **When to use**
|
|
832
|
+
*
|
|
833
|
+
* Use when you always have a service value to store. Use `addOrOmit`
|
|
834
|
+
* when the value is optional and a missing value should remove the service.
|
|
835
|
+
*
|
|
836
|
+
* **Details**
|
|
837
|
+
*
|
|
838
|
+
* If the context already contains the same service key, the new service
|
|
839
|
+
* replaces the previous one.
|
|
840
|
+
*
|
|
707
841
|
* **Example** (Adding a service to a context)
|
|
708
842
|
*
|
|
709
843
|
* ```ts
|
|
@@ -724,13 +858,25 @@ export const make = <I, S>(
|
|
|
724
858
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
725
859
|
* ```
|
|
726
860
|
*
|
|
727
|
-
* @
|
|
861
|
+
* @see {@link addOrOmit} for adding or removing a service from an `Option`
|
|
862
|
+
*
|
|
863
|
+
* @category adders
|
|
728
864
|
* @since 2.0.0
|
|
729
865
|
*/
|
|
730
866
|
export const add: {
|
|
731
867
|
/**
|
|
732
868
|
* Adds a service to a given `Context`.
|
|
733
869
|
*
|
|
870
|
+
* **When to use**
|
|
871
|
+
*
|
|
872
|
+
* Use when you always have a service value to store. Use `addOrOmit`
|
|
873
|
+
* when the value is optional and a missing value should remove the service.
|
|
874
|
+
*
|
|
875
|
+
* **Details**
|
|
876
|
+
*
|
|
877
|
+
* If the context already contains the same service key, the new service
|
|
878
|
+
* replaces the previous one.
|
|
879
|
+
*
|
|
734
880
|
* **Example** (Adding a service to a context)
|
|
735
881
|
*
|
|
736
882
|
* ```ts
|
|
@@ -751,13 +897,25 @@ export const add: {
|
|
|
751
897
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
752
898
|
* ```
|
|
753
899
|
*
|
|
754
|
-
* @
|
|
900
|
+
* @see {@link addOrOmit} for adding or removing a service from an `Option`
|
|
901
|
+
*
|
|
902
|
+
* @category adders
|
|
755
903
|
* @since 2.0.0
|
|
756
904
|
*/
|
|
757
905
|
<I, S>(key: Key<I, S>, service: Types.NoInfer<S>): <Services>(self: Context<Services>) => Context<Services | I>
|
|
758
906
|
/**
|
|
759
907
|
* Adds a service to a given `Context`.
|
|
760
908
|
*
|
|
909
|
+
* **When to use**
|
|
910
|
+
*
|
|
911
|
+
* Use when you always have a service value to store. Use `addOrOmit`
|
|
912
|
+
* when the value is optional and a missing value should remove the service.
|
|
913
|
+
*
|
|
914
|
+
* **Details**
|
|
915
|
+
*
|
|
916
|
+
* If the context already contains the same service key, the new service
|
|
917
|
+
* replaces the previous one.
|
|
918
|
+
*
|
|
761
919
|
* **Example** (Adding a service to a context)
|
|
762
920
|
*
|
|
763
921
|
* ```ts
|
|
@@ -778,7 +936,9 @@ export const add: {
|
|
|
778
936
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
779
937
|
* ```
|
|
780
938
|
*
|
|
781
|
-
* @
|
|
939
|
+
* @see {@link addOrOmit} for adding or removing a service from an `Option`
|
|
940
|
+
*
|
|
941
|
+
* @category adders
|
|
782
942
|
* @since 2.0.0
|
|
783
943
|
*/
|
|
784
944
|
<Services, I, S>(self: Context<Services>, key: Key<I, S>, service: Types.NoInfer<S>): Context<Services | I>
|
|
@@ -794,36 +954,105 @@ export const add: {
|
|
|
794
954
|
/**
|
|
795
955
|
* Adds or removes a service depending on an `Option`.
|
|
796
956
|
*
|
|
957
|
+
* **When to use**
|
|
958
|
+
*
|
|
959
|
+
* Use when service presence is already represented as an `Option`.
|
|
960
|
+
* Use `add` when you always want to store a service value.
|
|
961
|
+
*
|
|
797
962
|
* **Details**
|
|
798
963
|
*
|
|
799
964
|
* When `service` is `Option.some`, the value is stored for the key. When it is
|
|
800
965
|
* `Option.none`, the key is removed from the returned `Context`.
|
|
801
966
|
*
|
|
802
|
-
*
|
|
967
|
+
* **Example** (Adding optional services)
|
|
968
|
+
*
|
|
969
|
+
* ```ts
|
|
970
|
+
* import { Context, Option } from "effect"
|
|
971
|
+
*
|
|
972
|
+
* const Port = Context.Service<{ PORT: number }>("Port")
|
|
973
|
+
*
|
|
974
|
+
* const withPort = Context.empty().pipe(
|
|
975
|
+
* Context.addOrOmit(Port, Option.some({ PORT: 8080 }))
|
|
976
|
+
* )
|
|
977
|
+
*
|
|
978
|
+
* const withoutPort = withPort.pipe(
|
|
979
|
+
* Context.addOrOmit(Port, Option.none())
|
|
980
|
+
* )
|
|
981
|
+
* ```
|
|
982
|
+
*
|
|
983
|
+
* @see {@link add} for always storing a service value
|
|
984
|
+
*
|
|
985
|
+
* @category adders
|
|
803
986
|
* @since 4.0.0
|
|
804
987
|
*/
|
|
805
988
|
export const addOrOmit: {
|
|
806
989
|
/**
|
|
807
990
|
* Adds or removes a service depending on an `Option`.
|
|
808
991
|
*
|
|
992
|
+
* **When to use**
|
|
993
|
+
*
|
|
994
|
+
* Use when service presence is already represented as an `Option`.
|
|
995
|
+
* Use `add` when you always want to store a service value.
|
|
996
|
+
*
|
|
809
997
|
* **Details**
|
|
810
998
|
*
|
|
811
999
|
* When `service` is `Option.some`, the value is stored for the key. When it is
|
|
812
1000
|
* `Option.none`, the key is removed from the returned `Context`.
|
|
813
1001
|
*
|
|
814
|
-
*
|
|
1002
|
+
* **Example** (Adding optional services)
|
|
1003
|
+
*
|
|
1004
|
+
* ```ts
|
|
1005
|
+
* import { Context, Option } from "effect"
|
|
1006
|
+
*
|
|
1007
|
+
* const Port = Context.Service<{ PORT: number }>("Port")
|
|
1008
|
+
*
|
|
1009
|
+
* const withPort = Context.empty().pipe(
|
|
1010
|
+
* Context.addOrOmit(Port, Option.some({ PORT: 8080 }))
|
|
1011
|
+
* )
|
|
1012
|
+
*
|
|
1013
|
+
* const withoutPort = withPort.pipe(
|
|
1014
|
+
* Context.addOrOmit(Port, Option.none())
|
|
1015
|
+
* )
|
|
1016
|
+
* ```
|
|
1017
|
+
*
|
|
1018
|
+
* @see {@link add} for always storing a service value
|
|
1019
|
+
*
|
|
1020
|
+
* @category adders
|
|
815
1021
|
* @since 4.0.0
|
|
816
1022
|
*/
|
|
817
1023
|
<I, S>(key: Key<I, S>, service: Option.Option<Types.NoInfer<S>>): <Services>(self: Context<Services>) => Context<Services | I>
|
|
818
1024
|
/**
|
|
819
1025
|
* Adds or removes a service depending on an `Option`.
|
|
820
1026
|
*
|
|
1027
|
+
* **When to use**
|
|
1028
|
+
*
|
|
1029
|
+
* Use when service presence is already represented as an `Option`.
|
|
1030
|
+
* Use `add` when you always want to store a service value.
|
|
1031
|
+
*
|
|
821
1032
|
* **Details**
|
|
822
1033
|
*
|
|
823
1034
|
* When `service` is `Option.some`, the value is stored for the key. When it is
|
|
824
1035
|
* `Option.none`, the key is removed from the returned `Context`.
|
|
825
1036
|
*
|
|
826
|
-
*
|
|
1037
|
+
* **Example** (Adding optional services)
|
|
1038
|
+
*
|
|
1039
|
+
* ```ts
|
|
1040
|
+
* import { Context, Option } from "effect"
|
|
1041
|
+
*
|
|
1042
|
+
* const Port = Context.Service<{ PORT: number }>("Port")
|
|
1043
|
+
*
|
|
1044
|
+
* const withPort = Context.empty().pipe(
|
|
1045
|
+
* Context.addOrOmit(Port, Option.some({ PORT: 8080 }))
|
|
1046
|
+
* )
|
|
1047
|
+
*
|
|
1048
|
+
* const withoutPort = withPort.pipe(
|
|
1049
|
+
* Context.addOrOmit(Port, Option.none())
|
|
1050
|
+
* )
|
|
1051
|
+
* ```
|
|
1052
|
+
*
|
|
1053
|
+
* @see {@link add} for always storing a service value
|
|
1054
|
+
*
|
|
1055
|
+
* @category adders
|
|
827
1056
|
* @since 4.0.0
|
|
828
1057
|
*/
|
|
829
1058
|
<Services, I, S>(
|
|
@@ -848,11 +1077,21 @@ export const addOrOmit: {
|
|
|
848
1077
|
* Gets the service for a key, or evaluates the fallback when a non-reference
|
|
849
1078
|
* key is absent.
|
|
850
1079
|
*
|
|
1080
|
+
* **When to use**
|
|
1081
|
+
*
|
|
1082
|
+
* Use when you want a fallback value for a missing regular
|
|
1083
|
+
* service. Use `getOption` when you need to distinguish presence from absence.
|
|
1084
|
+
*
|
|
851
1085
|
* **Details**
|
|
852
1086
|
*
|
|
853
1087
|
* If the key is a `Context.Reference` and no override is stored in the
|
|
854
1088
|
* context, its cached default value is returned instead of the fallback.
|
|
855
1089
|
*
|
|
1090
|
+
* **Gotchas**
|
|
1091
|
+
*
|
|
1092
|
+
* The fallback is not evaluated for missing `Context.Reference` keys because
|
|
1093
|
+
* references resolve to their default value.
|
|
1094
|
+
*
|
|
856
1095
|
* **Example** (Falling back for missing services)
|
|
857
1096
|
*
|
|
858
1097
|
* ```ts
|
|
@@ -878,6 +1117,8 @@ export const addOrOmit: {
|
|
|
878
1117
|
* console.log(database.query("SELECT 1")) // "fallback"
|
|
879
1118
|
* ```
|
|
880
1119
|
*
|
|
1120
|
+
* @see {@link getOption} for returning `Option.none` when a non-reference key is missing
|
|
1121
|
+
*
|
|
881
1122
|
* @category getters
|
|
882
1123
|
* @since 3.7.0
|
|
883
1124
|
*/
|
|
@@ -886,11 +1127,21 @@ export const getOrElse: {
|
|
|
886
1127
|
* Gets the service for a key, or evaluates the fallback when a non-reference
|
|
887
1128
|
* key is absent.
|
|
888
1129
|
*
|
|
1130
|
+
* **When to use**
|
|
1131
|
+
*
|
|
1132
|
+
* Use when you want a fallback value for a missing regular
|
|
1133
|
+
* service. Use `getOption` when you need to distinguish presence from absence.
|
|
1134
|
+
*
|
|
889
1135
|
* **Details**
|
|
890
1136
|
*
|
|
891
1137
|
* If the key is a `Context.Reference` and no override is stored in the
|
|
892
1138
|
* context, its cached default value is returned instead of the fallback.
|
|
893
1139
|
*
|
|
1140
|
+
* **Gotchas**
|
|
1141
|
+
*
|
|
1142
|
+
* The fallback is not evaluated for missing `Context.Reference` keys because
|
|
1143
|
+
* references resolve to their default value.
|
|
1144
|
+
*
|
|
894
1145
|
* **Example** (Falling back for missing services)
|
|
895
1146
|
*
|
|
896
1147
|
* ```ts
|
|
@@ -916,6 +1167,8 @@ export const getOrElse: {
|
|
|
916
1167
|
* console.log(database.query("SELECT 1")) // "fallback"
|
|
917
1168
|
* ```
|
|
918
1169
|
*
|
|
1170
|
+
* @see {@link getOption} for returning `Option.none` when a non-reference key is missing
|
|
1171
|
+
*
|
|
919
1172
|
* @category getters
|
|
920
1173
|
* @since 3.7.0
|
|
921
1174
|
*/
|
|
@@ -924,11 +1177,21 @@ export const getOrElse: {
|
|
|
924
1177
|
* Gets the service for a key, or evaluates the fallback when a non-reference
|
|
925
1178
|
* key is absent.
|
|
926
1179
|
*
|
|
1180
|
+
* **When to use**
|
|
1181
|
+
*
|
|
1182
|
+
* Use when you want a fallback value for a missing regular
|
|
1183
|
+
* service. Use `getOption` when you need to distinguish presence from absence.
|
|
1184
|
+
*
|
|
927
1185
|
* **Details**
|
|
928
1186
|
*
|
|
929
1187
|
* If the key is a `Context.Reference` and no override is stored in the
|
|
930
1188
|
* context, its cached default value is returned instead of the fallback.
|
|
931
1189
|
*
|
|
1190
|
+
* **Gotchas**
|
|
1191
|
+
*
|
|
1192
|
+
* The fallback is not evaluated for missing `Context.Reference` keys because
|
|
1193
|
+
* references resolve to their default value.
|
|
1194
|
+
*
|
|
932
1195
|
* **Example** (Falling back for missing services)
|
|
933
1196
|
*
|
|
934
1197
|
* ```ts
|
|
@@ -954,6 +1217,8 @@ export const getOrElse: {
|
|
|
954
1217
|
* console.log(database.query("SELECT 1")) // "fallback"
|
|
955
1218
|
* ```
|
|
956
1219
|
*
|
|
1220
|
+
* @see {@link getOption} for returning `Option.none` when a non-reference key is missing
|
|
1221
|
+
*
|
|
957
1222
|
* @category getters
|
|
958
1223
|
* @since 3.7.0
|
|
959
1224
|
*/
|
|
@@ -969,11 +1234,18 @@ export const getOrElse: {
|
|
|
969
1234
|
* Returns the service currently stored for a key, or `undefined` when the key
|
|
970
1235
|
* is absent.
|
|
971
1236
|
*
|
|
972
|
-
* **
|
|
1237
|
+
* **When to use**
|
|
1238
|
+
*
|
|
1239
|
+
* Use when you need raw map-style lookup. Use `getOption` when you want the
|
|
1240
|
+
* usual `Context.Reference` default-value behavior.
|
|
1241
|
+
*
|
|
1242
|
+
* **Gotchas**
|
|
973
1243
|
*
|
|
974
1244
|
* This is a raw lookup and does not resolve default values for
|
|
975
1245
|
* `Context.Reference` keys.
|
|
976
1246
|
*
|
|
1247
|
+
* @see {@link getOption} for a reference-aware optional lookup
|
|
1248
|
+
*
|
|
977
1249
|
* @category getters
|
|
978
1250
|
* @since 4.0.0
|
|
979
1251
|
*/
|
|
@@ -982,11 +1254,18 @@ export const getOrUndefined: {
|
|
|
982
1254
|
* Returns the service currently stored for a key, or `undefined` when the key
|
|
983
1255
|
* is absent.
|
|
984
1256
|
*
|
|
985
|
-
* **
|
|
1257
|
+
* **When to use**
|
|
1258
|
+
*
|
|
1259
|
+
* Use when you need raw map-style lookup. Use `getOption` when you want the
|
|
1260
|
+
* usual `Context.Reference` default-value behavior.
|
|
1261
|
+
*
|
|
1262
|
+
* **Gotchas**
|
|
986
1263
|
*
|
|
987
1264
|
* This is a raw lookup and does not resolve default values for
|
|
988
1265
|
* `Context.Reference` keys.
|
|
989
1266
|
*
|
|
1267
|
+
* @see {@link getOption} for a reference-aware optional lookup
|
|
1268
|
+
*
|
|
990
1269
|
* @category getters
|
|
991
1270
|
* @since 4.0.0
|
|
992
1271
|
*/
|
|
@@ -995,11 +1274,18 @@ export const getOrUndefined: {
|
|
|
995
1274
|
* Returns the service currently stored for a key, or `undefined` when the key
|
|
996
1275
|
* is absent.
|
|
997
1276
|
*
|
|
998
|
-
* **
|
|
1277
|
+
* **When to use**
|
|
1278
|
+
*
|
|
1279
|
+
* Use when you need raw map-style lookup. Use `getOption` when you want the
|
|
1280
|
+
* usual `Context.Reference` default-value behavior.
|
|
1281
|
+
*
|
|
1282
|
+
* **Gotchas**
|
|
999
1283
|
*
|
|
1000
1284
|
* This is a raw lookup and does not resolve default values for
|
|
1001
1285
|
* `Context.Reference` keys.
|
|
1002
1286
|
*
|
|
1287
|
+
* @see {@link getOption} for a reference-aware optional lookup
|
|
1288
|
+
*
|
|
1003
1289
|
* @category getters
|
|
1004
1290
|
* @since 4.0.0
|
|
1005
1291
|
*/
|
|
@@ -1013,14 +1299,18 @@ export const getOrUndefined: {
|
|
|
1013
1299
|
* Gets the service for a key, throwing if an absent non-reference key cannot be
|
|
1014
1300
|
* resolved.
|
|
1015
1301
|
*
|
|
1302
|
+
* **When to use**
|
|
1303
|
+
*
|
|
1304
|
+
* Use when the context type cannot prove that the service is present. Use
|
|
1305
|
+
* `get` when the service requirement is tracked in the context type, or
|
|
1306
|
+
* `getOption` when absence is expected.
|
|
1307
|
+
*
|
|
1016
1308
|
* **Details**
|
|
1017
1309
|
*
|
|
1018
1310
|
* If the key is a `Context.Reference` and no override is stored in the
|
|
1019
1311
|
* context, its cached default value is returned. For absent non-reference keys,
|
|
1020
1312
|
* this function throws a runtime error.
|
|
1021
1313
|
*
|
|
1022
|
-
* For a safer version see {@link getOption}.
|
|
1023
|
-
*
|
|
1024
1314
|
* **Example** (Getting services unsafely)
|
|
1025
1315
|
*
|
|
1026
1316
|
* ```ts
|
|
@@ -1036,6 +1326,9 @@ export const getOrUndefined: {
|
|
|
1036
1326
|
* assert.throws(() => Context.getUnsafe(context, Timeout))
|
|
1037
1327
|
* ```
|
|
1038
1328
|
*
|
|
1329
|
+
* @see {@link get} for type-checked service access
|
|
1330
|
+
* @see {@link getOption} for optional service access
|
|
1331
|
+
*
|
|
1039
1332
|
* @category unsafe
|
|
1040
1333
|
* @since 4.0.0
|
|
1041
1334
|
*/
|
|
@@ -1044,14 +1337,18 @@ export const getUnsafe: {
|
|
|
1044
1337
|
* Gets the service for a key, throwing if an absent non-reference key cannot be
|
|
1045
1338
|
* resolved.
|
|
1046
1339
|
*
|
|
1340
|
+
* **When to use**
|
|
1341
|
+
*
|
|
1342
|
+
* Use when the context type cannot prove that the service is present. Use
|
|
1343
|
+
* `get` when the service requirement is tracked in the context type, or
|
|
1344
|
+
* `getOption` when absence is expected.
|
|
1345
|
+
*
|
|
1047
1346
|
* **Details**
|
|
1048
1347
|
*
|
|
1049
1348
|
* If the key is a `Context.Reference` and no override is stored in the
|
|
1050
1349
|
* context, its cached default value is returned. For absent non-reference keys,
|
|
1051
1350
|
* this function throws a runtime error.
|
|
1052
1351
|
*
|
|
1053
|
-
* For a safer version see {@link getOption}.
|
|
1054
|
-
*
|
|
1055
1352
|
* **Example** (Getting services unsafely)
|
|
1056
1353
|
*
|
|
1057
1354
|
* ```ts
|
|
@@ -1067,6 +1364,9 @@ export const getUnsafe: {
|
|
|
1067
1364
|
* assert.throws(() => Context.getUnsafe(context, Timeout))
|
|
1068
1365
|
* ```
|
|
1069
1366
|
*
|
|
1367
|
+
* @see {@link get} for type-checked service access
|
|
1368
|
+
* @see {@link getOption} for optional service access
|
|
1369
|
+
*
|
|
1070
1370
|
* @category unsafe
|
|
1071
1371
|
* @since 4.0.0
|
|
1072
1372
|
*/
|
|
@@ -1075,14 +1375,18 @@ export const getUnsafe: {
|
|
|
1075
1375
|
* Gets the service for a key, throwing if an absent non-reference key cannot be
|
|
1076
1376
|
* resolved.
|
|
1077
1377
|
*
|
|
1378
|
+
* **When to use**
|
|
1379
|
+
*
|
|
1380
|
+
* Use when the context type cannot prove that the service is present. Use
|
|
1381
|
+
* `get` when the service requirement is tracked in the context type, or
|
|
1382
|
+
* `getOption` when absence is expected.
|
|
1383
|
+
*
|
|
1078
1384
|
* **Details**
|
|
1079
1385
|
*
|
|
1080
1386
|
* If the key is a `Context.Reference` and no override is stored in the
|
|
1081
1387
|
* context, its cached default value is returned. For absent non-reference keys,
|
|
1082
1388
|
* this function throws a runtime error.
|
|
1083
1389
|
*
|
|
1084
|
-
* For a safer version see {@link getOption}.
|
|
1085
|
-
*
|
|
1086
1390
|
* **Example** (Getting services unsafely)
|
|
1087
1391
|
*
|
|
1088
1392
|
* ```ts
|
|
@@ -1098,6 +1402,9 @@ export const getUnsafe: {
|
|
|
1098
1402
|
* assert.throws(() => Context.getUnsafe(context, Timeout))
|
|
1099
1403
|
* ```
|
|
1100
1404
|
*
|
|
1405
|
+
* @see {@link get} for type-checked service access
|
|
1406
|
+
* @see {@link getOption} for optional service access
|
|
1407
|
+
*
|
|
1101
1408
|
* @category unsafe
|
|
1102
1409
|
* @since 4.0.0
|
|
1103
1410
|
*/
|
|
@@ -1114,7 +1421,12 @@ export const getUnsafe: {
|
|
|
1114
1421
|
)
|
|
1115
1422
|
|
|
1116
1423
|
/**
|
|
1117
|
-
*
|
|
1424
|
+
* Gets a service from the context that corresponds to the given key.
|
|
1425
|
+
*
|
|
1426
|
+
* **When to use**
|
|
1427
|
+
*
|
|
1428
|
+
* Use when the context type proves that the service is present. Use
|
|
1429
|
+
* `getOption` or `getOrElse` when a service may be absent.
|
|
1118
1430
|
*
|
|
1119
1431
|
* **Example** (Getting a service from a context)
|
|
1120
1432
|
*
|
|
@@ -1133,12 +1445,20 @@ export const getUnsafe: {
|
|
|
1133
1445
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
1134
1446
|
* ```
|
|
1135
1447
|
*
|
|
1448
|
+
* @see {@link getOption} for optional service access
|
|
1449
|
+
* @see {@link getOrElse} for fallback values
|
|
1450
|
+
*
|
|
1136
1451
|
* @category getters
|
|
1137
1452
|
* @since 2.0.0
|
|
1138
1453
|
*/
|
|
1139
1454
|
export const get: {
|
|
1140
1455
|
/**
|
|
1141
|
-
*
|
|
1456
|
+
* Gets a service from the context that corresponds to the given key.
|
|
1457
|
+
*
|
|
1458
|
+
* **When to use**
|
|
1459
|
+
*
|
|
1460
|
+
* Use when the context type proves that the service is present. Use
|
|
1461
|
+
* `getOption` or `getOrElse` when a service may be absent.
|
|
1142
1462
|
*
|
|
1143
1463
|
* **Example** (Getting a service from a context)
|
|
1144
1464
|
*
|
|
@@ -1157,12 +1477,20 @@ export const get: {
|
|
|
1157
1477
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
1158
1478
|
* ```
|
|
1159
1479
|
*
|
|
1480
|
+
* @see {@link getOption} for optional service access
|
|
1481
|
+
* @see {@link getOrElse} for fallback values
|
|
1482
|
+
*
|
|
1160
1483
|
* @category getters
|
|
1161
1484
|
* @since 2.0.0
|
|
1162
1485
|
*/
|
|
1163
1486
|
<Services, I extends Services, S>(service: Key<I, S>): (self: Context<Services>) => S
|
|
1164
1487
|
/**
|
|
1165
|
-
*
|
|
1488
|
+
* Gets a service from the context that corresponds to the given key.
|
|
1489
|
+
*
|
|
1490
|
+
* **When to use**
|
|
1491
|
+
*
|
|
1492
|
+
* Use when the context type proves that the service is present. Use
|
|
1493
|
+
* `getOption` or `getOrElse` when a service may be absent.
|
|
1166
1494
|
*
|
|
1167
1495
|
* **Example** (Getting a service from a context)
|
|
1168
1496
|
*
|
|
@@ -1181,6 +1509,9 @@ export const get: {
|
|
|
1181
1509
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
1182
1510
|
* ```
|
|
1183
1511
|
*
|
|
1512
|
+
* @see {@link getOption} for optional service access
|
|
1513
|
+
* @see {@link getOrElse} for fallback values
|
|
1514
|
+
*
|
|
1184
1515
|
* @category getters
|
|
1185
1516
|
* @since 2.0.0
|
|
1186
1517
|
*/
|
|
@@ -1191,6 +1522,21 @@ export const get: {
|
|
|
1191
1522
|
* Gets the value for a `Context.Reference`, returning its cached default when
|
|
1192
1523
|
* the context does not contain an override.
|
|
1193
1524
|
*
|
|
1525
|
+
* **When to use**
|
|
1526
|
+
*
|
|
1527
|
+
* Use to resolve a `Context.Reference` against a context when you want either
|
|
1528
|
+
* the stored override or the reference's default value.
|
|
1529
|
+
*
|
|
1530
|
+
* **Details**
|
|
1531
|
+
*
|
|
1532
|
+
* Stored overrides take precedence. If no override is present, the reference's
|
|
1533
|
+
* default value is computed lazily and cached on the reference itself.
|
|
1534
|
+
*
|
|
1535
|
+
* **Gotchas**
|
|
1536
|
+
*
|
|
1537
|
+
* Mutable default values can be shared across contexts unless an override is
|
|
1538
|
+
* provided, because the default is cached on the `Context.Reference`.
|
|
1539
|
+
*
|
|
1194
1540
|
* **Example** (Getting reference defaults unsafely)
|
|
1195
1541
|
*
|
|
1196
1542
|
* ```ts
|
|
@@ -1206,6 +1552,10 @@ export const get: {
|
|
|
1206
1552
|
* console.log(typeof logger.log) // "function"
|
|
1207
1553
|
* ```
|
|
1208
1554
|
*
|
|
1555
|
+
* @see {@link getUnsafe} for unsafe access with any service key
|
|
1556
|
+
* @see {@link get} for type-checked reference-aware access
|
|
1557
|
+
* @see {@link getOption} for optional access to non-reference keys
|
|
1558
|
+
*
|
|
1209
1559
|
* @category unsafe
|
|
1210
1560
|
* @since 4.0.0
|
|
1211
1561
|
*/
|
|
@@ -1247,7 +1597,12 @@ const serviceNotFoundError = (service: Key<any, any>) => {
|
|
|
1247
1597
|
}
|
|
1248
1598
|
|
|
1249
1599
|
/**
|
|
1250
|
-
* Gets the service for a key wrapped in an `Option`.
|
|
1600
|
+
* Gets the service for a key safely wrapped in an `Option`.
|
|
1601
|
+
*
|
|
1602
|
+
* **When to use**
|
|
1603
|
+
*
|
|
1604
|
+
* Use when service absence is expected and should be represented
|
|
1605
|
+
* as data. Use `getOrElse` when you want to provide a fallback value directly.
|
|
1251
1606
|
*
|
|
1252
1607
|
* **Details**
|
|
1253
1608
|
*
|
|
@@ -1273,12 +1628,19 @@ const serviceNotFoundError = (service: Key<any, any>) => {
|
|
|
1273
1628
|
* assert.deepStrictEqual(Context.getOption(context, Timeout), Option.none())
|
|
1274
1629
|
* ```
|
|
1275
1630
|
*
|
|
1631
|
+
* @see {@link getOrElse} for returning a fallback value directly
|
|
1632
|
+
*
|
|
1276
1633
|
* @category getters
|
|
1277
1634
|
* @since 2.0.0
|
|
1278
1635
|
*/
|
|
1279
1636
|
export const getOption: {
|
|
1280
1637
|
/**
|
|
1281
|
-
* Gets the service for a key wrapped in an `Option`.
|
|
1638
|
+
* Gets the service for a key safely wrapped in an `Option`.
|
|
1639
|
+
*
|
|
1640
|
+
* **When to use**
|
|
1641
|
+
*
|
|
1642
|
+
* Use when service absence is expected and should be represented
|
|
1643
|
+
* as data. Use `getOrElse` when you want to provide a fallback value directly.
|
|
1282
1644
|
*
|
|
1283
1645
|
* **Details**
|
|
1284
1646
|
*
|
|
@@ -1304,12 +1666,19 @@ export const getOption: {
|
|
|
1304
1666
|
* assert.deepStrictEqual(Context.getOption(context, Timeout), Option.none())
|
|
1305
1667
|
* ```
|
|
1306
1668
|
*
|
|
1669
|
+
* @see {@link getOrElse} for returning a fallback value directly
|
|
1670
|
+
*
|
|
1307
1671
|
* @category getters
|
|
1308
1672
|
* @since 2.0.0
|
|
1309
1673
|
*/
|
|
1310
1674
|
<S, I>(service: Key<I, S>): <Services>(self: Context<Services>) => Option.Option<S>
|
|
1311
1675
|
/**
|
|
1312
|
-
* Gets the service for a key wrapped in an `Option`.
|
|
1676
|
+
* Gets the service for a key safely wrapped in an `Option`.
|
|
1677
|
+
*
|
|
1678
|
+
* **When to use**
|
|
1679
|
+
*
|
|
1680
|
+
* Use when service absence is expected and should be represented
|
|
1681
|
+
* as data. Use `getOrElse` when you want to provide a fallback value directly.
|
|
1313
1682
|
*
|
|
1314
1683
|
* **Details**
|
|
1315
1684
|
*
|
|
@@ -1335,6 +1704,8 @@ export const getOption: {
|
|
|
1335
1704
|
* assert.deepStrictEqual(Context.getOption(context, Timeout), Option.none())
|
|
1336
1705
|
* ```
|
|
1337
1706
|
*
|
|
1707
|
+
* @see {@link getOrElse} for returning a fallback value directly
|
|
1708
|
+
*
|
|
1338
1709
|
* @category getters
|
|
1339
1710
|
* @since 2.0.0
|
|
1340
1711
|
*/
|
|
@@ -1349,6 +1720,11 @@ export const getOption: {
|
|
|
1349
1720
|
/**
|
|
1350
1721
|
* Merges two `Context`s into one.
|
|
1351
1722
|
*
|
|
1723
|
+
* **When to use**
|
|
1724
|
+
*
|
|
1725
|
+
* Use when combining two contexts. Use `mergeAll` when combining a
|
|
1726
|
+
* variadic list of contexts.
|
|
1727
|
+
*
|
|
1352
1728
|
* **Details**
|
|
1353
1729
|
*
|
|
1354
1730
|
* When both contexts contain the same service key, the service from `that`
|
|
@@ -1372,13 +1748,20 @@ export const getOption: {
|
|
|
1372
1748
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
1373
1749
|
* ```
|
|
1374
1750
|
*
|
|
1375
|
-
* @
|
|
1751
|
+
* @see {@link mergeAll} for merging more than two contexts at once
|
|
1752
|
+
*
|
|
1753
|
+
* @category combining
|
|
1376
1754
|
* @since 2.0.0
|
|
1377
1755
|
*/
|
|
1378
1756
|
export const merge: {
|
|
1379
1757
|
/**
|
|
1380
1758
|
* Merges two `Context`s into one.
|
|
1381
1759
|
*
|
|
1760
|
+
* **When to use**
|
|
1761
|
+
*
|
|
1762
|
+
* Use when combining two contexts. Use `mergeAll` when combining a
|
|
1763
|
+
* variadic list of contexts.
|
|
1764
|
+
*
|
|
1382
1765
|
* **Details**
|
|
1383
1766
|
*
|
|
1384
1767
|
* When both contexts contain the same service key, the service from `that`
|
|
@@ -1402,13 +1785,20 @@ export const merge: {
|
|
|
1402
1785
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
1403
1786
|
* ```
|
|
1404
1787
|
*
|
|
1405
|
-
* @
|
|
1788
|
+
* @see {@link mergeAll} for merging more than two contexts at once
|
|
1789
|
+
*
|
|
1790
|
+
* @category combining
|
|
1406
1791
|
* @since 2.0.0
|
|
1407
1792
|
*/
|
|
1408
1793
|
<R1>(that: Context<R1>): <Services>(self: Context<Services>) => Context<R1 | Services>
|
|
1409
1794
|
/**
|
|
1410
1795
|
* Merges two `Context`s into one.
|
|
1411
1796
|
*
|
|
1797
|
+
* **When to use**
|
|
1798
|
+
*
|
|
1799
|
+
* Use when combining two contexts. Use `mergeAll` when combining a
|
|
1800
|
+
* variadic list of contexts.
|
|
1801
|
+
*
|
|
1412
1802
|
* **Details**
|
|
1413
1803
|
*
|
|
1414
1804
|
* When both contexts contain the same service key, the service from `that`
|
|
@@ -1432,7 +1822,9 @@ export const merge: {
|
|
|
1432
1822
|
* assert.deepStrictEqual(Context.get(context, Timeout), { TIMEOUT: 5000 })
|
|
1433
1823
|
* ```
|
|
1434
1824
|
*
|
|
1435
|
-
* @
|
|
1825
|
+
* @see {@link mergeAll} for merging more than two contexts at once
|
|
1826
|
+
*
|
|
1827
|
+
* @category combining
|
|
1436
1828
|
* @since 2.0.0
|
|
1437
1829
|
*/
|
|
1438
1830
|
<Services, R1>(self: Context<Services>, that: Context<R1>): Context<Services | R1>
|
|
@@ -1447,6 +1839,11 @@ export const merge: {
|
|
|
1447
1839
|
/**
|
|
1448
1840
|
* Merges any number of `Context`s into one.
|
|
1449
1841
|
*
|
|
1842
|
+
* **When to use**
|
|
1843
|
+
*
|
|
1844
|
+
* Use when the number of contexts is variadic. Use `merge` when
|
|
1845
|
+
* combining exactly two contexts.
|
|
1846
|
+
*
|
|
1450
1847
|
* **Details**
|
|
1451
1848
|
*
|
|
1452
1849
|
* When multiple contexts contain the same service key, the service from the
|
|
@@ -1477,6 +1874,8 @@ export const merge: {
|
|
|
1477
1874
|
* assert.deepStrictEqual(Context.get(context, Host), { HOST: "localhost" })
|
|
1478
1875
|
* ```
|
|
1479
1876
|
*
|
|
1877
|
+
* @see {@link merge} for merging two contexts
|
|
1878
|
+
*
|
|
1480
1879
|
* @category combining
|
|
1481
1880
|
* @since 3.12.0
|
|
1482
1881
|
*/
|
|
@@ -1495,6 +1894,11 @@ export const mergeAll = <T extends Array<unknown>>(
|
|
|
1495
1894
|
/**
|
|
1496
1895
|
* Returns a new `Context` that contains only the specified services.
|
|
1497
1896
|
*
|
|
1897
|
+
* **When to use**
|
|
1898
|
+
*
|
|
1899
|
+
* Use when you want to keep a small allowlist of services. Use `omit`
|
|
1900
|
+
* when it is easier to name the services to remove.
|
|
1901
|
+
*
|
|
1498
1902
|
* **Example** (Picking services from a context)
|
|
1499
1903
|
*
|
|
1500
1904
|
* ```ts
|
|
@@ -1518,7 +1922,9 @@ export const mergeAll = <T extends Array<unknown>>(
|
|
|
1518
1922
|
* assert.deepStrictEqual(Context.getOption(context, Timeout), Option.none())
|
|
1519
1923
|
* ```
|
|
1520
1924
|
*
|
|
1521
|
-
* @
|
|
1925
|
+
* @see {@link omit} for removing selected services
|
|
1926
|
+
*
|
|
1927
|
+
* @category filtering
|
|
1522
1928
|
* @since 2.0.0
|
|
1523
1929
|
*/
|
|
1524
1930
|
export const pick = <S extends ReadonlyArray<Key<any, any>>>(
|
|
@@ -1536,6 +1942,11 @@ export const pick = <S extends ReadonlyArray<Key<any, any>>>(
|
|
|
1536
1942
|
/**
|
|
1537
1943
|
* Returns a new `Context` with the specified service keys removed.
|
|
1538
1944
|
*
|
|
1945
|
+
* **When to use**
|
|
1946
|
+
*
|
|
1947
|
+
* Use when you want to remove a small denylist of services. Use `pick`
|
|
1948
|
+
* when it is easier to name the services to keep.
|
|
1949
|
+
*
|
|
1539
1950
|
* **Example** (Omitting services from a context)
|
|
1540
1951
|
*
|
|
1541
1952
|
* ```ts
|
|
@@ -1559,7 +1970,9 @@ export const pick = <S extends ReadonlyArray<Key<any, any>>>(
|
|
|
1559
1970
|
* assert.deepStrictEqual(Context.getOption(context, Timeout), Option.none())
|
|
1560
1971
|
* ```
|
|
1561
1972
|
*
|
|
1562
|
-
* @
|
|
1973
|
+
* @see {@link pick} for keeping selected services
|
|
1974
|
+
*
|
|
1975
|
+
* @category filtering
|
|
1563
1976
|
* @since 2.0.0
|
|
1564
1977
|
*/
|
|
1565
1978
|
export const omit = <S extends ReadonlyArray<Key<any, any>>>(
|
|
@@ -1573,26 +1986,59 @@ export const omit = <S extends ReadonlyArray<Key<any, any>>>(
|
|
|
1573
1986
|
})
|
|
1574
1987
|
|
|
1575
1988
|
/**
|
|
1576
|
-
*
|
|
1989
|
+
* Performs a series of mutations on a `Context`. Prevents unnecessary copying
|
|
1577
1990
|
* of the underlying map when multiple mutations are needed.
|
|
1578
1991
|
*
|
|
1579
|
-
*
|
|
1992
|
+
* **When to use**
|
|
1993
|
+
*
|
|
1994
|
+
* Use to apply several `Context` transformations in one callback while copying
|
|
1995
|
+
* the underlying service map only once.
|
|
1996
|
+
*
|
|
1997
|
+
* @see {@link add} for adding or replacing a service
|
|
1998
|
+
* @see {@link addOrOmit} for adding or removing a service from an `Option`
|
|
1999
|
+
* @see {@link merge} for combining two contexts
|
|
2000
|
+
* @see {@link pick} for keeping selected services
|
|
2001
|
+
* @see {@link omit} for removing selected services
|
|
2002
|
+
*
|
|
2003
|
+
* @category utils
|
|
1580
2004
|
* @since 4.0.0
|
|
1581
2005
|
*/
|
|
1582
2006
|
export const mutate: {
|
|
1583
2007
|
/**
|
|
1584
|
-
*
|
|
2008
|
+
* Performs a series of mutations on a `Context`. Prevents unnecessary copying
|
|
1585
2009
|
* of the underlying map when multiple mutations are needed.
|
|
1586
2010
|
*
|
|
1587
|
-
*
|
|
2011
|
+
* **When to use**
|
|
2012
|
+
*
|
|
2013
|
+
* Use to apply several `Context` transformations in one callback while copying
|
|
2014
|
+
* the underlying service map only once.
|
|
2015
|
+
*
|
|
2016
|
+
* @see {@link add} for adding or replacing a service
|
|
2017
|
+
* @see {@link addOrOmit} for adding or removing a service from an `Option`
|
|
2018
|
+
* @see {@link merge} for combining two contexts
|
|
2019
|
+
* @see {@link pick} for keeping selected services
|
|
2020
|
+
* @see {@link omit} for removing selected services
|
|
2021
|
+
*
|
|
2022
|
+
* @category utils
|
|
1588
2023
|
* @since 4.0.0
|
|
1589
2024
|
*/
|
|
1590
2025
|
<Services, B>(f: (context: Context<Services>) => Context<B>): <Services>(self: Context<Services>) => Context<B>
|
|
1591
2026
|
/**
|
|
1592
|
-
*
|
|
2027
|
+
* Performs a series of mutations on a `Context`. Prevents unnecessary copying
|
|
1593
2028
|
* of the underlying map when multiple mutations are needed.
|
|
1594
2029
|
*
|
|
1595
|
-
*
|
|
2030
|
+
* **When to use**
|
|
2031
|
+
*
|
|
2032
|
+
* Use to apply several `Context` transformations in one callback while copying
|
|
2033
|
+
* the underlying service map only once.
|
|
2034
|
+
*
|
|
2035
|
+
* @see {@link add} for adding or replacing a service
|
|
2036
|
+
* @see {@link addOrOmit} for adding or removing a service from an `Option`
|
|
2037
|
+
* @see {@link merge} for combining two contexts
|
|
2038
|
+
* @see {@link pick} for keeping selected services
|
|
2039
|
+
* @see {@link omit} for removing selected services
|
|
2040
|
+
*
|
|
2041
|
+
* @category utils
|
|
1596
2042
|
* @since 4.0.0
|
|
1597
2043
|
*/
|
|
1598
2044
|
<Services, B>(self: Context<Services>, f: (context: Context<Services>) => Context<B>): Context<B>
|
|
@@ -1600,10 +2046,21 @@ export const mutate: {
|
|
|
1600
2046
|
2,
|
|
1601
2047
|
<Services, B>(self: Context<Services>, f: (context: Context<Services>) => Context<B>): Context<B> => {
|
|
1602
2048
|
const next = makeUnsafe</**
|
|
1603
|
-
*
|
|
2049
|
+
* Performs a series of mutations on a `Context`. Prevents unnecessary copying
|
|
1604
2050
|
* of the underlying map when multiple mutations are needed.
|
|
1605
2051
|
*
|
|
1606
|
-
*
|
|
2052
|
+
* **When to use**
|
|
2053
|
+
*
|
|
2054
|
+
* Use to apply several `Context` transformations in one callback while copying
|
|
2055
|
+
* the underlying service map only once.
|
|
2056
|
+
*
|
|
2057
|
+
* @see {@link add} for adding or replacing a service
|
|
2058
|
+
* @see {@link addOrOmit} for adding or removing a service from an `Option`
|
|
2059
|
+
* @see {@link merge} for combining two contexts
|
|
2060
|
+
* @see {@link pick} for keeping selected services
|
|
2061
|
+
* @see {@link omit} for removing selected services
|
|
2062
|
+
*
|
|
2063
|
+
* @category utils
|
|
1607
2064
|
* @since 4.0.0
|
|
1608
2065
|
*/
|
|
1609
2066
|
Services>(new Map(self.mapUnsafe))
|
|
@@ -1627,12 +2084,19 @@ const withMapUnsafe = <Services, B>(self: Context<Services>, f: (map: Map<string
|
|
|
1627
2084
|
/**
|
|
1628
2085
|
* Creates a context key with a default value.
|
|
1629
2086
|
*
|
|
2087
|
+
* **When to use**
|
|
2088
|
+
*
|
|
2089
|
+
* Use when a service should be available even if it is not
|
|
2090
|
+
* explicitly stored in the `Context`. Use `Service` when the service must be
|
|
2091
|
+
* provided by the surrounding context.
|
|
2092
|
+
*
|
|
1630
2093
|
* **Details**
|
|
1631
2094
|
*
|
|
1632
2095
|
* `Context.Reference` allows you to create a key that can hold a value. You
|
|
1633
2096
|
* can provide a default value for the service, which will automatically be used
|
|
1634
2097
|
* when the context is accessed, or override it with a custom implementation
|
|
1635
|
-
* when needed.
|
|
2098
|
+
* when needed. The default value is computed lazily and cached on the
|
|
2099
|
+
* reference.
|
|
1636
2100
|
*
|
|
1637
2101
|
* **Example** (Creating references with default values)
|
|
1638
2102
|
*
|
|
@@ -1655,6 +2119,8 @@ const withMapUnsafe = <Services, B>(self: Context<Services>, f: (map: Map<string
|
|
|
1655
2119
|
* const customLogger = Context.get(customContext, LoggerRef)
|
|
1656
2120
|
* ```
|
|
1657
2121
|
*
|
|
2122
|
+
* @see {@link Service} for required services without default values
|
|
2123
|
+
*
|
|
1658
2124
|
* @category references
|
|
1659
2125
|
* @since 3.11.0
|
|
1660
2126
|
*/
|