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/SchemaAST.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import * as Pipeable from "./Pipeable.ts";
|
|
|
15
15
|
import type * as Schema from "./Schema.ts";
|
|
16
16
|
import * as SchemaIssue from "./SchemaIssue.ts";
|
|
17
17
|
import * as SchemaTransformation from "./SchemaTransformation.ts";
|
|
18
|
+
import type * as Types from "./Types.ts";
|
|
18
19
|
/**
|
|
19
20
|
* Discriminated union of all AST node types.
|
|
20
21
|
*
|
|
@@ -24,14 +25,13 @@ import * as SchemaTransformation from "./SchemaTransformation.ts";
|
|
|
24
25
|
* ({@link isString}, {@link isObjects}, etc.) to narrow to a specific variant,
|
|
25
26
|
* then access variant-specific fields.
|
|
26
27
|
*
|
|
27
|
-
* - All variants share the
|
|
28
|
-
*
|
|
28
|
+
* - All variants share the `annotations`, `checks`, `encoding`, and `context`
|
|
29
|
+
* fields.
|
|
29
30
|
* - Discriminate on the `_tag` field (e.g. `"String"`, `"Objects"`, `"Union"`).
|
|
30
31
|
*
|
|
31
|
-
* @see {@link Base}
|
|
32
32
|
* @see {@link isAST}
|
|
33
33
|
* @category models
|
|
34
|
-
* @since
|
|
34
|
+
* @since 4.0.0
|
|
35
35
|
*/
|
|
36
36
|
export type AST = Declaration | Null | Undefined | Void | Never | Unknown | Any | String | Number | Boolean | BigInt | Symbol | Literal | UniqueSymbol | ObjectKeyword | Enum | TemplateLiteral | Arrays | Objects | Union | Suspend;
|
|
37
37
|
/**
|
|
@@ -331,18 +331,24 @@ export declare const isSuspend: (ast: AST) => ast is Suspend;
|
|
|
331
331
|
* @category models
|
|
332
332
|
* @since 4.0.0
|
|
333
333
|
*/
|
|
334
|
-
export
|
|
334
|
+
export interface Link {
|
|
335
335
|
readonly to: AST;
|
|
336
336
|
readonly transformation: SchemaTransformation.Transformation<any, any, any, any> | SchemaTransformation.Middleware<any, any, any, any, any, any>;
|
|
337
|
-
constructor(to: AST, transformation: SchemaTransformation.Transformation<any, any, any, any> | SchemaTransformation.Middleware<any, any, any, any, any, any>);
|
|
338
337
|
}
|
|
338
|
+
/**
|
|
339
|
+
* Constructs a {@link Link}.
|
|
340
|
+
*
|
|
341
|
+
* @category constructors
|
|
342
|
+
* @since 4.0.0
|
|
343
|
+
*/
|
|
344
|
+
export declare const Link: new (to: AST, transformation: SchemaTransformation.Transformation<any, any, any, any> | SchemaTransformation.Middleware<any, any, any, any, any, any>) => Link;
|
|
339
345
|
/**
|
|
340
346
|
* A non-empty chain of {@link Link} values representing the transformation
|
|
341
347
|
* steps between a schema's decoded (type) form and its encoded (wire) form.
|
|
342
348
|
*
|
|
343
349
|
* **Details**
|
|
344
350
|
*
|
|
345
|
-
* Stored on
|
|
351
|
+
* Stored on an AST node's `encoding` field. When `undefined`, the node has no
|
|
346
352
|
* encoding transformation (type and encoded forms are identical).
|
|
347
353
|
*
|
|
348
354
|
* @see {@link Link}
|
|
@@ -357,22 +363,25 @@ export type Encoding = readonly [Link, ...Array<Link>];
|
|
|
357
363
|
* **Details**
|
|
358
364
|
*
|
|
359
365
|
* Pass to `Schema.decodeUnknown`, `Schema.encode`, and related APIs to customize
|
|
360
|
-
* error reporting, excess property handling,
|
|
361
|
-
*
|
|
366
|
+
* error reporting, excess property handling, check execution, and product
|
|
367
|
+
* concurrency. Options apply throughout the parse; schema annotations do not
|
|
368
|
+
* override them.
|
|
362
369
|
*
|
|
363
370
|
* - `errors` — `"first"` (default) stops at the first error; `"all"` collects
|
|
364
371
|
* every error.
|
|
365
372
|
* - `onExcessProperty` — `"ignore"` (default) strips unknown object keys;
|
|
366
|
-
* `"error"` fails
|
|
367
|
-
* - `propertyOrder` — `"none"` (default) lets the system choose key order;
|
|
368
|
-
* `"original"` preserves input key order.
|
|
373
|
+
* `"error"` fails.
|
|
369
374
|
* - `disableChecks` — skips validation checks while still applying defaults and
|
|
370
375
|
* transformations.
|
|
371
|
-
* - `concurrency` —
|
|
372
|
-
*
|
|
376
|
+
* - `concurrency` — controls concurrent parsing of tuple elements, array
|
|
377
|
+
* elements, struct fields, and record entries using the same semantics as
|
|
378
|
+
* `Effect.forEach`; the default is sequential.
|
|
373
379
|
* - `reportInput` — includes rejected input values in value-bearing schema
|
|
374
380
|
* issues.
|
|
375
381
|
*
|
|
382
|
+
* Object property order is unspecified, including in values passed to checks.
|
|
383
|
+
* Decoding and encoding do not guarantee preservation of input key order.
|
|
384
|
+
*
|
|
376
385
|
* @category options
|
|
377
386
|
* @since 3.10.0
|
|
378
387
|
*/
|
|
@@ -395,45 +404,43 @@ export interface ParseOptions {
|
|
|
395
404
|
* **Details**
|
|
396
405
|
*
|
|
397
406
|
* The default, `"ignore"`, strips unspecified properties from the output. Use
|
|
398
|
-
* `"error"` to fail when an excess property is present
|
|
399
|
-
*
|
|
407
|
+
* `"error"` to fail when an excess property is present. A key is covered by a
|
|
408
|
+
* declared property or any index signature selecting that key. This applies
|
|
409
|
+
* to structs, records, and structs with rest. Values must satisfy every
|
|
410
|
+
* applicable index signature. Empty structs keep their non-nullish behavior.
|
|
400
411
|
*
|
|
401
412
|
* @default "ignore"
|
|
402
413
|
*/
|
|
403
|
-
readonly onExcessProperty?: "ignore" | "error" |
|
|
414
|
+
readonly onExcessProperty?: "ignore" | "error" | undefined;
|
|
415
|
+
/**
|
|
416
|
+
* Whether to disable checks while still applying defaults and
|
|
417
|
+
* transformations.
|
|
418
|
+
*/
|
|
419
|
+
readonly disableChecks?: boolean | undefined;
|
|
404
420
|
/**
|
|
405
|
-
*
|
|
406
|
-
* in the output. This feature is useful when the sequence of keys is
|
|
407
|
-
* important for the consuming processes or when maintaining the input order
|
|
408
|
-
* enhances readability and usability.
|
|
421
|
+
* Controls how many children of a product schema may parse concurrently.
|
|
409
422
|
*
|
|
410
423
|
* **Details**
|
|
411
424
|
*
|
|
412
|
-
*
|
|
413
|
-
*
|
|
425
|
+
* This option has the same concurrency semantics as {@link Effect.forEach}.
|
|
426
|
+
* It applies to tuples, arrays, structs, records, and structs with rest. Each
|
|
427
|
+
* nested product applies the limit independently. Union members remain
|
|
428
|
+
* sequential, though products inside the current union member still receive
|
|
429
|
+
* the option.
|
|
414
430
|
*
|
|
415
|
-
*
|
|
416
|
-
*
|
|
431
|
+
* Array and tuple outputs retain their element order. Other observable work,
|
|
432
|
+
* including issue accumulation and colliding transformed record keys, follows
|
|
433
|
+
* effect completion order when concurrency is greater than `1`.
|
|
417
434
|
*
|
|
418
435
|
* **Gotchas**
|
|
419
436
|
*
|
|
420
|
-
*
|
|
421
|
-
*
|
|
437
|
+
* With `errors: "first"`, the first observed child failure interrupts the
|
|
438
|
+
* remaining children and may not belong to the earliest product position.
|
|
439
|
+
* Concurrent children may perform effects before another child fails.
|
|
422
440
|
*
|
|
423
|
-
* @default
|
|
441
|
+
* @default undefined
|
|
424
442
|
*/
|
|
425
|
-
readonly
|
|
426
|
-
/**
|
|
427
|
-
* Whether to disable checks while still applying defaults and
|
|
428
|
-
* transformations.
|
|
429
|
-
*/
|
|
430
|
-
readonly disableChecks?: boolean | undefined;
|
|
431
|
-
/**
|
|
432
|
-
* The maximum number of async effects to run concurrently.
|
|
433
|
-
*
|
|
434
|
-
* @default 1
|
|
435
|
-
*/
|
|
436
|
-
readonly concurrency?: number | "unbounded" | undefined;
|
|
443
|
+
readonly concurrency?: Types.Concurrency | undefined;
|
|
437
444
|
/**
|
|
438
445
|
* Whether schema issues should retain and report rejected input values.
|
|
439
446
|
*
|
|
@@ -448,13 +455,12 @@ export interface ParseOptions {
|
|
|
448
455
|
* Enabling this option can retain or disclose secrets, personally
|
|
449
456
|
* identifiable information, and large object graphs. The `input` field is
|
|
450
457
|
* enumerable and may be included by object enumeration, spread, or
|
|
451
|
-
* serialization.
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
* annotations remain the caller's responsibility regardless of this option.
|
|
458
|
+
* serialization. Issues returned directly by user-defined declarations,
|
|
459
|
+
* checks, transformations, and middleware are not modified; their authors
|
|
460
|
+
* decide whether to retain an input. To respect this option, pass the
|
|
461
|
+
* callback's input and parse options directly to a value-bearing issue
|
|
462
|
+
* constructor. Custom messages and annotations remain the caller's
|
|
463
|
+
* responsibility regardless of this option.
|
|
458
464
|
* Formatting an issue with `SchemaIssue.makeFormatterDefault()`, reading
|
|
459
465
|
* `SchemaError.message`, or formatting a Standard Schema failure can disclose
|
|
460
466
|
* retained input.
|
|
@@ -464,7 +470,7 @@ export interface ParseOptions {
|
|
|
464
470
|
readonly reportInput?: boolean | undefined;
|
|
465
471
|
}
|
|
466
472
|
/**
|
|
467
|
-
* Represents per-property metadata attached to AST
|
|
473
|
+
* Represents per-property metadata attached to an AST node's `context` field.
|
|
468
474
|
*
|
|
469
475
|
* **Details**
|
|
470
476
|
*
|
|
@@ -479,24 +485,28 @@ export interface ParseOptions {
|
|
|
479
485
|
* - `annotations` — key-level annotations (e.g. description of the key
|
|
480
486
|
* itself).
|
|
481
487
|
*
|
|
482
|
-
* @see
|
|
488
|
+
* @see `Schema.optionalKey`
|
|
483
489
|
* @see {@link isOptional}
|
|
484
490
|
* @category models
|
|
485
491
|
* @since 4.0.0
|
|
486
492
|
*/
|
|
487
|
-
export
|
|
493
|
+
export interface Context {
|
|
488
494
|
readonly isOptional: boolean;
|
|
489
495
|
readonly isMutable: boolean;
|
|
490
496
|
/** Used for constructor default values (e.g. `withConstructorDefault` API) */
|
|
491
497
|
readonly constructorDefault: Link | undefined;
|
|
492
498
|
readonly annotations: Schema.Annotations.Key<unknown> | undefined;
|
|
493
|
-
constructor(isOptional: boolean, isMutable: boolean,
|
|
494
|
-
/** Used for constructor default values (e.g. `withConstructorDefault` API) */
|
|
495
|
-
constructorDefault?: Link | undefined, annotations?: Schema.Annotations.Key<unknown> | undefined);
|
|
496
499
|
}
|
|
497
500
|
/**
|
|
498
|
-
*
|
|
499
|
-
*
|
|
501
|
+
* Constructs a {@link Context}.
|
|
502
|
+
*
|
|
503
|
+
* @category constructors
|
|
504
|
+
* @since 4.0.0
|
|
505
|
+
*/
|
|
506
|
+
export declare const Context: new (isOptional: boolean, isMutable: boolean, /** Used for constructor default values (e.g. `withConstructorDefault` API) */ constructorDefault?: Link | undefined, annotations?: Schema.Annotations.Key<unknown> | undefined) => Context;
|
|
507
|
+
/**
|
|
508
|
+
* Non-empty array of validation {@link Check} values attached to an AST node's
|
|
509
|
+
* `checks` field.
|
|
500
510
|
*
|
|
501
511
|
* **Details**
|
|
502
512
|
*
|
|
@@ -511,43 +521,16 @@ export declare class Context {
|
|
|
511
521
|
*/
|
|
512
522
|
export type Checks = readonly [Check<any>, ...Array<Check<any>>];
|
|
513
523
|
declare const TypeId = "~effect/Schema";
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
* **Details**
|
|
518
|
-
*
|
|
519
|
-
* Every AST node extends `Base` and inherits these fields:
|
|
520
|
-
*
|
|
521
|
-
* - `annotations` — user-supplied metadata (identifier, title, description,
|
|
522
|
-
* arbitrary keys).
|
|
523
|
-
* - `checks` — optional {@link Checks} for post-type-match validation.
|
|
524
|
-
* - `encoding` — optional {@link Encoding} chain for type ↔ wire
|
|
525
|
-
* transformations.
|
|
526
|
-
* - `context` — optional {@link Context} for per-property metadata.
|
|
527
|
-
*
|
|
528
|
-
* Subclasses add a `_tag` discriminant and variant-specific data.
|
|
529
|
-
*
|
|
530
|
-
* @see {@link AST}
|
|
531
|
-
* @category models
|
|
532
|
-
* @since 4.0.0
|
|
533
|
-
*/
|
|
534
|
-
export declare abstract class Base {
|
|
535
|
-
readonly [TypeId] = "~effect/Schema";
|
|
536
|
-
abstract readonly _tag: string;
|
|
524
|
+
interface ASTNode {
|
|
525
|
+
readonly [TypeId]: typeof TypeId;
|
|
526
|
+
readonly _tag: string;
|
|
537
527
|
readonly annotations: Schema.Annotations.Annotations | undefined;
|
|
538
528
|
readonly checks: Checks | undefined;
|
|
539
529
|
readonly encoding: Encoding | undefined;
|
|
540
530
|
readonly context: Context | undefined;
|
|
541
|
-
constructor(annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined);
|
|
542
531
|
toString(): string;
|
|
543
532
|
}
|
|
544
|
-
|
|
545
|
-
* Parser factory carried by a {@link Declaration}.
|
|
546
|
-
*
|
|
547
|
-
* @category models
|
|
548
|
-
* @since 4.0.0
|
|
549
|
-
*/
|
|
550
|
-
export type DeclarationRun = (typeParameters: ReadonlyArray<AST>) => (input: unknown, self: Declaration, options: ParseOptions) => Effect.Effect<any, SchemaIssue.Issue, any>;
|
|
533
|
+
type DeclarationRun = (typeParameters: ReadonlyArray<AST>) => (input: unknown, self: Declaration, options: ParseOptions) => Effect.Effect<any, SchemaIssue.Issue>;
|
|
551
534
|
/**
|
|
552
535
|
* AST node for user-defined opaque types with custom parsing logic.
|
|
553
536
|
*
|
|
@@ -561,25 +544,31 @@ export type DeclarationRun = (typeParameters: ReadonlyArray<AST>) => (input: unk
|
|
|
561
544
|
* - `typeParameters` — inner schemas this declaration is parameterized over
|
|
562
545
|
* (e.g. the element type for a custom collection).
|
|
563
546
|
* - `run` — factory that receives `typeParameters` and returns a parser that
|
|
564
|
-
* validates or transforms raw input.
|
|
547
|
+
* validates or transforms raw input. The `Effect` returned by the parser must
|
|
548
|
+
* complete synchronously.
|
|
565
549
|
*
|
|
566
550
|
* @see {@link isDeclaration}
|
|
567
551
|
* @category models
|
|
568
|
-
* @since
|
|
552
|
+
* @since 4.0.0
|
|
569
553
|
*/
|
|
570
|
-
export
|
|
571
|
-
readonly _tag
|
|
554
|
+
export interface Declaration extends ASTNode {
|
|
555
|
+
readonly _tag: "Declaration";
|
|
572
556
|
readonly typeParameters: ReadonlyArray<AST>;
|
|
573
557
|
readonly run: DeclarationRun;
|
|
574
558
|
readonly encodingChecks: Checks | undefined;
|
|
575
559
|
/**
|
|
576
560
|
* Parser factory {@link flip} swaps in, so a declaration can behave
|
|
577
|
-
* differently when encoding. `undefined` reuses
|
|
561
|
+
* differently when encoding. `undefined` reuses `run`.
|
|
578
562
|
*/
|
|
579
563
|
readonly encodingRun: DeclarationRun | undefined;
|
|
580
|
-
constructor(typeParameters: ReadonlyArray<AST>, run: DeclarationRun, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context, encodingChecks?: Checks, encodingRun?: DeclarationRun);
|
|
581
|
-
private _rebuild;
|
|
582
564
|
}
|
|
565
|
+
/**
|
|
566
|
+
* Constructs a {@link Declaration}.
|
|
567
|
+
*
|
|
568
|
+
* @category constructors
|
|
569
|
+
* @since 4.0.0
|
|
570
|
+
*/
|
|
571
|
+
export declare const Declaration: new (typeParameters: ReadonlyArray<AST>, run: DeclarationRun, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context, encodingChecks?: Checks, encodingRun?: DeclarationRun) => Declaration;
|
|
583
572
|
/**
|
|
584
573
|
* AST node matching the `null` literal value.
|
|
585
574
|
*
|
|
@@ -592,9 +581,16 @@ export declare class Declaration extends Base {
|
|
|
592
581
|
* @category models
|
|
593
582
|
* @since 4.0.0
|
|
594
583
|
*/
|
|
595
|
-
export
|
|
596
|
-
readonly _tag
|
|
584
|
+
export interface Null extends ASTNode {
|
|
585
|
+
readonly _tag: "Null";
|
|
597
586
|
}
|
|
587
|
+
/**
|
|
588
|
+
* Constructs a {@link Null}.
|
|
589
|
+
*
|
|
590
|
+
* @category constructors
|
|
591
|
+
* @since 4.0.0
|
|
592
|
+
*/
|
|
593
|
+
export declare const Null: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Null;
|
|
598
594
|
declare const null_: Null;
|
|
599
595
|
export {
|
|
600
596
|
/**
|
|
@@ -621,9 +617,16 @@ null_ as null };
|
|
|
621
617
|
* @category models
|
|
622
618
|
* @since 4.0.0
|
|
623
619
|
*/
|
|
624
|
-
export
|
|
625
|
-
readonly _tag
|
|
620
|
+
export interface Undefined extends ASTNode {
|
|
621
|
+
readonly _tag: "Undefined";
|
|
626
622
|
}
|
|
623
|
+
/**
|
|
624
|
+
* Constructs a {@link Undefined}.
|
|
625
|
+
*
|
|
626
|
+
* @category constructors
|
|
627
|
+
* @since 4.0.0
|
|
628
|
+
*/
|
|
629
|
+
export declare const Undefined: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Undefined;
|
|
627
630
|
declare const undefined_: Undefined;
|
|
628
631
|
export {
|
|
629
632
|
/**
|
|
@@ -658,9 +661,16 @@ undefined_ as undefined };
|
|
|
658
661
|
* @category models
|
|
659
662
|
* @since 4.0.0
|
|
660
663
|
*/
|
|
661
|
-
export
|
|
662
|
-
readonly _tag
|
|
664
|
+
export interface Void extends ASTNode {
|
|
665
|
+
readonly _tag: "Void";
|
|
663
666
|
}
|
|
667
|
+
/**
|
|
668
|
+
* Constructs a {@link Void}.
|
|
669
|
+
*
|
|
670
|
+
* @category constructors
|
|
671
|
+
* @since 4.0.0
|
|
672
|
+
*/
|
|
673
|
+
export declare const Void: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Void;
|
|
664
674
|
declare const void_: Void;
|
|
665
675
|
export {
|
|
666
676
|
/**
|
|
@@ -697,9 +707,16 @@ void_ as void };
|
|
|
697
707
|
* @category models
|
|
698
708
|
* @since 4.0.0
|
|
699
709
|
*/
|
|
700
|
-
export
|
|
701
|
-
readonly _tag
|
|
710
|
+
export interface Never extends ASTNode {
|
|
711
|
+
readonly _tag: "Never";
|
|
702
712
|
}
|
|
713
|
+
/**
|
|
714
|
+
* Constructs a {@link Never}.
|
|
715
|
+
*
|
|
716
|
+
* @category constructors
|
|
717
|
+
* @since 4.0.0
|
|
718
|
+
*/
|
|
719
|
+
export declare const Never: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Never;
|
|
703
720
|
/**
|
|
704
721
|
* Provides the singleton {@link Never} AST instance.
|
|
705
722
|
*
|
|
@@ -724,9 +741,16 @@ export declare const never: Never;
|
|
|
724
741
|
* @category models
|
|
725
742
|
* @since 4.0.0
|
|
726
743
|
*/
|
|
727
|
-
export
|
|
728
|
-
readonly _tag
|
|
744
|
+
export interface Any extends ASTNode {
|
|
745
|
+
readonly _tag: "Any";
|
|
729
746
|
}
|
|
747
|
+
/**
|
|
748
|
+
* Constructs a {@link Any}.
|
|
749
|
+
*
|
|
750
|
+
* @category constructors
|
|
751
|
+
* @since 4.0.0
|
|
752
|
+
*/
|
|
753
|
+
export declare const Any: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Any;
|
|
730
754
|
/**
|
|
731
755
|
* Provides the singleton {@link Any} AST instance.
|
|
732
756
|
*
|
|
@@ -754,9 +778,16 @@ export declare const any: Any;
|
|
|
754
778
|
* @category models
|
|
755
779
|
* @since 4.0.0
|
|
756
780
|
*/
|
|
757
|
-
export
|
|
758
|
-
readonly _tag
|
|
781
|
+
export interface Unknown extends ASTNode {
|
|
782
|
+
readonly _tag: "Unknown";
|
|
759
783
|
}
|
|
784
|
+
/**
|
|
785
|
+
* Constructs a {@link Unknown}.
|
|
786
|
+
*
|
|
787
|
+
* @category constructors
|
|
788
|
+
* @since 4.0.0
|
|
789
|
+
*/
|
|
790
|
+
export declare const Unknown: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Unknown;
|
|
760
791
|
/**
|
|
761
792
|
* Provides the singleton {@link Unknown} AST instance.
|
|
762
793
|
*
|
|
@@ -779,11 +810,18 @@ export declare const unknown: Unknown;
|
|
|
779
810
|
* @see {@link isObjectKeyword}
|
|
780
811
|
*
|
|
781
812
|
* @category models
|
|
782
|
-
* @since
|
|
813
|
+
* @since 4.0.0
|
|
783
814
|
*/
|
|
784
|
-
export
|
|
785
|
-
readonly _tag
|
|
815
|
+
export interface ObjectKeyword extends ASTNode {
|
|
816
|
+
readonly _tag: "ObjectKeyword";
|
|
786
817
|
}
|
|
818
|
+
/**
|
|
819
|
+
* Constructs a {@link ObjectKeyword}.
|
|
820
|
+
*
|
|
821
|
+
* @category constructors
|
|
822
|
+
* @since 4.0.0
|
|
823
|
+
*/
|
|
824
|
+
export declare const ObjectKeyword: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => ObjectKeyword;
|
|
787
825
|
/**
|
|
788
826
|
* Provides the singleton {@link ObjectKeyword} AST instance.
|
|
789
827
|
*
|
|
@@ -811,11 +849,23 @@ export declare const objectKeyword: ObjectKeyword;
|
|
|
811
849
|
* @category models
|
|
812
850
|
* @since 4.0.0
|
|
813
851
|
*/
|
|
814
|
-
export
|
|
815
|
-
readonly _tag
|
|
816
|
-
readonly enums: ReadonlyArray<readonly [
|
|
817
|
-
|
|
852
|
+
export interface Enum extends ASTNode {
|
|
853
|
+
readonly _tag: "Enum";
|
|
854
|
+
readonly enums: ReadonlyArray<readonly [
|
|
855
|
+
string,
|
|
856
|
+
string | number
|
|
857
|
+
]>;
|
|
818
858
|
}
|
|
859
|
+
/**
|
|
860
|
+
* Constructs a {@link Enum}. Numeric values must be finite.
|
|
861
|
+
*
|
|
862
|
+
* @category constructors
|
|
863
|
+
* @since 4.0.0
|
|
864
|
+
*/
|
|
865
|
+
export declare const Enum: new (enums: ReadonlyArray<readonly [
|
|
866
|
+
string,
|
|
867
|
+
string | number
|
|
868
|
+
]>, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context) => Enum;
|
|
819
869
|
/**
|
|
820
870
|
* AST node representing a TypeScript template literal type
|
|
821
871
|
* (e.g. `` `user_${string}` ``).
|
|
@@ -827,13 +877,24 @@ export declare class Enum extends Base {
|
|
|
827
877
|
*
|
|
828
878
|
* @see {@link isTemplateLiteral}
|
|
829
879
|
* @category models
|
|
830
|
-
* @since
|
|
880
|
+
* @since 4.0.0
|
|
831
881
|
*/
|
|
832
|
-
export
|
|
833
|
-
readonly _tag
|
|
882
|
+
export interface TemplateLiteral extends ASTNode {
|
|
883
|
+
readonly _tag: "TemplateLiteral";
|
|
834
884
|
readonly parts: ReadonlyArray<AST>;
|
|
835
|
-
constructor(parts: ReadonlyArray<AST>, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context);
|
|
836
885
|
}
|
|
886
|
+
/**
|
|
887
|
+
* Constructs a {@link TemplateLiteral}.
|
|
888
|
+
*
|
|
889
|
+
* **Gotchas**
|
|
890
|
+
*
|
|
891
|
+
* Throws if a part contains an encoding, including inside unions or nested
|
|
892
|
+
* template literals. Parts must describe their values without transformations.
|
|
893
|
+
*
|
|
894
|
+
* @category constructors
|
|
895
|
+
* @since 4.0.0
|
|
896
|
+
*/
|
|
897
|
+
export declare const TemplateLiteral: new (parts: ReadonlyArray<AST>, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context) => TemplateLiteral;
|
|
837
898
|
/**
|
|
838
899
|
* AST node matching a specific `unique symbol` value.
|
|
839
900
|
*
|
|
@@ -844,13 +905,19 @@ export declare class TemplateLiteral extends Base {
|
|
|
844
905
|
*
|
|
845
906
|
* @see {@link isUniqueSymbol}
|
|
846
907
|
* @category models
|
|
847
|
-
* @since
|
|
908
|
+
* @since 4.0.0
|
|
848
909
|
*/
|
|
849
|
-
export
|
|
850
|
-
readonly _tag
|
|
910
|
+
export interface UniqueSymbol extends ASTNode {
|
|
911
|
+
readonly _tag: "UniqueSymbol";
|
|
851
912
|
readonly symbol: symbol;
|
|
852
|
-
constructor(symbol: symbol, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context);
|
|
853
913
|
}
|
|
914
|
+
/**
|
|
915
|
+
* Constructs a {@link UniqueSymbol}.
|
|
916
|
+
*
|
|
917
|
+
* @category constructors
|
|
918
|
+
* @since 4.0.0
|
|
919
|
+
*/
|
|
920
|
+
export declare const UniqueSymbol: new (symbol: symbol, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context) => UniqueSymbol;
|
|
854
921
|
/**
|
|
855
922
|
* The set of primitive types that can appear as a {@link Literal} value.
|
|
856
923
|
*
|
|
@@ -867,8 +934,10 @@ export type LiteralValue = string | number | boolean | bigint;
|
|
|
867
934
|
* **Details**
|
|
868
935
|
*
|
|
869
936
|
* Parsing succeeds only when the input is strictly equal (`===`) to the
|
|
870
|
-
* stored `literal
|
|
871
|
-
* and
|
|
937
|
+
* stored `literal`, preserving the input value. Both `0` and `-0` are accepted
|
|
938
|
+
* by either zero literal, and parsing preserves the input's sign. Numeric
|
|
939
|
+
* literals must be finite. `Infinity`, `-Infinity`, and `NaN` are rejected at
|
|
940
|
+
* construction time.
|
|
872
941
|
*
|
|
873
942
|
* **Example** (Creating a literal AST)
|
|
874
943
|
*
|
|
@@ -882,13 +951,19 @@ export type LiteralValue = string | number | boolean | bigint;
|
|
|
882
951
|
* @see {@link LiteralValue}
|
|
883
952
|
* @see {@link isLiteral}
|
|
884
953
|
* @category models
|
|
885
|
-
* @since
|
|
954
|
+
* @since 4.0.0
|
|
886
955
|
*/
|
|
887
|
-
export
|
|
888
|
-
readonly _tag
|
|
956
|
+
export interface Literal extends ASTNode {
|
|
957
|
+
readonly _tag: "Literal";
|
|
889
958
|
readonly literal: LiteralValue;
|
|
890
|
-
constructor(literal: LiteralValue, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context);
|
|
891
959
|
}
|
|
960
|
+
/**
|
|
961
|
+
* Constructs a {@link Literal}.
|
|
962
|
+
*
|
|
963
|
+
* @category constructors
|
|
964
|
+
* @since 4.0.0
|
|
965
|
+
*/
|
|
966
|
+
export declare const Literal: new (literal: LiteralValue, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context) => Literal;
|
|
892
967
|
/**
|
|
893
968
|
* AST node matching any `string` value.
|
|
894
969
|
*
|
|
@@ -898,9 +973,16 @@ export declare class Literal extends Base {
|
|
|
898
973
|
* @category models
|
|
899
974
|
* @since 4.0.0
|
|
900
975
|
*/
|
|
901
|
-
export
|
|
902
|
-
readonly _tag
|
|
976
|
+
export interface String extends ASTNode {
|
|
977
|
+
readonly _tag: "String";
|
|
903
978
|
}
|
|
979
|
+
/**
|
|
980
|
+
* Constructs a {@link String}.
|
|
981
|
+
*
|
|
982
|
+
* @category constructors
|
|
983
|
+
* @since 4.0.0
|
|
984
|
+
*/
|
|
985
|
+
export declare const String: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => String;
|
|
904
986
|
/**
|
|
905
987
|
* Provides the singleton {@link String} AST instance.
|
|
906
988
|
*
|
|
@@ -934,10 +1016,16 @@ export declare const string: String;
|
|
|
934
1016
|
* @category models
|
|
935
1017
|
* @since 4.0.0
|
|
936
1018
|
*/
|
|
937
|
-
export
|
|
938
|
-
readonly _tag
|
|
939
|
-
private _match;
|
|
1019
|
+
export interface Number extends ASTNode {
|
|
1020
|
+
readonly _tag: "Number";
|
|
940
1021
|
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Constructs a {@link Number}.
|
|
1024
|
+
*
|
|
1025
|
+
* @category constructors
|
|
1026
|
+
* @since 4.0.0
|
|
1027
|
+
*/
|
|
1028
|
+
export declare const Number: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Number;
|
|
941
1029
|
/**
|
|
942
1030
|
* Provides the singleton {@link Number} AST instance.
|
|
943
1031
|
*
|
|
@@ -962,9 +1050,16 @@ export declare const number: Number;
|
|
|
962
1050
|
* @category models
|
|
963
1051
|
* @since 4.0.0
|
|
964
1052
|
*/
|
|
965
|
-
export
|
|
966
|
-
readonly _tag
|
|
1053
|
+
export interface Boolean extends ASTNode {
|
|
1054
|
+
readonly _tag: "Boolean";
|
|
967
1055
|
}
|
|
1056
|
+
/**
|
|
1057
|
+
* Constructs a {@link Boolean}.
|
|
1058
|
+
*
|
|
1059
|
+
* @category constructors
|
|
1060
|
+
* @since 4.0.0
|
|
1061
|
+
*/
|
|
1062
|
+
export declare const Boolean: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Boolean;
|
|
968
1063
|
/**
|
|
969
1064
|
* Provides the singleton {@link Boolean} AST instance.
|
|
970
1065
|
*
|
|
@@ -998,9 +1093,16 @@ export declare const boolean: Boolean;
|
|
|
998
1093
|
* @category models
|
|
999
1094
|
* @since 4.0.0
|
|
1000
1095
|
*/
|
|
1001
|
-
export
|
|
1002
|
-
readonly _tag
|
|
1096
|
+
export interface Symbol extends ASTNode {
|
|
1097
|
+
readonly _tag: "Symbol";
|
|
1003
1098
|
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Constructs a {@link Symbol}.
|
|
1101
|
+
*
|
|
1102
|
+
* @category constructors
|
|
1103
|
+
* @since 4.0.0
|
|
1104
|
+
*/
|
|
1105
|
+
export declare const Symbol: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => Symbol;
|
|
1004
1106
|
/**
|
|
1005
1107
|
* Provides the singleton {@link Symbol} AST instance.
|
|
1006
1108
|
*
|
|
@@ -1033,9 +1135,16 @@ export declare const symbol: Symbol;
|
|
|
1033
1135
|
* @category models
|
|
1034
1136
|
* @since 4.0.0
|
|
1035
1137
|
*/
|
|
1036
|
-
export
|
|
1037
|
-
readonly _tag
|
|
1138
|
+
export interface BigInt extends ASTNode {
|
|
1139
|
+
readonly _tag: "BigInt";
|
|
1038
1140
|
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Constructs a {@link BigInt}.
|
|
1143
|
+
*
|
|
1144
|
+
* @category constructors
|
|
1145
|
+
* @since 4.0.0
|
|
1146
|
+
*/
|
|
1147
|
+
export declare const BigInt: new (annotations?: Schema.Annotations.Annotations | undefined, checks?: Checks | undefined, encoding?: Encoding | undefined, context?: Context | undefined) => BigInt;
|
|
1039
1148
|
/**
|
|
1040
1149
|
* Provides the singleton {@link BigInt} AST instance.
|
|
1041
1150
|
*
|
|
@@ -1062,7 +1171,7 @@ export declare const bigInt: BigInt;
|
|
|
1062
1171
|
* **Details**
|
|
1063
1172
|
*
|
|
1064
1173
|
* - `elements` — positional element types (tuple elements). An element is
|
|
1065
|
-
* optional if its
|
|
1174
|
+
* optional if its context's `isOptional` field is `true`.
|
|
1066
1175
|
* - `rest` — the rest/variadic element types. When non-empty, the first
|
|
1067
1176
|
* entry is the "spread" type (e.g. `...Array<string>`), and subsequent
|
|
1068
1177
|
* entries are trailing positional elements after the spread.
|
|
@@ -1093,15 +1202,20 @@ export declare const bigInt: BigInt;
|
|
|
1093
1202
|
* @category models
|
|
1094
1203
|
* @since 4.0.0
|
|
1095
1204
|
*/
|
|
1096
|
-
export
|
|
1097
|
-
readonly _tag
|
|
1205
|
+
export interface Arrays extends ASTNode {
|
|
1206
|
+
readonly _tag: "Arrays";
|
|
1098
1207
|
readonly isMutable: boolean;
|
|
1099
1208
|
readonly elements: ReadonlyArray<AST>;
|
|
1100
1209
|
readonly rest: ReadonlyArray<AST>;
|
|
1101
1210
|
readonly encodingChecks: Checks | undefined;
|
|
1102
|
-
constructor(isMutable: boolean, elements: ReadonlyArray<AST>, rest: ReadonlyArray<AST>, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context, encodingChecks?: Checks);
|
|
1103
|
-
private _rebuild;
|
|
1104
1211
|
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Constructs a {@link Arrays}.
|
|
1214
|
+
*
|
|
1215
|
+
* @category constructors
|
|
1216
|
+
* @since 4.0.0
|
|
1217
|
+
*/
|
|
1218
|
+
export declare const Arrays: new (isMutable: boolean, elements: ReadonlyArray<AST>, rest: ReadonlyArray<AST>, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context, encodingChecks?: Checks) => Arrays;
|
|
1105
1219
|
/**
|
|
1106
1220
|
* Represents a named property within an {@link Objects} node.
|
|
1107
1221
|
*
|
|
@@ -1113,13 +1227,19 @@ export declare class Arrays extends Base {
|
|
|
1113
1227
|
*
|
|
1114
1228
|
* @see {@link Objects}
|
|
1115
1229
|
* @category models
|
|
1116
|
-
* @since
|
|
1230
|
+
* @since 4.0.0
|
|
1117
1231
|
*/
|
|
1118
|
-
export
|
|
1232
|
+
export interface PropertySignature {
|
|
1119
1233
|
readonly name: PropertyKey;
|
|
1120
1234
|
readonly type: AST;
|
|
1121
|
-
constructor(name: PropertyKey, type: AST);
|
|
1122
1235
|
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Constructs a {@link PropertySignature}.
|
|
1238
|
+
*
|
|
1239
|
+
* @category constructors
|
|
1240
|
+
* @since 4.0.0
|
|
1241
|
+
*/
|
|
1242
|
+
export declare const PropertySignature: new (name: PropertyKey, type: AST) => PropertySignature;
|
|
1123
1243
|
type IndexSignatureParameter = String | Number | Symbol | TemplateLiteral | Union<IndexSignatureParameter>;
|
|
1124
1244
|
/**
|
|
1125
1245
|
* Represents an index signature entry within an {@link Objects} node.
|
|
@@ -1143,13 +1263,19 @@ type IndexSignatureParameter = String | Number | Symbol | TemplateLiteral | Unio
|
|
|
1143
1263
|
* @see {@link Objects}
|
|
1144
1264
|
* @see {@link PropertySignature}
|
|
1145
1265
|
* @category models
|
|
1146
|
-
* @since
|
|
1266
|
+
* @since 4.0.0
|
|
1147
1267
|
*/
|
|
1148
|
-
export
|
|
1268
|
+
export interface IndexSignature {
|
|
1149
1269
|
readonly parameter: IndexSignatureParameter;
|
|
1150
1270
|
readonly type: AST;
|
|
1151
|
-
constructor(parameter: AST, type: AST);
|
|
1152
1271
|
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Constructs a {@link IndexSignature}.
|
|
1274
|
+
*
|
|
1275
|
+
* @category constructors
|
|
1276
|
+
* @since 4.0.0
|
|
1277
|
+
*/
|
|
1278
|
+
export declare const IndexSignature: new (parameter: AST, type: AST) => IndexSignature;
|
|
1153
1279
|
/**
|
|
1154
1280
|
* AST node for object-like schemas, including structs and records.
|
|
1155
1281
|
*
|
|
@@ -1192,21 +1318,26 @@ export declare class IndexSignature {
|
|
|
1192
1318
|
* @category models
|
|
1193
1319
|
* @since 4.0.0
|
|
1194
1320
|
*/
|
|
1195
|
-
export
|
|
1196
|
-
readonly _tag
|
|
1321
|
+
export interface Objects extends ASTNode {
|
|
1322
|
+
readonly _tag: "Objects";
|
|
1197
1323
|
readonly propertySignatures: ReadonlyArray<PropertySignature>;
|
|
1198
1324
|
readonly indexSignatures: ReadonlyArray<IndexSignature>;
|
|
1199
1325
|
readonly encodingChecks: Checks | undefined;
|
|
1200
|
-
constructor(propertySignatures: ReadonlyArray<PropertySignature>, indexSignatures: ReadonlyArray<IndexSignature>, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context, encodingChecks?: Checks);
|
|
1201
|
-
private _rebuild;
|
|
1202
1326
|
}
|
|
1327
|
+
/**
|
|
1328
|
+
* Constructs a {@link Objects}.
|
|
1329
|
+
*
|
|
1330
|
+
* @category constructors
|
|
1331
|
+
* @since 4.0.0
|
|
1332
|
+
*/
|
|
1333
|
+
export declare const Objects: new (propertySignatures: ReadonlyArray<PropertySignature>, indexSignatures: ReadonlyArray<IndexSignature>, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context, encodingChecks?: Checks) => Objects;
|
|
1203
1334
|
/**
|
|
1204
1335
|
* AST node representing a union of schemas.
|
|
1205
1336
|
*
|
|
1206
1337
|
* **Details**
|
|
1207
1338
|
*
|
|
1208
1339
|
* - `types` — the member AST nodes.
|
|
1209
|
-
* - `mode`
|
|
1340
|
+
* - `options.mode` selects matching behavior. `"anyOf"` succeeds on the first match;
|
|
1210
1341
|
* `"oneOf"` requires exactly one member to match (fails if multiple do).
|
|
1211
1342
|
*
|
|
1212
1343
|
* During parsing, members are tried in order. An internal candidate index
|
|
@@ -1222,22 +1353,37 @@ export declare class Objects extends Base {
|
|
|
1222
1353
|
* const ast = schema.ast
|
|
1223
1354
|
*
|
|
1224
1355
|
* if (SchemaAST.isUnion(ast)) {
|
|
1225
|
-
* [ast.types.length, ast.mode] // => [2, "anyOf"]
|
|
1356
|
+
* [ast.types.length, ast.options?.mode ?? "anyOf"] // => [2, "anyOf"]
|
|
1226
1357
|
* }
|
|
1227
1358
|
* ```
|
|
1228
1359
|
*
|
|
1229
1360
|
* @see {@link isUnion}
|
|
1230
1361
|
* @category models
|
|
1231
|
-
* @since
|
|
1362
|
+
* @since 4.0.0
|
|
1232
1363
|
*/
|
|
1233
|
-
export
|
|
1234
|
-
readonly _tag
|
|
1364
|
+
export interface Union<A extends AST = AST> extends ASTNode {
|
|
1365
|
+
readonly _tag: "Union";
|
|
1235
1366
|
readonly types: ReadonlyArray<A>;
|
|
1236
|
-
readonly
|
|
1367
|
+
readonly options: UnionOptions | undefined;
|
|
1237
1368
|
readonly encodingChecks: Checks | undefined;
|
|
1238
|
-
constructor(types: ReadonlyArray<A>, mode: "anyOf" | "oneOf", annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context, encodingChecks?: Checks);
|
|
1239
|
-
private _rebuild;
|
|
1240
1369
|
}
|
|
1370
|
+
/**
|
|
1371
|
+
* Local matching options stored on {@link Union} nodes.
|
|
1372
|
+
*
|
|
1373
|
+
* @category options
|
|
1374
|
+
* @since 4.0.0
|
|
1375
|
+
*/
|
|
1376
|
+
export interface UnionOptions {
|
|
1377
|
+
/** Defaults to `"anyOf"`; `"oneOf"` requires exactly one matching member. */
|
|
1378
|
+
readonly mode?: "anyOf" | "oneOf" | undefined;
|
|
1379
|
+
}
|
|
1380
|
+
/**
|
|
1381
|
+
* Constructs a {@link Union}.
|
|
1382
|
+
*
|
|
1383
|
+
* @category constructors
|
|
1384
|
+
* @since 4.0.0
|
|
1385
|
+
*/
|
|
1386
|
+
export declare const Union: new <A extends AST = AST>(types: ReadonlyArray<A>, options?: UnionOptions, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context, encodingChecks?: Checks) => Union<A>;
|
|
1241
1387
|
/**
|
|
1242
1388
|
* AST node for lazy/recursive schemas.
|
|
1243
1389
|
*
|
|
@@ -1267,13 +1413,19 @@ export declare class Union<A extends AST = AST> extends Base {
|
|
|
1267
1413
|
*
|
|
1268
1414
|
* @see {@link isSuspend}
|
|
1269
1415
|
* @category models
|
|
1270
|
-
* @since
|
|
1416
|
+
* @since 4.0.0
|
|
1271
1417
|
*/
|
|
1272
|
-
export
|
|
1273
|
-
readonly _tag
|
|
1418
|
+
export interface Suspend extends ASTNode {
|
|
1419
|
+
readonly _tag: "Suspend";
|
|
1274
1420
|
readonly thunk: () => AST;
|
|
1275
|
-
constructor(thunk: () => AST, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context);
|
|
1276
1421
|
}
|
|
1422
|
+
/**
|
|
1423
|
+
* Constructs a {@link Suspend}.
|
|
1424
|
+
*
|
|
1425
|
+
* @category constructors
|
|
1426
|
+
* @since 4.0.0
|
|
1427
|
+
*/
|
|
1428
|
+
export declare const Suspend: new (thunk: () => AST, annotations?: Schema.Annotations.Annotations, checks?: Checks, encoding?: Encoding, context?: Context) => Suspend;
|
|
1277
1429
|
/**
|
|
1278
1430
|
* Represents a single validation check attached to an AST node.
|
|
1279
1431
|
*
|
|
@@ -1295,23 +1447,27 @@ export declare class Suspend extends Base {
|
|
|
1295
1447
|
* @category models
|
|
1296
1448
|
* @since 4.0.0
|
|
1297
1449
|
*/
|
|
1298
|
-
export
|
|
1299
|
-
readonly _tag
|
|
1450
|
+
export interface Filter<in E> extends Pipeable.Pipeable {
|
|
1451
|
+
readonly _tag: "Filter";
|
|
1300
1452
|
readonly run: (input: E, self: AST, options: ParseOptions) => SchemaIssue.Issue | undefined;
|
|
1301
1453
|
readonly annotations: Schema.Annotations.Filter | undefined;
|
|
1302
1454
|
/**
|
|
1303
1455
|
* Whether the parsing process should be aborted after this check has failed.
|
|
1304
1456
|
*/
|
|
1305
1457
|
readonly aborted: boolean;
|
|
1306
|
-
constructor(run: (input: E, self: AST, options: ParseOptions) => SchemaIssue.Issue | undefined, annotations?: Schema.Annotations.Filter | undefined,
|
|
1307
|
-
/**
|
|
1308
|
-
* Whether the parsing process should be aborted after this check has failed.
|
|
1309
|
-
*/
|
|
1310
|
-
aborted?: boolean);
|
|
1311
1458
|
annotate(annotations: Schema.Annotations.Filter): Filter<E>;
|
|
1312
1459
|
abort(): Filter<E>;
|
|
1313
1460
|
and(other: Check<E>, annotations?: Schema.Annotations.Filter): FilterGroup<E>;
|
|
1314
1461
|
}
|
|
1462
|
+
/**
|
|
1463
|
+
* Constructs a {@link Filter}.
|
|
1464
|
+
*
|
|
1465
|
+
* @category constructors
|
|
1466
|
+
* @since 4.0.0
|
|
1467
|
+
*/
|
|
1468
|
+
export declare const Filter: new <E>(run: (input: E, self: AST, options: ParseOptions) => SchemaIssue.Issue | undefined, annotations?: Schema.Annotations.Filter | undefined, /**
|
|
1469
|
+
* Whether the parsing process should be aborted after this check has failed.
|
|
1470
|
+
*/ aborted?: boolean) => Filter<E>;
|
|
1315
1471
|
/**
|
|
1316
1472
|
* Represents a composite validation check grouping multiple {@link Check} values.
|
|
1317
1473
|
*
|
|
@@ -1326,21 +1482,33 @@ export declare class Filter<in E> extends Pipeable.Class {
|
|
|
1326
1482
|
* @category models
|
|
1327
1483
|
* @since 4.0.0
|
|
1328
1484
|
*/
|
|
1329
|
-
export
|
|
1330
|
-
readonly _tag
|
|
1331
|
-
readonly checks: readonly [
|
|
1485
|
+
export interface FilterGroup<in E> extends Pipeable.Pipeable {
|
|
1486
|
+
readonly _tag: "FilterGroup";
|
|
1487
|
+
readonly checks: readonly [
|
|
1488
|
+
Check<E>,
|
|
1489
|
+
...Array<Check<E>>
|
|
1490
|
+
];
|
|
1332
1491
|
readonly annotations: Schema.Annotations.Filter | undefined;
|
|
1333
|
-
constructor(checks: readonly [Check<E>, ...Array<Check<E>>], annotations?: Schema.Annotations.Filter | undefined);
|
|
1334
1492
|
annotate(annotations: Schema.Annotations.Filter): FilterGroup<E>;
|
|
1335
1493
|
and(other: Check<E>, annotations?: Schema.Annotations.Filter): FilterGroup<E>;
|
|
1336
1494
|
}
|
|
1495
|
+
/**
|
|
1496
|
+
* Constructs a {@link FilterGroup}.
|
|
1497
|
+
*
|
|
1498
|
+
* @category constructors
|
|
1499
|
+
* @since 4.0.0
|
|
1500
|
+
*/
|
|
1501
|
+
export declare const FilterGroup: new <E>(checks: readonly [
|
|
1502
|
+
Check<E>,
|
|
1503
|
+
...Array<Check<E>>
|
|
1504
|
+
], annotations?: Schema.Annotations.Filter | undefined) => FilterGroup<E>;
|
|
1337
1505
|
/**
|
|
1338
1506
|
* A validation check — either a single {@link Filter} or a composite
|
|
1339
1507
|
* {@link FilterGroup}.
|
|
1340
1508
|
*
|
|
1341
1509
|
* **Details**
|
|
1342
1510
|
*
|
|
1343
|
-
* Stored in
|
|
1511
|
+
* Stored in an AST node's {@link Checks} array.
|
|
1344
1512
|
*
|
|
1345
1513
|
* @see {@link Filter}
|
|
1346
1514
|
* @see {@link FilterGroup}
|
|
@@ -1367,8 +1535,12 @@ export type Check<T> = Filter<T> | FilterGroup<T>;
|
|
|
1367
1535
|
*
|
|
1368
1536
|
* **Gotchas**
|
|
1369
1537
|
*
|
|
1370
|
-
*
|
|
1371
|
-
* flags
|
|
1538
|
+
* Arbitrary metadata preserves both `regExp.source` and `regExp.flags`.
|
|
1539
|
+
* Implementations that cannot consume all flags may still use the source as a
|
|
1540
|
+
* generation hint because the Schema filter validates every generated value.
|
|
1541
|
+
* JSON Schema has no way to carry JavaScript regular-expression flags. The
|
|
1542
|
+
* generated `pattern` contains the source only, so validation can differ when
|
|
1543
|
+
* the RegExp uses flags or relies on JavaScript's non-Unicode behavior.
|
|
1372
1544
|
*
|
|
1373
1545
|
* **Example** (Validating an email pattern)
|
|
1374
1546
|
*
|
|
@@ -1392,9 +1564,8 @@ export declare function mapOrSame<A>(as: ReadonlyArray<A>, f: (a: A) => A): Read
|
|
|
1392
1564
|
*
|
|
1393
1565
|
* **Details**
|
|
1394
1566
|
*
|
|
1395
|
-
* This is the low-level primitive behind `Schema.
|
|
1396
|
-
*
|
|
1397
|
-
* encoding chain.
|
|
1567
|
+
* This is the low-level primitive behind `Schema.decodeTo`. It appends a
|
|
1568
|
+
* {@link Link} to the `to` node's encoding chain.
|
|
1398
1569
|
*
|
|
1399
1570
|
* - Returns a new AST with the same type as `to`.
|
|
1400
1571
|
*
|
|
@@ -1413,7 +1584,7 @@ export declare function decodeTo<A extends AST>(from: AST, to: A, transformation
|
|
|
1413
1584
|
* Checks `ast.context?.isOptional`. Defaults to `false` when no
|
|
1414
1585
|
* {@link Context} is set.
|
|
1415
1586
|
*
|
|
1416
|
-
* @see
|
|
1587
|
+
* @see `Schema.optionalKey`
|
|
1417
1588
|
* @see {@link Context}
|
|
1418
1589
|
* @category predicates
|
|
1419
1590
|
* @since 4.0.0
|
|
@@ -1497,7 +1668,7 @@ export declare const flip: (ast: AST) => AST;
|
|
|
1497
1668
|
*
|
|
1498
1669
|
* If the node has {@link Checks}, returns annotations from the last check
|
|
1499
1670
|
* (which is where user-supplied annotations end up after `.pipe(Schema.annotations(...))`).
|
|
1500
|
-
* Otherwise returns `
|
|
1671
|
+
* Otherwise returns the node's `annotations` directly.
|
|
1501
1672
|
*
|
|
1502
1673
|
* **Example** (Reading annotations)
|
|
1503
1674
|
*
|