effect 4.0.0-beta.102 → 4.0.0-beta.104
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 +167 -102
- 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 +730 -769
- 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 +357 -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 +117 -81
- 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 +153 -276
- 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 +22 -15
- 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 +144 -187
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +2993 -3281
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +1360 -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 +39 -23
- 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 +86 -55
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +8 -29
- 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 +86 -60
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +154 -265
- 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 +80 -148
- package/dist/Function.d.ts.map +1 -1
- package/dist/Function.js +45 -62
- 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 +239 -316
- 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 +202 -180
- 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 +292 -1638
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +164 -805
- 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 +676 -674
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +513 -544
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +30 -53
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +404 -301
- 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 +137 -107
- 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 +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 +118 -108
- 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 +2442 -2953
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +1105 -1383
- 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 +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 +2 -2
- 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 +98 -131
- 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 +89 -114
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +75 -53
- 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 +5 -1
- 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 +51 -3
- package/dist/internal/executionPlan.js.map +1 -1
- package/dist/internal/hashMap.js +12 -8
- 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 +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 +2 -0
- 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 +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 +24 -10
- 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 +61 -19
- 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 +30 -30
- package/dist/testing/TestSchema.d.ts.map +1 -1
- 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 +113 -136
- 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 +56 -52
- 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 +108 -66
- 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 +251 -185
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +66 -58
- 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 +695 -242
- 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 +127 -41
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +59 -20
- 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 +70 -77
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +66 -70
- 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 +713 -115
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +245 -47
- 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 +299 -83
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +143 -57
- 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 +375 -160
- 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 +54 -31
- 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 +2 -2
- 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.d.ts +2 -2
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +10 -9
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/bash.js +69 -9
- package/dist/unstable/cli/internal/completions/bash.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +24 -18
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/completions/fish.js +5 -5
- 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.d.ts.map +1 -1
- package/dist/unstable/cli/internal/help.js +4 -2
- 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 +5 -5
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cli/internal/wizard.js +2 -2
- 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 +7 -7
- 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 +6 -2
- 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.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +13 -6
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +8 -0
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +16 -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 +18 -16
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +3 -4
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +8 -7
- 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 +25 -6
- 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 +6 -6
- 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 +2 -2
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +17 -0
- 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.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +7 -2
- 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/Ini.d.ts +20 -0
- package/dist/unstable/encoding/Ini.d.ts.map +1 -0
- package/dist/unstable/encoding/Ini.js +153 -0
- package/dist/unstable/encoding/Ini.js.map +1 -0
- package/dist/unstable/encoding/Msgpack.d.ts +2 -1
- package/dist/unstable/encoding/Msgpack.d.ts.map +1 -1
- package/dist/unstable/encoding/Msgpack.js +27 -15
- package/dist/unstable/encoding/Msgpack.js.map +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts.map +1 -1
- package/dist/unstable/encoding/Ndjson.js +7 -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 +72 -31
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/Toml.d.ts +19 -0
- package/dist/unstable/encoding/Toml.d.ts.map +1 -0
- package/dist/unstable/encoding/Toml.js +434 -0
- package/dist/unstable/encoding/Toml.js.map +1 -0
- package/dist/unstable/encoding/Yaml.d.ts +19 -0
- package/dist/unstable/encoding/Yaml.d.ts.map +1 -0
- package/dist/unstable/encoding/Yaml.js +461 -0
- package/dist/unstable/encoding/Yaml.js.map +1 -0
- package/dist/unstable/encoding/index.d.ts +12 -0
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +12 -0
- 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 +16 -16
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +26 -18
- 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 +2 -2
- 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 +15 -7
- 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.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +1 -4
- 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/FindMyWay/internal/queryString.d.ts +11 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.d.ts.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.js +259 -0
- package/dist/unstable/http/FindMyWay/internal/queryString.js.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/router.d.ts +2 -0
- package/dist/unstable/http/FindMyWay/internal/router.d.ts.map +1 -0
- package/dist/unstable/http/FindMyWay/internal/router.js +665 -0
- package/dist/unstable/http/FindMyWay/internal/router.js.map +1 -0
- package/dist/unstable/http/FindMyWay.d.ts +33 -8
- package/dist/unstable/http/FindMyWay.d.ts.map +1 -1
- package/dist/unstable/http/FindMyWay.js +4 -7
- package/dist/unstable/http/FindMyWay.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 +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 -12
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +4 -4
- package/dist/unstable/http/HttpClientResponse.js +3 -18
- 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 +53 -3
- 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.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +11 -10
- 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 +17 -5
- 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 +7 -7
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +14 -7
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/MultipartParser/HeadersParser.d.ts +53 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.js +14 -0
- package/dist/unstable/http/MultipartParser/HeadersParser.js.map +1 -0
- package/dist/unstable/http/MultipartParser/Search.d.ts +11 -0
- package/dist/unstable/http/MultipartParser/Search.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/Search.js +14 -0
- package/dist/unstable/http/MultipartParser/Search.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.d.ts +5 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.js +82 -0
- package/dist/unstable/http/MultipartParser/internal/contentType.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/headers.d.ts +3 -0
- package/dist/unstable/http/MultipartParser/internal/headers.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/headers.js +194 -0
- package/dist/unstable/http/MultipartParser/internal/headers.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts +8 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.js +226 -0
- package/dist/unstable/http/MultipartParser/internal/multipart.js.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/search.d.ts +5 -0
- package/dist/unstable/http/MultipartParser/internal/search.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser/internal/search.js +120 -0
- package/dist/unstable/http/MultipartParser/internal/search.js.map +1 -0
- package/dist/unstable/http/MultipartParser.d.ts +98 -0
- package/dist/unstable/http/MultipartParser.d.ts.map +1 -0
- package/dist/unstable/http/MultipartParser.js +23 -0
- package/dist/unstable/http/MultipartParser.js.map +1 -0
- package/dist/unstable/http/Template.d.ts.map +1 -1
- package/dist/unstable/http/Template.js +2 -2
- 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.d.ts +1 -1
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +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/httpBody.d.ts +2 -0
- package/dist/unstable/http/internal/httpBody.d.ts.map +1 -0
- package/dist/unstable/http/internal/httpBody.js +10 -0
- package/dist/unstable/http/internal/httpBody.js.map +1 -0
- package/dist/unstable/http/internal/preResponseHandler.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +5 -5
- 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 +78 -26
- 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 +76 -38
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +48 -46
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +73 -16
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +18 -18
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +30 -30
- 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 +225 -6
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +174 -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 +21 -13
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +58 -31
- 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 +13 -15
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +19 -5
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +2 -2
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +6 -3
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +28 -15
- 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 +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.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +15 -15
- 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 +108 -22
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +45 -24
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +29 -45
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +2 -2
- package/dist/unstable/persistence/Redis.js +2 -2
- 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 +26 -12
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +30 -20
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.js +2 -2
- 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 +177 -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 +53 -51
- 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 +10 -10
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +19 -11
- 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 +37 -16
- 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 +8 -4
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.js +13 -13
- 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 +10 -8
- 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.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +23 -21
- 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 +11 -11
- 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 +2 -2
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +3 -3
- 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 +6 -13
- 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 +410 -256
- package/src/Cause.ts +167 -277
- package/src/Channel.ts +892 -817
- 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 +636 -332
- package/src/ConfigProvider.ts +218 -121
- package/src/Console.ts +289 -39
- package/src/Context.ts +322 -381
- package/src/Cron.ts +68 -77
- package/src/Crypto.ts +30 -23
- package/src/Data.ts +60 -80
- package/src/DateTime.ts +564 -660
- package/src/Deferred.ts +253 -256
- package/src/Duration.ts +232 -310
- package/src/Effect.ts +3034 -3296
- package/src/Encoding.ts +22 -40
- package/src/Equal.ts +59 -41
- package/src/Equivalence.ts +103 -105
- package/src/ErrorReporter.ts +51 -27
- package/src/ExecutionPlan.ts +91 -56
- 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 +125 -83
- package/src/FileSystem.ts +156 -264
- package/src/Filter.ts +61 -33
- package/src/Formatter.ts +54 -56
- package/src/Function.ts +82 -151
- 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 +631 -796
- 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 +366 -265
- 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 +311 -1737
- package/src/Scheduler.ts +20 -7
- package/src/Schema.ts +766 -786
- package/src/SchemaAST.ts +522 -382
- package/src/SchemaError.ts +7 -6
- package/src/SchemaGetter.ts +242 -190
- package/src/SchemaIssue.ts +89 -275
- package/src/SchemaParser.ts +217 -124
- package/src/SchemaRepresentation.ts +22 -40
- package/src/SchemaTransformation.ts +129 -88
- package/src/Scope.ts +123 -151
- package/src/ScopedCache.ts +1 -1
- package/src/ScopedRef.ts +4 -4
- package/src/Semaphore.ts +152 -51
- package/src/Sink.ts +129 -114
- package/src/Stdio.ts +1 -1
- package/src/Stream.ts +2679 -3133
- 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/SynchronizedRef.ts +1 -1
- package/src/Terminal.ts +3 -3
- package/src/Tracer.ts +102 -55
- package/src/Trie.ts +287 -679
- package/src/Tuple.ts +99 -131
- 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 +136 -101
- 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 +7 -1
- package/src/internal/effect.ts +93 -48
- package/src/internal/executionPlan.ts +105 -10
- package/src/internal/hashMap.ts +20 -14
- package/src/internal/matcher.ts +2 -2
- package/src/internal/persistence.ts +2 -0
- package/src/internal/references.ts +3 -2
- package/src/internal/schedule.ts +4 -4
- package/src/internal/schema/annotations.ts +3 -0
- 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/toArbitrary.ts +3 -1
- package/src/internal/schema/toJsonSchemaDocument.ts +60 -6
- package/src/internal/schema/toRepresentation.ts +104 -119
- package/src/internal/trie.ts +21 -12
- package/src/testing/FastCheck.ts +8 -7
- package/src/testing/TestClock.ts +85 -31
- package/src/testing/TestConsole.ts +32 -31
- package/src/testing/TestSchema.ts +30 -30
- package/src/unstable/ai/AiError.ts +114 -137
- package/src/unstable/ai/AnthropicStructuredOutput.ts +1 -1
- package/src/unstable/ai/Chat.ts +133 -98
- package/src/unstable/ai/IdGenerator.ts +32 -28
- package/src/unstable/ai/LanguageModel.ts +111 -69
- package/src/unstable/ai/McpProtocol.ts +48 -0
- package/src/unstable/ai/McpSchema.ts +77 -66
- package/src/unstable/ai/McpServer.ts +931 -305
- package/src/unstable/ai/Model.ts +9 -20
- package/src/unstable/ai/OpenAiStructuredOutput.ts +1 -1
- package/src/unstable/ai/Prompt.ts +166 -49
- 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 +79 -86
- package/src/unstable/cli/CliOutput.ts +44 -58
- package/src/unstable/cli/Command.ts +716 -116
- 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 +333 -97
- package/src/unstable/cli/Primitive.ts +381 -154
- package/src/unstable/cli/Prompt.ts +64 -34
- package/src/unstable/cli/internal/ansi.ts +2 -2
- package/src/unstable/cli/internal/command.ts +15 -10
- package/src/unstable/cli/internal/completions/bash.ts +59 -9
- package/src/unstable/cli/internal/completions/descriptor.ts +14 -20
- package/src/unstable/cli/internal/completions/fish.ts +5 -7
- package/src/unstable/cli/internal/help.ts +4 -2
- package/src/unstable/cli/internal/lexer.ts +8 -2
- package/src/unstable/cli/internal/parser.ts +5 -5
- package/src/unstable/cli/internal/wizard.ts +2 -2
- package/src/unstable/cluster/ClusterError.ts +7 -7
- package/src/unstable/cluster/ClusterSchema.ts +8 -8
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +9 -2
- 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 +24 -20
- package/src/unstable/cluster/Reply.ts +25 -6
- package/src/unstable/cluster/RunnerHealth.ts +1 -1
- package/src/unstable/cluster/RunnerServer.ts +35 -8
- package/src/unstable/cluster/RunnerStorage.ts +11 -9
- package/src/unstable/cluster/Runners.ts +23 -12
- package/src/unstable/cluster/Sharding.ts +42 -15
- 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 +12 -16
- package/src/unstable/cluster/internal/resourceMap.ts +5 -2
- package/src/unstable/cluster/internal/resourceRef.ts +27 -5
- package/src/unstable/devtools/DevToolsClient.ts +3 -2
- package/src/unstable/encoding/Ini.ts +174 -0
- package/src/unstable/encoding/Msgpack.ts +53 -36
- package/src/unstable/encoding/Ndjson.ts +9 -1
- package/src/unstable/encoding/Sse.ts +109 -37
- package/src/unstable/encoding/Toml.ts +504 -0
- package/src/unstable/encoding/Yaml.ts +541 -0
- package/src/unstable/encoding/index.ts +15 -0
- package/src/unstable/eventlog/Event.ts +20 -20
- package/src/unstable/eventlog/EventGroup.ts +4 -4
- package/src/unstable/eventlog/EventJournal.ts +29 -21
- package/src/unstable/eventlog/EventLog.ts +3 -3
- package/src/unstable/eventlog/EventLogEncryption.ts +1 -1
- package/src/unstable/eventlog/EventLogMessage.ts +3 -3
- 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 +15 -7
- package/src/unstable/eventlog/EventLogSessionAuth.ts +1 -1
- package/src/unstable/eventlog/SqlEventJournal.ts +6 -4
- 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/FindMyWay/internal/queryString.ts +420 -0
- package/src/unstable/http/FindMyWay/internal/router.ts +950 -0
- package/src/unstable/http/FindMyWay.ts +65 -6
- 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/HttpClientError.ts +1 -1
- package/src/unstable/http/HttpClientRequest.ts +2 -12
- package/src/unstable/http/HttpClientResponse.ts +5 -21
- 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 +129 -6
- 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 +18 -10
- package/src/unstable/http/HttpServerResponse.ts +38 -6
- package/src/unstable/http/HttpStaticServer.ts +35 -7
- package/src/unstable/http/Multipart.ts +15 -8
- package/src/unstable/http/MultipartParser/HeadersParser.ts +68 -0
- package/src/unstable/http/MultipartParser/Search.ts +17 -0
- package/src/unstable/http/MultipartParser/internal/contentType.ts +103 -0
- package/src/unstable/http/MultipartParser/internal/headers.ts +615 -0
- package/src/unstable/http/MultipartParser/internal/multipart.ts +262 -0
- package/src/unstable/http/MultipartParser/internal/search.ts +167 -0
- package/src/unstable/http/MultipartParser.ts +115 -0
- package/src/unstable/http/Template.ts +6 -5
- package/src/unstable/http/Url.ts +33 -63
- package/src/unstable/http/UrlParams.ts +10 -18
- package/src/unstable/http/index.ts +1 -1
- package/src/unstable/http/internal/compression.ts +196 -0
- package/src/unstable/http/internal/httpBody.ts +15 -0
- package/src/unstable/httpapi/HttpApi.ts +6 -7
- package/src/unstable/httpapi/HttpApiBuilder.ts +129 -30
- package/src/unstable/httpapi/HttpApiClient.ts +117 -54
- package/src/unstable/httpapi/HttpApiEndpoint.ts +159 -71
- package/src/unstable/httpapi/HttpApiError.ts +46 -52
- 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 +359 -6
- package/src/unstable/httpapi/OpenApi.ts +83 -33
- package/src/unstable/observability/OtlpExporter.ts +35 -21
- package/src/unstable/observability/OtlpLogger.ts +3 -1
- package/src/unstable/observability/OtlpMetrics.ts +36 -19
- package/src/unstable/observability/OtlpResource.ts +26 -17
- package/src/unstable/observability/OtlpTracer.ts +1 -1
- 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 +18 -15
- package/src/unstable/persistence/Persistence.ts +153 -26
- package/src/unstable/persistence/RateLimiter.ts +77 -43
- package/src/unstable/persistence/Redis.ts +3 -3
- 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 +54 -27
- package/src/unstable/rpc/RpcClientError.ts +2 -2
- 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 +41 -23
- package/src/unstable/socket/Socket.ts +41 -18
- package/src/unstable/sql/SqlClient.ts +64 -56
- package/src/unstable/sql/SqlError.ts +13 -13
- package/src/unstable/sql/SqlModel.ts +2 -2
- package/src/unstable/sql/SqlResolver.ts +13 -11
- package/src/unstable/sql/Statement.ts +37 -31
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +2 -2
- package/src/unstable/workers/WorkerError.ts +12 -12
- 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 +9 -4
- 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/dist/unstable/http/Multipasta/HeadersParser.d.ts +0 -14
- package/dist/unstable/http/Multipasta/HeadersParser.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/HeadersParser.js +0 -14
- package/dist/unstable/http/Multipasta/HeadersParser.js.map +0 -1
- package/dist/unstable/http/Multipasta/Node.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Node.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Node.js +0 -14
- package/dist/unstable/http/Multipasta/Node.js.map +0 -1
- package/dist/unstable/http/Multipasta/Search.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Search.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Search.js +0 -14
- package/dist/unstable/http/Multipasta/Search.js.map +0 -1
- package/dist/unstable/http/Multipasta/Web.d.ts +0 -14
- package/dist/unstable/http/Multipasta/Web.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta/Web.js +0 -14
- package/dist/unstable/http/Multipasta/Web.js.map +0 -1
- package/dist/unstable/http/Multipasta.d.ts +0 -15
- package/dist/unstable/http/Multipasta.d.ts.map +0 -1
- package/dist/unstable/http/Multipasta.js +0 -15
- package/dist/unstable/http/Multipasta.js.map +0 -1
- package/src/internal/version.ts +0 -2
- package/src/unstable/http/Multipasta/HeadersParser.ts +0 -14
- package/src/unstable/http/Multipasta/Node.ts +0 -14
- package/src/unstable/http/Multipasta/Search.ts +0 -14
- package/src/unstable/http/Multipasta/Web.ts +0 -14
- package/src/unstable/http/Multipasta.ts +0 -15
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import * as Config from "../../Config.ts"
|
|
14
14
|
import * as Effect from "../../Effect.ts"
|
|
15
|
-
import { dual, identity } from "../../Function.ts"
|
|
15
|
+
import { dual, identity, type LazyArg } from "../../Function.ts"
|
|
16
16
|
import * as Option from "../../Option.ts"
|
|
17
17
|
import { type Pipeable, pipeArguments } from "../../Pipeable.ts"
|
|
18
18
|
import * as Predicate from "../../Predicate.ts"
|
|
@@ -226,7 +226,11 @@ export interface Transform<Kind extends ParamKind, in out A, out B> extends Para
|
|
|
226
226
|
readonly _tag: "Transform"
|
|
227
227
|
readonly kind: Kind
|
|
228
228
|
readonly param: Param<Kind, A>
|
|
229
|
-
readonly
|
|
229
|
+
readonly alternatives: ReadonlyArray<LazyArg<Param<Kind, unknown>>>
|
|
230
|
+
readonly f: (
|
|
231
|
+
parse: Parse<A>,
|
|
232
|
+
alternatives: ReadonlyArray<LazyArg<Parse<unknown>>>
|
|
233
|
+
) => Parse<B>
|
|
230
234
|
}
|
|
231
235
|
|
|
232
236
|
/**
|
|
@@ -272,17 +276,15 @@ const Proto = {
|
|
|
272
276
|
*
|
|
273
277
|
* **Example** (Checking for params)
|
|
274
278
|
*
|
|
275
|
-
* ```ts
|
|
279
|
+
* ```ts import.meta.vitest
|
|
276
280
|
* import { Param } from "effect/unstable/cli"
|
|
277
281
|
*
|
|
278
282
|
* const maybeParam = Param.string(Param.flagKind, "name")
|
|
279
283
|
*
|
|
280
|
-
*
|
|
281
|
-
* console.log("This is a Param")
|
|
282
|
-
* }
|
|
284
|
+
* Param.isParam(maybeParam) // => true
|
|
283
285
|
* ```
|
|
284
286
|
*
|
|
285
|
-
* @category
|
|
287
|
+
* @category guards
|
|
286
288
|
* @since 4.0.0
|
|
287
289
|
*/
|
|
288
290
|
export const isParam = (u: unknown): u is Param<any, ParamKind> => Predicate.hasProperty(u, TypeId)
|
|
@@ -292,17 +294,17 @@ export const isParam = (u: unknown): u is Param<any, ParamKind> => Predicate.has
|
|
|
292
294
|
*
|
|
293
295
|
* **Example** (Checking for single params)
|
|
294
296
|
*
|
|
295
|
-
* ```ts
|
|
297
|
+
* ```ts import.meta.vitest
|
|
296
298
|
* import { Param } from "effect/unstable/cli"
|
|
297
299
|
*
|
|
298
300
|
* const nameParam = Param.string(Param.flagKind, "name")
|
|
299
301
|
* const optionalParam = Param.optional(nameParam)
|
|
300
302
|
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
+
* Param.isSingle(nameParam) // => true
|
|
304
|
+
* Param.isSingle(optionalParam) // => false
|
|
303
305
|
* ```
|
|
304
306
|
*
|
|
305
|
-
* @category
|
|
307
|
+
* @category guards
|
|
306
308
|
* @since 4.0.0
|
|
307
309
|
*/
|
|
308
310
|
export const isSingle = <const Kind extends ParamKind, A>(
|
|
@@ -358,7 +360,7 @@ export const makeSingle = <const Kind extends ParamKind, A>(params: {
|
|
|
358
360
|
*
|
|
359
361
|
* **Example** (Creating string parameters)
|
|
360
362
|
*
|
|
361
|
-
* ```ts
|
|
363
|
+
* ```ts import.meta.vitest
|
|
362
364
|
* import { Param } from "effect/unstable/cli"
|
|
363
365
|
*
|
|
364
366
|
* // Create a string flag
|
|
@@ -368,6 +370,7 @@ export const makeSingle = <const Kind extends ParamKind, A>(params: {
|
|
|
368
370
|
* const fileArg = Param.string(Param.argumentKind, "file")
|
|
369
371
|
*
|
|
370
372
|
* // Usage in CLI: --name "John Doe" or as positional argument
|
|
373
|
+
* const kinds = [nameFlag.kind, fileArg.kind] // => ["flag", "argument"]
|
|
371
374
|
* ```
|
|
372
375
|
*
|
|
373
376
|
* @category constructors
|
|
@@ -388,7 +391,7 @@ export const string = <const Kind extends ParamKind>(
|
|
|
388
391
|
*
|
|
389
392
|
* **Example** (Creating boolean parameters)
|
|
390
393
|
*
|
|
391
|
-
* ```ts
|
|
394
|
+
* ```ts import.meta.vitest
|
|
392
395
|
* import { Param } from "effect/unstable/cli"
|
|
393
396
|
*
|
|
394
397
|
* // Create a boolean flag
|
|
@@ -399,6 +402,7 @@ export const string = <const Kind extends ParamKind>(
|
|
|
399
402
|
*
|
|
400
403
|
* // Usage in CLI: --verbose (defaults to true when present, false when absent)
|
|
401
404
|
* // or as positional: true/false
|
|
405
|
+
* const kinds = [verboseFlag.kind, enableArg.kind] // => ["flag", "argument"]
|
|
402
406
|
* ```
|
|
403
407
|
*
|
|
404
408
|
* @category constructors
|
|
@@ -419,7 +423,7 @@ export const boolean = <const Kind extends ParamKind>(
|
|
|
419
423
|
*
|
|
420
424
|
* **Example** (Creating integer parameters)
|
|
421
425
|
*
|
|
422
|
-
* ```ts
|
|
426
|
+
* ```ts import.meta.vitest
|
|
423
427
|
* import { Param } from "effect/unstable/cli"
|
|
424
428
|
*
|
|
425
429
|
* // Create an integer flag
|
|
@@ -429,6 +433,7 @@ export const boolean = <const Kind extends ParamKind>(
|
|
|
429
433
|
* const countArg = Param.integer(Param.argumentKind, "count")
|
|
430
434
|
*
|
|
431
435
|
* // Usage in CLI: --port 8080 or as positional argument: 42
|
|
436
|
+
* const kinds = [portFlag.kind, countArg.kind] // => ["flag", "argument"]
|
|
432
437
|
* ```
|
|
433
438
|
*
|
|
434
439
|
* @category constructors
|
|
@@ -449,7 +454,7 @@ export const integer = <const Kind extends ParamKind>(
|
|
|
449
454
|
*
|
|
450
455
|
* **Example** (Creating float parameters)
|
|
451
456
|
*
|
|
452
|
-
* ```ts
|
|
457
|
+
* ```ts import.meta.vitest
|
|
453
458
|
* import { Param } from "effect/unstable/cli"
|
|
454
459
|
*
|
|
455
460
|
* // Create a float flag
|
|
@@ -459,6 +464,7 @@ export const integer = <const Kind extends ParamKind>(
|
|
|
459
464
|
* const thresholdArg = Param.float(Param.argumentKind, "threshold")
|
|
460
465
|
*
|
|
461
466
|
* // Usage in CLI: --rate 0.95 or as positional argument: 3.14159
|
|
467
|
+
* const kinds = [rateFlag.kind, thresholdArg.kind] // => ["flag", "argument"]
|
|
462
468
|
* ```
|
|
463
469
|
*
|
|
464
470
|
* @category constructors
|
|
@@ -479,7 +485,7 @@ export const float = <const Kind extends ParamKind>(
|
|
|
479
485
|
*
|
|
480
486
|
* **Example** (Creating date parameters)
|
|
481
487
|
*
|
|
482
|
-
* ```ts
|
|
488
|
+
* ```ts import.meta.vitest
|
|
483
489
|
* import { Param } from "effect/unstable/cli"
|
|
484
490
|
*
|
|
485
491
|
* // Create a date flag
|
|
@@ -490,6 +496,7 @@ export const float = <const Kind extends ParamKind>(
|
|
|
490
496
|
*
|
|
491
497
|
* // Usage in CLI: --start-date "2023-12-25" or as positional: "2023-01-01"
|
|
492
498
|
* // Parses to JavaScript Date object
|
|
499
|
+
* const kinds = [startFlag.kind, dueDateArg.kind] // => ["flag", "argument"]
|
|
493
500
|
* ```
|
|
494
501
|
*
|
|
495
502
|
* @category constructors
|
|
@@ -511,7 +518,7 @@ export const date = <const Kind extends ParamKind>(
|
|
|
511
518
|
*
|
|
512
519
|
* **Example** (Creating valued choices)
|
|
513
520
|
*
|
|
514
|
-
* ```ts
|
|
521
|
+
* ```ts import.meta.vitest
|
|
515
522
|
* import { Param } from "effect/unstable/cli"
|
|
516
523
|
*
|
|
517
524
|
* type Animal = Dog | Cat
|
|
@@ -528,6 +535,7 @@ export const date = <const Kind extends ParamKind>(
|
|
|
528
535
|
* ["dog", { _tag: "Dog" }],
|
|
529
536
|
* ["cat", { _tag: "Cat" }]
|
|
530
537
|
* ])
|
|
538
|
+
* animal.kind // => "flag"
|
|
531
539
|
* ```
|
|
532
540
|
*
|
|
533
541
|
* @category constructors
|
|
@@ -549,7 +557,7 @@ export const choiceWithValue = <
|
|
|
549
557
|
*
|
|
550
558
|
* **Example** (Creating string choices)
|
|
551
559
|
*
|
|
552
|
-
* ```ts
|
|
560
|
+
* ```ts import.meta.vitest
|
|
553
561
|
* import { Param } from "effect/unstable/cli"
|
|
554
562
|
*
|
|
555
563
|
* const logLevel = Param.choice(Param.flagKind, "log-level", [
|
|
@@ -558,6 +566,7 @@ export const choiceWithValue = <
|
|
|
558
566
|
* "warn",
|
|
559
567
|
* "error"
|
|
560
568
|
* ])
|
|
569
|
+
* logLevel.kind // => "flag"
|
|
561
570
|
* ```
|
|
562
571
|
*
|
|
563
572
|
* @category constructors
|
|
@@ -576,7 +585,7 @@ export const choice = <
|
|
|
576
585
|
*
|
|
577
586
|
* **Example** (Creating path parameters)
|
|
578
587
|
*
|
|
579
|
-
* ```ts
|
|
588
|
+
* ```ts import.meta.vitest
|
|
580
589
|
* import { Param } from "effect/unstable/cli"
|
|
581
590
|
*
|
|
582
591
|
* // Basic path parameter
|
|
@@ -591,6 +600,7 @@ export const choice = <
|
|
|
591
600
|
* mustExist: true,
|
|
592
601
|
* typeName: "config-file"
|
|
593
602
|
* })
|
|
603
|
+
* const kinds = [outputPath.kind, inputPath.kind, configFile.kind] // => ["flag", "flag", "flag"]
|
|
594
604
|
* ```
|
|
595
605
|
*
|
|
596
606
|
* @category constructors
|
|
@@ -622,7 +632,7 @@ export const path = <Kind extends ParamKind>(
|
|
|
622
632
|
*
|
|
623
633
|
* **Example** (Creating directory parameters)
|
|
624
634
|
*
|
|
625
|
-
* ```ts
|
|
635
|
+
* ```ts import.meta.vitest
|
|
626
636
|
* import { Param } from "effect/unstable/cli"
|
|
627
637
|
*
|
|
628
638
|
* // Basic directory parameter
|
|
@@ -632,6 +642,7 @@ export const path = <Kind extends ParamKind>(
|
|
|
632
642
|
* const sourceDir = Param.directory(Param.flagKind, "source", { mustExist: true })
|
|
633
643
|
*
|
|
634
644
|
* // Usage: --output-dir /path/to/dir --source /existing/dir
|
|
645
|
+
* const kinds = [outputDir.kind, sourceDir.kind] // => ["flag", "flag"]
|
|
635
646
|
* ```
|
|
636
647
|
*
|
|
637
648
|
* @category constructors
|
|
@@ -660,7 +671,7 @@ export const directory = <Kind extends ParamKind>(
|
|
|
660
671
|
*
|
|
661
672
|
* **Example** (Creating file parameters)
|
|
662
673
|
*
|
|
663
|
-
* ```ts
|
|
674
|
+
* ```ts import.meta.vitest
|
|
664
675
|
* import { Param } from "effect/unstable/cli"
|
|
665
676
|
*
|
|
666
677
|
* // Basic file parameter
|
|
@@ -670,6 +681,7 @@ export const directory = <Kind extends ParamKind>(
|
|
|
670
681
|
* const inputFile = Param.file(Param.flagKind, "input", { mustExist: true })
|
|
671
682
|
*
|
|
672
683
|
* // Usage: --output result.txt --input existing-file.txt
|
|
684
|
+
* const kinds = [outputFile.kind, inputFile.kind] // => ["flag", "flag"]
|
|
673
685
|
* ```
|
|
674
686
|
*
|
|
675
687
|
* @category constructors
|
|
@@ -694,7 +706,7 @@ export const file = <Kind extends ParamKind>(
|
|
|
694
706
|
*
|
|
695
707
|
* **Example** (Creating redacted parameters)
|
|
696
708
|
*
|
|
697
|
-
* ```ts
|
|
709
|
+
* ```ts import.meta.vitest
|
|
698
710
|
* import { Param } from "effect/unstable/cli"
|
|
699
711
|
*
|
|
700
712
|
* // Create a password parameter
|
|
@@ -704,6 +716,7 @@ export const file = <Kind extends ParamKind>(
|
|
|
704
716
|
* const apiKey = Param.redacted(Param.argumentKind, "api-key")
|
|
705
717
|
*
|
|
706
718
|
* // Usage: --password (value will be hidden in help/logs)
|
|
719
|
+
* const kinds = [password.kind, apiKey.kind] // => ["flag", "argument"]
|
|
707
720
|
* ```
|
|
708
721
|
*
|
|
709
722
|
* @category constructors
|
|
@@ -724,7 +737,7 @@ export const redacted = <Kind extends ParamKind>(
|
|
|
724
737
|
*
|
|
725
738
|
* **Example** (Reading file text)
|
|
726
739
|
*
|
|
727
|
-
* ```ts
|
|
740
|
+
* ```ts import.meta.vitest
|
|
728
741
|
* import { Param } from "effect/unstable/cli"
|
|
729
742
|
*
|
|
730
743
|
* // Read a config file as string
|
|
@@ -734,6 +747,7 @@ export const redacted = <Kind extends ParamKind>(
|
|
|
734
747
|
* const templateContent = Param.fileText(Param.argumentKind, "template")
|
|
735
748
|
*
|
|
736
749
|
* // Usage: --config config.txt (reads file content into string)
|
|
750
|
+
* const kinds = [configContent.kind, templateContent.kind] // => ["flag", "argument"]
|
|
737
751
|
* ```
|
|
738
752
|
*
|
|
739
753
|
* @category constructors
|
|
@@ -756,7 +770,7 @@ export const fileText = <Kind extends ParamKind>(kind: Kind, name: string): Para
|
|
|
756
770
|
*
|
|
757
771
|
* **Example** (Parsing file contents)
|
|
758
772
|
*
|
|
759
|
-
* ```ts
|
|
773
|
+
* ```ts import.meta.vitest
|
|
760
774
|
* import { Param } from "effect/unstable/cli"
|
|
761
775
|
*
|
|
762
776
|
* // Will use the extension of the file passed on the command line to determine
|
|
@@ -767,6 +781,7 @@ export const fileText = <Kind extends ParamKind>(kind: Kind, name: string): Para
|
|
|
767
781
|
* const jsonConfig = Param.fileParse(Param.flagKind, "json-config", {
|
|
768
782
|
* format: "json"
|
|
769
783
|
* })
|
|
784
|
+
* const kinds = [config.kind, jsonConfig.kind] // => ["flag", "flag"]
|
|
770
785
|
* ```
|
|
771
786
|
*
|
|
772
787
|
* @category constructors
|
|
@@ -788,7 +803,7 @@ export const fileParse = <Kind extends ParamKind>(
|
|
|
788
803
|
*
|
|
789
804
|
* **Example** (Validating file contents)
|
|
790
805
|
*
|
|
791
|
-
* ```ts
|
|
806
|
+
* ```ts import.meta.vitest
|
|
792
807
|
* import { Schema } from "effect"
|
|
793
808
|
* import { Param } from "effect/unstable/cli"
|
|
794
809
|
* // Parse JSON config file
|
|
@@ -807,6 +822,7 @@ export const fileParse = <Kind extends ParamKind>(
|
|
|
807
822
|
* })
|
|
808
823
|
*
|
|
809
824
|
* // Usage: --config config.json (reads and validates file content)
|
|
825
|
+
* const kinds = [config.kind, yamlConfig.kind] // => ["flag", "flag"]
|
|
810
826
|
* ```
|
|
811
827
|
*
|
|
812
828
|
* @category constructors
|
|
@@ -839,7 +855,7 @@ export const fileSchema = <Kind extends ParamKind, A>(
|
|
|
839
855
|
*
|
|
840
856
|
* **Example** (Parsing key-value pairs)
|
|
841
857
|
*
|
|
842
|
-
* ```ts
|
|
858
|
+
* ```ts import.meta.vitest
|
|
843
859
|
* import { Param } from "effect/unstable/cli"
|
|
844
860
|
*
|
|
845
861
|
* const env = Param.keyValuePair(Param.flagKind, "env")
|
|
@@ -847,6 +863,7 @@ export const fileSchema = <Kind extends ParamKind, A>(
|
|
|
847
863
|
*
|
|
848
864
|
* const props = Param.keyValuePair(Param.flagKind, "property")
|
|
849
865
|
* // --property name=value --property debug=true
|
|
866
|
+
* const kinds = [env.kind, props.kind] // => ["flag", "flag"]
|
|
850
867
|
* ```
|
|
851
868
|
*
|
|
852
869
|
* @category constructors
|
|
@@ -878,7 +895,7 @@ export const keyValuePair = <Kind extends ParamKind>(
|
|
|
878
895
|
*
|
|
879
896
|
* **Example** (Creating sentinel parameters)
|
|
880
897
|
*
|
|
881
|
-
* ```ts
|
|
898
|
+
* ```ts import.meta.vitest
|
|
882
899
|
* import { Param } from "effect/unstable/cli"
|
|
883
900
|
*
|
|
884
901
|
* const disabledDebugParam = Param.none(Param.flagKind)
|
|
@@ -886,8 +903,8 @@ export const keyValuePair = <Kind extends ParamKind>(
|
|
|
886
903
|
* const makeDebugParam = (enableDebug: boolean) =>
|
|
887
904
|
* enableDebug ? Param.string(Param.flagKind, "debug") : disabledDebugParam
|
|
888
905
|
*
|
|
889
|
-
*
|
|
890
|
-
*
|
|
906
|
+
* makeDebugParam(true) === disabledDebugParam // => false
|
|
907
|
+
* makeDebugParam(false) === disabledDebugParam // => true
|
|
891
908
|
* ```
|
|
892
909
|
*
|
|
893
910
|
* @category constructors
|
|
@@ -917,7 +934,7 @@ const FLAG_DASH_REGEXP = /^-+/
|
|
|
917
934
|
*
|
|
918
935
|
* **Example** (Adding parameter aliases)
|
|
919
936
|
*
|
|
920
|
-
* ```ts
|
|
937
|
+
* ```ts import.meta.vitest
|
|
921
938
|
* import { Param } from "effect/unstable/cli"
|
|
922
939
|
*
|
|
923
940
|
* const force = Param.boolean(Param.flagKind, "force").pipe(
|
|
@@ -930,6 +947,7 @@ const FLAG_DASH_REGEXP = /^-+/
|
|
|
930
947
|
* Param.optional,
|
|
931
948
|
* Param.withAlias("-c") // finds the underlying Single and adds alias
|
|
932
949
|
* )
|
|
950
|
+
* const kinds = [force.kind, count.kind] // => ["flag", "flag"]
|
|
933
951
|
* ```
|
|
934
952
|
*
|
|
935
953
|
* @category combinators
|
|
@@ -951,7 +969,7 @@ export const withAlias: {
|
|
|
951
969
|
*
|
|
952
970
|
* **Example** (Adding parameter aliases)
|
|
953
971
|
*
|
|
954
|
-
* ```ts
|
|
972
|
+
* ```ts import.meta.vitest
|
|
955
973
|
* import { Param } from "effect/unstable/cli"
|
|
956
974
|
*
|
|
957
975
|
* const force = Param.boolean(Param.flagKind, "force").pipe(
|
|
@@ -964,6 +982,7 @@ export const withAlias: {
|
|
|
964
982
|
* Param.optional,
|
|
965
983
|
* Param.withAlias("-c") // finds the underlying Single and adds alias
|
|
966
984
|
* )
|
|
985
|
+
* const kinds = [force.kind, count.kind] // => ["flag", "flag"]
|
|
967
986
|
* ```
|
|
968
987
|
*
|
|
969
988
|
* @category combinators
|
|
@@ -985,7 +1004,7 @@ export const withAlias: {
|
|
|
985
1004
|
*
|
|
986
1005
|
* **Example** (Adding parameter aliases)
|
|
987
1006
|
*
|
|
988
|
-
* ```ts
|
|
1007
|
+
* ```ts import.meta.vitest
|
|
989
1008
|
* import { Param } from "effect/unstable/cli"
|
|
990
1009
|
*
|
|
991
1010
|
* const force = Param.boolean(Param.flagKind, "force").pipe(
|
|
@@ -998,6 +1017,7 @@ export const withAlias: {
|
|
|
998
1017
|
* Param.optional,
|
|
999
1018
|
* Param.withAlias("-c") // finds the underlying Single and adds alias
|
|
1000
1019
|
* )
|
|
1020
|
+
* const kinds = [force.kind, count.kind] // => ["flag", "flag"]
|
|
1001
1021
|
* ```
|
|
1002
1022
|
*
|
|
1003
1023
|
* @category combinators
|
|
@@ -1022,13 +1042,14 @@ export const withAlias: {
|
|
|
1022
1042
|
*
|
|
1023
1043
|
* **Example** (Adding help descriptions)
|
|
1024
1044
|
*
|
|
1025
|
-
* ```ts
|
|
1045
|
+
* ```ts import.meta.vitest
|
|
1026
1046
|
* import { Param } from "effect/unstable/cli"
|
|
1027
1047
|
*
|
|
1028
1048
|
* const verbose = Param.boolean(Param.flagKind, "verbose").pipe(
|
|
1029
1049
|
* Param.withAlias("-v"),
|
|
1030
1050
|
* Param.withDescription("Enable verbose output")
|
|
1031
1051
|
* )
|
|
1052
|
+
* verbose.kind // => "flag"
|
|
1032
1053
|
* ```
|
|
1033
1054
|
*
|
|
1034
1055
|
* @category combinators
|
|
@@ -1045,13 +1066,14 @@ export const withDescription: {
|
|
|
1045
1066
|
*
|
|
1046
1067
|
* **Example** (Adding help descriptions)
|
|
1047
1068
|
*
|
|
1048
|
-
* ```ts
|
|
1069
|
+
* ```ts import.meta.vitest
|
|
1049
1070
|
* import { Param } from "effect/unstable/cli"
|
|
1050
1071
|
*
|
|
1051
1072
|
* const verbose = Param.boolean(Param.flagKind, "verbose").pipe(
|
|
1052
1073
|
* Param.withAlias("-v"),
|
|
1053
1074
|
* Param.withDescription("Enable verbose output")
|
|
1054
1075
|
* )
|
|
1076
|
+
* verbose.kind // => "flag"
|
|
1055
1077
|
* ```
|
|
1056
1078
|
*
|
|
1057
1079
|
* @category combinators
|
|
@@ -1068,13 +1090,14 @@ export const withDescription: {
|
|
|
1068
1090
|
*
|
|
1069
1091
|
* **Example** (Adding help descriptions)
|
|
1070
1092
|
*
|
|
1071
|
-
* ```ts
|
|
1093
|
+
* ```ts import.meta.vitest
|
|
1072
1094
|
* import { Param } from "effect/unstable/cli"
|
|
1073
1095
|
*
|
|
1074
1096
|
* const verbose = Param.boolean(Param.flagKind, "verbose").pipe(
|
|
1075
1097
|
* Param.withAlias("-v"),
|
|
1076
1098
|
* Param.withDescription("Enable verbose output")
|
|
1077
1099
|
* )
|
|
1100
|
+
* verbose.kind // => "flag"
|
|
1078
1101
|
* ```
|
|
1079
1102
|
*
|
|
1080
1103
|
* @category combinators
|
|
@@ -1100,12 +1123,13 @@ export const withDescription: {
|
|
|
1100
1123
|
*
|
|
1101
1124
|
* **Example** (Hiding a flag from help)
|
|
1102
1125
|
*
|
|
1103
|
-
* ```ts
|
|
1126
|
+
* ```ts import.meta.vitest
|
|
1104
1127
|
* import { Param } from "effect/unstable/cli"
|
|
1105
1128
|
*
|
|
1106
1129
|
* const experimental = Param.boolean(Param.flagKind, "experimental-foo").pipe(
|
|
1107
1130
|
* Param.withHidden
|
|
1108
1131
|
* )
|
|
1132
|
+
* experimental.kind // => "flag"
|
|
1109
1133
|
* ```
|
|
1110
1134
|
*
|
|
1111
1135
|
* @category metadata
|
|
@@ -1123,12 +1147,13 @@ export const withHidden = <Kind extends ParamKind, A>(self: Param<Kind, A>): Par
|
|
|
1123
1147
|
*
|
|
1124
1148
|
* **Example** (Mapping parsed values)
|
|
1125
1149
|
*
|
|
1126
|
-
* ```ts
|
|
1150
|
+
* ```ts import.meta.vitest
|
|
1127
1151
|
* import { Param } from "effect/unstable/cli"
|
|
1128
1152
|
*
|
|
1129
1153
|
* const port = Param.integer(Param.flagKind, "port").pipe(
|
|
1130
1154
|
* Param.map((n) => ({ port: n, url: `http://localhost:${n}` }))
|
|
1131
1155
|
* )
|
|
1156
|
+
* port.kind // => "flag"
|
|
1132
1157
|
* ```
|
|
1133
1158
|
*
|
|
1134
1159
|
* @category combinators
|
|
@@ -1140,12 +1165,13 @@ export const map: {
|
|
|
1140
1165
|
*
|
|
1141
1166
|
* **Example** (Mapping parsed values)
|
|
1142
1167
|
*
|
|
1143
|
-
* ```ts
|
|
1168
|
+
* ```ts import.meta.vitest
|
|
1144
1169
|
* import { Param } from "effect/unstable/cli"
|
|
1145
1170
|
*
|
|
1146
1171
|
* const port = Param.integer(Param.flagKind, "port").pipe(
|
|
1147
1172
|
* Param.map((n) => ({ port: n, url: `http://localhost:${n}` }))
|
|
1148
1173
|
* )
|
|
1174
|
+
* port.kind // => "flag"
|
|
1149
1175
|
* ```
|
|
1150
1176
|
*
|
|
1151
1177
|
* @category combinators
|
|
@@ -1157,12 +1183,13 @@ export const map: {
|
|
|
1157
1183
|
*
|
|
1158
1184
|
* **Example** (Mapping parsed values)
|
|
1159
1185
|
*
|
|
1160
|
-
* ```ts
|
|
1186
|
+
* ```ts import.meta.vitest
|
|
1161
1187
|
* import { Param } from "effect/unstable/cli"
|
|
1162
1188
|
*
|
|
1163
1189
|
* const port = Param.integer(Param.flagKind, "port").pipe(
|
|
1164
1190
|
* Param.map((n) => ({ port: n, url: `http://localhost:${n}` }))
|
|
1165
1191
|
* )
|
|
1192
|
+
* port.kind // => "flag"
|
|
1166
1193
|
* ```
|
|
1167
1194
|
*
|
|
1168
1195
|
* @category combinators
|
|
@@ -1186,24 +1213,49 @@ export const map: {
|
|
|
1186
1213
|
|
|
1187
1214
|
const transform = <Kind extends ParamKind, A, B>(
|
|
1188
1215
|
self: Param<Kind, A>,
|
|
1189
|
-
f: (
|
|
1190
|
-
|
|
1191
|
-
|
|
1216
|
+
f: (
|
|
1217
|
+
parse: Parse<A>,
|
|
1218
|
+
alternatives: ReadonlyArray<LazyArg<Parse<unknown>>>
|
|
1219
|
+
) => Parse<B>,
|
|
1220
|
+
alternatives: ReadonlyArray<LazyArg<Param<Kind, unknown>>> = []
|
|
1221
|
+
): Transform<Kind, A, B> => {
|
|
1222
|
+
const alternativeParsers = alternatives.map((alternative) => () => alternative().parse)
|
|
1223
|
+
return Object.assign(Object.create(Proto), {
|
|
1192
1224
|
_tag: "Transform",
|
|
1193
1225
|
kind: self.kind,
|
|
1194
1226
|
param: self,
|
|
1227
|
+
alternatives,
|
|
1195
1228
|
f,
|
|
1196
|
-
parse: f(self.parse)
|
|
1229
|
+
parse: f(self.parse, alternativeParsers)
|
|
1197
1230
|
})
|
|
1231
|
+
}
|
|
1198
1232
|
|
|
1199
1233
|
/**
|
|
1200
1234
|
* Transforms the parsed value of an option using an effectful mapping function.
|
|
1201
1235
|
*
|
|
1202
1236
|
* **Example** (Mapping parsed values effectfully)
|
|
1203
1237
|
*
|
|
1204
|
-
* ```ts
|
|
1205
|
-
* import { Effect } from "effect"
|
|
1238
|
+
* ```ts import.meta.vitest
|
|
1239
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1206
1240
|
* import { CliError, Param } from "effect/unstable/cli"
|
|
1241
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1242
|
+
*
|
|
1243
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1244
|
+
* FileSystem.layerNoop({}),
|
|
1245
|
+
* Path.layer,
|
|
1246
|
+
* Stdio.layerTest({}),
|
|
1247
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1248
|
+
* columns: Effect.succeed(80),
|
|
1249
|
+
* rows: Effect.succeed(24),
|
|
1250
|
+
* readInput: Effect.die("unused"),
|
|
1251
|
+
* readLine: Effect.die("unused"),
|
|
1252
|
+
* display: () => Effect.void
|
|
1253
|
+
* })),
|
|
1254
|
+
* Layer.succeed(
|
|
1255
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1256
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1257
|
+
* )
|
|
1258
|
+
* )
|
|
1207
1259
|
*
|
|
1208
1260
|
* const validatedEmail = Param.string(Param.flagKind, "email").pipe(
|
|
1209
1261
|
* Param.mapEffect((email) =>
|
|
@@ -1219,6 +1271,14 @@ const transform = <Kind extends ParamKind, A, B>(
|
|
|
1219
1271
|
* )
|
|
1220
1272
|
* )
|
|
1221
1273
|
* )
|
|
1274
|
+
*
|
|
1275
|
+
* const [, value] = await Effect.runPromise(
|
|
1276
|
+
* validatedEmail.parse({
|
|
1277
|
+
* arguments: [],
|
|
1278
|
+
* flags: { email: ["alice@example.com"] }
|
|
1279
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1280
|
+
* )
|
|
1281
|
+
* value // => "alice@example.com"
|
|
1222
1282
|
* ```
|
|
1223
1283
|
*
|
|
1224
1284
|
* @category combinators
|
|
@@ -1230,9 +1290,27 @@ export const mapEffect: {
|
|
|
1230
1290
|
*
|
|
1231
1291
|
* **Example** (Mapping parsed values effectfully)
|
|
1232
1292
|
*
|
|
1233
|
-
* ```ts
|
|
1234
|
-
* import { Effect } from "effect"
|
|
1293
|
+
* ```ts import.meta.vitest
|
|
1294
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1235
1295
|
* import { CliError, Param } from "effect/unstable/cli"
|
|
1296
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1297
|
+
*
|
|
1298
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1299
|
+
* FileSystem.layerNoop({}),
|
|
1300
|
+
* Path.layer,
|
|
1301
|
+
* Stdio.layerTest({}),
|
|
1302
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1303
|
+
* columns: Effect.succeed(80),
|
|
1304
|
+
* rows: Effect.succeed(24),
|
|
1305
|
+
* readInput: Effect.die("unused"),
|
|
1306
|
+
* readLine: Effect.die("unused"),
|
|
1307
|
+
* display: () => Effect.void
|
|
1308
|
+
* })),
|
|
1309
|
+
* Layer.succeed(
|
|
1310
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1311
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1312
|
+
* )
|
|
1313
|
+
* )
|
|
1236
1314
|
*
|
|
1237
1315
|
* const validatedEmail = Param.string(Param.flagKind, "email").pipe(
|
|
1238
1316
|
* Param.mapEffect((email) =>
|
|
@@ -1248,6 +1326,14 @@ export const mapEffect: {
|
|
|
1248
1326
|
* )
|
|
1249
1327
|
* )
|
|
1250
1328
|
* )
|
|
1329
|
+
*
|
|
1330
|
+
* const [, value] = await Effect.runPromise(
|
|
1331
|
+
* validatedEmail.parse({
|
|
1332
|
+
* arguments: [],
|
|
1333
|
+
* flags: { email: ["alice@example.com"] }
|
|
1334
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1335
|
+
* )
|
|
1336
|
+
* value // => "alice@example.com"
|
|
1251
1337
|
* ```
|
|
1252
1338
|
*
|
|
1253
1339
|
* @category combinators
|
|
@@ -1259,9 +1345,27 @@ export const mapEffect: {
|
|
|
1259
1345
|
*
|
|
1260
1346
|
* **Example** (Mapping parsed values effectfully)
|
|
1261
1347
|
*
|
|
1262
|
-
* ```ts
|
|
1263
|
-
* import { Effect } from "effect"
|
|
1348
|
+
* ```ts import.meta.vitest
|
|
1349
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1264
1350
|
* import { CliError, Param } from "effect/unstable/cli"
|
|
1351
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1352
|
+
*
|
|
1353
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1354
|
+
* FileSystem.layerNoop({}),
|
|
1355
|
+
* Path.layer,
|
|
1356
|
+
* Stdio.layerTest({}),
|
|
1357
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1358
|
+
* columns: Effect.succeed(80),
|
|
1359
|
+
* rows: Effect.succeed(24),
|
|
1360
|
+
* readInput: Effect.die("unused"),
|
|
1361
|
+
* readLine: Effect.die("unused"),
|
|
1362
|
+
* display: () => Effect.void
|
|
1363
|
+
* })),
|
|
1364
|
+
* Layer.succeed(
|
|
1365
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1366
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1367
|
+
* )
|
|
1368
|
+
* )
|
|
1265
1369
|
*
|
|
1266
1370
|
* const validatedEmail = Param.string(Param.flagKind, "email").pipe(
|
|
1267
1371
|
* Param.mapEffect((email) =>
|
|
@@ -1277,6 +1381,14 @@ export const mapEffect: {
|
|
|
1277
1381
|
* )
|
|
1278
1382
|
* )
|
|
1279
1383
|
* )
|
|
1384
|
+
*
|
|
1385
|
+
* const [, value] = await Effect.runPromise(
|
|
1386
|
+
* validatedEmail.parse({
|
|
1387
|
+
* arguments: [],
|
|
1388
|
+
* flags: { email: ["alice@example.com"] }
|
|
1389
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1390
|
+
* )
|
|
1391
|
+
* value // => "alice@example.com"
|
|
1280
1392
|
* ```
|
|
1281
1393
|
*
|
|
1282
1394
|
* @category combinators
|
|
@@ -1305,8 +1417,27 @@ export const mapEffect: {
|
|
|
1305
1417
|
*
|
|
1306
1418
|
* **Example** (Mapping thrown errors)
|
|
1307
1419
|
*
|
|
1308
|
-
* ```ts
|
|
1420
|
+
* ```ts import.meta.vitest
|
|
1421
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1309
1422
|
* import { Param } from "effect/unstable/cli"
|
|
1423
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1424
|
+
*
|
|
1425
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1426
|
+
* FileSystem.layerNoop({}),
|
|
1427
|
+
* Path.layer,
|
|
1428
|
+
* Stdio.layerTest({}),
|
|
1429
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1430
|
+
* columns: Effect.succeed(80),
|
|
1431
|
+
* rows: Effect.succeed(24),
|
|
1432
|
+
* readInput: Effect.die("unused"),
|
|
1433
|
+
* readLine: Effect.die("unused"),
|
|
1434
|
+
* display: () => Effect.void
|
|
1435
|
+
* })),
|
|
1436
|
+
* Layer.succeed(
|
|
1437
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1438
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1439
|
+
* )
|
|
1440
|
+
* )
|
|
1310
1441
|
*
|
|
1311
1442
|
* const parsedJson = Param.string(Param.flagKind, "config").pipe(
|
|
1312
1443
|
* Param.mapTryCatch(
|
|
@@ -1315,6 +1446,14 @@ export const mapEffect: {
|
|
|
1315
1446
|
* `Invalid JSON: ${error instanceof Error ? error.message : String(error)}`
|
|
1316
1447
|
* )
|
|
1317
1448
|
* )
|
|
1449
|
+
*
|
|
1450
|
+
* const [, value] = await Effect.runPromise(
|
|
1451
|
+
* parsedJson.parse({
|
|
1452
|
+
* arguments: [],
|
|
1453
|
+
* flags: { config: ['{"enabled":true}'] }
|
|
1454
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1455
|
+
* )
|
|
1456
|
+
* value // => { enabled: true }
|
|
1318
1457
|
* ```
|
|
1319
1458
|
*
|
|
1320
1459
|
* @category combinators
|
|
@@ -1327,8 +1466,27 @@ export const mapTryCatch: {
|
|
|
1327
1466
|
*
|
|
1328
1467
|
* **Example** (Mapping thrown errors)
|
|
1329
1468
|
*
|
|
1330
|
-
* ```ts
|
|
1469
|
+
* ```ts import.meta.vitest
|
|
1470
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1331
1471
|
* import { Param } from "effect/unstable/cli"
|
|
1472
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1473
|
+
*
|
|
1474
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1475
|
+
* FileSystem.layerNoop({}),
|
|
1476
|
+
* Path.layer,
|
|
1477
|
+
* Stdio.layerTest({}),
|
|
1478
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1479
|
+
* columns: Effect.succeed(80),
|
|
1480
|
+
* rows: Effect.succeed(24),
|
|
1481
|
+
* readInput: Effect.die("unused"),
|
|
1482
|
+
* readLine: Effect.die("unused"),
|
|
1483
|
+
* display: () => Effect.void
|
|
1484
|
+
* })),
|
|
1485
|
+
* Layer.succeed(
|
|
1486
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1487
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1488
|
+
* )
|
|
1489
|
+
* )
|
|
1332
1490
|
*
|
|
1333
1491
|
* const parsedJson = Param.string(Param.flagKind, "config").pipe(
|
|
1334
1492
|
* Param.mapTryCatch(
|
|
@@ -1337,6 +1495,14 @@ export const mapTryCatch: {
|
|
|
1337
1495
|
* `Invalid JSON: ${error instanceof Error ? error.message : String(error)}`
|
|
1338
1496
|
* )
|
|
1339
1497
|
* )
|
|
1498
|
+
*
|
|
1499
|
+
* const [, value] = await Effect.runPromise(
|
|
1500
|
+
* parsedJson.parse({
|
|
1501
|
+
* arguments: [],
|
|
1502
|
+
* flags: { config: ['{"enabled":true}'] }
|
|
1503
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1504
|
+
* )
|
|
1505
|
+
* value // => { enabled: true }
|
|
1340
1506
|
* ```
|
|
1341
1507
|
*
|
|
1342
1508
|
* @category combinators
|
|
@@ -1349,8 +1515,27 @@ export const mapTryCatch: {
|
|
|
1349
1515
|
*
|
|
1350
1516
|
* **Example** (Mapping thrown errors)
|
|
1351
1517
|
*
|
|
1352
|
-
* ```ts
|
|
1518
|
+
* ```ts import.meta.vitest
|
|
1519
|
+
* import { Effect, FileSystem, Layer, Path, Stdio, Terminal } from "effect"
|
|
1353
1520
|
* import { Param } from "effect/unstable/cli"
|
|
1521
|
+
* import { ChildProcessSpawner } from "effect/unstable/process"
|
|
1522
|
+
*
|
|
1523
|
+
* const CliTestLayer = Layer.mergeAll(
|
|
1524
|
+
* FileSystem.layerNoop({}),
|
|
1525
|
+
* Path.layer,
|
|
1526
|
+
* Stdio.layerTest({}),
|
|
1527
|
+
* Layer.succeed(Terminal.Terminal, Terminal.make({
|
|
1528
|
+
* columns: Effect.succeed(80),
|
|
1529
|
+
* rows: Effect.succeed(24),
|
|
1530
|
+
* readInput: Effect.die("unused"),
|
|
1531
|
+
* readLine: Effect.die("unused"),
|
|
1532
|
+
* display: () => Effect.void
|
|
1533
|
+
* })),
|
|
1534
|
+
* Layer.succeed(
|
|
1535
|
+
* ChildProcessSpawner.ChildProcessSpawner,
|
|
1536
|
+
* ChildProcessSpawner.make(() => Effect.die("unused"))
|
|
1537
|
+
* )
|
|
1538
|
+
* )
|
|
1354
1539
|
*
|
|
1355
1540
|
* const parsedJson = Param.string(Param.flagKind, "config").pipe(
|
|
1356
1541
|
* Param.mapTryCatch(
|
|
@@ -1359,6 +1544,14 @@ export const mapTryCatch: {
|
|
|
1359
1544
|
* `Invalid JSON: ${error instanceof Error ? error.message : String(error)}`
|
|
1360
1545
|
* )
|
|
1361
1546
|
* )
|
|
1547
|
+
*
|
|
1548
|
+
* const [, value] = await Effect.runPromise(
|
|
1549
|
+
* parsedJson.parse({
|
|
1550
|
+
* arguments: [],
|
|
1551
|
+
* flags: { config: ['{"enabled":true}'] }
|
|
1552
|
+
* }).pipe(Effect.provide(CliTestLayer))
|
|
1553
|
+
* )
|
|
1554
|
+
* value // => { enabled: true }
|
|
1362
1555
|
* ```
|
|
1363
1556
|
*
|
|
1364
1557
|
* @category combinators
|
|
@@ -1405,13 +1598,14 @@ export const mapTryCatch: {
|
|
|
1405
1598
|
*
|
|
1406
1599
|
* **Example** (Making parameters optional)
|
|
1407
1600
|
*
|
|
1408
|
-
* ```ts
|
|
1601
|
+
* ```ts import.meta.vitest
|
|
1409
1602
|
* import { Param } from "effect/unstable/cli"
|
|
1410
1603
|
*
|
|
1411
1604
|
* // Create an optional port option
|
|
1412
1605
|
* // - When not provided: returns Option.none()
|
|
1413
1606
|
* // - When provided: returns Option.some(parsedValue)
|
|
1414
1607
|
* const port = Param.optional(Param.integer(Param.flagKind, "port"))
|
|
1608
|
+
* port.kind // => "flag"
|
|
1415
1609
|
* ```
|
|
1416
1610
|
*
|
|
1417
1611
|
* @category combinators
|
|
@@ -1461,7 +1655,7 @@ export const optional = <Kind extends ParamKind, A>(
|
|
|
1461
1655
|
*
|
|
1462
1656
|
* **Example** (Providing default values)
|
|
1463
1657
|
*
|
|
1464
|
-
* ```ts
|
|
1658
|
+
* ```ts import.meta.vitest
|
|
1465
1659
|
* import { Param } from "effect/unstable/cli"
|
|
1466
1660
|
*
|
|
1467
1661
|
* // Using the pipe operator to make an option optional
|
|
@@ -1475,6 +1669,7 @@ export const optional = <Kind extends ParamKind, A>(
|
|
|
1475
1669
|
* Param.withDescription("Enable verbose output"),
|
|
1476
1670
|
* Param.withDefault(false)
|
|
1477
1671
|
* )
|
|
1672
|
+
* const kinds = [port.kind, verbose.kind] // => ["flag", "flag"]
|
|
1478
1673
|
* ```
|
|
1479
1674
|
*
|
|
1480
1675
|
* @category combinators
|
|
@@ -1491,7 +1686,7 @@ export const withDefault: {
|
|
|
1491
1686
|
*
|
|
1492
1687
|
* **Example** (Providing default values)
|
|
1493
1688
|
*
|
|
1494
|
-
* ```ts
|
|
1689
|
+
* ```ts import.meta.vitest
|
|
1495
1690
|
* import { Param } from "effect/unstable/cli"
|
|
1496
1691
|
*
|
|
1497
1692
|
* // Using the pipe operator to make an option optional
|
|
@@ -1505,6 +1700,7 @@ export const withDefault: {
|
|
|
1505
1700
|
* Param.withDescription("Enable verbose output"),
|
|
1506
1701
|
* Param.withDefault(false)
|
|
1507
1702
|
* )
|
|
1703
|
+
* const kinds = [port.kind, verbose.kind] // => ["flag", "flag"]
|
|
1508
1704
|
* ```
|
|
1509
1705
|
*
|
|
1510
1706
|
* @category combinators
|
|
@@ -1521,7 +1717,7 @@ export const withDefault: {
|
|
|
1521
1717
|
*
|
|
1522
1718
|
* **Example** (Providing default values)
|
|
1523
1719
|
*
|
|
1524
|
-
* ```ts
|
|
1720
|
+
* ```ts import.meta.vitest
|
|
1525
1721
|
* import { Param } from "effect/unstable/cli"
|
|
1526
1722
|
*
|
|
1527
1723
|
* // Using the pipe operator to make an option optional
|
|
@@ -1535,6 +1731,7 @@ export const withDefault: {
|
|
|
1535
1731
|
* Param.withDescription("Enable verbose output"),
|
|
1536
1732
|
* Param.withDefault(false)
|
|
1537
1733
|
* )
|
|
1734
|
+
* const kinds = [port.kind, verbose.kind] // => ["flag", "flag"]
|
|
1538
1735
|
* ```
|
|
1539
1736
|
*
|
|
1540
1737
|
* @category combinators
|
|
@@ -1790,7 +1987,7 @@ export type VariadicParamOptions = {
|
|
|
1790
1987
|
*
|
|
1791
1988
|
* **Example** (Accepting multiple values)
|
|
1792
1989
|
*
|
|
1793
|
-
* ```ts
|
|
1990
|
+
* ```ts import.meta.vitest
|
|
1794
1991
|
* import { Param } from "effect/unstable/cli"
|
|
1795
1992
|
*
|
|
1796
1993
|
* // Basic variadic parameter (0 to infinity)
|
|
@@ -1807,6 +2004,7 @@ export type VariadicParamOptions = {
|
|
|
1807
2004
|
* min: 2, // at least 2 times
|
|
1808
2005
|
* max: 2 // at most 2 times
|
|
1809
2006
|
* })
|
|
2007
|
+
* const kinds = [tags.kind, inputs.kind, limited.kind] // => ["flag", "flag", "flag"]
|
|
1810
2008
|
* ```
|
|
1811
2009
|
*
|
|
1812
2010
|
* @category combinators
|
|
@@ -1844,7 +2042,7 @@ export const variadic = <Kind extends ParamKind, A>(
|
|
|
1844
2042
|
*
|
|
1845
2043
|
* **Example** (Bounding repeated values)
|
|
1846
2044
|
*
|
|
1847
|
-
* ```ts
|
|
2045
|
+
* ```ts import.meta.vitest
|
|
1848
2046
|
* import { Param } from "effect/unstable/cli"
|
|
1849
2047
|
*
|
|
1850
2048
|
* // Allow 1-3 file inputs
|
|
@@ -1863,6 +2061,7 @@ export const variadic = <Kind extends ParamKind, A>(
|
|
|
1863
2061
|
*
|
|
1864
2062
|
* // Parse: --tag dev --tag staging --tag v1.0
|
|
1865
2063
|
* // Result: ["dev", "staging", "v1.0"]
|
|
2064
|
+
* const kinds = [files.kind, tags.kind] // => ["flag", "flag"]
|
|
1866
2065
|
* ```
|
|
1867
2066
|
*
|
|
1868
2067
|
* @category combinators
|
|
@@ -1879,7 +2078,7 @@ export const between: {
|
|
|
1879
2078
|
*
|
|
1880
2079
|
* **Example** (Bounding repeated values)
|
|
1881
2080
|
*
|
|
1882
|
-
* ```ts
|
|
2081
|
+
* ```ts import.meta.vitest
|
|
1883
2082
|
* import { Param } from "effect/unstable/cli"
|
|
1884
2083
|
*
|
|
1885
2084
|
* // Allow 1-3 file inputs
|
|
@@ -1898,6 +2097,7 @@ export const between: {
|
|
|
1898
2097
|
*
|
|
1899
2098
|
* // Parse: --tag dev --tag staging --tag v1.0
|
|
1900
2099
|
* // Result: ["dev", "staging", "v1.0"]
|
|
2100
|
+
* const kinds = [files.kind, tags.kind] // => ["flag", "flag"]
|
|
1901
2101
|
* ```
|
|
1902
2102
|
*
|
|
1903
2103
|
* @category combinators
|
|
@@ -1914,7 +2114,7 @@ export const between: {
|
|
|
1914
2114
|
*
|
|
1915
2115
|
* **Example** (Bounding repeated values)
|
|
1916
2116
|
*
|
|
1917
|
-
* ```ts
|
|
2117
|
+
* ```ts import.meta.vitest
|
|
1918
2118
|
* import { Param } from "effect/unstable/cli"
|
|
1919
2119
|
*
|
|
1920
2120
|
* // Allow 1-3 file inputs
|
|
@@ -1933,6 +2133,7 @@ export const between: {
|
|
|
1933
2133
|
*
|
|
1934
2134
|
* // Parse: --tag dev --tag staging --tag v1.0
|
|
1935
2135
|
* // Result: ["dev", "staging", "v1.0"]
|
|
2136
|
+
* const kinds = [files.kind, tags.kind] // => ["flag", "flag"]
|
|
1936
2137
|
* ```
|
|
1937
2138
|
*
|
|
1938
2139
|
* @category combinators
|
|
@@ -1960,7 +2161,7 @@ export const between: {
|
|
|
1960
2161
|
*
|
|
1961
2162
|
* **Example** (Limiting repeated values)
|
|
1962
2163
|
*
|
|
1963
|
-
* ```ts
|
|
2164
|
+
* ```ts import.meta.vitest
|
|
1964
2165
|
* import { Param } from "effect/unstable/cli"
|
|
1965
2166
|
*
|
|
1966
2167
|
* // Allow at most 3 warning suppressions
|
|
@@ -1970,6 +2171,7 @@ export const between: {
|
|
|
1970
2171
|
*
|
|
1971
2172
|
* // Parse: --suppress warning1 --suppress warning2
|
|
1972
2173
|
* // Result: ["warning1", "warning2"]
|
|
2174
|
+
* suppressions.kind // => "flag"
|
|
1973
2175
|
* ```
|
|
1974
2176
|
*
|
|
1975
2177
|
* @category combinators
|
|
@@ -1986,7 +2188,7 @@ export const atMost: {
|
|
|
1986
2188
|
*
|
|
1987
2189
|
* **Example** (Limiting repeated values)
|
|
1988
2190
|
*
|
|
1989
|
-
* ```ts
|
|
2191
|
+
* ```ts import.meta.vitest
|
|
1990
2192
|
* import { Param } from "effect/unstable/cli"
|
|
1991
2193
|
*
|
|
1992
2194
|
* // Allow at most 3 warning suppressions
|
|
@@ -1996,6 +2198,7 @@ export const atMost: {
|
|
|
1996
2198
|
*
|
|
1997
2199
|
* // Parse: --suppress warning1 --suppress warning2
|
|
1998
2200
|
* // Result: ["warning1", "warning2"]
|
|
2201
|
+
* suppressions.kind // => "flag"
|
|
1999
2202
|
* ```
|
|
2000
2203
|
*
|
|
2001
2204
|
* @category combinators
|
|
@@ -2012,7 +2215,7 @@ export const atMost: {
|
|
|
2012
2215
|
*
|
|
2013
2216
|
* **Example** (Limiting repeated values)
|
|
2014
2217
|
*
|
|
2015
|
-
* ```ts
|
|
2218
|
+
* ```ts import.meta.vitest
|
|
2016
2219
|
* import { Param } from "effect/unstable/cli"
|
|
2017
2220
|
*
|
|
2018
2221
|
* // Allow at most 3 warning suppressions
|
|
@@ -2022,6 +2225,7 @@ export const atMost: {
|
|
|
2022
2225
|
*
|
|
2023
2226
|
* // Parse: --suppress warning1 --suppress warning2
|
|
2024
2227
|
* // Result: ["warning1", "warning2"]
|
|
2228
|
+
* suppressions.kind // => "flag"
|
|
2025
2229
|
* ```
|
|
2026
2230
|
*
|
|
2027
2231
|
* @category combinators
|
|
@@ -2045,7 +2249,7 @@ export const atMost: {
|
|
|
2045
2249
|
*
|
|
2046
2250
|
* **Example** (Requiring repeated values)
|
|
2047
2251
|
*
|
|
2048
|
-
* ```ts
|
|
2252
|
+
* ```ts import.meta.vitest
|
|
2049
2253
|
* import { Param } from "effect/unstable/cli"
|
|
2050
2254
|
*
|
|
2051
2255
|
* // Require at least 2 input files
|
|
@@ -2056,6 +2260,7 @@ export const atMost: {
|
|
|
2056
2260
|
*
|
|
2057
2261
|
* // Parse: --input file1.txt --input file2.txt --input file3.txt
|
|
2058
2262
|
* // Result: ["file1.txt", "file2.txt", "file3.txt"]
|
|
2263
|
+
* inputs.kind // => "flag"
|
|
2059
2264
|
* ```
|
|
2060
2265
|
*
|
|
2061
2266
|
* @category combinators
|
|
@@ -2072,7 +2277,7 @@ export const atLeast: {
|
|
|
2072
2277
|
*
|
|
2073
2278
|
* **Example** (Requiring repeated values)
|
|
2074
2279
|
*
|
|
2075
|
-
* ```ts
|
|
2280
|
+
* ```ts import.meta.vitest
|
|
2076
2281
|
* import { Param } from "effect/unstable/cli"
|
|
2077
2282
|
*
|
|
2078
2283
|
* // Require at least 2 input files
|
|
@@ -2083,6 +2288,7 @@ export const atLeast: {
|
|
|
2083
2288
|
*
|
|
2084
2289
|
* // Parse: --input file1.txt --input file2.txt --input file3.txt
|
|
2085
2290
|
* // Result: ["file1.txt", "file2.txt", "file3.txt"]
|
|
2291
|
+
* inputs.kind // => "flag"
|
|
2086
2292
|
* ```
|
|
2087
2293
|
*
|
|
2088
2294
|
* @category combinators
|
|
@@ -2099,7 +2305,7 @@ export const atLeast: {
|
|
|
2099
2305
|
*
|
|
2100
2306
|
* **Example** (Requiring repeated values)
|
|
2101
2307
|
*
|
|
2102
|
-
* ```ts
|
|
2308
|
+
* ```ts import.meta.vitest
|
|
2103
2309
|
* import { Param } from "effect/unstable/cli"
|
|
2104
2310
|
*
|
|
2105
2311
|
* // Require at least 2 input files
|
|
@@ -2110,6 +2316,7 @@ export const atLeast: {
|
|
|
2110
2316
|
*
|
|
2111
2317
|
* // Parse: --input file1.txt --input file2.txt --input file3.txt
|
|
2112
2318
|
* // Result: ["file1.txt", "file2.txt", "file3.txt"]
|
|
2319
|
+
* inputs.kind // => "flag"
|
|
2113
2320
|
* ```
|
|
2114
2321
|
*
|
|
2115
2322
|
* @category combinators
|
|
@@ -2134,7 +2341,7 @@ export const atLeast: {
|
|
|
2134
2341
|
*
|
|
2135
2342
|
* **Example** (Filtering and transforming values)
|
|
2136
2343
|
*
|
|
2137
|
-
* ```ts
|
|
2344
|
+
* ```ts import.meta.vitest
|
|
2138
2345
|
* import { Option } from "effect"
|
|
2139
2346
|
* import { Param } from "effect/unstable/cli"
|
|
2140
2347
|
* const positiveInt = Param.integer(Param.flagKind, "count").pipe(
|
|
@@ -2143,6 +2350,7 @@ export const atLeast: {
|
|
|
2143
2350
|
* (n) => `Expected positive integer, got ${n}`
|
|
2144
2351
|
* )
|
|
2145
2352
|
* )
|
|
2353
|
+
* positiveInt.kind // => "flag"
|
|
2146
2354
|
* ```
|
|
2147
2355
|
*
|
|
2148
2356
|
* @category combinators
|
|
@@ -2160,7 +2368,7 @@ export const filterMap: {
|
|
|
2160
2368
|
*
|
|
2161
2369
|
* **Example** (Filtering and transforming values)
|
|
2162
2370
|
*
|
|
2163
|
-
* ```ts
|
|
2371
|
+
* ```ts import.meta.vitest
|
|
2164
2372
|
* import { Option } from "effect"
|
|
2165
2373
|
* import { Param } from "effect/unstable/cli"
|
|
2166
2374
|
* const positiveInt = Param.integer(Param.flagKind, "count").pipe(
|
|
@@ -2169,6 +2377,7 @@ export const filterMap: {
|
|
|
2169
2377
|
* (n) => `Expected positive integer, got ${n}`
|
|
2170
2378
|
* )
|
|
2171
2379
|
* )
|
|
2380
|
+
* positiveInt.kind // => "flag"
|
|
2172
2381
|
* ```
|
|
2173
2382
|
*
|
|
2174
2383
|
* @category combinators
|
|
@@ -2186,7 +2395,7 @@ export const filterMap: {
|
|
|
2186
2395
|
*
|
|
2187
2396
|
* **Example** (Filtering and transforming values)
|
|
2188
2397
|
*
|
|
2189
|
-
* ```ts
|
|
2398
|
+
* ```ts import.meta.vitest
|
|
2190
2399
|
* import { Option } from "effect"
|
|
2191
2400
|
* import { Param } from "effect/unstable/cli"
|
|
2192
2401
|
* const positiveInt = Param.integer(Param.flagKind, "count").pipe(
|
|
@@ -2195,6 +2404,7 @@ export const filterMap: {
|
|
|
2195
2404
|
* (n) => `Expected positive integer, got ${n}`
|
|
2196
2405
|
* )
|
|
2197
2406
|
* )
|
|
2407
|
+
* positiveInt.kind // => "flag"
|
|
2198
2408
|
* ```
|
|
2199
2409
|
*
|
|
2200
2410
|
* @category combinators
|
|
@@ -2232,7 +2442,7 @@ export const filterMap: {
|
|
|
2232
2442
|
*
|
|
2233
2443
|
* **Example** (Filtering parsed values)
|
|
2234
2444
|
*
|
|
2235
|
-
* ```ts
|
|
2445
|
+
* ```ts import.meta.vitest
|
|
2236
2446
|
* import { Param } from "effect/unstable/cli"
|
|
2237
2447
|
*
|
|
2238
2448
|
* const evenNumber = Param.integer(Param.flagKind, "num").pipe(
|
|
@@ -2241,6 +2451,7 @@ export const filterMap: {
|
|
|
2241
2451
|
* (n) => `Expected even number, got ${n}`
|
|
2242
2452
|
* )
|
|
2243
2453
|
* )
|
|
2454
|
+
* evenNumber.kind // => "flag"
|
|
2244
2455
|
* ```
|
|
2245
2456
|
*
|
|
2246
2457
|
* @category combinators
|
|
@@ -2252,7 +2463,7 @@ export const filter: {
|
|
|
2252
2463
|
*
|
|
2253
2464
|
* **Example** (Filtering parsed values)
|
|
2254
2465
|
*
|
|
2255
|
-
* ```ts
|
|
2466
|
+
* ```ts import.meta.vitest
|
|
2256
2467
|
* import { Param } from "effect/unstable/cli"
|
|
2257
2468
|
*
|
|
2258
2469
|
* const evenNumber = Param.integer(Param.flagKind, "num").pipe(
|
|
@@ -2261,6 +2472,7 @@ export const filter: {
|
|
|
2261
2472
|
* (n) => `Expected even number, got ${n}`
|
|
2262
2473
|
* )
|
|
2263
2474
|
* )
|
|
2475
|
+
* evenNumber.kind // => "flag"
|
|
2264
2476
|
* ```
|
|
2265
2477
|
*
|
|
2266
2478
|
* @category combinators
|
|
@@ -2272,7 +2484,7 @@ export const filter: {
|
|
|
2272
2484
|
*
|
|
2273
2485
|
* **Example** (Filtering parsed values)
|
|
2274
2486
|
*
|
|
2275
|
-
* ```ts
|
|
2487
|
+
* ```ts import.meta.vitest
|
|
2276
2488
|
* import { Param } from "effect/unstable/cli"
|
|
2277
2489
|
*
|
|
2278
2490
|
* const evenNumber = Param.integer(Param.flagKind, "num").pipe(
|
|
@@ -2281,6 +2493,7 @@ export const filter: {
|
|
|
2281
2493
|
* (n) => `Expected even number, got ${n}`
|
|
2282
2494
|
* )
|
|
2283
2495
|
* )
|
|
2496
|
+
* evenNumber.kind // => "flag"
|
|
2284
2497
|
* ```
|
|
2285
2498
|
*
|
|
2286
2499
|
* @category combinators
|
|
@@ -2307,7 +2520,7 @@ export const filter: {
|
|
|
2307
2520
|
*
|
|
2308
2521
|
* **Example** (Setting metavars)
|
|
2309
2522
|
*
|
|
2310
|
-
* ```ts
|
|
2523
|
+
* ```ts import.meta.vitest
|
|
2311
2524
|
* import { Param } from "effect/unstable/cli"
|
|
2312
2525
|
*
|
|
2313
2526
|
* const port = Param.integer(Param.flagKind, "port").pipe(
|
|
@@ -2317,6 +2530,7 @@ export const filter: {
|
|
|
2317
2530
|
* () => "Port must be between 1 and 65535"
|
|
2318
2531
|
* )
|
|
2319
2532
|
* )
|
|
2533
|
+
* port.kind // => "flag"
|
|
2320
2534
|
* ```
|
|
2321
2535
|
*
|
|
2322
2536
|
* @category metadata
|
|
@@ -2333,7 +2547,7 @@ export const withMetavar: {
|
|
|
2333
2547
|
*
|
|
2334
2548
|
* **Example** (Setting metavars)
|
|
2335
2549
|
*
|
|
2336
|
-
* ```ts
|
|
2550
|
+
* ```ts import.meta.vitest
|
|
2337
2551
|
* import { Param } from "effect/unstable/cli"
|
|
2338
2552
|
*
|
|
2339
2553
|
* const port = Param.integer(Param.flagKind, "port").pipe(
|
|
@@ -2343,6 +2557,7 @@ export const withMetavar: {
|
|
|
2343
2557
|
* () => "Port must be between 1 and 65535"
|
|
2344
2558
|
* )
|
|
2345
2559
|
* )
|
|
2560
|
+
* port.kind // => "flag"
|
|
2346
2561
|
* ```
|
|
2347
2562
|
*
|
|
2348
2563
|
* @category metadata
|
|
@@ -2359,7 +2574,7 @@ export const withMetavar: {
|
|
|
2359
2574
|
*
|
|
2360
2575
|
* **Example** (Setting metavars)
|
|
2361
2576
|
*
|
|
2362
|
-
* ```ts
|
|
2577
|
+
* ```ts import.meta.vitest
|
|
2363
2578
|
* import { Param } from "effect/unstable/cli"
|
|
2364
2579
|
*
|
|
2365
2580
|
* const port = Param.integer(Param.flagKind, "port").pipe(
|
|
@@ -2369,6 +2584,7 @@ export const withMetavar: {
|
|
|
2369
2584
|
* () => "Port must be between 1 and 65535"
|
|
2370
2585
|
* )
|
|
2371
2586
|
* )
|
|
2587
|
+
* port.kind // => "flag"
|
|
2372
2588
|
* ```
|
|
2373
2589
|
*
|
|
2374
2590
|
* @category metadata
|
|
@@ -2390,7 +2606,7 @@ export const withMetavar: {
|
|
|
2390
2606
|
*
|
|
2391
2607
|
* **Example** (Validating with schemas)
|
|
2392
2608
|
*
|
|
2393
|
-
* ```ts
|
|
2609
|
+
* ```ts import.meta.vitest
|
|
2394
2610
|
* import { Schema } from "effect"
|
|
2395
2611
|
* import { Param } from "effect/unstable/cli"
|
|
2396
2612
|
* const isEmail = Schema.isPattern(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)
|
|
@@ -2402,6 +2618,7 @@ export const withMetavar: {
|
|
|
2402
2618
|
* const email = Param.string(Param.flagKind, "email").pipe(
|
|
2403
2619
|
* Param.withSchema(Email)
|
|
2404
2620
|
* )
|
|
2621
|
+
* email.kind // => "flag"
|
|
2405
2622
|
* ```
|
|
2406
2623
|
*
|
|
2407
2624
|
* @category combinators
|
|
@@ -2413,7 +2630,7 @@ export const withSchema: {
|
|
|
2413
2630
|
*
|
|
2414
2631
|
* **Example** (Validating with schemas)
|
|
2415
2632
|
*
|
|
2416
|
-
* ```ts
|
|
2633
|
+
* ```ts import.meta.vitest
|
|
2417
2634
|
* import { Schema } from "effect"
|
|
2418
2635
|
* import { Param } from "effect/unstable/cli"
|
|
2419
2636
|
* const isEmail = Schema.isPattern(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)
|
|
@@ -2425,6 +2642,7 @@ export const withSchema: {
|
|
|
2425
2642
|
* const email = Param.string(Param.flagKind, "email").pipe(
|
|
2426
2643
|
* Param.withSchema(Email)
|
|
2427
2644
|
* )
|
|
2645
|
+
* email.kind // => "flag"
|
|
2428
2646
|
* ```
|
|
2429
2647
|
*
|
|
2430
2648
|
* @category combinators
|
|
@@ -2438,7 +2656,7 @@ export const withSchema: {
|
|
|
2438
2656
|
*
|
|
2439
2657
|
* **Example** (Validating with schemas)
|
|
2440
2658
|
*
|
|
2441
|
-
* ```ts
|
|
2659
|
+
* ```ts import.meta.vitest
|
|
2442
2660
|
* import { Schema } from "effect"
|
|
2443
2661
|
* import { Param } from "effect/unstable/cli"
|
|
2444
2662
|
* const isEmail = Schema.isPattern(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)
|
|
@@ -2450,6 +2668,7 @@ export const withSchema: {
|
|
|
2450
2668
|
* const email = Param.string(Param.flagKind, "email").pipe(
|
|
2451
2669
|
* Param.withSchema(Email)
|
|
2452
2670
|
* )
|
|
2671
|
+
* email.kind // => "flag"
|
|
2453
2672
|
* ```
|
|
2454
2673
|
*
|
|
2455
2674
|
* @category combinators
|
|
@@ -2481,12 +2700,13 @@ export const withSchema: {
|
|
|
2481
2700
|
*
|
|
2482
2701
|
* **Example** (Falling back to another parameter)
|
|
2483
2702
|
*
|
|
2484
|
-
* ```ts
|
|
2703
|
+
* ```ts import.meta.vitest
|
|
2485
2704
|
* import { Param } from "effect/unstable/cli"
|
|
2486
2705
|
*
|
|
2487
2706
|
* const config = Param.file(Param.flagKind, "config").pipe(
|
|
2488
2707
|
* Param.orElse(() => Param.string(Param.flagKind, "config-url"))
|
|
2489
2708
|
* )
|
|
2709
|
+
* config.kind // => "flag"
|
|
2490
2710
|
* ```
|
|
2491
2711
|
*
|
|
2492
2712
|
* @category combinators
|
|
@@ -2498,42 +2718,46 @@ export const orElse: {
|
|
|
2498
2718
|
*
|
|
2499
2719
|
* **Example** (Falling back to another parameter)
|
|
2500
2720
|
*
|
|
2501
|
-
* ```ts
|
|
2721
|
+
* ```ts import.meta.vitest
|
|
2502
2722
|
* import { Param } from "effect/unstable/cli"
|
|
2503
2723
|
*
|
|
2504
2724
|
* const config = Param.file(Param.flagKind, "config").pipe(
|
|
2505
2725
|
* Param.orElse(() => Param.string(Param.flagKind, "config-url"))
|
|
2506
2726
|
* )
|
|
2727
|
+
* config.kind // => "flag"
|
|
2507
2728
|
* ```
|
|
2508
2729
|
*
|
|
2509
2730
|
* @category combinators
|
|
2510
2731
|
* @since 4.0.0
|
|
2511
2732
|
*/
|
|
2512
|
-
<B, Kind extends ParamKind>(orElse:
|
|
2733
|
+
<B, Kind extends ParamKind>(orElse: LazyArg<Param<Kind, B>>): <A>(self: Param<Kind, A>) => Param<Kind, A | B>
|
|
2513
2734
|
/**
|
|
2514
2735
|
* Provides a fallback param to use if this param fails to parse.
|
|
2515
2736
|
*
|
|
2516
2737
|
* **Example** (Falling back to another parameter)
|
|
2517
2738
|
*
|
|
2518
|
-
* ```ts
|
|
2739
|
+
* ```ts import.meta.vitest
|
|
2519
2740
|
* import { Param } from "effect/unstable/cli"
|
|
2520
2741
|
*
|
|
2521
2742
|
* const config = Param.file(Param.flagKind, "config").pipe(
|
|
2522
2743
|
* Param.orElse(() => Param.string(Param.flagKind, "config-url"))
|
|
2523
2744
|
* )
|
|
2745
|
+
* config.kind // => "flag"
|
|
2524
2746
|
* ```
|
|
2525
2747
|
*
|
|
2526
2748
|
* @category combinators
|
|
2527
2749
|
* @since 4.0.0
|
|
2528
2750
|
*/
|
|
2529
|
-
<Kind extends ParamKind, A, B>(self: Param<Kind, A>, orElse:
|
|
2751
|
+
<Kind extends ParamKind, A, B>(self: Param<Kind, A>, orElse: LazyArg<Param<Kind, B>>): Param<Kind, A | B>
|
|
2530
2752
|
} = dual(2, <Kind extends ParamKind, A, B>(
|
|
2531
2753
|
self: Param<Kind, A>,
|
|
2532
|
-
orElse:
|
|
2754
|
+
orElse: LazyArg<Param<Kind, B>>
|
|
2533
2755
|
) =>
|
|
2534
2756
|
transform(
|
|
2535
2757
|
self,
|
|
2536
|
-
(parse: Parse<A
|
|
2758
|
+
(parse: Parse<A>, alternatives): Parse<A | B> => (args: ParsedArgs) =>
|
|
2759
|
+
Effect.catch(parse(args), () => (alternatives[0]!() as Parse<B>)(args)),
|
|
2760
|
+
[orElse]
|
|
2537
2761
|
))
|
|
2538
2762
|
|
|
2539
2763
|
/**
|
|
@@ -2547,13 +2771,14 @@ export const orElse: {
|
|
|
2547
2771
|
*
|
|
2548
2772
|
* **Example** (Returning fallback results)
|
|
2549
2773
|
*
|
|
2550
|
-
* ```ts
|
|
2774
|
+
* ```ts import.meta.vitest
|
|
2551
2775
|
* import { Param } from "effect/unstable/cli"
|
|
2552
2776
|
*
|
|
2553
2777
|
* const configSource = Param.file(Param.flagKind, "config").pipe(
|
|
2554
2778
|
* Param.orElseResult(() => Param.string(Param.flagKind, "config-url"))
|
|
2555
2779
|
* )
|
|
2556
2780
|
* // Returns Result<string, string>
|
|
2781
|
+
* configSource.kind // => "flag"
|
|
2557
2782
|
* ```
|
|
2558
2783
|
*
|
|
2559
2784
|
* @category combinators
|
|
@@ -2571,19 +2796,20 @@ export const orElseResult: {
|
|
|
2571
2796
|
*
|
|
2572
2797
|
* **Example** (Returning fallback results)
|
|
2573
2798
|
*
|
|
2574
|
-
* ```ts
|
|
2799
|
+
* ```ts import.meta.vitest
|
|
2575
2800
|
* import { Param } from "effect/unstable/cli"
|
|
2576
2801
|
*
|
|
2577
2802
|
* const configSource = Param.file(Param.flagKind, "config").pipe(
|
|
2578
2803
|
* Param.orElseResult(() => Param.string(Param.flagKind, "config-url"))
|
|
2579
2804
|
* )
|
|
2580
2805
|
* // Returns Result<string, string>
|
|
2806
|
+
* configSource.kind // => "flag"
|
|
2581
2807
|
* ```
|
|
2582
2808
|
*
|
|
2583
2809
|
* @category combinators
|
|
2584
2810
|
* @since 4.0.0
|
|
2585
2811
|
*/
|
|
2586
|
-
<Kind extends ParamKind, B>(orElse:
|
|
2812
|
+
<Kind extends ParamKind, B>(orElse: LazyArg<Param<Kind, B>>): <A>(self: Param<Kind, A>) => Param<Kind, Result.Result<A, B>>
|
|
2587
2813
|
/**
|
|
2588
2814
|
* Provides a fallback param and returns a `Result` indicating which param
|
|
2589
2815
|
* succeeded.
|
|
@@ -2595,34 +2821,36 @@ export const orElseResult: {
|
|
|
2595
2821
|
*
|
|
2596
2822
|
* **Example** (Returning fallback results)
|
|
2597
2823
|
*
|
|
2598
|
-
* ```ts
|
|
2824
|
+
* ```ts import.meta.vitest
|
|
2599
2825
|
* import { Param } from "effect/unstable/cli"
|
|
2600
2826
|
*
|
|
2601
2827
|
* const configSource = Param.file(Param.flagKind, "config").pipe(
|
|
2602
2828
|
* Param.orElseResult(() => Param.string(Param.flagKind, "config-url"))
|
|
2603
2829
|
* )
|
|
2604
2830
|
* // Returns Result<string, string>
|
|
2831
|
+
* configSource.kind // => "flag"
|
|
2605
2832
|
* ```
|
|
2606
2833
|
*
|
|
2607
2834
|
* @category combinators
|
|
2608
2835
|
* @since 4.0.0
|
|
2609
2836
|
*/
|
|
2610
|
-
<Kind extends ParamKind, A, B>(self: Param<Kind, A>, orElse:
|
|
2837
|
+
<Kind extends ParamKind, A, B>(self: Param<Kind, A>, orElse: LazyArg<Param<Kind, B>>): Param<Kind, Result.Result<A, B>>
|
|
2611
2838
|
} = dual(2, <Kind extends ParamKind, A, B>(
|
|
2612
2839
|
self: Param<Kind, A>,
|
|
2613
|
-
orElse:
|
|
2840
|
+
orElse: LazyArg<Param<Kind, B>>
|
|
2614
2841
|
) => {
|
|
2615
2842
|
return transform(
|
|
2616
2843
|
self,
|
|
2617
|
-
(parse: Parse<A
|
|
2844
|
+
(parse: Parse<A>, alternatives): Parse<Result.Result<A, B>> => (args: ParsedArgs) =>
|
|
2618
2845
|
Effect.catch(
|
|
2619
2846
|
Effect.map(parse(args), ([leftover, value]) => [leftover, Result.succeed(value)] as const),
|
|
2620
|
-
(
|
|
2847
|
+
() =>
|
|
2621
2848
|
Effect.map(
|
|
2622
|
-
|
|
2849
|
+
(alternatives[0]!() as Parse<B>)(args),
|
|
2623
2850
|
([leftover, value]) => [leftover, Result.fail(value)] as const
|
|
2624
2851
|
)
|
|
2625
|
-
)
|
|
2852
|
+
),
|
|
2853
|
+
[orElse]
|
|
2626
2854
|
)
|
|
2627
2855
|
})
|
|
2628
2856
|
|
|
@@ -2839,7 +3067,12 @@ const transformSingle = <Kind extends ParamKind, A>(
|
|
|
2839
3067
|
return matchParam(param, {
|
|
2840
3068
|
Single: (single) => f(single),
|
|
2841
3069
|
Map: (mapped) => map(transformSingle(mapped.param, f), mapped.f),
|
|
2842
|
-
Transform: (mapped) =>
|
|
3070
|
+
Transform: (mapped) =>
|
|
3071
|
+
transform(
|
|
3072
|
+
transformSingle(mapped.param, f),
|
|
3073
|
+
mapped.f,
|
|
3074
|
+
mapped.alternatives.map((alternative) => () => transformSingle(alternative(), f))
|
|
3075
|
+
),
|
|
2843
3076
|
Optional: (p) => optional(transformSingle(p.param, f)) as Param<Kind, A>,
|
|
2844
3077
|
Variadic: (p) =>
|
|
2845
3078
|
variadic(transformSingle(p.param, f), {
|
|
@@ -2861,7 +3094,10 @@ export const extractSingleParams = <Kind extends ParamKind, A>(
|
|
|
2861
3094
|
return matchParam(param, {
|
|
2862
3095
|
Single: (single) => [single as Single<Kind, unknown>],
|
|
2863
3096
|
Map: (mapped) => extractSingleParams(mapped.param),
|
|
2864
|
-
Transform: (mapped) =>
|
|
3097
|
+
Transform: (mapped) => [
|
|
3098
|
+
...extractSingleParams(mapped.param),
|
|
3099
|
+
...mapped.alternatives.flatMap((alternative) => extractSingleParams(alternative()))
|
|
3100
|
+
],
|
|
2865
3101
|
Optional: (optional) => extractSingleParams(optional.param),
|
|
2866
3102
|
Variadic: (variadic) => extractSingleParams(variadic.param)
|
|
2867
3103
|
})
|