effect 4.0.0-beta.42 → 4.0.0-beta.44
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/Cache.d.ts +12 -43
- package/dist/Cache.d.ts.map +1 -1
- package/dist/Cache.js +15 -42
- package/dist/Cache.js.map +1 -1
- package/dist/Cause.d.ts +21 -21
- package/dist/Cause.d.ts.map +1 -1
- package/dist/Cause.js +89 -10
- package/dist/Cause.js.map +1 -1
- package/dist/Channel.d.ts +42 -19
- package/dist/Channel.d.ts.map +1 -1
- package/dist/Channel.js +86 -46
- package/dist/Channel.js.map +1 -1
- package/dist/Clock.d.ts +2 -2
- package/dist/Clock.d.ts.map +1 -1
- package/dist/Clock.js.map +1 -1
- package/dist/Config.d.ts +2 -2
- package/dist/ConfigProvider.d.ts +5 -5
- package/dist/ConfigProvider.d.ts.map +1 -1
- package/dist/ConfigProvider.js +5 -5
- package/dist/ConfigProvider.js.map +1 -1
- package/dist/Console.d.ts +2 -2
- package/dist/Console.d.ts.map +1 -1
- package/dist/Console.js.map +1 -1
- package/dist/Context.d.ts +1150 -0
- package/dist/Context.d.ts.map +1 -0
- package/dist/{ServiceMap.js → Context.js} +139 -139
- package/dist/Context.js.map +1 -0
- package/dist/DateTime.d.ts +2 -2
- package/dist/DateTime.d.ts.map +1 -1
- package/dist/DateTime.js +2 -2
- package/dist/DateTime.js.map +1 -1
- package/dist/Effect.d.ts +177 -177
- package/dist/Effect.d.ts.map +1 -1
- package/dist/Effect.js +81 -81
- package/dist/Effect.js.map +1 -1
- package/dist/ErrorReporter.d.ts +3 -3
- package/dist/ErrorReporter.d.ts.map +1 -1
- package/dist/ErrorReporter.js +1 -1
- package/dist/ErrorReporter.js.map +1 -1
- package/dist/ExecutionPlan.d.ts +6 -6
- package/dist/ExecutionPlan.d.ts.map +1 -1
- package/dist/ExecutionPlan.js +4 -4
- package/dist/ExecutionPlan.js.map +1 -1
- package/dist/Fiber.d.ts +7 -7
- package/dist/Fiber.d.ts.map +1 -1
- package/dist/Fiber.js.map +1 -1
- package/dist/FiberHandle.d.ts +2 -2
- package/dist/FiberHandle.d.ts.map +1 -1
- package/dist/FiberHandle.js +4 -4
- package/dist/FiberHandle.js.map +1 -1
- package/dist/FiberMap.d.ts +2 -2
- package/dist/FiberMap.d.ts.map +1 -1
- package/dist/FiberMap.js +4 -4
- package/dist/FiberMap.js.map +1 -1
- package/dist/FiberSet.d.ts +2 -2
- package/dist/FiberSet.d.ts.map +1 -1
- package/dist/FiberSet.js +4 -4
- package/dist/FiberSet.js.map +1 -1
- package/dist/FileSystem.d.ts +3 -3
- package/dist/FileSystem.d.ts.map +1 -1
- package/dist/FileSystem.js +3 -3
- package/dist/FileSystem.js.map +1 -1
- package/dist/Layer.d.ts +309 -266
- package/dist/Layer.d.ts.map +1 -1
- package/dist/Layer.js +156 -132
- package/dist/Layer.js.map +1 -1
- package/dist/LayerMap.d.ts +18 -18
- package/dist/LayerMap.d.ts.map +1 -1
- package/dist/LayerMap.js +18 -15
- package/dist/LayerMap.js.map +1 -1
- package/dist/Logger.d.ts +3 -3
- package/dist/Logger.d.ts.map +1 -1
- package/dist/Logger.js.map +1 -1
- package/dist/ManagedRuntime.d.ts +6 -6
- package/dist/ManagedRuntime.d.ts.map +1 -1
- package/dist/ManagedRuntime.js +18 -21
- package/dist/ManagedRuntime.js.map +1 -1
- package/dist/Metric.d.ts +19 -19
- package/dist/Metric.d.ts.map +1 -1
- package/dist/Metric.js +21 -21
- package/dist/Metric.js.map +1 -1
- package/dist/Path.d.ts +2 -2
- package/dist/Path.d.ts.map +1 -1
- package/dist/Path.js +2 -2
- package/dist/Path.js.map +1 -1
- package/dist/Pool.d.ts.map +1 -1
- package/dist/Pool.js +4 -4
- package/dist/Pool.js.map +1 -1
- package/dist/PubSub.d.ts.map +1 -1
- package/dist/PubSub.js +3 -3
- package/dist/PubSub.js.map +1 -1
- package/dist/Random.d.ts +2 -2
- package/dist/Random.d.ts.map +1 -1
- package/dist/Random.js +0 -23
- 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 +12 -12
- package/dist/RcMap.js.map +1 -1
- package/dist/Redactable.d.ts +139 -62
- package/dist/Redactable.d.ts.map +1 -1
- package/dist/Redactable.js +59 -55
- package/dist/Redactable.js.map +1 -1
- package/dist/References.d.ts +26 -14
- package/dist/References.d.ts.map +1 -1
- package/dist/References.js +0 -12
- package/dist/References.js.map +1 -1
- package/dist/Request.d.ts +5 -5
- package/dist/Request.d.ts.map +1 -1
- package/dist/Request.js.map +1 -1
- package/dist/RequestResolver.d.ts.map +1 -1
- package/dist/RequestResolver.js +6 -7
- package/dist/RequestResolver.js.map +1 -1
- package/dist/Resource.d.ts +0 -3
- package/dist/Resource.d.ts.map +1 -1
- package/dist/Resource.js +3 -3
- package/dist/Resource.js.map +1 -1
- package/dist/Schedule.d.ts +2 -2
- package/dist/Schedule.d.ts.map +1 -1
- package/dist/Schedule.js +2 -2
- package/dist/Schedule.js.map +1 -1
- package/dist/Scheduler.d.ts +4 -4
- package/dist/Scheduler.d.ts.map +1 -1
- package/dist/Scheduler.js +7 -4
- package/dist/Scheduler.js.map +1 -1
- package/dist/Schema.d.ts +531 -214
- package/dist/Schema.d.ts.map +1 -1
- package/dist/Schema.js +304 -103
- package/dist/Schema.js.map +1 -1
- package/dist/SchemaAST.d.ts.map +1 -1
- package/dist/SchemaAST.js +5 -15
- package/dist/SchemaAST.js.map +1 -1
- package/dist/SchemaGetter.d.ts +49 -5
- package/dist/SchemaGetter.d.ts.map +1 -1
- package/dist/SchemaGetter.js +64 -5
- package/dist/SchemaGetter.js.map +1 -1
- package/dist/SchemaTransformation.d.ts +145 -0
- package/dist/SchemaTransformation.d.ts.map +1 -1
- package/dist/SchemaTransformation.js +146 -0
- package/dist/SchemaTransformation.js.map +1 -1
- package/dist/Scope.d.ts +2 -2
- package/dist/Scope.d.ts.map +1 -1
- package/dist/Scope.js.map +1 -1
- package/dist/ScopedCache.d.ts.map +1 -1
- package/dist/ScopedCache.js +4 -4
- package/dist/ScopedCache.js.map +1 -1
- package/dist/Sink.d.ts +6 -6
- package/dist/Sink.d.ts.map +1 -1
- package/dist/Sink.js +1 -1
- package/dist/Sink.js.map +1 -1
- package/dist/Stdio.d.ts +2 -2
- package/dist/Stdio.d.ts.map +1 -1
- package/dist/Stdio.js +2 -2
- package/dist/Stdio.js.map +1 -1
- package/dist/Stream.d.ts +187 -117
- package/dist/Stream.d.ts.map +1 -1
- package/dist/Stream.js +133 -57
- package/dist/Stream.js.map +1 -1
- package/dist/Terminal.d.ts +3 -3
- package/dist/Terminal.d.ts.map +1 -1
- package/dist/Terminal.js +2 -2
- package/dist/Terminal.js.map +1 -1
- package/dist/Tracer.d.ts +16 -16
- package/dist/Tracer.d.ts.map +1 -1
- package/dist/Tracer.js +11 -8
- package/dist/Tracer.js.map +1 -1
- package/dist/Unify.d.ts +8 -2
- package/dist/Unify.d.ts.map +1 -1
- package/dist/Unify.js.map +1 -1
- package/dist/index.d.ts +81 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +81 -15
- package/dist/index.js.map +1 -1
- package/dist/internal/core.js.map +1 -1
- package/dist/internal/effect.js +74 -74
- package/dist/internal/effect.js.map +1 -1
- package/dist/internal/layer.js +3 -3
- package/dist/internal/layer.js.map +1 -1
- package/dist/internal/random.js +2 -2
- package/dist/internal/random.js.map +1 -1
- package/dist/internal/rcRef.js +9 -9
- package/dist/internal/rcRef.js.map +1 -1
- package/dist/internal/references.js +13 -13
- package/dist/internal/references.js.map +1 -1
- package/dist/internal/request.js +6 -6
- package/dist/internal/request.js.map +1 -1
- package/dist/internal/schedule.js +1 -1
- package/dist/internal/schedule.js.map +1 -1
- package/dist/internal/schema/representation.js +11 -1
- package/dist/internal/schema/representation.js.map +1 -1
- package/dist/internal/schema/schema.d.ts +10 -1
- package/dist/internal/schema/schema.d.ts.map +1 -1
- package/dist/internal/schema/schema.js +21 -1
- package/dist/internal/schema/schema.js.map +1 -1
- package/dist/testing/TestSchema.d.ts +3 -3
- package/dist/testing/TestSchema.d.ts.map +1 -1
- package/dist/testing/TestSchema.js.map +1 -1
- package/dist/unstable/ai/AiError.d.ts +19 -19
- package/dist/unstable/ai/AiError.d.ts.map +1 -1
- package/dist/unstable/ai/AiError.js +2 -1
- package/dist/unstable/ai/AiError.js.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.d.ts.map +1 -1
- package/dist/unstable/ai/AnthropicStructuredOutput.js +5 -2
- package/dist/unstable/ai/AnthropicStructuredOutput.js.map +1 -1
- package/dist/unstable/ai/Chat.d.ts +4 -4
- package/dist/unstable/ai/Chat.d.ts.map +1 -1
- package/dist/unstable/ai/Chat.js +3 -3
- package/dist/unstable/ai/Chat.js.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.d.ts +6 -6
- package/dist/unstable/ai/EmbeddingModel.d.ts.map +1 -1
- package/dist/unstable/ai/EmbeddingModel.js +3 -3
- package/dist/unstable/ai/EmbeddingModel.js.map +1 -1
- package/dist/unstable/ai/IdGenerator.d.ts +2 -2
- package/dist/unstable/ai/IdGenerator.d.ts.map +1 -1
- package/dist/unstable/ai/IdGenerator.js +2 -2
- package/dist/unstable/ai/IdGenerator.js.map +1 -1
- package/dist/unstable/ai/LanguageModel.d.ts +2 -2
- package/dist/unstable/ai/LanguageModel.d.ts.map +1 -1
- package/dist/unstable/ai/LanguageModel.js +2 -2
- package/dist/unstable/ai/LanguageModel.js.map +1 -1
- package/dist/unstable/ai/McpSchema.d.ts +54 -54
- package/dist/unstable/ai/McpSchema.d.ts.map +1 -1
- package/dist/unstable/ai/McpSchema.js +15 -8
- package/dist/unstable/ai/McpSchema.js.map +1 -1
- package/dist/unstable/ai/McpServer.d.ts +22 -22
- package/dist/unstable/ai/McpServer.d.ts.map +1 -1
- package/dist/unstable/ai/McpServer.js +25 -25
- package/dist/unstable/ai/McpServer.js.map +1 -1
- package/dist/unstable/ai/Model.d.ts +3 -3
- package/dist/unstable/ai/Model.d.ts.map +1 -1
- package/dist/unstable/ai/Model.js +5 -5
- package/dist/unstable/ai/Model.js.map +1 -1
- package/dist/unstable/ai/OpenAiStructuredOutput.d.ts +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.map +1 -1
- package/dist/unstable/ai/Prompt.js +6 -9
- package/dist/unstable/ai/Prompt.js.map +1 -1
- package/dist/unstable/ai/Response.d.ts +1 -1
- package/dist/unstable/ai/Response.d.ts.map +1 -1
- package/dist/unstable/ai/Response.js +6 -7
- package/dist/unstable/ai/Response.js.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.d.ts +2 -2
- package/dist/unstable/ai/ResponseIdTracker.d.ts.map +1 -1
- package/dist/unstable/ai/ResponseIdTracker.js +2 -2
- package/dist/unstable/ai/ResponseIdTracker.js.map +1 -1
- package/dist/unstable/ai/Telemetry.d.ts +35 -2
- package/dist/unstable/ai/Telemetry.d.ts.map +1 -1
- package/dist/unstable/ai/Telemetry.js +2 -2
- package/dist/unstable/ai/Telemetry.js.map +1 -1
- package/dist/unstable/ai/Tokenizer.d.ts +2 -2
- package/dist/unstable/ai/Tokenizer.d.ts.map +1 -1
- package/dist/unstable/ai/Tokenizer.js +2 -2
- package/dist/unstable/ai/Tokenizer.js.map +1 -1
- package/dist/unstable/ai/Tool.d.ts +16 -16
- package/dist/unstable/ai/Tool.d.ts.map +1 -1
- package/dist/unstable/ai/Tool.js +41 -13
- package/dist/unstable/ai/Tool.js.map +1 -1
- package/dist/unstable/ai/Toolkit.d.ts +3 -3
- package/dist/unstable/ai/Toolkit.d.ts.map +1 -1
- package/dist/unstable/ai/Toolkit.js +10 -10
- package/dist/unstable/ai/Toolkit.js.map +1 -1
- package/dist/unstable/ai/internal/codec-transformer.js +5 -2
- package/dist/unstable/ai/internal/codec-transformer.js.map +1 -1
- package/dist/unstable/cli/Argument.d.ts +2 -3
- package/dist/unstable/cli/Argument.d.ts.map +1 -1
- package/dist/unstable/cli/Argument.js.map +1 -1
- package/dist/unstable/cli/CliError.d.ts +29 -8
- package/dist/unstable/cli/CliError.d.ts.map +1 -1
- package/dist/unstable/cli/CliError.js +8 -1
- package/dist/unstable/cli/CliError.js.map +1 -1
- package/dist/unstable/cli/CliOutput.d.ts +2 -2
- package/dist/unstable/cli/CliOutput.d.ts.map +1 -1
- package/dist/unstable/cli/CliOutput.js +2 -2
- package/dist/unstable/cli/CliOutput.js.map +1 -1
- package/dist/unstable/cli/Command.d.ts +14 -14
- package/dist/unstable/cli/Command.d.ts.map +1 -1
- package/dist/unstable/cli/Command.js +11 -10
- package/dist/unstable/cli/Command.js.map +1 -1
- package/dist/unstable/cli/Flag.d.ts +2 -3
- package/dist/unstable/cli/Flag.d.ts.map +1 -1
- package/dist/unstable/cli/Flag.js.map +1 -1
- package/dist/unstable/cli/GlobalFlag.d.ts +2 -2
- package/dist/unstable/cli/GlobalFlag.d.ts.map +1 -1
- package/dist/unstable/cli/GlobalFlag.js +2 -2
- package/dist/unstable/cli/GlobalFlag.js.map +1 -1
- package/dist/unstable/cli/HelpDoc.d.ts +8 -8
- package/dist/unstable/cli/HelpDoc.d.ts.map +1 -1
- package/dist/unstable/cli/Param.d.ts +30 -2
- package/dist/unstable/cli/Param.d.ts.map +1 -1
- package/dist/unstable/cli/Param.js +17 -7
- package/dist/unstable/cli/Param.js.map +1 -1
- package/dist/unstable/cli/Prompt.js +8 -2
- package/dist/unstable/cli/Prompt.js.map +1 -1
- package/dist/unstable/cli/internal/command.d.ts +5 -5
- package/dist/unstable/cli/internal/command.d.ts.map +1 -1
- package/dist/unstable/cli/internal/command.js +3 -3
- package/dist/unstable/cli/internal/command.js.map +1 -1
- package/dist/unstable/cli/internal/parser.js +94 -15
- package/dist/unstable/cli/internal/parser.js.map +1 -1
- package/dist/unstable/cluster/ClusterError.d.ts +7 -7
- package/dist/unstable/cluster/ClusterSchema.d.ts +12 -9
- package/dist/unstable/cluster/ClusterSchema.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterSchema.js +9 -9
- package/dist/unstable/cluster/ClusterSchema.js.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts +1 -0
- package/dist/unstable/cluster/ClusterWorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/cluster/ClusterWorkflowEngine.js +68 -40
- package/dist/unstable/cluster/ClusterWorkflowEngine.js.map +1 -1
- package/dist/unstable/cluster/Entity.d.ts +10 -10
- package/dist/unstable/cluster/Entity.d.ts.map +1 -1
- package/dist/unstable/cluster/Entity.js +25 -20
- package/dist/unstable/cluster/Entity.js.map +1 -1
- package/dist/unstable/cluster/EntityAddress.d.ts +2 -2
- package/dist/unstable/cluster/EntityProxy.js +3 -3
- package/dist/unstable/cluster/EntityProxy.js.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.d.ts.map +1 -1
- package/dist/unstable/cluster/EntityProxyServer.js +4 -4
- package/dist/unstable/cluster/EntityProxyServer.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/EntityResource.js +2 -2
- package/dist/unstable/cluster/EntityResource.js.map +1 -1
- package/dist/unstable/cluster/Envelope.d.ts +3 -3
- package/dist/unstable/cluster/HttpRunner.js +2 -2
- package/dist/unstable/cluster/HttpRunner.js.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.d.ts +4 -4
- package/dist/unstable/cluster/K8sHttpClient.d.ts.map +1 -1
- package/dist/unstable/cluster/K8sHttpClient.js +2 -2
- package/dist/unstable/cluster/K8sHttpClient.js.map +1 -1
- package/dist/unstable/cluster/Message.d.ts +7 -4
- package/dist/unstable/cluster/Message.d.ts.map +1 -1
- package/dist/unstable/cluster/Message.js +5 -5
- package/dist/unstable/cluster/Message.js.map +1 -1
- package/dist/unstable/cluster/MessageStorage.d.ts +14 -14
- package/dist/unstable/cluster/MessageStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/MessageStorage.js +8 -8
- package/dist/unstable/cluster/MessageStorage.js.map +1 -1
- package/dist/unstable/cluster/Reply.d.ts +2 -2
- package/dist/unstable/cluster/Reply.d.ts.map +1 -1
- package/dist/unstable/cluster/Reply.js +5 -5
- package/dist/unstable/cluster/Reply.js.map +1 -1
- package/dist/unstable/cluster/Runner.d.ts +1 -1
- package/dist/unstable/cluster/RunnerAddress.d.ts +1 -1
- package/dist/unstable/cluster/RunnerHealth.d.ts +2 -2
- package/dist/unstable/cluster/RunnerHealth.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerHealth.js +2 -2
- package/dist/unstable/cluster/RunnerHealth.js.map +1 -1
- package/dist/unstable/cluster/RunnerServer.js +1 -1
- package/dist/unstable/cluster/RunnerServer.js.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.d.ts +12 -12
- package/dist/unstable/cluster/RunnerStorage.d.ts.map +1 -1
- package/dist/unstable/cluster/RunnerStorage.js +3 -3
- package/dist/unstable/cluster/RunnerStorage.js.map +1 -1
- package/dist/unstable/cluster/Runners.d.ts +3 -3
- package/dist/unstable/cluster/Runners.d.ts.map +1 -1
- package/dist/unstable/cluster/Runners.js +7 -7
- package/dist/unstable/cluster/Runners.js.map +1 -1
- package/dist/unstable/cluster/ShardId.d.ts +35 -49
- package/dist/unstable/cluster/ShardId.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardId.js +65 -67
- package/dist/unstable/cluster/ShardId.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 +21 -21
- package/dist/unstable/cluster/Sharding.js.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.d.ts +2 -2
- package/dist/unstable/cluster/ShardingConfig.d.ts.map +1 -1
- package/dist/unstable/cluster/ShardingConfig.js +5 -5
- package/dist/unstable/cluster/ShardingConfig.js.map +1 -1
- package/dist/unstable/cluster/SingletonAddress.d.ts +2 -2
- package/dist/unstable/cluster/Snowflake.d.ts +2 -2
- package/dist/unstable/cluster/Snowflake.d.ts.map +1 -1
- package/dist/unstable/cluster/Snowflake.js +2 -2
- package/dist/unstable/cluster/Snowflake.js.map +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js +1 -1
- package/dist/unstable/cluster/SqlMessageStorage.js.map +1 -1
- package/dist/unstable/cluster/internal/entityManager.js +15 -14
- package/dist/unstable/cluster/internal/entityManager.js.map +1 -1
- package/dist/unstable/cluster/internal/entityReaper.js +2 -2
- package/dist/unstable/cluster/internal/entityReaper.js.map +1 -1
- package/dist/unstable/cluster/internal/resourceMap.js +3 -3
- package/dist/unstable/cluster/internal/resourceMap.js.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.d.ts +2 -2
- package/dist/unstable/devtools/DevToolsClient.d.ts.map +1 -1
- package/dist/unstable/devtools/DevToolsClient.js +5 -5
- package/dist/unstable/devtools/DevToolsClient.js.map +1 -1
- package/dist/unstable/eventlog/EventJournal.d.ts +4 -4
- package/dist/unstable/eventlog/EventJournal.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventJournal.js +2 -2
- package/dist/unstable/eventlog/EventJournal.js.map +1 -1
- package/dist/unstable/eventlog/EventLog.d.ts +5 -5
- package/dist/unstable/eventlog/EventLog.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLog.js +18 -18
- package/dist/unstable/eventlog/EventLog.js.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.d.ts +2 -2
- package/dist/unstable/eventlog/EventLogEncryption.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogEncryption.js +2 -2
- package/dist/unstable/eventlog/EventLogEncryption.js.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.d.ts +15 -12
- package/dist/unstable/eventlog/EventLogRemote.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogRemote.js +2 -2
- package/dist/unstable/eventlog/EventLogRemote.js.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.d.ts +3 -3
- package/dist/unstable/eventlog/EventLogServer.d.ts.map +1 -1
- package/dist/unstable/eventlog/EventLogServer.js +2 -2
- package/dist/unstable/eventlog/EventLogServer.js.map +1 -1
- package/dist/unstable/http/Etag.d.ts +2 -2
- package/dist/unstable/http/Etag.d.ts.map +1 -1
- package/dist/unstable/http/Etag.js +2 -2
- package/dist/unstable/http/Etag.js.map +1 -1
- package/dist/unstable/http/FetchHttpClient.d.ts +6 -3
- package/dist/unstable/http/FetchHttpClient.d.ts.map +1 -1
- package/dist/unstable/http/FetchHttpClient.js +5 -5
- package/dist/unstable/http/FetchHttpClient.js.map +1 -1
- package/dist/unstable/http/Headers.d.ts +5 -2
- package/dist/unstable/http/Headers.d.ts.map +1 -1
- package/dist/unstable/http/Headers.js +3 -3
- package/dist/unstable/http/Headers.js.map +1 -1
- package/dist/unstable/http/HttpClient.d.ts +8 -6
- package/dist/unstable/http/HttpClient.d.ts.map +1 -1
- package/dist/unstable/http/HttpClient.js +6 -6
- package/dist/unstable/http/HttpClient.js.map +1 -1
- package/dist/unstable/http/HttpClientError.d.ts +1 -1
- package/dist/unstable/http/HttpClientRequest.d.ts +2 -2
- package/dist/unstable/http/HttpClientRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpClientRequest.js +4 -4
- package/dist/unstable/http/HttpClientRequest.js.map +1 -1
- package/dist/unstable/http/HttpEffect.d.ts +6 -6
- package/dist/unstable/http/HttpEffect.d.ts.map +1 -1
- package/dist/unstable/http/HttpEffect.js +24 -24
- package/dist/unstable/http/HttpEffect.js.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.d.ts +2 -2
- package/dist/unstable/http/HttpIncomingMessage.d.ts.map +1 -1
- package/dist/unstable/http/HttpIncomingMessage.js +2 -2
- package/dist/unstable/http/HttpIncomingMessage.js.map +1 -1
- package/dist/unstable/http/HttpMiddleware.d.ts +3 -3
- package/dist/unstable/http/HttpMiddleware.d.ts.map +1 -1
- package/dist/unstable/http/HttpMiddleware.js +26 -14
- package/dist/unstable/http/HttpMiddleware.js.map +1 -1
- package/dist/unstable/http/HttpPlatform.d.ts +2 -2
- package/dist/unstable/http/HttpPlatform.d.ts.map +1 -1
- package/dist/unstable/http/HttpPlatform.js +2 -2
- package/dist/unstable/http/HttpPlatform.js.map +1 -1
- package/dist/unstable/http/HttpRouter.d.ts +7 -7
- package/dist/unstable/http/HttpRouter.d.ts.map +1 -1
- package/dist/unstable/http/HttpRouter.js +29 -29
- package/dist/unstable/http/HttpRouter.js.map +1 -1
- package/dist/unstable/http/HttpServer.d.ts +2 -2
- package/dist/unstable/http/HttpServer.d.ts.map +1 -1
- package/dist/unstable/http/HttpServer.js +2 -2
- package/dist/unstable/http/HttpServer.js.map +1 -1
- package/dist/unstable/http/HttpServerError.d.ts +3 -3
- package/dist/unstable/http/HttpServerError.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerError.js +3 -3
- package/dist/unstable/http/HttpServerError.js.map +1 -1
- package/dist/unstable/http/HttpServerRequest.d.ts +4 -4
- package/dist/unstable/http/HttpServerRequest.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerRequest.js +6 -6
- package/dist/unstable/http/HttpServerRequest.js.map +1 -1
- package/dist/unstable/http/HttpServerResponse.d.ts +2 -2
- package/dist/unstable/http/HttpServerResponse.d.ts.map +1 -1
- package/dist/unstable/http/HttpServerResponse.js +6 -6
- package/dist/unstable/http/HttpServerResponse.js.map +1 -1
- package/dist/unstable/http/Multipart.d.ts +6 -6
- package/dist/unstable/http/Multipart.d.ts.map +1 -1
- package/dist/unstable/http/Multipart.js +7 -7
- package/dist/unstable/http/Multipart.js.map +1 -1
- package/dist/unstable/httpapi/HttpApi.d.ts +9 -9
- package/dist/unstable/httpapi/HttpApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApi.js +8 -8
- package/dist/unstable/httpapi/HttpApi.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts +0 -3
- package/dist/unstable/httpapi/HttpApiBuilder.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiBuilder.js +20 -20
- package/dist/unstable/httpapi/HttpApiBuilder.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js +1 -1
- package/dist/unstable/httpapi/HttpApiClient.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts +7 -7
- package/dist/unstable/httpapi/HttpApiEndpoint.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiEndpoint.js +4 -4
- package/dist/unstable/httpapi/HttpApiEndpoint.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiError.d.ts +13 -13
- package/dist/unstable/httpapi/HttpApiError.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.d.ts +8 -8
- package/dist/unstable/httpapi/HttpApiGroup.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiGroup.js +4 -4
- package/dist/unstable/httpapi/HttpApiGroup.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts +6 -6
- package/dist/unstable/httpapi/HttpApiMiddleware.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiMiddleware.js +5 -5
- package/dist/unstable/httpapi/HttpApiMiddleware.js.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts +9 -6
- package/dist/unstable/httpapi/HttpApiSecurity.d.ts.map +1 -1
- package/dist/unstable/httpapi/HttpApiSecurity.js +6 -6
- package/dist/unstable/httpapi/HttpApiSecurity.js.map +1 -1
- package/dist/unstable/httpapi/OpenApi.d.ts +15 -15
- package/dist/unstable/httpapi/OpenApi.d.ts.map +1 -1
- package/dist/unstable/httpapi/OpenApi.js +23 -23
- package/dist/unstable/httpapi/OpenApi.js.map +1 -1
- package/dist/unstable/observability/OtlpExporter.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpExporter.js +5 -5
- package/dist/unstable/observability/OtlpExporter.js.map +1 -1
- package/dist/unstable/observability/OtlpMetrics.js +1 -1
- package/dist/unstable/observability/OtlpMetrics.js.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.d.ts +2 -2
- package/dist/unstable/observability/OtlpSerialization.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpSerialization.js +2 -2
- package/dist/unstable/observability/OtlpSerialization.js.map +1 -1
- package/dist/unstable/observability/OtlpTracer.d.ts.map +1 -1
- package/dist/unstable/observability/OtlpTracer.js.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.d.ts +3 -3
- package/dist/unstable/observability/PrometheusMetrics.d.ts.map +1 -1
- package/dist/unstable/observability/PrometheusMetrics.js +4 -33
- package/dist/unstable/observability/PrometheusMetrics.js.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.d.ts +23 -2
- package/dist/unstable/persistence/KeyValueStore.d.ts.map +1 -1
- package/dist/unstable/persistence/KeyValueStore.js +144 -2
- package/dist/unstable/persistence/KeyValueStore.js.map +1 -1
- package/dist/unstable/persistence/PersistedCache.d.ts +1 -2
- package/dist/unstable/persistence/PersistedCache.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedCache.js +10 -11
- package/dist/unstable/persistence/PersistedCache.js.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.d.ts +4 -4
- package/dist/unstable/persistence/PersistedQueue.d.ts.map +1 -1
- package/dist/unstable/persistence/PersistedQueue.js +3 -3
- package/dist/unstable/persistence/PersistedQueue.js.map +1 -1
- package/dist/unstable/persistence/Persistence.d.ts +4 -4
- package/dist/unstable/persistence/Persistence.d.ts.map +1 -1
- package/dist/unstable/persistence/Persistence.js +3 -3
- package/dist/unstable/persistence/Persistence.js.map +1 -1
- package/dist/unstable/persistence/RateLimiter.d.ts +6 -6
- package/dist/unstable/persistence/RateLimiter.d.ts.map +1 -1
- package/dist/unstable/persistence/RateLimiter.js +3 -3
- package/dist/unstable/persistence/RateLimiter.js.map +1 -1
- package/dist/unstable/persistence/Redis.d.ts +3 -3
- package/dist/unstable/persistence/Redis.d.ts.map +1 -1
- package/dist/unstable/persistence/Redis.js +2 -2
- package/dist/unstable/persistence/Redis.js.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.d.ts +45 -2
- package/dist/unstable/process/ChildProcessSpawner.d.ts.map +1 -1
- package/dist/unstable/process/ChildProcessSpawner.js +2 -2
- package/dist/unstable/process/ChildProcessSpawner.js.map +1 -1
- package/dist/unstable/reactivity/Atom.d.ts +36 -36
- package/dist/unstable/reactivity/Atom.d.ts.map +1 -1
- package/dist/unstable/reactivity/Atom.js +9 -9
- package/dist/unstable/reactivity/Atom.js.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.d.ts +3 -3
- package/dist/unstable/reactivity/AtomHttpApi.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomHttpApi.js +2 -2
- package/dist/unstable/reactivity/AtomHttpApi.js.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.d.ts +2 -2
- package/dist/unstable/reactivity/AtomRegistry.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRegistry.js +3 -3
- package/dist/unstable/reactivity/AtomRegistry.js.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.d.ts +3 -3
- package/dist/unstable/reactivity/AtomRpc.d.ts.map +1 -1
- package/dist/unstable/reactivity/AtomRpc.js +2 -2
- package/dist/unstable/reactivity/AtomRpc.js.map +1 -1
- package/dist/unstable/reactivity/Reactivity.d.ts +2 -2
- package/dist/unstable/reactivity/Reactivity.d.ts.map +1 -1
- package/dist/unstable/reactivity/Reactivity.js +6 -6
- package/dist/unstable/reactivity/Reactivity.js.map +1 -1
- package/dist/unstable/rpc/Rpc.d.ts +11 -11
- package/dist/unstable/rpc/Rpc.d.ts.map +1 -1
- package/dist/unstable/rpc/Rpc.js +4 -4
- package/dist/unstable/rpc/Rpc.js.map +1 -1
- package/dist/unstable/rpc/RpcClient.d.ts +18 -8
- package/dist/unstable/rpc/RpcClient.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcClient.js +27 -18
- package/dist/unstable/rpc/RpcClient.js.map +1 -1
- package/dist/unstable/rpc/RpcClientError.d.ts +2 -2
- package/dist/unstable/rpc/RpcGroup.d.ts +7 -7
- package/dist/unstable/rpc/RpcGroup.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcGroup.js +20 -20
- package/dist/unstable/rpc/RpcGroup.js.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.d.ts +6 -6
- package/dist/unstable/rpc/RpcMiddleware.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcMiddleware.js +5 -5
- package/dist/unstable/rpc/RpcMiddleware.js.map +1 -1
- package/dist/unstable/rpc/RpcSchema.d.ts +3 -3
- package/dist/unstable/rpc/RpcSchema.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSchema.js +3 -3
- package/dist/unstable/rpc/RpcSchema.js.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.d.ts +2 -2
- package/dist/unstable/rpc/RpcSerialization.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcSerialization.js +7 -7
- package/dist/unstable/rpc/RpcSerialization.js.map +1 -1
- package/dist/unstable/rpc/RpcServer.d.ts +2 -2
- package/dist/unstable/rpc/RpcServer.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcServer.js +18 -18
- package/dist/unstable/rpc/RpcServer.js.map +1 -1
- package/dist/unstable/rpc/RpcWorker.d.ts +2 -2
- package/dist/unstable/rpc/RpcWorker.d.ts.map +1 -1
- package/dist/unstable/rpc/RpcWorker.js +4 -4
- package/dist/unstable/rpc/RpcWorker.js.map +1 -1
- package/dist/unstable/rpc/Utils.d.ts +0 -3
- package/dist/unstable/rpc/Utils.d.ts.map +1 -1
- package/dist/unstable/rpc/Utils.js +2 -5
- package/dist/unstable/rpc/Utils.js.map +1 -1
- package/dist/unstable/socket/Socket.d.ts +10 -10
- package/dist/unstable/socket/Socket.d.ts.map +1 -1
- package/dist/unstable/socket/Socket.js +9 -9
- package/dist/unstable/socket/Socket.js.map +1 -1
- package/dist/unstable/socket/SocketServer.d.ts +5 -2
- package/dist/unstable/socket/SocketServer.d.ts.map +1 -1
- package/dist/unstable/socket/SocketServer.js +2 -2
- package/dist/unstable/socket/SocketServer.js.map +1 -1
- package/dist/unstable/sql/SqlClient.d.ts +5 -5
- package/dist/unstable/sql/SqlClient.d.ts.map +1 -1
- package/dist/unstable/sql/SqlClient.js +7 -7
- package/dist/unstable/sql/SqlClient.js.map +1 -1
- package/dist/unstable/sql/SqlConnection.d.ts +2 -2
- package/dist/unstable/sql/SqlConnection.d.ts.map +1 -1
- package/dist/unstable/sql/SqlConnection.js +5 -2
- package/dist/unstable/sql/SqlConnection.js.map +1 -1
- package/dist/unstable/sql/SqlError.d.ts +12 -12
- package/dist/unstable/sql/SqlModel.d.ts +8 -9
- package/dist/unstable/sql/SqlModel.d.ts.map +1 -1
- package/dist/unstable/sql/SqlModel.js +9 -35
- package/dist/unstable/sql/SqlModel.js.map +1 -1
- package/dist/unstable/sql/SqlResolver.js +11 -11
- package/dist/unstable/sql/SqlResolver.js.map +1 -1
- package/dist/unstable/sql/Statement.d.ts +2 -2
- package/dist/unstable/sql/Statement.d.ts.map +1 -1
- package/dist/unstable/sql/Statement.js +2 -2
- package/dist/unstable/sql/Statement.js.map +1 -1
- package/dist/unstable/workers/Transferable.d.ts +2 -2
- package/dist/unstable/workers/Transferable.d.ts.map +1 -1
- package/dist/unstable/workers/Transferable.js +6 -6
- package/dist/unstable/workers/Transferable.js.map +1 -1
- package/dist/unstable/workers/Worker.d.ts +3 -3
- package/dist/unstable/workers/Worker.d.ts.map +1 -1
- package/dist/unstable/workers/Worker.js +6 -3
- package/dist/unstable/workers/Worker.js.map +1 -1
- package/dist/unstable/workers/WorkerError.d.ts +5 -5
- package/dist/unstable/workers/WorkerRunner.d.ts +2 -2
- package/dist/unstable/workers/WorkerRunner.d.ts.map +1 -1
- package/dist/unstable/workers/WorkerRunner.js +5 -2
- package/dist/unstable/workers/WorkerRunner.js.map +1 -1
- package/dist/unstable/workflow/Activity.d.ts +7 -7
- package/dist/unstable/workflow/Activity.d.ts.map +1 -1
- package/dist/unstable/workflow/Activity.js +7 -7
- package/dist/unstable/workflow/Activity.js.map +1 -1
- package/dist/unstable/workflow/DurableClock.d.ts +0 -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.d.ts +1 -1
- package/dist/unstable/workflow/DurableDeferred.d.ts.map +1 -1
- package/dist/unstable/workflow/DurableDeferred.js +7 -7
- package/dist/unstable/workflow/DurableDeferred.js.map +1 -1
- package/dist/unstable/workflow/Workflow.d.ts +9 -9
- package/dist/unstable/workflow/Workflow.d.ts.map +1 -1
- package/dist/unstable/workflow/Workflow.js +18 -18
- package/dist/unstable/workflow/Workflow.js.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.d.ts +9 -3
- package/dist/unstable/workflow/WorkflowEngine.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowEngine.js +14 -5
- package/dist/unstable/workflow/WorkflowEngine.js.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.d.ts.map +1 -1
- package/dist/unstable/workflow/WorkflowProxyServer.js +4 -4
- package/dist/unstable/workflow/WorkflowProxyServer.js.map +1 -1
- package/package.json +1 -1
- package/src/Cache.ts +18 -46
- package/src/Cause.ts +21 -21
- package/src/Channel.ts +120 -79
- package/src/Clock.ts +2 -2
- package/src/Config.ts +2 -2
- package/src/ConfigProvider.ts +5 -5
- package/src/Console.ts +2 -2
- package/src/{ServiceMap.ts → Context.ts} +337 -340
- package/src/DateTime.ts +2 -2
- package/src/Effect.ts +182 -184
- package/src/ErrorReporter.ts +3 -3
- package/src/ExecutionPlan.ts +8 -9
- package/src/Fiber.ts +7 -7
- package/src/FiberHandle.ts +5 -5
- package/src/FiberMap.ts +5 -5
- package/src/FiberSet.ts +5 -5
- package/src/FileSystem.ts +3 -3
- package/src/Layer.ts +358 -305
- package/src/LayerMap.ts +27 -26
- package/src/Logger.ts +3 -3
- package/src/ManagedRuntime.ts +32 -32
- package/src/Metric.ts +58 -58
- package/src/Path.ts +2 -2
- package/src/Pool.ts +5 -5
- package/src/PubSub.ts +3 -3
- package/src/Random.ts +2 -2
- package/src/RcMap.ts +14 -14
- package/src/Redactable.ts +146 -72
- package/src/References.ts +14 -14
- package/src/Request.ts +5 -5
- package/src/RequestResolver.ts +6 -7
- package/src/Resource.ts +4 -4
- package/src/Schedule.ts +2 -2
- package/src/Scheduler.ts +4 -4
- package/src/Schema.ts +837 -397
- package/src/SchemaAST.ts +5 -14
- package/src/SchemaGetter.ts +69 -11
- package/src/SchemaTransformation.ts +166 -0
- package/src/Scope.ts +2 -2
- package/src/ScopedCache.ts +5 -5
- package/src/Sink.ts +9 -9
- package/src/Stdio.ts +2 -2
- package/src/Stream.ts +234 -158
- package/src/Terminal.ts +3 -3
- package/src/Tracer.ts +17 -17
- package/src/Unify.ts +26 -2
- package/src/index.ts +82 -16
- package/src/internal/core.ts +7 -7
- package/src/internal/effect.ts +106 -106
- package/src/internal/layer.ts +7 -7
- package/src/internal/random.ts +2 -2
- package/src/internal/rcRef.ts +10 -10
- package/src/internal/references.ts +13 -13
- package/src/internal/request.ts +8 -8
- package/src/internal/schedule.ts +3 -1
- package/src/internal/schema/representation.ts +8 -1
- package/src/internal/schema/schema.ts +24 -1
- package/src/testing/TestSchema.ts +3 -3
- package/src/unstable/ai/AiError.ts +3 -2
- package/src/unstable/ai/AnthropicStructuredOutput.ts +3 -3
- package/src/unstable/ai/Chat.ts +3 -3
- package/src/unstable/ai/EmbeddingModel.ts +3 -3
- package/src/unstable/ai/IdGenerator.ts +2 -2
- package/src/unstable/ai/LanguageModel.ts +2 -2
- package/src/unstable/ai/McpSchema.ts +11 -9
- package/src/unstable/ai/McpServer.ts +44 -44
- package/src/unstable/ai/Model.ts +8 -8
- package/src/unstable/ai/OpenAiStructuredOutput.ts +2 -2
- package/src/unstable/ai/Prompt.ts +6 -12
- package/src/unstable/ai/Response.ts +6 -8
- package/src/unstable/ai/ResponseIdTracker.ts +2 -4
- package/src/unstable/ai/Telemetry.ts +2 -2
- package/src/unstable/ai/Tokenizer.ts +2 -2
- package/src/unstable/ai/Tool.ts +25 -25
- package/src/unstable/ai/Toolkit.ts +12 -12
- package/src/unstable/ai/internal/codec-transformer.ts +3 -2
- package/src/unstable/cli/Argument.ts +3 -4
- package/src/unstable/cli/CliError.ts +22 -9
- package/src/unstable/cli/CliOutput.ts +2 -2
- package/src/unstable/cli/Command.ts +36 -30
- package/src/unstable/cli/Flag.ts +3 -4
- package/src/unstable/cli/GlobalFlag.ts +3 -3
- package/src/unstable/cli/HelpDoc.ts +8 -8
- package/src/unstable/cli/Param.ts +39 -16
- package/src/unstable/cli/Prompt.ts +13 -6
- package/src/unstable/cli/internal/command.ts +7 -7
- package/src/unstable/cli/internal/parser.ts +130 -21
- package/src/unstable/cluster/ClusterSchema.ts +12 -12
- package/src/unstable/cluster/ClusterWorkflowEngine.ts +91 -53
- package/src/unstable/cluster/Entity.ts +43 -32
- package/src/unstable/cluster/EntityProxy.ts +3 -3
- package/src/unstable/cluster/EntityProxyServer.ts +4 -4
- package/src/unstable/cluster/EntityResource.ts +2 -2
- package/src/unstable/cluster/HttpRunner.ts +2 -2
- package/src/unstable/cluster/K8sHttpClient.ts +2 -2
- package/src/unstable/cluster/Message.ts +8 -8
- package/src/unstable/cluster/MessageStorage.ts +11 -11
- package/src/unstable/cluster/Reply.ts +7 -7
- package/src/unstable/cluster/RunnerHealth.ts +2 -2
- package/src/unstable/cluster/RunnerServer.ts +1 -1
- package/src/unstable/cluster/RunnerStorage.ts +9 -9
- package/src/unstable/cluster/Runners.ts +7 -7
- package/src/unstable/cluster/ShardId.ts +84 -74
- package/src/unstable/cluster/Sharding.ts +26 -26
- package/src/unstable/cluster/ShardingConfig.ts +5 -5
- package/src/unstable/cluster/Snowflake.ts +2 -2
- package/src/unstable/cluster/SqlMessageStorage.ts +1 -1
- package/src/unstable/cluster/internal/entityManager.ts +27 -23
- package/src/unstable/cluster/internal/entityReaper.ts +2 -2
- package/src/unstable/cluster/internal/resourceMap.ts +3 -3
- package/src/unstable/devtools/DevToolsClient.ts +5 -5
- package/src/unstable/eventlog/EventJournal.ts +2 -2
- package/src/unstable/eventlog/EventLog.ts +21 -21
- package/src/unstable/eventlog/EventLogEncryption.ts +2 -2
- package/src/unstable/eventlog/EventLogRemote.ts +2 -2
- package/src/unstable/eventlog/EventLogServer.ts +2 -2
- package/src/unstable/http/Etag.ts +2 -2
- package/src/unstable/http/FetchHttpClient.ts +5 -5
- package/src/unstable/http/Headers.ts +4 -4
- package/src/unstable/http/HttpClient.ts +9 -8
- package/src/unstable/http/HttpClientRequest.ts +5 -5
- package/src/unstable/http/HttpEffect.ts +35 -35
- package/src/unstable/http/HttpIncomingMessage.ts +2 -2
- package/src/unstable/http/HttpMiddleware.ts +28 -14
- package/src/unstable/http/HttpPlatform.ts +2 -2
- package/src/unstable/http/HttpRouter.ts +37 -37
- package/src/unstable/http/HttpServer.ts +2 -2
- package/src/unstable/http/HttpServerError.ts +4 -4
- package/src/unstable/http/HttpServerRequest.ts +7 -7
- package/src/unstable/http/HttpServerResponse.ts +8 -8
- package/src/unstable/http/Multipart.ts +8 -8
- package/src/unstable/httpapi/HttpApi.ts +18 -18
- package/src/unstable/httpapi/HttpApiBuilder.ts +20 -20
- package/src/unstable/httpapi/HttpApiClient.ts +4 -4
- package/src/unstable/httpapi/HttpApiEndpoint.ts +14 -14
- package/src/unstable/httpapi/HttpApiGroup.ts +16 -16
- package/src/unstable/httpapi/HttpApiMiddleware.ts +14 -14
- package/src/unstable/httpapi/HttpApiSecurity.ts +13 -13
- package/src/unstable/httpapi/OpenApi.ts +29 -31
- package/src/unstable/observability/OtlpExporter.ts +5 -5
- package/src/unstable/observability/OtlpMetrics.ts +1 -1
- package/src/unstable/observability/OtlpSerialization.ts +2 -2
- package/src/unstable/observability/OtlpTracer.ts +2 -2
- package/src/unstable/observability/PrometheusMetrics.ts +5 -5
- package/src/unstable/persistence/KeyValueStore.ts +226 -3
- package/src/unstable/persistence/PersistedCache.ts +20 -17
- package/src/unstable/persistence/PersistedQueue.ts +3 -3
- package/src/unstable/persistence/Persistence.ts +4 -4
- package/src/unstable/persistence/RateLimiter.ts +3 -3
- package/src/unstable/persistence/Redis.ts +2 -2
- package/src/unstable/process/ChildProcessSpawner.ts +46 -2
- package/src/unstable/reactivity/Atom.ts +79 -79
- package/src/unstable/reactivity/AtomHttpApi.ts +4 -4
- package/src/unstable/reactivity/AtomRegistry.ts +4 -4
- package/src/unstable/reactivity/AtomRpc.ts +4 -4
- package/src/unstable/reactivity/Reactivity.ts +6 -6
- package/src/unstable/rpc/Rpc.ts +17 -17
- package/src/unstable/rpc/RpcClient.ts +44 -30
- package/src/unstable/rpc/RpcGroup.ts +30 -30
- package/src/unstable/rpc/RpcMiddleware.ts +14 -14
- package/src/unstable/rpc/RpcSchema.ts +4 -4
- package/src/unstable/rpc/RpcSerialization.ts +7 -7
- package/src/unstable/rpc/RpcServer.ts +19 -19
- package/src/unstable/rpc/RpcWorker.ts +5 -5
- package/src/unstable/rpc/Utils.ts +4 -4
- package/src/unstable/socket/Socket.ts +9 -9
- package/src/unstable/socket/SocketServer.ts +2 -2
- package/src/unstable/sql/SqlClient.ts +11 -11
- package/src/unstable/sql/SqlConnection.ts +2 -2
- package/src/unstable/sql/SqlModel.ts +54 -82
- package/src/unstable/sql/SqlResolver.ts +11 -11
- package/src/unstable/sql/Statement.ts +2 -2
- package/src/unstable/workers/Transferable.ts +6 -6
- package/src/unstable/workers/Worker.ts +4 -4
- package/src/unstable/workers/WorkerRunner.ts +2 -2
- package/src/unstable/workflow/Activity.ts +14 -14
- package/src/unstable/workflow/DurableClock.ts +3 -3
- package/src/unstable/workflow/DurableDeferred.ts +8 -8
- package/src/unstable/workflow/Workflow.ts +23 -23
- package/src/unstable/workflow/WorkflowEngine.ts +28 -6
- package/src/unstable/workflow/WorkflowProxyServer.ts +4 -4
- package/dist/ServiceMap.d.ts +0 -1150
- package/dist/ServiceMap.d.ts.map +0 -1
- package/dist/ServiceMap.js.map +0 -1
package/dist/Stream.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as Arr from "./Array.ts";
|
|
5
5
|
import * as Cause from "./Cause.ts";
|
|
6
6
|
import * as Channel from "./Channel.ts";
|
|
7
|
+
import * as Context from "./Context.ts";
|
|
7
8
|
import * as Duration from "./Duration.ts";
|
|
8
9
|
import * as Effect from "./Effect.ts";
|
|
9
10
|
import * as ExecutionPlan from "./ExecutionPlan.ts";
|
|
@@ -22,7 +23,6 @@ import * as Queue from "./Queue.ts";
|
|
|
22
23
|
import * as Result from "./Result.ts";
|
|
23
24
|
import * as Schedule from "./Schedule.ts";
|
|
24
25
|
import * as Scope from "./Scope.ts";
|
|
25
|
-
import * as ServiceMap from "./ServiceMap.ts";
|
|
26
26
|
import * as Sink from "./Sink.ts";
|
|
27
27
|
import type * as Take from "./Take.ts";
|
|
28
28
|
import type { ParentSpan, SpanOptions } from "./Tracer.ts";
|
|
@@ -307,6 +307,76 @@ export declare const fromChannel: <Arr extends Arr.NonEmptyReadonlyArray<any>, E
|
|
|
307
307
|
* @category Constructors
|
|
308
308
|
*/
|
|
309
309
|
export declare const fromEffect: <A, E, R>(effect: Effect.Effect<A, E, R>) => Stream<A, E, R>;
|
|
310
|
+
/**
|
|
311
|
+
* Accesses a service from the context and emits it as a single element.
|
|
312
|
+
*
|
|
313
|
+
* @example
|
|
314
|
+
* ```ts
|
|
315
|
+
* import { Effect, Context, Stream } from "effect"
|
|
316
|
+
*
|
|
317
|
+
* class Greeter extends Context.Service<Greeter, {
|
|
318
|
+
* readonly greet: (name: string) => string
|
|
319
|
+
* }>()("Greeter") {}
|
|
320
|
+
*
|
|
321
|
+
* const stream = Stream.service(Greeter).pipe(
|
|
322
|
+
* Stream.map((greeter) => greeter.greet("World"))
|
|
323
|
+
* )
|
|
324
|
+
*
|
|
325
|
+
* const program = Effect.gen(function*() {
|
|
326
|
+
* return yield* stream.pipe(
|
|
327
|
+
* Stream.provideService(Greeter, {
|
|
328
|
+
* greet: (name) => `Hello, ${name}!`
|
|
329
|
+
* }),
|
|
330
|
+
* Stream.runCollect
|
|
331
|
+
* )
|
|
332
|
+
* })
|
|
333
|
+
*
|
|
334
|
+
* Effect.runPromise(program)
|
|
335
|
+
* // Output: [ "Hello, World!" ]
|
|
336
|
+
* ```
|
|
337
|
+
*
|
|
338
|
+
* @since 4.0.0
|
|
339
|
+
* @category Context
|
|
340
|
+
*/
|
|
341
|
+
export declare const service: <I, S>(service: Context.Key<I, S>) => Stream<S, never, I>;
|
|
342
|
+
/**
|
|
343
|
+
* Optionally accesses a service from the context and emits the result as a
|
|
344
|
+
* single element.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```ts
|
|
348
|
+
* import { Effect, Option, Context, Stream } from "effect"
|
|
349
|
+
*
|
|
350
|
+
* class Greeter extends Context.Service<Greeter, {
|
|
351
|
+
* readonly greet: (name: string) => string
|
|
352
|
+
* }>()("Greeter") {}
|
|
353
|
+
*
|
|
354
|
+
* const stream = Stream.serviceOption(Greeter).pipe(
|
|
355
|
+
* Stream.map((maybeGreeter) =>
|
|
356
|
+
* Option.match(maybeGreeter, {
|
|
357
|
+
* onNone: () => "No greeter",
|
|
358
|
+
* onSome: (greeter) => greeter.greet("World")
|
|
359
|
+
* })
|
|
360
|
+
* )
|
|
361
|
+
* )
|
|
362
|
+
*
|
|
363
|
+
* const program = Effect.gen(function*() {
|
|
364
|
+
* return yield* stream.pipe(
|
|
365
|
+
* Stream.provideService(Greeter, {
|
|
366
|
+
* greet: (name) => `Hello, ${name}!`
|
|
367
|
+
* }),
|
|
368
|
+
* Stream.runCollect
|
|
369
|
+
* )
|
|
370
|
+
* })
|
|
371
|
+
*
|
|
372
|
+
* Effect.runPromise(program)
|
|
373
|
+
* // Output: [ "Hello, World!" ]
|
|
374
|
+
* ```
|
|
375
|
+
*
|
|
376
|
+
* @since 4.0.0
|
|
377
|
+
* @category Context
|
|
378
|
+
*/
|
|
379
|
+
export declare const serviceOption: <I, S>(service: Context.Key<I, S>) => Stream<Option.Option<S>>;
|
|
310
380
|
/**
|
|
311
381
|
* Creates a stream that runs the effect and emits no elements.
|
|
312
382
|
*
|
|
@@ -863,9 +933,9 @@ export declare const fromIterable: <A>(iterable: Iterable<A>, options?: {
|
|
|
863
933
|
*
|
|
864
934
|
* @example
|
|
865
935
|
* ```ts
|
|
866
|
-
* import { Console, Effect,
|
|
936
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
867
937
|
*
|
|
868
|
-
* class UserRepo extends
|
|
938
|
+
* class UserRepo extends Context.Service<UserRepo, {
|
|
869
939
|
* readonly list: Effect.Effect<ReadonlyArray<string>>
|
|
870
940
|
* }>()("UserRepo") {}
|
|
871
941
|
*
|
|
@@ -7173,9 +7243,9 @@ export declare const retry: {
|
|
|
7173
7243
|
*
|
|
7174
7244
|
* @example
|
|
7175
7245
|
* ```ts
|
|
7176
|
-
* import { Console, Effect, ExecutionPlan, Layer,
|
|
7246
|
+
* import { Console, Effect, ExecutionPlan, Layer, Context, Stream } from "effect"
|
|
7177
7247
|
*
|
|
7178
|
-
* class Service extends
|
|
7248
|
+
* class Service extends Context.Service<Service>()("Service", {
|
|
7179
7249
|
* make: Effect.succeed({
|
|
7180
7250
|
* stream: Stream.fail("A") as Stream.Stream<number, string>
|
|
7181
7251
|
* })
|
|
@@ -7215,9 +7285,9 @@ export declare const withExecutionPlan: {
|
|
|
7215
7285
|
*
|
|
7216
7286
|
* @example
|
|
7217
7287
|
* ```ts
|
|
7218
|
-
* import { Console, Effect, ExecutionPlan, Layer,
|
|
7288
|
+
* import { Console, Effect, ExecutionPlan, Layer, Context, Stream } from "effect"
|
|
7219
7289
|
*
|
|
7220
|
-
* class Service extends
|
|
7290
|
+
* class Service extends Context.Service<Service>()("Service", {
|
|
7221
7291
|
* make: Effect.succeed({
|
|
7222
7292
|
* stream: Stream.fail("A") as Stream.Stream<number, string>
|
|
7223
7293
|
* })
|
|
@@ -7264,9 +7334,9 @@ export declare const withExecutionPlan: {
|
|
|
7264
7334
|
*
|
|
7265
7335
|
* @example
|
|
7266
7336
|
* ```ts
|
|
7267
|
-
* import { Console, Effect, ExecutionPlan, Layer,
|
|
7337
|
+
* import { Console, Effect, ExecutionPlan, Layer, Context, Stream } from "effect"
|
|
7268
7338
|
*
|
|
7269
|
-
* class Service extends
|
|
7339
|
+
* class Service extends Context.Service<Service>()("Service", {
|
|
7270
7340
|
* make: Effect.succeed({
|
|
7271
7341
|
* stream: Stream.fail("A") as Stream.Stream<number, string>
|
|
7272
7342
|
* })
|
|
@@ -12016,7 +12086,7 @@ export declare const ensuring: {
|
|
|
12016
12086
|
<A, E, R, R2>(self: Stream<A, E, R>, finalizer: Effect.Effect<unknown, never, R2>): Stream<A, E, R | R2>;
|
|
12017
12087
|
};
|
|
12018
12088
|
/**
|
|
12019
|
-
* Provides a layer or
|
|
12089
|
+
* Provides a layer or context to the stream, removing the corresponding
|
|
12020
12090
|
* service requirements. Use `options.local` to build the layer every time; by
|
|
12021
12091
|
* default, layers are shared between provide calls.
|
|
12022
12092
|
*
|
|
@@ -12024,9 +12094,9 @@ export declare const ensuring: {
|
|
|
12024
12094
|
*
|
|
12025
12095
|
* @example
|
|
12026
12096
|
* ```ts
|
|
12027
|
-
* import { Console, Effect, Layer,
|
|
12097
|
+
* import { Console, Effect, Layer, Context, Stream } from "effect"
|
|
12028
12098
|
*
|
|
12029
|
-
* class Env extends
|
|
12099
|
+
* class Env extends Context.Service<Env, { readonly name: string }>()("Env") {}
|
|
12030
12100
|
*
|
|
12031
12101
|
* const layer = Layer.succeed(Env)({ name: "Ada" })
|
|
12032
12102
|
*
|
|
@@ -12053,7 +12123,7 @@ export declare const ensuring: {
|
|
|
12053
12123
|
*/
|
|
12054
12124
|
export declare const provide: {
|
|
12055
12125
|
/**
|
|
12056
|
-
* Provides a layer or
|
|
12126
|
+
* Provides a layer or context to the stream, removing the corresponding
|
|
12057
12127
|
* service requirements. Use `options.local` to build the layer every time; by
|
|
12058
12128
|
* default, layers are shared between provide calls.
|
|
12059
12129
|
*
|
|
@@ -12061,9 +12131,9 @@ export declare const provide: {
|
|
|
12061
12131
|
*
|
|
12062
12132
|
* @example
|
|
12063
12133
|
* ```ts
|
|
12064
|
-
* import { Console, Effect, Layer,
|
|
12134
|
+
* import { Console, Effect, Layer, Context, Stream } from "effect"
|
|
12065
12135
|
*
|
|
12066
|
-
* class Env extends
|
|
12136
|
+
* class Env extends Context.Service<Env, { readonly name: string }>()("Env") {}
|
|
12067
12137
|
*
|
|
12068
12138
|
* const layer = Layer.succeed(Env)({ name: "Ada" })
|
|
12069
12139
|
*
|
|
@@ -12088,11 +12158,11 @@ export declare const provide: {
|
|
|
12088
12158
|
* @since 4.0.0
|
|
12089
12159
|
* @category Services
|
|
12090
12160
|
*/
|
|
12091
|
-
<AL, EL = never, RL = never>(layer: Layer.Layer<AL, EL, RL> |
|
|
12161
|
+
<AL, EL = never, RL = never>(layer: Layer.Layer<AL, EL, RL> | Context.Context<AL>, options?: {
|
|
12092
12162
|
readonly local?: boolean | undefined;
|
|
12093
12163
|
} | undefined): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E | EL, Exclude<R, AL> | RL>;
|
|
12094
12164
|
/**
|
|
12095
|
-
* Provides a layer or
|
|
12165
|
+
* Provides a layer or context to the stream, removing the corresponding
|
|
12096
12166
|
* service requirements. Use `options.local` to build the layer every time; by
|
|
12097
12167
|
* default, layers are shared between provide calls.
|
|
12098
12168
|
*
|
|
@@ -12100,9 +12170,9 @@ export declare const provide: {
|
|
|
12100
12170
|
*
|
|
12101
12171
|
* @example
|
|
12102
12172
|
* ```ts
|
|
12103
|
-
* import { Console, Effect, Layer,
|
|
12173
|
+
* import { Console, Effect, Layer, Context, Stream } from "effect"
|
|
12104
12174
|
*
|
|
12105
|
-
* class Env extends
|
|
12175
|
+
* class Env extends Context.Service<Env, { readonly name: string }>()("Env") {}
|
|
12106
12176
|
*
|
|
12107
12177
|
* const layer = Layer.succeed(Env)({ name: "Ada" })
|
|
12108
12178
|
*
|
|
@@ -12127,22 +12197,22 @@ export declare const provide: {
|
|
|
12127
12197
|
* @since 4.0.0
|
|
12128
12198
|
* @category Services
|
|
12129
12199
|
*/
|
|
12130
|
-
<A, E, R, AL, EL = never, RL = never>(self: Stream<A, E, R>, layer: Layer.Layer<AL, EL, RL> |
|
|
12200
|
+
<A, E, R, AL, EL = never, RL = never>(self: Stream<A, E, R>, layer: Layer.Layer<AL, EL, RL> | Context.Context<AL>, options?: {
|
|
12131
12201
|
readonly local?: boolean | undefined;
|
|
12132
12202
|
} | undefined): Stream<A, E | EL, Exclude<R, AL> | RL>;
|
|
12133
12203
|
};
|
|
12134
12204
|
/**
|
|
12135
|
-
* Provides multiple services to the stream using a
|
|
12205
|
+
* Provides multiple services to the stream using a context.
|
|
12136
12206
|
*
|
|
12137
12207
|
* @example
|
|
12138
12208
|
* ```ts
|
|
12139
|
-
* import { Console, Effect,
|
|
12209
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12140
12210
|
*
|
|
12141
|
-
* class Config extends
|
|
12142
|
-
* class Greeter extends
|
|
12211
|
+
* class Config extends Context.Service<Config, { readonly prefix: string }>()("Config") {}
|
|
12212
|
+
* class Greeter extends Context.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
|
|
12143
12213
|
*
|
|
12144
|
-
* const
|
|
12145
|
-
*
|
|
12214
|
+
* const context = Context.make(Config, { prefix: "Hello" }).pipe(
|
|
12215
|
+
* Context.add(Greeter, { greet: (name: string) => `${name}!` })
|
|
12146
12216
|
* )
|
|
12147
12217
|
*
|
|
12148
12218
|
* const stream = Stream.fromEffect(
|
|
@@ -12154,7 +12224,7 @@ export declare const provide: {
|
|
|
12154
12224
|
* )
|
|
12155
12225
|
*
|
|
12156
12226
|
* const program = Effect.gen(function*() {
|
|
12157
|
-
* const result = yield* Stream.runCollect(Stream.
|
|
12227
|
+
* const result = yield* Stream.runCollect(Stream.provideContext(stream, context))
|
|
12158
12228
|
* yield* Console.log(result)
|
|
12159
12229
|
* })
|
|
12160
12230
|
*
|
|
@@ -12165,19 +12235,19 @@ export declare const provide: {
|
|
|
12165
12235
|
* @since 4.0.0
|
|
12166
12236
|
* @category Services
|
|
12167
12237
|
*/
|
|
12168
|
-
export declare const
|
|
12238
|
+
export declare const provideContext: {
|
|
12169
12239
|
/**
|
|
12170
|
-
* Provides multiple services to the stream using a
|
|
12240
|
+
* Provides multiple services to the stream using a context.
|
|
12171
12241
|
*
|
|
12172
12242
|
* @example
|
|
12173
12243
|
* ```ts
|
|
12174
|
-
* import { Console, Effect,
|
|
12244
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12175
12245
|
*
|
|
12176
|
-
* class Config extends
|
|
12177
|
-
* class Greeter extends
|
|
12246
|
+
* class Config extends Context.Service<Config, { readonly prefix: string }>()("Config") {}
|
|
12247
|
+
* class Greeter extends Context.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
|
|
12178
12248
|
*
|
|
12179
|
-
* const
|
|
12180
|
-
*
|
|
12249
|
+
* const context = Context.make(Config, { prefix: "Hello" }).pipe(
|
|
12250
|
+
* Context.add(Greeter, { greet: (name: string) => `${name}!` })
|
|
12181
12251
|
* )
|
|
12182
12252
|
*
|
|
12183
12253
|
* const stream = Stream.fromEffect(
|
|
@@ -12189,7 +12259,7 @@ export declare const provideServices: {
|
|
|
12189
12259
|
* )
|
|
12190
12260
|
*
|
|
12191
12261
|
* const program = Effect.gen(function*() {
|
|
12192
|
-
* const result = yield* Stream.runCollect(Stream.
|
|
12262
|
+
* const result = yield* Stream.runCollect(Stream.provideContext(stream, context))
|
|
12193
12263
|
* yield* Console.log(result)
|
|
12194
12264
|
* })
|
|
12195
12265
|
*
|
|
@@ -12200,19 +12270,19 @@ export declare const provideServices: {
|
|
|
12200
12270
|
* @since 4.0.0
|
|
12201
12271
|
* @category Services
|
|
12202
12272
|
*/
|
|
12203
|
-
<R2>(
|
|
12273
|
+
<R2>(context: Context.Context<R2>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, R2>>;
|
|
12204
12274
|
/**
|
|
12205
|
-
* Provides multiple services to the stream using a
|
|
12275
|
+
* Provides multiple services to the stream using a context.
|
|
12206
12276
|
*
|
|
12207
12277
|
* @example
|
|
12208
12278
|
* ```ts
|
|
12209
|
-
* import { Console, Effect,
|
|
12279
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12210
12280
|
*
|
|
12211
|
-
* class Config extends
|
|
12212
|
-
* class Greeter extends
|
|
12281
|
+
* class Config extends Context.Service<Config, { readonly prefix: string }>()("Config") {}
|
|
12282
|
+
* class Greeter extends Context.Service<Greeter, { greet: (name: string) => string }>()("Greeter") {}
|
|
12213
12283
|
*
|
|
12214
|
-
* const
|
|
12215
|
-
*
|
|
12284
|
+
* const context = Context.make(Config, { prefix: "Hello" }).pipe(
|
|
12285
|
+
* Context.add(Greeter, { greet: (name: string) => `${name}!` })
|
|
12216
12286
|
* )
|
|
12217
12287
|
*
|
|
12218
12288
|
* const stream = Stream.fromEffect(
|
|
@@ -12224,7 +12294,7 @@ export declare const provideServices: {
|
|
|
12224
12294
|
* )
|
|
12225
12295
|
*
|
|
12226
12296
|
* const program = Effect.gen(function*() {
|
|
12227
|
-
* const result = yield* Stream.runCollect(Stream.
|
|
12297
|
+
* const result = yield* Stream.runCollect(Stream.provideContext(stream, context))
|
|
12228
12298
|
* yield* Console.log(result)
|
|
12229
12299
|
* })
|
|
12230
12300
|
*
|
|
@@ -12235,7 +12305,7 @@ export declare const provideServices: {
|
|
|
12235
12305
|
* @since 4.0.0
|
|
12236
12306
|
* @category Services
|
|
12237
12307
|
*/
|
|
12238
|
-
<A, E, R, R2>(self: Stream<A, E, R>,
|
|
12308
|
+
<A, E, R, R2>(self: Stream<A, E, R>, context: Context.Context<R2>): Stream<A, E, Exclude<R, R2>>;
|
|
12239
12309
|
};
|
|
12240
12310
|
/**
|
|
12241
12311
|
* Provides the stream with a single required service, eliminating that
|
|
@@ -12243,9 +12313,9 @@ export declare const provideServices: {
|
|
|
12243
12313
|
*
|
|
12244
12314
|
* @example
|
|
12245
12315
|
* ```ts
|
|
12246
|
-
* import { Console, Effect,
|
|
12316
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12247
12317
|
*
|
|
12248
|
-
* class Greeter extends
|
|
12318
|
+
* class Greeter extends Context.Service<Greeter, {
|
|
12249
12319
|
* greet: (name: string) => string
|
|
12250
12320
|
* }>()("Greeter") {}
|
|
12251
12321
|
*
|
|
@@ -12280,9 +12350,9 @@ export declare const provideService: {
|
|
|
12280
12350
|
*
|
|
12281
12351
|
* @example
|
|
12282
12352
|
* ```ts
|
|
12283
|
-
* import { Console, Effect,
|
|
12353
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12284
12354
|
*
|
|
12285
|
-
* class Greeter extends
|
|
12355
|
+
* class Greeter extends Context.Service<Greeter, {
|
|
12286
12356
|
* greet: (name: string) => string
|
|
12287
12357
|
* }>()("Greeter") {}
|
|
12288
12358
|
*
|
|
@@ -12310,16 +12380,16 @@ export declare const provideService: {
|
|
|
12310
12380
|
* @since 4.0.0
|
|
12311
12381
|
* @category Services
|
|
12312
12382
|
*/
|
|
12313
|
-
<I, S>(key:
|
|
12383
|
+
<I, S>(key: Context.Key<I, S>, service: NoInfer<S>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, Exclude<R, I>>;
|
|
12314
12384
|
/**
|
|
12315
12385
|
* Provides the stream with a single required service, eliminating that
|
|
12316
12386
|
* requirement from its environment.
|
|
12317
12387
|
*
|
|
12318
12388
|
* @example
|
|
12319
12389
|
* ```ts
|
|
12320
|
-
* import { Console, Effect,
|
|
12390
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12321
12391
|
*
|
|
12322
|
-
* class Greeter extends
|
|
12392
|
+
* class Greeter extends Context.Service<Greeter, {
|
|
12323
12393
|
* greet: (name: string) => string
|
|
12324
12394
|
* }>()("Greeter") {}
|
|
12325
12395
|
*
|
|
@@ -12347,16 +12417,16 @@ export declare const provideService: {
|
|
|
12347
12417
|
* @since 4.0.0
|
|
12348
12418
|
* @category Services
|
|
12349
12419
|
*/
|
|
12350
|
-
<A, E, R, I, S>(self: Stream<A, E, R>, key:
|
|
12420
|
+
<A, E, R, I, S>(self: Stream<A, E, R>, key: Context.Key<I, S>, service: NoInfer<S>): Stream<A, E, Exclude<R, I>>;
|
|
12351
12421
|
};
|
|
12352
12422
|
/**
|
|
12353
12423
|
* Provides a service to the stream using an effect, removing the requirement and adding the effect's error and environment.
|
|
12354
12424
|
*
|
|
12355
12425
|
* @example
|
|
12356
12426
|
* ```ts
|
|
12357
|
-
* import { Console, Effect,
|
|
12427
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12358
12428
|
*
|
|
12359
|
-
* class ApiConfig extends
|
|
12429
|
+
* class ApiConfig extends Context.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
|
|
12360
12430
|
*
|
|
12361
12431
|
* const stream = Stream.fromEffect(
|
|
12362
12432
|
* Effect.gen(function*() {
|
|
@@ -12393,9 +12463,9 @@ export declare const provideServiceEffect: {
|
|
|
12393
12463
|
*
|
|
12394
12464
|
* @example
|
|
12395
12465
|
* ```ts
|
|
12396
|
-
* import { Console, Effect,
|
|
12466
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12397
12467
|
*
|
|
12398
|
-
* class ApiConfig extends
|
|
12468
|
+
* class ApiConfig extends Context.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
|
|
12399
12469
|
*
|
|
12400
12470
|
* const stream = Stream.fromEffect(
|
|
12401
12471
|
* Effect.gen(function*() {
|
|
@@ -12426,15 +12496,15 @@ export declare const provideServiceEffect: {
|
|
|
12426
12496
|
* @since 4.0.0
|
|
12427
12497
|
* @category Services
|
|
12428
12498
|
*/
|
|
12429
|
-
<I, S, ES, RS>(key:
|
|
12499
|
+
<I, S, ES, RS>(key: Context.Key<I, S>, service: Effect.Effect<NoInfer<S>, ES, RS>): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E | ES, Exclude<R, I> | RS>;
|
|
12430
12500
|
/**
|
|
12431
12501
|
* Provides a service to the stream using an effect, removing the requirement and adding the effect's error and environment.
|
|
12432
12502
|
*
|
|
12433
12503
|
* @example
|
|
12434
12504
|
* ```ts
|
|
12435
|
-
* import { Console, Effect,
|
|
12505
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12436
12506
|
*
|
|
12437
|
-
* class ApiConfig extends
|
|
12507
|
+
* class ApiConfig extends Context.Service<ApiConfig, { readonly baseUrl: string }>()("ApiConfig") {}
|
|
12438
12508
|
*
|
|
12439
12509
|
* const stream = Stream.fromEffect(
|
|
12440
12510
|
* Effect.gen(function*() {
|
|
@@ -12465,18 +12535,18 @@ export declare const provideServiceEffect: {
|
|
|
12465
12535
|
* @since 4.0.0
|
|
12466
12536
|
* @category Services
|
|
12467
12537
|
*/
|
|
12468
|
-
<A, E, R, I, S, ES, RS>(self: Stream<A, E, R>, key:
|
|
12538
|
+
<A, E, R, I, S, ES, RS>(self: Stream<A, E, R>, key: Context.Key<I, S>, service: Effect.Effect<NoInfer<S>, ES, RS>): Stream<A, E | ES, Exclude<R, I> | RS>;
|
|
12469
12539
|
};
|
|
12470
12540
|
/**
|
|
12471
|
-
* Transforms the stream's required services by mapping the current
|
|
12541
|
+
* Transforms the stream's required services by mapping the current context
|
|
12472
12542
|
* to a new one.
|
|
12473
12543
|
*
|
|
12474
12544
|
* @example
|
|
12475
12545
|
* ```ts
|
|
12476
|
-
* import { Console, Effect,
|
|
12546
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12477
12547
|
*
|
|
12478
|
-
* class Logger extends
|
|
12479
|
-
* class Config extends
|
|
12548
|
+
* class Logger extends Context.Service<Logger, { prefix: string }>()("Logger") {}
|
|
12549
|
+
* class Config extends Context.Service<Config, { name: string }>()("Config") {}
|
|
12480
12550
|
*
|
|
12481
12551
|
* const stream = Stream.fromEffect(
|
|
12482
12552
|
* Effect.gen(function*() {
|
|
@@ -12487,8 +12557,8 @@ export declare const provideServiceEffect: {
|
|
|
12487
12557
|
* )
|
|
12488
12558
|
*
|
|
12489
12559
|
* const updated = stream.pipe(
|
|
12490
|
-
* Stream.
|
|
12491
|
-
*
|
|
12560
|
+
* Stream.updateContext((context: Context.Context<Logger>) =>
|
|
12561
|
+
* Context.add(context, Config, { name: "World" })
|
|
12492
12562
|
* )
|
|
12493
12563
|
* )
|
|
12494
12564
|
*
|
|
@@ -12506,17 +12576,17 @@ export declare const provideServiceEffect: {
|
|
|
12506
12576
|
* @since 2.0.0
|
|
12507
12577
|
* @category Services
|
|
12508
12578
|
*/
|
|
12509
|
-
export declare const
|
|
12579
|
+
export declare const updateContext: {
|
|
12510
12580
|
/**
|
|
12511
|
-
* Transforms the stream's required services by mapping the current
|
|
12581
|
+
* Transforms the stream's required services by mapping the current context
|
|
12512
12582
|
* to a new one.
|
|
12513
12583
|
*
|
|
12514
12584
|
* @example
|
|
12515
12585
|
* ```ts
|
|
12516
|
-
* import { Console, Effect,
|
|
12586
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12517
12587
|
*
|
|
12518
|
-
* class Logger extends
|
|
12519
|
-
* class Config extends
|
|
12588
|
+
* class Logger extends Context.Service<Logger, { prefix: string }>()("Logger") {}
|
|
12589
|
+
* class Config extends Context.Service<Config, { name: string }>()("Config") {}
|
|
12520
12590
|
*
|
|
12521
12591
|
* const stream = Stream.fromEffect(
|
|
12522
12592
|
* Effect.gen(function*() {
|
|
@@ -12527,8 +12597,8 @@ export declare const updateServices: {
|
|
|
12527
12597
|
* )
|
|
12528
12598
|
*
|
|
12529
12599
|
* const updated = stream.pipe(
|
|
12530
|
-
* Stream.
|
|
12531
|
-
*
|
|
12600
|
+
* Stream.updateContext((context: Context.Context<Logger>) =>
|
|
12601
|
+
* Context.add(context, Config, { name: "World" })
|
|
12532
12602
|
* )
|
|
12533
12603
|
* )
|
|
12534
12604
|
*
|
|
@@ -12546,17 +12616,17 @@ export declare const updateServices: {
|
|
|
12546
12616
|
* @since 2.0.0
|
|
12547
12617
|
* @category Services
|
|
12548
12618
|
*/
|
|
12549
|
-
<R, R2>(f: (
|
|
12619
|
+
<R, R2>(f: (context: Context.Context<R2>) => Context.Context<R>): <A, E>(self: Stream<A, E, R>) => Stream<A, E, R2>;
|
|
12550
12620
|
/**
|
|
12551
|
-
* Transforms the stream's required services by mapping the current
|
|
12621
|
+
* Transforms the stream's required services by mapping the current context
|
|
12552
12622
|
* to a new one.
|
|
12553
12623
|
*
|
|
12554
12624
|
* @example
|
|
12555
12625
|
* ```ts
|
|
12556
|
-
* import { Console, Effect,
|
|
12626
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12557
12627
|
*
|
|
12558
|
-
* class Logger extends
|
|
12559
|
-
* class Config extends
|
|
12628
|
+
* class Logger extends Context.Service<Logger, { prefix: string }>()("Logger") {}
|
|
12629
|
+
* class Config extends Context.Service<Config, { name: string }>()("Config") {}
|
|
12560
12630
|
*
|
|
12561
12631
|
* const stream = Stream.fromEffect(
|
|
12562
12632
|
* Effect.gen(function*() {
|
|
@@ -12567,8 +12637,8 @@ export declare const updateServices: {
|
|
|
12567
12637
|
* )
|
|
12568
12638
|
*
|
|
12569
12639
|
* const updated = stream.pipe(
|
|
12570
|
-
* Stream.
|
|
12571
|
-
*
|
|
12640
|
+
* Stream.updateContext((context: Context.Context<Logger>) =>
|
|
12641
|
+
* Context.add(context, Config, { name: "World" })
|
|
12572
12642
|
* )
|
|
12573
12643
|
* )
|
|
12574
12644
|
*
|
|
@@ -12586,16 +12656,16 @@ export declare const updateServices: {
|
|
|
12586
12656
|
* @since 2.0.0
|
|
12587
12657
|
* @category Services
|
|
12588
12658
|
*/
|
|
12589
|
-
<A, E, R, R2>(self: Stream<A, E, R>, f: (
|
|
12659
|
+
<A, E, R, R2>(self: Stream<A, E, R>, f: (context: Context.Context<R2>) => Context.Context<R>): Stream<A, E, R2>;
|
|
12590
12660
|
};
|
|
12591
12661
|
/**
|
|
12592
12662
|
* Updates a single service in the stream environment by applying a function.
|
|
12593
12663
|
*
|
|
12594
12664
|
* @example
|
|
12595
12665
|
* ```ts
|
|
12596
|
-
* import { Console, Effect,
|
|
12666
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12597
12667
|
*
|
|
12598
|
-
* class Counter extends
|
|
12668
|
+
* class Counter extends Context.Service<Counter, { count: number }>()("Counter") {}
|
|
12599
12669
|
*
|
|
12600
12670
|
* const stream = Stream.fromEffect(Effect.service(Counter)).pipe(
|
|
12601
12671
|
* Stream.updateService(Counter, (counter) => ({ count: counter.count + 1 }))
|
|
@@ -12619,9 +12689,9 @@ export declare const updateService: {
|
|
|
12619
12689
|
*
|
|
12620
12690
|
* @example
|
|
12621
12691
|
* ```ts
|
|
12622
|
-
* import { Console, Effect,
|
|
12692
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12623
12693
|
*
|
|
12624
|
-
* class Counter extends
|
|
12694
|
+
* class Counter extends Context.Service<Counter, { count: number }>()("Counter") {}
|
|
12625
12695
|
*
|
|
12626
12696
|
* const stream = Stream.fromEffect(Effect.service(Counter)).pipe(
|
|
12627
12697
|
* Stream.updateService(Counter, (counter) => ({ count: counter.count + 1 }))
|
|
@@ -12639,15 +12709,15 @@ export declare const updateService: {
|
|
|
12639
12709
|
* @since 2.0.0
|
|
12640
12710
|
* @category Services
|
|
12641
12711
|
*/
|
|
12642
|
-
<I, S>(key:
|
|
12712
|
+
<I, S>(key: Context.Key<I, S>, f: (service: NoInfer<S>) => S): <A, E, R>(self: Stream<A, E, R>) => Stream<A, E, R | I>;
|
|
12643
12713
|
/**
|
|
12644
12714
|
* Updates a single service in the stream environment by applying a function.
|
|
12645
12715
|
*
|
|
12646
12716
|
* @example
|
|
12647
12717
|
* ```ts
|
|
12648
|
-
* import { Console, Effect,
|
|
12718
|
+
* import { Console, Effect, Context, Stream } from "effect"
|
|
12649
12719
|
*
|
|
12650
|
-
* class Counter extends
|
|
12720
|
+
* class Counter extends Context.Service<Counter, { count: number }>()("Counter") {}
|
|
12651
12721
|
*
|
|
12652
12722
|
* const stream = Stream.fromEffect(Effect.service(Counter)).pipe(
|
|
12653
12723
|
* Stream.updateService(Counter, (counter) => ({ count: counter.count + 1 }))
|
|
@@ -12665,7 +12735,7 @@ export declare const updateService: {
|
|
|
12665
12735
|
* @since 2.0.0
|
|
12666
12736
|
* @category Services
|
|
12667
12737
|
*/
|
|
12668
|
-
<A, E, R, I, S>(self: Stream<A, E, R>, key:
|
|
12738
|
+
<A, E, R, I, S>(self: Stream<A, E, R>, key: Context.Key<I, S>, f: (service: NoInfer<S>) => S): Stream<A, E, R | I>;
|
|
12669
12739
|
};
|
|
12670
12740
|
/**
|
|
12671
12741
|
* Wraps the stream with a new span for tracing.
|
|
@@ -13640,18 +13710,18 @@ export declare const mkUint8Array: <E, R>(self: Stream<Uint8Array, E, R>) => Eff
|
|
|
13640
13710
|
*
|
|
13641
13711
|
* @example
|
|
13642
13712
|
* ```ts
|
|
13643
|
-
* import {
|
|
13713
|
+
* import { Context, Stream } from "effect"
|
|
13644
13714
|
*
|
|
13645
13715
|
* const stream = Stream.make(1, 2, 3, 4, 5)
|
|
13646
|
-
* const readableStream = Stream.toReadableStreamWith(stream,
|
|
13716
|
+
* const readableStream = Stream.toReadableStreamWith(stream, Context.empty())
|
|
13647
13717
|
* ```
|
|
13648
13718
|
*
|
|
13649
13719
|
* @since 2.0.0
|
|
13650
13720
|
* @category Destructors
|
|
13651
13721
|
*/
|
|
13652
|
-
export declare const toReadableStreamWith: (<A, XR>(
|
|
13722
|
+
export declare const toReadableStreamWith: (<A, XR>(context: Context.Context<XR>, options?: {
|
|
13653
13723
|
readonly strategy?: QueuingStrategy<A> | undefined;
|
|
13654
|
-
}) => <E, R extends XR>(self: Stream<A, E, R>) => ReadableStream<A>) & (<A, E, XR, R extends XR>(self: Stream<A, E, R>,
|
|
13724
|
+
}) => <E, R extends XR>(self: Stream<A, E, R>) => ReadableStream<A>) & (<A, E, XR, R extends XR>(self: Stream<A, E, R>, context: Context.Context<XR>, options?: {
|
|
13655
13725
|
readonly strategy?: QueuingStrategy<A> | undefined;
|
|
13656
13726
|
}) => ReadableStream<A>);
|
|
13657
13727
|
/**
|
|
@@ -13789,10 +13859,10 @@ export declare const toReadableStreamEffect: {
|
|
|
13789
13859
|
*
|
|
13790
13860
|
* @example
|
|
13791
13861
|
* ```ts
|
|
13792
|
-
* import {
|
|
13862
|
+
* import { Context, Stream } from "effect"
|
|
13793
13863
|
*
|
|
13794
13864
|
* const stream = Stream.make(1, 2, 3)
|
|
13795
|
-
* const iterable = Stream.toAsyncIterableWith(stream,
|
|
13865
|
+
* const iterable = Stream.toAsyncIterableWith(stream, Context.empty())
|
|
13796
13866
|
*
|
|
13797
13867
|
* const collect = async () => {
|
|
13798
13868
|
* const results: Array<number> = []
|
|
@@ -13812,10 +13882,10 @@ export declare const toAsyncIterableWith: {
|
|
|
13812
13882
|
*
|
|
13813
13883
|
* @example
|
|
13814
13884
|
* ```ts
|
|
13815
|
-
* import {
|
|
13885
|
+
* import { Context, Stream } from "effect"
|
|
13816
13886
|
*
|
|
13817
13887
|
* const stream = Stream.make(1, 2, 3)
|
|
13818
|
-
* const iterable = Stream.toAsyncIterableWith(stream,
|
|
13888
|
+
* const iterable = Stream.toAsyncIterableWith(stream, Context.empty())
|
|
13819
13889
|
*
|
|
13820
13890
|
* const collect = async () => {
|
|
13821
13891
|
* const results: Array<number> = []
|
|
@@ -13829,16 +13899,16 @@ export declare const toAsyncIterableWith: {
|
|
|
13829
13899
|
* @since 2.0.0
|
|
13830
13900
|
* @category Destructors
|
|
13831
13901
|
*/
|
|
13832
|
-
<XR>(
|
|
13902
|
+
<XR>(context: Context.Context<XR>): <A, E, R extends XR>(self: Stream<A, E, R>) => AsyncIterable<A>;
|
|
13833
13903
|
/**
|
|
13834
13904
|
* Converts the stream to an `AsyncIterable` using the provided services.
|
|
13835
13905
|
*
|
|
13836
13906
|
* @example
|
|
13837
13907
|
* ```ts
|
|
13838
|
-
* import {
|
|
13908
|
+
* import { Context, Stream } from "effect"
|
|
13839
13909
|
*
|
|
13840
13910
|
* const stream = Stream.make(1, 2, 3)
|
|
13841
|
-
* const iterable = Stream.toAsyncIterableWith(stream,
|
|
13911
|
+
* const iterable = Stream.toAsyncIterableWith(stream, Context.empty())
|
|
13842
13912
|
*
|
|
13843
13913
|
* const collect = async () => {
|
|
13844
13914
|
* const results: Array<number> = []
|
|
@@ -13852,7 +13922,7 @@ export declare const toAsyncIterableWith: {
|
|
|
13852
13922
|
* @since 2.0.0
|
|
13853
13923
|
* @category Destructors
|
|
13854
13924
|
*/
|
|
13855
|
-
<A, E, XR, R extends XR>(self: Stream<A, E, R>,
|
|
13925
|
+
<A, E, XR, R extends XR>(self: Stream<A, E, R>, context: Context.Context<XR>): AsyncIterable<A>;
|
|
13856
13926
|
};
|
|
13857
13927
|
/**
|
|
13858
13928
|
* Creates an effect that yields an `AsyncIterable` using the current services.
|
|
@@ -14198,16 +14268,16 @@ export declare const toPubSubTake: {
|
|
|
14198
14268
|
}): Effect.Effect<PubSub.PubSub<Take.Take<A, E>>, never, R | Scope.Scope>;
|
|
14199
14269
|
};
|
|
14200
14270
|
/**
|
|
14201
|
-
* Converts a stream to a
|
|
14271
|
+
* Converts a stream to a Queue for concurrent consumption.
|
|
14202
14272
|
*
|
|
14203
14273
|
* @example
|
|
14204
14274
|
* ```ts
|
|
14205
|
-
* import { Effect,
|
|
14275
|
+
* import { Effect, Queue, Stream } from "effect"
|
|
14206
14276
|
*
|
|
14207
14277
|
* const program = Effect.gen(function* () {
|
|
14208
|
-
* const
|
|
14209
|
-
* const
|
|
14210
|
-
* return
|
|
14278
|
+
* const queue = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
|
|
14279
|
+
* const chunk = yield* Queue.takeBetween(queue, 1, 3)
|
|
14280
|
+
* return chunk
|
|
14211
14281
|
* })
|
|
14212
14282
|
* ```
|
|
14213
14283
|
*
|
|
@@ -14216,16 +14286,16 @@ export declare const toPubSubTake: {
|
|
|
14216
14286
|
*/
|
|
14217
14287
|
export declare const toQueue: {
|
|
14218
14288
|
/**
|
|
14219
|
-
* Converts a stream to a
|
|
14289
|
+
* Converts a stream to a Queue for concurrent consumption.
|
|
14220
14290
|
*
|
|
14221
14291
|
* @example
|
|
14222
14292
|
* ```ts
|
|
14223
|
-
* import { Effect,
|
|
14293
|
+
* import { Effect, Queue, Stream } from "effect"
|
|
14224
14294
|
*
|
|
14225
14295
|
* const program = Effect.gen(function* () {
|
|
14226
|
-
* const
|
|
14227
|
-
* const
|
|
14228
|
-
* return
|
|
14296
|
+
* const queue = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
|
|
14297
|
+
* const chunk = yield* Queue.takeBetween(queue, 1, 3)
|
|
14298
|
+
* return chunk
|
|
14229
14299
|
* })
|
|
14230
14300
|
* ```
|
|
14231
14301
|
*
|
|
@@ -14239,16 +14309,16 @@ export declare const toQueue: {
|
|
|
14239
14309
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
|
|
14240
14310
|
}): <A, E, R>(self: Stream<A, E, R>) => Effect.Effect<Queue.Dequeue<A, E | Cause.Done>, never, R | Scope.Scope>;
|
|
14241
14311
|
/**
|
|
14242
|
-
* Converts a stream to a
|
|
14312
|
+
* Converts a stream to a Queue for concurrent consumption.
|
|
14243
14313
|
*
|
|
14244
14314
|
* @example
|
|
14245
14315
|
* ```ts
|
|
14246
|
-
* import { Effect,
|
|
14316
|
+
* import { Effect, Queue, Stream } from "effect"
|
|
14247
14317
|
*
|
|
14248
14318
|
* const program = Effect.gen(function* () {
|
|
14249
|
-
* const
|
|
14250
|
-
* const
|
|
14251
|
-
* return
|
|
14319
|
+
* const queue = yield* Stream.toQueue(Stream.fromIterable([1, 2, 3]), { capacity: 8 })
|
|
14320
|
+
* const chunk = yield* Queue.takeBetween(queue, 1, 3)
|
|
14321
|
+
* return chunk
|
|
14252
14322
|
* })
|
|
14253
14323
|
* ```
|
|
14254
14324
|
*
|
|
@@ -14260,7 +14330,7 @@ export declare const toQueue: {
|
|
|
14260
14330
|
} | {
|
|
14261
14331
|
readonly capacity: number;
|
|
14262
14332
|
readonly strategy?: "dropping" | "sliding" | "suspend" | undefined;
|
|
14263
|
-
}): Effect.Effect<
|
|
14333
|
+
}): Effect.Effect<Queue.Dequeue<A, E | Cause.Done>, never, R | Scope.Scope>;
|
|
14264
14334
|
};
|
|
14265
14335
|
/**
|
|
14266
14336
|
* Runs the stream, offering each element to the provided queue and ending it
|