effect 4.0.0-beta.102 → 4.0.0-beta.103
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 +971 -1037
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +381 -407
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +433 -756
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +200 -325
- package/dist/BigDecimal.js.map +1 -1
- package/dist/BigInt.d.ts +207 -267
- package/dist/BigInt.d.ts.map +1 -1
- package/dist/BigInt.js +107 -135
- package/dist/BigInt.js.map +1 -1
- package/dist/Boolean.d.ts +146 -188
- package/dist/Boolean.d.ts.map +1 -1
- package/dist/Boolean.js +64 -84
- package/dist/Boolean.js.map +1 -1
- package/dist/Brand.js.map +1 -1
- package/dist/Cache.d.ts +405 -254
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +166 -101
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +167 -277
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +122 -176
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +729 -768
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +514 -440
- package/dist/Channel.js.map +1 -1
- package/dist/ChannelSchema.d.ts +1 -1
- package/dist/ChannelSchema.d.ts.map +1 -1
- package/dist/ChannelSchema.js.map +1 -1
- package/dist/Chunk.d.ts +834 -1173
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +326 -439
- package/dist/Chunk.js.map +1 -1
- package/dist/Clock.d.ts +180 -49
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js +96 -31
- package/dist/Clock.js.map +1 -1
- package/dist/Combiner.d.ts +20 -33
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +18 -30
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +225 -173
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +336 -265
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +194 -68
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +115 -80
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +233 -33
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js +232 -32
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +151 -274
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js +171 -214
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +68 -77
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +57 -66
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +13 -15
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +9 -10
- package/dist/Crypto.js.map +1 -1
- package/dist/Data.d.ts +60 -80
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +16 -23
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +562 -660
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +307 -362
- package/dist/DateTime.js.map +1 -1
- package/dist/Deferred.d.ts +253 -256
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +104 -96
- package/dist/Deferred.js.map +1 -1
- package/dist/Duration.d.ts +216 -308
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +132 -186
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2841 -3247
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +1322 -1546
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +22 -40
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +22 -40
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +33 -37
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +29 -21
- package/dist/Equal.js.map +1 -1
- package/dist/Equivalence.d.ts +103 -105
- package/dist/Equivalence.d.ts.map +1 -1
- package/dist/Equivalence.js +77 -79
- package/dist/Equivalence.js.map +1 -1
- package/dist/ErrorReporter.d.ts +51 -27
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +50 -26
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +13 -55
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +7 -28
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Exit.d.ts +116 -192
- package/dist/Exit.d.ts.map +1 -1
- package/dist/Exit.js +82 -130
- package/dist/Exit.js.map +1 -1
- package/dist/Fiber.d.ts +82 -146
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js +48 -87
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +152 -105
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +106 -73
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +213 -168
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +114 -89
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +123 -81
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +85 -59
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +153 -264
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +42 -147
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +61 -33
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +26 -15
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +25 -33
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +48 -49
- package/dist/Formatter.js.map +1 -1
- package/dist/Function.d.ts +76 -145
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +40 -57
- package/dist/Function.js.map +1 -1
- package/dist/Graph.d.ts +360 -714
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +168 -297
- package/dist/Graph.js.map +1 -1
- package/dist/HKT.d.ts +12 -6
- package/dist/HKT.d.ts.map +1 -1
- package/dist/Hash.d.ts +47 -83
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +46 -68
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +319 -411
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +122 -166
- package/dist/HashMap.js.map +1 -1
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +1 -0
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +177 -284
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js +68 -109
- package/dist/HashSet.js.map +1 -1
- package/dist/Inspectable.d.ts +12 -12
- package/dist/Inspectable.js +8 -8
- package/dist/Inspectable.js.map +1 -1
- package/dist/Iterable.d.ts +620 -786
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +228 -306
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.d.ts +11 -13
- package/dist/JsonPatch.d.ts.map +1 -1
- package/dist/JsonPatch.js +44 -102
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +8 -8
- package/dist/JsonPointer.js +8 -8
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.d.ts +98 -44
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +297 -234
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +23 -35
- package/dist/Latch.d.ts.map +1 -1
- package/dist/Latch.js +16 -28
- package/dist/Latch.js.map +1 -1
- package/dist/Layer.d.ts +359 -260
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +195 -175
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +42 -29
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +31 -21
- package/dist/LayerMap.js.map +1 -1
- package/dist/LayerRef.d.ts +6 -2
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +6 -2
- package/dist/LayerRef.js.map +1 -1
- package/dist/LogLevel.d.ts +114 -214
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +41 -76
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +218 -467
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +204 -450
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +7 -5
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +7 -5
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +217 -252
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +150 -183
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +442 -993
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +198 -642
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +144 -173
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +68 -79
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +84 -89
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +44 -47
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +71 -370
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +59 -284
- package/dist/MutableList.js.map +1 -1
- package/dist/MutableRef.d.ts +420 -243
- package/dist/MutableRef.d.ts.map +1 -1
- package/dist/MutableRef.js +209 -120
- package/dist/MutableRef.js.map +1 -1
- package/dist/Newtype.d.ts +21 -14
- package/dist/Newtype.d.ts.map +1 -1
- package/dist/Newtype.js +15 -13
- package/dist/Newtype.js.map +1 -1
- package/dist/NonEmptyIterable.d.ts +7 -137
- package/dist/NonEmptyIterable.d.ts.map +1 -1
- package/dist/NonEmptyIterable.js +5 -93
- package/dist/NonEmptyIterable.js.map +1 -1
- package/dist/Number.d.ts +196 -233
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +90 -109
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts +97 -189
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +187 -290
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +447 -812
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +211 -392
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +109 -109
- package/dist/Order.js +91 -91
- package/dist/Order.js.map +1 -1
- package/dist/Ordering.d.ts +20 -23
- package/dist/Ordering.d.ts.map +1 -1
- package/dist/Ordering.js +8 -9
- package/dist/Ordering.js.map +1 -1
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +38 -41
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +3 -4
- package/dist/Path.js.map +1 -1
- package/dist/Pipeable.d.ts +6 -5
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +2 -2
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +4 -4
- package/dist/PlatformError.js +3 -3
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +4 -2
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +4 -2
- package/dist/Pool.js.map +1 -1
- package/dist/Predicate.d.ts +200 -181
- package/dist/Predicate.d.ts.map +1 -1
- package/dist/Predicate.js +100 -108
- package/dist/Predicate.js.map +1 -1
- package/dist/PrimaryKey.d.ts +7 -7
- package/dist/PrimaryKey.js +5 -5
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +425 -494
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +373 -362
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts +24 -18
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +11 -9
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts +200 -159
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +162 -132
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +49 -74
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +35 -54
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +121 -63
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +42 -21
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +24 -13
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/RcRef.js +15 -9
- package/dist/RcRef.js.map +1 -1
- package/dist/Record.d.ts +291 -488
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +111 -202
- package/dist/Record.js.map +1 -1
- package/dist/Redactable.d.ts +6 -2
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +7 -2
- package/dist/Redactable.js.map +1 -1
- package/dist/Redacted.d.ts +25 -25
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +19 -20
- package/dist/Redacted.js.map +1 -1
- package/dist/Reducer.d.ts +8 -15
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +6 -12
- package/dist/Reducer.js.map +1 -1
- package/dist/Ref.d.ts +95 -165
- package/dist/Ref.d.ts.map +1 -1
- package/dist/Ref.js +75 -122
- package/dist/Ref.js.map +1 -1
- package/dist/References.d.ts +102 -168
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +102 -168
- package/dist/References.js.map +1 -1
- package/dist/RegExp.d.ts +10 -14
- package/dist/RegExp.d.ts.map +1 -1
- package/dist/RegExp.js +10 -14
- package/dist/RegExp.js.map +1 -1
- package/dist/Request.d.ts +31 -21
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +16 -13
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +201 -90
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +87 -41
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.js.map +1 -1
- package/dist/Result.d.ts +302 -470
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +133 -217
- package/dist/Result.js.map +1 -1
- package/dist/Runtime.d.ts +50 -75
- package/dist/Runtime.d.ts.map +1 -1
- package/dist/Runtime.js +39 -60
- package/dist/Runtime.js.map +1 -1
- package/dist/Schedule.d.ts +290 -1636
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +162 -803
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +5 -5
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +18 -6
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +644 -642
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +491 -527
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +27 -50
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +366 -279
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaError.d.ts +7 -6
- package/dist/SchemaError.d.ts.map +1 -1
- package/dist/SchemaError.js +7 -6
- package/dist/SchemaError.js.map +1 -1
- package/dist/SchemaGetter.d.ts +217 -174
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +218 -185
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +62 -190
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +73 -265
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.d.ts +2 -2
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +123 -75
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +22 -36
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +20 -26
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +114 -74
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +120 -85
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +123 -151
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js +72 -92
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.js.map +1 -1
- package/dist/ScopedRef.d.ts +3 -3
- package/dist/ScopedRef.js +2 -2
- package/dist/ScopedRef.js.map +1 -1
- package/dist/Semaphore.d.ts +96 -10
- package/dist/Semaphore.d.ts.map +1 -1
- package/dist/Semaphore.js +78 -39
- package/dist/Semaphore.js.map +1 -1
- package/dist/Sink.d.ts +117 -107
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +107 -100
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +1 -1
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +2415 -2949
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +1078 -1381
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +262 -308
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +184 -215
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts +109 -114
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +41 -50
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +282 -250
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +104 -92
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/Symbol.d.ts +3 -3
- package/dist/Symbol.js +3 -3
- package/dist/Symbol.js.map +1 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Take.js.map +1 -1
- package/dist/Terminal.d.ts +2 -2
- package/dist/Terminal.js +1 -1
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +100 -54
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +41 -24
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +287 -679
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +109 -251
- package/dist/Trie.js.map +1 -1
- package/dist/Tuple.d.ts +92 -127
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js +42 -57
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +201 -121
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +85 -56
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +62 -46
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +30 -22
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +631 -779
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +268 -330
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +297 -236
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +130 -100
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +126 -95
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +74 -56
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +101 -88
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +87 -66
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +200 -180
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +160 -136
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +97 -66
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +67 -45
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +51 -32
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +23 -15
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +129 -95
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +85 -70
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +97 -70
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +44 -34
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +126 -67
- package/dist/Types.d.ts.map +1 -1
- package/dist/UndefinedOr.js.map +1 -1
- package/dist/Unify.d.ts +45 -65
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js +6 -9
- package/dist/Unify.js.map +1 -1
- package/dist/Utils.d.ts +23 -16
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +3 -7
- package/dist/Utils.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/array.js.map +1 -1
- package/dist/internal/core.js +1 -1
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/dateTime.js +4 -0
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/doNotation.js.map +1 -1
- package/dist/internal/effect.js +77 -40
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/equal.js.map +1 -1
- package/dist/internal/errors.js.map +1 -1
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/hashSet.js.map +1 -1
- package/dist/internal/layer.js.map +1 -1
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/metric.js.map +1 -1
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/persistence.d.ts +2 -0
- package/dist/internal/persistence.d.ts.map +1 -0
- package/dist/internal/persistence.js +3 -0
- package/dist/internal/persistence.js.map +1 -0
- package/dist/internal/random.js.map +1 -1
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/record.js.map +1 -1
- package/dist/internal/redacted.js.map +1 -1
- package/dist/internal/references.js +3 -0
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/result.js.map +1 -1
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/cause.js.map +1 -1
- package/dist/internal/schema/fromJsonSchemaDocument.js +13 -11
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/fromRepresentation.js +8 -15
- package/dist/internal/schema/fromRepresentation.js.map +1 -1
- package/dist/internal/schema/parser.d.ts +14 -0
- package/dist/internal/schema/parser.d.ts.map +1 -0
- package/dist/internal/schema/parser.js +13 -0
- package/dist/internal/schema/parser.js.map +1 -0
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/internal/schema/toArbitrary.js.map +1 -1
- package/dist/internal/schema/toCodeDocument.js.map +1 -1
- package/dist/internal/schema/toEquivalence.js.map +1 -1
- package/dist/internal/schema/toJsonSchemaDocument.js +48 -6
- package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/toRepresentation.js +87 -107
- package/dist/internal/schema/toRepresentation.js.map +1 -1
- package/dist/internal/stackTraceLimit.js.map +1 -1
- package/dist/internal/stream.js.map +1 -1
- package/dist/internal/tracer.js.map +1 -1
- package/dist/internal/trie.js +13 -9
- package/dist/internal/trie.js.map +1 -1
- package/dist/testing/FastCheck.d.ts +8 -7
- package/dist/testing/FastCheck.d.ts.map +1 -1
- package/dist/testing/FastCheck.js +8 -7
- package/dist/testing/FastCheck.js.map +1 -1
- package/dist/testing/TestClock.d.ts +57 -28
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +50 -18
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestConsole.d.ts +32 -31
- package/dist/testing/TestConsole.d.ts.map +1 -1
- package/dist/testing/TestConsole.js +24 -22
- package/dist/testing/TestConsole.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +29 -29
- package/dist/testing/TestSchema.js +25 -25
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +95 -118
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +94 -117
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +132 -97
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +55 -51
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +32 -28
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +26 -21
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +107 -67
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +104 -64
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpProtocol.d.ts +30 -0
- package/dist/unstable/ai/McpProtocol.d.ts.map +1 -0
- package/dist/unstable/ai/McpProtocol.js +20 -0
- package/dist/unstable/ai/McpProtocol.js.map +1 -0
- package/dist/unstable/ai/McpSchema.d.ts +141 -75
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +58 -50
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +68 -59
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +694 -241
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +8 -19
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +9 -20
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +112 -38
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +53 -17
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +28 -14
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +9 -4
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +46 -13
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +18 -7
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +14 -3
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +10 -2
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +59 -44
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +48 -39
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +26 -8
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +18 -4
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +4 -0
- package/dist/unstable/ai/index.d.ts.map +1 -1
- package/dist/unstable/ai/index.js +4 -0
- package/dist/unstable/ai/index.js.map +1 -1
- package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
- package/dist/unstable/ai/internal/mcpProtocol.d.ts +21 -0
- package/dist/unstable/ai/internal/mcpProtocol.d.ts.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocol.js +22 -0
- package/dist/unstable/ai/internal/mcpProtocol.js.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts +2 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.d.ts.map +1 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.js +32 -0
- package/dist/unstable/ai/internal/mcpProtocolRegistry.js.map +1 -0
- package/dist/unstable/ai/internal/structured-output.js +14 -15
- package/dist/unstable/ai/internal/structured-output.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +273 -69
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +111 -33
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliConfig.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +69 -76
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +57 -61
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +35 -54
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +26 -42
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +705 -107
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +238 -42
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Completions.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +418 -138
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +197 -71
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +1 -1
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +12 -4
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/Param.d.ts +292 -78
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +128 -46
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +370 -149
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +344 -136
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +23 -14
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +23 -14
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/ansi.js.map +1 -1
- package/dist/unstable/cli/internal/auto-suggest.js.map +1 -1
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/completions/fish.js.map +1 -1
- package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
- package/dist/unstable/cli/internal/config.js.map +1 -1
- package/dist/unstable/cli/internal/help.js.map +1 -1
- package/dist/unstable/cli/internal/lexer.js +17 -7
- package/dist/unstable/cli/internal/lexer.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +2 -2
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cli/internal/wizard.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.js.map +1 -1
- package/dist/unstable/cluster/ClusterMetrics.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +8 -8
- package/dist/unstable/cluster/ClusterSchema.js +8 -8
- 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 +5 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/DeliverAt.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +10 -10
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +8 -8
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.js.map +1 -1
- package/dist/unstable/cluster/EntityId.js.map +1 -1
- package/dist/unstable/cluster/EntityProxy.d.ts +4 -2
- package/dist/unstable/cluster/EntityProxy.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxy.js +4 -2
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +2 -2
- package/dist/unstable/cluster/EntityResource.js +2 -2
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/EntityType.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +3 -3
- package/dist/unstable/cluster/Envelope.js +3 -3
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts +2 -2
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +6 -4
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/MachineId.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +9 -9
- package/dist/unstable/cluster/Message.js +6 -6
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +15 -15
- package/dist/unstable/cluster/MessageStorage.js +5 -5
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +4 -4
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.js.map +1 -1
- package/dist/unstable/cluster/RunnerAddress.js.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +1 -1
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.d.ts +2 -1
- package/dist/unstable/cluster/RunnerServer.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +16 -16
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +2 -2
- package/dist/unstable/cluster/RunnerStorage.js +1 -1
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +6 -6
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +19 -10
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +3 -2
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +3 -3
- package/dist/unstable/cluster/ShardingConfig.js +3 -3
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/ShardingRegistrationEvent.js.map +1 -1
- package/dist/unstable/cluster/SingleRunner.js.map +1 -1
- package/dist/unstable/cluster/Singleton.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +1 -1
- package/dist/unstable/cluster/SingletonAddress.js +1 -1
- package/dist/unstable/cluster/SingletonAddress.js.map +1 -1
- package/dist/unstable/cluster/Snowflake.d.ts +8 -8
- package/dist/unstable/cluster/Snowflake.js +8 -8
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +20 -5
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/TestRunner.js.map +1 -1
- package/dist/unstable/cluster/index.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +5 -5
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/hash.js.map +1 -1
- package/dist/unstable/cluster/internal/interruptors.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/cluster/internal/shardLock.js.map +1 -1
- package/dist/unstable/devtools/DevTools.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.js.map +1 -1
- package/dist/unstable/devtools/DevToolsServer.js.map +1 -1
- package/dist/unstable/devtools/index.js.map +1 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +6 -8
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.js.map +1 -1
- package/dist/unstable/encoding/Sse.d.ts +72 -8
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +58 -8
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +20 -20
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventGroup.d.ts +4 -4
- package/dist/unstable/eventlog/EventGroup.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +15 -15
- package/dist/unstable/eventlog/EventJournal.js +13 -13
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +3 -3
- package/dist/unstable/eventlog/EventLog.js +3 -3
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +2 -2
- package/dist/unstable/eventlog/EventLogMessage.js +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +15 -15
- package/dist/unstable/eventlog/EventLogRemote.js +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +11 -2
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +45 -21
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts +4 -4
- package/dist/unstable/eventlog/EventLogServerEncrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerEncrypted.js +13 -5
- package/dist/unstable/eventlog/EventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts +5 -5
- package/dist/unstable/eventlog/EventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +14 -6
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.d.ts +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js +1 -1
- package/dist/unstable/eventlog/EventLogSessionAuth.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerEncrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/index.js.map +1 -1
- package/dist/unstable/eventlog/internal/identityRootSecretDerivation.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +2 -2
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +30 -18
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +1 -1
- package/dist/unstable/http/Etag.js +1 -1
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +2 -2
- package/dist/unstable/http/Headers.js +2 -2
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +5 -3
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +11 -5
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +51 -44
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +46 -17
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +2 -0
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +4 -4
- package/dist/unstable/http/HttpClientResponse.js +2 -2
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +6 -6
- package/dist/unstable/http/HttpEffect.js +3 -3
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +6 -9
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +6 -9
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +75 -9
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +164 -39
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +76 -0
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +32 -0
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +88 -89
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +78 -79
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +13 -13
- package/dist/unstable/http/HttpServer.js +6 -6
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +2 -2
- package/dist/unstable/http/HttpServerError.js +2 -2
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +4 -4
- package/dist/unstable/http/HttpServerRequest.js +4 -4
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +22 -0
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +10 -0
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +35 -7
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +35 -7
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/HttpTraceContext.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +6 -6
- package/dist/unstable/http/Multipart.js +5 -5
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/Template.js.map +1 -1
- package/dist/unstable/http/Url.d.ts +33 -63
- package/dist/unstable/http/Url.d.ts.map +1 -1
- package/dist/unstable/http/Url.js +14 -28
- package/dist/unstable/http/Url.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +10 -18
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +9 -17
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/http/internal/compression.d.ts +2 -0
- package/dist/unstable/http/internal/compression.d.ts.map +1 -0
- package/dist/unstable/http/internal/compression.js +155 -0
- package/dist/unstable/http/internal/compression.js.map +1 -0
- package/dist/unstable/http/internal/preResponseHandler.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +10 -11
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +4 -5
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +11 -13
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +42 -42
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.js +13 -13
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +15 -15
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +71 -24
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +57 -10
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +0 -12
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +6 -6
- package/dist/unstable/httpapi/HttpApiSchema.js +4 -4
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +13 -13
- package/dist/unstable/httpapi/OpenApi.js +13 -13
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/httpapi/index.js.map +1 -1
- package/dist/unstable/httpapi/internal/html.js.map +1 -1
- package/dist/unstable/httpapi/internal/httpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/internal/httpApiSwagger.js.map +1 -1
- package/dist/unstable/httpapi/internal/mediaType.js.map +1 -1
- package/dist/unstable/observability/Otlp.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +12 -14
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +17 -4
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +4 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts +16 -7
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +21 -12
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +13 -4
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +10 -3
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/observability/index.js.map +1 -1
- package/dist/unstable/observability/internal/otlpEnv.js +1 -1
- package/dist/unstable/observability/internal/otlpEnv.js.map +1 -1
- package/dist/unstable/observability/internal/otlpProtobuf.js.map +1 -1
- package/dist/unstable/observability/internal/protobuf.js +3 -0
- package/dist/unstable/observability/internal/protobuf.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +8 -3
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +22 -13
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +8 -8
- package/dist/unstable/persistence/Persistable.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +6 -6
- package/dist/unstable/persistence/PersistedQueue.js +6 -6
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +3 -3
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +91 -15
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +26 -15
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +24 -13
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +2 -2
- package/dist/unstable/persistence/Redis.js +1 -1
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/persistence/index.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +64 -21
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +14 -5
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +21 -10
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/process/index.js.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.d.ts +8 -8
- package/dist/unstable/reactivity/AsyncResult.d.ts.map +1 -1
- package/dist/unstable/reactivity/AsyncResult.js +10 -10
- package/dist/unstable/reactivity/AsyncResult.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +25 -22
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +14 -13
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +4 -1
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRef.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +24 -3
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +4 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +1 -1
- package/dist/unstable/reactivity/Hydration.js +1 -1
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +35 -33
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +4 -2
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +12 -12
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +12 -11
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +8 -8
- package/dist/unstable/rpc/RpcGroup.js +1 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +31 -30
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +6 -6
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +10 -10
- package/dist/unstable/rpc/RpcMiddleware.js +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +4 -4
- package/dist/unstable/rpc/RpcSchema.js +3 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +58 -7
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +175 -96
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +13 -13
- package/dist/unstable/rpc/RpcServer.js +17 -13
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcTest.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +5 -5
- package/dist/unstable/rpc/RpcWorker.js +4 -4
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/rpc/index.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +52 -50
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +35 -33
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +5 -5
- package/dist/unstable/schema/VariantSchema.js +2 -2
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/schema/index.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +11 -3
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +9 -4
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/socket/index.js.map +1 -1
- package/dist/unstable/sql/Migrator.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +2 -2
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +2 -2
- package/dist/unstable/sql/SqlModel.js +2 -2
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.d.ts +5 -5
- package/dist/unstable/sql/SqlResolver.js +2 -2
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/SqlStream.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +6 -6
- package/dist/unstable/sql/Statement.js +15 -15
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/sql/index.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +2 -2
- package/dist/unstable/workers/Worker.js +2 -2
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +7 -7
- package/dist/unstable/workers/WorkerError.js +6 -6
- package/dist/unstable/workers/WorkerError.js.map +1 -1
- package/dist/unstable/workers/WorkerRunner.d.ts +1 -1
- package/dist/unstable/workers/WorkerRunner.js +1 -1
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workers/index.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +2 -2
- package/dist/unstable/workflow/Activity.js +2 -2
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +1 -1
- package/dist/unstable/workflow/DurableClock.js +1 -1
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts +10 -10
- package/dist/unstable/workflow/DurableDeferred.js +5 -5
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +22 -20
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +22 -20
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +21 -21
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +13 -14
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.d.ts +4 -2
- package/dist/unstable/workflow/WorkflowProxy.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxy.js +4 -2
- package/dist/unstable/workflow/WorkflowProxy.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/dist/unstable/workflow/index.js.map +1 -1
- package/dist/unstable/workflow/internal/crypto.js.map +1 -1
- package/package.json +5 -6
- package/src/Array.ts +982 -1045
- package/src/BigDecimal.ts +433 -756
- package/src/BigInt.ts +213 -269
- package/src/Boolean.ts +146 -188
- package/src/Cache.ts +409 -255
- package/src/Cause.ts +167 -277
- package/src/Channel.ts +891 -816
- package/src/ChannelSchema.ts +1 -1
- package/src/Chunk.ts +841 -1181
- package/src/Clock.ts +181 -49
- package/src/Combiner.ts +20 -33
- package/src/Config.ts +615 -332
- package/src/ConfigProvider.ts +214 -120
- package/src/Console.ts +289 -39
- package/src/Context.ts +319 -378
- package/src/Cron.ts +68 -77
- package/src/Crypto.ts +13 -15
- package/src/Data.ts +60 -80
- package/src/DateTime.ts +564 -660
- package/src/Deferred.ts +253 -256
- package/src/Duration.ts +216 -308
- package/src/Effect.ts +2893 -3279
- package/src/Encoding.ts +22 -40
- package/src/Equal.ts +49 -39
- package/src/Equivalence.ts +103 -105
- package/src/ErrorReporter.ts +51 -27
- package/src/ExecutionPlan.ts +13 -55
- package/src/Exit.ts +116 -192
- package/src/Fiber.ts +81 -148
- package/src/FiberHandle.ts +152 -105
- package/src/FiberMap.ts +225 -174
- package/src/FiberSet.ts +124 -82
- package/src/FileSystem.ts +155 -263
- package/src/Filter.ts +61 -33
- package/src/Formatter.ts +54 -56
- package/src/Function.ts +76 -145
- package/src/Graph.ts +416 -770
- package/src/HKT.ts +12 -6
- package/src/Hash.ts +52 -83
- package/src/HashMap.ts +319 -411
- package/src/HashRing.ts +1 -0
- package/src/HashSet.ts +177 -284
- package/src/Inspectable.ts +12 -12
- package/src/Iterable.ts +620 -786
- package/src/JsonPatch.ts +58 -112
- package/src/JsonPointer.ts +8 -8
- package/src/JsonSchema.ts +402 -244
- package/src/Latch.ts +23 -35
- package/src/Layer.ts +359 -260
- package/src/LayerMap.ts +49 -29
- package/src/LayerRef.ts +6 -2
- package/src/LogLevel.ts +114 -214
- package/src/Logger.ts +344 -697
- package/src/ManagedRuntime.ts +7 -5
- package/src/Match.ts +217 -252
- package/src/Metric.ts +516 -1089
- package/src/MutableHashMap.ts +218 -255
- package/src/MutableHashSet.ts +84 -89
- package/src/MutableList.ts +73 -370
- package/src/MutableRef.ts +420 -243
- package/src/Newtype.ts +21 -14
- package/src/NonEmptyIterable.ts +7 -137
- package/src/Number.ts +196 -233
- package/src/Optic.ts +243 -383
- package/src/Option.ts +447 -812
- package/src/Order.ts +109 -109
- package/src/Ordering.ts +20 -23
- package/src/Path.ts +38 -41
- package/src/Pipeable.ts +6 -5
- package/src/PlatformError.ts +4 -4
- package/src/Pool.ts +4 -2
- package/src/Predicate.ts +200 -181
- package/src/PrimaryKey.ts +7 -7
- package/src/PubSub.ts +526 -552
- package/src/Pull.ts +24 -18
- package/src/Queue.ts +200 -159
- package/src/Random.ts +49 -74
- package/src/RcMap.ts +121 -63
- package/src/RcRef.ts +24 -13
- package/src/Record.ts +291 -488
- package/src/Redactable.ts +10 -3
- package/src/Redacted.ts +25 -25
- package/src/Reducer.ts +8 -15
- package/src/Ref.ts +221 -361
- package/src/References.ts +102 -168
- package/src/RegExp.ts +10 -14
- package/src/Request.ts +31 -21
- package/src/RequestResolver.ts +202 -91
- package/src/Result.ts +312 -484
- package/src/Runtime.ts +50 -75
- package/src/Schedule.ts +308 -1734
- package/src/Scheduler.ts +20 -7
- package/src/Schema.ts +716 -745
- package/src/SchemaAST.ts +466 -358
- package/src/SchemaError.ts +7 -6
- package/src/SchemaGetter.ts +242 -190
- package/src/SchemaIssue.ts +89 -275
- package/src/SchemaParser.ts +180 -93
- package/src/SchemaRepresentation.ts +22 -40
- package/src/SchemaTransformation.ts +129 -88
- package/src/Scope.ts +123 -151
- package/src/ScopedRef.ts +4 -4
- package/src/Semaphore.ts +152 -51
- package/src/Sink.ts +128 -113
- package/src/Stdio.ts +1 -1
- package/src/Stream.ts +2602 -3123
- package/src/String.ts +275 -312
- package/src/Struct.ts +109 -114
- package/src/SubscriptionRef.ts +284 -252
- package/src/Symbol.ts +3 -3
- package/src/Terminal.ts +2 -2
- package/src/Tracer.ts +102 -55
- package/src/Trie.ts +287 -679
- package/src/Tuple.ts +92 -127
- package/src/TxChunk.ts +201 -121
- package/src/TxDeferred.ts +62 -46
- package/src/TxHashMap.ts +645 -799
- package/src/TxHashSet.ts +443 -356
- package/src/TxPriorityQueue.ts +130 -98
- package/src/TxPubSub.ts +107 -80
- package/src/TxQueue.ts +214 -183
- package/src/TxReentrantLock.ts +97 -66
- package/src/TxRef.ts +51 -32
- package/src/TxSemaphore.ts +129 -95
- package/src/TxSubscriptionRef.ts +97 -70
- package/src/Types.ts +126 -67
- package/src/Unify.ts +45 -65
- package/src/Utils.ts +23 -16
- package/src/internal/core.ts +2 -2
- package/src/internal/dateTime.ts +6 -0
- package/src/internal/effect.ts +93 -48
- package/src/internal/persistence.ts +2 -0
- package/src/internal/references.ts +3 -2
- package/src/internal/schema/fromJsonSchemaDocument.ts +15 -13
- package/src/internal/schema/fromRepresentation.ts +10 -16
- package/src/internal/schema/parser.ts +22 -0
- package/src/internal/schema/toJsonSchemaDocument.ts +60 -6
- package/src/internal/schema/toRepresentation.ts +104 -119
- package/src/internal/trie.ts +10 -11
- package/src/testing/FastCheck.ts +8 -7
- package/src/testing/TestClock.ts +72 -30
- package/src/testing/TestConsole.ts +32 -31
- package/src/testing/TestSchema.ts +29 -29
- package/src/unstable/ai/AiError.ts +95 -118
- package/src/unstable/ai/AnthropicStructuredOutput.ts +1 -1
- package/src/unstable/ai/Chat.ts +132 -97
- package/src/unstable/ai/IdGenerator.ts +32 -28
- package/src/unstable/ai/LanguageModel.ts +107 -67
- package/src/unstable/ai/McpProtocol.ts +48 -0
- package/src/unstable/ai/McpSchema.ts +60 -50
- package/src/unstable/ai/McpServer.ts +930 -304
- package/src/unstable/ai/Model.ts +9 -20
- package/src/unstable/ai/OpenAiStructuredOutput.ts +1 -1
- package/src/unstable/ai/Prompt.ts +145 -43
- package/src/unstable/ai/Response.ts +28 -14
- package/src/unstable/ai/Telemetry.ts +46 -13
- package/src/unstable/ai/Tokenizer.ts +14 -3
- package/src/unstable/ai/Tool.ts +59 -44
- package/src/unstable/ai/Toolkit.ts +26 -8
- package/src/unstable/ai/index.ts +5 -0
- package/src/unstable/ai/internal/mcpProtocol.ts +85 -0
- package/src/unstable/ai/internal/mcpProtocolRegistry.ts +70 -0
- package/src/unstable/ai/internal/structured-output.ts +13 -18
- package/src/unstable/cli/Argument.ts +273 -69
- package/src/unstable/cli/CliError.ts +69 -76
- package/src/unstable/cli/CliOutput.ts +44 -58
- package/src/unstable/cli/Command.ts +705 -107
- package/src/unstable/cli/Flag.ts +418 -138
- package/src/unstable/cli/GlobalFlag.ts +1 -1
- package/src/unstable/cli/HelpDoc.ts +12 -4
- package/src/unstable/cli/Param.ts +292 -78
- package/src/unstable/cli/Primitive.ts +370 -149
- package/src/unstable/cli/Prompt.ts +28 -14
- package/src/unstable/cli/internal/lexer.ts +8 -2
- package/src/unstable/cli/internal/parser.ts +2 -2
- package/src/unstable/cluster/ClusterSchema.ts +8 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +5 -1
- package/src/unstable/cluster/Entity.ts +15 -16
- package/src/unstable/cluster/EntityProxy.ts +4 -2
- package/src/unstable/cluster/EntityResource.ts +2 -2
- package/src/unstable/cluster/Envelope.ts +3 -3
- package/src/unstable/cluster/HttpRunner.ts +6 -4
- package/src/unstable/cluster/Message.ts +9 -9
- package/src/unstable/cluster/MessageStorage.ts +15 -15
- package/src/unstable/cluster/Reply.ts +4 -6
- package/src/unstable/cluster/RunnerHealth.ts +1 -1
- package/src/unstable/cluster/RunnerServer.ts +41 -8
- package/src/unstable/cluster/RunnerStorage.ts +2 -2
- package/src/unstable/cluster/Runners.ts +23 -12
- package/src/unstable/cluster/Sharding.ts +7 -8
- package/src/unstable/cluster/ShardingConfig.ts +3 -3
- package/src/unstable/cluster/SingletonAddress.ts +1 -1
- package/src/unstable/cluster/Snowflake.ts +8 -8
- package/src/unstable/cluster/SqlMessageStorage.ts +1 -1
- package/src/unstable/cluster/SqlRunnerStorage.ts +21 -5
- package/src/unstable/cluster/internal/entityManager.ts +11 -15
- package/src/unstable/encoding/Msgpack.ts +6 -8
- package/src/unstable/encoding/Sse.ts +98 -16
- package/src/unstable/eventlog/Event.ts +20 -20
- package/src/unstable/eventlog/EventGroup.ts +4 -4
- package/src/unstable/eventlog/EventJournal.ts +15 -15
- package/src/unstable/eventlog/EventLog.ts +3 -3
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogMessage.ts +2 -2
- package/src/unstable/eventlog/EventLogRemote.ts +1 -1
- package/src/unstable/eventlog/EventLogServer.ts +41 -7
- package/src/unstable/eventlog/EventLogServerEncrypted.ts +13 -5
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +14 -6
- package/src/unstable/eventlog/EventLogSessionAuth.ts +1 -1
- package/src/unstable/http/Cookies.ts +35 -21
- package/src/unstable/http/Etag.ts +1 -1
- package/src/unstable/http/FetchHttpClient.ts +3 -1
- package/src/unstable/http/Headers.ts +2 -2
- package/src/unstable/http/HttpBody.ts +20 -5
- package/src/unstable/http/HttpClient.ts +83 -55
- package/src/unstable/http/HttpClientRequest.ts +2 -0
- package/src/unstable/http/HttpClientResponse.ts +4 -4
- package/src/unstable/http/HttpEffect.ts +8 -8
- package/src/unstable/http/HttpMethod.ts +6 -9
- package/src/unstable/http/HttpMiddleware.ts +202 -39
- package/src/unstable/http/HttpPlatform.ts +95 -0
- package/src/unstable/http/HttpRouter.ts +102 -98
- package/src/unstable/http/HttpServer.ts +13 -13
- package/src/unstable/http/HttpServerError.ts +2 -2
- package/src/unstable/http/HttpServerRequest.ts +4 -4
- package/src/unstable/http/HttpServerResponse.ts +30 -0
- package/src/unstable/http/HttpStaticServer.ts +35 -7
- package/src/unstable/http/Multipart.ts +6 -6
- package/src/unstable/http/Url.ts +33 -63
- package/src/unstable/http/UrlParams.ts +10 -18
- package/src/unstable/http/internal/compression.ts +196 -0
- package/src/unstable/httpapi/HttpApiBuilder.ts +10 -9
- package/src/unstable/httpapi/HttpApiClient.ts +14 -14
- package/src/unstable/httpapi/HttpApiEndpoint.ts +42 -42
- package/src/unstable/httpapi/HttpApiError.ts +13 -13
- package/src/unstable/httpapi/HttpApiGroup.ts +15 -15
- package/src/unstable/httpapi/HttpApiMiddleware.ts +71 -24
- package/src/unstable/httpapi/HttpApiScalar.ts +0 -12
- package/src/unstable/httpapi/HttpApiSchema.ts +6 -6
- package/src/unstable/httpapi/OpenApi.ts +13 -13
- package/src/unstable/observability/OtlpExporter.ts +31 -19
- package/src/unstable/observability/OtlpMetrics.ts +4 -1
- package/src/unstable/observability/OtlpResource.ts +26 -17
- package/src/unstable/observability/PrometheusMetrics.ts +13 -4
- package/src/unstable/observability/internal/otlpEnv.ts +1 -1
- package/src/unstable/observability/internal/protobuf.ts +3 -0
- package/src/unstable/persistence/KeyValueStore.ts +72 -49
- package/src/unstable/persistence/Persistable.ts +8 -8
- package/src/unstable/persistence/PersistedQueue.ts +6 -6
- package/src/unstable/persistence/Persistence.ts +126 -19
- package/src/unstable/persistence/RateLimiter.ts +26 -15
- package/src/unstable/persistence/Redis.ts +2 -2
- package/src/unstable/process/ChildProcess.ts +64 -21
- package/src/unstable/process/ChildProcessSpawner.ts +21 -10
- package/src/unstable/reactivity/AsyncResult.ts +12 -13
- package/src/unstable/reactivity/Atom.ts +28 -25
- package/src/unstable/reactivity/AtomHttpApi.ts +5 -4
- package/src/unstable/reactivity/AtomRegistry.ts +24 -3
- package/src/unstable/reactivity/AtomRpc.ts +5 -4
- package/src/unstable/reactivity/Hydration.ts +1 -1
- package/src/unstable/rpc/Rpc.ts +35 -33
- package/src/unstable/rpc/RpcClient.ts +16 -15
- package/src/unstable/rpc/RpcGroup.ts +8 -8
- package/src/unstable/rpc/RpcMessage.ts +31 -30
- package/src/unstable/rpc/RpcMiddleware.ts +10 -10
- package/src/unstable/rpc/RpcSchema.ts +4 -4
- package/src/unstable/rpc/RpcSerialization.ts +167 -68
- package/src/unstable/rpc/RpcServer.ts +18 -15
- package/src/unstable/rpc/RpcWorker.ts +5 -5
- package/src/unstable/schema/Model.ts +52 -50
- package/src/unstable/schema/VariantSchema.ts +5 -5
- package/src/unstable/socket/Socket.ts +17 -4
- package/src/unstable/sql/SqlClient.ts +5 -6
- package/src/unstable/sql/SqlModel.ts +2 -2
- package/src/unstable/sql/SqlResolver.ts +5 -5
- package/src/unstable/sql/Statement.ts +24 -23
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +2 -2
- package/src/unstable/workers/WorkerError.ts +7 -7
- package/src/unstable/workers/WorkerRunner.ts +1 -1
- package/src/unstable/workflow/Activity.ts +2 -2
- package/src/unstable/workflow/DurableClock.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +10 -10
- package/src/unstable/workflow/DurableQueue.ts +22 -20
- package/src/unstable/workflow/Workflow.ts +23 -23
- package/src/unstable/workflow/WorkflowEngine.ts +1 -1
- package/src/unstable/workflow/WorkflowProxy.ts +4 -2
- package/dist/internal/version.d.ts +0 -3
- package/dist/internal/version.d.ts.map +0 -1
- package/dist/internal/version.js +0 -2
- package/dist/internal/version.js.map +0 -1
- package/src/internal/version.ts +0 -2
|
@@ -39,9 +39,27 @@ import * as Param from "./Param.ts";
|
|
|
39
39
|
*
|
|
40
40
|
* **Example** (Defining CLI commands)
|
|
41
41
|
*
|
|
42
|
-
* ```ts
|
|
43
|
-
* import {
|
|
42
|
+
* ```ts import.meta.vitest
|
|
43
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
44
44
|
* import { Argument, Command, Flag } from "effect/unstable/cli"
|
|
45
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
46
|
+
*
|
|
47
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
48
|
+
* FileSystem.layerNoop({}),
|
|
49
|
+
* Path.layer,
|
|
50
|
+
* Stdio.layerTest({}),
|
|
51
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
52
|
+
* columns: Effect.succeed(80),
|
|
53
|
+
* rows: Effect.succeed(24),
|
|
54
|
+
* readInput: Effect.die("unused"),
|
|
55
|
+
* readLine: Effect.die("unused"),
|
|
56
|
+
* display: () => Effect.void
|
|
57
|
+
* })),
|
|
58
|
+
* Layer.succeed(
|
|
59
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
60
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
61
|
+
* )
|
|
62
|
+
* )
|
|
45
63
|
*
|
|
46
64
|
* // Simple command with no configuration
|
|
47
65
|
* const version: Command.Command<"version", {}, {}, never, never> = Command.make(
|
|
@@ -66,9 +84,15 @@ import * as Param from "./Param.ts";
|
|
|
66
84
|
* })
|
|
67
85
|
*
|
|
68
86
|
* // Command with handler
|
|
87
|
+
* const output: Array<string> = []
|
|
69
88
|
* const greet = Command.make("greet", {
|
|
70
89
|
* name: Flag.string("name")
|
|
71
|
-
* }, (config) =>
|
|
90
|
+
* }, (config) => Effect.sync(() => output.push(`Hello, ${config.name}!`)).pipe(Effect.asVoid))
|
|
91
|
+
*
|
|
92
|
+
* await Effect.runPromise(
|
|
93
|
+
* Command.runWith(greet, { version: "1.0.0" })(["--name", "Alice"]).pipe(Effect.provide(CliTestLayer))
|
|
94
|
+
* )
|
|
95
|
+
* output // => ["Hello, Alice!"]
|
|
72
96
|
* ```
|
|
73
97
|
*
|
|
74
98
|
* @category models
|
|
@@ -158,19 +182,19 @@ export declare namespace Command {
|
|
|
158
182
|
*
|
|
159
183
|
* **Example** (Configuring command input)
|
|
160
184
|
*
|
|
161
|
-
* ```ts
|
|
185
|
+
* ```ts import.meta.vitest
|
|
162
186
|
* import { Argument, Flag } from "effect/unstable/cli"
|
|
163
187
|
* import type { Command as CliCommand } from "effect/unstable/cli"
|
|
164
188
|
*
|
|
165
189
|
* // Simple flat configuration
|
|
166
|
-
* const simpleConfig
|
|
190
|
+
* const simpleConfig = {
|
|
167
191
|
* name: Flag.string("name"),
|
|
168
192
|
* age: Flag.integer("age"),
|
|
169
193
|
* file: Argument.string("file")
|
|
170
|
-
* }
|
|
194
|
+
* } satisfies CliCommand.Command.Config
|
|
171
195
|
*
|
|
172
196
|
* // Nested configuration for organization
|
|
173
|
-
* const nestedConfig
|
|
197
|
+
* const nestedConfig = {
|
|
174
198
|
* user: {
|
|
175
199
|
* name: Flag.string("name"),
|
|
176
200
|
* email: Flag.string("email")
|
|
@@ -179,7 +203,9 @@ export declare namespace Command {
|
|
|
179
203
|
* host: Flag.string("host"),
|
|
180
204
|
* port: Flag.integer("port")
|
|
181
205
|
* }
|
|
182
|
-
* }
|
|
206
|
+
* } satisfies CliCommand.Command.Config
|
|
207
|
+
*
|
|
208
|
+
* [simpleConfig.name.kind, nestedConfig.server.port.kind] // => ["flag", "flag"]
|
|
183
209
|
* ```
|
|
184
210
|
*
|
|
185
211
|
* @category models
|
|
@@ -217,7 +243,7 @@ export declare namespace Command {
|
|
|
217
243
|
*
|
|
218
244
|
* **Example** (Inferring command input)
|
|
219
245
|
*
|
|
220
|
-
* ```ts
|
|
246
|
+
* ```ts import.meta.vitest
|
|
221
247
|
* import { Flag } from "effect/unstable/cli"
|
|
222
248
|
* import type { Command as CliCommand } from "effect/unstable/cli"
|
|
223
249
|
*
|
|
@@ -237,6 +263,12 @@ export declare namespace Command {
|
|
|
237
263
|
* // readonly port: number
|
|
238
264
|
* // }
|
|
239
265
|
* // }
|
|
266
|
+
*
|
|
267
|
+
* const inferred: Result = {
|
|
268
|
+
* name: "Alice",
|
|
269
|
+
* server: { host: "localhost", port: 8080 }
|
|
270
|
+
* }
|
|
271
|
+
* inferred // => { name: "Alice", server: { host: "localhost", port: 8080 } }
|
|
240
272
|
* ```
|
|
241
273
|
*
|
|
242
274
|
* @category models
|
|
@@ -332,9 +364,27 @@ export type Services<C> = C extends Command<infer _Name, infer _Input, infer _Co
|
|
|
332
364
|
*
|
|
333
365
|
* **Example** (Accessing parent command context)
|
|
334
366
|
*
|
|
335
|
-
* ```ts
|
|
336
|
-
* import {
|
|
367
|
+
* ```ts import.meta.vitest
|
|
368
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
337
369
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
370
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
371
|
+
*
|
|
372
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
373
|
+
* FileSystem.layerNoop({}),
|
|
374
|
+
* Path.layer,
|
|
375
|
+
* Stdio.layerTest({}),
|
|
376
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
377
|
+
* columns: Effect.succeed(80),
|
|
378
|
+
* rows: Effect.succeed(24),
|
|
379
|
+
* readInput: Effect.die("unused"),
|
|
380
|
+
* readLine: Effect.die("unused"),
|
|
381
|
+
* display: () => Effect.void
|
|
382
|
+
* })),
|
|
383
|
+
* Layer.succeed(
|
|
384
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
385
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
386
|
+
* )
|
|
387
|
+
* )
|
|
338
388
|
*
|
|
339
389
|
* const parent = Command.make("app").pipe(
|
|
340
390
|
* Command.withSharedFlags({
|
|
@@ -343,19 +393,31 @@ export type Services<C> = C extends Command<infer _Name, infer _Input, infer _Co
|
|
|
343
393
|
* })
|
|
344
394
|
* )
|
|
345
395
|
*
|
|
396
|
+
* const output: Array<string> = []
|
|
346
397
|
* const child = Command.make("deploy", {
|
|
347
398
|
* target: Flag.string("target")
|
|
348
399
|
* }, (config) =>
|
|
349
400
|
* Effect.gen(function*() {
|
|
350
401
|
* // Access parent's config by yielding the parent command
|
|
351
402
|
* const parentConfig = yield* parent
|
|
352
|
-
* yield*
|
|
353
|
-
* yield*
|
|
354
|
-
* yield*
|
|
403
|
+
* yield* Effect.sync(() => output.push(`Verbose: ${parentConfig.verbose}`))
|
|
404
|
+
* yield* Effect.sync(() => output.push(`Config: ${parentConfig.config}`))
|
|
405
|
+
* yield* Effect.sync(() => output.push(`Target: ${config.target}`))
|
|
355
406
|
* }))
|
|
356
407
|
*
|
|
357
408
|
* const app = parent.pipe(Command.withSubcommands([child]))
|
|
358
|
-
*
|
|
409
|
+
*
|
|
410
|
+
* await Effect.runPromise(
|
|
411
|
+
* Command.runWith(app, { version: "1.0.0" })([
|
|
412
|
+
* "--verbose",
|
|
413
|
+
* "--config",
|
|
414
|
+
* "prod.json",
|
|
415
|
+
* "deploy",
|
|
416
|
+
* "--target",
|
|
417
|
+
* "staging"
|
|
418
|
+
* ]).pipe(Effect.provide(CliTestLayer))
|
|
419
|
+
* )
|
|
420
|
+
* output // => ["Verbose: true", "Config: prod.json", "Target: staging"]
|
|
359
421
|
* ```
|
|
360
422
|
*
|
|
361
423
|
* @category models
|
|
@@ -404,9 +466,27 @@ export declare const isCommand: (u: unknown) => u is Command.Any;
|
|
|
404
466
|
*
|
|
405
467
|
* **Example** (Creating commands)
|
|
406
468
|
*
|
|
407
|
-
* ```ts
|
|
408
|
-
* import {
|
|
469
|
+
* ```ts import.meta.vitest
|
|
470
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
409
471
|
* import { Argument, Command, Flag } from "effect/unstable/cli"
|
|
472
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
473
|
+
*
|
|
474
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
475
|
+
* FileSystem.layerNoop({}),
|
|
476
|
+
* Path.layer,
|
|
477
|
+
* Stdio.layerTest({}),
|
|
478
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
479
|
+
* columns: Effect.succeed(80),
|
|
480
|
+
* rows: Effect.succeed(24),
|
|
481
|
+
* readInput: Effect.die("unused"),
|
|
482
|
+
* readLine: Effect.die("unused"),
|
|
483
|
+
* display: () => Effect.void
|
|
484
|
+
* })),
|
|
485
|
+
* Layer.succeed(
|
|
486
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
487
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
488
|
+
* )
|
|
489
|
+
* )
|
|
410
490
|
*
|
|
411
491
|
* // Simple command with no configuration
|
|
412
492
|
* const version = Command.make("version")
|
|
@@ -431,19 +511,29 @@ export declare const isCommand: (u: unknown) => u is Command.Any;
|
|
|
431
511
|
* })
|
|
432
512
|
*
|
|
433
513
|
* // Command with handler
|
|
514
|
+
* const output: Array<string> = []
|
|
434
515
|
* const deployWithHandler = Command.make("deploy", {
|
|
435
516
|
* environment: Flag.string("env"),
|
|
436
517
|
* force: Flag.boolean("force")
|
|
437
518
|
* }, (config) =>
|
|
438
519
|
* Effect.gen(function*() {
|
|
439
|
-
* yield*
|
|
520
|
+
* yield* Effect.sync(() => output.push(`Starting deployment to ${config.environment}`))
|
|
440
521
|
*
|
|
441
522
|
* if (!config.force && config.environment === "production") {
|
|
442
523
|
* return yield* Effect.fail("Production deployments require --force flag")
|
|
443
524
|
* }
|
|
444
525
|
*
|
|
445
|
-
* yield*
|
|
526
|
+
* yield* Effect.sync(() => output.push("Deployment completed successfully"))
|
|
446
527
|
* }))
|
|
528
|
+
*
|
|
529
|
+
* await Effect.runPromise(
|
|
530
|
+
* Command.runWith(deployWithHandler, { version: "1.0.0" })([
|
|
531
|
+
* "--env",
|
|
532
|
+
* "staging",
|
|
533
|
+
* "--force"
|
|
534
|
+
* ]).pipe(Effect.provide(CliTestLayer))
|
|
535
|
+
* )
|
|
536
|
+
* output // => ["Starting deployment to staging", "Deployment completed successfully"]
|
|
447
537
|
* ```
|
|
448
538
|
*
|
|
449
539
|
* @category constructors
|
|
@@ -462,9 +552,27 @@ export declare const make: {
|
|
|
462
552
|
*
|
|
463
553
|
* **Example** (Creating commands)
|
|
464
554
|
*
|
|
465
|
-
* ```ts
|
|
466
|
-
* import {
|
|
555
|
+
* ```ts import.meta.vitest
|
|
556
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
467
557
|
* import { Argument, Command, Flag } from "effect/unstable/cli"
|
|
558
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
559
|
+
*
|
|
560
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
561
|
+
* FileSystem.layerNoop({}),
|
|
562
|
+
* Path.layer,
|
|
563
|
+
* Stdio.layerTest({}),
|
|
564
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
565
|
+
* columns: Effect.succeed(80),
|
|
566
|
+
* rows: Effect.succeed(24),
|
|
567
|
+
* readInput: Effect.die("unused"),
|
|
568
|
+
* readLine: Effect.die("unused"),
|
|
569
|
+
* display: () => Effect.void
|
|
570
|
+
* })),
|
|
571
|
+
* Layer.succeed(
|
|
572
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
573
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
574
|
+
* )
|
|
575
|
+
* )
|
|
468
576
|
*
|
|
469
577
|
* // Simple command with no configuration
|
|
470
578
|
* const version = Command.make("version")
|
|
@@ -489,19 +597,29 @@ export declare const make: {
|
|
|
489
597
|
* })
|
|
490
598
|
*
|
|
491
599
|
* // Command with handler
|
|
600
|
+
* const output: Array<string> = []
|
|
492
601
|
* const deployWithHandler = Command.make("deploy", {
|
|
493
602
|
* environment: Flag.string("env"),
|
|
494
603
|
* force: Flag.boolean("force")
|
|
495
604
|
* }, (config) =>
|
|
496
605
|
* Effect.gen(function*() {
|
|
497
|
-
* yield*
|
|
606
|
+
* yield* Effect.sync(() => output.push(`Starting deployment to ${config.environment}`))
|
|
498
607
|
*
|
|
499
608
|
* if (!config.force && config.environment === "production") {
|
|
500
609
|
* return yield* Effect.fail("Production deployments require --force flag")
|
|
501
610
|
* }
|
|
502
611
|
*
|
|
503
|
-
* yield*
|
|
612
|
+
* yield* Effect.sync(() => output.push("Deployment completed successfully"))
|
|
504
613
|
* }))
|
|
614
|
+
*
|
|
615
|
+
* await Effect.runPromise(
|
|
616
|
+
* Command.runWith(deployWithHandler, { version: "1.0.0" })([
|
|
617
|
+
* "--env",
|
|
618
|
+
* "staging",
|
|
619
|
+
* "--force"
|
|
620
|
+
* ]).pipe(Effect.provide(CliTestLayer))
|
|
621
|
+
* )
|
|
622
|
+
* output // => ["Starting deployment to staging", "Deployment completed successfully"]
|
|
505
623
|
* ```
|
|
506
624
|
*
|
|
507
625
|
* @category constructors
|
|
@@ -520,9 +638,27 @@ export declare const make: {
|
|
|
520
638
|
*
|
|
521
639
|
* **Example** (Creating commands)
|
|
522
640
|
*
|
|
523
|
-
* ```ts
|
|
524
|
-
* import {
|
|
641
|
+
* ```ts import.meta.vitest
|
|
642
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
525
643
|
* import { Argument, Command, Flag } from "effect/unstable/cli"
|
|
644
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
645
|
+
*
|
|
646
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
647
|
+
* FileSystem.layerNoop({}),
|
|
648
|
+
* Path.layer,
|
|
649
|
+
* Stdio.layerTest({}),
|
|
650
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
651
|
+
* columns: Effect.succeed(80),
|
|
652
|
+
* rows: Effect.succeed(24),
|
|
653
|
+
* readInput: Effect.die("unused"),
|
|
654
|
+
* readLine: Effect.die("unused"),
|
|
655
|
+
* display: () => Effect.void
|
|
656
|
+
* })),
|
|
657
|
+
* Layer.succeed(
|
|
658
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
659
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
660
|
+
* )
|
|
661
|
+
* )
|
|
526
662
|
*
|
|
527
663
|
* // Simple command with no configuration
|
|
528
664
|
* const version = Command.make("version")
|
|
@@ -547,19 +683,29 @@ export declare const make: {
|
|
|
547
683
|
* })
|
|
548
684
|
*
|
|
549
685
|
* // Command with handler
|
|
686
|
+
* const output: Array<string> = []
|
|
550
687
|
* const deployWithHandler = Command.make("deploy", {
|
|
551
688
|
* environment: Flag.string("env"),
|
|
552
689
|
* force: Flag.boolean("force")
|
|
553
690
|
* }, (config) =>
|
|
554
691
|
* Effect.gen(function*() {
|
|
555
|
-
* yield*
|
|
692
|
+
* yield* Effect.sync(() => output.push(`Starting deployment to ${config.environment}`))
|
|
556
693
|
*
|
|
557
694
|
* if (!config.force && config.environment === "production") {
|
|
558
695
|
* return yield* Effect.fail("Production deployments require --force flag")
|
|
559
696
|
* }
|
|
560
697
|
*
|
|
561
|
-
* yield*
|
|
698
|
+
* yield* Effect.sync(() => output.push("Deployment completed successfully"))
|
|
562
699
|
* }))
|
|
700
|
+
*
|
|
701
|
+
* await Effect.runPromise(
|
|
702
|
+
* Command.runWith(deployWithHandler, { version: "1.0.0" })([
|
|
703
|
+
* "--env",
|
|
704
|
+
* "staging",
|
|
705
|
+
* "--force"
|
|
706
|
+
* ]).pipe(Effect.provide(CliTestLayer))
|
|
707
|
+
* )
|
|
708
|
+
* output // => ["Starting deployment to staging", "Deployment completed successfully"]
|
|
563
709
|
* ```
|
|
564
710
|
*
|
|
565
711
|
* @category constructors
|
|
@@ -578,9 +724,27 @@ export declare const make: {
|
|
|
578
724
|
*
|
|
579
725
|
* **Example** (Creating commands)
|
|
580
726
|
*
|
|
581
|
-
* ```ts
|
|
582
|
-
* import {
|
|
727
|
+
* ```ts import.meta.vitest
|
|
728
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
583
729
|
* import { Argument, Command, Flag } from "effect/unstable/cli"
|
|
730
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
731
|
+
*
|
|
732
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
733
|
+
* FileSystem.layerNoop({}),
|
|
734
|
+
* Path.layer,
|
|
735
|
+
* Stdio.layerTest({}),
|
|
736
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
737
|
+
* columns: Effect.succeed(80),
|
|
738
|
+
* rows: Effect.succeed(24),
|
|
739
|
+
* readInput: Effect.die("unused"),
|
|
740
|
+
* readLine: Effect.die("unused"),
|
|
741
|
+
* display: () => Effect.void
|
|
742
|
+
* })),
|
|
743
|
+
* Layer.succeed(
|
|
744
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
745
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
746
|
+
* )
|
|
747
|
+
* )
|
|
584
748
|
*
|
|
585
749
|
* // Simple command with no configuration
|
|
586
750
|
* const version = Command.make("version")
|
|
@@ -605,19 +769,29 @@ export declare const make: {
|
|
|
605
769
|
* })
|
|
606
770
|
*
|
|
607
771
|
* // Command with handler
|
|
772
|
+
* const output: Array<string> = []
|
|
608
773
|
* const deployWithHandler = Command.make("deploy", {
|
|
609
774
|
* environment: Flag.string("env"),
|
|
610
775
|
* force: Flag.boolean("force")
|
|
611
776
|
* }, (config) =>
|
|
612
777
|
* Effect.gen(function*() {
|
|
613
|
-
* yield*
|
|
778
|
+
* yield* Effect.sync(() => output.push(`Starting deployment to ${config.environment}`))
|
|
614
779
|
*
|
|
615
780
|
* if (!config.force && config.environment === "production") {
|
|
616
781
|
* return yield* Effect.fail("Production deployments require --force flag")
|
|
617
782
|
* }
|
|
618
783
|
*
|
|
619
|
-
* yield*
|
|
784
|
+
* yield* Effect.sync(() => output.push("Deployment completed successfully"))
|
|
620
785
|
* }))
|
|
786
|
+
*
|
|
787
|
+
* await Effect.runPromise(
|
|
788
|
+
* Command.runWith(deployWithHandler, { version: "1.0.0" })([
|
|
789
|
+
* "--env",
|
|
790
|
+
* "staging",
|
|
791
|
+
* "--force"
|
|
792
|
+
* ]).pipe(Effect.provide(CliTestLayer))
|
|
793
|
+
* )
|
|
794
|
+
* output // => ["Starting deployment to staging", "Deployment completed successfully"]
|
|
621
795
|
* ```
|
|
622
796
|
*
|
|
623
797
|
* @category constructors
|
|
@@ -630,9 +804,27 @@ export declare const make: {
|
|
|
630
804
|
*
|
|
631
805
|
* **Example** (Adding command handlers)
|
|
632
806
|
*
|
|
633
|
-
* ```ts
|
|
634
|
-
* import {
|
|
807
|
+
* ```ts import.meta.vitest
|
|
808
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
635
809
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
810
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
811
|
+
*
|
|
812
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
813
|
+
* FileSystem.layerNoop({}),
|
|
814
|
+
* Path.layer,
|
|
815
|
+
* Stdio.layerTest({}),
|
|
816
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
817
|
+
* columns: Effect.succeed(80),
|
|
818
|
+
* rows: Effect.succeed(24),
|
|
819
|
+
* readInput: Effect.die("unused"),
|
|
820
|
+
* readLine: Effect.die("unused"),
|
|
821
|
+
* display: () => Effect.void
|
|
822
|
+
* })),
|
|
823
|
+
* Layer.succeed(
|
|
824
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
825
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
826
|
+
* )
|
|
827
|
+
* )
|
|
636
828
|
*
|
|
637
829
|
* // Command without initial handler
|
|
638
830
|
* const greet = Command.make("greet", {
|
|
@@ -640,11 +832,19 @@ export declare const make: {
|
|
|
640
832
|
* })
|
|
641
833
|
*
|
|
642
834
|
* // Add handler later
|
|
835
|
+
* const output: Array<string> = []
|
|
643
836
|
* const greetWithHandler = greet.pipe(
|
|
644
837
|
* Command.withHandler((config: { readonly name: string }) =>
|
|
645
|
-
*
|
|
838
|
+
* Effect.sync(() => output.push(`Hello, ${config.name}!`)).pipe(Effect.asVoid)
|
|
646
839
|
* )
|
|
647
840
|
* )
|
|
841
|
+
*
|
|
842
|
+
* await Effect.runPromise(
|
|
843
|
+
* Command.runWith(greetWithHandler, { version: "1.0.0" })(["--name", "Alice"]).pipe(
|
|
844
|
+
* Effect.provide(CliTestLayer)
|
|
845
|
+
* )
|
|
846
|
+
* )
|
|
847
|
+
* output // => ["Hello, Alice!"]
|
|
648
848
|
* ```
|
|
649
849
|
*
|
|
650
850
|
* @category combinators
|
|
@@ -656,9 +856,27 @@ export declare const withHandler: {
|
|
|
656
856
|
*
|
|
657
857
|
* **Example** (Adding command handlers)
|
|
658
858
|
*
|
|
659
|
-
* ```ts
|
|
660
|
-
* import {
|
|
859
|
+
* ```ts import.meta.vitest
|
|
860
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
661
861
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
862
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
863
|
+
*
|
|
864
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
865
|
+
* FileSystem.layerNoop({}),
|
|
866
|
+
* Path.layer,
|
|
867
|
+
* Stdio.layerTest({}),
|
|
868
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
869
|
+
* columns: Effect.succeed(80),
|
|
870
|
+
* rows: Effect.succeed(24),
|
|
871
|
+
* readInput: Effect.die("unused"),
|
|
872
|
+
* readLine: Effect.die("unused"),
|
|
873
|
+
* display: () => Effect.void
|
|
874
|
+
* })),
|
|
875
|
+
* Layer.succeed(
|
|
876
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
877
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
878
|
+
* )
|
|
879
|
+
* )
|
|
662
880
|
*
|
|
663
881
|
* // Command without initial handler
|
|
664
882
|
* const greet = Command.make("greet", {
|
|
@@ -666,11 +884,19 @@ export declare const withHandler: {
|
|
|
666
884
|
* })
|
|
667
885
|
*
|
|
668
886
|
* // Add handler later
|
|
887
|
+
* const output: Array<string> = []
|
|
669
888
|
* const greetWithHandler = greet.pipe(
|
|
670
889
|
* Command.withHandler((config: { readonly name: string }) =>
|
|
671
|
-
*
|
|
890
|
+
* Effect.sync(() => output.push(`Hello, ${config.name}!`)).pipe(Effect.asVoid)
|
|
672
891
|
* )
|
|
673
892
|
* )
|
|
893
|
+
*
|
|
894
|
+
* await Effect.runPromise(
|
|
895
|
+
* Command.runWith(greetWithHandler, { version: "1.0.0" })(["--name", "Alice"]).pipe(
|
|
896
|
+
* Effect.provide(CliTestLayer)
|
|
897
|
+
* )
|
|
898
|
+
* )
|
|
899
|
+
* output // => ["Hello, Alice!"]
|
|
674
900
|
* ```
|
|
675
901
|
*
|
|
676
902
|
* @category combinators
|
|
@@ -682,9 +908,27 @@ export declare const withHandler: {
|
|
|
682
908
|
*
|
|
683
909
|
* **Example** (Adding command handlers)
|
|
684
910
|
*
|
|
685
|
-
* ```ts
|
|
686
|
-
* import {
|
|
911
|
+
* ```ts import.meta.vitest
|
|
912
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
687
913
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
914
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
915
|
+
*
|
|
916
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
917
|
+
* FileSystem.layerNoop({}),
|
|
918
|
+
* Path.layer,
|
|
919
|
+
* Stdio.layerTest({}),
|
|
920
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
921
|
+
* columns: Effect.succeed(80),
|
|
922
|
+
* rows: Effect.succeed(24),
|
|
923
|
+
* readInput: Effect.die("unused"),
|
|
924
|
+
* readLine: Effect.die("unused"),
|
|
925
|
+
* display: () => Effect.void
|
|
926
|
+
* })),
|
|
927
|
+
* Layer.succeed(
|
|
928
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
929
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
930
|
+
* )
|
|
931
|
+
* )
|
|
688
932
|
*
|
|
689
933
|
* // Command without initial handler
|
|
690
934
|
* const greet = Command.make("greet", {
|
|
@@ -692,11 +936,19 @@ export declare const withHandler: {
|
|
|
692
936
|
* })
|
|
693
937
|
*
|
|
694
938
|
* // Add handler later
|
|
939
|
+
* const output: Array<string> = []
|
|
695
940
|
* const greetWithHandler = greet.pipe(
|
|
696
941
|
* Command.withHandler((config: { readonly name: string }) =>
|
|
697
|
-
*
|
|
942
|
+
* Effect.sync(() => output.push(`Hello, ${config.name}!`)).pipe(Effect.asVoid)
|
|
698
943
|
* )
|
|
699
944
|
* )
|
|
945
|
+
*
|
|
946
|
+
* await Effect.runPromise(
|
|
947
|
+
* Command.runWith(greetWithHandler, { version: "1.0.0" })(["--name", "Alice"]).pipe(
|
|
948
|
+
* Effect.provide(CliTestLayer)
|
|
949
|
+
* )
|
|
950
|
+
* )
|
|
951
|
+
* output // => ["Hello, Alice!"]
|
|
700
952
|
* ```
|
|
701
953
|
*
|
|
702
954
|
* @category combinators
|
|
@@ -715,9 +967,27 @@ export declare const withHandler: {
|
|
|
715
967
|
*
|
|
716
968
|
* **Example** (Adding subcommands)
|
|
717
969
|
*
|
|
718
|
-
* ```ts
|
|
719
|
-
* import {
|
|
970
|
+
* ```ts import.meta.vitest
|
|
971
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
720
972
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
973
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
974
|
+
*
|
|
975
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
976
|
+
* FileSystem.layerNoop({}),
|
|
977
|
+
* Path.layer,
|
|
978
|
+
* Stdio.layerTest({}),
|
|
979
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
980
|
+
* columns: Effect.succeed(80),
|
|
981
|
+
* rows: Effect.succeed(24),
|
|
982
|
+
* readInput: Effect.die("unused"),
|
|
983
|
+
* readLine: Effect.die("unused"),
|
|
984
|
+
* display: () => Effect.void
|
|
985
|
+
* })),
|
|
986
|
+
* Layer.succeed(
|
|
987
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
988
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
989
|
+
* )
|
|
990
|
+
* )
|
|
721
991
|
*
|
|
722
992
|
* // Parent command with shared flags
|
|
723
993
|
* const git = Command.make("git").pipe(
|
|
@@ -727,19 +997,29 @@ export declare const withHandler: {
|
|
|
727
997
|
* )
|
|
728
998
|
*
|
|
729
999
|
* // Subcommand that accesses parent config
|
|
1000
|
+
* const output: Array<string> = []
|
|
730
1001
|
* const clone = Command.make("clone", {
|
|
731
1002
|
* repository: Flag.string("repo")
|
|
732
1003
|
* }, (config) =>
|
|
733
1004
|
* Effect.gen(function*() {
|
|
734
1005
|
* const parent = yield* git // Access parent's parsed config
|
|
735
1006
|
* if (parent.verbose) {
|
|
736
|
-
* yield*
|
|
1007
|
+
* yield* Effect.sync(() => output.push("Verbose mode enabled"))
|
|
737
1008
|
* }
|
|
738
|
-
* yield*
|
|
1009
|
+
* yield* Effect.sync(() => output.push(`Cloning ${config.repository}`))
|
|
739
1010
|
* }))
|
|
740
1011
|
*
|
|
741
1012
|
* const app = git.pipe(Command.withSubcommands([clone]))
|
|
742
|
-
*
|
|
1013
|
+
*
|
|
1014
|
+
* await Effect.runPromise(
|
|
1015
|
+
* Command.runWith(app, { version: "1.0.0" })([
|
|
1016
|
+
* "--verbose",
|
|
1017
|
+
* "clone",
|
|
1018
|
+
* "--repo",
|
|
1019
|
+
* "github.com/foo/bar"
|
|
1020
|
+
* ]).pipe(Effect.provide(CliTestLayer))
|
|
1021
|
+
* )
|
|
1022
|
+
* output // => ["Verbose mode enabled", "Cloning github.com/foo/bar"]
|
|
743
1023
|
* ```
|
|
744
1024
|
*
|
|
745
1025
|
* @category combinators
|
|
@@ -757,9 +1037,27 @@ export declare const withSubcommands: {
|
|
|
757
1037
|
*
|
|
758
1038
|
* **Example** (Adding subcommands)
|
|
759
1039
|
*
|
|
760
|
-
* ```ts
|
|
761
|
-
* import {
|
|
1040
|
+
* ```ts import.meta.vitest
|
|
1041
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
762
1042
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
1043
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1044
|
+
*
|
|
1045
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1046
|
+
* FileSystem.layerNoop({}),
|
|
1047
|
+
* Path.layer,
|
|
1048
|
+
* Stdio.layerTest({}),
|
|
1049
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1050
|
+
* columns: Effect.succeed(80),
|
|
1051
|
+
* rows: Effect.succeed(24),
|
|
1052
|
+
* readInput: Effect.die("unused"),
|
|
1053
|
+
* readLine: Effect.die("unused"),
|
|
1054
|
+
* display: () => Effect.void
|
|
1055
|
+
* })),
|
|
1056
|
+
* Layer.succeed(
|
|
1057
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1058
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1059
|
+
* )
|
|
1060
|
+
* )
|
|
763
1061
|
*
|
|
764
1062
|
* // Parent command with shared flags
|
|
765
1063
|
* const git = Command.make("git").pipe(
|
|
@@ -769,19 +1067,29 @@ export declare const withSubcommands: {
|
|
|
769
1067
|
* )
|
|
770
1068
|
*
|
|
771
1069
|
* // Subcommand that accesses parent config
|
|
1070
|
+
* const output: Array<string> = []
|
|
772
1071
|
* const clone = Command.make("clone", {
|
|
773
1072
|
* repository: Flag.string("repo")
|
|
774
1073
|
* }, (config) =>
|
|
775
1074
|
* Effect.gen(function*() {
|
|
776
1075
|
* const parent = yield* git // Access parent's parsed config
|
|
777
1076
|
* if (parent.verbose) {
|
|
778
|
-
* yield*
|
|
1077
|
+
* yield* Effect.sync(() => output.push("Verbose mode enabled"))
|
|
779
1078
|
* }
|
|
780
|
-
* yield*
|
|
1079
|
+
* yield* Effect.sync(() => output.push(`Cloning ${config.repository}`))
|
|
781
1080
|
* }))
|
|
782
1081
|
*
|
|
783
1082
|
* const app = git.pipe(Command.withSubcommands([clone]))
|
|
784
|
-
*
|
|
1083
|
+
*
|
|
1084
|
+
* await Effect.runPromise(
|
|
1085
|
+
* Command.runWith(app, { version: "1.0.0" })([
|
|
1086
|
+
* "--verbose",
|
|
1087
|
+
* "clone",
|
|
1088
|
+
* "--repo",
|
|
1089
|
+
* "github.com/foo/bar"
|
|
1090
|
+
* ]).pipe(Effect.provide(CliTestLayer))
|
|
1091
|
+
* )
|
|
1092
|
+
* output // => ["Verbose mode enabled", "Cloning github.com/foo/bar"]
|
|
785
1093
|
* ```
|
|
786
1094
|
*
|
|
787
1095
|
* @category combinators
|
|
@@ -799,9 +1107,27 @@ export declare const withSubcommands: {
|
|
|
799
1107
|
*
|
|
800
1108
|
* **Example** (Adding subcommands)
|
|
801
1109
|
*
|
|
802
|
-
* ```ts
|
|
803
|
-
* import {
|
|
1110
|
+
* ```ts import.meta.vitest
|
|
1111
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
804
1112
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
1113
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1114
|
+
*
|
|
1115
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1116
|
+
* FileSystem.layerNoop({}),
|
|
1117
|
+
* Path.layer,
|
|
1118
|
+
* Stdio.layerTest({}),
|
|
1119
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1120
|
+
* columns: Effect.succeed(80),
|
|
1121
|
+
* rows: Effect.succeed(24),
|
|
1122
|
+
* readInput: Effect.die("unused"),
|
|
1123
|
+
* readLine: Effect.die("unused"),
|
|
1124
|
+
* display: () => Effect.void
|
|
1125
|
+
* })),
|
|
1126
|
+
* Layer.succeed(
|
|
1127
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1128
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1129
|
+
* )
|
|
1130
|
+
* )
|
|
805
1131
|
*
|
|
806
1132
|
* // Parent command with shared flags
|
|
807
1133
|
* const git = Command.make("git").pipe(
|
|
@@ -811,19 +1137,29 @@ export declare const withSubcommands: {
|
|
|
811
1137
|
* )
|
|
812
1138
|
*
|
|
813
1139
|
* // Subcommand that accesses parent config
|
|
1140
|
+
* const output: Array<string> = []
|
|
814
1141
|
* const clone = Command.make("clone", {
|
|
815
1142
|
* repository: Flag.string("repo")
|
|
816
1143
|
* }, (config) =>
|
|
817
1144
|
* Effect.gen(function*() {
|
|
818
1145
|
* const parent = yield* git // Access parent's parsed config
|
|
819
1146
|
* if (parent.verbose) {
|
|
820
|
-
* yield*
|
|
1147
|
+
* yield* Effect.sync(() => output.push("Verbose mode enabled"))
|
|
821
1148
|
* }
|
|
822
|
-
* yield*
|
|
1149
|
+
* yield* Effect.sync(() => output.push(`Cloning ${config.repository}`))
|
|
823
1150
|
* }))
|
|
824
1151
|
*
|
|
825
1152
|
* const app = git.pipe(Command.withSubcommands([clone]))
|
|
826
|
-
*
|
|
1153
|
+
*
|
|
1154
|
+
* await Effect.runPromise(
|
|
1155
|
+
* Command.runWith(app, { version: "1.0.0" })([
|
|
1156
|
+
* "--verbose",
|
|
1157
|
+
* "clone",
|
|
1158
|
+
* "--repo",
|
|
1159
|
+
* "github.com/foo/bar"
|
|
1160
|
+
* ]).pipe(Effect.provide(CliTestLayer))
|
|
1161
|
+
* )
|
|
1162
|
+
* output // => ["Verbose mode enabled", "Cloning github.com/foo/bar"]
|
|
827
1163
|
* ```
|
|
828
1164
|
*
|
|
829
1165
|
* @category combinators
|
|
@@ -920,18 +1256,42 @@ type ExtractSubcommandContext<T extends ReadonlyArray<Command.SubcommandEntry>>
|
|
|
920
1256
|
*
|
|
921
1257
|
* **Example** (Setting descriptions)
|
|
922
1258
|
*
|
|
923
|
-
* ```ts
|
|
924
|
-
* import {
|
|
1259
|
+
* ```ts import.meta.vitest
|
|
1260
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
925
1261
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
1262
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1263
|
+
*
|
|
1264
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1265
|
+
* FileSystem.layerNoop({}),
|
|
1266
|
+
* Path.layer,
|
|
1267
|
+
* Stdio.layerTest({}),
|
|
1268
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1269
|
+
* columns: Effect.succeed(80),
|
|
1270
|
+
* rows: Effect.succeed(24),
|
|
1271
|
+
* readInput: Effect.die("unused"),
|
|
1272
|
+
* readLine: Effect.die("unused"),
|
|
1273
|
+
* display: () => Effect.void
|
|
1274
|
+
* })),
|
|
1275
|
+
* Layer.succeed(
|
|
1276
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1277
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1278
|
+
* )
|
|
1279
|
+
* )
|
|
926
1280
|
*
|
|
1281
|
+
* const output: Array<string> = []
|
|
927
1282
|
* const deploy = Command.make("deploy", {
|
|
928
1283
|
* environment: Flag.string("env")
|
|
929
1284
|
* }, (config) =>
|
|
930
1285
|
* Effect.gen(function*() {
|
|
931
|
-
* yield*
|
|
1286
|
+
* yield* Effect.sync(() => output.push(`Deploying to ${config.environment}`))
|
|
932
1287
|
* })).pipe(
|
|
933
1288
|
* Command.withDescription("Deploy the application to a specified environment")
|
|
934
1289
|
* )
|
|
1290
|
+
*
|
|
1291
|
+
* await Effect.runPromise(
|
|
1292
|
+
* Command.runWith(deploy, { version: "1.0.0" })(["--env", "staging"]).pipe(Effect.provide(CliTestLayer))
|
|
1293
|
+
* )
|
|
1294
|
+
* output // => ["Deploying to staging"]
|
|
935
1295
|
* ```
|
|
936
1296
|
*
|
|
937
1297
|
* @category combinators
|
|
@@ -948,18 +1308,42 @@ export declare const withDescription: {
|
|
|
948
1308
|
*
|
|
949
1309
|
* **Example** (Setting descriptions)
|
|
950
1310
|
*
|
|
951
|
-
* ```ts
|
|
952
|
-
* import {
|
|
1311
|
+
* ```ts import.meta.vitest
|
|
1312
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
953
1313
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
1314
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1315
|
+
*
|
|
1316
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1317
|
+
* FileSystem.layerNoop({}),
|
|
1318
|
+
* Path.layer,
|
|
1319
|
+
* Stdio.layerTest({}),
|
|
1320
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1321
|
+
* columns: Effect.succeed(80),
|
|
1322
|
+
* rows: Effect.succeed(24),
|
|
1323
|
+
* readInput: Effect.die("unused"),
|
|
1324
|
+
* readLine: Effect.die("unused"),
|
|
1325
|
+
* display: () => Effect.void
|
|
1326
|
+
* })),
|
|
1327
|
+
* Layer.succeed(
|
|
1328
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1329
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1330
|
+
* )
|
|
1331
|
+
* )
|
|
954
1332
|
*
|
|
1333
|
+
* const output: Array<string> = []
|
|
955
1334
|
* const deploy = Command.make("deploy", {
|
|
956
1335
|
* environment: Flag.string("env")
|
|
957
1336
|
* }, (config) =>
|
|
958
1337
|
* Effect.gen(function*() {
|
|
959
|
-
* yield*
|
|
1338
|
+
* yield* Effect.sync(() => output.push(`Deploying to ${config.environment}`))
|
|
960
1339
|
* })).pipe(
|
|
961
1340
|
* Command.withDescription("Deploy the application to a specified environment")
|
|
962
1341
|
* )
|
|
1342
|
+
*
|
|
1343
|
+
* await Effect.runPromise(
|
|
1344
|
+
* Command.runWith(deploy, { version: "1.0.0" })(["--env", "staging"]).pipe(Effect.provide(CliTestLayer))
|
|
1345
|
+
* )
|
|
1346
|
+
* output // => ["Deploying to staging"]
|
|
963
1347
|
* ```
|
|
964
1348
|
*
|
|
965
1349
|
* @category combinators
|
|
@@ -976,18 +1360,42 @@ export declare const withDescription: {
|
|
|
976
1360
|
*
|
|
977
1361
|
* **Example** (Setting descriptions)
|
|
978
1362
|
*
|
|
979
|
-
* ```ts
|
|
980
|
-
* import {
|
|
1363
|
+
* ```ts import.meta.vitest
|
|
1364
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
981
1365
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
1366
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1367
|
+
*
|
|
1368
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1369
|
+
* FileSystem.layerNoop({}),
|
|
1370
|
+
* Path.layer,
|
|
1371
|
+
* Stdio.layerTest({}),
|
|
1372
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1373
|
+
* columns: Effect.succeed(80),
|
|
1374
|
+
* rows: Effect.succeed(24),
|
|
1375
|
+
* readInput: Effect.die("unused"),
|
|
1376
|
+
* readLine: Effect.die("unused"),
|
|
1377
|
+
* display: () => Effect.void
|
|
1378
|
+
* })),
|
|
1379
|
+
* Layer.succeed(
|
|
1380
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1381
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1382
|
+
* )
|
|
1383
|
+
* )
|
|
982
1384
|
*
|
|
1385
|
+
* const output: Array<string> = []
|
|
983
1386
|
* const deploy = Command.make("deploy", {
|
|
984
1387
|
* environment: Flag.string("env")
|
|
985
1388
|
* }, (config) =>
|
|
986
1389
|
* Effect.gen(function*() {
|
|
987
|
-
* yield*
|
|
1390
|
+
* yield* Effect.sync(() => output.push(`Deploying to ${config.environment}`))
|
|
988
1391
|
* })).pipe(
|
|
989
1392
|
* Command.withDescription("Deploy the application to a specified environment")
|
|
990
1393
|
* )
|
|
1394
|
+
*
|
|
1395
|
+
* await Effect.runPromise(
|
|
1396
|
+
* Command.runWith(deploy, { version: "1.0.0" })(["--env", "staging"]).pipe(Effect.provide(CliTestLayer))
|
|
1397
|
+
* )
|
|
1398
|
+
* output // => ["Deploying to staging"]
|
|
991
1399
|
* ```
|
|
992
1400
|
*
|
|
993
1401
|
* @category combinators
|
|
@@ -1083,7 +1491,7 @@ export declare const withAlias: {
|
|
|
1083
1491
|
*
|
|
1084
1492
|
* **Example** (Hiding a subcommand)
|
|
1085
1493
|
*
|
|
1086
|
-
* ```ts
|
|
1494
|
+
* ```ts import.meta.vitest
|
|
1087
1495
|
* import { Command } from "effect/unstable/cli"
|
|
1088
1496
|
*
|
|
1089
1497
|
* // `experimental` still runs when invoked as `mycli experimental`,
|
|
@@ -1095,6 +1503,8 @@ export declare const withAlias: {
|
|
|
1095
1503
|
* const root = Command.make("mycli").pipe(
|
|
1096
1504
|
* Command.withSubcommands([experimental])
|
|
1097
1505
|
* )
|
|
1506
|
+
*
|
|
1507
|
+
* root.subcommands[0].commands[0].hidden // => true
|
|
1098
1508
|
* ```
|
|
1099
1509
|
*
|
|
1100
1510
|
* @category combinators
|
|
@@ -1254,7 +1664,7 @@ export declare const annotateMerge: {
|
|
|
1254
1664
|
*
|
|
1255
1665
|
* **Example** (Adding usage examples)
|
|
1256
1666
|
*
|
|
1257
|
-
* ```ts
|
|
1667
|
+
* ```ts import.meta.vitest
|
|
1258
1668
|
* import { Command } from "effect/unstable/cli"
|
|
1259
1669
|
*
|
|
1260
1670
|
* const login = Command.make("login").pipe(
|
|
@@ -1263,6 +1673,8 @@ export declare const annotateMerge: {
|
|
|
1263
1673
|
* { command: "myapp login --token sbp_abc123", description: "Log in with a token" }
|
|
1264
1674
|
* ])
|
|
1265
1675
|
* )
|
|
1676
|
+
*
|
|
1677
|
+
* login.examples.map((example) => example.command) // => ["myapp login", "myapp login --token sbp_abc123"]
|
|
1266
1678
|
* ```
|
|
1267
1679
|
*
|
|
1268
1680
|
* @category combinators
|
|
@@ -1279,7 +1691,7 @@ export declare const withExamples: {
|
|
|
1279
1691
|
*
|
|
1280
1692
|
* **Example** (Adding usage examples)
|
|
1281
1693
|
*
|
|
1282
|
-
* ```ts
|
|
1694
|
+
* ```ts import.meta.vitest
|
|
1283
1695
|
* import { Command } from "effect/unstable/cli"
|
|
1284
1696
|
*
|
|
1285
1697
|
* const login = Command.make("login").pipe(
|
|
@@ -1288,6 +1700,8 @@ export declare const withExamples: {
|
|
|
1288
1700
|
* { command: "myapp login --token sbp_abc123", description: "Log in with a token" }
|
|
1289
1701
|
* ])
|
|
1290
1702
|
* )
|
|
1703
|
+
*
|
|
1704
|
+
* login.examples.map((example) => example.command) // => ["myapp login", "myapp login --token sbp_abc123"]
|
|
1291
1705
|
* ```
|
|
1292
1706
|
*
|
|
1293
1707
|
* @category combinators
|
|
@@ -1304,7 +1718,7 @@ export declare const withExamples: {
|
|
|
1304
1718
|
*
|
|
1305
1719
|
* **Example** (Adding usage examples)
|
|
1306
1720
|
*
|
|
1307
|
-
* ```ts
|
|
1721
|
+
* ```ts import.meta.vitest
|
|
1308
1722
|
* import { Command } from "effect/unstable/cli"
|
|
1309
1723
|
*
|
|
1310
1724
|
* const login = Command.make("login").pipe(
|
|
@@ -1313,6 +1727,8 @@ export declare const withExamples: {
|
|
|
1313
1727
|
* { command: "myapp login --token sbp_abc123", description: "Log in with a token" }
|
|
1314
1728
|
* ])
|
|
1315
1729
|
* )
|
|
1730
|
+
*
|
|
1731
|
+
* login.examples.map((example) => example.command) // => ["myapp login", "myapp login --token sbp_abc123"]
|
|
1316
1732
|
* ```
|
|
1317
1733
|
*
|
|
1318
1734
|
* @category combinators
|
|
@@ -1326,16 +1742,35 @@ export declare const withExamples: {
|
|
|
1326
1742
|
*
|
|
1327
1743
|
* **Example** (Providing command services)
|
|
1328
1744
|
*
|
|
1329
|
-
* ```ts
|
|
1330
|
-
* import { Effect, FileSystem, PlatformError } from "effect"
|
|
1745
|
+
* ```ts import.meta.vitest
|
|
1746
|
+
* import { Effect, FileSystem, Layer, Path, PlatformError, Stdio, Terminal } from "effect"
|
|
1331
1747
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
1748
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1749
|
+
*
|
|
1750
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1751
|
+
* FileSystem.layerNoop({}),
|
|
1752
|
+
* Path.layer,
|
|
1753
|
+
* Stdio.layerTest({}),
|
|
1754
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1755
|
+
* columns: Effect.succeed(80),
|
|
1756
|
+
* rows: Effect.succeed(24),
|
|
1757
|
+
* readInput: Effect.die("unused"),
|
|
1758
|
+
* readLine: Effect.die("unused"),
|
|
1759
|
+
* display: () => Effect.void
|
|
1760
|
+
* })),
|
|
1761
|
+
* Layer.succeed(
|
|
1762
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1763
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1764
|
+
* )
|
|
1765
|
+
* )
|
|
1332
1766
|
*
|
|
1767
|
+
* const output: Array<string> = []
|
|
1333
1768
|
* const deploy = Command.make("deploy", {
|
|
1334
1769
|
* env: Flag.string("env")
|
|
1335
1770
|
* }, (config) =>
|
|
1336
1771
|
* Effect.gen(function*() {
|
|
1337
1772
|
* const fs = yield* FileSystem.FileSystem
|
|
1338
|
-
*
|
|
1773
|
+
* yield* Effect.sync(() => output.push(`Using file system for ${config.env}`))
|
|
1339
1774
|
* })).pipe(
|
|
1340
1775
|
* // Provide FileSystem based on the --env flag
|
|
1341
1776
|
* Command.provide((config) =>
|
|
@@ -1352,6 +1787,11 @@ export declare const withExamples: {
|
|
|
1352
1787
|
* })
|
|
1353
1788
|
* )
|
|
1354
1789
|
* )
|
|
1790
|
+
*
|
|
1791
|
+
* await Effect.runPromise(
|
|
1792
|
+
* Command.runWith(deploy, { version: "1.0.0" })(["--env", "local"]).pipe(Effect.provide(CliTestLayer))
|
|
1793
|
+
* )
|
|
1794
|
+
* output // => ["Using file system for local"]
|
|
1355
1795
|
* ```
|
|
1356
1796
|
*
|
|
1357
1797
|
* @category providing services
|
|
@@ -1364,16 +1804,35 @@ export declare const provide: {
|
|
|
1364
1804
|
*
|
|
1365
1805
|
* **Example** (Providing command services)
|
|
1366
1806
|
*
|
|
1367
|
-
* ```ts
|
|
1368
|
-
* import { Effect, FileSystem, PlatformError } from "effect"
|
|
1807
|
+
* ```ts import.meta.vitest
|
|
1808
|
+
* import { Effect, FileSystem, Layer, Path, PlatformError, Stdio, Terminal } from "effect"
|
|
1369
1809
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
1810
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1811
|
+
*
|
|
1812
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1813
|
+
* FileSystem.layerNoop({}),
|
|
1814
|
+
* Path.layer,
|
|
1815
|
+
* Stdio.layerTest({}),
|
|
1816
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1817
|
+
* columns: Effect.succeed(80),
|
|
1818
|
+
* rows: Effect.succeed(24),
|
|
1819
|
+
* readInput: Effect.die("unused"),
|
|
1820
|
+
* readLine: Effect.die("unused"),
|
|
1821
|
+
* display: () => Effect.void
|
|
1822
|
+
* })),
|
|
1823
|
+
* Layer.succeed(
|
|
1824
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1825
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1826
|
+
* )
|
|
1827
|
+
* )
|
|
1370
1828
|
*
|
|
1829
|
+
* const output: Array<string> = []
|
|
1371
1830
|
* const deploy = Command.make("deploy", {
|
|
1372
1831
|
* env: Flag.string("env")
|
|
1373
1832
|
* }, (config) =>
|
|
1374
1833
|
* Effect.gen(function*() {
|
|
1375
1834
|
* const fs = yield* FileSystem.FileSystem
|
|
1376
|
-
*
|
|
1835
|
+
* yield* Effect.sync(() => output.push(`Using file system for ${config.env}`))
|
|
1377
1836
|
* })).pipe(
|
|
1378
1837
|
* // Provide FileSystem based on the --env flag
|
|
1379
1838
|
* Command.provide((config) =>
|
|
@@ -1390,6 +1849,11 @@ export declare const provide: {
|
|
|
1390
1849
|
* })
|
|
1391
1850
|
* )
|
|
1392
1851
|
* )
|
|
1852
|
+
*
|
|
1853
|
+
* await Effect.runPromise(
|
|
1854
|
+
* Command.runWith(deploy, { version: "1.0.0" })(["--env", "local"]).pipe(Effect.provide(CliTestLayer))
|
|
1855
|
+
* )
|
|
1856
|
+
* output // => ["Using file system for local"]
|
|
1393
1857
|
* ```
|
|
1394
1858
|
*
|
|
1395
1859
|
* @category providing services
|
|
@@ -1404,16 +1868,35 @@ export declare const provide: {
|
|
|
1404
1868
|
*
|
|
1405
1869
|
* **Example** (Providing command services)
|
|
1406
1870
|
*
|
|
1407
|
-
* ```ts
|
|
1408
|
-
* import { Effect, FileSystem, PlatformError } from "effect"
|
|
1871
|
+
* ```ts import.meta.vitest
|
|
1872
|
+
* import { Effect, FileSystem, Layer, Path, PlatformError, Stdio, Terminal } from "effect"
|
|
1409
1873
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
1874
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1875
|
+
*
|
|
1876
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1877
|
+
* FileSystem.layerNoop({}),
|
|
1878
|
+
* Path.layer,
|
|
1879
|
+
* Stdio.layerTest({}),
|
|
1880
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1881
|
+
* columns: Effect.succeed(80),
|
|
1882
|
+
* rows: Effect.succeed(24),
|
|
1883
|
+
* readInput: Effect.die("unused"),
|
|
1884
|
+
* readLine: Effect.die("unused"),
|
|
1885
|
+
* display: () => Effect.void
|
|
1886
|
+
* })),
|
|
1887
|
+
* Layer.succeed(
|
|
1888
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1889
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1890
|
+
* )
|
|
1891
|
+
* )
|
|
1410
1892
|
*
|
|
1893
|
+
* const output: Array<string> = []
|
|
1411
1894
|
* const deploy = Command.make("deploy", {
|
|
1412
1895
|
* env: Flag.string("env")
|
|
1413
1896
|
* }, (config) =>
|
|
1414
1897
|
* Effect.gen(function*() {
|
|
1415
1898
|
* const fs = yield* FileSystem.FileSystem
|
|
1416
|
-
*
|
|
1899
|
+
* yield* Effect.sync(() => output.push(`Using file system for ${config.env}`))
|
|
1417
1900
|
* })).pipe(
|
|
1418
1901
|
* // Provide FileSystem based on the --env flag
|
|
1419
1902
|
* Command.provide((config) =>
|
|
@@ -1430,6 +1913,11 @@ export declare const provide: {
|
|
|
1430
1913
|
* })
|
|
1431
1914
|
* )
|
|
1432
1915
|
* )
|
|
1916
|
+
*
|
|
1917
|
+
* await Effect.runPromise(
|
|
1918
|
+
* Command.runWith(deploy, { version: "1.0.0" })(["--env", "local"]).pipe(Effect.provide(CliTestLayer))
|
|
1919
|
+
* )
|
|
1920
|
+
* output // => ["Using file system for local"]
|
|
1433
1921
|
* ```
|
|
1434
1922
|
*
|
|
1435
1923
|
* @category providing services
|
|
@@ -1566,19 +2054,42 @@ export declare const provideEffectDiscard: {
|
|
|
1566
2054
|
*
|
|
1567
2055
|
* **Example** (Constructing command arguments)
|
|
1568
2056
|
*
|
|
1569
|
-
* ```ts
|
|
1570
|
-
* import { Console, Effect } from "effect"
|
|
2057
|
+
* ```ts import.meta.vitest
|
|
2058
|
+
* import { Console, Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1571
2059
|
* import { Command } from "effect/unstable/cli"
|
|
2060
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
2061
|
+
*
|
|
2062
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
2063
|
+
* FileSystem.layerNoop({}),
|
|
2064
|
+
* Path.layer,
|
|
2065
|
+
* Stdio.layerTest({}),
|
|
2066
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
2067
|
+
* columns: Effect.succeed(80),
|
|
2068
|
+
* rows: Effect.succeed(24),
|
|
2069
|
+
* readInput: Effect.die("unused"),
|
|
2070
|
+
* readLine: Effect.die("unused"),
|
|
2071
|
+
* display: () => Effect.void
|
|
2072
|
+
* })),
|
|
2073
|
+
* Layer.succeed(
|
|
2074
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
2075
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
2076
|
+
* )
|
|
2077
|
+
* )
|
|
1572
2078
|
*
|
|
1573
2079
|
* const command = Command.make("app")
|
|
1574
|
-
*
|
|
1575
|
-
*
|
|
1576
|
-
* const args = yield* Command.wizard(command)
|
|
1577
|
-
* yield* Console.log(args.join(" "))
|
|
2080
|
+
* const silentConsole: Console.Console = Object.assign(Object.create(console), {
|
|
2081
|
+
* log: () => {}
|
|
1578
2082
|
* })
|
|
2083
|
+
*
|
|
2084
|
+
* const program = Command.wizard(command).pipe(
|
|
2085
|
+
* Effect.provideService(Console.Console, silentConsole),
|
|
2086
|
+
* Effect.provide(CliTestLayer)
|
|
2087
|
+
* )
|
|
2088
|
+
*
|
|
2089
|
+
* await Effect.runPromise(program) // => ["app"]
|
|
1579
2090
|
* ```
|
|
1580
2091
|
*
|
|
1581
|
-
* @category
|
|
2092
|
+
* @category running
|
|
1582
2093
|
* @since 4.0.0
|
|
1583
2094
|
*/
|
|
1584
2095
|
export declare const wizard: <Name extends string, Input, E, R, ContextInput>(command: Command<Name, Input, ContextInput, E, R>, options?: {
|
|
@@ -1594,26 +2105,50 @@ export declare const wizard: <Name extends string, Input, E, R, ContextInput>(co
|
|
|
1594
2105
|
*
|
|
1595
2106
|
* **Example** (Running commands with standard input)
|
|
1596
2107
|
*
|
|
1597
|
-
* ```ts
|
|
1598
|
-
* import {
|
|
2108
|
+
* ```ts import.meta.vitest
|
|
2109
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1599
2110
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
2111
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
2112
|
+
*
|
|
2113
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
2114
|
+
* FileSystem.layerNoop({}),
|
|
2115
|
+
* Path.layer,
|
|
2116
|
+
* Stdio.layerTest({
|
|
2117
|
+
* args: Effect.succeed(["--name", "Alice"])
|
|
2118
|
+
* }),
|
|
2119
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
2120
|
+
* columns: Effect.succeed(80),
|
|
2121
|
+
* rows: Effect.succeed(24),
|
|
2122
|
+
* readInput: Effect.die("unused"),
|
|
2123
|
+
* readLine: Effect.die("unused"),
|
|
2124
|
+
* display: () => Effect.void
|
|
2125
|
+
* })),
|
|
2126
|
+
* Layer.succeed(
|
|
2127
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
2128
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
2129
|
+
* )
|
|
2130
|
+
* )
|
|
1600
2131
|
*
|
|
2132
|
+
* const output: Array<string> = []
|
|
1601
2133
|
* const greetCommand = Command.make("greet", {
|
|
1602
2134
|
* name: Flag.string("name")
|
|
1603
2135
|
* }, (config) =>
|
|
1604
2136
|
* Effect.gen(function*() {
|
|
1605
|
-
* yield*
|
|
2137
|
+
* yield* Effect.sync(() => output.push(`Hello, ${config.name}!`))
|
|
1606
2138
|
* }))
|
|
1607
2139
|
*
|
|
1608
2140
|
* // Automatically gets args from the Stdio service
|
|
1609
2141
|
* const program = Command.run(greetCommand, {
|
|
1610
2142
|
* version: "1.0.0"
|
|
1611
2143
|
* })
|
|
2144
|
+
*
|
|
2145
|
+
* await Effect.runPromise(program.pipe(Effect.provide(CliTestLayer)))
|
|
2146
|
+
* output // => ["Hello, Alice!"]
|
|
1612
2147
|
* ```
|
|
1613
2148
|
*
|
|
1614
2149
|
* @see {@link runWith} for running a command with an explicit argument array
|
|
1615
2150
|
*
|
|
1616
|
-
* @category
|
|
2151
|
+
* @category running
|
|
1617
2152
|
* @since 4.0.0
|
|
1618
2153
|
*/
|
|
1619
2154
|
export declare const run: {
|
|
@@ -1627,26 +2162,50 @@ export declare const run: {
|
|
|
1627
2162
|
*
|
|
1628
2163
|
* **Example** (Running commands with standard input)
|
|
1629
2164
|
*
|
|
1630
|
-
* ```ts
|
|
1631
|
-
* import {
|
|
2165
|
+
* ```ts import.meta.vitest
|
|
2166
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1632
2167
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
2168
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
2169
|
+
*
|
|
2170
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
2171
|
+
* FileSystem.layerNoop({}),
|
|
2172
|
+
* Path.layer,
|
|
2173
|
+
* Stdio.layerTest({
|
|
2174
|
+
* args: Effect.succeed(["--name", "Alice"])
|
|
2175
|
+
* }),
|
|
2176
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
2177
|
+
* columns: Effect.succeed(80),
|
|
2178
|
+
* rows: Effect.succeed(24),
|
|
2179
|
+
* readInput: Effect.die("unused"),
|
|
2180
|
+
* readLine: Effect.die("unused"),
|
|
2181
|
+
* display: () => Effect.void
|
|
2182
|
+
* })),
|
|
2183
|
+
* Layer.succeed(
|
|
2184
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
2185
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
2186
|
+
* )
|
|
2187
|
+
* )
|
|
1633
2188
|
*
|
|
2189
|
+
* const output: Array<string> = []
|
|
1634
2190
|
* const greetCommand = Command.make("greet", {
|
|
1635
2191
|
* name: Flag.string("name")
|
|
1636
2192
|
* }, (config) =>
|
|
1637
2193
|
* Effect.gen(function*() {
|
|
1638
|
-
* yield*
|
|
2194
|
+
* yield* Effect.sync(() => output.push(`Hello, ${config.name}!`))
|
|
1639
2195
|
* }))
|
|
1640
2196
|
*
|
|
1641
2197
|
* // Automatically gets args from the Stdio service
|
|
1642
2198
|
* const program = Command.run(greetCommand, {
|
|
1643
2199
|
* version: "1.0.0"
|
|
1644
2200
|
* })
|
|
2201
|
+
*
|
|
2202
|
+
* await Effect.runPromise(program.pipe(Effect.provide(CliTestLayer)))
|
|
2203
|
+
* output // => ["Hello, Alice!"]
|
|
1645
2204
|
* ```
|
|
1646
2205
|
*
|
|
1647
2206
|
* @see {@link runWith} for running a command with an explicit argument array
|
|
1648
2207
|
*
|
|
1649
|
-
* @category
|
|
2208
|
+
* @category running
|
|
1650
2209
|
* @since 4.0.0
|
|
1651
2210
|
*/
|
|
1652
2211
|
(config: {
|
|
@@ -1662,26 +2221,50 @@ export declare const run: {
|
|
|
1662
2221
|
*
|
|
1663
2222
|
* **Example** (Running commands with standard input)
|
|
1664
2223
|
*
|
|
1665
|
-
* ```ts
|
|
1666
|
-
* import {
|
|
2224
|
+
* ```ts import.meta.vitest
|
|
2225
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1667
2226
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
2227
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
2228
|
+
*
|
|
2229
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
2230
|
+
* FileSystem.layerNoop({}),
|
|
2231
|
+
* Path.layer,
|
|
2232
|
+
* Stdio.layerTest({
|
|
2233
|
+
* args: Effect.succeed(["--name", "Alice"])
|
|
2234
|
+
* }),
|
|
2235
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
2236
|
+
* columns: Effect.succeed(80),
|
|
2237
|
+
* rows: Effect.succeed(24),
|
|
2238
|
+
* readInput: Effect.die("unused"),
|
|
2239
|
+
* readLine: Effect.die("unused"),
|
|
2240
|
+
* display: () => Effect.void
|
|
2241
|
+
* })),
|
|
2242
|
+
* Layer.succeed(
|
|
2243
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
2244
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
2245
|
+
* )
|
|
2246
|
+
* )
|
|
1668
2247
|
*
|
|
2248
|
+
* const output: Array<string> = []
|
|
1669
2249
|
* const greetCommand = Command.make("greet", {
|
|
1670
2250
|
* name: Flag.string("name")
|
|
1671
2251
|
* }, (config) =>
|
|
1672
2252
|
* Effect.gen(function*() {
|
|
1673
|
-
* yield*
|
|
2253
|
+
* yield* Effect.sync(() => output.push(`Hello, ${config.name}!`))
|
|
1674
2254
|
* }))
|
|
1675
2255
|
*
|
|
1676
2256
|
* // Automatically gets args from the Stdio service
|
|
1677
2257
|
* const program = Command.run(greetCommand, {
|
|
1678
2258
|
* version: "1.0.0"
|
|
1679
2259
|
* })
|
|
2260
|
+
*
|
|
2261
|
+
* await Effect.runPromise(program.pipe(Effect.provide(CliTestLayer)))
|
|
2262
|
+
* output // => ["Hello, Alice!"]
|
|
1680
2263
|
* ```
|
|
1681
2264
|
*
|
|
1682
2265
|
* @see {@link runWith} for running a command with an explicit argument array
|
|
1683
2266
|
*
|
|
1684
|
-
* @category
|
|
2267
|
+
* @category running
|
|
1685
2268
|
* @since 4.0.0
|
|
1686
2269
|
*/
|
|
1687
2270
|
<Name extends string, Input, E, R, ContextInput>(command: Command<Name, Input, ContextInput, E, R>, config: {
|
|
@@ -1698,17 +2281,36 @@ export declare const run: {
|
|
|
1698
2281
|
*
|
|
1699
2282
|
* **Example** (Running commands with explicit arguments)
|
|
1700
2283
|
*
|
|
1701
|
-
* ```ts
|
|
1702
|
-
* import {
|
|
2284
|
+
* ```ts import.meta.vitest
|
|
2285
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1703
2286
|
* import { Command, Flag } from "effect/unstable/cli"
|
|
2287
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
2288
|
+
*
|
|
2289
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
2290
|
+
* FileSystem.layerNoop({}),
|
|
2291
|
+
* Path.layer,
|
|
2292
|
+
* Stdio.layerTest({}),
|
|
2293
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
2294
|
+
* columns: Effect.succeed(80),
|
|
2295
|
+
* rows: Effect.succeed(24),
|
|
2296
|
+
* readInput: Effect.die("unused"),
|
|
2297
|
+
* readLine: Effect.die("unused"),
|
|
2298
|
+
* display: () => Effect.void
|
|
2299
|
+
* })),
|
|
2300
|
+
* Layer.succeed(
|
|
2301
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
2302
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
2303
|
+
* )
|
|
2304
|
+
* )
|
|
1704
2305
|
*
|
|
2306
|
+
* const output: Array<string> = []
|
|
1705
2307
|
* const greet = Command.make("greet", {
|
|
1706
2308
|
* name: Flag.string("name"),
|
|
1707
2309
|
* count: Flag.integer("count").pipe(Flag.withDefault(1))
|
|
1708
2310
|
* }, (config) =>
|
|
1709
2311
|
* Effect.gen(function*() {
|
|
1710
2312
|
* for (let i = 0; i < config.count; i++) {
|
|
1711
|
-
* yield*
|
|
2313
|
+
* yield* Effect.sync(() => output.push(`Hello, ${config.name}!`))
|
|
1712
2314
|
* }
|
|
1713
2315
|
* }))
|
|
1714
2316
|
*
|
|
@@ -1716,18 +2318,14 @@ export declare const run: {
|
|
|
1716
2318
|
* const testProgram = Effect.gen(function*() {
|
|
1717
2319
|
* const runCommand = Command.runWith(greet, { version: "1.0.0" })
|
|
1718
2320
|
*
|
|
1719
|
-
* // Test normal execution
|
|
1720
2321
|
* yield* runCommand(["--name", "Alice", "--count", "2"])
|
|
1721
|
-
*
|
|
1722
|
-
* // Test help display
|
|
1723
|
-
* yield* runCommand(["--help"])
|
|
1724
|
-
*
|
|
1725
|
-
* // Test version display
|
|
1726
|
-
* yield* runCommand(["--version"])
|
|
1727
2322
|
* })
|
|
2323
|
+
*
|
|
2324
|
+
* await Effect.runPromise(testProgram.pipe(Effect.provide(CliTestLayer)))
|
|
2325
|
+
* output // => ["Hello, Alice!", "Hello, Alice!"]
|
|
1728
2326
|
* ```
|
|
1729
2327
|
*
|
|
1730
|
-
* @category
|
|
2328
|
+
* @category running
|
|
1731
2329
|
* @since 4.0.0
|
|
1732
2330
|
*/
|
|
1733
2331
|
export declare const runWith: <const Name extends string, Input, E, R, ContextInput>(command: Command<Name, Input, ContextInput, E, R>, config: {
|