effect 4.0.0-beta.2 → 4.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Array.d.ts +127 -299
- package/dist/Array.d.ts.map +1 -1
- package/dist/Array.js +102 -62
- package/dist/Array.js.map +1 -1
- package/dist/Cache.d.ts +2 -2
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +6 -5
- 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 +116 -30
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +82 -37
- package/dist/Channel.js.map +1 -1
- package/dist/Chunk.d.ts +54 -247
- package/dist/Chunk.d.ts.map +1 -1
- package/dist/Chunk.js +36 -67
- package/dist/Chunk.js.map +1 -1
- package/dist/Combiner.d.ts +280 -13
- package/dist/Combiner.d.ts.map +1 -1
- package/dist/Combiner.js +198 -7
- package/dist/Combiner.js.map +1 -1
- package/dist/Config.d.ts +165 -9
- package/dist/Config.d.ts.map +1 -1
- package/dist/Config.js +62 -7
- package/dist/Config.js.map +1 -1
- package/dist/ConfigProvider.d.ts +1 -1
- package/dist/Cron.d.ts +1 -1
- package/dist/Data.d.ts +534 -365
- package/dist/Data.d.ts.map +1 -1
- package/dist/Data.js +132 -79
- package/dist/Data.js.map +1 -1
- package/dist/DateTime.d.ts +23 -161
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +6 -51
- package/dist/DateTime.js.map +1 -1
- package/dist/Duration.d.ts +12 -12
- package/dist/Duration.d.ts.map +1 -1
- package/dist/Duration.js +12 -12
- package/dist/Duration.js.map +1 -1
- package/dist/Effect.d.ts +829 -692
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +263 -251
- package/dist/Effect.js.map +1 -1
- package/dist/Encoding.d.ts +194 -0
- package/dist/Encoding.d.ts.map +1 -0
- package/dist/Encoding.js +352 -0
- package/dist/Encoding.js.map +1 -0
- package/dist/Equal.d.ts +276 -109
- package/dist/Equal.d.ts.map +1 -1
- package/dist/Equal.js +124 -48
- package/dist/Equal.js.map +1 -1
- package/dist/ErrorReporter.d.ts +376 -0
- package/dist/ErrorReporter.d.ts.map +1 -0
- package/dist/ErrorReporter.js +246 -0
- package/dist/ErrorReporter.js.map +1 -0
- package/dist/Fiber.d.ts +2 -2
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FileSystem.d.ts +1 -1
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +5 -5
- package/dist/FileSystem.js.map +1 -1
- package/dist/Filter.d.ts +30 -34
- package/dist/Filter.d.ts.map +1 -1
- package/dist/Filter.js +15 -13
- package/dist/Filter.js.map +1 -1
- package/dist/Formatter.d.ts +131 -47
- package/dist/Formatter.d.ts.map +1 -1
- package/dist/Formatter.js +229 -51
- package/dist/Formatter.js.map +1 -1
- package/dist/Graph.d.ts +1 -1
- package/dist/Graph.d.ts.map +1 -1
- package/dist/Graph.js +5 -8
- package/dist/Graph.js.map +1 -1
- package/dist/HashMap.d.ts +15 -14
- package/dist/HashMap.d.ts.map +1 -1
- package/dist/HashMap.js +4 -4
- package/dist/HashMap.js.map +1 -1
- package/dist/Iterable.d.ts +40 -39
- package/dist/Iterable.d.ts.map +1 -1
- package/dist/Iterable.js +94 -22
- package/dist/Iterable.js.map +1 -1
- package/dist/JsonSchema.d.ts +299 -10
- package/dist/JsonSchema.d.ts.map +1 -1
- package/dist/JsonSchema.js +323 -4
- package/dist/JsonSchema.js.map +1 -1
- package/dist/Latch.d.ts +109 -0
- package/dist/Latch.d.ts.map +1 -0
- package/dist/Latch.js +72 -0
- package/dist/Latch.js.map +1 -0
- package/dist/Layer.d.ts +9 -9
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +4 -4
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LogLevel.d.ts +32 -0
- package/dist/LogLevel.d.ts.map +1 -1
- package/dist/LogLevel.js +28 -100
- package/dist/LogLevel.js.map +1 -1
- package/dist/Logger.d.ts +29 -95
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js +2 -3
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +1 -1
- package/dist/ManagedRuntime.js +1 -1
- package/dist/Metric.d.ts +2 -2
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +1 -1
- package/dist/Metric.js.map +1 -1
- package/dist/Optic.d.ts +947 -18
- package/dist/Optic.d.ts.map +1 -1
- package/dist/Optic.js +454 -5
- package/dist/Optic.js.map +1 -1
- package/dist/Option.d.ts +22 -15
- package/dist/Option.d.ts.map +1 -1
- package/dist/Option.js +14 -7
- package/dist/Option.js.map +1 -1
- package/dist/Pipeable.d.ts +17 -0
- package/dist/Pipeable.d.ts.map +1 -1
- package/dist/Pipeable.js +19 -1
- package/dist/Pipeable.js.map +1 -1
- package/dist/PlatformError.d.ts +10 -9
- package/dist/PlatformError.d.ts.map +1 -1
- package/dist/PlatformError.js +2 -2
- package/dist/PlatformError.js.map +1 -1
- package/dist/Pool.d.ts +6 -4
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +7 -5
- package/dist/Pool.js.map +1 -1
- package/dist/PubSub.d.ts +3 -2
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +3 -2
- package/dist/PubSub.js.map +1 -1
- package/dist/Pull.d.ts.map +1 -1
- package/dist/Pull.js +1 -1
- package/dist/Pull.js.map +1 -1
- package/dist/Queue.d.ts.map +1 -1
- package/dist/Queue.js +0 -1
- package/dist/Queue.js.map +1 -1
- package/dist/Random.d.ts +35 -1
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +46 -12
- package/dist/Random.js.map +1 -1
- package/dist/RcMap.d.ts +2 -2
- package/dist/RcMap.d.ts.map +1 -1
- package/dist/RcMap.js +1 -1
- package/dist/RcMap.js.map +1 -1
- package/dist/RcRef.d.ts +1 -1
- package/dist/RcRef.d.ts.map +1 -1
- package/dist/Record.d.ts +24 -120
- package/dist/Record.d.ts.map +1 -1
- package/dist/Record.js +21 -41
- package/dist/Record.js.map +1 -1
- package/dist/Reducer.d.ts +166 -7
- package/dist/Reducer.d.ts.map +1 -1
- package/dist/Reducer.js +135 -1
- package/dist/Reducer.js.map +1 -1
- package/dist/References.d.ts +3 -3
- package/dist/References.d.ts.map +1 -1
- package/dist/Request.d.ts +1 -1
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js +2 -1
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts +6 -26
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +0 -20
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Result.d.ts +12 -0
- package/dist/Result.d.ts.map +1 -1
- package/dist/Result.js +12 -0
- package/dist/Result.js.map +1 -1
- package/dist/Schedule.d.ts +47 -20
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +94 -34
- package/dist/Schedule.js.map +1 -1
- package/dist/Schema.d.ts +266 -50
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +426 -74
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +7 -6
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +2 -2
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +12 -14
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaParser.d.ts +5 -0
- package/dist/SchemaParser.d.ts.map +1 -1
- package/dist/SchemaParser.js +10 -0
- package/dist/SchemaParser.js.map +1 -1
- package/dist/SchemaRepresentation.d.ts +44 -43
- package/dist/SchemaRepresentation.d.ts.map +1 -1
- package/dist/SchemaRepresentation.js +43 -24
- package/dist/SchemaRepresentation.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +107 -3
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +159 -4
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/ScopedCache.d.ts +2 -2
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +1 -1
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Semaphore.d.ts +211 -0
- package/dist/Semaphore.d.ts.map +1 -0
- package/dist/{PartitionedSemaphore.js → Semaphore.js} +97 -13
- package/dist/Semaphore.js.map +1 -0
- package/dist/ServiceMap.d.ts +39 -30
- package/dist/ServiceMap.d.ts.map +1 -1
- package/dist/ServiceMap.js +3 -3
- package/dist/ServiceMap.js.map +1 -1
- package/dist/Sink.d.ts +13 -13
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +53 -6
- package/dist/Sink.js.map +1 -1
- package/dist/Stream.d.ts +235 -423
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +124 -77
- package/dist/Stream.js.map +1 -1
- package/dist/Struct.d.ts +16 -0
- package/dist/Struct.d.ts.map +1 -1
- package/dist/Struct.js +22 -0
- package/dist/Struct.js.map +1 -1
- package/dist/SubscriptionRef.d.ts +2 -1
- package/dist/SubscriptionRef.d.ts.map +1 -1
- package/dist/SubscriptionRef.js +2 -1
- package/dist/SubscriptionRef.js.map +1 -1
- package/dist/SynchronizedRef.d.ts +2 -1
- package/dist/SynchronizedRef.d.ts.map +1 -1
- package/dist/SynchronizedRef.js +2 -1
- package/dist/SynchronizedRef.js.map +1 -1
- package/dist/Trie.d.ts +18 -17
- package/dist/Trie.d.ts.map +1 -1
- package/dist/Trie.js +5 -5
- package/dist/Trie.js.map +1 -1
- package/dist/TxChunk.d.ts +37 -37
- package/dist/TxChunk.d.ts.map +1 -1
- package/dist/TxChunk.js +3 -3
- package/dist/TxChunk.js.map +1 -1
- package/dist/TxDeferred.d.ts +328 -0
- package/dist/TxDeferred.d.ts.map +1 -0
- package/dist/TxDeferred.js +196 -0
- package/dist/TxDeferred.js.map +1 -0
- package/dist/TxHashMap.d.ts +84 -83
- package/dist/TxHashMap.d.ts.map +1 -1
- package/dist/TxHashMap.js +24 -24
- package/dist/TxHashMap.js.map +1 -1
- package/dist/TxHashSet.d.ts +35 -35
- package/dist/TxHashSet.d.ts.map +1 -1
- package/dist/TxHashSet.js +14 -14
- package/dist/TxHashSet.js.map +1 -1
- package/dist/TxPriorityQueue.d.ts +609 -0
- package/dist/TxPriorityQueue.d.ts.map +1 -0
- package/dist/TxPriorityQueue.js +415 -0
- package/dist/TxPriorityQueue.js.map +1 -0
- package/dist/TxPubSub.d.ts +585 -0
- package/dist/TxPubSub.d.ts.map +1 -0
- package/dist/TxPubSub.js +521 -0
- package/dist/TxPubSub.js.map +1 -0
- package/dist/TxQueue.d.ts +32 -32
- package/dist/TxQueue.d.ts.map +1 -1
- package/dist/TxQueue.js +26 -26
- package/dist/TxQueue.js.map +1 -1
- package/dist/TxReentrantLock.d.ts +523 -0
- package/dist/TxReentrantLock.d.ts.map +1 -0
- package/dist/TxReentrantLock.js +504 -0
- package/dist/TxReentrantLock.js.map +1 -0
- package/dist/TxRef.d.ts +34 -34
- package/dist/TxRef.d.ts.map +1 -1
- package/dist/TxRef.js +21 -14
- package/dist/TxRef.js.map +1 -1
- package/dist/TxSemaphore.d.ts +8 -8
- package/dist/TxSemaphore.d.ts.map +1 -1
- package/dist/TxSemaphore.js +7 -7
- package/dist/TxSemaphore.js.map +1 -1
- package/dist/TxSubscriptionRef.d.ts +508 -0
- package/dist/TxSubscriptionRef.d.ts.map +1 -0
- package/dist/TxSubscriptionRef.js +293 -0
- package/dist/TxSubscriptionRef.js.map +1 -0
- package/dist/Types.d.ts +84 -6
- package/dist/Types.d.ts.map +1 -1
- package/dist/index.d.ts +591 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +591 -20
- package/dist/index.js.map +1 -1
- package/dist/internal/core.js +11 -3
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/dateTime.js +3 -11
- package/dist/internal/dateTime.js.map +1 -1
- package/dist/internal/effect.js +263 -99
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/hashMap.js +5 -4
- package/dist/internal/hashMap.js.map +1 -1
- package/dist/internal/random.d.ts +2 -0
- package/dist/internal/random.d.ts.map +1 -0
- package/dist/internal/random.js +13 -0
- package/dist/internal/random.js.map +1 -0
- package/dist/internal/rcRef.js +3 -2
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/request.js +2 -2
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/schema/annotations.js +2 -0
- package/dist/internal/schema/annotations.js.map +1 -1
- package/dist/internal/schema/schema.js +1 -0
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/internal/trie.js +5 -4
- package/dist/internal/trie.js.map +1 -1
- package/dist/testing/TestClock.d.ts +7 -6
- package/dist/testing/TestClock.d.ts.map +1 -1
- package/dist/testing/TestClock.js +6 -4
- package/dist/testing/TestClock.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +8 -8
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +128 -48
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +11 -12
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +3 -3
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +4 -3
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +4 -2
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +86 -14
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +163 -87
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +49 -12
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +1 -1
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +35 -7
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +25 -7
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +22 -6
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/Prompt.d.ts +20 -20
- package/dist/unstable/ai/Prompt.d.ts.map +1 -1
- package/dist/unstable/ai/Response.d.ts +26 -26
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +1 -1
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +19 -3
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +14 -9
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/index.d.ts +1 -1
- package/dist/unstable/ai/index.js +1 -1
- package/dist/unstable/cli/CliError.d.ts +5 -5
- package/dist/unstable/cli/CliOutput.js +59 -6
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +276 -19
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +234 -36
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +125 -0
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -0
- package/dist/unstable/cli/GlobalFlag.js +118 -0
- package/dist/unstable/cli/GlobalFlag.js.map +1 -0
- package/dist/unstable/cli/HelpDoc.d.ts +70 -2
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/index.d.ts +4 -0
- package/dist/unstable/cli/index.d.ts.map +1 -1
- package/dist/unstable/cli/index.js +4 -0
- package/dist/unstable/cli/index.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +17 -8
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +32 -23
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/completions/CommandDescriptor.js +7 -2
- package/dist/unstable/cli/internal/completions/CommandDescriptor.js.map +1 -1
- package/dist/unstable/cli/internal/help.d.ts +33 -0
- package/dist/unstable/cli/internal/help.d.ts.map +1 -0
- package/dist/unstable/cli/internal/help.js +107 -0
- package/dist/unstable/cli/internal/help.js.map +1 -0
- package/dist/unstable/cli/internal/parser.js +29 -36
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts +1 -1
- package/dist/unstable/cluster/ClusterCron.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterCron.js +1 -1
- package/dist/unstable/cluster/ClusterCron.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +4 -3
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +7 -6
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityResource.d.ts +2 -2
- package/dist/unstable/cluster/EntityResource.d.ts.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +4 -4
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +10 -10
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +2 -1
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +6 -6
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +4 -3
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/Sharding.d.ts +2 -2
- package/dist/unstable/cluster/Sharding.d.ts.map +1 -1
- package/dist/unstable/cluster/Sharding.js +9 -7
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +21 -21
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +20 -20
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js +1 -1
- package/dist/unstable/cluster/SqlRunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +5 -4
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js +2 -1
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceRef.js +2 -1
- package/dist/unstable/cluster/internal/resourceRef.js.map +1 -1
- package/dist/unstable/devtools/DevToolsSchema.d.ts +36 -36
- package/dist/unstable/encoding/Msgpack.d.ts +1 -1
- package/dist/unstable/encoding/Ndjson.d.ts +1 -1
- package/dist/unstable/encoding/Sse.d.ts +4 -4
- package/dist/unstable/encoding/Sse.d.ts.map +1 -1
- package/dist/unstable/encoding/Sse.js +1 -1
- package/dist/unstable/encoding/Sse.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +2 -2
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +2 -1
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +6 -6
- package/dist/unstable/http/Cookies.d.ts +3 -3
- package/dist/unstable/http/Cookies.d.ts.map +1 -1
- package/dist/unstable/http/Cookies.js +2 -2
- package/dist/unstable/http/Cookies.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +27 -10
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpBody.d.ts +17 -2
- package/dist/unstable/http/HttpBody.d.ts.map +1 -1
- package/dist/unstable/http/HttpBody.js +28 -1
- package/dist/unstable/http/HttpBody.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +37 -13
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +4 -4
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +7 -7
- package/dist/unstable/http/HttpClientRequest.d.ts +27 -11
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +15 -3
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +3 -8
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +42 -56
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpMethod.d.ts +4 -4
- package/dist/unstable/http/HttpMethod.d.ts.map +1 -1
- package/dist/unstable/http/HttpMethod.js +3 -3
- package/dist/unstable/http/HttpMethod.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +1 -6
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +8 -17
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +20 -33
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +37 -44
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.d.ts +2 -2
- package/dist/unstable/http/HttpServerRespondable.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRespondable.js +5 -5
- package/dist/unstable/http/HttpServerRespondable.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +2 -1
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +3 -1
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +3 -3
- package/dist/unstable/http/UrlParams.d.ts +14 -6
- package/dist/unstable/http/UrlParams.d.ts.map +1 -1
- package/dist/unstable/http/UrlParams.js +1 -1
- package/dist/unstable/http/UrlParams.js.map +1 -1
- package/dist/unstable/http/internal/preResponseHandler.d.ts +2 -0
- package/dist/unstable/http/internal/preResponseHandler.d.ts.map +1 -0
- package/dist/unstable/http/internal/preResponseHandler.js +10 -0
- package/dist/unstable/http/internal/preResponseHandler.js.map +1 -0
- package/dist/unstable/httpapi/HttpApi.d.ts +3 -3
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +11 -5
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +23 -12
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts +7 -2
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +3 -3
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +31 -44
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +15 -24
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +11 -0
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.js +29 -9
- package/dist/unstable/httpapi/HttpApiError.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +3 -3
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +4 -4
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.d.ts +6 -0
- package/dist/unstable/httpapi/HttpApiScalar.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiScalar.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +2 -2
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +32 -21
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/Otlp.d.ts +12 -12
- package/dist/unstable/observability/Otlp.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts +2 -2
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +1 -1
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpLogger.d.ts +4 -4
- package/dist/unstable/observability/OtlpLogger.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpLogger.js +7 -4
- package/dist/unstable/observability/OtlpLogger.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.d.ts +4 -4
- package/dist/unstable/observability/OtlpMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts +4 -4
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +6 -6
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/Persistable.d.ts +2 -2
- package/dist/unstable/persistence/Persistable.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +6 -5
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +2 -1
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +12 -12
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +12 -11
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +1 -1
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +2 -2
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +3 -3
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +1 -1
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/process/ChildProcess.d.ts +5 -128
- package/dist/unstable/process/ChildProcess.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcess.js +1 -65
- package/dist/unstable/process/ChildProcess.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +45 -7
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +21 -1
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +10 -10
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +16 -13
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +8 -8
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +3 -3
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +6 -0
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +24 -7
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +1 -1
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Hydration.d.ts +39 -0
- package/dist/unstable/reactivity/Hydration.d.ts.map +1 -0
- package/dist/unstable/reactivity/Hydration.js +76 -0
- package/dist/unstable/reactivity/Hydration.js.map +1 -0
- package/dist/unstable/reactivity/index.d.ts +4 -0
- package/dist/unstable/reactivity/index.d.ts.map +1 -1
- package/dist/unstable/reactivity/index.js +4 -0
- package/dist/unstable/reactivity/index.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +4 -4
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +5 -26
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +6 -13
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcGroup.d.ts +2 -2
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +3 -3
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +13 -0
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +14 -0
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +34 -9
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +0 -7
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +15 -15
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +2 -1
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/schema/Model.d.ts +1 -1
- package/dist/unstable/schema/Model.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.d.ts +3 -3
- package/dist/unstable/schema/VariantSchema.d.ts.map +1 -1
- package/dist/unstable/schema/VariantSchema.js +3 -3
- package/dist/unstable/schema/VariantSchema.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +4 -4
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +6 -5
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +3 -3
- package/dist/unstable/sql/Migrator.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +1 -1
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +14 -14
- package/dist/unstable/sql/SqlError.d.ts.map +1 -1
- package/dist/unstable/sql/SqlError.js +9 -3
- package/dist/unstable/sql/SqlError.js.map +1 -1
- package/dist/unstable/sql/SqlModel.d.ts +2 -2
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +3 -3
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlSchema.d.ts +16 -5
- package/dist/unstable/sql/SqlSchema.d.ts.map +1 -1
- package/dist/unstable/sql/SqlSchema.js +17 -7
- package/dist/unstable/sql/SqlSchema.js.map +1 -1
- package/dist/unstable/sql/Statement.js +0 -1
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +2 -1
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +3 -3
- package/dist/unstable/workflow/DurableClock.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableClock.js +3 -3
- package/dist/unstable/workflow/DurableClock.js.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +2 -2
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +3 -3
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +1 -1
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +12 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +137 -1
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/package.json +2 -2
- package/src/Array.ts +190 -342
- package/src/Cache.ts +9 -8
- package/src/Cause.ts +1 -1
- package/src/Channel.ts +554 -138
- package/src/Chunk.ts +81 -268
- package/src/Combiner.ts +280 -13
- package/src/Config.ts +183 -21
- package/src/Data.ts +538 -374
- package/src/DateTime.ts +24 -164
- package/src/Duration.ts +15 -15
- package/src/Effect.ts +991 -800
- package/src/Encoding.ts +879 -0
- package/src/Equal.ts +278 -111
- package/src/ErrorReporter.ts +459 -0
- package/src/Fiber.ts +9 -2
- package/src/FileSystem.ts +7 -8
- package/src/Filter.ts +48 -58
- package/src/Formatter.ts +253 -51
- package/src/Graph.ts +24 -11
- package/src/HashMap.ts +15 -14
- package/src/Iterable.ts +105 -50
- package/src/JsonSchema.ts +383 -10
- package/src/Latch.ts +112 -0
- package/src/Layer.ts +11 -15
- package/src/LayerMap.ts +5 -5
- package/src/LogLevel.ts +37 -0
- package/src/Logger.ts +33 -100
- package/src/ManagedRuntime.ts +1 -1
- package/src/Metric.ts +4 -4
- package/src/Optic.ts +948 -19
- package/src/Option.ts +30 -20
- package/src/Pipeable.ts +32 -1
- package/src/PlatformError.ts +5 -5
- package/src/Pool.ts +13 -11
- package/src/PubSub.ts +10 -9
- package/src/Pull.ts +1 -1
- package/src/Queue.ts +0 -1
- package/src/Random.ts +51 -14
- package/src/RcMap.ts +5 -5
- package/src/RcRef.ts +1 -1
- package/src/Record.ts +43 -152
- package/src/Reducer.ts +166 -7
- package/src/References.ts +4 -4
- package/src/Request.ts +3 -2
- package/src/RequestResolver.ts +9 -29
- package/src/Result.ts +13 -0
- package/src/Schedule.ts +318 -160
- package/src/Schema.ts +661 -116
- package/src/SchemaAST.ts +7 -6
- package/src/SchemaGetter.ts +12 -14
- package/src/SchemaParser.ts +11 -0
- package/src/SchemaRepresentation.ts +43 -24
- package/src/SchemaTransformation.ts +189 -4
- package/src/ScopedCache.ts +3 -3
- package/src/Semaphore.ts +356 -0
- package/src/ServiceMap.ts +47 -38
- package/src/Sink.ts +78 -26
- package/src/Stream.ts +566 -601
- package/src/Struct.ts +26 -0
- package/src/SubscriptionRef.ts +3 -2
- package/src/SynchronizedRef.ts +3 -2
- package/src/Trie.ts +18 -17
- package/src/TxChunk.ts +72 -53
- package/src/TxDeferred.ts +394 -0
- package/src/TxHashMap.ts +332 -285
- package/src/TxHashSet.ts +111 -116
- package/src/TxPriorityQueue.ts +767 -0
- package/src/TxPubSub.ts +789 -0
- package/src/TxQueue.ts +241 -251
- package/src/TxReentrantLock.ts +753 -0
- package/src/TxRef.ts +50 -38
- package/src/TxSemaphore.ts +29 -32
- package/src/TxSubscriptionRef.ts +639 -0
- package/src/Types.ts +78 -2
- package/src/index.ts +600 -21
- package/src/internal/core.ts +12 -5
- package/src/internal/dateTime.ts +9 -30
- package/src/internal/effect.ts +744 -265
- package/src/internal/hashMap.ts +9 -7
- package/src/internal/random.ts +20 -0
- package/src/internal/rcRef.ts +4 -3
- package/src/internal/request.ts +2 -2
- package/src/internal/schema/annotations.ts +2 -0
- package/src/internal/schema/schema.ts +1 -0
- package/src/internal/trie.ts +16 -9
- package/src/testing/TestClock.ts +13 -11
- package/src/testing/TestSchema.ts +10 -10
- package/src/unstable/ai/AiError.ts +97 -44
- package/src/unstable/ai/Chat.ts +12 -11
- package/src/unstable/ai/LanguageModel.ts +129 -25
- package/src/unstable/ai/McpSchema.ts +59 -13
- package/src/unstable/ai/McpServer.ts +48 -9
- package/src/unstable/ai/Model.ts +40 -9
- package/src/unstable/ai/Prompt.ts +37 -37
- package/src/unstable/ai/Response.ts +25 -25
- package/src/unstable/ai/Tool.ts +19 -13
- package/src/unstable/ai/index.ts +1 -1
- package/src/unstable/cli/CliOutput.ts +75 -6
- package/src/unstable/cli/Command.ts +501 -60
- package/src/unstable/cli/GlobalFlag.ts +243 -0
- package/src/unstable/cli/HelpDoc.ts +80 -2
- package/src/unstable/cli/index.ts +5 -0
- package/src/unstable/cli/internal/command.ts +50 -34
- package/src/unstable/cli/internal/completions/CommandDescriptor.ts +7 -2
- package/src/unstable/cli/internal/help.ts +146 -0
- package/src/unstable/cli/internal/parser.ts +33 -54
- package/src/unstable/cluster/ClusterCron.ts +2 -2
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +5 -4
- package/src/unstable/cluster/Entity.ts +11 -10
- package/src/unstable/cluster/EntityResource.ts +4 -4
- package/src/unstable/cluster/Envelope.ts +1 -1
- package/src/unstable/cluster/K8sHttpClient.ts +5 -5
- package/src/unstable/cluster/MessageStorage.ts +3 -5
- package/src/unstable/cluster/Runners.ts +6 -5
- package/src/unstable/cluster/Sharding.ts +12 -10
- package/src/unstable/cluster/ShardingConfig.ts +30 -31
- package/src/unstable/cluster/SqlRunnerStorage.ts +1 -1
- package/src/unstable/cluster/internal/entityManager.ts +9 -8
- package/src/unstable/cluster/internal/entityReaper.ts +2 -1
- package/src/unstable/cluster/internal/resourceRef.ts +2 -1
- package/src/unstable/encoding/Sse.ts +3 -5
- package/src/unstable/eventlog/EventLog.ts +2 -1
- package/src/unstable/http/Cookies.ts +3 -3
- package/src/unstable/http/Headers.ts +28 -13
- package/src/unstable/http/HttpBody.ts +42 -1
- package/src/unstable/http/HttpClient.ts +58 -23
- package/src/unstable/http/HttpClientRequest.ts +38 -13
- package/src/unstable/http/HttpEffect.ts +46 -68
- package/src/unstable/http/HttpMethod.ts +16 -4
- package/src/unstable/http/HttpMiddleware.ts +9 -24
- package/src/unstable/http/HttpServerError.ts +42 -45
- package/src/unstable/http/HttpServerRequest.ts +1 -1
- package/src/unstable/http/HttpServerRespondable.ts +6 -6
- package/src/unstable/http/HttpServerResponse.ts +4 -2
- package/src/unstable/http/Multipart.ts +2 -2
- package/src/unstable/http/UrlParams.ts +20 -5
- package/src/unstable/http/internal/preResponseHandler.ts +15 -0
- package/src/unstable/httpapi/HttpApi.ts +5 -5
- package/src/unstable/httpapi/HttpApiBuilder.ts +77 -21
- package/src/unstable/httpapi/HttpApiClient.ts +14 -6
- package/src/unstable/httpapi/HttpApiEndpoint.ts +67 -83
- package/src/unstable/httpapi/HttpApiError.ts +30 -9
- package/src/unstable/httpapi/HttpApiGroup.ts +6 -6
- package/src/unstable/httpapi/HttpApiMiddleware.ts +4 -4
- package/src/unstable/httpapi/HttpApiScalar.ts +6 -0
- package/src/unstable/httpapi/HttpApiSecurity.ts +3 -3
- package/src/unstable/httpapi/OpenApi.ts +41 -23
- package/src/unstable/observability/Otlp.ts +12 -12
- package/src/unstable/observability/OtlpExporter.ts +3 -3
- package/src/unstable/observability/OtlpLogger.ts +13 -9
- package/src/unstable/observability/OtlpMetrics.ts +4 -4
- package/src/unstable/observability/OtlpTracer.ts +4 -4
- package/src/unstable/persistence/KeyValueStore.ts +6 -6
- package/src/unstable/persistence/Persistable.ts +2 -2
- package/src/unstable/persistence/PersistedCache.ts +20 -9
- package/src/unstable/persistence/PersistedQueue.ts +25 -24
- package/src/unstable/persistence/Persistence.ts +3 -3
- package/src/unstable/persistence/RateLimiter.ts +4 -4
- package/src/unstable/process/ChildProcess.ts +6 -208
- package/src/unstable/process/ChildProcessSpawner.ts +75 -14
- package/src/unstable/reactivity/Atom.ts +27 -25
- package/src/unstable/reactivity/AtomHttpApi.ts +21 -20
- package/src/unstable/reactivity/AtomRegistry.ts +31 -7
- package/src/unstable/reactivity/AtomRpc.ts +3 -3
- package/src/unstable/reactivity/Hydration.ts +112 -0
- package/src/unstable/reactivity/index.ts +5 -0
- package/src/unstable/rpc/Rpc.ts +6 -6
- package/src/unstable/rpc/RpcClient.ts +12 -54
- package/src/unstable/rpc/RpcGroup.ts +4 -4
- package/src/unstable/rpc/RpcMiddleware.ts +3 -3
- package/src/unstable/rpc/RpcSchema.ts +17 -0
- package/src/unstable/rpc/RpcSerialization.ts +44 -9
- package/src/unstable/rpc/RpcServer.ts +21 -30
- package/src/unstable/rpc/Utils.ts +2 -1
- package/src/unstable/schema/VariantSchema.ts +6 -6
- package/src/unstable/socket/Socket.ts +16 -17
- package/src/unstable/sql/SqlClient.ts +1 -1
- package/src/unstable/sql/SqlError.ts +11 -9
- package/src/unstable/sql/SqlModel.ts +5 -5
- package/src/unstable/sql/SqlSchema.ts +41 -25
- package/src/unstable/sql/Statement.ts +0 -1
- package/src/unstable/workers/Worker.ts +2 -1
- package/src/unstable/workflow/DurableClock.ts +8 -8
- package/src/unstable/workflow/DurableDeferred.ts +2 -2
- package/src/unstable/workflow/Workflow.ts +6 -2
- package/src/unstable/workflow/WorkflowEngine.ts +185 -2
- package/dist/PartitionedSemaphore.d.ts +0 -52
- package/dist/PartitionedSemaphore.d.ts.map +0 -1
- package/dist/PartitionedSemaphore.js.map +0 -1
- package/dist/encoding/Base64.d.ts +0 -67
- package/dist/encoding/Base64.d.ts.map +0 -1
- package/dist/encoding/Base64.js +0 -146
- package/dist/encoding/Base64.js.map +0 -1
- package/dist/encoding/Base64Url.d.ts +0 -60
- package/dist/encoding/Base64Url.d.ts.map +0 -1
- package/dist/encoding/Base64Url.js +0 -89
- package/dist/encoding/Base64Url.js.map +0 -1
- package/dist/encoding/EncodingError.d.ts +0 -31
- package/dist/encoding/EncodingError.d.ts.map +0 -1
- package/dist/encoding/EncodingError.js +0 -22
- package/dist/encoding/EncodingError.js.map +0 -1
- package/dist/encoding/Hex.d.ts +0 -61
- package/dist/encoding/Hex.d.ts.map +0 -1
- package/dist/encoding/Hex.js +0 -115
- package/dist/encoding/Hex.js.map +0 -1
- package/dist/encoding/index.d.ts +0 -26
- package/dist/encoding/index.d.ts.map +0 -1
- package/dist/encoding/index.js +0 -27
- package/dist/encoding/index.js.map +0 -1
- package/dist/unstable/cli/internal/builtInFlags.d.ts +0 -7
- package/dist/unstable/cli/internal/builtInFlags.d.ts.map +0 -1
- package/dist/unstable/cli/internal/builtInFlags.js +0 -44
- package/dist/unstable/cli/internal/builtInFlags.js.map +0 -1
- package/src/PartitionedSemaphore.ts +0 -182
- package/src/encoding/Base64.ts +0 -366
- package/src/encoding/Base64Url.ts +0 -104
- package/src/encoding/EncodingError.ts +0 -35
- package/src/encoding/Hex.ts +0 -390
- package/src/encoding/index.ts +0 -31
- package/src/unstable/cli/internal/builtInFlags.ts +0 -78
package/dist/Data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Data.d.ts","sourceRoot":"","sources":["../src/Data.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Data.d.ts","sourceRoot":"","sources":["../src/Data.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAAA;AAExC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAA;AAEzC,OAAO,KAAK,KAAK,KAAK,MAAM,YAAY,CAA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,CAAC,SAAS;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;CAc1D,CAAA;AA+BV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,eAAO,MAAM,KAAK,EAAE,KAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EACxD,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,KACvD,KAAK,CAAC,cAAc,GAAG,QAAQ,CAAC,CAAC,CAAc,CAAA;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,WAAW,EAAE,CAAC,GAAG,SAAS,MAAM,EAC3C,GAAG,EAAE,GAAG,KACL,KAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,EAAE,EACzC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC;IAAE,QAAQ,EAAE,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,MAAM,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,KACvF,KAAK,CAAC,cAAc,GAAG;IAAE,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAA;CAAE,GAAG,QAAQ,CAAC,CAAC,CAA2B,CAAA"}
|
package/dist/Data.js
CHANGED
|
@@ -1,103 +1,140 @@
|
|
|
1
1
|
import * as core from "./internal/core.js";
|
|
2
|
+
import * as Pipeable from "./Pipeable.js";
|
|
2
3
|
import * as Predicate from "./Predicate.js";
|
|
3
4
|
/**
|
|
4
|
-
*
|
|
5
|
+
* Base class for immutable data types.
|
|
6
|
+
*
|
|
7
|
+
* Extend `Class` with a type parameter to declare fields. The constructor
|
|
8
|
+
* accepts those fields as a single object argument. When there are no fields
|
|
9
|
+
* the argument is optional.
|
|
10
|
+
*
|
|
11
|
+
* - Use when you need a lightweight immutable value type with `.pipe()` support.
|
|
12
|
+
* - Instances are `Readonly` and `Pipeable`.
|
|
13
|
+
* - If you also need a `_tag` discriminator, use {@link TaggedClass} instead.
|
|
14
|
+
* - If you need a yieldable error, use {@link Error} or {@link TaggedError}.
|
|
15
|
+
*
|
|
16
|
+
* **Example** (defining a value class)
|
|
5
17
|
*
|
|
6
|
-
* @example
|
|
7
18
|
* ```ts
|
|
8
19
|
* import { Data, Equal } from "effect"
|
|
9
|
-
* import * as assert from "node:assert"
|
|
10
20
|
*
|
|
11
21
|
* class Person extends Data.Class<{ readonly name: string }> {}
|
|
12
22
|
*
|
|
13
|
-
* // Creating instances of Person
|
|
14
23
|
* const mike1 = new Person({ name: "Mike" })
|
|
15
24
|
* const mike2 = new Person({ name: "Mike" })
|
|
16
|
-
* const john = new Person({ name: "John" })
|
|
17
25
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* assert.deepStrictEqual(Equal.equals(mike1, john), false)
|
|
26
|
+
* console.log(Equal.equals(mike1, mike2))
|
|
27
|
+
* // true
|
|
21
28
|
* ```
|
|
22
29
|
*
|
|
23
|
-
* @
|
|
30
|
+
* @see {@link TaggedClass} — adds a `_tag` field
|
|
31
|
+
* @see {@link Error} — yieldable error variant
|
|
32
|
+
*
|
|
24
33
|
* @category constructors
|
|
34
|
+
* @since 2.0.0
|
|
25
35
|
*/
|
|
26
|
-
export const Class =
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
export const Class = class extends Pipeable.Class {
|
|
37
|
+
constructor(props) {
|
|
38
|
+
super();
|
|
39
|
+
if (props) {
|
|
40
|
+
Object.assign(this, props);
|
|
41
|
+
}
|
|
29
42
|
}
|
|
30
43
|
};
|
|
31
44
|
/**
|
|
32
|
-
*
|
|
45
|
+
* Base class for immutable data types with a `_tag` discriminator.
|
|
33
46
|
*
|
|
34
|
-
* @
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* import * as assert from "node:assert"
|
|
47
|
+
* Like {@link Class}, but the resulting instances also carry a
|
|
48
|
+
* `readonly _tag: Tag` property. The `_tag` is excluded from the constructor
|
|
49
|
+
* argument.
|
|
38
50
|
*
|
|
39
|
-
*
|
|
51
|
+
* - Use when you need a single-variant tagged type or an ad-hoc discriminator.
|
|
52
|
+
* - For multi-variant unions, prefer {@link TaggedEnum} + {@link taggedEnum}.
|
|
53
|
+
* - For yieldable errors, use {@link TaggedError}.
|
|
40
54
|
*
|
|
41
|
-
*
|
|
42
|
-
* const mike1 = new Person({ name: "Mike" })
|
|
43
|
-
* const mike2 = new Person({ name: "Mike" })
|
|
44
|
-
* const john = new Person({ name: "John" })
|
|
55
|
+
* **Example** (defining a tagged class)
|
|
45
56
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
57
|
+
* ```ts
|
|
58
|
+
* import { Data } from "effect"
|
|
59
|
+
*
|
|
60
|
+
* class Person extends Data.TaggedClass("Person")<{
|
|
61
|
+
* readonly name: string
|
|
62
|
+
* }> {}
|
|
49
63
|
*
|
|
50
|
-
*
|
|
64
|
+
* const mike = new Person({ name: "Mike" })
|
|
65
|
+
* console.log(mike._tag)
|
|
66
|
+
* // "Person"
|
|
51
67
|
* ```
|
|
52
68
|
*
|
|
53
|
-
* @
|
|
69
|
+
* @see {@link Class} — without a `_tag`
|
|
70
|
+
* @see {@link TaggedError} — tagged error variant
|
|
71
|
+
* @see {@link TaggedEnum} — multi-variant unions
|
|
72
|
+
*
|
|
54
73
|
* @category constructors
|
|
74
|
+
* @since 2.0.0
|
|
55
75
|
*/
|
|
56
|
-
export const TaggedClass = tag =>
|
|
57
|
-
|
|
58
|
-
if (props) {
|
|
59
|
-
Object.assign(this, props);
|
|
60
|
-
}
|
|
76
|
+
export const TaggedClass = tag => class extends Class {
|
|
77
|
+
_tag = tag;
|
|
61
78
|
};
|
|
62
79
|
/**
|
|
63
|
-
*
|
|
80
|
+
* Creates runtime constructors, type guards, and pattern matching for a
|
|
81
|
+
* {@link TaggedEnum} type.
|
|
82
|
+
*
|
|
83
|
+
* Returns an object with:
|
|
84
|
+
* - One constructor per variant (keyed by tag name)
|
|
85
|
+
* - `$is(tag)` — returns a type-guard function
|
|
86
|
+
* - `$match` — exhaustive pattern matching (data-first or data-last)
|
|
64
87
|
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
88
|
+
* - Use when you have a `TaggedEnum` type and need to construct/inspect values.
|
|
89
|
+
* - Constructors produce **plain objects** (not class instances).
|
|
90
|
+
* - For generic enums, pass a {@link TaggedEnum.WithGenerics} interface.
|
|
91
|
+
*
|
|
92
|
+
* **Example** (basic usage)
|
|
67
93
|
*
|
|
68
|
-
* @example
|
|
69
94
|
* ```ts
|
|
70
95
|
* import { Data } from "effect"
|
|
71
96
|
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
* const
|
|
97
|
+
* type HttpError = Data.TaggedEnum<{
|
|
98
|
+
* BadRequest: { readonly message: string }
|
|
99
|
+
* NotFound: { readonly url: string }
|
|
100
|
+
* }>
|
|
101
|
+
*
|
|
102
|
+
* const { BadRequest, NotFound, $is, $match } = Data.taggedEnum<HttpError>()
|
|
103
|
+
*
|
|
104
|
+
* const err = NotFound({ url: "/missing" })
|
|
105
|
+
*
|
|
106
|
+
* // Type guard
|
|
107
|
+
* console.log($is("NotFound")(err)) // true
|
|
108
|
+
*
|
|
109
|
+
* // Pattern matching
|
|
110
|
+
* const msg = $match(err, {
|
|
111
|
+
* BadRequest: (e) => e.message,
|
|
112
|
+
* NotFound: (e) => `${e.url} not found`
|
|
113
|
+
* })
|
|
114
|
+
* console.log(msg) // "/missing not found"
|
|
86
115
|
* ```
|
|
87
116
|
*
|
|
88
|
-
*
|
|
117
|
+
* **Example** (generic tagged enum)
|
|
118
|
+
*
|
|
119
|
+
* ```ts
|
|
89
120
|
* import { Data } from "effect"
|
|
90
121
|
*
|
|
91
122
|
* type MyResult<E, A> = Data.TaggedEnum<{
|
|
92
123
|
* Failure: { readonly error: E }
|
|
93
124
|
* Success: { readonly value: A }
|
|
94
125
|
* }>
|
|
95
|
-
* interface
|
|
126
|
+
* interface MyResultDef extends Data.TaggedEnum.WithGenerics<2> {
|
|
96
127
|
* readonly taggedEnum: MyResult<this["A"], this["B"]>
|
|
97
128
|
* }
|
|
98
|
-
* const { Failure, Success } = Data.taggedEnum<
|
|
129
|
+
* const { Failure, Success } = Data.taggedEnum<MyResultDef>()
|
|
99
130
|
*
|
|
100
|
-
* const
|
|
131
|
+
* const ok = Success({ value: 42 })
|
|
132
|
+
* // ok: { readonly _tag: "Success"; readonly value: number }
|
|
133
|
+
* ```
|
|
134
|
+
*
|
|
135
|
+
* @see {@link TaggedEnum} — the type-level companion
|
|
136
|
+
* @see {@link TaggedEnum.Constructor} — the returned object type
|
|
137
|
+
* @see {@link TaggedEnum.WithGenerics} — generic enum support
|
|
101
138
|
*
|
|
102
139
|
* @category constructors
|
|
103
140
|
* @since 2.0.0
|
|
@@ -127,62 +164,78 @@ function taggedMatch() {
|
|
|
127
164
|
return cases[value._tag](value);
|
|
128
165
|
}
|
|
129
166
|
/**
|
|
130
|
-
*
|
|
167
|
+
* Base class for yieldable errors.
|
|
168
|
+
*
|
|
169
|
+
* Extends `Cause.YieldableError`, so instances can be yielded inside
|
|
170
|
+
* `Effect.gen` to fail the enclosing effect. Fields are passed as a single
|
|
171
|
+
* object; when there are no fields the argument is optional.
|
|
172
|
+
*
|
|
173
|
+
* - Use for errors that do **not** need tag-based discrimination.
|
|
174
|
+
* - If you need `Effect.catchTag` support, use {@link TaggedError} instead.
|
|
175
|
+
* - If a `message` field is provided, it becomes the error's `.message`.
|
|
131
176
|
*
|
|
132
|
-
*
|
|
133
|
-
* yielded in Effect generators) and have structural equality semantics.
|
|
177
|
+
* **Example** (defining a yieldable error)
|
|
134
178
|
*
|
|
135
|
-
* @example
|
|
136
179
|
* ```ts
|
|
137
180
|
* import { Data, Effect } from "effect"
|
|
138
181
|
*
|
|
139
|
-
* class NetworkError extends Data.Error<{
|
|
182
|
+
* class NetworkError extends Data.Error<{
|
|
183
|
+
* readonly code: number
|
|
184
|
+
* readonly message: string
|
|
185
|
+
* }> {}
|
|
140
186
|
*
|
|
141
187
|
* const program = Effect.gen(function*() {
|
|
142
|
-
* yield* new NetworkError({ code: 500, message: "
|
|
188
|
+
* yield* new NetworkError({ code: 500, message: "timeout" })
|
|
143
189
|
* })
|
|
144
190
|
*
|
|
191
|
+
* // The effect fails with a NetworkError
|
|
145
192
|
* Effect.runSync(Effect.exit(program))
|
|
146
|
-
* // Exit.fail(NetworkError({ code: 500, message: "Server error" }))
|
|
147
193
|
* ```
|
|
148
194
|
*
|
|
195
|
+
* @see {@link TaggedError} — adds a `_tag` for `Effect.catchTag`
|
|
196
|
+
* @see {@link Class} — non-error data class
|
|
197
|
+
*
|
|
149
198
|
* @category constructors
|
|
150
199
|
* @since 2.0.0
|
|
151
200
|
*/
|
|
152
201
|
export const Error = core.Error;
|
|
153
202
|
/**
|
|
154
|
-
*
|
|
203
|
+
* Creates a tagged error class with a `_tag` discriminator.
|
|
155
204
|
*
|
|
156
|
-
*
|
|
157
|
-
* `
|
|
205
|
+
* Like {@link Error}, but instances also carry a `readonly _tag` property,
|
|
206
|
+
* enabling `Effect.catchTag` and `Effect.catchTags` for tag-based recovery.
|
|
207
|
+
* The `_tag` is excluded from the constructor argument.
|
|
208
|
+
*
|
|
209
|
+
* - Use for domain errors in Effect applications where you want
|
|
210
|
+
* discriminated-union error handling.
|
|
211
|
+
* - Yielding an instance inside `Effect.gen` fails the effect with this error.
|
|
212
|
+
*
|
|
213
|
+
* **Example** (tag-based error recovery)
|
|
158
214
|
*
|
|
159
|
-
* @example
|
|
160
215
|
* ```ts
|
|
161
|
-
* import { Data, Effect
|
|
216
|
+
* import { Data, Effect } from "effect"
|
|
162
217
|
*
|
|
163
|
-
* class
|
|
164
|
-
*
|
|
165
|
-
* message: string
|
|
218
|
+
* class NotFound extends Data.TaggedError("NotFound")<{
|
|
219
|
+
* readonly resource: string
|
|
166
220
|
* }> {}
|
|
167
221
|
*
|
|
168
|
-
* class
|
|
169
|
-
*
|
|
170
|
-
* message: string
|
|
222
|
+
* class Forbidden extends Data.TaggedError("Forbidden")<{
|
|
223
|
+
* readonly reason: string
|
|
171
224
|
* }> {}
|
|
172
225
|
*
|
|
173
226
|
* const program = Effect.gen(function*() {
|
|
174
|
-
* yield* new
|
|
227
|
+
* yield* new NotFound({ resource: "/users/42" })
|
|
175
228
|
* })
|
|
176
229
|
*
|
|
177
|
-
* const
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* "NetworkError",
|
|
181
|
-
* (error) => Effect.succeed(`Network error: ${error.message}`)
|
|
182
|
-
* )
|
|
230
|
+
* const recovered = program.pipe(
|
|
231
|
+
* Effect.catchTag("NotFound", (e) =>
|
|
232
|
+
* Effect.succeed(`missing: ${e.resource}`))
|
|
183
233
|
* )
|
|
184
234
|
* ```
|
|
185
235
|
*
|
|
236
|
+
* @see {@link Error} — without a `_tag`
|
|
237
|
+
* @see {@link TaggedClass} — tagged class that is not an error
|
|
238
|
+
*
|
|
186
239
|
* @category constructors
|
|
187
240
|
* @since 2.0.0
|
|
188
241
|
*/
|
package/dist/Data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Data.js","names":["core","Predicate","Class","props","Object","assign","TaggedClass","tag","_tag","taggedEnum","Proxy","get","_target","_receiver","isTagged","taggedMatch","arguments","length","cases","value","Error","TaggedError"],"sources":["../src/Data.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"file":"Data.js","names":["core","Pipeable","Predicate","Class","constructor","props","Object","assign","TaggedClass","tag","_tag","taggedEnum","Proxy","get","_target","_receiver","isTagged","taggedMatch","arguments","length","cases","value","Error","TaggedError"],"sources":["../src/Data.ts"],"sourcesContent":[null],"mappings":"AA0EA,OAAO,KAAKA,IAAI,MAAM,oBAAoB;AAC1C,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAI3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMC,KAAK,GAEqB,cAAcF,QAAQ,CAACE,KAAK;EACjEC,YAAYC,KAAU;IACpB,KAAK,EAAE;IACP,IAAIA,KAAK,EAAE;MACTC,MAAM,CAACC,MAAM,CAAC,IAAI,EAAEF,KAAK,CAAC;IAC5B;EACF;CACM;AAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,OAAO,MAAMG,WAAW,GACtBC,GAAQ,IAIR,cAAcN,KAAK;EACRO,IAAI,GAAGD,GAAG;CACb;AA6WV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+DA,OAAO,MAAME,UAAU,GA6WnBA,CAAA,KACF,IAAIC,KAAK,CACP,EAAE,EACF;EACEC,GAAGA,CAACC,OAAO,EAAEL,GAAG,EAAEM,SAAS;IACzB,IAAIN,GAAG,KAAK,KAAK,EAAE;MACjB,OAAOP,SAAS,CAACc,QAAQ;IAC3B,CAAC,MAAM,IAAIP,GAAG,KAAK,QAAQ,EAAE;MAC3B,OAAOQ,WAAW;IACpB;IACA,OAAQZ,KAAU,KAAM;MAAEK,IAAI,EAAED,GAAG;MAAE,GAAGJ;IAAK,CAAE,CAAC;EAClD;CACD,CACK;AAcV,SAASY,WAAWA,CAAA;EAMlB,IAAIC,SAAS,CAACC,MAAM,KAAK,CAAC,EAAE;IAC1B,MAAMC,KAAK,GAAGF,SAAS,CAAC,CAAC,CAAU;IACnC,OAAO,UAASG,KAAQ;MACtB,OAAOD,KAAK,CAACC,KAAK,CAACX,IAAiB,CAAC,CAACW,KAAY,CAAC;IACrD,CAAC;EACH;EACA,MAAMA,KAAK,GAAGH,SAAS,CAAC,CAAC,CAAM;EAC/B,MAAME,KAAK,GAAGF,SAAS,CAAC,CAAC,CAAU;EACnC,OAAOE,KAAK,CAACC,KAAK,CAACX,IAAiB,CAAC,CAACW,KAAY,CAAC;AACrD;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,MAAMC,KAAK,GAEwBtB,IAAI,CAACsB,KAAK;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,OAAO,MAAMC,WAAW,GAI2CvB,IAAI,CAACuB,WAAkB","ignoreList":[]}
|
package/dist/DateTime.d.ts
CHANGED
|
@@ -10,7 +10,6 @@ import type { Inspectable } from "./Inspectable.ts";
|
|
|
10
10
|
import * as Layer from "./Layer.ts";
|
|
11
11
|
import type * as order from "./Order.ts";
|
|
12
12
|
import type { Pipeable } from "./Pipeable.ts";
|
|
13
|
-
import type * as Result from "./Result.ts";
|
|
14
13
|
import * as ServiceMap from "./ServiceMap.ts";
|
|
15
14
|
declare const TypeId = "~effect/time/DateTime";
|
|
16
15
|
declare const TimeZoneTypeId = "~effect/time/DateTime/TimeZone";
|
|
@@ -1059,10 +1058,12 @@ export declare const setZoneNamedUnsafe: {
|
|
|
1059
1058
|
}): Zoned;
|
|
1060
1059
|
};
|
|
1061
1060
|
/**
|
|
1062
|
-
* Calulate the difference between two `DateTime` values, returning
|
|
1063
|
-
*
|
|
1061
|
+
* Calulate the difference between two `DateTime` values, returning a
|
|
1062
|
+
* `Duration` representing the amount of time between them.
|
|
1064
1063
|
*
|
|
1065
|
-
* If `other` is *after* `self`, the result will be a positive
|
|
1064
|
+
* If `other` is *after* `self`, the result will be a positive `Duration`. If
|
|
1065
|
+
* `other` is *before* `self`, the result will be a negative `Duration`. If they
|
|
1066
|
+
* are equal, the result will be a `Duration` of zero.
|
|
1066
1067
|
*
|
|
1067
1068
|
* @since 3.6.0
|
|
1068
1069
|
* @category comparisons
|
|
@@ -1074,163 +1075,19 @@ export declare const setZoneNamedUnsafe: {
|
|
|
1074
1075
|
* const now = yield* DateTime.now
|
|
1075
1076
|
* const other = DateTime.add(now, { minutes: 1 })
|
|
1076
1077
|
*
|
|
1077
|
-
* // returns
|
|
1078
|
+
* // returns Duration.minutes(1)
|
|
1078
1079
|
* DateTime.distance(now, other)
|
|
1079
1080
|
* })
|
|
1080
1081
|
* ```
|
|
1081
1082
|
*/
|
|
1082
1083
|
export declare const distance: {
|
|
1083
1084
|
/**
|
|
1084
|
-
* Calulate the difference between two `DateTime` values, returning
|
|
1085
|
-
*
|
|
1086
|
-
*
|
|
1087
|
-
* If `other` is *after* `self`, the result will be a positive number.
|
|
1088
|
-
*
|
|
1089
|
-
* @since 3.6.0
|
|
1090
|
-
* @category comparisons
|
|
1091
|
-
* @example
|
|
1092
|
-
* ```ts
|
|
1093
|
-
* import { DateTime, Effect } from "effect"
|
|
1094
|
-
*
|
|
1095
|
-
* Effect.gen(function*() {
|
|
1096
|
-
* const now = yield* DateTime.now
|
|
1097
|
-
* const other = DateTime.add(now, { minutes: 1 })
|
|
1098
|
-
*
|
|
1099
|
-
* // returns 60000
|
|
1100
|
-
* DateTime.distance(now, other)
|
|
1101
|
-
* })
|
|
1102
|
-
* ```
|
|
1103
|
-
*/
|
|
1104
|
-
(other: DateTime): (self: DateTime) => number;
|
|
1105
|
-
/**
|
|
1106
|
-
* Calulate the difference between two `DateTime` values, returning the number
|
|
1107
|
-
* of milliseconds the `other` DateTime is from `self`.
|
|
1108
|
-
*
|
|
1109
|
-
* If `other` is *after* `self`, the result will be a positive number.
|
|
1110
|
-
*
|
|
1111
|
-
* @since 3.6.0
|
|
1112
|
-
* @category comparisons
|
|
1113
|
-
* @example
|
|
1114
|
-
* ```ts
|
|
1115
|
-
* import { DateTime, Effect } from "effect"
|
|
1116
|
-
*
|
|
1117
|
-
* Effect.gen(function*() {
|
|
1118
|
-
* const now = yield* DateTime.now
|
|
1119
|
-
* const other = DateTime.add(now, { minutes: 1 })
|
|
1120
|
-
*
|
|
1121
|
-
* // returns 60000
|
|
1122
|
-
* DateTime.distance(now, other)
|
|
1123
|
-
* })
|
|
1124
|
-
* ```
|
|
1125
|
-
*/
|
|
1126
|
-
(self: DateTime, other: DateTime): number;
|
|
1127
|
-
};
|
|
1128
|
-
/**
|
|
1129
|
-
* Calulate the difference between two `DateTime` values.
|
|
1130
|
-
*
|
|
1131
|
-
* If the `other` DateTime is before `self`, the result will be a negative
|
|
1132
|
-
* `Duration`, returned as a `Failure`.
|
|
1133
|
-
*
|
|
1134
|
-
* If the `other` DateTime is after `self`, the result will be a positive
|
|
1135
|
-
* `Duration`, returned as a `Success`.
|
|
1136
|
-
*
|
|
1137
|
-
* @since 3.6.0
|
|
1138
|
-
* @category comparisons
|
|
1139
|
-
* @example
|
|
1140
|
-
* ```ts
|
|
1141
|
-
* import { DateTime, Effect } from "effect"
|
|
1142
|
-
*
|
|
1143
|
-
* Effect.gen(function*() {
|
|
1144
|
-
* const now = yield* DateTime.now
|
|
1145
|
-
* const other = DateTime.add(now, { minutes: 1 })
|
|
1146
|
-
*
|
|
1147
|
-
* // returns Result.succeed(Duration.minutes(1))
|
|
1148
|
-
* DateTime.distanceDurationResult(now, other)
|
|
1149
|
-
*
|
|
1150
|
-
* // returns Result.fail(Duration.minutes(1))
|
|
1151
|
-
* DateTime.distanceDurationResult(other, now)
|
|
1152
|
-
* })
|
|
1153
|
-
* ```
|
|
1154
|
-
*/
|
|
1155
|
-
export declare const distanceDurationResult: {
|
|
1156
|
-
/**
|
|
1157
|
-
* Calulate the difference between two `DateTime` values.
|
|
1158
|
-
*
|
|
1159
|
-
* If the `other` DateTime is before `self`, the result will be a negative
|
|
1160
|
-
* `Duration`, returned as a `Failure`.
|
|
1085
|
+
* Calulate the difference between two `DateTime` values, returning a
|
|
1086
|
+
* `Duration` representing the amount of time between them.
|
|
1161
1087
|
*
|
|
1162
|
-
* If
|
|
1163
|
-
* `
|
|
1164
|
-
*
|
|
1165
|
-
* @since 3.6.0
|
|
1166
|
-
* @category comparisons
|
|
1167
|
-
* @example
|
|
1168
|
-
* ```ts
|
|
1169
|
-
* import { DateTime, Effect } from "effect"
|
|
1170
|
-
*
|
|
1171
|
-
* Effect.gen(function*() {
|
|
1172
|
-
* const now = yield* DateTime.now
|
|
1173
|
-
* const other = DateTime.add(now, { minutes: 1 })
|
|
1174
|
-
*
|
|
1175
|
-
* // returns Result.succeed(Duration.minutes(1))
|
|
1176
|
-
* DateTime.distanceDurationResult(now, other)
|
|
1177
|
-
*
|
|
1178
|
-
* // returns Result.fail(Duration.minutes(1))
|
|
1179
|
-
* DateTime.distanceDurationResult(other, now)
|
|
1180
|
-
* })
|
|
1181
|
-
* ```
|
|
1182
|
-
*/
|
|
1183
|
-
(other: DateTime): (self: DateTime) => Result.Result<Duration.Duration, Duration.Duration>;
|
|
1184
|
-
/**
|
|
1185
|
-
* Calulate the difference between two `DateTime` values.
|
|
1186
|
-
*
|
|
1187
|
-
* If the `other` DateTime is before `self`, the result will be a negative
|
|
1188
|
-
* `Duration`, returned as a `Failure`.
|
|
1189
|
-
*
|
|
1190
|
-
* If the `other` DateTime is after `self`, the result will be a positive
|
|
1191
|
-
* `Duration`, returned as a `Success`.
|
|
1192
|
-
*
|
|
1193
|
-
* @since 3.6.0
|
|
1194
|
-
* @category comparisons
|
|
1195
|
-
* @example
|
|
1196
|
-
* ```ts
|
|
1197
|
-
* import { DateTime, Effect } from "effect"
|
|
1198
|
-
*
|
|
1199
|
-
* Effect.gen(function*() {
|
|
1200
|
-
* const now = yield* DateTime.now
|
|
1201
|
-
* const other = DateTime.add(now, { minutes: 1 })
|
|
1202
|
-
*
|
|
1203
|
-
* // returns Result.succeed(Duration.minutes(1))
|
|
1204
|
-
* DateTime.distanceDurationResult(now, other)
|
|
1205
|
-
*
|
|
1206
|
-
* // returns Result.fail(Duration.minutes(1))
|
|
1207
|
-
* DateTime.distanceDurationResult(other, now)
|
|
1208
|
-
* })
|
|
1209
|
-
* ```
|
|
1210
|
-
*/
|
|
1211
|
-
(self: DateTime, other: DateTime): Result.Result<Duration.Duration, Duration.Duration>;
|
|
1212
|
-
};
|
|
1213
|
-
/**
|
|
1214
|
-
* Calulate the distance between two `DateTime` values.
|
|
1215
|
-
*
|
|
1216
|
-
* @since 3.6.0
|
|
1217
|
-
* @category comparisons
|
|
1218
|
-
* @example
|
|
1219
|
-
* ```ts
|
|
1220
|
-
* import { DateTime, Effect } from "effect"
|
|
1221
|
-
*
|
|
1222
|
-
* Effect.gen(function*() {
|
|
1223
|
-
* const now = yield* DateTime.now
|
|
1224
|
-
* const other = DateTime.add(now, { minutes: 1 })
|
|
1225
|
-
*
|
|
1226
|
-
* // returns Duration.minutes(1)
|
|
1227
|
-
* DateTime.distanceDuration(now, other)
|
|
1228
|
-
* })
|
|
1229
|
-
* ```
|
|
1230
|
-
*/
|
|
1231
|
-
export declare const distanceDuration: {
|
|
1232
|
-
/**
|
|
1233
|
-
* Calulate the distance between two `DateTime` values.
|
|
1088
|
+
* If `other` is *after* `self`, the result will be a positive `Duration`. If
|
|
1089
|
+
* `other` is *before* `self`, the result will be a negative `Duration`. If they
|
|
1090
|
+
* are equal, the result will be a `Duration` of zero.
|
|
1234
1091
|
*
|
|
1235
1092
|
* @since 3.6.0
|
|
1236
1093
|
* @category comparisons
|
|
@@ -1243,13 +1100,18 @@ export declare const distanceDuration: {
|
|
|
1243
1100
|
* const other = DateTime.add(now, { minutes: 1 })
|
|
1244
1101
|
*
|
|
1245
1102
|
* // returns Duration.minutes(1)
|
|
1246
|
-
* DateTime.
|
|
1103
|
+
* DateTime.distance(now, other)
|
|
1247
1104
|
* })
|
|
1248
1105
|
* ```
|
|
1249
1106
|
*/
|
|
1250
1107
|
(other: DateTime): (self: DateTime) => Duration.Duration;
|
|
1251
1108
|
/**
|
|
1252
|
-
* Calulate the
|
|
1109
|
+
* Calulate the difference between two `DateTime` values, returning a
|
|
1110
|
+
* `Duration` representing the amount of time between them.
|
|
1111
|
+
*
|
|
1112
|
+
* If `other` is *after* `self`, the result will be a positive `Duration`. If
|
|
1113
|
+
* `other` is *before* `self`, the result will be a negative `Duration`. If they
|
|
1114
|
+
* are equal, the result will be a `Duration` of zero.
|
|
1253
1115
|
*
|
|
1254
1116
|
* @since 3.6.0
|
|
1255
1117
|
* @category comparisons
|
|
@@ -1262,7 +1124,7 @@ export declare const distanceDuration: {
|
|
|
1262
1124
|
* const other = DateTime.add(now, { minutes: 1 })
|
|
1263
1125
|
*
|
|
1264
1126
|
* // returns Duration.minutes(1)
|
|
1265
|
-
* DateTime.
|
|
1127
|
+
* DateTime.distance(now, other)
|
|
1266
1128
|
* })
|
|
1267
1129
|
* ```
|
|
1268
1130
|
*/
|
|
@@ -2835,7 +2697,7 @@ export declare const addDuration: {
|
|
|
2835
2697
|
* )
|
|
2836
2698
|
* ```
|
|
2837
2699
|
*/
|
|
2838
|
-
(duration: Duration.
|
|
2700
|
+
(duration: Duration.Input): <A extends DateTime>(self: A) => A;
|
|
2839
2701
|
/**
|
|
2840
2702
|
* Add the given `Duration` to a `DateTime`.
|
|
2841
2703
|
*
|
|
@@ -2851,7 +2713,7 @@ export declare const addDuration: {
|
|
|
2851
2713
|
* )
|
|
2852
2714
|
* ```
|
|
2853
2715
|
*/
|
|
2854
|
-
<A extends DateTime>(self: A, duration: Duration.
|
|
2716
|
+
<A extends DateTime>(self: A, duration: Duration.Input): A;
|
|
2855
2717
|
};
|
|
2856
2718
|
/**
|
|
2857
2719
|
* Subtract the given `Duration` from a `DateTime`.
|
|
@@ -2884,7 +2746,7 @@ export declare const subtractDuration: {
|
|
|
2884
2746
|
* )
|
|
2885
2747
|
* ```
|
|
2886
2748
|
*/
|
|
2887
|
-
(duration: Duration.
|
|
2749
|
+
(duration: Duration.Input): <A extends DateTime>(self: A) => A;
|
|
2888
2750
|
/**
|
|
2889
2751
|
* Subtract the given `Duration` from a `DateTime`.
|
|
2890
2752
|
*
|
|
@@ -2900,7 +2762,7 @@ export declare const subtractDuration: {
|
|
|
2900
2762
|
* )
|
|
2901
2763
|
* ```
|
|
2902
2764
|
*/
|
|
2903
|
-
<A extends DateTime>(self: A, duration: Duration.
|
|
2765
|
+
<A extends DateTime>(self: A, duration: Duration.Input): A;
|
|
2904
2766
|
};
|
|
2905
2767
|
/**
|
|
2906
2768
|
* Add the given `amount` of `unit`'s to a `DateTime`.
|