effect 4.0.0-rc.112 → 4.0.0-rc.113
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/AGENTS.md +24 -9
- package/CLAUDE.md +24 -9
- package/ai-docs/package.json +2 -2
- package/ai-docs/src/01_effect/01_basics/02_effect-fn.ts +18 -5
- package/ai-docs/src/01_effect/01_basics/index.md +5 -3
- package/ai-docs/src/01_effect/03_services/20_layer-composition.ts +1 -1
- package/ai-docs/src/01_effect/03_services/20_layer-unwrap.ts +2 -2
- package/ai-docs/src/01_effect/05_resources/10_acquire-release.ts +2 -2
- package/ai-docs/src/03_stream/30_encoding.ts +5 -7
- package/ai-docs/src/08_observability/10_logging.ts +1 -1
- package/ai-docs/src/70_cli/10_basics.ts +7 -7
- package/ai-docs/src/71_ai/10_language-model.ts +2 -2
- package/ai-docs/src/71_ai/20_tools.ts +1 -1
- package/ai-docs/src/71_ai/30_chat.ts +1 -1
- package/dist/Array.d.ts +86 -50
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +58 -32
- package/dist/Array.js.map +1 -1
- package/dist/BigDecimal.d.ts +5 -1
- package/dist/BigDecimal.d.ts.map +1 -1
- package/dist/BigDecimal.js +40 -23
- package/dist/BigDecimal.js.map +1 -1
- package/dist/ByteSize.d.ts +633 -0
- package/dist/ByteSize.d.ts.map +1 -0
- package/dist/ByteSize.js +524 -0
- package/dist/ByteSize.js.map +1 -0
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +17 -3
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +1 -1
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Channel.d.ts +97 -24
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +66 -39
- package/dist/Channel.js.map +1 -1
- package/dist/Chunk.d.ts +49 -28
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +27 -18
- package/dist/Chunk.js.map +1 -1
- package/dist/Config.d.ts +162 -201
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +103 -212
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +4 -4
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +7 -7
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Context.d.ts +31 -0
- package/dist/Context.d.ts.map +1 -1
- package/dist/Context.js.map +1 -1
- package/dist/Cron.d.ts +2 -2
- package/dist/Cron.d.ts.map +1 -1
- package/dist/Cron.js +2 -2
- package/dist/Cron.js.map +1 -1
- package/dist/Crypto.d.ts +1 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +3 -2
- package/dist/Crypto.js.map +1 -1
- package/dist/DateTime.d.ts +2 -2
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/Deferred.d.ts.map +1 -1
- package/dist/Deferred.js +6 -6
- package/dist/Deferred.js.map +1 -1
- package/dist/Duration.d.ts +1 -1
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +1 -1
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +220 -113
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +27 -26
- package/dist/Effect.js.map +1 -1
- package/dist/Effectable.d.ts +58 -2
- package/dist/Effectable.d.ts.map +1 -1
- package/dist/Effectable.js +58 -6
- package/dist/Effectable.js.map +1 -1
- package/dist/Encoding.d.ts +3 -1
- package/dist/Encoding.d.ts.map +1 -1
- package/dist/Encoding.js +40 -10
- package/dist/Encoding.js.map +1 -1
- package/dist/Equal.d.ts +1 -1
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +1 -1
- package/dist/Equal.js.map +1 -1
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +1 -0
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Fiber.d.ts +32 -8
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.js +3 -3
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +12 -6
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +11 -6
- package/dist/FiberMap.js.map +1 -1
- package/dist/FileSystem.d.ts +42 -210
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +16 -148
- package/dist/FileSystem.js.map +1 -1
- package/dist/Formatter.d.ts +1 -0
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +19 -3
- package/dist/Formatter.js.map +1 -1
- package/dist/Graph.d.ts +48 -20
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +20 -5
- package/dist/Graph.js.map +1 -1
- package/dist/Hash.d.ts +1 -1
- package/dist/Hash.d.ts.map +1 -1
- package/dist/Hash.js +5 -14
- package/dist/Hash.js.map +1 -1
- package/dist/HashMap.d.ts +1 -1
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashRing.d.ts +6 -1
- package/dist/HashRing.d.ts.map +1 -1
- package/dist/HashRing.js +9 -2
- package/dist/HashRing.js.map +1 -1
- package/dist/HashSet.d.ts +1 -1
- package/dist/HashSet.d.ts.map +1 -1
- package/dist/HashSet.js.map +1 -1
- package/dist/Iterable.d.ts +33 -15
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +58 -45
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonPatch.js +4 -4
- package/dist/JsonPatch.js.map +1 -1
- package/dist/JsonPointer.d.ts +68 -4
- package/dist/JsonPointer.d.ts.map +1 -1
- package/dist/JsonPointer.js +90 -4
- package/dist/JsonPointer.js.map +1 -1
- package/dist/JsonSchema.js +8 -22
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Layer.d.ts +47 -4
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +4 -6
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +1 -3
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +7 -5
- package/dist/LayerMap.js.map +1 -1
- package/dist/LayerRef.d.ts.map +1 -1
- package/dist/LayerRef.js +7 -5
- package/dist/LayerRef.js.map +1 -1
- package/dist/Logger.d.ts +114 -9
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +109 -9
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.js +1 -1
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Match.d.ts +43 -31
- package/dist/Match.d.ts.map +1 -1
- package/dist/Match.js +5 -2
- package/dist/Match.js.map +1 -1
- package/dist/Metric.d.ts +11 -4
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +14 -18
- package/dist/Metric.js.map +1 -1
- package/dist/MutableHashMap.d.ts +1 -1
- package/dist/MutableHashMap.d.ts.map +1 -1
- package/dist/MutableHashMap.js +1 -1
- package/dist/MutableHashMap.js.map +1 -1
- package/dist/MutableHashSet.d.ts +1 -1
- package/dist/MutableHashSet.d.ts.map +1 -1
- package/dist/MutableHashSet.js +1 -1
- package/dist/MutableHashSet.js.map +1 -1
- package/dist/MutableList.d.ts +13 -2
- package/dist/MutableList.d.ts.map +1 -1
- package/dist/MutableList.js +18 -2
- package/dist/MutableList.js.map +1 -1
- package/dist/Number.d.ts +6 -0
- package/dist/Number.d.ts.map +1 -1
- package/dist/Number.js +3 -1
- package/dist/Number.js.map +1 -1
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +5 -4
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +1 -1
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +1 -1
- package/dist/Option.js.map +1 -1
- package/dist/Order.d.ts +1 -0
- package/dist/Order.d.ts.map +1 -1
- package/dist/Order.js +3 -1
- package/dist/Order.js.map +1 -1
- package/dist/PartitionedSemaphore.d.ts.map +1 -1
- package/dist/PartitionedSemaphore.js +1 -2
- package/dist/PartitionedSemaphore.js.map +1 -1
- package/dist/Path.d.ts +1 -1
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +1 -1
- package/dist/Path.js.map +1 -1
- package/dist/PlatformError.d.ts +1 -1
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +1 -1
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +38 -1
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +81 -5
- package/dist/Pool.js.map +1 -1
- package/dist/PrimaryKey.d.ts +1 -1
- package/dist/PrimaryKey.d.ts.map +1 -1
- package/dist/PrimaryKey.js +1 -1
- package/dist/PrimaryKey.js.map +1 -1
- package/dist/PubSub.d.ts +21 -9
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +18 -14
- package/dist/PubSub.js.map +1 -1
- package/dist/Queue.d.ts +82 -6
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +116 -27
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +17 -4
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +1 -1
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +15 -9
- package/dist/RcMap.js.map +1 -1
- package/dist/Redacted.d.ts +1 -1
- package/dist/Redacted.d.ts.map +1 -1
- package/dist/Redacted.js +1 -1
- package/dist/Redacted.js.map +1 -1
- package/dist/RequestResolver.d.ts +15 -9
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +33 -15
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Result.d.ts +1 -1
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +1 -1
- package/dist/Result.js.map +1 -1
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +19 -10
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +2155 -2415
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +2755 -4174
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts +354 -183
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +277 -601
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +46 -22
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +56 -53
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaIssue.d.ts +122 -188
- package/dist/SchemaIssue.d.ts.map +1 -1
- package/dist/SchemaIssue.js +48 -263
- package/dist/SchemaIssue.js.map +1 -1
- package/dist/SchemaParser.js +2 -9
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +1099 -16
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +1341 -20
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +49 -16
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +75 -98
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +10 -3
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Sink.d.ts +9 -4
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +49 -31
- package/dist/Sink.js.map +1 -1
- package/dist/Stream.d.ts +221 -35
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +168 -84
- package/dist/Stream.js.map +1 -1
- package/dist/String.d.ts +16 -6
- package/dist/String.d.ts.map +1 -1
- package/dist/String.js +12 -5
- package/dist/String.js.map +1 -1
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +7 -4
- package/dist/Struct.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +3 -2
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Terminal.d.ts +3 -3
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +3 -3
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +27 -7
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +38 -13
- package/dist/Tracer.js.map +1 -1
- package/dist/Trie.d.ts +1 -1
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Tuple.d.ts +2 -1
- package/dist/Tuple.d.ts.map +1 -1
- package/dist/Tuple.js.map +1 -1
- package/dist/TxChunk.d.ts +1 -1
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +1 -1
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +1 -1
- package/dist/TxDeferred.d.ts.map +1 -1
- package/dist/TxDeferred.js +1 -1
- package/dist/TxDeferred.js.map +1 -1
- package/dist/TxHashMap.d.ts +1 -1
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +1 -1
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +1 -1
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +1 -1
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +1 -1
- package/dist/TxPriorityQueue.d.ts.map +1 -1
- package/dist/TxPriorityQueue.js +1 -1
- package/dist/TxPriorityQueue.js.map +1 -1
- package/dist/TxPubSub.d.ts +1 -1
- package/dist/TxPubSub.d.ts.map +1 -1
- package/dist/TxPubSub.js +1 -1
- package/dist/TxPubSub.js.map +1 -1
- package/dist/TxQueue.d.ts +9 -9
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +93 -86
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +29 -1
- package/dist/TxReentrantLock.d.ts.map +1 -1
- package/dist/TxReentrantLock.js +29 -1
- package/dist/TxReentrantLock.js.map +1 -1
- package/dist/TxRef.d.ts +1 -1
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +1 -1
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +1 -1
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +1 -1
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +1 -1
- package/dist/TxSubscriptionRef.d.ts.map +1 -1
- package/dist/TxSubscriptionRef.js +1 -1
- package/dist/TxSubscriptionRef.js.map +1 -1
- package/dist/Types.d.ts +33 -19
- package/dist/Types.d.ts.map +1 -1
- package/dist/Utils.d.ts.map +1 -1
- package/dist/Utils.js +2 -1
- package/dist/Utils.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/arbitrary/model.d.ts +2 -0
- package/dist/internal/arbitrary/model.d.ts.map +1 -0
- package/dist/internal/arbitrary/model.js +495 -0
- package/dist/internal/arbitrary/model.js.map +1 -0
- package/dist/internal/arbitrary/regexp.d.ts +2 -0
- package/dist/internal/arbitrary/regexp.d.ts.map +1 -0
- package/dist/internal/arbitrary/regexp.js +789 -0
- package/dist/internal/arbitrary/regexp.js.map +1 -0
- package/dist/internal/arbitrary/runner.d.ts +2 -0
- package/dist/internal/arbitrary/runner.d.ts.map +1 -0
- package/dist/internal/arbitrary/runner.js +496 -0
- package/dist/internal/arbitrary/runner.js.map +1 -0
- package/dist/internal/arbitrary/schema.d.ts.map +1 -0
- package/dist/internal/arbitrary/schema.js +1340 -0
- package/dist/internal/arbitrary/schema.js.map +1 -0
- package/dist/internal/core.js +27 -13
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/count.d.ts +2 -0
- package/dist/internal/count.d.ts.map +1 -0
- package/dist/internal/count.js +14 -0
- package/dist/internal/count.js.map +1 -0
- package/dist/internal/dateTime.js +4 -10
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/effect.js +386 -251
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/graph.js +3 -1
- package/dist/internal/graph.js.map +1 -1
- package/dist/internal/hashMap.js +5 -3
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/hashSet.js +1 -1
- package/dist/internal/hashSet.js.map +1 -1
- package/dist/internal/matcher.js +1 -1
- package/dist/internal/matcher.js.map +1 -1
- package/dist/internal/metric.js +1 -1
- package/dist/internal/metric.js.map +1 -1
- package/dist/internal/option.js +6 -5
- package/dist/internal/option.js.map +1 -1
- package/dist/internal/random.js +17 -0
- package/dist/internal/random.js.map +1 -1
- package/dist/internal/rcRef.js +10 -7
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/references.js +1 -0
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/request.js +13 -6
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/result.js +11 -9
- package/dist/internal/result.js.map +1 -1
- package/dist/internal/schema/annotations.js +1 -1
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/fromJsonSchemaDocument.js +14 -12
- package/dist/internal/schema/fromJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/fromRepresentation.js +5 -5
- package/dist/internal/schema/fromRepresentation.js.map +1 -1
- package/dist/internal/schema/make.d.ts +2 -0
- package/dist/internal/schema/make.d.ts.map +1 -0
- package/dist/internal/schema/{schema.js → make.js} +1 -25
- package/dist/internal/schema/make.js.map +1 -0
- package/dist/internal/schema/parser.d.ts +0 -12
- package/dist/internal/schema/parser.d.ts.map +1 -1
- package/dist/internal/schema/parser.js +7 -0
- package/dist/internal/schema/parser.js.map +1 -1
- package/dist/internal/schema/standardSchema.d.ts +2 -0
- package/dist/internal/schema/standardSchema.d.ts.map +1 -0
- package/dist/internal/schema/standardSchema.js +112 -0
- package/dist/internal/schema/standardSchema.js.map +1 -0
- package/dist/internal/schema/toCodeDocument.js +34 -22
- package/dist/internal/schema/toCodeDocument.js.map +1 -1
- package/dist/internal/schema/toCodec.d.ts +2 -0
- package/dist/internal/schema/toCodec.d.ts.map +1 -0
- package/dist/internal/schema/toCodec.js +242 -0
- package/dist/internal/schema/toCodec.js.map +1 -0
- package/dist/internal/schema/toDifferJsonPatch.d.ts +2 -0
- package/dist/internal/schema/toDifferJsonPatch.d.ts.map +1 -0
- package/dist/internal/schema/toDifferJsonPatch.js +20 -0
- package/dist/internal/schema/toDifferJsonPatch.js.map +1 -0
- package/dist/internal/schema/toEncoderXml.d.ts +2 -0
- package/dist/internal/schema/toEncoderXml.d.ts.map +1 -0
- package/dist/internal/schema/toEncoderXml.js +104 -0
- package/dist/internal/schema/toEncoderXml.js.map +1 -0
- package/dist/internal/schema/toEquivalence.js +66 -0
- package/dist/internal/schema/toEquivalence.js.map +1 -1
- package/dist/internal/schema/toFormatter.d.ts +2 -0
- package/dist/internal/schema/toFormatter.d.ts.map +1 -0
- package/dist/internal/schema/toFormatter.js +227 -0
- package/dist/internal/schema/toFormatter.js.map +1 -0
- package/dist/internal/schema/toIso.d.ts +2 -0
- package/dist/internal/schema/toIso.d.ts.map +1 -0
- package/dist/internal/schema/toIso.js +17 -0
- package/dist/internal/schema/toIso.js.map +1 -0
- package/dist/internal/schema/toJsonSchemaDocument.js +122 -71
- package/dist/internal/schema/toJsonSchemaDocument.js.map +1 -1
- package/dist/internal/schema/toRepresentation.js +3 -1
- package/dist/internal/schema/toRepresentation.js.map +1 -1
- package/dist/internal/schemaError.d.ts +4 -0
- package/dist/internal/schemaError.d.ts.map +1 -0
- package/dist/internal/schemaError.js +6 -0
- package/dist/internal/schemaError.js.map +1 -0
- package/dist/internal/stream.js +5 -6
- package/dist/internal/stream.js.map +1 -1
- package/dist/internal/tracer.d.ts +1 -3
- package/dist/internal/tracer.d.ts.map +1 -1
- package/dist/internal/tracer.js +6 -0
- package/dist/internal/tracer.js.map +1 -1
- package/dist/internal/trie.js +2 -2
- package/dist/internal/trie.js.map +1 -1
- package/dist/internal/uuid.d.ts +1 -2
- package/dist/internal/uuid.d.ts.map +1 -1
- package/dist/internal/uuid.js +2 -0
- package/dist/internal/uuid.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +9 -11
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js +20 -18
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/testing/index.d.ts +0 -4
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +0 -4
- package/dist/testing/index.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +74 -23
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +59 -5
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +2 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +27 -32
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +10 -13
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +23 -16
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +13 -11
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +48 -37
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +150 -47
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +2 -2
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +21 -12
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js +2 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +1 -1
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Prompt.js +15 -4
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +37 -94
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +46 -96
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +4 -5
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +38 -20
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +27 -1
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +1 -1
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +30 -18
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/internal/structured-output.js +8 -5
- package/dist/unstable/ai/internal/structured-output.js.map +1 -1
- package/dist/unstable/arbitrary/Arbitrary.d.ts +626 -0
- package/dist/unstable/arbitrary/Arbitrary.d.ts.map +1 -0
- package/dist/unstable/arbitrary/Arbitrary.js +238 -0
- package/dist/unstable/arbitrary/Arbitrary.js.map +1 -0
- package/dist/unstable/arbitrary/index.d.ts +8 -0
- package/dist/unstable/arbitrary/index.d.ts.map +1 -0
- package/dist/unstable/arbitrary/index.js +9 -0
- package/dist/unstable/arbitrary/index.js.map +1 -0
- package/dist/unstable/cli/Argument.d.ts +104 -108
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js +56 -57
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +2 -0
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +2 -0
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.js +26 -3
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +73 -73
- package/dist/unstable/cli/Command.js +18 -18
- package/dist/unstable/cli/Completions.d.ts +4 -4
- package/dist/unstable/cli/Completions.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +150 -161
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js +79 -90
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +3 -3
- package/dist/unstable/cli/GlobalFlag.js +13 -13
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/Param.d.ts +118 -126
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +104 -113
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Primitive.d.ts +69 -58
- package/dist/unstable/cli/Primitive.d.ts.map +1 -1
- package/dist/unstable/cli/Primitive.js +65 -66
- package/dist/unstable/cli/Primitive.js.map +1 -1
- package/dist/unstable/cli/Prompt.d.ts +23 -24
- package/dist/unstable/cli/Prompt.d.ts.map +1 -1
- package/dist/unstable/cli/Prompt.js +68 -63
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/completions/descriptor.js +23 -11
- package/dist/unstable/cli/internal/completions/descriptor.js.map +1 -1
- package/dist/unstable/cli/internal/completions/zsh.js +2 -2
- package/dist/unstable/cli/internal/completions/zsh.js.map +1 -1
- package/dist/unstable/cli/internal/config.js +4 -4
- package/dist/unstable/cli/internal/parser.js +1 -1
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cli/internal/wizard.d.ts.map +1 -1
- package/dist/unstable/cli/internal/wizard.js +14 -13
- package/dist/unstable/cli/internal/wizard.js.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.d.ts +13 -0
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +16 -1
- 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 +57 -14
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +2 -0
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts +2 -2
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +4 -4
- package/dist/unstable/cluster/Envelope.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.js +2 -3
- package/dist/unstable/cluster/Envelope.js.map +1 -1
- package/dist/unstable/cluster/HttpRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/HttpRunner.js +5 -2
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +34 -4
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +28 -9
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +1 -1
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +32 -17
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +23 -23
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/SocketRunner.d.ts +2 -2
- package/dist/unstable/cluster/SocketRunner.d.ts.map +1 -1
- package/dist/unstable/cluster/SocketRunner.js +4 -3
- package/dist/unstable/cluster/SocketRunner.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +11 -8
- 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 +11 -4
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/internal/clusterAbandon.d.ts +5 -0
- package/dist/unstable/cluster/internal/clusterAbandon.d.ts.map +1 -0
- package/dist/unstable/cluster/internal/clusterAbandon.js +9 -0
- package/dist/unstable/cluster/internal/clusterAbandon.js.map +1 -0
- package/dist/unstable/cluster/internal/entityManager.js +7 -4
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/interruptors.js +30 -1
- package/dist/unstable/cluster/internal/interruptors.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +12 -7
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +12 -7
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/encoding/Ini.d.ts +2 -0
- package/dist/unstable/encoding/Ini.d.ts.map +1 -1
- package/dist/unstable/encoding/Ini.js +2 -0
- package/dist/unstable/encoding/Ini.js.map +1 -1
- package/dist/unstable/encoding/SchemaBinary.d.ts +27 -3
- package/dist/unstable/encoding/SchemaBinary.d.ts.map +1 -1
- package/dist/unstable/encoding/SchemaBinary.js +108 -39
- package/dist/unstable/encoding/SchemaBinary.js.map +1 -1
- package/dist/unstable/encoding/Sse.js +1 -1
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/encoding/Toml.d.ts +2 -0
- package/dist/unstable/encoding/Toml.d.ts.map +1 -1
- package/dist/unstable/encoding/Toml.js +6 -4
- package/dist/unstable/encoding/Toml.js.map +1 -1
- package/dist/unstable/encoding/Yaml.d.ts +2 -0
- package/dist/unstable/encoding/Yaml.d.ts.map +1 -1
- package/dist/unstable/encoding/Yaml.js +16 -5
- package/dist/unstable/encoding/Yaml.js.map +1 -1
- package/dist/unstable/encoding/index.d.ts +0 -4
- package/dist/unstable/encoding/index.d.ts.map +1 -1
- package/dist/unstable/encoding/index.js +0 -4
- package/dist/unstable/encoding/index.js.map +1 -1
- package/dist/unstable/eventlog/Event.d.ts +5 -5
- package/dist/unstable/eventlog/Event.d.ts.map +1 -1
- package/dist/unstable/eventlog/Event.js +3 -3
- package/dist/unstable/eventlog/Event.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +7 -7
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +9 -9
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +4 -4
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.d.ts +11 -5
- package/dist/unstable/eventlog/EventLogMessage.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogMessage.js +25 -15
- package/dist/unstable/eventlog/EventLogMessage.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +7 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +13 -3
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js +2 -2
- package/dist/unstable/eventlog/EventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventJournal.js +26 -13
- package/dist/unstable/eventlog/SqlEventJournal.js.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.d.ts.map +1 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js +5 -1
- package/dist/unstable/eventlog/SqlEventLogServerUnencrypted.js.map +1 -1
- package/dist/unstable/http/Cookies.d.ts +1 -45
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +2 -64
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +1 -1
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/FindMyWay/internal/router.js +124 -33
- package/dist/unstable/http/FindMyWay/internal/router.js.map +1 -1
- package/dist/unstable/http/FindMyWay.d.ts +15 -5
- package/dist/unstable/http/FindMyWay.d.ts.map +1 -1
- package/dist/unstable/http/FindMyWay.js +3 -1
- package/dist/unstable/http/FindMyWay.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +0 -22
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +3 -34
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +41 -10
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +64 -10
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +1 -1
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +28 -18
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +28 -6
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +8 -19
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpClientResponse.d.ts +6 -1
- package/dist/unstable/http/HttpClientResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientResponse.js +10 -6
- package/dist/unstable/http/HttpClientResponse.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +16 -0
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +121 -65
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +3 -3
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +1 -13
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +29 -21
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +12 -11
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +36 -10
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +5 -1
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +22 -8
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +11 -42
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +16 -20
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +11 -11
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +1 -1
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +9 -13
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +34 -44
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/HttpStaticServer.d.ts +2 -2
- package/dist/unstable/http/HttpStaticServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpStaticServer.js +19 -19
- package/dist/unstable/http/HttpStaticServer.js.map +1 -1
- package/dist/unstable/http/Mime.d.ts +28 -0
- package/dist/unstable/http/Mime.d.ts.map +1 -0
- package/dist/unstable/http/Mime.js +72 -0
- package/dist/unstable/http/Mime.js.map +1 -0
- package/dist/unstable/http/Multipart.d.ts +22 -9
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +26 -10
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts +1 -1
- package/dist/unstable/http/MultipartParser/internal/multipart.d.ts.map +1 -1
- package/dist/unstable/http/MultipartParser/internal/multipart.js +8 -3
- package/dist/unstable/http/MultipartParser/internal/multipart.js.map +1 -1
- package/dist/unstable/http/MultipartParser.d.ts +4 -3
- package/dist/unstable/http/MultipartParser.d.ts.map +1 -1
- package/dist/unstable/http/MultipartParser.js.map +1 -1
- package/dist/unstable/http/UrlParams.d.ts +0 -97
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +3 -104
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/index.d.ts +4 -0
- package/dist/unstable/http/index.d.ts.map +1 -1
- package/dist/unstable/http/index.js +4 -0
- package/dist/unstable/http/index.js.map +1 -1
- package/dist/unstable/http/internal/compression.js +8 -11
- package/dist/unstable/http/internal/compression.js.map +1 -1
- package/dist/unstable/http/internal/headers.d.ts +2 -0
- package/dist/unstable/http/internal/headers.d.ts.map +1 -0
- package/dist/unstable/http/internal/headers.js +5 -0
- package/dist/unstable/http/internal/headers.js.map +1 -0
- package/dist/unstable/http/internal/httpBody.js +8 -0
- package/dist/unstable/http/internal/httpBody.js.map +1 -1
- package/dist/unstable/http/internal/mimeTypes.d.ts +361 -0
- package/dist/unstable/http/internal/mimeTypes.d.ts.map +1 -0
- package/dist/unstable/http/internal/mimeTypes.js +363 -0
- package/dist/unstable/http/internal/mimeTypes.js.map +1 -0
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +13 -0
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +23 -6
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +4 -3
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +25 -13
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +8 -3
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +9 -6
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +3 -1
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +7 -5
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.d.ts +12 -0
- package/dist/unstable/httpapi/HttpApiSchema.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSchema.js +8 -10
- package/dist/unstable/httpapi/HttpApiSchema.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiTest.js +8 -2
- package/dist/unstable/httpapi/HttpApiTest.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +31 -20
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/net/IpInterface.d.ts +140 -0
- package/dist/unstable/net/IpInterface.d.ts.map +1 -0
- package/dist/unstable/net/IpInterface.js +149 -0
- package/dist/unstable/net/IpInterface.js.map +1 -0
- package/dist/unstable/net/IpNetwork.d.ts +227 -0
- package/dist/unstable/net/IpNetwork.d.ts.map +1 -0
- package/dist/unstable/net/IpNetwork.js +239 -0
- package/dist/unstable/net/IpNetwork.js.map +1 -0
- package/dist/unstable/net/NetAddress.d.ts +705 -0
- package/dist/unstable/net/NetAddress.d.ts.map +1 -0
- package/dist/unstable/net/NetAddress.js +956 -0
- package/dist/unstable/net/NetAddress.js.map +1 -0
- package/dist/unstable/net/index.d.ts +16 -0
- package/dist/unstable/net/index.d.ts.map +1 -0
- package/dist/unstable/net/index.js +17 -0
- package/dist/unstable/net/index.js.map +1 -0
- package/dist/unstable/observability/OtlpExporter.d.ts +1 -0
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +4 -6
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +9 -9
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +9 -8
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpResource.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpResource.js +2 -2
- package/dist/unstable/observability/OtlpResource.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js +82 -55
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/internal/otlpEnv.d.ts +1 -1
- package/dist/unstable/observability/internal/otlpEnv.d.ts.map +1 -1
- package/dist/unstable/observability/internal/otlpEnv.js +5 -9
- package/dist/unstable/observability/internal/otlpEnv.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +1 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +114 -14
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +799 -234
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +28 -15
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +33 -41
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +8 -2
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +7 -2
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +1 -1
- 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/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +6 -3
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +3 -6
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +6 -3
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +2 -3
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +2 -2
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +1 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +6 -4
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -1
- package/dist/unstable/reactivity/Hydration.js +20 -6
- package/dist/unstable/reactivity/Hydration.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +26 -26
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +10 -12
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +64 -64
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +1 -1
- package/dist/unstable/rpc/RpcMessage.d.ts +3 -1
- package/dist/unstable/rpc/RpcMessage.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMessage.js +1 -1
- package/dist/unstable/rpc/RpcMessage.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +7 -5
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +5 -39
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +22 -115
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +104 -57
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/Model.js +7 -6
- package/dist/unstable/schema/Model.js.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +3 -0
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +287 -102
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +408 -215
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +5 -32
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +3 -3
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +20 -0
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +14 -7
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +15 -0
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +1 -1
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +13 -5
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +29 -15
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Transferable.js +1 -1
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +3 -1
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +7 -0
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +14 -4
- package/dist/unstable/workflow/Activity.js.map +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 +2 -2
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/DurableQueue.d.ts +8 -0
- package/dist/unstable/workflow/DurableQueue.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableQueue.js +8 -0
- package/dist/unstable/workflow/DurableQueue.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +5 -0
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +70 -12
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +6 -0
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +11 -0
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +7 -9
- package/src/Array.ts +118 -67
- package/src/BigDecimal.ts +50 -28
- package/src/ByteSize.ts +838 -0
- package/src/Cache.ts +17 -3
- package/src/Cause.ts +1 -1
- package/src/Channel.ts +183 -48
- package/src/Chunk.ts +65 -36
- package/src/Config.ts +237 -248
- package/src/ConfigProvider.ts +7 -8
- package/src/Context.ts +31 -0
- package/src/Cron.ts +2 -2
- package/src/Crypto.ts +3 -2
- package/src/Deferred.ts +7 -6
- package/src/Duration.ts +1 -1
- package/src/Effect.ts +226 -122
- package/src/Effectable.ts +78 -9
- package/src/Encoding.ts +101 -11
- package/src/Equal.ts +1 -1
- package/src/ExecutionPlan.ts +3 -0
- package/src/Fiber.ts +33 -8
- package/src/FiberHandle.ts +3 -3
- package/src/FiberMap.ts +19 -10
- package/src/FileSystem.ts +55 -230
- package/src/Formatter.ts +21 -3
- package/src/Graph.ts +55 -25
- package/src/Hash.ts +5 -16
- package/src/HashRing.ts +9 -2
- package/src/HashSet.ts +56 -0
- package/src/Iterable.ts +66 -41
- package/src/JsonPatch.ts +4 -4
- package/src/JsonPointer.ts +97 -4
- package/src/JsonSchema.ts +8 -26
- package/src/Layer.ts +59 -18
- package/src/LayerMap.ts +8 -6
- package/src/LayerRef.ts +7 -5
- package/src/Logger.ts +125 -18
- package/src/ManagedRuntime.ts +1 -1
- package/src/Match.ts +33 -14
- package/src/Metric.ts +24 -21
- package/src/MutableHashMap.ts +1 -1
- package/src/MutableHashSet.ts +1 -1
- package/src/MutableList.ts +18 -2
- package/src/Number.ts +7 -1
- package/src/Optic.ts +8 -4
- package/src/Option.ts +1 -1
- package/src/Order.ts +3 -1
- package/src/PartitionedSemaphore.ts +1 -2
- package/src/Path.ts +1 -1
- package/src/PlatformError.ts +1 -1
- package/src/Pool.ts +125 -8
- package/src/PrimaryKey.ts +1 -1
- package/src/PubSub.ts +32 -20
- package/src/Queue.ts +119 -28
- package/src/Random.ts +20 -6
- package/src/RcMap.ts +20 -13
- package/src/Redacted.ts +1 -1
- package/src/RequestResolver.ts +49 -26
- package/src/Result.ts +1 -1
- package/src/Scheduler.ts +21 -11
- package/src/Schema.ts +4809 -6368
- package/src/SchemaAST.ts +1031 -284
- package/src/SchemaGetter.ts +75 -21
- package/src/SchemaIssue.ts +259 -15
- package/src/SchemaParser.ts +2 -12
- package/src/SchemaRepresentation.ts +1593 -29
- package/src/SchemaTransformation.ts +145 -22
- package/src/ScopedCache.ts +10 -3
- package/src/Sink.ts +31 -15
- package/src/Stream.ts +294 -76
- package/src/String.ts +20 -9
- package/src/Struct.ts +8 -4
- package/src/SynchronizedRef.ts +3 -5
- package/src/Terminal.ts +3 -3
- package/src/Tracer.ts +43 -14
- package/src/Tuple.ts +3 -1
- package/src/TxChunk.ts +1 -1
- package/src/TxDeferred.ts +1 -1
- package/src/TxHashMap.ts +1 -1
- package/src/TxHashSet.ts +92 -11
- package/src/TxPriorityQueue.ts +1 -1
- package/src/TxPubSub.ts +1 -1
- package/src/TxQueue.ts +22 -17
- package/src/TxReentrantLock.ts +29 -1
- package/src/TxRef.ts +1 -1
- package/src/TxSemaphore.ts +1 -1
- package/src/TxSubscriptionRef.ts +1 -1
- package/src/Types.ts +40 -17
- package/src/Utils.ts +3 -1
- package/src/index.ts +5 -0
- package/src/internal/arbitrary/model.ts +701 -0
- package/src/internal/arbitrary/regexp.ts +855 -0
- package/src/internal/arbitrary/runner.ts +608 -0
- package/src/internal/arbitrary/schema.ts +1800 -0
- package/src/internal/core.ts +48 -22
- package/src/internal/count.ts +14 -0
- package/src/internal/dateTime.ts +8 -10
- package/src/internal/effect.ts +475 -295
- package/src/internal/graph.ts +6 -1
- package/src/internal/hashMap.ts +5 -3
- package/src/internal/hashSet.ts +1 -1
- package/src/internal/matcher.ts +34 -19
- package/src/internal/metric.ts +1 -1
- package/src/internal/option.ts +8 -6
- package/src/internal/random.ts +20 -7
- package/src/internal/rcRef.ts +10 -7
- package/src/internal/references.ts +1 -0
- package/src/internal/request.ts +12 -7
- package/src/internal/result.ts +15 -11
- package/src/internal/schema/annotations.ts +3 -3
- package/src/internal/schema/fromJsonSchemaDocument.ts +14 -29
- package/src/internal/schema/fromRepresentation.ts +5 -3
- package/src/internal/schema/{schema.ts → make.ts} +0 -40
- package/src/internal/schema/parser.ts +8 -0
- package/src/internal/schema/standardSchema.ts +125 -0
- package/src/internal/schema/toCodeDocument.ts +58 -44
- package/src/internal/schema/toCodec.ts +312 -0
- package/src/internal/schema/toDifferJsonPatch.ts +24 -0
- package/src/internal/schema/toEncoderXml.ts +110 -0
- package/src/internal/schema/toEquivalence.ts +76 -0
- package/src/internal/schema/toFormatter.ts +230 -0
- package/src/internal/schema/toIso.ts +20 -0
- package/src/internal/schema/toJsonSchemaDocument.ts +125 -67
- package/src/internal/schema/toRepresentation.ts +1 -1
- package/src/internal/schemaError.ts +8 -0
- package/src/internal/stream.ts +14 -6
- package/src/internal/tracer.ts +4 -0
- package/src/internal/trie.ts +5 -2
- package/src/internal/uuid.ts +4 -0
- package/src/testing/TestSchema.ts +36 -30
- package/src/testing/index.ts +0 -5
- package/src/unstable/ai/AiError.ts +69 -5
- package/src/unstable/ai/AnthropicStructuredOutput.ts +4 -1
- package/src/unstable/ai/Chat.ts +35 -36
- package/src/unstable/ai/EmbeddingModel.ts +27 -15
- package/src/unstable/ai/LanguageModel.ts +283 -100
- package/src/unstable/ai/McpServer.ts +36 -20
- package/src/unstable/ai/OpenAiStructuredOutput.ts +4 -1
- package/src/unstable/ai/Prompt.ts +19 -4
- package/src/unstable/ai/Response.ts +107 -189
- package/src/unstable/ai/Tokenizer.ts +4 -5
- package/src/unstable/ai/Tool.ts +58 -35
- package/src/unstable/ai/Toolkit.ts +43 -37
- package/src/unstable/ai/internal/structured-output.ts +5 -5
- package/src/unstable/arbitrary/Arbitrary.ts +715 -0
- package/src/unstable/arbitrary/index.ts +10 -0
- package/src/unstable/cli/Argument.ts +111 -115
- package/src/unstable/cli/CliError.ts +2 -0
- package/src/unstable/cli/CliOutput.ts +40 -3
- package/src/unstable/cli/Command.ts +74 -74
- package/src/unstable/cli/Completions.ts +4 -4
- package/src/unstable/cli/Flag.ts +158 -169
- package/src/unstable/cli/GlobalFlag.ts +13 -13
- package/src/unstable/cli/Param.ts +150 -159
- package/src/unstable/cli/Primitive.ts +75 -76
- package/src/unstable/cli/Prompt.ts +88 -87
- package/src/unstable/cli/internal/completions/descriptor.ts +23 -11
- package/src/unstable/cli/internal/completions/zsh.ts +2 -2
- package/src/unstable/cli/internal/config.ts +4 -4
- package/src/unstable/cli/internal/parser.ts +1 -1
- package/src/unstable/cli/internal/wizard.ts +18 -13
- package/src/unstable/cluster/ClusterSchema.ts +19 -1
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +66 -16
- package/src/unstable/cluster/Entity.ts +3 -0
- package/src/unstable/cluster/EntityProxyServer.ts +6 -2
- package/src/unstable/cluster/Envelope.ts +3 -3
- package/src/unstable/cluster/HttpRunner.ts +7 -2
- package/src/unstable/cluster/MessageStorage.ts +62 -21
- package/src/unstable/cluster/Reply.ts +2 -2
- package/src/unstable/cluster/Sharding.ts +44 -19
- package/src/unstable/cluster/ShardingConfig.ts +23 -23
- package/src/unstable/cluster/SocketRunner.ts +5 -4
- package/src/unstable/cluster/SqlMessageStorage.ts +12 -8
- package/src/unstable/cluster/SqlRunnerStorage.ts +18 -10
- package/src/unstable/cluster/internal/clusterAbandon.ts +14 -0
- package/src/unstable/cluster/internal/entityManager.ts +12 -4
- package/src/unstable/cluster/internal/interruptors.ts +58 -1
- package/src/unstable/cluster/internal/resourceRef.ts +15 -7
- package/src/unstable/devtools/DevToolsClient.ts +13 -3
- package/src/unstable/encoding/Ini.ts +2 -0
- package/src/unstable/encoding/SchemaBinary.ts +150 -44
- package/src/unstable/encoding/Sse.ts +1 -1
- package/src/unstable/encoding/Toml.ts +7 -5
- package/src/unstable/encoding/Yaml.ts +18 -5
- package/src/unstable/encoding/index.ts +0 -5
- package/src/unstable/eventlog/Event.ts +7 -7
- package/src/unstable/eventlog/EventJournal.ts +9 -9
- package/src/unstable/eventlog/EventLog.ts +5 -5
- package/src/unstable/eventlog/EventLogMessage.ts +25 -15
- package/src/unstable/eventlog/EventLogRemote.ts +15 -4
- package/src/unstable/eventlog/EventLogServerUnencrypted.ts +2 -2
- package/src/unstable/eventlog/SqlEventJournal.ts +32 -9
- package/src/unstable/eventlog/SqlEventLogServerUnencrypted.ts +11 -1
- package/src/unstable/http/Cookies.ts +2 -102
- package/src/unstable/http/FetchHttpClient.ts +1 -1
- package/src/unstable/http/FindMyWay/internal/router.ts +139 -33
- package/src/unstable/http/FindMyWay.ts +15 -5
- package/src/unstable/http/Headers.ts +3 -48
- package/src/unstable/http/HttpBody.ts +107 -36
- package/src/unstable/http/HttpClient.ts +41 -30
- package/src/unstable/http/HttpClientRequest.ts +32 -18
- package/src/unstable/http/HttpClientResponse.ts +16 -3
- package/src/unstable/http/HttpEffect.ts +145 -73
- package/src/unstable/http/HttpIncomingMessage.ts +4 -4
- package/src/unstable/http/HttpMiddleware.ts +43 -24
- package/src/unstable/http/HttpPlatform.ts +62 -20
- package/src/unstable/http/HttpRouter.ts +27 -16
- package/src/unstable/http/HttpServer.ts +18 -57
- package/src/unstable/http/HttpServerRequest.ts +17 -15
- package/src/unstable/http/HttpServerRespondable.ts +1 -1
- package/src/unstable/http/HttpServerResponse.ts +49 -40
- package/src/unstable/http/HttpStaticServer.ts +30 -28
- package/src/unstable/http/Mime.ts +76 -0
- package/src/unstable/http/Multipart.ts +35 -18
- package/src/unstable/http/MultipartParser/internal/multipart.ts +10 -3
- package/src/unstable/http/MultipartParser.ts +4 -3
- package/src/unstable/http/UrlParams.ts +3 -161
- package/src/unstable/http/index.ts +5 -0
- package/src/unstable/http/internal/compression.ts +11 -12
- package/src/unstable/http/internal/headers.ts +7 -0
- package/src/unstable/http/internal/httpBody.ts +9 -0
- package/src/unstable/http/internal/mimeTypes.ts +395 -0
- package/src/unstable/httpapi/HttpApiBuilder.ts +52 -6
- package/src/unstable/httpapi/HttpApiClient.ts +44 -24
- package/src/unstable/httpapi/HttpApiEndpoint.ts +24 -11
- package/src/unstable/httpapi/HttpApiError.ts +3 -1
- package/src/unstable/httpapi/HttpApiMiddleware.ts +7 -5
- package/src/unstable/httpapi/HttpApiSchema.ts +14 -7
- package/src/unstable/httpapi/HttpApiTest.ts +6 -1
- package/src/unstable/httpapi/OpenApi.ts +32 -22
- package/src/unstable/net/IpInterface.ts +242 -0
- package/src/unstable/net/IpNetwork.ts +357 -0
- package/src/unstable/net/NetAddress.ts +1271 -0
- package/src/unstable/net/index.ts +20 -0
- package/src/unstable/observability/OtlpExporter.ts +5 -6
- package/src/unstable/observability/OtlpLogger.ts +9 -9
- package/src/unstable/observability/OtlpMetrics.ts +9 -8
- package/src/unstable/observability/OtlpResource.ts +5 -4
- package/src/unstable/observability/OtlpTracer.ts +103 -81
- package/src/unstable/observability/internal/otlpEnv.ts +10 -13
- package/src/unstable/persistence/PersistedCache.ts +1 -1
- package/src/unstable/persistence/PersistedQueue.ts +1100 -291
- package/src/unstable/persistence/RateLimiter.ts +64 -58
- package/src/unstable/process/ChildProcess.ts +15 -4
- package/src/unstable/process/ChildProcessSpawner.ts +1 -1
- package/src/unstable/reactivity/Atom.ts +6 -3
- package/src/unstable/reactivity/AtomHttpApi.ts +21 -10
- package/src/unstable/reactivity/AtomRegistry.ts +2 -4
- package/src/unstable/reactivity/AtomRpc.ts +6 -5
- package/src/unstable/reactivity/Hydration.ts +26 -7
- package/src/unstable/reactivity/Reactivity.ts +49 -36
- package/src/unstable/rpc/RpcClient.ts +62 -59
- package/src/unstable/rpc/RpcMessage.ts +3 -1
- package/src/unstable/rpc/RpcMiddleware.ts +7 -5
- package/src/unstable/rpc/RpcSerialization.ts +27 -117
- package/src/unstable/rpc/RpcServer.ts +143 -80
- package/src/unstable/schema/Model.ts +8 -7
- package/src/unstable/schema/VariantSchema.ts +3 -0
- package/src/unstable/socket/Socket.ts +714 -383
- package/src/unstable/socket/SocketServer.ts +5 -35
- package/src/unstable/sql/SqlClient.ts +42 -7
- package/src/unstable/sql/SqlConnection.ts +18 -0
- package/src/unstable/sql/SqlModel.ts +1 -1
- package/src/unstable/sql/Statement.ts +46 -20
- package/src/unstable/workers/Transferable.ts +1 -1
- package/src/unstable/workers/Worker.ts +3 -1
- package/src/unstable/workflow/Activity.ts +20 -9
- package/src/unstable/workflow/DurableClock.ts +1 -1
- package/src/unstable/workflow/DurableDeferred.ts +6 -0
- package/src/unstable/workflow/DurableQueue.ts +8 -0
- package/src/unstable/workflow/Workflow.ts +105 -28
- package/src/unstable/workflow/WorkflowEngine.ts +22 -0
- package/dist/internal/schema/schema.d.ts.map +0 -1
- package/dist/internal/schema/schema.js.map +0 -1
- package/dist/internal/schema/toArbitrary.d.ts +0 -2
- package/dist/internal/schema/toArbitrary.d.ts.map +0 -1
- package/dist/internal/schema/toArbitrary.js +0 -705
- package/dist/internal/schema/toArbitrary.js.map +0 -1
- package/dist/testing/FastCheck.d.ts +0 -90
- package/dist/testing/FastCheck.d.ts.map +0 -1
- package/dist/testing/FastCheck.js +0 -90
- package/dist/testing/FastCheck.js.map +0 -1
- package/dist/unstable/encoding/Msgpack.d.ts +0 -185
- package/dist/unstable/encoding/Msgpack.d.ts.map +0 -1
- package/dist/unstable/encoding/Msgpack.js +0 -227
- package/dist/unstable/encoding/Msgpack.js.map +0 -1
- package/src/internal/schema/toArbitrary.ts +0 -843
- package/src/testing/FastCheck.ts +0 -90
- package/src/unstable/encoding/Msgpack.ts +0 -432
- /package/dist/internal/{schema → arbitrary}/schema.d.ts +0 -0
package/dist/Config.js
CHANGED
|
@@ -28,7 +28,7 @@ const TypeId = "~effect/Config";
|
|
|
28
28
|
* ```ts import.meta.vitest
|
|
29
29
|
* import { Config } from "effect"
|
|
30
30
|
*
|
|
31
|
-
* Config.isConfig(Config.
|
|
31
|
+
* Config.isConfig(Config.String("HOST")) // => true
|
|
32
32
|
* Config.isConfig("not a config") // => false
|
|
33
33
|
* ```
|
|
34
34
|
*
|
|
@@ -123,7 +123,7 @@ const preserveInputEvidence = (self, hasInput) => {
|
|
|
123
123
|
* ```ts import.meta.vitest
|
|
124
124
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
125
125
|
*
|
|
126
|
-
* const upper = Config.
|
|
126
|
+
* const upper = Config.String("name").pipe(
|
|
127
127
|
* Config.map((s) => s.toUpperCase())
|
|
128
128
|
* )
|
|
129
129
|
*
|
|
@@ -131,7 +131,7 @@ const preserveInputEvidence = (self, hasInput) => {
|
|
|
131
131
|
* Effect.runSync(upper.parse(provider)) // => "ALICE"
|
|
132
132
|
* ```
|
|
133
133
|
*
|
|
134
|
-
* @see {@link
|
|
134
|
+
* @see {@link mapEffect} – when the transformation can fail
|
|
135
135
|
*
|
|
136
136
|
* @category mapping
|
|
137
137
|
* @since 2.0.0
|
|
@@ -152,8 +152,8 @@ export const map = /*#__PURE__*/dual(2, (self, f) => {
|
|
|
152
152
|
* ```ts import.meta.vitest
|
|
153
153
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
154
154
|
*
|
|
155
|
-
* const trimmed = Config.
|
|
156
|
-
* Config.
|
|
155
|
+
* const trimmed = Config.String("name").pipe(
|
|
156
|
+
* Config.mapEffect((s) => Effect.succeed(s.trim()))
|
|
157
157
|
* )
|
|
158
158
|
* const provider = ConfigProvider.fromUnknown({ name: " Alice " })
|
|
159
159
|
* Effect.runSync(trimmed.parse(provider)) // => "Alice"
|
|
@@ -164,7 +164,7 @@ export const map = /*#__PURE__*/dual(2, (self, f) => {
|
|
|
164
164
|
* @category mapping
|
|
165
165
|
* @since 2.0.0
|
|
166
166
|
*/
|
|
167
|
-
export const
|
|
167
|
+
export const mapEffect = /*#__PURE__*/dual(2, (self, f) => {
|
|
168
168
|
return make((provider, pathPrefix) => Effect.flatMap(evaluateAt(self, provider, pathPrefix), resolution => resolution._tag === "Resolved" ? f(resolution.value).pipe(Effect.mapEager(value => resolved(value, resolution.hasInput)), Effect.mapErrorEager(error => evaluationFailure(error, resolution.hasInput))) : Effect.succeed(resolution)));
|
|
169
169
|
});
|
|
170
170
|
/**
|
|
@@ -193,7 +193,7 @@ export const mapOrFail = /*#__PURE__*/dual(2, (self, f) => {
|
|
|
193
193
|
* ```ts import.meta.vitest
|
|
194
194
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
195
195
|
*
|
|
196
|
-
* const hostConfig = Config.
|
|
196
|
+
* const hostConfig = Config.String("HOST").pipe(
|
|
197
197
|
* Config.orElse(() => Config.succeed("localhost"))
|
|
198
198
|
* )
|
|
199
199
|
* const provider = ConfigProvider.fromUnknown({})
|
|
@@ -239,8 +239,8 @@ export const orElse = /*#__PURE__*/dual(2, (self, that) => {
|
|
|
239
239
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
240
240
|
*
|
|
241
241
|
* const dbConfig = Config.all({
|
|
242
|
-
* host: Config.
|
|
243
|
-
* port: Config.
|
|
242
|
+
* host: Config.String("host"),
|
|
243
|
+
* port: Config.Number("port")
|
|
244
244
|
* })
|
|
245
245
|
*
|
|
246
246
|
* const provider = ConfigProvider.fromUnknown({ host: "localhost", port: 5432 })
|
|
@@ -251,8 +251,8 @@ export const orElse = /*#__PURE__*/dual(2, (self, that) => {
|
|
|
251
251
|
* @since 2.0.0
|
|
252
252
|
*/
|
|
253
253
|
export function all(arg) {
|
|
254
|
-
const configs = Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
|
|
255
|
-
if (Array.isArray(configs)) {
|
|
254
|
+
const configs = globalThis.Array.isArray(arg) ? arg : Symbol.iterator in arg ? [...arg] : arg;
|
|
255
|
+
if (globalThis.Array.isArray(configs)) {
|
|
256
256
|
return make((provider, pathPrefix) => Effect.flatMapEager(Effect.all(configs.map(config => Effect.result(evaluateAt(config, provider, pathPrefix)))), resolveArray));
|
|
257
257
|
} else {
|
|
258
258
|
return make((provider, pathPrefix) => Effect.flatMapEager(Effect.all(Rec.map(configs, config => Effect.result(evaluateAt(config, provider, pathPrefix)))), resolveRecord));
|
|
@@ -334,7 +334,7 @@ const resolveRecord = results => {
|
|
|
334
334
|
* ```ts import.meta.vitest
|
|
335
335
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
336
336
|
*
|
|
337
|
-
* const port = Config.
|
|
337
|
+
* const port = Config.Number("port").pipe(Config.withDefault(3000))
|
|
338
338
|
*
|
|
339
339
|
* const provider = ConfigProvider.fromUnknown({})
|
|
340
340
|
* Effect.runSync(port.parse(provider)) // => 3000
|
|
@@ -370,7 +370,7 @@ export const withDefault = /*#__PURE__*/dual(2, (self, defaultValue) => {
|
|
|
370
370
|
* ```ts import.meta.vitest
|
|
371
371
|
* import { Config, ConfigProvider, Effect, Option } from "effect"
|
|
372
372
|
*
|
|
373
|
-
* const maybePort = Config.option(Config.
|
|
373
|
+
* const maybePort = Config.option(Config.Number("port"))
|
|
374
374
|
*
|
|
375
375
|
* const provider = ConfigProvider.fromUnknown({})
|
|
376
376
|
* Effect.runSync(maybePort.parse(provider)) // => Option.none()
|
|
@@ -407,7 +407,7 @@ export const option = self => self.pipe(map(Option.some), withDefault(Option.non
|
|
|
407
407
|
* const makeConfig = (config: Config.Wrap<Options>): Config.Config<Options> =>
|
|
408
408
|
* Config.unwrap(config)
|
|
409
409
|
*
|
|
410
|
-
* const config = makeConfig({ key: Config.
|
|
410
|
+
* const config = makeConfig({ key: Config.String("key") })
|
|
411
411
|
* const provider = ConfigProvider.fromUnknown({ key: "value" })
|
|
412
412
|
* Effect.runSync(config.parse(provider)) // => { key: "value" }
|
|
413
413
|
* ```
|
|
@@ -430,7 +430,7 @@ const loadCursor = (provider, path) => provider.load(path).pipe(Effect.orDie, Ef
|
|
|
430
430
|
})));
|
|
431
431
|
const loadChildCursor = (cursor, segment) => loadCursor(cursor.provider, [...cursor.path, segment]);
|
|
432
432
|
const getScalar = node => node?.value;
|
|
433
|
-
const decodeFromCursor = (ast, decode) => SchemaAST.decodeTo(SchemaAST.unknown, ast, new SchemaTransformation.Transformation(SchemaGetter.
|
|
433
|
+
const decodeFromCursor = (ast, decode) => SchemaAST.decodeTo(SchemaAST.unknown, ast, new SchemaTransformation.Transformation(SchemaGetter.transformEffect(input => decode(input)), SchemaGetter.passthrough()));
|
|
434
434
|
const isScalarInput = ast => {
|
|
435
435
|
switch (ast._tag) {
|
|
436
436
|
case "Union":
|
|
@@ -539,7 +539,7 @@ const toConfigCursorAST = /*#__PURE__*/memoize(root => {
|
|
|
539
539
|
* {@link nested} calls. Pass a single string for a flat key or an array for
|
|
540
540
|
* nested paths.
|
|
541
541
|
*
|
|
542
|
-
* Convenience constructors such as `
|
|
542
|
+
* Convenience constructors such as `String`, `Number`, and `Boolean` delegate
|
|
543
543
|
* to this API.
|
|
544
544
|
*
|
|
545
545
|
* The codec is converted to its canonical `StringTree` form. Its encoded shape
|
|
@@ -600,7 +600,7 @@ const toConfigCursorAST = /*#__PURE__*/memoize(root => {
|
|
|
600
600
|
* Effect.runSync(DbConfig.parse(provider)) // => { host: "localhost", port: 5432 }
|
|
601
601
|
* ```
|
|
602
602
|
*
|
|
603
|
-
* @see {@link
|
|
603
|
+
* @see {@link String} / {@link Number} / {@link Boolean} – shortcuts for
|
|
604
604
|
* single-value configs
|
|
605
605
|
*
|
|
606
606
|
* @category schemas
|
|
@@ -622,151 +622,12 @@ export function schema(codec, path) {
|
|
|
622
622
|
}));
|
|
623
623
|
});
|
|
624
624
|
}
|
|
625
|
-
|
|
626
|
-
export const TrueValues = /*#__PURE__*/Schema.Literals(["true", "yes", "on", "1", "y"]);
|
|
627
|
-
/** @internal */
|
|
628
|
-
export const FalseValues = /*#__PURE__*/Schema.Literals(["false", "no", "off", "0", "n"]);
|
|
629
|
-
/**
|
|
630
|
-
* Schema for boolean values encoded as strings.
|
|
631
|
-
*
|
|
632
|
-
* **When to use**
|
|
633
|
-
*
|
|
634
|
-
* Use when you need the reusable boolean schema value for `Config.schema` with
|
|
635
|
-
* custom paths.
|
|
636
|
-
*
|
|
637
|
-
* **Details**
|
|
638
|
-
*
|
|
639
|
-
* Accepted string values: `true`, `false`, `yes`, `no`, `on`, `off`, `1`,
|
|
640
|
-
* `0`, `y`, `n` (case-sensitive).
|
|
641
|
-
*
|
|
642
|
-
* @see {@link boolean} – convenience constructor
|
|
643
|
-
*
|
|
644
|
-
* @category schemas
|
|
645
|
-
* @since 4.0.0
|
|
646
|
-
*/
|
|
647
|
-
export const Boolean = /*#__PURE__*/Schema.Literals([...TrueValues.literals, ...FalseValues.literals]).pipe(/*#__PURE__*/Schema.decodeTo(Schema.Boolean, /*#__PURE__*/SchemaTransformation.transform({
|
|
648
|
-
decode: value => value === "true" || value === "yes" || value === "on" || value === "1" || value === "y",
|
|
649
|
-
encode: value => value ? "true" : "false"
|
|
650
|
-
})));
|
|
651
|
-
/**
|
|
652
|
-
* Schema for port numbers (integers in 1–65535).
|
|
653
|
-
*
|
|
654
|
-
* **When to use**
|
|
655
|
-
*
|
|
656
|
-
* Use when you need the reusable port schema value for `Config.schema` with
|
|
657
|
-
* custom paths.
|
|
658
|
-
*
|
|
659
|
-
* @see {@link port} – convenience constructor
|
|
660
|
-
*
|
|
661
|
-
* @category schemas
|
|
662
|
-
* @since 4.0.0
|
|
663
|
-
*/
|
|
664
|
-
export const Port = /*#__PURE__*/Schema.Int.check(/*#__PURE__*/Schema.isBetween({
|
|
625
|
+
const PortSchema = /*#__PURE__*/Schema.Int.check(/*#__PURE__*/Schema.isBetween({
|
|
665
626
|
minimum: 1,
|
|
666
627
|
maximum: 65535
|
|
667
628
|
}));
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
*
|
|
671
|
-
* **When to use**
|
|
672
|
-
*
|
|
673
|
-
* Use when you need the reusable log-level schema value for `Config.schema`
|
|
674
|
-
* with custom paths.
|
|
675
|
-
*
|
|
676
|
-
* **Details**
|
|
677
|
-
*
|
|
678
|
-
* Accepted values: `"All"`, `"Fatal"`, `"Error"`, `"Warn"`, `"Info"`,
|
|
679
|
-
* `"Debug"`, `"Trace"`, `"None"`.
|
|
680
|
-
*
|
|
681
|
-
* @see {@link logLevel} – convenience constructor
|
|
682
|
-
*
|
|
683
|
-
* @category schemas
|
|
684
|
-
* @since 4.0.0
|
|
685
|
-
*/
|
|
686
|
-
export const LogLevel = /*#__PURE__*/Schema.Literals(LogLevel_.values);
|
|
687
|
-
/**
|
|
688
|
-
* Schema for key-value record types that can also be parsed from
|
|
689
|
-
* a flat comma-separated string.
|
|
690
|
-
*
|
|
691
|
-
* **When to use**
|
|
692
|
-
*
|
|
693
|
-
* Use when reading key-value maps from a single env var (e.g. OpenTelemetry
|
|
694
|
-
* resource attributes).
|
|
695
|
-
*
|
|
696
|
-
* **Details**
|
|
697
|
-
*
|
|
698
|
-
* Accepts either a JSON-like record from the provider or a flat string like
|
|
699
|
-
* `"key1=val1,key2=val2"`. The `separator` (default `","`) and
|
|
700
|
-
* `keyValueSeparator` (default `"="`) can be customized.
|
|
701
|
-
*
|
|
702
|
-
* **Example** (Parsing a comma-separated record)
|
|
703
|
-
*
|
|
704
|
-
* ```ts import.meta.vitest
|
|
705
|
-
* import { Config, ConfigProvider, Effect, Schema } from "effect"
|
|
706
|
-
*
|
|
707
|
-
* const schema = Config.Record(Schema.String, Schema.String)
|
|
708
|
-
* const config = Config.schema(schema, "OTEL_RESOURCE_ATTRIBUTES")
|
|
709
|
-
*
|
|
710
|
-
* const provider = ConfigProvider.fromEnv({
|
|
711
|
-
* env: {
|
|
712
|
-
* OTEL_RESOURCE_ATTRIBUTES:
|
|
713
|
-
* "service.name=my-service,service.version=1.0.0,custom.attribute=value"
|
|
714
|
-
* }
|
|
715
|
-
* })
|
|
716
|
-
*
|
|
717
|
-
* const result = Effect.runSync(config.parse(provider))
|
|
718
|
-
* result["service.name"] // => "my-service"
|
|
719
|
-
* result["service.version"] // => "1.0.0"
|
|
720
|
-
* result["custom.attribute"] // => "value"
|
|
721
|
-
* ```
|
|
722
|
-
*
|
|
723
|
-
* @see {@link Array} for separated or structural array input
|
|
724
|
-
*
|
|
725
|
-
* @category schemas
|
|
726
|
-
* @since 4.0.0
|
|
727
|
-
*/
|
|
728
|
-
export const Record = (key, value, options) => {
|
|
729
|
-
const record = Schema.Record(key, value);
|
|
730
|
-
const split = SchemaTransformation.splitKeyValue(options);
|
|
731
|
-
const recordString = Schema.String.pipe(Schema.decodeTo(Schema.toCodecStringTree(record), {
|
|
732
|
-
decode: split.decode,
|
|
733
|
-
encode: SchemaGetter.passthrough({
|
|
734
|
-
strict: false
|
|
735
|
-
}).compose(split.encode)
|
|
736
|
-
}));
|
|
737
|
-
return Schema.Union([record, recordString]);
|
|
738
|
-
};
|
|
739
|
-
const ArrayConfig = (value, options) => {
|
|
740
|
-
const array = Schema.Array(value);
|
|
741
|
-
const separator = options?.separator ?? ",";
|
|
742
|
-
const arrayString = Schema.String.pipe(Schema.decodeTo(Schema.toCodecStringTree(array), {
|
|
743
|
-
decode: SchemaGetter.split(options),
|
|
744
|
-
encode: SchemaGetter.passthrough({
|
|
745
|
-
strict: false
|
|
746
|
-
}).compose(SchemaGetter.transform(input => input.join(separator)))
|
|
747
|
-
}));
|
|
748
|
-
return Schema.Union([arrayString, array]);
|
|
749
|
-
};
|
|
750
|
-
export {
|
|
751
|
-
/**
|
|
752
|
-
* Schema for array types that can also be parsed from a flat separated string.
|
|
753
|
-
*
|
|
754
|
-
* **When to use**
|
|
755
|
-
*
|
|
756
|
-
* Use when reading array values from a single env var, such as comma-separated
|
|
757
|
-
* exporter names.
|
|
758
|
-
*
|
|
759
|
-
* **Details**
|
|
760
|
-
*
|
|
761
|
-
* Accepts either a JSON-like array from the provider or a flat string like
|
|
762
|
-
* `"a,b,c"`. The `separator` defaults to `","` and can be customized.
|
|
763
|
-
*
|
|
764
|
-
* @see {@link Record} for separated or structural record input
|
|
765
|
-
*
|
|
766
|
-
* @category schemas
|
|
767
|
-
* @since 4.0.0
|
|
768
|
-
*/
|
|
769
|
-
ArrayConfig as Array };
|
|
629
|
+
const LogLevelSchema = /*#__PURE__*/Schema.Literals(LogLevel_.values);
|
|
630
|
+
const isPath = u => Predicate.isString(u) || globalThis.Array.isArray(u);
|
|
770
631
|
// -----------------------------------------------------------------------------
|
|
771
632
|
// constructors
|
|
772
633
|
// -----------------------------------------------------------------------------
|
|
@@ -798,7 +659,7 @@ export function fail(err) {
|
|
|
798
659
|
* ```ts import.meta.vitest
|
|
799
660
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
800
661
|
*
|
|
801
|
-
* const host = Config.
|
|
662
|
+
* const host = Config.String("HOST").pipe(
|
|
802
663
|
* Config.orElse(() => Config.succeed("localhost"))
|
|
803
664
|
* )
|
|
804
665
|
* const provider = ConfigProvider.fromUnknown({})
|
|
@@ -827,19 +688,19 @@ export function succeed(value) {
|
|
|
827
688
|
* ```ts import.meta.vitest
|
|
828
689
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
829
690
|
*
|
|
830
|
-
* const host = Config.
|
|
691
|
+
* const host = Config.String("HOST")
|
|
831
692
|
*
|
|
832
693
|
* const provider = ConfigProvider.fromUnknown({ HOST: "localhost" })
|
|
833
694
|
* Effect.runSync(host.parse(provider)) // => "localhost"
|
|
834
695
|
* ```
|
|
835
696
|
*
|
|
836
|
-
* @see {@link
|
|
697
|
+
* @see {@link NonEmptyString} – rejects empty strings
|
|
837
698
|
* @see {@link schema} – for more complex types
|
|
838
699
|
*
|
|
839
700
|
* @category constructors
|
|
840
701
|
* @since 2.0.0
|
|
841
702
|
*/
|
|
842
|
-
export function
|
|
703
|
+
export function String(name) {
|
|
843
704
|
return schema(Schema.String, name);
|
|
844
705
|
}
|
|
845
706
|
/**
|
|
@@ -854,12 +715,12 @@ export function string(name) {
|
|
|
854
715
|
*
|
|
855
716
|
* Shortcut for `Config.schema(Schema.NonEmptyString, name)`.
|
|
856
717
|
*
|
|
857
|
-
* @see {@link
|
|
718
|
+
* @see {@link String} for allowing empty strings
|
|
858
719
|
*
|
|
859
720
|
* @category constructors
|
|
860
721
|
* @since 3.7.0
|
|
861
722
|
*/
|
|
862
|
-
export function
|
|
723
|
+
export function NonEmptyString(name) {
|
|
863
724
|
return schema(Schema.NonEmptyString, name);
|
|
864
725
|
}
|
|
865
726
|
/**
|
|
@@ -874,13 +735,13 @@ export function nonEmptyString(name) {
|
|
|
874
735
|
*
|
|
875
736
|
* Shortcut for `Config.schema(Schema.Number, name)`.
|
|
876
737
|
*
|
|
877
|
-
* @see {@link
|
|
878
|
-
* @see {@link
|
|
738
|
+
* @see {@link Finite} for rejecting `NaN` and `Infinity`
|
|
739
|
+
* @see {@link Int} for accepting only integers
|
|
879
740
|
*
|
|
880
741
|
* @category constructors
|
|
881
742
|
* @since 2.0.0
|
|
882
743
|
*/
|
|
883
|
-
export function
|
|
744
|
+
export function Number(name) {
|
|
884
745
|
return schema(Schema.Number, name);
|
|
885
746
|
}
|
|
886
747
|
/**
|
|
@@ -894,13 +755,13 @@ export function number(name) {
|
|
|
894
755
|
*
|
|
895
756
|
* Shortcut for `Config.schema(Schema.Finite, name)`.
|
|
896
757
|
*
|
|
897
|
-
* @see {@link
|
|
898
|
-
* @see {@link
|
|
758
|
+
* @see {@link Number} for accepting `NaN` and `Infinity`
|
|
759
|
+
* @see {@link Int} for accepting only integers
|
|
899
760
|
*
|
|
900
761
|
* @category constructors
|
|
901
762
|
* @since 4.0.0
|
|
902
763
|
*/
|
|
903
|
-
export function
|
|
764
|
+
export function Finite(name) {
|
|
904
765
|
return schema(Schema.Finite, name);
|
|
905
766
|
}
|
|
906
767
|
/**
|
|
@@ -914,13 +775,13 @@ export function finite(name) {
|
|
|
914
775
|
*
|
|
915
776
|
* Shortcut for `Config.schema(Schema.Int, name)`.
|
|
916
777
|
*
|
|
917
|
-
* @see {@link
|
|
918
|
-
* @see {@link
|
|
778
|
+
* @see {@link Number} for accepting any number
|
|
779
|
+
* @see {@link Port} for accepting only integers in `1` through `65535`
|
|
919
780
|
*
|
|
920
781
|
* @category constructors
|
|
921
782
|
* @since 4.0.0
|
|
922
783
|
*/
|
|
923
|
-
export function
|
|
784
|
+
export function Int(name) {
|
|
924
785
|
return schema(Schema.Int, name);
|
|
925
786
|
}
|
|
926
787
|
/**
|
|
@@ -939,16 +800,16 @@ export function int(name) {
|
|
|
939
800
|
* ```ts import.meta.vitest
|
|
940
801
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
941
802
|
*
|
|
942
|
-
* const env = Config.
|
|
803
|
+
* const env = Config.Literal("production", "ENV")
|
|
943
804
|
* const provider = ConfigProvider.fromUnknown({ ENV: "production" })
|
|
944
805
|
* Effect.runSync(env.parse(provider)) // => "production"
|
|
945
806
|
* ```
|
|
946
807
|
*
|
|
947
|
-
* @see {@link
|
|
808
|
+
* @see {@link Literals} – accepts multiple literal values
|
|
948
809
|
* @category constructors
|
|
949
810
|
* @since 2.0.0
|
|
950
811
|
*/
|
|
951
|
-
export function
|
|
812
|
+
export function Literal(literal, name) {
|
|
952
813
|
return schema(Schema.Literal(literal), name);
|
|
953
814
|
}
|
|
954
815
|
/**
|
|
@@ -967,19 +828,44 @@ export function literal(literal, name) {
|
|
|
967
828
|
* ```ts import.meta.vitest
|
|
968
829
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
969
830
|
*
|
|
970
|
-
* const env = Config.
|
|
831
|
+
* const env = Config.Literals(["development", "production"], "ENV")
|
|
971
832
|
* const provider = ConfigProvider.fromUnknown({ ENV: "development" })
|
|
972
833
|
* Effect.runSync(env.parse(provider)) // => "development"
|
|
973
834
|
* ```
|
|
974
835
|
*
|
|
975
|
-
* @see {@link
|
|
836
|
+
* @see {@link Literal} for accepting one specific literal value
|
|
976
837
|
*
|
|
977
838
|
* @category constructors
|
|
978
839
|
* @since 4.0.0
|
|
979
840
|
*/
|
|
980
|
-
export function
|
|
841
|
+
export function Literals(literals, name) {
|
|
981
842
|
return schema(Schema.Literals(literals), name);
|
|
982
843
|
}
|
|
844
|
+
export function Array(value, pathOrOptions, options) {
|
|
845
|
+
const hasPath = isPath(pathOrOptions);
|
|
846
|
+
const resolvedOptions = hasPath ? options : pathOrOptions;
|
|
847
|
+
const array = Schema.Array(value);
|
|
848
|
+
const separator = resolvedOptions?.separator ?? ",";
|
|
849
|
+
const arrayString = Schema.String.pipe(Schema.decodeTo(Schema.toCodecStringTree(array), {
|
|
850
|
+
decode: SchemaGetter.split(resolvedOptions),
|
|
851
|
+
encode: SchemaGetter.passthrough({
|
|
852
|
+
strict: false
|
|
853
|
+
}).compose(SchemaGetter.transform(input => input.join(separator)))
|
|
854
|
+
}));
|
|
855
|
+
return schema(Schema.Union([arrayString, array]), hasPath ? pathOrOptions : undefined);
|
|
856
|
+
}
|
|
857
|
+
export function Record(key, value, pathOrOptions, options) {
|
|
858
|
+
const hasPath = isPath(pathOrOptions);
|
|
859
|
+
const record = Schema.Record(key, value);
|
|
860
|
+
const split = SchemaTransformation.splitKeyValue(hasPath ? options : pathOrOptions);
|
|
861
|
+
const recordString = Schema.String.pipe(Schema.decodeTo(Schema.toCodecStringTree(record), {
|
|
862
|
+
decode: split.decode,
|
|
863
|
+
encode: SchemaGetter.passthrough({
|
|
864
|
+
strict: false
|
|
865
|
+
}).compose(split.encode)
|
|
866
|
+
}));
|
|
867
|
+
return schema(Schema.Union([record, recordString]), hasPath ? pathOrOptions : undefined);
|
|
868
|
+
}
|
|
983
869
|
/**
|
|
984
870
|
* Creates a config for a boolean value parsed from common string
|
|
985
871
|
* representations.
|
|
@@ -990,8 +876,6 @@ export function literals(literals, name) {
|
|
|
990
876
|
*
|
|
991
877
|
* **Details**
|
|
992
878
|
*
|
|
993
|
-
* Shortcut for `Config.schema(Config.Boolean, name)`.
|
|
994
|
-
*
|
|
995
879
|
* Accepted values: `true`, `false`, `yes`, `no`, `on`, `off`, `1`, `0`,
|
|
996
880
|
* `y`, `n`.
|
|
997
881
|
*
|
|
@@ -1000,7 +884,7 @@ export function literals(literals, name) {
|
|
|
1000
884
|
* ```ts import.meta.vitest
|
|
1001
885
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
1002
886
|
*
|
|
1003
|
-
* const program = Config.
|
|
887
|
+
* const program = Config.Boolean("FEATURE_FLAG")
|
|
1004
888
|
*
|
|
1005
889
|
* const provider = ConfigProvider.fromEnv({
|
|
1006
890
|
* env: {
|
|
@@ -1013,13 +897,11 @@ export function literals(literals, name) {
|
|
|
1013
897
|
* ) // => true
|
|
1014
898
|
* ```
|
|
1015
899
|
*
|
|
1016
|
-
* @see {@link Boolean} for the underlying boolean codec
|
|
1017
|
-
*
|
|
1018
900
|
* @category constructors
|
|
1019
901
|
* @since 2.0.0
|
|
1020
902
|
*/
|
|
1021
|
-
export function
|
|
1022
|
-
return schema(
|
|
903
|
+
export function Boolean(name) {
|
|
904
|
+
return schema(Schema.BooleanLiterals, name);
|
|
1023
905
|
}
|
|
1024
906
|
/**
|
|
1025
907
|
* Creates a config for a `Duration` value parsed from a human-readable
|
|
@@ -1041,7 +923,7 @@ export function boolean(name) {
|
|
|
1041
923
|
* ```ts import.meta.vitest
|
|
1042
924
|
* import { Config, ConfigProvider, Duration, Effect } from "effect"
|
|
1043
925
|
*
|
|
1044
|
-
* const program = Config.
|
|
926
|
+
* const program = Config.Duration("DURATION").pipe(Effect.map(Duration.toMillis))
|
|
1045
927
|
*
|
|
1046
928
|
* const provider = ConfigProvider.fromEnv({
|
|
1047
929
|
* env: {
|
|
@@ -1059,9 +941,23 @@ export function boolean(name) {
|
|
|
1059
941
|
* @category constructors
|
|
1060
942
|
* @since 2.5.0
|
|
1061
943
|
*/
|
|
1062
|
-
export function
|
|
944
|
+
export function Duration(name) {
|
|
1063
945
|
return schema(Schema.DurationFromString, name);
|
|
1064
946
|
}
|
|
947
|
+
/**
|
|
948
|
+
* Creates a config for an exact, human-readable byte-size value.
|
|
949
|
+
*
|
|
950
|
+
* **Details**
|
|
951
|
+
*
|
|
952
|
+
* Decimal symbols such as `kB` use powers of 1,000, while binary symbols such
|
|
953
|
+
* as `KiB` use powers of 1,024.
|
|
954
|
+
*
|
|
955
|
+
* @category constructors
|
|
956
|
+
* @since 4.0.0
|
|
957
|
+
*/
|
|
958
|
+
export function ByteSize(name) {
|
|
959
|
+
return schema(Schema.ByteSize, name);
|
|
960
|
+
}
|
|
1065
961
|
/**
|
|
1066
962
|
* Creates a config for a port number (integer in 1–65535).
|
|
1067
963
|
*
|
|
@@ -1071,14 +967,14 @@ export function duration(name) {
|
|
|
1071
967
|
*
|
|
1072
968
|
* **Details**
|
|
1073
969
|
*
|
|
1074
|
-
*
|
|
970
|
+
* Accepts integers from `1` through `65535`.
|
|
1075
971
|
*
|
|
1076
972
|
* **Example** (Reading a port)
|
|
1077
973
|
*
|
|
1078
974
|
* ```ts import.meta.vitest
|
|
1079
975
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
1080
976
|
*
|
|
1081
|
-
* const program = Config.
|
|
977
|
+
* const program = Config.Port("PORT")
|
|
1082
978
|
*
|
|
1083
979
|
* const provider = ConfigProvider.fromEnv({
|
|
1084
980
|
* env: {
|
|
@@ -1091,14 +987,13 @@ export function duration(name) {
|
|
|
1091
987
|
* ) // => 8080
|
|
1092
988
|
* ```
|
|
1093
989
|
*
|
|
1094
|
-
* @see {@link
|
|
1095
|
-
* @see {@link Port} for the underlying port codec
|
|
990
|
+
* @see {@link Int} for integer config values outside the port range
|
|
1096
991
|
*
|
|
1097
992
|
* @category constructors
|
|
1098
993
|
* @since 3.16.0
|
|
1099
994
|
*/
|
|
1100
|
-
export function
|
|
1101
|
-
return schema(
|
|
995
|
+
export function Port(name) {
|
|
996
|
+
return schema(PortSchema, name);
|
|
1102
997
|
}
|
|
1103
998
|
/**
|
|
1104
999
|
* Creates a config for a log level string.
|
|
@@ -1109,8 +1004,6 @@ export function port(name) {
|
|
|
1109
1004
|
*
|
|
1110
1005
|
* **Details**
|
|
1111
1006
|
*
|
|
1112
|
-
* Shortcut for `Config.schema(Config.LogLevel, name)`.
|
|
1113
|
-
*
|
|
1114
1007
|
* Accepted values: `"All"`, `"Fatal"`, `"Error"`, `"Warn"`, `"Info"`,
|
|
1115
1008
|
* `"Debug"`, `"Trace"`, `"None"`.
|
|
1116
1009
|
*
|
|
@@ -1119,7 +1012,7 @@ export function port(name) {
|
|
|
1119
1012
|
* ```ts import.meta.vitest
|
|
1120
1013
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
1121
1014
|
*
|
|
1122
|
-
* const program = Config.
|
|
1015
|
+
* const program = Config.LogLevel("LOG_LEVEL")
|
|
1123
1016
|
*
|
|
1124
1017
|
* const provider = ConfigProvider.fromEnv({
|
|
1125
1018
|
* env: {
|
|
@@ -1132,13 +1025,11 @@ export function port(name) {
|
|
|
1132
1025
|
* ) // => "Info"
|
|
1133
1026
|
* ```
|
|
1134
1027
|
*
|
|
1135
|
-
* @see {@link LogLevel} for the underlying log-level codec
|
|
1136
|
-
*
|
|
1137
1028
|
* @category constructors
|
|
1138
1029
|
* @since 2.0.0
|
|
1139
1030
|
*/
|
|
1140
|
-
export function
|
|
1141
|
-
return schema(
|
|
1031
|
+
export function LogLevel(name) {
|
|
1032
|
+
return schema(LogLevelSchema, name);
|
|
1142
1033
|
}
|
|
1143
1034
|
/**
|
|
1144
1035
|
* Creates a config for a redacted string value. The parsed result is wrapped
|
|
@@ -1158,7 +1049,7 @@ export function logLevel(name) {
|
|
|
1158
1049
|
* ```ts import.meta.vitest
|
|
1159
1050
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
1160
1051
|
*
|
|
1161
|
-
* const program = Config.
|
|
1052
|
+
* const program = Config.Redacted("API_KEY").pipe(Effect.map(String))
|
|
1162
1053
|
*
|
|
1163
1054
|
* const provider = ConfigProvider.fromEnv({
|
|
1164
1055
|
* env: {
|
|
@@ -1171,12 +1062,12 @@ export function logLevel(name) {
|
|
|
1171
1062
|
* ) // => "<redacted>"
|
|
1172
1063
|
* ```
|
|
1173
1064
|
*
|
|
1174
|
-
* @see {@link
|
|
1065
|
+
* @see {@link String} for non-secret string settings
|
|
1175
1066
|
*
|
|
1176
1067
|
* @category constructors
|
|
1177
1068
|
* @since 2.0.0
|
|
1178
1069
|
*/
|
|
1179
|
-
export function
|
|
1070
|
+
export function Redacted(name) {
|
|
1180
1071
|
return schema(Schema.Redacted(Schema.String), name);
|
|
1181
1072
|
}
|
|
1182
1073
|
/**
|
|
@@ -1199,7 +1090,7 @@ export function redacted(name) {
|
|
|
1199
1090
|
* ```ts import.meta.vitest
|
|
1200
1091
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
1201
1092
|
*
|
|
1202
|
-
* const program = Config.
|
|
1093
|
+
* const program = Config.URL("URL").pipe(Effect.map((url) => url.href))
|
|
1203
1094
|
*
|
|
1204
1095
|
* const provider = ConfigProvider.fromEnv({
|
|
1205
1096
|
* env: {
|
|
@@ -1217,7 +1108,7 @@ export function redacted(name) {
|
|
|
1217
1108
|
* @category constructors
|
|
1218
1109
|
* @since 3.11.0
|
|
1219
1110
|
*/
|
|
1220
|
-
export function
|
|
1111
|
+
export function URL(name) {
|
|
1221
1112
|
return schema(Schema.URL, name);
|
|
1222
1113
|
}
|
|
1223
1114
|
/**
|
|
@@ -1240,7 +1131,7 @@ export function url(name) {
|
|
|
1240
1131
|
* ```ts import.meta.vitest
|
|
1241
1132
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
1242
1133
|
*
|
|
1243
|
-
* const createdAt = Config.
|
|
1134
|
+
* const createdAt = Config.Date("CREATED_AT")
|
|
1244
1135
|
*
|
|
1245
1136
|
* const provider = ConfigProvider.fromUnknown({ CREATED_AT: "2024-01-15" })
|
|
1246
1137
|
* Effect.runSync(createdAt.parse(provider)).toISOString() // => "2024-01-15T00:00:00.000Z"
|
|
@@ -1249,7 +1140,7 @@ export function url(name) {
|
|
|
1249
1140
|
* @category constructors
|
|
1250
1141
|
* @since 2.0.0
|
|
1251
1142
|
*/
|
|
1252
|
-
export function
|
|
1143
|
+
export function Date(name) {
|
|
1253
1144
|
return schema(Schema.Date, name);
|
|
1254
1145
|
}
|
|
1255
1146
|
/**
|
|
@@ -1274,8 +1165,8 @@ export function date(name) {
|
|
|
1274
1165
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
1275
1166
|
*
|
|
1276
1167
|
* const dbConfig = Config.all({
|
|
1277
|
-
* host: Config.
|
|
1278
|
-
* port: Config.
|
|
1168
|
+
* host: Config.String("host"),
|
|
1169
|
+
* port: Config.Number("port")
|
|
1279
1170
|
* }).pipe(Config.nested("database"))
|
|
1280
1171
|
*
|
|
1281
1172
|
* const provider = ConfigProvider.fromUnknown({
|
|
@@ -1289,7 +1180,7 @@ export function date(name) {
|
|
|
1289
1180
|
* ```ts import.meta.vitest
|
|
1290
1181
|
* import { Config, ConfigProvider, Effect } from "effect"
|
|
1291
1182
|
*
|
|
1292
|
-
* const host = Config.
|
|
1183
|
+
* const host = Config.String("host").pipe(Config.nested("database"))
|
|
1293
1184
|
*
|
|
1294
1185
|
* const provider = ConfigProvider.fromEnv({
|
|
1295
1186
|
* env: { database_host: "localhost" }
|