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
package/src/unstable/cli/Flag.ts
CHANGED
|
@@ -43,11 +43,12 @@ export interface Flag<A> extends Param.Param<typeof Param.flagKind, A> {}
|
|
|
43
43
|
*
|
|
44
44
|
* **Example** (Creating string flags)
|
|
45
45
|
*
|
|
46
|
-
* ```ts
|
|
46
|
+
* ```ts import.meta.vitest
|
|
47
47
|
* import { Flag } from "effect/unstable/cli"
|
|
48
48
|
*
|
|
49
49
|
* const nameFlag = Flag.string("name")
|
|
50
50
|
* // Usage: --name "John Doe"
|
|
51
|
+
* nameFlag.kind // => "flag"
|
|
51
52
|
* ```
|
|
52
53
|
*
|
|
53
54
|
* @category constructors
|
|
@@ -60,11 +61,12 @@ export const string = (name: string): Flag<string> => Param.string(Param.flagKin
|
|
|
60
61
|
*
|
|
61
62
|
* **Example** (Creating boolean flags)
|
|
62
63
|
*
|
|
63
|
-
* ```ts
|
|
64
|
+
* ```ts import.meta.vitest
|
|
64
65
|
* import { Flag } from "effect/unstable/cli"
|
|
65
66
|
*
|
|
66
67
|
* const verboseFlag = Flag.boolean("verbose")
|
|
67
68
|
* // Usage: --verbose (true) or --no-verbose (false)
|
|
69
|
+
* verboseFlag.kind // => "flag"
|
|
68
70
|
* ```
|
|
69
71
|
*
|
|
70
72
|
* @category constructors
|
|
@@ -77,11 +79,12 @@ export const boolean = (name: string): Flag<boolean> => Param.boolean(Param.flag
|
|
|
77
79
|
*
|
|
78
80
|
* **Example** (Creating integer flags)
|
|
79
81
|
*
|
|
80
|
-
* ```ts
|
|
82
|
+
* ```ts import.meta.vitest
|
|
81
83
|
* import { Flag } from "effect/unstable/cli"
|
|
82
84
|
*
|
|
83
85
|
* const portFlag = Flag.integer("port")
|
|
84
86
|
* // Usage: --port 8080
|
|
87
|
+
* portFlag.kind // => "flag"
|
|
85
88
|
* ```
|
|
86
89
|
*
|
|
87
90
|
* @category constructors
|
|
@@ -94,11 +97,12 @@ export const integer = (name: string): Flag<number> => Param.integer(Param.flagK
|
|
|
94
97
|
*
|
|
95
98
|
* **Example** (Creating float flags)
|
|
96
99
|
*
|
|
97
|
-
* ```ts
|
|
100
|
+
* ```ts import.meta.vitest
|
|
98
101
|
* import { Flag } from "effect/unstable/cli"
|
|
99
102
|
*
|
|
100
103
|
* const rateFlag = Flag.float("rate")
|
|
101
104
|
* // Usage: --rate 3.14
|
|
105
|
+
* rateFlag.kind // => "flag"
|
|
102
106
|
* ```
|
|
103
107
|
*
|
|
104
108
|
* @category constructors
|
|
@@ -111,11 +115,12 @@ export const float = (name: string): Flag<number> => Param.float(Param.flagKind,
|
|
|
111
115
|
*
|
|
112
116
|
* **Example** (Creating date flags)
|
|
113
117
|
*
|
|
114
|
-
* ```ts
|
|
118
|
+
* ```ts import.meta.vitest
|
|
115
119
|
* import { Flag } from "effect/unstable/cli"
|
|
116
120
|
*
|
|
117
121
|
* const startDateFlag = Flag.date("start-date")
|
|
118
122
|
* // Usage: --start-date 2023-12-25
|
|
123
|
+
* startDateFlag.kind // => "flag"
|
|
119
124
|
* ```
|
|
120
125
|
*
|
|
121
126
|
* @category constructors
|
|
@@ -129,7 +134,7 @@ export const date = (name: string): Flag<Date> => Param.date(Param.flagKind, nam
|
|
|
129
134
|
*
|
|
130
135
|
* **Example** (Creating flag choices with values)
|
|
131
136
|
*
|
|
132
|
-
* ```ts
|
|
137
|
+
* ```ts import.meta.vitest
|
|
133
138
|
* import { Flag } from "effect/unstable/cli"
|
|
134
139
|
*
|
|
135
140
|
* // simple enum like choice mapping directly to string union
|
|
@@ -141,6 +146,7 @@ export const date = (name: string): Flag<Date> => Param.date(Param.flagKind, nam
|
|
|
141
146
|
* ["info", "Info" as const],
|
|
142
147
|
* ["error", "Error" as const]
|
|
143
148
|
* ])
|
|
149
|
+
* const kinds = [color.kind, logLevel.kind] // => ["flag", "flag"]
|
|
144
150
|
* ```
|
|
145
151
|
*
|
|
146
152
|
* @category constructors
|
|
@@ -179,7 +185,7 @@ export const choice = <const Choices extends ReadonlyArray<string>>(
|
|
|
179
185
|
*
|
|
180
186
|
* **Example** (Creating path flags)
|
|
181
187
|
*
|
|
182
|
-
* ```ts
|
|
188
|
+
* ```ts import.meta.vitest
|
|
183
189
|
* import { Flag } from "effect/unstable/cli"
|
|
184
190
|
*
|
|
185
191
|
* // Basic path flag
|
|
@@ -196,6 +202,7 @@ export const choice = <const Choices extends ReadonlyArray<string>>(
|
|
|
196
202
|
* pathType: "directory",
|
|
197
203
|
* typeName: "OUTPUT_DIRECTORY"
|
|
198
204
|
* })
|
|
205
|
+
* const kinds = [pathFlag.kind, fileFlag.kind, dirFlag.kind] // => ["flag", "flag", "flag"]
|
|
199
206
|
* ```
|
|
200
207
|
*
|
|
201
208
|
* @category constructors
|
|
@@ -212,7 +219,7 @@ export const path = (name: string, options?: {
|
|
|
212
219
|
*
|
|
213
220
|
* **Example** (Creating file flags)
|
|
214
221
|
*
|
|
215
|
-
* ```ts
|
|
222
|
+
* ```ts import.meta.vitest
|
|
216
223
|
* import { Flag } from "effect/unstable/cli"
|
|
217
224
|
*
|
|
218
225
|
* // Basic file flag
|
|
@@ -222,6 +229,7 @@ export const path = (name: string, options?: {
|
|
|
222
229
|
* // File that must exist
|
|
223
230
|
* const configFlag = Flag.file("config", { mustExist: true })
|
|
224
231
|
* // Usage: --config ./config.yaml (file must exist)
|
|
232
|
+
* const kinds = [inputFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
225
233
|
* ```
|
|
226
234
|
*
|
|
227
235
|
* @category constructors
|
|
@@ -236,7 +244,7 @@ export const file = (name: string, options?: {
|
|
|
236
244
|
*
|
|
237
245
|
* **Example** (Creating directory flags)
|
|
238
246
|
*
|
|
239
|
-
* ```ts
|
|
247
|
+
* ```ts import.meta.vitest
|
|
240
248
|
* import { Flag } from "effect/unstable/cli"
|
|
241
249
|
*
|
|
242
250
|
* // Basic directory flag
|
|
@@ -246,6 +254,7 @@ export const file = (name: string, options?: {
|
|
|
246
254
|
* // Directory that must exist
|
|
247
255
|
* const sourceFlag = Flag.directory("source", { mustExist: true })
|
|
248
256
|
* // Usage: --source ./src (directory must exist)
|
|
257
|
+
* const kinds = [outputFlag.kind, sourceFlag.kind] // => ["flag", "flag"]
|
|
249
258
|
* ```
|
|
250
259
|
*
|
|
251
260
|
* @category constructors
|
|
@@ -266,20 +275,39 @@ export const directory = (name: string, options?: {
|
|
|
266
275
|
*
|
|
267
276
|
* **Example** (Creating redacted flags)
|
|
268
277
|
*
|
|
269
|
-
* ```ts
|
|
270
|
-
* import { Effect, Redacted } from "effect"
|
|
278
|
+
* ```ts import.meta.vitest
|
|
279
|
+
* import { Effect, FileSystem, Layer, Path, Redacted, Stdio, Terminal } from "effect"
|
|
271
280
|
* import { Flag } from "effect/unstable/cli"
|
|
281
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
282
|
+
*
|
|
283
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
284
|
+
* FileSystem.layerNoop({}),
|
|
285
|
+
* Path.layer,
|
|
286
|
+
* Stdio.layerTest({}),
|
|
287
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
288
|
+
* columns: Effect.succeed(80),
|
|
289
|
+
* rows: Effect.succeed(24),
|
|
290
|
+
* readInput: Effect.die("unused"),
|
|
291
|
+
* readLine: Effect.die("unused"),
|
|
292
|
+
* display: () => Effect.void
|
|
293
|
+
* })),
|
|
294
|
+
* Layer.succeed(
|
|
295
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
296
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
297
|
+
* )
|
|
298
|
+
* )
|
|
272
299
|
*
|
|
273
300
|
* const passwordFlag = Flag.redacted("password")
|
|
274
301
|
*
|
|
275
302
|
* const program = Effect.gen(function*() {
|
|
276
|
-
* const [
|
|
303
|
+
* const [, password] = yield* passwordFlag.parse({
|
|
277
304
|
* arguments: [],
|
|
278
305
|
* flags: { "password": ["abc123"] }
|
|
279
306
|
* })
|
|
280
|
-
*
|
|
281
|
-
* console.log("Password length:", value.length)
|
|
307
|
+
* return Redacted.value(password).length
|
|
282
308
|
* })
|
|
309
|
+
*
|
|
310
|
+
* await Effect.runPromise(program.pipe(Effect.provide(CliTestLayer))) // => 6
|
|
283
311
|
* ```
|
|
284
312
|
*
|
|
285
313
|
* @category constructors
|
|
@@ -292,11 +320,12 @@ export const redacted = (name: string): Flag<Redacted.Redacted<string>> => Param
|
|
|
292
320
|
*
|
|
293
321
|
* **Example** (Reading file text)
|
|
294
322
|
*
|
|
295
|
-
* ```ts
|
|
323
|
+
* ```ts import.meta.vitest
|
|
296
324
|
* import { Flag } from "effect/unstable/cli"
|
|
297
325
|
*
|
|
298
326
|
* const config = Flag.fileText("config-file")
|
|
299
327
|
* // --config-file ./app.json will read the file content
|
|
328
|
+
* config.kind // => "flag"
|
|
300
329
|
* ```
|
|
301
330
|
*
|
|
302
331
|
* @category constructors
|
|
@@ -314,7 +343,7 @@ export const fileText = (name: string): Flag<string> => Param.fileText(Param.fla
|
|
|
314
343
|
*
|
|
315
344
|
* **Example** (Parsing file contents)
|
|
316
345
|
*
|
|
317
|
-
* ```ts
|
|
346
|
+
* ```ts import.meta.vitest
|
|
318
347
|
* import { Flag } from "effect/unstable/cli"
|
|
319
348
|
*
|
|
320
349
|
* // Will use the extension of the file passed on the command line to determine
|
|
@@ -323,6 +352,7 @@ export const fileText = (name: string): Flag<string> => Param.fileText(Param.fla
|
|
|
323
352
|
*
|
|
324
353
|
* // Will use the JSON parser
|
|
325
354
|
* const jsonConfig = Flag.fileParse("json-config", { format: "json" })
|
|
355
|
+
* const kinds = [config.kind, jsonConfig.kind] // => ["flag", "flag"]
|
|
326
356
|
* ```
|
|
327
357
|
*
|
|
328
358
|
* @category constructors
|
|
@@ -339,7 +369,7 @@ export const fileParse = (
|
|
|
339
369
|
*
|
|
340
370
|
* **Example** (Validating file contents)
|
|
341
371
|
*
|
|
342
|
-
* ```ts
|
|
372
|
+
* ```ts import.meta.vitest
|
|
343
373
|
* import { Schema } from "effect"
|
|
344
374
|
* import { Flag } from "effect/unstable/cli"
|
|
345
375
|
*
|
|
@@ -349,6 +379,7 @@ export const fileParse = (
|
|
|
349
379
|
* })
|
|
350
380
|
*
|
|
351
381
|
* const config = Flag.fileSchema("config", ConfigSchema, { format: "json" })
|
|
382
|
+
* config.kind // => "flag"
|
|
352
383
|
* ```
|
|
353
384
|
*
|
|
354
385
|
* @category constructors
|
|
@@ -375,11 +406,12 @@ export const fileSchema = <A>(
|
|
|
375
406
|
*
|
|
376
407
|
* **Example** (Parsing key-value pairs)
|
|
377
408
|
*
|
|
378
|
-
* ```ts
|
|
409
|
+
* ```ts import.meta.vitest
|
|
379
410
|
* import { Flag } from "effect/unstable/cli"
|
|
380
411
|
*
|
|
381
412
|
* const env = Flag.keyValuePair("env")
|
|
382
413
|
* // --env FOO=bar --env BAZ=qux will parse to { FOO: "bar", BAZ: "qux" }
|
|
414
|
+
* env.kind // => "flag"
|
|
383
415
|
* ```
|
|
384
416
|
*
|
|
385
417
|
* @category constructors
|
|
@@ -393,14 +425,14 @@ export const keyValuePair = (name: string): Flag<Record<string, string>> => Para
|
|
|
393
425
|
*
|
|
394
426
|
* **Example** (Creating sentinel flags)
|
|
395
427
|
*
|
|
396
|
-
* ```ts
|
|
428
|
+
* ```ts import.meta.vitest
|
|
397
429
|
* import { Flag } from "effect/unstable/cli"
|
|
398
430
|
*
|
|
399
431
|
* const makeValueFlag = (includeValue: boolean) =>
|
|
400
432
|
* includeValue ? Flag.string("value") : Flag.none
|
|
401
433
|
*
|
|
402
|
-
*
|
|
403
|
-
*
|
|
434
|
+
* makeValueFlag(true) === Flag.none // => false
|
|
435
|
+
* makeValueFlag(false) === Flag.none // => true
|
|
404
436
|
* ```
|
|
405
437
|
*
|
|
406
438
|
* @category constructors
|
|
@@ -417,7 +449,7 @@ export const none: Flag<never> = Param.none(Param.flagKind)
|
|
|
417
449
|
*
|
|
418
450
|
* **Example** (Adding flag aliases)
|
|
419
451
|
*
|
|
420
|
-
* ```ts
|
|
452
|
+
* ```ts import.meta.vitest
|
|
421
453
|
* import { Flag } from "effect/unstable/cli"
|
|
422
454
|
*
|
|
423
455
|
* // Flag can be used as both --verbose and -v
|
|
@@ -430,6 +462,7 @@ export const none: Flag<never> = Param.none(Param.flagKind)
|
|
|
430
462
|
* Flag.withAlias("h"),
|
|
431
463
|
* Flag.withAlias("?")
|
|
432
464
|
* )
|
|
465
|
+
* const kinds = [verboseFlag.kind, helpFlag.kind] // => ["flag", "flag"]
|
|
433
466
|
* ```
|
|
434
467
|
*
|
|
435
468
|
* @category aliasing
|
|
@@ -445,7 +478,7 @@ export const withAlias: {
|
|
|
445
478
|
*
|
|
446
479
|
* **Example** (Adding flag aliases)
|
|
447
480
|
*
|
|
448
|
-
* ```ts
|
|
481
|
+
* ```ts import.meta.vitest
|
|
449
482
|
* import { Flag } from "effect/unstable/cli"
|
|
450
483
|
*
|
|
451
484
|
* // Flag can be used as both --verbose and -v
|
|
@@ -458,6 +491,7 @@ export const withAlias: {
|
|
|
458
491
|
* Flag.withAlias("h"),
|
|
459
492
|
* Flag.withAlias("?")
|
|
460
493
|
* )
|
|
494
|
+
* const kinds = [verboseFlag.kind, helpFlag.kind] // => ["flag", "flag"]
|
|
461
495
|
* ```
|
|
462
496
|
*
|
|
463
497
|
* @category aliasing
|
|
@@ -473,7 +507,7 @@ export const withAlias: {
|
|
|
473
507
|
*
|
|
474
508
|
* **Example** (Adding flag aliases)
|
|
475
509
|
*
|
|
476
|
-
* ```ts
|
|
510
|
+
* ```ts import.meta.vitest
|
|
477
511
|
* import { Flag } from "effect/unstable/cli"
|
|
478
512
|
*
|
|
479
513
|
* // Flag can be used as both --verbose and -v
|
|
@@ -486,6 +520,7 @@ export const withAlias: {
|
|
|
486
520
|
* Flag.withAlias("h"),
|
|
487
521
|
* Flag.withAlias("?")
|
|
488
522
|
* )
|
|
523
|
+
* const kinds = [verboseFlag.kind, helpFlag.kind] // => ["flag", "flag"]
|
|
489
524
|
* ```
|
|
490
525
|
*
|
|
491
526
|
* @category aliasing
|
|
@@ -499,7 +534,7 @@ export const withAlias: {
|
|
|
499
534
|
*
|
|
500
535
|
* **Example** (Adding help descriptions)
|
|
501
536
|
*
|
|
502
|
-
* ```ts
|
|
537
|
+
* ```ts import.meta.vitest
|
|
503
538
|
* import { Flag } from "effect/unstable/cli"
|
|
504
539
|
*
|
|
505
540
|
* const portFlag = Flag.integer("port").pipe(
|
|
@@ -509,9 +544,10 @@ export const withAlias: {
|
|
|
509
544
|
* const configFlag = Flag.file("config").pipe(
|
|
510
545
|
* Flag.withDescription("Path to the configuration file")
|
|
511
546
|
* )
|
|
547
|
+
* const kinds = [portFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
512
548
|
* ```
|
|
513
549
|
*
|
|
514
|
-
* @category
|
|
550
|
+
* @category metadata
|
|
515
551
|
* @since 4.0.0
|
|
516
552
|
*/
|
|
517
553
|
export const withDescription: {
|
|
@@ -520,7 +556,7 @@ export const withDescription: {
|
|
|
520
556
|
*
|
|
521
557
|
* **Example** (Adding help descriptions)
|
|
522
558
|
*
|
|
523
|
-
* ```ts
|
|
559
|
+
* ```ts import.meta.vitest
|
|
524
560
|
* import { Flag } from "effect/unstable/cli"
|
|
525
561
|
*
|
|
526
562
|
* const portFlag = Flag.integer("port").pipe(
|
|
@@ -530,9 +566,10 @@ export const withDescription: {
|
|
|
530
566
|
* const configFlag = Flag.file("config").pipe(
|
|
531
567
|
* Flag.withDescription("Path to the configuration file")
|
|
532
568
|
* )
|
|
569
|
+
* const kinds = [portFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
533
570
|
* ```
|
|
534
571
|
*
|
|
535
|
-
* @category
|
|
572
|
+
* @category metadata
|
|
536
573
|
* @since 4.0.0
|
|
537
574
|
*/
|
|
538
575
|
<A>(description: string): (self: Flag<A>) => Flag<A>
|
|
@@ -541,7 +578,7 @@ export const withDescription: {
|
|
|
541
578
|
*
|
|
542
579
|
* **Example** (Adding help descriptions)
|
|
543
580
|
*
|
|
544
|
-
* ```ts
|
|
581
|
+
* ```ts import.meta.vitest
|
|
545
582
|
* import { Flag } from "effect/unstable/cli"
|
|
546
583
|
*
|
|
547
584
|
* const portFlag = Flag.integer("port").pipe(
|
|
@@ -551,9 +588,10 @@ export const withDescription: {
|
|
|
551
588
|
* const configFlag = Flag.file("config").pipe(
|
|
552
589
|
* Flag.withDescription("Path to the configuration file")
|
|
553
590
|
* )
|
|
591
|
+
* const kinds = [portFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
554
592
|
* ```
|
|
555
593
|
*
|
|
556
|
-
* @category
|
|
594
|
+
* @category metadata
|
|
557
595
|
* @since 4.0.0
|
|
558
596
|
*/
|
|
559
597
|
<A>(self: Flag<A>, description: string): Flag<A>
|
|
@@ -573,7 +611,7 @@ export const withDescription: {
|
|
|
573
611
|
*
|
|
574
612
|
* **Example** (Setting metavars)
|
|
575
613
|
*
|
|
576
|
-
* ```ts
|
|
614
|
+
* ```ts import.meta.vitest
|
|
577
615
|
* import { Flag } from "effect/unstable/cli"
|
|
578
616
|
*
|
|
579
617
|
* const databaseFlag = Flag.string("database-url").pipe(
|
|
@@ -586,6 +624,7 @@ export const withDescription: {
|
|
|
586
624
|
* Flag.withMetavar("SECONDS")
|
|
587
625
|
* )
|
|
588
626
|
* // In help: --timeout SECONDS
|
|
627
|
+
* const kinds = [databaseFlag.kind, timeoutFlag.kind] // => ["flag", "flag"]
|
|
589
628
|
* ```
|
|
590
629
|
*
|
|
591
630
|
* @category metadata
|
|
@@ -606,7 +645,7 @@ export const withMetavar: {
|
|
|
606
645
|
*
|
|
607
646
|
* **Example** (Setting metavars)
|
|
608
647
|
*
|
|
609
|
-
* ```ts
|
|
648
|
+
* ```ts import.meta.vitest
|
|
610
649
|
* import { Flag } from "effect/unstable/cli"
|
|
611
650
|
*
|
|
612
651
|
* const databaseFlag = Flag.string("database-url").pipe(
|
|
@@ -619,6 +658,7 @@ export const withMetavar: {
|
|
|
619
658
|
* Flag.withMetavar("SECONDS")
|
|
620
659
|
* )
|
|
621
660
|
* // In help: --timeout SECONDS
|
|
661
|
+
* const kinds = [databaseFlag.kind, timeoutFlag.kind] // => ["flag", "flag"]
|
|
622
662
|
* ```
|
|
623
663
|
*
|
|
624
664
|
* @category metadata
|
|
@@ -639,7 +679,7 @@ export const withMetavar: {
|
|
|
639
679
|
*
|
|
640
680
|
* **Example** (Setting metavars)
|
|
641
681
|
*
|
|
642
|
-
* ```ts
|
|
682
|
+
* ```ts import.meta.vitest
|
|
643
683
|
* import { Flag } from "effect/unstable/cli"
|
|
644
684
|
*
|
|
645
685
|
* const databaseFlag = Flag.string("database-url").pipe(
|
|
@@ -652,6 +692,7 @@ export const withMetavar: {
|
|
|
652
692
|
* Flag.withMetavar("SECONDS")
|
|
653
693
|
* )
|
|
654
694
|
* // In help: --timeout SECONDS
|
|
695
|
+
* const kinds = [databaseFlag.kind, timeoutFlag.kind] // => ["flag", "flag"]
|
|
655
696
|
* ```
|
|
656
697
|
*
|
|
657
698
|
* @category metadata
|
|
@@ -672,13 +713,14 @@ export const withMetavar: {
|
|
|
672
713
|
*
|
|
673
714
|
* **Example** (Hiding a flag from help)
|
|
674
715
|
*
|
|
675
|
-
* ```ts
|
|
716
|
+
* ```ts import.meta.vitest
|
|
676
717
|
* import { Flag } from "effect/unstable/cli"
|
|
677
718
|
*
|
|
678
719
|
* // Flag still parses --experimental-foo, but it does not appear in --help.
|
|
679
720
|
* const experimental = Flag.boolean("experimental-foo").pipe(
|
|
680
721
|
* Flag.withHidden
|
|
681
722
|
* )
|
|
723
|
+
* experimental.kind // => "flag"
|
|
682
724
|
* ```
|
|
683
725
|
*
|
|
684
726
|
* @category metadata
|
|
@@ -691,23 +733,39 @@ export const withHidden = <A>(self: Flag<A>): Flag<A> => Param.withHidden(self)
|
|
|
691
733
|
*
|
|
692
734
|
* **Example** (Making flags optional)
|
|
693
735
|
*
|
|
694
|
-
* ```ts
|
|
695
|
-
* import { Effect, Option } from "effect"
|
|
736
|
+
* ```ts import.meta.vitest
|
|
737
|
+
* import { Effect, FileSystem, Layer, Option, Path, Stdio, Terminal } from "effect"
|
|
696
738
|
* import { Flag } from "effect/unstable/cli"
|
|
739
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
740
|
+
*
|
|
741
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
742
|
+
* FileSystem.layerNoop({}),
|
|
743
|
+
* Path.layer,
|
|
744
|
+
* Stdio.layerTest({}),
|
|
745
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
746
|
+
* columns: Effect.succeed(80),
|
|
747
|
+
* rows: Effect.succeed(24),
|
|
748
|
+
* readInput: Effect.die("unused"),
|
|
749
|
+
* readLine: Effect.die("unused"),
|
|
750
|
+
* display: () => Effect.void
|
|
751
|
+
* })),
|
|
752
|
+
* Layer.succeed(
|
|
753
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
754
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
755
|
+
* )
|
|
756
|
+
* )
|
|
697
757
|
*
|
|
698
758
|
* const optionalPort = Flag.optional(Flag.integer("port"))
|
|
699
759
|
*
|
|
700
760
|
* const program = Effect.gen(function*() {
|
|
701
|
-
* const [
|
|
761
|
+
* const [, port] = yield* optionalPort.parse({
|
|
702
762
|
* arguments: [],
|
|
703
763
|
* flags: { "port": ["4000"] }
|
|
704
764
|
* })
|
|
705
|
-
*
|
|
706
|
-
* console.log("Port specified:", port.value)
|
|
707
|
-
* } else {
|
|
708
|
-
* console.log("No port specified, using default")
|
|
709
|
-
* }
|
|
765
|
+
* return port
|
|
710
766
|
* })
|
|
767
|
+
*
|
|
768
|
+
* await Effect.runPromise(program.pipe(Effect.provide(CliTestLayer))) // => Option.some(4000)
|
|
711
769
|
* ```
|
|
712
770
|
*
|
|
713
771
|
* @category optionality
|
|
@@ -720,7 +778,7 @@ export const optional = <A>(param: Flag<A>): Flag<Option.Option<A>> => Param.opt
|
|
|
720
778
|
*
|
|
721
779
|
* **Example** (Providing default values)
|
|
722
780
|
*
|
|
723
|
-
* ```ts
|
|
781
|
+
* ```ts import.meta.vitest
|
|
724
782
|
* import { Flag } from "effect/unstable/cli"
|
|
725
783
|
*
|
|
726
784
|
* const portFlag = Flag.integer("port").pipe(
|
|
@@ -732,6 +790,7 @@ export const optional = <A>(param: Flag<A>): Flag<Option.Option<A>> => Param.opt
|
|
|
732
790
|
* Flag.withDefault("localhost")
|
|
733
791
|
* )
|
|
734
792
|
* // If --host is not provided, defaults to "localhost"
|
|
793
|
+
* const kinds = [portFlag.kind, hostFlag.kind] // => ["flag", "flag"]
|
|
735
794
|
* ```
|
|
736
795
|
*
|
|
737
796
|
* @category optionality
|
|
@@ -743,7 +802,7 @@ export const withDefault: {
|
|
|
743
802
|
*
|
|
744
803
|
* **Example** (Providing default values)
|
|
745
804
|
*
|
|
746
|
-
* ```ts
|
|
805
|
+
* ```ts import.meta.vitest
|
|
747
806
|
* import { Flag } from "effect/unstable/cli"
|
|
748
807
|
*
|
|
749
808
|
* const portFlag = Flag.integer("port").pipe(
|
|
@@ -755,6 +814,7 @@ export const withDefault: {
|
|
|
755
814
|
* Flag.withDefault("localhost")
|
|
756
815
|
* )
|
|
757
816
|
* // If --host is not provided, defaults to "localhost"
|
|
817
|
+
* const kinds = [portFlag.kind, hostFlag.kind] // => ["flag", "flag"]
|
|
758
818
|
* ```
|
|
759
819
|
*
|
|
760
820
|
* @category optionality
|
|
@@ -766,7 +826,7 @@ export const withDefault: {
|
|
|
766
826
|
*
|
|
767
827
|
* **Example** (Providing default values)
|
|
768
828
|
*
|
|
769
|
-
* ```ts
|
|
829
|
+
* ```ts import.meta.vitest
|
|
770
830
|
* import { Flag } from "effect/unstable/cli"
|
|
771
831
|
*
|
|
772
832
|
* const portFlag = Flag.integer("port").pipe(
|
|
@@ -778,6 +838,7 @@ export const withDefault: {
|
|
|
778
838
|
* Flag.withDefault("localhost")
|
|
779
839
|
* )
|
|
780
840
|
* // If --host is not provided, defaults to "localhost"
|
|
841
|
+
* const kinds = [portFlag.kind, hostFlag.kind] // => ["flag", "flag"]
|
|
781
842
|
* ```
|
|
782
843
|
*
|
|
783
844
|
* @category optionality
|
|
@@ -794,13 +855,14 @@ export const withDefault: {
|
|
|
794
855
|
*
|
|
795
856
|
* **Example** (Falling back to config)
|
|
796
857
|
*
|
|
797
|
-
* ```ts
|
|
858
|
+
* ```ts import.meta.vitest
|
|
798
859
|
* import { Config } from "effect"
|
|
799
860
|
* import { Flag } from "effect/unstable/cli"
|
|
800
861
|
*
|
|
801
862
|
* const verbose = Flag.boolean("verbose").pipe(
|
|
802
863
|
* Flag.withFallbackConfig(Config.boolean("VERBOSE"))
|
|
803
864
|
* )
|
|
865
|
+
* verbose.kind // => "flag"
|
|
804
866
|
* ```
|
|
805
867
|
*
|
|
806
868
|
* @category combinators
|
|
@@ -812,13 +874,14 @@ export const withFallbackConfig: {
|
|
|
812
874
|
*
|
|
813
875
|
* **Example** (Falling back to config)
|
|
814
876
|
*
|
|
815
|
-
* ```ts
|
|
877
|
+
* ```ts import.meta.vitest
|
|
816
878
|
* import { Config } from "effect"
|
|
817
879
|
* import { Flag } from "effect/unstable/cli"
|
|
818
880
|
*
|
|
819
881
|
* const verbose = Flag.boolean("verbose").pipe(
|
|
820
882
|
* Flag.withFallbackConfig(Config.boolean("VERBOSE"))
|
|
821
883
|
* )
|
|
884
|
+
* verbose.kind // => "flag"
|
|
822
885
|
* ```
|
|
823
886
|
*
|
|
824
887
|
* @category combinators
|
|
@@ -830,13 +893,14 @@ export const withFallbackConfig: {
|
|
|
830
893
|
*
|
|
831
894
|
* **Example** (Falling back to config)
|
|
832
895
|
*
|
|
833
|
-
* ```ts
|
|
896
|
+
* ```ts import.meta.vitest
|
|
834
897
|
* import { Config } from "effect"
|
|
835
898
|
* import { Flag } from "effect/unstable/cli"
|
|
836
899
|
*
|
|
837
900
|
* const verbose = Flag.boolean("verbose").pipe(
|
|
838
901
|
* Flag.withFallbackConfig(Config.boolean("VERBOSE"))
|
|
839
902
|
* )
|
|
903
|
+
* verbose.kind // => "flag"
|
|
840
904
|
* ```
|
|
841
905
|
*
|
|
842
906
|
* @category combinators
|
|
@@ -850,12 +914,13 @@ export const withFallbackConfig: {
|
|
|
850
914
|
*
|
|
851
915
|
* **Example** (Falling back to prompts)
|
|
852
916
|
*
|
|
853
|
-
* ```ts
|
|
917
|
+
* ```ts import.meta.vitest
|
|
854
918
|
* import { Flag, Prompt } from "effect/unstable/cli"
|
|
855
919
|
*
|
|
856
920
|
* const name = Flag.string("name").pipe(
|
|
857
921
|
* Flag.withFallbackPrompt(Prompt.text({ message: "Name" }))
|
|
858
922
|
* )
|
|
923
|
+
* name.kind // => "flag"
|
|
859
924
|
* ```
|
|
860
925
|
*
|
|
861
926
|
* @category combinators
|
|
@@ -867,12 +932,13 @@ export const withFallbackPrompt: {
|
|
|
867
932
|
*
|
|
868
933
|
* **Example** (Falling back to prompts)
|
|
869
934
|
*
|
|
870
|
-
* ```ts
|
|
935
|
+
* ```ts import.meta.vitest
|
|
871
936
|
* import { Flag, Prompt } from "effect/unstable/cli"
|
|
872
937
|
*
|
|
873
938
|
* const name = Flag.string("name").pipe(
|
|
874
939
|
* Flag.withFallbackPrompt(Prompt.text({ message: "Name" }))
|
|
875
940
|
* )
|
|
941
|
+
* name.kind // => "flag"
|
|
876
942
|
* ```
|
|
877
943
|
*
|
|
878
944
|
* @category combinators
|
|
@@ -884,12 +950,13 @@ export const withFallbackPrompt: {
|
|
|
884
950
|
*
|
|
885
951
|
* **Example** (Falling back to prompts)
|
|
886
952
|
*
|
|
887
|
-
* ```ts
|
|
953
|
+
* ```ts import.meta.vitest
|
|
888
954
|
* import { Flag, Prompt } from "effect/unstable/cli"
|
|
889
955
|
*
|
|
890
956
|
* const name = Flag.string("name").pipe(
|
|
891
957
|
* Flag.withFallbackPrompt(Prompt.text({ message: "Name" }))
|
|
892
958
|
* )
|
|
959
|
+
* name.kind // => "flag"
|
|
893
960
|
* ```
|
|
894
961
|
*
|
|
895
962
|
* @category combinators
|
|
@@ -903,7 +970,7 @@ export const withFallbackPrompt: {
|
|
|
903
970
|
*
|
|
904
971
|
* **Example** (Mapping parsed values)
|
|
905
972
|
*
|
|
906
|
-
* ```ts
|
|
973
|
+
* ```ts import.meta.vitest
|
|
907
974
|
* import { Flag } from "effect/unstable/cli"
|
|
908
975
|
*
|
|
909
976
|
* // Convert string to uppercase
|
|
@@ -915,6 +982,7 @@ export const withFallbackPrompt: {
|
|
|
915
982
|
* const urlFlag = Flag.integer("port").pipe(
|
|
916
983
|
* Flag.map((port) => `http://localhost:${port}`)
|
|
917
984
|
* )
|
|
985
|
+
* const kinds = [nameFlag.kind, urlFlag.kind] // => ["flag", "flag"]
|
|
918
986
|
* ```
|
|
919
987
|
*
|
|
920
988
|
* @category mapping
|
|
@@ -926,7 +994,7 @@ export const map: {
|
|
|
926
994
|
*
|
|
927
995
|
* **Example** (Mapping parsed values)
|
|
928
996
|
*
|
|
929
|
-
* ```ts
|
|
997
|
+
* ```ts import.meta.vitest
|
|
930
998
|
* import { Flag } from "effect/unstable/cli"
|
|
931
999
|
*
|
|
932
1000
|
* // Convert string to uppercase
|
|
@@ -938,6 +1006,7 @@ export const map: {
|
|
|
938
1006
|
* const urlFlag = Flag.integer("port").pipe(
|
|
939
1007
|
* Flag.map((port) => `http://localhost:${port}`)
|
|
940
1008
|
* )
|
|
1009
|
+
* const kinds = [nameFlag.kind, urlFlag.kind] // => ["flag", "flag"]
|
|
941
1010
|
* ```
|
|
942
1011
|
*
|
|
943
1012
|
* @category mapping
|
|
@@ -949,7 +1018,7 @@ export const map: {
|
|
|
949
1018
|
*
|
|
950
1019
|
* **Example** (Mapping parsed values)
|
|
951
1020
|
*
|
|
952
|
-
* ```ts
|
|
1021
|
+
* ```ts import.meta.vitest
|
|
953
1022
|
* import { Flag } from "effect/unstable/cli"
|
|
954
1023
|
*
|
|
955
1024
|
* // Convert string to uppercase
|
|
@@ -961,6 +1030,7 @@ export const map: {
|
|
|
961
1030
|
* const urlFlag = Flag.integer("port").pipe(
|
|
962
1031
|
* Flag.map((port) => `http://localhost:${port}`)
|
|
963
1032
|
* )
|
|
1033
|
+
* const kinds = [nameFlag.kind, urlFlag.kind] // => ["flag", "flag"]
|
|
964
1034
|
* ```
|
|
965
1035
|
*
|
|
966
1036
|
* @category mapping
|
|
@@ -974,18 +1044,39 @@ export const map: {
|
|
|
974
1044
|
*
|
|
975
1045
|
* **Example** (Mapping parsed values effectfully)
|
|
976
1046
|
*
|
|
977
|
-
* ```ts
|
|
978
|
-
* import { Effect, FileSystem } from "effect"
|
|
1047
|
+
* ```ts import.meta.vitest
|
|
1048
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
979
1049
|
* import { Flag } from "effect/unstable/cli"
|
|
1050
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1051
|
+
*
|
|
1052
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1053
|
+
* FileSystem.layerNoop({}),
|
|
1054
|
+
* Path.layer,
|
|
1055
|
+
* Stdio.layerTest({}),
|
|
1056
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1057
|
+
* columns: Effect.succeed(80),
|
|
1058
|
+
* rows: Effect.succeed(24),
|
|
1059
|
+
* readInput: Effect.die("unused"),
|
|
1060
|
+
* readLine: Effect.die("unused"),
|
|
1061
|
+
* display: () => Effect.void
|
|
1062
|
+
* })),
|
|
1063
|
+
* Layer.succeed(
|
|
1064
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1065
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1066
|
+
* )
|
|
1067
|
+
* )
|
|
1068
|
+
*
|
|
1069
|
+
* const upperName = Flag.string("name").pipe(
|
|
1070
|
+
* Flag.mapEffect((name) => Effect.succeed(name.toUpperCase()))
|
|
1071
|
+
* )
|
|
980
1072
|
*
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
984
|
-
*
|
|
985
|
-
*
|
|
986
|
-
* return stats.size
|
|
987
|
-
* }))
|
|
1073
|
+
* const [, value] = await Effect.runPromise(
|
|
1074
|
+
* upperName.parse({
|
|
1075
|
+
* arguments: [],
|
|
1076
|
+
* flags: { name: ["alice"] }
|
|
1077
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
988
1078
|
* )
|
|
1079
|
+
* value // => "ALICE"
|
|
989
1080
|
* ```
|
|
990
1081
|
*
|
|
991
1082
|
* @category mapping
|
|
@@ -997,18 +1088,39 @@ export const mapEffect: {
|
|
|
997
1088
|
*
|
|
998
1089
|
* **Example** (Mapping parsed values effectfully)
|
|
999
1090
|
*
|
|
1000
|
-
* ```ts
|
|
1001
|
-
* import { Effect, FileSystem } from "effect"
|
|
1091
|
+
* ```ts import.meta.vitest
|
|
1092
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1002
1093
|
* import { Flag } from "effect/unstable/cli"
|
|
1094
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1095
|
+
*
|
|
1096
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1097
|
+
* FileSystem.layerNoop({}),
|
|
1098
|
+
* Path.layer,
|
|
1099
|
+
* Stdio.layerTest({}),
|
|
1100
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1101
|
+
* columns: Effect.succeed(80),
|
|
1102
|
+
* rows: Effect.succeed(24),
|
|
1103
|
+
* readInput: Effect.die("unused"),
|
|
1104
|
+
* readLine: Effect.die("unused"),
|
|
1105
|
+
* display: () => Effect.void
|
|
1106
|
+
* })),
|
|
1107
|
+
* Layer.succeed(
|
|
1108
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1109
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1110
|
+
* )
|
|
1111
|
+
* )
|
|
1112
|
+
*
|
|
1113
|
+
* const upperName = Flag.string("name").pipe(
|
|
1114
|
+
* Flag.mapEffect((name) => Effect.succeed(name.toUpperCase()))
|
|
1115
|
+
* )
|
|
1003
1116
|
*
|
|
1004
|
-
*
|
|
1005
|
-
*
|
|
1006
|
-
*
|
|
1007
|
-
*
|
|
1008
|
-
*
|
|
1009
|
-
* return stats.size
|
|
1010
|
-
* }))
|
|
1117
|
+
* const [, value] = await Effect.runPromise(
|
|
1118
|
+
* upperName.parse({
|
|
1119
|
+
* arguments: [],
|
|
1120
|
+
* flags: { name: ["alice"] }
|
|
1121
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1011
1122
|
* )
|
|
1123
|
+
* value // => "ALICE"
|
|
1012
1124
|
* ```
|
|
1013
1125
|
*
|
|
1014
1126
|
* @category mapping
|
|
@@ -1020,18 +1132,39 @@ export const mapEffect: {
|
|
|
1020
1132
|
*
|
|
1021
1133
|
* **Example** (Mapping parsed values effectfully)
|
|
1022
1134
|
*
|
|
1023
|
-
* ```ts
|
|
1024
|
-
* import { Effect, FileSystem } from "effect"
|
|
1135
|
+
* ```ts import.meta.vitest
|
|
1136
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1025
1137
|
* import { Flag } from "effect/unstable/cli"
|
|
1138
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1139
|
+
*
|
|
1140
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1141
|
+
* FileSystem.layerNoop({}),
|
|
1142
|
+
* Path.layer,
|
|
1143
|
+
* Stdio.layerTest({}),
|
|
1144
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1145
|
+
* columns: Effect.succeed(80),
|
|
1146
|
+
* rows: Effect.succeed(24),
|
|
1147
|
+
* readInput: Effect.die("unused"),
|
|
1148
|
+
* readLine: Effect.die("unused"),
|
|
1149
|
+
* display: () => Effect.void
|
|
1150
|
+
* })),
|
|
1151
|
+
* Layer.succeed(
|
|
1152
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1153
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1154
|
+
* )
|
|
1155
|
+
* )
|
|
1026
1156
|
*
|
|
1027
|
-
*
|
|
1028
|
-
*
|
|
1029
|
-
*
|
|
1030
|
-
*
|
|
1031
|
-
*
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1157
|
+
* const upperName = Flag.string("name").pipe(
|
|
1158
|
+
* Flag.mapEffect((name) => Effect.succeed(name.toUpperCase()))
|
|
1159
|
+
* )
|
|
1160
|
+
*
|
|
1161
|
+
* const [, value] = await Effect.runPromise(
|
|
1162
|
+
* upperName.parse({
|
|
1163
|
+
* arguments: [],
|
|
1164
|
+
* flags: { name: ["alice"] }
|
|
1165
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1034
1166
|
* )
|
|
1167
|
+
* value // => "ALICE"
|
|
1035
1168
|
* ```
|
|
1036
1169
|
*
|
|
1037
1170
|
* @category mapping
|
|
@@ -1051,8 +1184,27 @@ export const mapEffect: {
|
|
|
1051
1184
|
*
|
|
1052
1185
|
* **Example** (Mapping thrown errors)
|
|
1053
1186
|
*
|
|
1054
|
-
* ```ts
|
|
1187
|
+
* ```ts import.meta.vitest
|
|
1188
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1055
1189
|
* import { Flag } from "effect/unstable/cli"
|
|
1190
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1191
|
+
*
|
|
1192
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1193
|
+
* FileSystem.layerNoop({}),
|
|
1194
|
+
* Path.layer,
|
|
1195
|
+
* Stdio.layerTest({}),
|
|
1196
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1197
|
+
* columns: Effect.succeed(80),
|
|
1198
|
+
* rows: Effect.succeed(24),
|
|
1199
|
+
* readInput: Effect.die("unused"),
|
|
1200
|
+
* readLine: Effect.die("unused"),
|
|
1201
|
+
* display: () => Effect.void
|
|
1202
|
+
* })),
|
|
1203
|
+
* Layer.succeed(
|
|
1204
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1205
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1206
|
+
* )
|
|
1207
|
+
* )
|
|
1056
1208
|
*
|
|
1057
1209
|
* // Parse JSON string with error handling
|
|
1058
1210
|
* const jsonFlag = Flag.string("config").pipe(
|
|
@@ -1069,6 +1221,14 @@ export const mapEffect: {
|
|
|
1069
1221
|
* (error) => `Invalid URL: ${error}`
|
|
1070
1222
|
* )
|
|
1071
1223
|
* )
|
|
1224
|
+
*
|
|
1225
|
+
* const [, value] = await Effect.runPromise(
|
|
1226
|
+
* jsonFlag.parse({
|
|
1227
|
+
* arguments: [],
|
|
1228
|
+
* flags: { config: ['{"enabled":true}'] }
|
|
1229
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1230
|
+
* )
|
|
1231
|
+
* value // => { enabled: true }
|
|
1072
1232
|
* ```
|
|
1073
1233
|
*
|
|
1074
1234
|
* @category mapping
|
|
@@ -1080,8 +1240,27 @@ export const mapTryCatch: {
|
|
|
1080
1240
|
*
|
|
1081
1241
|
* **Example** (Mapping thrown errors)
|
|
1082
1242
|
*
|
|
1083
|
-
* ```ts
|
|
1243
|
+
* ```ts import.meta.vitest
|
|
1244
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1084
1245
|
* import { Flag } from "effect/unstable/cli"
|
|
1246
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1247
|
+
*
|
|
1248
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1249
|
+
* FileSystem.layerNoop({}),
|
|
1250
|
+
* Path.layer,
|
|
1251
|
+
* Stdio.layerTest({}),
|
|
1252
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1253
|
+
* columns: Effect.succeed(80),
|
|
1254
|
+
* rows: Effect.succeed(24),
|
|
1255
|
+
* readInput: Effect.die("unused"),
|
|
1256
|
+
* readLine: Effect.die("unused"),
|
|
1257
|
+
* display: () => Effect.void
|
|
1258
|
+
* })),
|
|
1259
|
+
* Layer.succeed(
|
|
1260
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1261
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1262
|
+
* )
|
|
1263
|
+
* )
|
|
1085
1264
|
*
|
|
1086
1265
|
* // Parse JSON string with error handling
|
|
1087
1266
|
* const jsonFlag = Flag.string("config").pipe(
|
|
@@ -1098,6 +1277,14 @@ export const mapTryCatch: {
|
|
|
1098
1277
|
* (error) => `Invalid URL: ${error}`
|
|
1099
1278
|
* )
|
|
1100
1279
|
* )
|
|
1280
|
+
*
|
|
1281
|
+
* const [, value] = await Effect.runPromise(
|
|
1282
|
+
* jsonFlag.parse({
|
|
1283
|
+
* arguments: [],
|
|
1284
|
+
* flags: { config: ['{"enabled":true}'] }
|
|
1285
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1286
|
+
* )
|
|
1287
|
+
* value // => { enabled: true }
|
|
1101
1288
|
* ```
|
|
1102
1289
|
*
|
|
1103
1290
|
* @category mapping
|
|
@@ -1109,8 +1296,27 @@ export const mapTryCatch: {
|
|
|
1109
1296
|
*
|
|
1110
1297
|
* **Example** (Mapping thrown errors)
|
|
1111
1298
|
*
|
|
1112
|
-
* ```ts
|
|
1299
|
+
* ```ts import.meta.vitest
|
|
1300
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1113
1301
|
* import { Flag } from "effect/unstable/cli"
|
|
1302
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1303
|
+
*
|
|
1304
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1305
|
+
* FileSystem.layerNoop({}),
|
|
1306
|
+
* Path.layer,
|
|
1307
|
+
* Stdio.layerTest({}),
|
|
1308
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1309
|
+
* columns: Effect.succeed(80),
|
|
1310
|
+
* rows: Effect.succeed(24),
|
|
1311
|
+
* readInput: Effect.die("unused"),
|
|
1312
|
+
* readLine: Effect.die("unused"),
|
|
1313
|
+
* display: () => Effect.void
|
|
1314
|
+
* })),
|
|
1315
|
+
* Layer.succeed(
|
|
1316
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1317
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1318
|
+
* )
|
|
1319
|
+
* )
|
|
1114
1320
|
*
|
|
1115
1321
|
* // Parse JSON string with error handling
|
|
1116
1322
|
* const jsonFlag = Flag.string("config").pipe(
|
|
@@ -1127,6 +1333,14 @@ export const mapTryCatch: {
|
|
|
1127
1333
|
* (error) => `Invalid URL: ${error}`
|
|
1128
1334
|
* )
|
|
1129
1335
|
* )
|
|
1336
|
+
*
|
|
1337
|
+
* const [, value] = await Effect.runPromise(
|
|
1338
|
+
* jsonFlag.parse({
|
|
1339
|
+
* arguments: [],
|
|
1340
|
+
* flags: { config: ['{"enabled":true}'] }
|
|
1341
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1342
|
+
* )
|
|
1343
|
+
* value // => { enabled: true }
|
|
1130
1344
|
* ```
|
|
1131
1345
|
*
|
|
1132
1346
|
* @category mapping
|
|
@@ -1144,7 +1358,7 @@ export const mapTryCatch: {
|
|
|
1144
1358
|
*
|
|
1145
1359
|
* **Example** (Requiring repeated values)
|
|
1146
1360
|
*
|
|
1147
|
-
* ```ts
|
|
1361
|
+
* ```ts import.meta.vitest
|
|
1148
1362
|
* import { Flag } from "effect/unstable/cli"
|
|
1149
1363
|
*
|
|
1150
1364
|
* const sourceFlag = Flag.atLeast(Flag.file("source"), 2)
|
|
@@ -1155,6 +1369,7 @@ export const mapTryCatch: {
|
|
|
1155
1369
|
* Flag.atLeast(1)
|
|
1156
1370
|
* )
|
|
1157
1371
|
* // Requires at least 1 tag
|
|
1372
|
+
* const kinds = [sourceFlag.kind, tagFlag.kind] // => ["flag", "flag"]
|
|
1158
1373
|
* ```
|
|
1159
1374
|
*
|
|
1160
1375
|
* @category repetition
|
|
@@ -1166,7 +1381,7 @@ export const atLeast: {
|
|
|
1166
1381
|
*
|
|
1167
1382
|
* **Example** (Requiring repeated values)
|
|
1168
1383
|
*
|
|
1169
|
-
* ```ts
|
|
1384
|
+
* ```ts import.meta.vitest
|
|
1170
1385
|
* import { Flag } from "effect/unstable/cli"
|
|
1171
1386
|
*
|
|
1172
1387
|
* const sourceFlag = Flag.atLeast(Flag.file("source"), 2)
|
|
@@ -1177,6 +1392,7 @@ export const atLeast: {
|
|
|
1177
1392
|
* Flag.atLeast(1)
|
|
1178
1393
|
* )
|
|
1179
1394
|
* // Requires at least 1 tag
|
|
1395
|
+
* const kinds = [sourceFlag.kind, tagFlag.kind] // => ["flag", "flag"]
|
|
1180
1396
|
* ```
|
|
1181
1397
|
*
|
|
1182
1398
|
* @category repetition
|
|
@@ -1188,7 +1404,7 @@ export const atLeast: {
|
|
|
1188
1404
|
*
|
|
1189
1405
|
* **Example** (Requiring repeated values)
|
|
1190
1406
|
*
|
|
1191
|
-
* ```ts
|
|
1407
|
+
* ```ts import.meta.vitest
|
|
1192
1408
|
* import { Flag } from "effect/unstable/cli"
|
|
1193
1409
|
*
|
|
1194
1410
|
* const sourceFlag = Flag.atLeast(Flag.file("source"), 2)
|
|
@@ -1199,6 +1415,7 @@ export const atLeast: {
|
|
|
1199
1415
|
* Flag.atLeast(1)
|
|
1200
1416
|
* )
|
|
1201
1417
|
* // Requires at least 1 tag
|
|
1418
|
+
* const kinds = [sourceFlag.kind, tagFlag.kind] // => ["flag", "flag"]
|
|
1202
1419
|
* ```
|
|
1203
1420
|
*
|
|
1204
1421
|
* @category repetition
|
|
@@ -1212,7 +1429,7 @@ export const atLeast: {
|
|
|
1212
1429
|
*
|
|
1213
1430
|
* **Example** (Limiting repeated values)
|
|
1214
1431
|
*
|
|
1215
|
-
* ```ts
|
|
1432
|
+
* ```ts import.meta.vitest
|
|
1216
1433
|
* import { Flag } from "effect/unstable/cli"
|
|
1217
1434
|
*
|
|
1218
1435
|
* const warningFlag = Flag.atMost(Flag.string("warning"), 3)
|
|
@@ -1223,6 +1440,7 @@ export const atLeast: {
|
|
|
1223
1440
|
* Flag.atMost(1)
|
|
1224
1441
|
* )
|
|
1225
1442
|
* // Allows at most 1 debug flag
|
|
1443
|
+
* const kinds = [warningFlag.kind, debugFlag.kind] // => ["flag", "flag"]
|
|
1226
1444
|
* ```
|
|
1227
1445
|
*
|
|
1228
1446
|
* @category repetition
|
|
@@ -1234,7 +1452,7 @@ export const atMost: {
|
|
|
1234
1452
|
*
|
|
1235
1453
|
* **Example** (Limiting repeated values)
|
|
1236
1454
|
*
|
|
1237
|
-
* ```ts
|
|
1455
|
+
* ```ts import.meta.vitest
|
|
1238
1456
|
* import { Flag } from "effect/unstable/cli"
|
|
1239
1457
|
*
|
|
1240
1458
|
* const warningFlag = Flag.atMost(Flag.string("warning"), 3)
|
|
@@ -1245,6 +1463,7 @@ export const atMost: {
|
|
|
1245
1463
|
* Flag.atMost(1)
|
|
1246
1464
|
* )
|
|
1247
1465
|
* // Allows at most 1 debug flag
|
|
1466
|
+
* const kinds = [warningFlag.kind, debugFlag.kind] // => ["flag", "flag"]
|
|
1248
1467
|
* ```
|
|
1249
1468
|
*
|
|
1250
1469
|
* @category repetition
|
|
@@ -1256,7 +1475,7 @@ export const atMost: {
|
|
|
1256
1475
|
*
|
|
1257
1476
|
* **Example** (Limiting repeated values)
|
|
1258
1477
|
*
|
|
1259
|
-
* ```ts
|
|
1478
|
+
* ```ts import.meta.vitest
|
|
1260
1479
|
* import { Flag } from "effect/unstable/cli"
|
|
1261
1480
|
*
|
|
1262
1481
|
* const warningFlag = Flag.atMost(Flag.string("warning"), 3)
|
|
@@ -1267,6 +1486,7 @@ export const atMost: {
|
|
|
1267
1486
|
* Flag.atMost(1)
|
|
1268
1487
|
* )
|
|
1269
1488
|
* // Allows at most 1 debug flag
|
|
1489
|
+
* const kinds = [warningFlag.kind, debugFlag.kind] // => ["flag", "flag"]
|
|
1270
1490
|
* ```
|
|
1271
1491
|
*
|
|
1272
1492
|
* @category repetition
|
|
@@ -1280,7 +1500,7 @@ export const atMost: {
|
|
|
1280
1500
|
*
|
|
1281
1501
|
* **Example** (Bounding repeated values)
|
|
1282
1502
|
*
|
|
1283
|
-
* ```ts
|
|
1503
|
+
* ```ts import.meta.vitest
|
|
1284
1504
|
* import { Flag } from "effect/unstable/cli"
|
|
1285
1505
|
*
|
|
1286
1506
|
* const hostFlag = Flag.between(Flag.string("host"), 1, 3)
|
|
@@ -1291,6 +1511,7 @@ export const atMost: {
|
|
|
1291
1511
|
* Flag.between(0, 5)
|
|
1292
1512
|
* )
|
|
1293
1513
|
* // Allows 0-5 exclude patterns
|
|
1514
|
+
* const kinds = [hostFlag.kind, excludeFlag.kind] // => ["flag", "flag"]
|
|
1294
1515
|
* ```
|
|
1295
1516
|
*
|
|
1296
1517
|
* @category repetition
|
|
@@ -1302,7 +1523,7 @@ export const between: {
|
|
|
1302
1523
|
*
|
|
1303
1524
|
* **Example** (Bounding repeated values)
|
|
1304
1525
|
*
|
|
1305
|
-
* ```ts
|
|
1526
|
+
* ```ts import.meta.vitest
|
|
1306
1527
|
* import { Flag } from "effect/unstable/cli"
|
|
1307
1528
|
*
|
|
1308
1529
|
* const hostFlag = Flag.between(Flag.string("host"), 1, 3)
|
|
@@ -1313,6 +1534,7 @@ export const between: {
|
|
|
1313
1534
|
* Flag.between(0, 5)
|
|
1314
1535
|
* )
|
|
1315
1536
|
* // Allows 0-5 exclude patterns
|
|
1537
|
+
* const kinds = [hostFlag.kind, excludeFlag.kind] // => ["flag", "flag"]
|
|
1316
1538
|
* ```
|
|
1317
1539
|
*
|
|
1318
1540
|
* @category repetition
|
|
@@ -1324,7 +1546,7 @@ export const between: {
|
|
|
1324
1546
|
*
|
|
1325
1547
|
* **Example** (Bounding repeated values)
|
|
1326
1548
|
*
|
|
1327
|
-
* ```ts
|
|
1549
|
+
* ```ts import.meta.vitest
|
|
1328
1550
|
* import { Flag } from "effect/unstable/cli"
|
|
1329
1551
|
*
|
|
1330
1552
|
* const hostFlag = Flag.between(Flag.string("host"), 1, 3)
|
|
@@ -1335,6 +1557,7 @@ export const between: {
|
|
|
1335
1557
|
* Flag.between(0, 5)
|
|
1336
1558
|
* )
|
|
1337
1559
|
* // Allows 0-5 exclude patterns
|
|
1560
|
+
* const kinds = [hostFlag.kind, excludeFlag.kind] // => ["flag", "flag"]
|
|
1338
1561
|
* ```
|
|
1339
1562
|
*
|
|
1340
1563
|
* @category repetition
|
|
@@ -1348,7 +1571,7 @@ export const between: {
|
|
|
1348
1571
|
*
|
|
1349
1572
|
* **Example** (Filtering and transforming values)
|
|
1350
1573
|
*
|
|
1351
|
-
* ```ts
|
|
1574
|
+
* ```ts import.meta.vitest
|
|
1352
1575
|
* import { Option } from "effect"
|
|
1353
1576
|
* import { Flag } from "effect/unstable/cli"
|
|
1354
1577
|
*
|
|
@@ -1367,6 +1590,7 @@ export const between: {
|
|
|
1367
1590
|
* (email) => `Invalid email address: ${email}`
|
|
1368
1591
|
* )
|
|
1369
1592
|
* )
|
|
1593
|
+
* const kinds = [positiveInt.kind, emailFlag.kind] // => ["flag", "flag"]
|
|
1370
1594
|
* ```
|
|
1371
1595
|
*
|
|
1372
1596
|
* @category filtering
|
|
@@ -1378,7 +1602,7 @@ export const filterMap: {
|
|
|
1378
1602
|
*
|
|
1379
1603
|
* **Example** (Filtering and transforming values)
|
|
1380
1604
|
*
|
|
1381
|
-
* ```ts
|
|
1605
|
+
* ```ts import.meta.vitest
|
|
1382
1606
|
* import { Option } from "effect"
|
|
1383
1607
|
* import { Flag } from "effect/unstable/cli"
|
|
1384
1608
|
*
|
|
@@ -1397,6 +1621,7 @@ export const filterMap: {
|
|
|
1397
1621
|
* (email) => `Invalid email address: ${email}`
|
|
1398
1622
|
* )
|
|
1399
1623
|
* )
|
|
1624
|
+
* const kinds = [positiveInt.kind, emailFlag.kind] // => ["flag", "flag"]
|
|
1400
1625
|
* ```
|
|
1401
1626
|
*
|
|
1402
1627
|
* @category filtering
|
|
@@ -1408,7 +1633,7 @@ export const filterMap: {
|
|
|
1408
1633
|
*
|
|
1409
1634
|
* **Example** (Filtering and transforming values)
|
|
1410
1635
|
*
|
|
1411
|
-
* ```ts
|
|
1636
|
+
* ```ts import.meta.vitest
|
|
1412
1637
|
* import { Option } from "effect"
|
|
1413
1638
|
* import { Flag } from "effect/unstable/cli"
|
|
1414
1639
|
*
|
|
@@ -1427,6 +1652,7 @@ export const filterMap: {
|
|
|
1427
1652
|
* (email) => `Invalid email address: ${email}`
|
|
1428
1653
|
* )
|
|
1429
1654
|
* )
|
|
1655
|
+
* const kinds = [positiveInt.kind, emailFlag.kind] // => ["flag", "flag"]
|
|
1430
1656
|
* ```
|
|
1431
1657
|
*
|
|
1432
1658
|
* @category filtering
|
|
@@ -1444,7 +1670,7 @@ export const filterMap: {
|
|
|
1444
1670
|
*
|
|
1445
1671
|
* **Example** (Filtering parsed values)
|
|
1446
1672
|
*
|
|
1447
|
-
* ```ts
|
|
1673
|
+
* ```ts import.meta.vitest
|
|
1448
1674
|
* import { Flag } from "effect/unstable/cli"
|
|
1449
1675
|
*
|
|
1450
1676
|
* // Ensure port is in valid range
|
|
@@ -1462,6 +1688,7 @@ export const filterMap: {
|
|
|
1462
1688
|
* () => "Name cannot be empty"
|
|
1463
1689
|
* )
|
|
1464
1690
|
* )
|
|
1691
|
+
* const kinds = [portFlag.kind, nameFlag.kind] // => ["flag", "flag"]
|
|
1465
1692
|
* ```
|
|
1466
1693
|
*
|
|
1467
1694
|
* @category filtering
|
|
@@ -1473,7 +1700,7 @@ export const filter: {
|
|
|
1473
1700
|
*
|
|
1474
1701
|
* **Example** (Filtering parsed values)
|
|
1475
1702
|
*
|
|
1476
|
-
* ```ts
|
|
1703
|
+
* ```ts import.meta.vitest
|
|
1477
1704
|
* import { Flag } from "effect/unstable/cli"
|
|
1478
1705
|
*
|
|
1479
1706
|
* // Ensure port is in valid range
|
|
@@ -1491,6 +1718,7 @@ export const filter: {
|
|
|
1491
1718
|
* () => "Name cannot be empty"
|
|
1492
1719
|
* )
|
|
1493
1720
|
* )
|
|
1721
|
+
* const kinds = [portFlag.kind, nameFlag.kind] // => ["flag", "flag"]
|
|
1494
1722
|
* ```
|
|
1495
1723
|
*
|
|
1496
1724
|
* @category filtering
|
|
@@ -1502,7 +1730,7 @@ export const filter: {
|
|
|
1502
1730
|
*
|
|
1503
1731
|
* **Example** (Filtering parsed values)
|
|
1504
1732
|
*
|
|
1505
|
-
* ```ts
|
|
1733
|
+
* ```ts import.meta.vitest
|
|
1506
1734
|
* import { Flag } from "effect/unstable/cli"
|
|
1507
1735
|
*
|
|
1508
1736
|
* // Ensure port is in valid range
|
|
@@ -1520,6 +1748,7 @@ export const filter: {
|
|
|
1520
1748
|
* () => "Name cannot be empty"
|
|
1521
1749
|
* )
|
|
1522
1750
|
* )
|
|
1751
|
+
* const kinds = [portFlag.kind, nameFlag.kind] // => ["flag", "flag"]
|
|
1523
1752
|
* ```
|
|
1524
1753
|
*
|
|
1525
1754
|
* @category filtering
|
|
@@ -1537,7 +1766,7 @@ export const filter: {
|
|
|
1537
1766
|
*
|
|
1538
1767
|
* **Example** (Falling back to another flag)
|
|
1539
1768
|
*
|
|
1540
|
-
* ```ts
|
|
1769
|
+
* ```ts import.meta.vitest
|
|
1541
1770
|
* import { Flag } from "effect/unstable/cli"
|
|
1542
1771
|
*
|
|
1543
1772
|
* // Try parsing as integer, fallback to string
|
|
@@ -1551,6 +1780,7 @@ export const filter: {
|
|
|
1551
1780
|
* Flag.file("config"),
|
|
1552
1781
|
* () => Flag.string("config-url")
|
|
1553
1782
|
* )
|
|
1783
|
+
* const kinds = [valueFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
1554
1784
|
* ```
|
|
1555
1785
|
*
|
|
1556
1786
|
* @category alternatives
|
|
@@ -1562,7 +1792,7 @@ export const orElse: {
|
|
|
1562
1792
|
*
|
|
1563
1793
|
* **Example** (Falling back to another flag)
|
|
1564
1794
|
*
|
|
1565
|
-
* ```ts
|
|
1795
|
+
* ```ts import.meta.vitest
|
|
1566
1796
|
* import { Flag } from "effect/unstable/cli"
|
|
1567
1797
|
*
|
|
1568
1798
|
* // Try parsing as integer, fallback to string
|
|
@@ -1576,6 +1806,7 @@ export const orElse: {
|
|
|
1576
1806
|
* Flag.file("config"),
|
|
1577
1807
|
* () => Flag.string("config-url")
|
|
1578
1808
|
* )
|
|
1809
|
+
* const kinds = [valueFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
1579
1810
|
* ```
|
|
1580
1811
|
*
|
|
1581
1812
|
* @category alternatives
|
|
@@ -1587,7 +1818,7 @@ export const orElse: {
|
|
|
1587
1818
|
*
|
|
1588
1819
|
* **Example** (Falling back to another flag)
|
|
1589
1820
|
*
|
|
1590
|
-
* ```ts
|
|
1821
|
+
* ```ts import.meta.vitest
|
|
1591
1822
|
* import { Flag } from "effect/unstable/cli"
|
|
1592
1823
|
*
|
|
1593
1824
|
* // Try parsing as integer, fallback to string
|
|
@@ -1601,6 +1832,7 @@ export const orElse: {
|
|
|
1601
1832
|
* Flag.file("config"),
|
|
1602
1833
|
* () => Flag.string("config-url")
|
|
1603
1834
|
* )
|
|
1835
|
+
* const kinds = [valueFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
1604
1836
|
* ```
|
|
1605
1837
|
*
|
|
1606
1838
|
* @category alternatives
|
|
@@ -1614,27 +1846,42 @@ export const orElse: {
|
|
|
1614
1846
|
*
|
|
1615
1847
|
* **Example** (Returning fallback results)
|
|
1616
1848
|
*
|
|
1617
|
-
* ```ts
|
|
1618
|
-
* import { Effect, Result } from "effect"
|
|
1849
|
+
* ```ts import.meta.vitest
|
|
1850
|
+
* import { Effect, FileSystem, Layer, Path, Result, Stdio, Terminal } from "effect"
|
|
1619
1851
|
* import { Flag } from "effect/unstable/cli"
|
|
1852
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1853
|
+
*
|
|
1854
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1855
|
+
* FileSystem.layerNoop({}),
|
|
1856
|
+
* Path.layer,
|
|
1857
|
+
* Stdio.layerTest({}),
|
|
1858
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1859
|
+
* columns: Effect.succeed(80),
|
|
1860
|
+
* rows: Effect.succeed(24),
|
|
1861
|
+
* readInput: Effect.die("unused"),
|
|
1862
|
+
* readLine: Effect.die("unused"),
|
|
1863
|
+
* display: () => Effect.void
|
|
1864
|
+
* })),
|
|
1865
|
+
* Layer.succeed(
|
|
1866
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1867
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1868
|
+
* )
|
|
1869
|
+
* )
|
|
1620
1870
|
*
|
|
1621
|
-
* // Try file path, fallback to URL
|
|
1622
1871
|
* const sourceFlag = Flag.orElseResult(
|
|
1623
|
-
* Flag.
|
|
1872
|
+
* Flag.string("source"),
|
|
1624
1873
|
* () => Flag.string("source-url")
|
|
1625
1874
|
* )
|
|
1626
1875
|
*
|
|
1627
1876
|
* const program = Effect.gen(function*() {
|
|
1628
|
-
* const [
|
|
1877
|
+
* const [, source] = yield* sourceFlag.parse({
|
|
1629
1878
|
* arguments: [],
|
|
1630
|
-
* flags: { "source-url": ["https://
|
|
1879
|
+
* flags: { "source-url": ["https://example.com"] }
|
|
1631
1880
|
* })
|
|
1632
|
-
*
|
|
1633
|
-
* console.log("Using file:", source.success)
|
|
1634
|
-
* } else {
|
|
1635
|
-
* console.log("Using URL:", source.failure)
|
|
1636
|
-
* }
|
|
1881
|
+
* return source
|
|
1637
1882
|
* })
|
|
1883
|
+
*
|
|
1884
|
+
* await Effect.runPromise(program.pipe(Effect.provide(CliTestLayer))) // => Result.fail("https://example.com")
|
|
1638
1885
|
* ```
|
|
1639
1886
|
*
|
|
1640
1887
|
* @category alternatives
|
|
@@ -1646,27 +1893,42 @@ export const orElseResult: {
|
|
|
1646
1893
|
*
|
|
1647
1894
|
* **Example** (Returning fallback results)
|
|
1648
1895
|
*
|
|
1649
|
-
* ```ts
|
|
1650
|
-
* import { Effect, Result } from "effect"
|
|
1896
|
+
* ```ts import.meta.vitest
|
|
1897
|
+
* import { Effect, FileSystem, Layer, Path, Result, Stdio, Terminal } from "effect"
|
|
1651
1898
|
* import { Flag } from "effect/unstable/cli"
|
|
1899
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1900
|
+
*
|
|
1901
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1902
|
+
* FileSystem.layerNoop({}),
|
|
1903
|
+
* Path.layer,
|
|
1904
|
+
* Stdio.layerTest({}),
|
|
1905
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1906
|
+
* columns: Effect.succeed(80),
|
|
1907
|
+
* rows: Effect.succeed(24),
|
|
1908
|
+
* readInput: Effect.die("unused"),
|
|
1909
|
+
* readLine: Effect.die("unused"),
|
|
1910
|
+
* display: () => Effect.void
|
|
1911
|
+
* })),
|
|
1912
|
+
* Layer.succeed(
|
|
1913
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1914
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1915
|
+
* )
|
|
1916
|
+
* )
|
|
1652
1917
|
*
|
|
1653
|
-
* // Try file path, fallback to URL
|
|
1654
1918
|
* const sourceFlag = Flag.orElseResult(
|
|
1655
|
-
* Flag.
|
|
1919
|
+
* Flag.string("source"),
|
|
1656
1920
|
* () => Flag.string("source-url")
|
|
1657
1921
|
* )
|
|
1658
1922
|
*
|
|
1659
1923
|
* const program = Effect.gen(function*() {
|
|
1660
|
-
* const [
|
|
1924
|
+
* const [, source] = yield* sourceFlag.parse({
|
|
1661
1925
|
* arguments: [],
|
|
1662
|
-
* flags: { "source-url": ["https://
|
|
1926
|
+
* flags: { "source-url": ["https://example.com"] }
|
|
1663
1927
|
* })
|
|
1664
|
-
*
|
|
1665
|
-
* console.log("Using file:", source.success)
|
|
1666
|
-
* } else {
|
|
1667
|
-
* console.log("Using URL:", source.failure)
|
|
1668
|
-
* }
|
|
1928
|
+
* return source
|
|
1669
1929
|
* })
|
|
1930
|
+
*
|
|
1931
|
+
* await Effect.runPromise(program.pipe(Effect.provide(CliTestLayer))) // => Result.fail("https://example.com")
|
|
1670
1932
|
* ```
|
|
1671
1933
|
*
|
|
1672
1934
|
* @category alternatives
|
|
@@ -1678,27 +1940,42 @@ export const orElseResult: {
|
|
|
1678
1940
|
*
|
|
1679
1941
|
* **Example** (Returning fallback results)
|
|
1680
1942
|
*
|
|
1681
|
-
* ```ts
|
|
1682
|
-
* import { Effect, Result } from "effect"
|
|
1943
|
+
* ```ts import.meta.vitest
|
|
1944
|
+
* import { Effect, FileSystem, Layer, Path, Result, Stdio, Terminal } from "effect"
|
|
1683
1945
|
* import { Flag } from "effect/unstable/cli"
|
|
1946
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1947
|
+
*
|
|
1948
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1949
|
+
* FileSystem.layerNoop({}),
|
|
1950
|
+
* Path.layer,
|
|
1951
|
+
* Stdio.layerTest({}),
|
|
1952
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1953
|
+
* columns: Effect.succeed(80),
|
|
1954
|
+
* rows: Effect.succeed(24),
|
|
1955
|
+
* readInput: Effect.die("unused"),
|
|
1956
|
+
* readLine: Effect.die("unused"),
|
|
1957
|
+
* display: () => Effect.void
|
|
1958
|
+
* })),
|
|
1959
|
+
* Layer.succeed(
|
|
1960
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1961
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1962
|
+
* )
|
|
1963
|
+
* )
|
|
1684
1964
|
*
|
|
1685
|
-
* // Try file path, fallback to URL
|
|
1686
1965
|
* const sourceFlag = Flag.orElseResult(
|
|
1687
|
-
* Flag.
|
|
1966
|
+
* Flag.string("source"),
|
|
1688
1967
|
* () => Flag.string("source-url")
|
|
1689
1968
|
* )
|
|
1690
1969
|
*
|
|
1691
1970
|
* const program = Effect.gen(function*() {
|
|
1692
|
-
* const [
|
|
1971
|
+
* const [, source] = yield* sourceFlag.parse({
|
|
1693
1972
|
* arguments: [],
|
|
1694
|
-
* flags: { "source-url": ["https://
|
|
1973
|
+
* flags: { "source-url": ["https://example.com"] }
|
|
1695
1974
|
* })
|
|
1696
|
-
*
|
|
1697
|
-
* console.log("Using file:", source.success)
|
|
1698
|
-
* } else {
|
|
1699
|
-
* console.log("Using URL:", source.failure)
|
|
1700
|
-
* }
|
|
1975
|
+
* return source
|
|
1701
1976
|
* })
|
|
1977
|
+
*
|
|
1978
|
+
* await Effect.runPromise(program.pipe(Effect.provide(CliTestLayer))) // => Result.fail("https://example.com")
|
|
1702
1979
|
* ```
|
|
1703
1980
|
*
|
|
1704
1981
|
* @category alternatives
|
|
@@ -1712,7 +1989,7 @@ export const orElseResult: {
|
|
|
1712
1989
|
*
|
|
1713
1990
|
* **Example** (Validating with schemas)
|
|
1714
1991
|
*
|
|
1715
|
-
* ```ts
|
|
1992
|
+
* ```ts import.meta.vitest
|
|
1716
1993
|
* import { Schema } from "effect"
|
|
1717
1994
|
* import { Flag } from "effect/unstable/cli"
|
|
1718
1995
|
*
|
|
@@ -1739,6 +2016,7 @@ export const orElseResult: {
|
|
|
1739
2016
|
* const configFlag = Flag.string("config").pipe(
|
|
1740
2017
|
* Flag.withSchema(ConfigSchema)
|
|
1741
2018
|
* )
|
|
2019
|
+
* const kinds = [emailFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
1742
2020
|
* ```
|
|
1743
2021
|
*
|
|
1744
2022
|
* @category schemas
|
|
@@ -1750,7 +2028,7 @@ export const withSchema: {
|
|
|
1750
2028
|
*
|
|
1751
2029
|
* **Example** (Validating with schemas)
|
|
1752
2030
|
*
|
|
1753
|
-
* ```ts
|
|
2031
|
+
* ```ts import.meta.vitest
|
|
1754
2032
|
* import { Schema } from "effect"
|
|
1755
2033
|
* import { Flag } from "effect/unstable/cli"
|
|
1756
2034
|
*
|
|
@@ -1777,6 +2055,7 @@ export const withSchema: {
|
|
|
1777
2055
|
* const configFlag = Flag.string("config").pipe(
|
|
1778
2056
|
* Flag.withSchema(ConfigSchema)
|
|
1779
2057
|
* )
|
|
2058
|
+
* const kinds = [emailFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
1780
2059
|
* ```
|
|
1781
2060
|
*
|
|
1782
2061
|
* @category schemas
|
|
@@ -1788,7 +2067,7 @@ export const withSchema: {
|
|
|
1788
2067
|
*
|
|
1789
2068
|
* **Example** (Validating with schemas)
|
|
1790
2069
|
*
|
|
1791
|
-
* ```ts
|
|
2070
|
+
* ```ts import.meta.vitest
|
|
1792
2071
|
* import { Schema } from "effect"
|
|
1793
2072
|
* import { Flag } from "effect/unstable/cli"
|
|
1794
2073
|
*
|
|
@@ -1815,6 +2094,7 @@ export const withSchema: {
|
|
|
1815
2094
|
* const configFlag = Flag.string("config").pipe(
|
|
1816
2095
|
* Flag.withSchema(ConfigSchema)
|
|
1817
2096
|
* )
|
|
2097
|
+
* const kinds = [emailFlag.kind, configFlag.kind] // => ["flag", "flag"]
|
|
1818
2098
|
* ```
|
|
1819
2099
|
*
|
|
1820
2100
|
* @category schemas
|