effect 2.0.0-next.5 → 2.0.0-next.50
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/BigInt/dist/effect-BigInt.cjs.d.mts +2 -0
- package/BigInt/dist/effect-BigInt.cjs.d.mts.map +1 -0
- package/BigInt/dist/effect-BigInt.cjs.d.ts +2 -0
- package/BigInt/dist/effect-BigInt.cjs.d.ts.map +1 -0
- package/BigInt/dist/effect-BigInt.cjs.dev.js +520 -0
- package/BigInt/dist/effect-BigInt.cjs.js +7 -0
- package/BigInt/dist/effect-BigInt.cjs.mjs +28 -0
- package/BigInt/dist/effect-BigInt.cjs.prod.js +520 -0
- package/BigInt/dist/effect-BigInt.esm.js +482 -0
- package/BigInt/package.json +4 -0
- package/Boolean/dist/effect-Boolean.cjs.d.mts +2 -0
- package/Boolean/dist/effect-Boolean.cjs.d.mts.map +1 -0
- package/Boolean/dist/effect-Boolean.cjs.d.ts +2 -0
- package/Boolean/dist/effect-Boolean.cjs.d.ts.map +1 -0
- package/Boolean/dist/effect-Boolean.cjs.dev.js +247 -0
- package/Boolean/dist/effect-Boolean.cjs.js +7 -0
- package/Boolean/dist/effect-Boolean.cjs.mjs +16 -0
- package/Boolean/dist/effect-Boolean.cjs.prod.js +247 -0
- package/Boolean/dist/effect-Boolean.esm.js +230 -0
- package/Boolean/package.json +4 -0
- package/Brand/dist/effect-Brand.cjs.d.mts +2 -0
- package/Brand/dist/effect-Brand.cjs.d.mts.map +1 -0
- package/Brand/dist/effect-Brand.cjs.d.ts +2 -0
- package/Brand/dist/effect-Brand.cjs.d.ts.map +1 -0
- package/Brand/dist/effect-Brand.cjs.dev.js +228 -0
- package/Brand/dist/effect-Brand.cjs.js +7 -0
- package/Brand/dist/effect-Brand.cjs.mjs +9 -0
- package/Brand/dist/effect-Brand.cjs.prod.js +228 -0
- package/Brand/dist/effect-Brand.esm.js +204 -0
- package/Brand/package.json +4 -0
- package/Cache/dist/effect-Cache.cjs.d.mts +2 -0
- package/Cache/dist/effect-Cache.cjs.d.mts.map +1 -0
- package/Cache/dist/effect-Cache.cjs.d.ts +2 -0
- package/Cache/dist/effect-Cache.cjs.d.ts.map +1 -0
- package/Cache/dist/effect-Cache.cjs.dev.js +191 -0
- package/Cache/dist/effect-Cache.cjs.js +7 -0
- package/Cache/dist/effect-Cache.cjs.mjs +7 -0
- package/Cache/dist/effect-Cache.cjs.prod.js +191 -0
- package/Cache/dist/effect-Cache.esm.js +111 -0
- package/Cache/package.json +4 -0
- package/Cause/dist/effect-Cause.cjs.d.mts +2 -0
- package/Cause/dist/effect-Cause.cjs.d.mts.map +1 -0
- package/Cause/dist/effect-Cause.cjs.d.ts +2 -0
- package/Cause/dist/effect-Cause.cjs.d.ts.map +1 -0
- package/Cause/dist/effect-Cause.cjs.dev.js +759 -0
- package/Cause/dist/effect-Cause.cjs.js +7 -0
- package/Cause/dist/effect-Cause.cjs.mjs +61 -0
- package/Cause/dist/effect-Cause.cjs.prod.js +759 -0
- package/Cause/dist/effect-Cause.esm.js +668 -0
- package/Cause/package.json +4 -0
- package/Channel/dist/effect-Channel.cjs.d.mts +2 -0
- package/Channel/dist/effect-Channel.cjs.d.mts.map +1 -0
- package/Channel/dist/effect-Channel.cjs.d.ts +2 -0
- package/Channel/dist/effect-Channel.cjs.d.ts.map +1 -0
- package/Channel/dist/effect-Channel.cjs.dev.js +1221 -0
- package/Channel/dist/effect-Channel.cjs.js +7 -0
- package/Channel/dist/effect-Channel.cjs.mjs +109 -0
- package/Channel/dist/effect-Channel.cjs.prod.js +1221 -0
- package/Channel/dist/effect-Channel.esm.js +1009 -0
- package/Channel/package.json +4 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.d.mts +2 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.d.mts.map +1 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.d.ts +2 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.d.ts.map +1 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.dev.js +125 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.js +7 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.mjs +11 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.cjs.prod.js +125 -0
- package/ChannelChildExecutorDecision/dist/effect-ChannelChildExecutorDecision.esm.js +112 -0
- package/ChannelChildExecutorDecision/package.json +4 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.d.mts +2 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.d.mts.map +1 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.d.ts +2 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.d.ts.map +1 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js +70 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.js +7 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.mjs +8 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.prod.js +70 -0
- package/ChannelMergeDecision/dist/effect-ChannelMergeDecision.esm.js +60 -0
- package/ChannelMergeDecision/package.json +4 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.d.mts +2 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.d.mts.map +1 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.d.ts +2 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.d.ts.map +1 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.dev.js +114 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.js +7 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.mjs +11 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.cjs.prod.js +114 -0
- package/ChannelMergeState/dist/effect-ChannelMergeState.esm.js +101 -0
- package/ChannelMergeState/package.json +4 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.d.mts +2 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.d.mts.map +1 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.d.ts +2 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.d.ts.map +1 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.dev.js +95 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.js +7 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.mjs +9 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.cjs.prod.js +95 -0
- package/ChannelMergeStrategy/dist/effect-ChannelMergeStrategy.esm.js +84 -0
- package/ChannelMergeStrategy/package.json +4 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.d.mts +2 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.d.mts.map +1 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.d.ts +2 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.d.ts.map +1 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.dev.js +138 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.js +7 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.mjs +3 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.cjs.prod.js +138 -0
- package/ChannelSingleProducerAsyncInput/dist/effect-ChannelSingleProducerAsyncInput.esm.js +47 -0
- package/ChannelSingleProducerAsyncInput/package.json +4 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.d.mts +2 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.d.mts.map +1 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.d.ts +2 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.d.ts.map +1 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.dev.js +95 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.js +7 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.mjs +9 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.cjs.prod.js +95 -0
- package/ChannelUpstreamPullRequest/dist/effect-ChannelUpstreamPullRequest.esm.js +84 -0
- package/ChannelUpstreamPullRequest/package.json +4 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.d.mts +2 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.d.mts.map +1 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.d.ts +2 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.d.ts.map +1 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.dev.js +94 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.js +7 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.mjs +9 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.cjs.prod.js +94 -0
- package/ChannelUpstreamPullStrategy/dist/effect-ChannelUpstreamPullStrategy.esm.js +83 -0
- package/ChannelUpstreamPullStrategy/package.json +4 -0
- package/Chunk/dist/effect-Chunk.cjs.d.mts +2 -0
- package/Chunk/dist/effect-Chunk.cjs.d.mts.map +1 -0
- package/Chunk/dist/effect-Chunk.cjs.d.ts +2 -0
- package/Chunk/dist/effect-Chunk.cjs.d.ts.map +1 -0
- package/Chunk/dist/effect-Chunk.cjs.dev.js +1183 -0
- package/Chunk/dist/effect-Chunk.cjs.js +7 -0
- package/Chunk/dist/effect-Chunk.cjs.mjs +82 -0
- package/Chunk/dist/effect-Chunk.cjs.prod.js +1183 -0
- package/Chunk/dist/effect-Chunk.esm.js +1092 -0
- package/Chunk/package.json +4 -0
- package/Clock/dist/effect-Clock.cjs.d.mts +2 -0
- package/Clock/dist/effect-Clock.cjs.d.mts.map +1 -0
- package/Clock/dist/effect-Clock.cjs.d.ts +2 -0
- package/Clock/dist/effect-Clock.cjs.d.ts.map +1 -0
- package/Clock/dist/effect-Clock.cjs.dev.js +127 -0
- package/Clock/dist/effect-Clock.cjs.js +7 -0
- package/Clock/dist/effect-Clock.cjs.mjs +9 -0
- package/Clock/dist/effect-Clock.cjs.prod.js +127 -0
- package/Clock/dist/effect-Clock.esm.js +78 -0
- package/Clock/package.json +4 -0
- package/Config/dist/effect-Config.cjs.d.mts +2 -0
- package/Config/dist/effect-Config.cjs.d.mts.map +1 -0
- package/Config/dist/effect-Config.cjs.d.ts +2 -0
- package/Config/dist/effect-Config.cjs.d.ts.map +1 -0
- package/Config/dist/effect-Config.cjs.dev.js +391 -0
- package/Config/dist/effect-Config.cjs.js +7 -0
- package/Config/dist/effect-Config.cjs.mjs +35 -0
- package/Config/dist/effect-Config.cjs.prod.js +391 -0
- package/Config/dist/effect-Config.esm.js +321 -0
- package/Config/package.json +4 -0
- package/ConfigError/dist/effect-ConfigError.cjs.d.mts +2 -0
- package/ConfigError/dist/effect-ConfigError.cjs.d.mts.map +1 -0
- package/ConfigError/dist/effect-ConfigError.cjs.d.ts +2 -0
- package/ConfigError/dist/effect-ConfigError.cjs.d.ts.map +1 -0
- package/ConfigError/dist/effect-ConfigError.cjs.dev.js +223 -0
- package/ConfigError/dist/effect-ConfigError.cjs.js +7 -0
- package/ConfigError/dist/effect-ConfigError.cjs.mjs +19 -0
- package/ConfigError/dist/effect-ConfigError.cjs.prod.js +223 -0
- package/ConfigError/dist/effect-ConfigError.esm.js +185 -0
- package/ConfigError/package.json +4 -0
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.d.mts +2 -0
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.d.mts.map +1 -0
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.d.ts +2 -0
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.d.ts.map +1 -0
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.dev.js +256 -0
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.js +7 -0
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.mjs +20 -0
- package/ConfigProvider/dist/effect-ConfigProvider.cjs.prod.js +256 -0
- package/ConfigProvider/dist/effect-ConfigProvider.esm.js +198 -0
- package/ConfigProvider/package.json +4 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.d.mts +2 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.d.mts.map +1 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.d.ts +2 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.d.ts.map +1 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.dev.js +99 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.js +7 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.mjs +7 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.cjs.prod.js +99 -0
- package/ConfigProviderPathPatch/dist/effect-ConfigProviderPathPatch.esm.js +70 -0
- package/ConfigProviderPathPatch/package.json +4 -0
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.d.mts +2 -0
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.d.mts.map +1 -0
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.d.ts +2 -0
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.d.ts.map +1 -0
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.dev.js +92 -0
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.js +7 -0
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.mjs +9 -0
- package/ConfigSecret/dist/effect-ConfigSecret.cjs.prod.js +92 -0
- package/ConfigSecret/dist/effect-ConfigSecret.esm.js +63 -0
- package/ConfigSecret/package.json +4 -0
- package/Console/dist/effect-Console.cjs.d.mts +2 -0
- package/Console/dist/effect-Console.cjs.d.mts.map +1 -0
- package/Console/dist/effect-Console.cjs.d.ts +2 -0
- package/Console/dist/effect-Console.cjs.d.ts.map +1 -0
- package/Console/dist/effect-Console.cjs.dev.js +322 -0
- package/Console/dist/effect-Console.cjs.js +7 -0
- package/Console/dist/effect-Console.cjs.mjs +24 -0
- package/Console/dist/effect-Console.cjs.prod.js +322 -0
- package/Console/dist/effect-Console.esm.js +154 -0
- package/Console/package.json +4 -0
- package/Context/dist/effect-Context.cjs.d.mts +2 -0
- package/Context/dist/effect-Context.cjs.d.mts.map +1 -0
- package/Context/dist/effect-Context.cjs.d.ts +2 -0
- package/Context/dist/effect-Context.cjs.d.ts.map +1 -0
- package/Context/dist/effect-Context.cjs.dev.js +321 -0
- package/Context/dist/effect-Context.cjs.js +7 -0
- package/Context/dist/effect-Context.cjs.mjs +15 -0
- package/Context/dist/effect-Context.cjs.prod.js +321 -0
- package/Context/dist/effect-Context.esm.js +295 -0
- package/Context/package.json +4 -0
- package/Data/dist/effect-Data.cjs.d.mts +2 -0
- package/Data/dist/effect-Data.cjs.d.mts.map +1 -0
- package/Data/dist/effect-Data.cjs.d.ts +2 -0
- package/Data/dist/effect-Data.cjs.d.ts.map +1 -0
- package/Data/dist/effect-Data.cjs.dev.js +318 -0
- package/Data/dist/effect-Data.cjs.js +7 -0
- package/Data/dist/effect-Data.cjs.mjs +15 -0
- package/Data/dist/effect-Data.cjs.prod.js +318 -0
- package/Data/dist/effect-Data.esm.js +217 -0
- package/Data/package.json +4 -0
- package/DefaultServices/dist/effect-DefaultServices.cjs.d.mts +2 -0
- package/DefaultServices/dist/effect-DefaultServices.cjs.d.mts.map +1 -0
- package/DefaultServices/dist/effect-DefaultServices.cjs.d.ts +2 -0
- package/DefaultServices/dist/effect-DefaultServices.cjs.d.ts.map +1 -0
- package/DefaultServices/dist/effect-DefaultServices.cjs.dev.js +69 -0
- package/DefaultServices/dist/effect-DefaultServices.cjs.js +7 -0
- package/DefaultServices/dist/effect-DefaultServices.cjs.mjs +4 -0
- package/DefaultServices/dist/effect-DefaultServices.cjs.prod.js +69 -0
- package/DefaultServices/dist/effect-DefaultServices.esm.js +24 -0
- package/DefaultServices/package.json +4 -0
- package/Deferred/dist/effect-Deferred.cjs.d.mts +2 -0
- package/Deferred/dist/effect-Deferred.cjs.d.mts.map +1 -0
- package/Deferred/dist/effect-Deferred.cjs.d.ts +2 -0
- package/Deferred/dist/effect-Deferred.cjs.d.ts.map +1 -0
- package/Deferred/dist/effect-Deferred.cjs.dev.js +259 -0
- package/Deferred/dist/effect-Deferred.cjs.js +7 -0
- package/Deferred/dist/effect-Deferred.cjs.mjs +23 -0
- package/Deferred/dist/effect-Deferred.cjs.prod.js +259 -0
- package/Deferred/dist/effect-Deferred.esm.js +206 -0
- package/Deferred/package.json +4 -0
- package/Differ/dist/effect-Differ.cjs.d.mts +2 -0
- package/Differ/dist/effect-Differ.cjs.d.mts.map +1 -0
- package/Differ/dist/effect-Differ.cjs.d.ts +2 -0
- package/Differ/dist/effect-Differ.cjs.d.ts.map +1 -0
- package/Differ/dist/effect-Differ.cjs.dev.js +990 -0
- package/Differ/dist/effect-Differ.cjs.js +7 -0
- package/Differ/dist/effect-Differ.cjs.mjs +17 -0
- package/Differ/dist/effect-Differ.cjs.prod.js +990 -0
- package/Differ/dist/effect-Differ.esm.js +137 -0
- package/Differ/package.json +4 -0
- package/Duration/dist/effect-Duration.cjs.d.mts +2 -0
- package/Duration/dist/effect-Duration.cjs.d.mts.map +1 -0
- package/Duration/dist/effect-Duration.cjs.d.ts +2 -0
- package/Duration/dist/effect-Duration.cjs.d.ts.map +1 -0
- package/Duration/dist/effect-Duration.cjs.dev.js +479 -0
- package/Duration/dist/effect-Duration.cjs.js +7 -0
- package/Duration/dist/effect-Duration.cjs.mjs +34 -0
- package/Duration/dist/effect-Duration.cjs.prod.js +479 -0
- package/Duration/dist/effect-Duration.esm.js +438 -0
- package/Duration/package.json +4 -0
- package/Effect/dist/effect-Effect.cjs.d.mts +2 -0
- package/Effect/dist/effect-Effect.cjs.d.mts.map +1 -0
- package/Effect/dist/effect-Effect.cjs.d.ts +2 -0
- package/Effect/dist/effect-Effect.cjs.d.ts.map +1 -0
- package/Effect/dist/effect-Effect.cjs.dev.js +3402 -0
- package/Effect/dist/effect-Effect.cjs.js +7 -0
- package/Effect/dist/effect-Effect.cjs.mjs +312 -0
- package/Effect/dist/effect-Effect.cjs.prod.js +3402 -0
- package/Effect/dist/effect-Effect.esm.js +3014 -0
- package/Effect/package.json +4 -0
- package/Effectable/dist/effect-Effectable.cjs.d.mts +2 -0
- package/Effectable/dist/effect-Effectable.cjs.d.mts.map +1 -0
- package/Effectable/dist/effect-Effectable.cjs.d.ts +2 -0
- package/Effectable/dist/effect-Effectable.cjs.d.ts.map +1 -0
- package/Effectable/dist/effect-Effectable.cjs.dev.js +106 -0
- package/Effectable/dist/effect-Effectable.cjs.js +7 -0
- package/Effectable/dist/effect-Effectable.cjs.mjs +11 -0
- package/Effectable/dist/effect-Effectable.cjs.prod.js +106 -0
- package/Effectable/dist/effect-Effectable.esm.js +87 -0
- package/Effectable/package.json +4 -0
- package/Either/dist/effect-Either.cjs.d.mts +2 -0
- package/Either/dist/effect-Either.cjs.d.mts.map +1 -0
- package/Either/dist/effect-Either.cjs.d.ts +2 -0
- package/Either/dist/effect-Either.cjs.d.ts.map +1 -0
- package/Either/dist/effect-Either.cjs.dev.js +493 -0
- package/Either/dist/effect-Either.cjs.js +7 -0
- package/Either/dist/effect-Either.cjs.mjs +31 -0
- package/Either/dist/effect-Either.cjs.prod.js +493 -0
- package/Either/dist/effect-Either.esm.js +454 -0
- package/Either/package.json +4 -0
- package/Encoding/dist/effect-Encoding.cjs.d.mts +2 -0
- package/Encoding/dist/effect-Encoding.cjs.d.mts.map +1 -0
- package/Encoding/dist/effect-Encoding.cjs.d.ts +2 -0
- package/Encoding/dist/effect-Encoding.cjs.d.ts.map +1 -0
- package/Encoding/dist/effect-Encoding.cjs.dev.js +306 -0
- package/Encoding/dist/effect-Encoding.cjs.js +7 -0
- package/Encoding/dist/effect-Encoding.cjs.mjs +14 -0
- package/Encoding/dist/effect-Encoding.cjs.prod.js +306 -0
- package/Encoding/dist/effect-Encoding.esm.js +123 -0
- package/Encoding/package.json +4 -0
- package/Equal/dist/effect-Equal.cjs.d.mts +2 -0
- package/Equal/dist/effect-Equal.cjs.d.mts.map +1 -0
- package/Equal/dist/effect-Equal.cjs.d.ts +2 -0
- package/Equal/dist/effect-Equal.cjs.d.ts.map +1 -0
- package/Equal/dist/effect-Equal.cjs.dev.js +68 -0
- package/Equal/dist/effect-Equal.cjs.js +7 -0
- package/Equal/dist/effect-Equal.cjs.mjs +6 -0
- package/Equal/dist/effect-Equal.cjs.prod.js +68 -0
- package/Equal/dist/effect-Equal.esm.js +57 -0
- package/Equal/package.json +4 -0
- package/Equivalence/dist/effect-Equivalence.cjs.d.mts +2 -0
- package/Equivalence/dist/effect-Equivalence.cjs.d.mts.map +1 -0
- package/Equivalence/dist/effect-Equivalence.cjs.d.ts +2 -0
- package/Equivalence/dist/effect-Equivalence.cjs.d.ts.map +1 -0
- package/Equivalence/dist/effect-Equivalence.cjs.dev.js +217 -0
- package/Equivalence/dist/effect-Equivalence.cjs.js +7 -0
- package/Equivalence/dist/effect-Equivalence.cjs.mjs +20 -0
- package/Equivalence/dist/effect-Equivalence.cjs.prod.js +217 -0
- package/Equivalence/dist/effect-Equivalence.esm.js +196 -0
- package/Equivalence/package.json +4 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.d.mts +2 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.d.mts.map +1 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.d.ts +2 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.d.ts.map +1 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.dev.js +16 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.js +7 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.mjs +9 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.cjs.prod.js +16 -0
- package/ExecutionStrategy/dist/effect-ExecutionStrategy.esm.js +99 -0
- package/ExecutionStrategy/package.json +4 -0
- package/Exit/dist/effect-Exit.cjs.d.mts +2 -0
- package/Exit/dist/effect-Exit.cjs.d.mts.map +1 -0
- package/Exit/dist/effect-Exit.cjs.d.ts +2 -0
- package/Exit/dist/effect-Exit.cjs.d.ts.map +1 -0
- package/Exit/dist/effect-Exit.cjs.dev.js +400 -0
- package/Exit/dist/effect-Exit.cjs.js +7 -0
- package/Exit/dist/effect-Exit.cjs.mjs +37 -0
- package/Exit/dist/effect-Exit.cjs.prod.js +400 -0
- package/Exit/dist/effect-Exit.esm.js +332 -0
- package/Exit/package.json +4 -0
- package/Fiber/dist/effect-Fiber.cjs.d.mts +2 -0
- package/Fiber/dist/effect-Fiber.cjs.d.mts.map +1 -0
- package/Fiber/dist/effect-Fiber.cjs.d.ts +2 -0
- package/Fiber/dist/effect-Fiber.cjs.d.ts.map +1 -0
- package/Fiber/dist/effect-Fiber.cjs.dev.js +544 -0
- package/Fiber/dist/effect-Fiber.cjs.js +7 -0
- package/Fiber/dist/effect-Fiber.cjs.mjs +48 -0
- package/Fiber/dist/effect-Fiber.cjs.prod.js +544 -0
- package/Fiber/dist/effect-Fiber.esm.js +423 -0
- package/Fiber/package.json +4 -0
- package/FiberId/dist/effect-FiberId.cjs.d.mts +2 -0
- package/FiberId/dist/effect-FiberId.cjs.d.mts.map +1 -0
- package/FiberId/dist/effect-FiberId.cjs.d.ts +2 -0
- package/FiberId/dist/effect-FiberId.cjs.d.ts.map +1 -0
- package/FiberId/dist/effect-FiberId.cjs.dev.js +43 -0
- package/FiberId/dist/effect-FiberId.cjs.js +7 -0
- package/FiberId/dist/effect-FiberId.cjs.mjs +19 -0
- package/FiberId/dist/effect-FiberId.cjs.prod.js +43 -0
- package/FiberId/dist/effect-FiberId.esm.js +161 -0
- package/FiberId/package.json +4 -0
- package/FiberRef/dist/effect-FiberRef.cjs.d.mts +2 -0
- package/FiberRef/dist/effect-FiberRef.cjs.d.mts.map +1 -0
- package/FiberRef/dist/effect-FiberRef.cjs.d.ts +2 -0
- package/FiberRef/dist/effect-FiberRef.cjs.d.ts.map +1 -0
- package/FiberRef/dist/effect-FiberRef.cjs.dev.js +400 -0
- package/FiberRef/dist/effect-FiberRef.cjs.js +7 -0
- package/FiberRef/dist/effect-FiberRef.cjs.mjs +46 -0
- package/FiberRef/dist/effect-FiberRef.cjs.prod.js +400 -0
- package/FiberRef/dist/effect-FiberRef.esm.js +283 -0
- package/FiberRef/package.json +4 -0
- package/FiberRefs/dist/effect-FiberRefs.cjs.d.mts +2 -0
- package/FiberRefs/dist/effect-FiberRefs.cjs.d.mts.map +1 -0
- package/FiberRefs/dist/effect-FiberRefs.cjs.d.ts +2 -0
- package/FiberRefs/dist/effect-FiberRefs.cjs.d.ts.map +1 -0
- package/FiberRefs/dist/effect-FiberRefs.cjs.dev.js +152 -0
- package/FiberRefs/dist/effect-FiberRefs.cjs.js +7 -0
- package/FiberRefs/dist/effect-FiberRefs.cjs.mjs +13 -0
- package/FiberRefs/dist/effect-FiberRefs.cjs.prod.js +152 -0
- package/FiberRefs/dist/effect-FiberRefs.esm.js +107 -0
- package/FiberRefs/package.json +4 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.d.mts +2 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.d.mts.map +1 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.d.ts +2 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.d.ts.map +1 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.dev.js +115 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.js +7 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.mjs +6 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.cjs.prod.js +115 -0
- package/FiberRefsPatch/dist/effect-FiberRefsPatch.esm.js +76 -0
- package/FiberRefsPatch/package.json +4 -0
- package/FiberStatus/dist/effect-FiberStatus.cjs.d.mts +2 -0
- package/FiberStatus/dist/effect-FiberStatus.cjs.d.mts.map +1 -0
- package/FiberStatus/dist/effect-FiberStatus.cjs.d.ts +2 -0
- package/FiberStatus/dist/effect-FiberStatus.cjs.d.ts.map +1 -0
- package/FiberStatus/dist/effect-FiberStatus.cjs.dev.js +189 -0
- package/FiberStatus/dist/effect-FiberStatus.cjs.js +7 -0
- package/FiberStatus/dist/effect-FiberStatus.cjs.mjs +10 -0
- package/FiberStatus/dist/effect-FiberStatus.cjs.prod.js +189 -0
- package/FiberStatus/dist/effect-FiberStatus.esm.js +89 -0
- package/FiberStatus/package.json +4 -0
- package/Function/dist/effect-Function.cjs.d.mts +2 -0
- package/Function/dist/effect-Function.cjs.d.mts.map +1 -0
- package/Function/dist/effect-Function.cjs.d.ts +2 -0
- package/Function/dist/effect-Function.cjs.d.ts.map +1 -0
- package/Function/dist/effect-Function.cjs.dev.js +515 -0
- package/Function/dist/effect-Function.cjs.js +7 -0
- package/Function/dist/effect-Function.cjs.mjs +22 -0
- package/Function/dist/effect-Function.cjs.prod.js +515 -0
- package/Function/dist/effect-Function.esm.js +492 -0
- package/Function/package.json +4 -0
- package/GlobalValue/dist/effect-GlobalValue.cjs.d.mts +2 -0
- package/GlobalValue/dist/effect-GlobalValue.cjs.d.mts.map +1 -0
- package/GlobalValue/dist/effect-GlobalValue.cjs.d.ts +2 -0
- package/GlobalValue/dist/effect-GlobalValue.cjs.d.ts.map +1 -0
- package/GlobalValue/dist/effect-GlobalValue.cjs.dev.js +24 -0
- package/GlobalValue/dist/effect-GlobalValue.cjs.js +7 -0
- package/GlobalValue/dist/effect-GlobalValue.cjs.mjs +3 -0
- package/GlobalValue/dist/effect-GlobalValue.cjs.prod.js +24 -0
- package/GlobalValue/dist/effect-GlobalValue.esm.js +20 -0
- package/GlobalValue/package.json +4 -0
- package/GroupBy/dist/effect-GroupBy.cjs.d.mts +2 -0
- package/GroupBy/dist/effect-GroupBy.cjs.d.mts.map +1 -0
- package/GroupBy/dist/effect-GroupBy.cjs.d.ts +2 -0
- package/GroupBy/dist/effect-GroupBy.cjs.d.ts.map +1 -0
- package/GroupBy/dist/effect-GroupBy.cjs.dev.js +177 -0
- package/GroupBy/dist/effect-GroupBy.cjs.js +7 -0
- package/GroupBy/dist/effect-GroupBy.cjs.mjs +7 -0
- package/GroupBy/dist/effect-GroupBy.cjs.prod.js +177 -0
- package/GroupBy/dist/effect-GroupBy.esm.js +63 -0
- package/GroupBy/package.json +4 -0
- package/HKT/dist/effect-HKT.cjs.d.mts +2 -0
- package/HKT/dist/effect-HKT.cjs.d.mts.map +1 -0
- package/HKT/dist/effect-HKT.cjs.d.ts +2 -0
- package/HKT/dist/effect-HKT.cjs.d.ts.map +1 -0
- package/HKT/dist/effect-HKT.cjs.dev.js +2 -0
- package/HKT/dist/effect-HKT.cjs.js +7 -0
- package/HKT/dist/effect-HKT.cjs.mjs +1 -0
- package/HKT/dist/effect-HKT.cjs.prod.js +2 -0
- package/HKT/dist/effect-HKT.esm.js +1 -0
- package/HKT/package.json +4 -0
- package/Hash/dist/effect-Hash.cjs.d.mts +2 -0
- package/Hash/dist/effect-Hash.cjs.d.mts.map +1 -0
- package/Hash/dist/effect-Hash.cjs.d.ts +2 -0
- package/Hash/dist/effect-Hash.cjs.d.ts.map +1 -0
- package/Hash/dist/effect-Hash.cjs.dev.js +179 -0
- package/Hash/dist/effect-Hash.cjs.js +7 -0
- package/Hash/dist/effect-Hash.cjs.mjs +13 -0
- package/Hash/dist/effect-Hash.cjs.prod.js +179 -0
- package/Hash/dist/effect-Hash.esm.js +164 -0
- package/Hash/package.json +4 -0
- package/HashMap/dist/effect-HashMap.cjs.d.mts +2 -0
- package/HashMap/dist/effect-HashMap.cjs.d.mts.map +1 -0
- package/HashMap/dist/effect-HashMap.cjs.d.ts +2 -0
- package/HashMap/dist/effect-HashMap.cjs.d.ts.map +1 -0
- package/HashMap/dist/effect-HashMap.cjs.dev.js +341 -0
- package/HashMap/dist/effect-HashMap.cjs.js +7 -0
- package/HashMap/dist/effect-HashMap.cjs.mjs +34 -0
- package/HashMap/dist/effect-HashMap.cjs.prod.js +341 -0
- package/HashMap/dist/effect-HashMap.esm.js +287 -0
- package/HashMap/package.json +4 -0
- package/HashSet/dist/effect-HashSet.cjs.d.mts +2 -0
- package/HashSet/dist/effect-HashSet.cjs.d.mts.map +1 -0
- package/HashSet/dist/effect-HashSet.cjs.d.ts +2 -0
- package/HashSet/dist/effect-HashSet.cjs.d.ts.map +1 -0
- package/HashSet/dist/effect-HashSet.cjs.dev.js +270 -0
- package/HashSet/dist/effect-HashSet.cjs.js +7 -0
- package/HashSet/dist/effect-HashSet.cjs.mjs +27 -0
- package/HashSet/dist/effect-HashSet.cjs.prod.js +270 -0
- package/HashSet/dist/effect-HashSet.esm.js +227 -0
- package/HashSet/package.json +4 -0
- package/Inspectable/dist/effect-Inspectable.cjs.d.mts +2 -0
- package/Inspectable/dist/effect-Inspectable.cjs.d.mts.map +1 -0
- package/Inspectable/dist/effect-Inspectable.cjs.d.ts +2 -0
- package/Inspectable/dist/effect-Inspectable.cjs.d.ts.map +1 -0
- package/Inspectable/dist/effect-Inspectable.cjs.dev.js +44 -0
- package/Inspectable/dist/effect-Inspectable.cjs.js +7 -0
- package/Inspectable/dist/effect-Inspectable.cjs.mjs +5 -0
- package/Inspectable/dist/effect-Inspectable.cjs.prod.js +44 -0
- package/Inspectable/dist/effect-Inspectable.esm.js +38 -0
- package/Inspectable/package.json +4 -0
- package/KeyedPool/dist/effect-KeyedPool.cjs.d.mts +2 -0
- package/KeyedPool/dist/effect-KeyedPool.cjs.d.mts.map +1 -0
- package/KeyedPool/dist/effect-KeyedPool.cjs.d.ts +2 -0
- package/KeyedPool/dist/effect-KeyedPool.cjs.d.ts.map +1 -0
- package/KeyedPool/dist/effect-KeyedPool.cjs.dev.js +334 -0
- package/KeyedPool/dist/effect-KeyedPool.cjs.js +7 -0
- package/KeyedPool/dist/effect-KeyedPool.cjs.mjs +9 -0
- package/KeyedPool/dist/effect-KeyedPool.cjs.prod.js +334 -0
- package/KeyedPool/dist/effect-KeyedPool.esm.js +104 -0
- package/KeyedPool/package.json +4 -0
- package/Layer/dist/effect-Layer.cjs.d.mts +2 -0
- package/Layer/dist/effect-Layer.cjs.d.mts.map +1 -0
- package/Layer/dist/effect-Layer.cjs.d.ts +2 -0
- package/Layer/dist/effect-Layer.cjs.d.ts.map +1 -0
- package/Layer/dist/effect-Layer.cjs.dev.js +802 -0
- package/Layer/dist/effect-Layer.cjs.js +7 -0
- package/Layer/dist/effect-Layer.cjs.mjs +77 -0
- package/Layer/dist/effect-Layer.cjs.prod.js +802 -0
- package/Layer/dist/effect-Layer.esm.js +646 -0
- package/Layer/package.json +4 -0
- package/List/dist/effect-List.cjs.d.mts +2 -0
- package/List/dist/effect-List.cjs.d.mts.map +1 -0
- package/List/dist/effect-List.cjs.d.ts +2 -0
- package/List/dist/effect-List.cjs.d.ts.map +1 -0
- package/List/dist/effect-List.cjs.dev.js +879 -0
- package/List/dist/effect-List.cjs.js +7 -0
- package/List/dist/effect-List.cjs.mjs +48 -0
- package/List/dist/effect-List.cjs.prod.js +879 -0
- package/List/dist/effect-List.esm.js +822 -0
- package/List/package.json +4 -0
- package/LogLevel/dist/effect-LogLevel.cjs.d.mts +2 -0
- package/LogLevel/dist/effect-LogLevel.cjs.d.mts.map +1 -0
- package/LogLevel/dist/effect-LogLevel.cjs.d.ts +2 -0
- package/LogLevel/dist/effect-LogLevel.cjs.d.ts.map +1 -0
- package/LogLevel/dist/effect-LogLevel.cjs.dev.js +249 -0
- package/LogLevel/dist/effect-LogLevel.cjs.js +7 -0
- package/LogLevel/dist/effect-LogLevel.cjs.mjs +18 -0
- package/LogLevel/dist/effect-LogLevel.cjs.prod.js +249 -0
- package/LogLevel/dist/effect-LogLevel.esm.js +202 -0
- package/LogLevel/package.json +4 -0
- package/LogSpan/dist/effect-LogSpan.cjs.d.mts +2 -0
- package/LogSpan/dist/effect-LogSpan.cjs.d.mts.map +1 -0
- package/LogSpan/dist/effect-LogSpan.cjs.d.ts +2 -0
- package/LogSpan/dist/effect-LogSpan.cjs.d.ts.map +1 -0
- package/LogSpan/dist/effect-LogSpan.cjs.dev.js +41 -0
- package/LogSpan/dist/effect-LogSpan.cjs.js +7 -0
- package/LogSpan/dist/effect-LogSpan.cjs.mjs +4 -0
- package/LogSpan/dist/effect-LogSpan.cjs.prod.js +41 -0
- package/LogSpan/dist/effect-LogSpan.esm.js +24 -0
- package/LogSpan/package.json +4 -0
- package/Logger/dist/effect-Logger.cjs.d.mts +2 -0
- package/Logger/dist/effect-Logger.cjs.d.mts.map +1 -0
- package/Logger/dist/effect-Logger.cjs.d.ts +2 -0
- package/Logger/dist/effect-Logger.cjs.d.ts.map +1 -0
- package/Logger/dist/effect-Logger.cjs.dev.js +314 -0
- package/Logger/dist/effect-Logger.cjs.js +7 -0
- package/Logger/dist/effect-Logger.cjs.mjs +29 -0
- package/Logger/dist/effect-Logger.cjs.prod.js +314 -0
- package/Logger/dist/effect-Logger.esm.js +193 -0
- package/Logger/package.json +4 -0
- package/Match/dist/effect-Match.cjs.d.mts +2 -0
- package/Match/dist/effect-Match.cjs.d.mts.map +1 -0
- package/Match/dist/effect-Match.cjs.d.ts +2 -0
- package/Match/dist/effect-Match.cjs.d.ts.map +1 -0
- package/Match/dist/effect-Match.cjs.dev.js +619 -0
- package/Match/dist/effect-Match.cjs.js +7 -0
- package/Match/dist/effect-Match.cjs.mjs +39 -0
- package/Match/dist/effect-Match.cjs.prod.js +619 -0
- package/Match/dist/effect-Match.esm.js +258 -0
- package/Match/package.json +4 -0
- package/Metric/dist/effect-Metric.cjs.d.mts +2 -0
- package/Metric/dist/effect-Metric.cjs.d.mts.map +1 -0
- package/Metric/dist/effect-Metric.cjs.d.ts +2 -0
- package/Metric/dist/effect-Metric.cjs.d.ts.map +1 -0
- package/Metric/dist/effect-Metric.cjs.dev.js +592 -0
- package/Metric/dist/effect-Metric.cjs.js +7 -0
- package/Metric/dist/effect-Metric.cjs.mjs +46 -0
- package/Metric/dist/effect-Metric.cjs.prod.js +592 -0
- package/Metric/dist/effect-Metric.esm.js +477 -0
- package/Metric/package.json +4 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.d.mts +2 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.d.mts.map +1 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.d.ts +2 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.d.ts.map +1 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.dev.js +79 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.js +7 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.mjs +7 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.cjs.prod.js +79 -0
- package/MetricBoundaries/dist/effect-MetricBoundaries.esm.js +52 -0
- package/MetricBoundaries/package.json +4 -0
- package/MetricHook/dist/effect-MetricHook.cjs.d.mts +2 -0
- package/MetricHook/dist/effect-MetricHook.cjs.d.mts.map +1 -0
- package/MetricHook/dist/effect-MetricHook.cjs.d.ts +2 -0
- package/MetricHook/dist/effect-MetricHook.cjs.d.ts.map +1 -0
- package/MetricHook/dist/effect-MetricHook.cjs.dev.js +104 -0
- package/MetricHook/dist/effect-MetricHook.cjs.js +7 -0
- package/MetricHook/dist/effect-MetricHook.cjs.mjs +10 -0
- package/MetricHook/dist/effect-MetricHook.cjs.prod.js +104 -0
- package/MetricHook/dist/effect-MetricHook.esm.js +68 -0
- package/MetricHook/package.json +4 -0
- package/MetricKey/dist/effect-MetricKey.cjs.d.mts +2 -0
- package/MetricKey/dist/effect-MetricKey.cjs.d.mts.map +1 -0
- package/MetricKey/dist/effect-MetricKey.cjs.d.ts +2 -0
- package/MetricKey/dist/effect-MetricKey.cjs.d.ts.map +1 -0
- package/MetricKey/dist/effect-MetricKey.cjs.dev.js +137 -0
- package/MetricKey/dist/effect-MetricKey.cjs.js +7 -0
- package/MetricKey/dist/effect-MetricKey.cjs.mjs +12 -0
- package/MetricKey/dist/effect-MetricKey.cjs.prod.js +137 -0
- package/MetricKey/dist/effect-MetricKey.esm.js +104 -0
- package/MetricKey/package.json +4 -0
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.d.mts +2 -0
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.d.mts.map +1 -0
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.d.ts +2 -0
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.d.ts.map +1 -0
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.dev.js +182 -0
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.js +7 -0
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.mjs +19 -0
- package/MetricKeyType/dist/effect-MetricKeyType.cjs.prod.js +182 -0
- package/MetricKeyType/dist/effect-MetricKeyType.esm.js +147 -0
- package/MetricKeyType/package.json +4 -0
- package/MetricLabel/dist/effect-MetricLabel.cjs.d.mts +2 -0
- package/MetricLabel/dist/effect-MetricLabel.cjs.d.mts.map +1 -0
- package/MetricLabel/dist/effect-MetricLabel.cjs.d.ts +2 -0
- package/MetricLabel/dist/effect-MetricLabel.cjs.d.ts.map +1 -0
- package/MetricLabel/dist/effect-MetricLabel.cjs.dev.js +54 -0
- package/MetricLabel/dist/effect-MetricLabel.cjs.js +7 -0
- package/MetricLabel/dist/effect-MetricLabel.cjs.mjs +5 -0
- package/MetricLabel/dist/effect-MetricLabel.cjs.prod.js +54 -0
- package/MetricLabel/dist/effect-MetricLabel.esm.js +41 -0
- package/MetricLabel/package.json +4 -0
- package/MetricPair/dist/effect-MetricPair.cjs.d.mts +2 -0
- package/MetricPair/dist/effect-MetricPair.cjs.d.mts.map +1 -0
- package/MetricPair/dist/effect-MetricPair.cjs.d.ts +2 -0
- package/MetricPair/dist/effect-MetricPair.cjs.d.ts.map +1 -0
- package/MetricPair/dist/effect-MetricPair.cjs.dev.js +45 -0
- package/MetricPair/dist/effect-MetricPair.cjs.js +7 -0
- package/MetricPair/dist/effect-MetricPair.cjs.mjs +5 -0
- package/MetricPair/dist/effect-MetricPair.cjs.prod.js +45 -0
- package/MetricPair/dist/effect-MetricPair.esm.js +38 -0
- package/MetricPair/package.json +4 -0
- package/MetricPolling/dist/effect-MetricPolling.cjs.d.mts +2 -0
- package/MetricPolling/dist/effect-MetricPolling.cjs.d.mts.map +1 -0
- package/MetricPolling/dist/effect-MetricPolling.cjs.d.ts +2 -0
- package/MetricPolling/dist/effect-MetricPolling.cjs.d.ts.map +1 -0
- package/MetricPolling/dist/effect-MetricPolling.cjs.dev.js +236 -0
- package/MetricPolling/dist/effect-MetricPolling.cjs.js +7 -0
- package/MetricPolling/dist/effect-MetricPolling.cjs.mjs +10 -0
- package/MetricPolling/dist/effect-MetricPolling.cjs.prod.js +236 -0
- package/MetricPolling/dist/effect-MetricPolling.esm.js +84 -0
- package/MetricPolling/package.json +4 -0
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.d.mts +2 -0
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.d.mts.map +1 -0
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.d.ts +2 -0
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.d.ts.map +1 -0
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.dev.js +64 -0
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.js +7 -0
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.mjs +4 -0
- package/MetricRegistry/dist/effect-MetricRegistry.cjs.prod.js +64 -0
- package/MetricRegistry/dist/effect-MetricRegistry.esm.js +28 -0
- package/MetricRegistry/package.json +4 -0
- package/MetricState/dist/effect-MetricState.cjs.d.mts +2 -0
- package/MetricState/dist/effect-MetricState.cjs.d.mts.map +1 -0
- package/MetricState/dist/effect-MetricState.cjs.d.ts +2 -0
- package/MetricState/dist/effect-MetricState.cjs.d.ts.map +1 -0
- package/MetricState/dist/effect-MetricState.cjs.dev.js +178 -0
- package/MetricState/dist/effect-MetricState.cjs.js +7 -0
- package/MetricState/dist/effect-MetricState.cjs.mjs +19 -0
- package/MetricState/dist/effect-MetricState.cjs.prod.js +178 -0
- package/MetricState/dist/effect-MetricState.esm.js +151 -0
- package/MetricState/package.json +4 -0
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.d.mts +2 -0
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.d.mts.map +1 -0
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.d.ts +2 -0
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.d.ts.map +1 -0
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.dev.js +153 -0
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.js +7 -0
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.mjs +12 -0
- package/MutableHashMap/dist/effect-MutableHashMap.cjs.prod.js +153 -0
- package/MutableHashMap/dist/effect-MutableHashMap.esm.js +128 -0
- package/MutableHashMap/package.json +4 -0
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.d.mts +2 -0
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.d.mts.map +1 -0
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.d.ts +2 -0
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.d.ts.map +1 -0
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.dev.js +115 -0
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.js +7 -0
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.mjs +9 -0
- package/MutableHashSet/dist/effect-MutableHashSet.cjs.prod.js +115 -0
- package/MutableHashSet/dist/effect-MutableHashSet.esm.js +90 -0
- package/MutableHashSet/package.json +4 -0
- package/MutableList/dist/effect-MutableList.cjs.d.mts +2 -0
- package/MutableList/dist/effect-MutableList.cjs.d.mts.map +1 -0
- package/MutableList/dist/effect-MutableList.cjs.d.ts +2 -0
- package/MutableList/dist/effect-MutableList.cjs.d.ts.map +1 -0
- package/MutableList/dist/effect-MutableList.cjs.dev.js +280 -0
- package/MutableList/dist/effect-MutableList.cjs.js +7 -0
- package/MutableList/dist/effect-MutableList.cjs.mjs +15 -0
- package/MutableList/dist/effect-MutableList.cjs.prod.js +280 -0
- package/MutableList/dist/effect-MutableList.esm.js +264 -0
- package/MutableList/package.json +4 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.d.mts +2 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.d.mts.map +1 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.d.ts +2 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.d.ts.map +1 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.dev.js +216 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.js +7 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.mjs +13 -0
- package/MutableQueue/dist/effect-MutableQueue.cjs.prod.js +216 -0
- package/MutableQueue/dist/effect-MutableQueue.esm.js +187 -0
- package/MutableQueue/package.json +4 -0
- package/MutableRef/dist/effect-MutableRef.cjs.d.mts +2 -0
- package/MutableRef/dist/effect-MutableRef.cjs.d.mts.map +1 -0
- package/MutableRef/dist/effect-MutableRef.cjs.d.ts +2 -0
- package/MutableRef/dist/effect-MutableRef.cjs.d.ts.map +1 -0
- package/MutableRef/dist/effect-MutableRef.cjs.dev.js +179 -0
- package/MutableRef/dist/effect-MutableRef.cjs.js +7 -0
- package/MutableRef/dist/effect-MutableRef.cjs.mjs +18 -0
- package/MutableRef/dist/effect-MutableRef.cjs.prod.js +179 -0
- package/MutableRef/dist/effect-MutableRef.esm.js +156 -0
- package/MutableRef/package.json +4 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.d.mts +2 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.d.mts.map +1 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.d.ts +2 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.d.ts.map +1 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.dev.js +32 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.js +7 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.mjs +3 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.cjs.prod.js +32 -0
- package/NonEmptyIterable/dist/effect-NonEmptyIterable.esm.js +28 -0
- package/NonEmptyIterable/package.json +4 -0
- package/Number/dist/effect-Number.cjs.d.mts +2 -0
- package/Number/dist/effect-Number.cjs.d.mts.map +1 -0
- package/Number/dist/effect-Number.cjs.d.ts +2 -0
- package/Number/dist/effect-Number.cjs.d.ts.map +1 -0
- package/Number/dist/effect-Number.cjs.dev.js +422 -0
- package/Number/dist/effect-Number.cjs.js +7 -0
- package/Number/dist/effect-Number.cjs.mjs +24 -0
- package/Number/dist/effect-Number.cjs.prod.js +422 -0
- package/Number/dist/effect-Number.esm.js +390 -0
- package/Number/package.json +4 -0
- package/Option/dist/effect-Option.cjs.d.mts +2 -0
- package/Option/dist/effect-Option.cjs.d.mts.map +1 -0
- package/Option/dist/effect-Option.cjs.d.ts +2 -0
- package/Option/dist/effect-Option.cjs.d.ts.map +1 -0
- package/Option/dist/effect-Option.cjs.dev.js +1054 -0
- package/Option/dist/effect-Option.cjs.js +7 -0
- package/Option/dist/effect-Option.cjs.mjs +57 -0
- package/Option/dist/effect-Option.cjs.prod.js +1054 -0
- package/Option/dist/effect-Option.esm.js +990 -0
- package/Option/package.json +4 -0
- package/Order/dist/effect-Order.cjs.d.mts +2 -0
- package/Order/dist/effect-Order.cjs.d.mts.map +1 -0
- package/Order/dist/effect-Order.cjs.d.ts +2 -0
- package/Order/dist/effect-Order.cjs.d.ts.map +1 -0
- package/Order/dist/effect-Order.cjs.dev.js +292 -0
- package/Order/dist/effect-Order.cjs.js +7 -0
- package/Order/dist/effect-Order.cjs.mjs +28 -0
- package/Order/dist/effect-Order.cjs.prod.js +292 -0
- package/Order/dist/effect-Order.esm.js +263 -0
- package/Order/package.json +4 -0
- package/Ordering/dist/effect-Ordering.cjs.d.mts +2 -0
- package/Ordering/dist/effect-Ordering.cjs.d.mts.map +1 -0
- package/Ordering/dist/effect-Ordering.cjs.d.ts +2 -0
- package/Ordering/dist/effect-Ordering.cjs.d.ts.map +1 -0
- package/Ordering/dist/effect-Ordering.cjs.dev.js +96 -0
- package/Ordering/dist/effect-Ordering.cjs.js +7 -0
- package/Ordering/dist/effect-Ordering.cjs.mjs +7 -0
- package/Ordering/dist/effect-Ordering.cjs.prod.js +96 -0
- package/Ordering/dist/effect-Ordering.esm.js +88 -0
- package/Ordering/package.json +4 -0
- package/Pipeable/dist/effect-Pipeable.cjs.d.mts +2 -0
- package/Pipeable/dist/effect-Pipeable.cjs.d.mts.map +1 -0
- package/Pipeable/dist/effect-Pipeable.cjs.d.ts +2 -0
- package/Pipeable/dist/effect-Pipeable.cjs.d.ts.map +1 -0
- package/Pipeable/dist/effect-Pipeable.cjs.dev.js +48 -0
- package/Pipeable/dist/effect-Pipeable.cjs.js +7 -0
- package/Pipeable/dist/effect-Pipeable.cjs.mjs +3 -0
- package/Pipeable/dist/effect-Pipeable.cjs.prod.js +48 -0
- package/Pipeable/dist/effect-Pipeable.esm.js +44 -0
- package/Pipeable/package.json +4 -0
- package/Pool/dist/effect-Pool.cjs.d.mts +2 -0
- package/Pool/dist/effect-Pool.cjs.d.mts.map +1 -0
- package/Pool/dist/effect-Pool.cjs.d.ts +2 -0
- package/Pool/dist/effect-Pool.cjs.d.ts.map +1 -0
- package/Pool/dist/effect-Pool.cjs.dev.js +186 -0
- package/Pool/dist/effect-Pool.cjs.js +7 -0
- package/Pool/dist/effect-Pool.cjs.mjs +8 -0
- package/Pool/dist/effect-Pool.cjs.prod.js +186 -0
- package/Pool/dist/effect-Pool.esm.js +104 -0
- package/Pool/package.json +4 -0
- package/Predicate/dist/effect-Predicate.cjs.d.mts +2 -0
- package/Predicate/dist/effect-Predicate.cjs.d.mts.map +1 -0
- package/Predicate/dist/effect-Predicate.cjs.d.ts +2 -0
- package/Predicate/dist/effect-Predicate.cjs.d.ts.map +1 -0
- package/Predicate/dist/effect-Predicate.cjs.dev.js +676 -0
- package/Predicate/dist/effect-Predicate.cjs.js +7 -0
- package/Predicate/dist/effect-Predicate.cjs.mjs +41 -0
- package/Predicate/dist/effect-Predicate.cjs.prod.js +676 -0
- package/Predicate/dist/effect-Predicate.esm.js +634 -0
- package/Predicate/package.json +4 -0
- package/PubSub/dist/effect-PubSub.cjs.d.mts +2 -0
- package/PubSub/dist/effect-PubSub.cjs.d.mts.map +1 -0
- package/PubSub/dist/effect-PubSub.cjs.d.ts +2 -0
- package/PubSub/dist/effect-PubSub.cjs.d.ts.map +1 -0
- package/PubSub/dist/effect-PubSub.cjs.dev.js +1326 -0
- package/PubSub/dist/effect-PubSub.cjs.js +7 -0
- package/PubSub/dist/effect-PubSub.cjs.mjs +16 -0
- package/PubSub/dist/effect-PubSub.cjs.prod.js +1326 -0
- package/PubSub/dist/effect-PubSub.esm.js +148 -0
- package/PubSub/package.json +4 -0
- package/Queue/dist/effect-Queue.cjs.d.mts +2 -0
- package/Queue/dist/effect-Queue.cjs.d.mts.map +1 -0
- package/Queue/dist/effect-Queue.cjs.d.ts +2 -0
- package/Queue/dist/effect-Queue.cjs.d.ts.map +1 -0
- package/Queue/dist/effect-Queue.cjs.dev.js +433 -0
- package/Queue/dist/effect-Queue.cjs.js +7 -0
- package/Queue/dist/effect-Queue.cjs.mjs +32 -0
- package/Queue/dist/effect-Queue.cjs.prod.js +433 -0
- package/Queue/dist/effect-Queue.esm.js +328 -0
- package/Queue/package.json +4 -0
- package/README.md +48 -14
- package/Random/dist/effect-Random.cjs.d.mts +2 -0
- package/Random/dist/effect-Random.cjs.d.mts.map +1 -0
- package/Random/dist/effect-Random.cjs.d.ts +2 -0
- package/Random/dist/effect-Random.cjs.d.ts.map +1 -0
- package/Random/dist/effect-Random.cjs.dev.js +133 -0
- package/Random/dist/effect-Random.cjs.js +7 -0
- package/Random/dist/effect-Random.cjs.mjs +10 -0
- package/Random/dist/effect-Random.cjs.prod.js +133 -0
- package/Random/dist/effect-Random.esm.js +83 -0
- package/Random/package.json +4 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.d.mts +2 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.d.mts.map +1 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.d.ts +2 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.d.ts.map +1 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.dev.js +1592 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.js +7 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.mjs +137 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.cjs.prod.js +1592 -0
- package/ReadonlyArray/dist/effect-ReadonlyArray.esm.js +1445 -0
- package/ReadonlyArray/package.json +4 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.d.mts +2 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.d.mts.map +1 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.d.ts +2 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.d.ts.map +1 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.dev.js +798 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.js +7 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.mjs +37 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.cjs.prod.js +798 -0
- package/ReadonlyRecord/dist/effect-ReadonlyRecord.esm.js +749 -0
- package/ReadonlyRecord/package.json +4 -0
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.d.mts +2 -0
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.d.mts.map +1 -0
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.d.ts +2 -0
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.d.ts.map +1 -0
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.dev.js +1642 -0
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.js +7 -0
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.mjs +37 -0
- package/RedBlackTree/dist/effect-RedBlackTree.cjs.prod.js +1642 -0
- package/RedBlackTree/dist/effect-RedBlackTree.esm.js +314 -0
- package/RedBlackTree/package.json +4 -0
- package/Ref/dist/effect-Ref.cjs.d.mts +2 -0
- package/Ref/dist/effect-Ref.cjs.d.mts.map +1 -0
- package/Ref/dist/effect-Ref.cjs.d.ts +2 -0
- package/Ref/dist/effect-Ref.cjs.d.ts.map +1 -0
- package/Ref/dist/effect-Ref.cjs.dev.js +54 -0
- package/Ref/dist/effect-Ref.cjs.js +7 -0
- package/Ref/dist/effect-Ref.cjs.mjs +17 -0
- package/Ref/dist/effect-Ref.cjs.prod.js +54 -0
- package/Ref/dist/effect-Ref.esm.js +111 -0
- package/Ref/package.json +4 -0
- package/Reloadable/dist/effect-Reloadable.cjs.d.mts +2 -0
- package/Reloadable/dist/effect-Reloadable.cjs.d.mts.map +1 -0
- package/Reloadable/dist/effect-Reloadable.cjs.d.ts +2 -0
- package/Reloadable/dist/effect-Reloadable.cjs.d.ts.map +1 -0
- package/Reloadable/dist/effect-Reloadable.cjs.dev.js +232 -0
- package/Reloadable/dist/effect-Reloadable.cjs.js +7 -0
- package/Reloadable/dist/effect-Reloadable.cjs.mjs +10 -0
- package/Reloadable/dist/effect-Reloadable.cjs.prod.js +232 -0
- package/Reloadable/dist/effect-Reloadable.esm.js +88 -0
- package/Reloadable/package.json +4 -0
- package/Request/dist/effect-Request.cjs.d.mts +2 -0
- package/Request/dist/effect-Request.cjs.d.mts.map +1 -0
- package/Request/dist/effect-Request.cjs.d.ts +2 -0
- package/Request/dist/effect-Request.cjs.d.ts.map +1 -0
- package/Request/dist/effect-Request.cjs.dev.js +244 -0
- package/Request/dist/effect-Request.cjs.js +7 -0
- package/Request/dist/effect-Request.cjs.mjs +15 -0
- package/Request/dist/effect-Request.cjs.prod.js +244 -0
- package/Request/dist/effect-Request.esm.js +160 -0
- package/Request/package.json +4 -0
- package/RequestBlock/dist/effect-RequestBlock.cjs.d.mts +2 -0
- package/RequestBlock/dist/effect-RequestBlock.cjs.d.mts.map +1 -0
- package/RequestBlock/dist/effect-RequestBlock.cjs.d.ts +2 -0
- package/RequestBlock/dist/effect-RequestBlock.cjs.d.ts.map +1 -0
- package/RequestBlock/dist/effect-RequestBlock.cjs.dev.js +199 -0
- package/RequestBlock/dist/effect-RequestBlock.cjs.js +7 -0
- package/RequestBlock/dist/effect-RequestBlock.cjs.mjs +10 -0
- package/RequestBlock/dist/effect-RequestBlock.cjs.prod.js +199 -0
- package/RequestBlock/dist/effect-RequestBlock.esm.js +103 -0
- package/RequestBlock/package.json +4 -0
- package/RequestResolver/dist/effect-RequestResolver.cjs.d.mts +2 -0
- package/RequestResolver/dist/effect-RequestResolver.cjs.d.mts.map +1 -0
- package/RequestResolver/dist/effect-RequestResolver.cjs.d.ts +2 -0
- package/RequestResolver/dist/effect-RequestResolver.cjs.d.ts.map +1 -0
- package/RequestResolver/dist/effect-RequestResolver.cjs.dev.js +296 -0
- package/RequestResolver/dist/effect-RequestResolver.cjs.js +7 -0
- package/RequestResolver/dist/effect-RequestResolver.cjs.mjs +20 -0
- package/RequestResolver/dist/effect-RequestResolver.cjs.prod.js +296 -0
- package/RequestResolver/dist/effect-RequestResolver.esm.js +191 -0
- package/RequestResolver/package.json +4 -0
- package/Resource/dist/effect-Resource.cjs.d.mts +2 -0
- package/Resource/dist/effect-Resource.cjs.d.mts.map +1 -0
- package/Resource/dist/effect-Resource.cjs.d.ts +2 -0
- package/Resource/dist/effect-Resource.cjs.d.ts.map +1 -0
- package/Resource/dist/effect-Resource.cjs.dev.js +183 -0
- package/Resource/dist/effect-Resource.cjs.js +7 -0
- package/Resource/dist/effect-Resource.cjs.mjs +7 -0
- package/Resource/dist/effect-Resource.cjs.prod.js +183 -0
- package/Resource/dist/effect-Resource.esm.js +70 -0
- package/Resource/package.json +4 -0
- package/Runtime/dist/effect-Runtime.cjs.d.mts +2 -0
- package/Runtime/dist/effect-Runtime.cjs.d.mts.map +1 -0
- package/Runtime/dist/effect-Runtime.cjs.d.ts +2 -0
- package/Runtime/dist/effect-Runtime.cjs.d.ts.map +1 -0
- package/Runtime/dist/effect-Runtime.cjs.dev.js +251 -0
- package/Runtime/dist/effect-Runtime.cjs.js +7 -0
- package/Runtime/dist/effect-Runtime.cjs.mjs +16 -0
- package/Runtime/dist/effect-Runtime.cjs.prod.js +251 -0
- package/Runtime/dist/effect-Runtime.esm.js +157 -0
- package/Runtime/package.json +4 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.d.mts +2 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.d.mts.map +1 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.d.ts +2 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.d.ts.map +1 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.dev.js +424 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.js +7 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.mjs +37 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.cjs.prod.js +424 -0
- package/RuntimeFlags/dist/effect-RuntimeFlags.esm.js +305 -0
- package/RuntimeFlags/package.json +4 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.d.mts +2 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.d.mts.map +1 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.d.ts +2 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.d.ts.map +1 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.dev.js +50 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.js +7 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.mjs +19 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.cjs.prod.js +50 -0
- package/RuntimeFlagsPatch/dist/effect-RuntimeFlagsPatch.esm.js +158 -0
- package/RuntimeFlagsPatch/package.json +4 -0
- package/STM/dist/effect-STM.cjs.d.mts +2 -0
- package/STM/dist/effect-STM.cjs.d.mts.map +1 -0
- package/STM/dist/effect-STM.cjs.d.ts +2 -0
- package/STM/dist/effect-STM.cjs.d.ts.map +1 -0
- package/STM/dist/effect-STM.cjs.dev.js +1427 -0
- package/STM/dist/effect-STM.cjs.js +7 -0
- package/STM/dist/effect-STM.cjs.mjs +126 -0
- package/STM/dist/effect-STM.cjs.prod.js +1427 -0
- package/STM/dist/effect-STM.esm.js +1193 -0
- package/STM/package.json +4 -0
- package/Schedule/dist/effect-Schedule.cjs.d.mts +2 -0
- package/Schedule/dist/effect-Schedule.cjs.d.mts.map +1 -0
- package/Schedule/dist/effect-Schedule.cjs.d.ts +2 -0
- package/Schedule/dist/effect-Schedule.cjs.d.ts.map +1 -0
- package/Schedule/dist/effect-Schedule.cjs.dev.js +1113 -0
- package/Schedule/dist/effect-Schedule.cjs.js +7 -0
- package/Schedule/dist/effect-Schedule.cjs.mjs +100 -0
- package/Schedule/dist/effect-Schedule.cjs.prod.js +1113 -0
- package/Schedule/dist/effect-Schedule.esm.js +957 -0
- package/Schedule/package.json +4 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.d.mts +2 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.d.mts.map +1 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.d.ts +2 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.d.ts.map +1 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.dev.js +118 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.js +7 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.mjs +7 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.cjs.prod.js +118 -0
- package/ScheduleDecision/dist/effect-ScheduleDecision.esm.js +48 -0
- package/ScheduleDecision/package.json +4 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.d.mts +2 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.d.mts.map +1 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.d.ts +2 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.d.ts.map +1 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.dev.js +240 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.js +7 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.mjs +15 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.cjs.prod.js +240 -0
- package/ScheduleInterval/dist/effect-ScheduleInterval.esm.js +130 -0
- package/ScheduleInterval/package.json +4 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.d.mts +2 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.d.mts.map +1 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.d.ts +2 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.d.ts.map +1 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.dev.js +268 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.js +7 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.mjs +13 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.cjs.prod.js +268 -0
- package/ScheduleIntervals/dist/effect-ScheduleIntervals.esm.js +105 -0
- package/ScheduleIntervals/package.json +4 -0
- package/Scheduler/dist/effect-Scheduler.cjs.d.mts +2 -0
- package/Scheduler/dist/effect-Scheduler.cjs.d.mts.map +1 -0
- package/Scheduler/dist/effect-Scheduler.cjs.d.ts +2 -0
- package/Scheduler/dist/effect-Scheduler.cjs.d.ts.map +1 -0
- package/Scheduler/dist/effect-Scheduler.cjs.dev.js +370 -0
- package/Scheduler/dist/effect-Scheduler.cjs.js +7 -0
- package/Scheduler/dist/effect-Scheduler.cjs.mjs +15 -0
- package/Scheduler/dist/effect-Scheduler.cjs.prod.js +370 -0
- package/Scheduler/dist/effect-Scheduler.esm.js +326 -0
- package/Scheduler/package.json +4 -0
- package/Scope/dist/effect-Scope.cjs.d.mts +2 -0
- package/Scope/dist/effect-Scope.cjs.d.mts.map +1 -0
- package/Scope/dist/effect-Scope.cjs.d.ts +2 -0
- package/Scope/dist/effect-Scope.cjs.d.ts.map +1 -0
- package/Scope/dist/effect-Scope.cjs.dev.js +198 -0
- package/Scope/dist/effect-Scope.cjs.js +7 -0
- package/Scope/dist/effect-Scope.cjs.mjs +12 -0
- package/Scope/dist/effect-Scope.cjs.prod.js +198 -0
- package/Scope/dist/effect-Scope.esm.js +117 -0
- package/Scope/package.json +4 -0
- package/ScopedCache/dist/effect-ScopedCache.cjs.d.mts +2 -0
- package/ScopedCache/dist/effect-ScopedCache.cjs.d.mts.map +1 -0
- package/ScopedCache/dist/effect-ScopedCache.cjs.d.ts +2 -0
- package/ScopedCache/dist/effect-ScopedCache.cjs.d.ts.map +1 -0
- package/ScopedCache/dist/effect-ScopedCache.cjs.dev.js +533 -0
- package/ScopedCache/dist/effect-ScopedCache.cjs.js +7 -0
- package/ScopedCache/dist/effect-ScopedCache.cjs.mjs +5 -0
- package/ScopedCache/dist/effect-ScopedCache.cjs.prod.js +533 -0
- package/ScopedCache/dist/effect-ScopedCache.esm.js +52 -0
- package/ScopedCache/package.json +4 -0
- package/ScopedRef/dist/effect-ScopedRef.cjs.d.mts +2 -0
- package/ScopedRef/dist/effect-ScopedRef.cjs.d.mts.map +1 -0
- package/ScopedRef/dist/effect-ScopedRef.cjs.d.ts +2 -0
- package/ScopedRef/dist/effect-ScopedRef.cjs.d.ts.map +1 -0
- package/ScopedRef/dist/effect-ScopedRef.cjs.dev.js +156 -0
- package/ScopedRef/dist/effect-ScopedRef.cjs.js +7 -0
- package/ScopedRef/dist/effect-ScopedRef.cjs.mjs +7 -0
- package/ScopedRef/dist/effect-ScopedRef.cjs.prod.js +156 -0
- package/ScopedRef/dist/effect-ScopedRef.esm.js +71 -0
- package/ScopedRef/package.json +4 -0
- package/Sink/dist/effect-Sink.cjs.d.mts +2 -0
- package/Sink/dist/effect-Sink.cjs.d.mts.map +1 -0
- package/Sink/dist/effect-Sink.cjs.d.ts +2 -0
- package/Sink/dist/effect-Sink.cjs.d.ts.map +1 -0
- package/Sink/dist/effect-Sink.cjs.dev.js +1205 -0
- package/Sink/dist/effect-Sink.cjs.js +7 -0
- package/Sink/dist/effect-Sink.cjs.mjs +108 -0
- package/Sink/dist/effect-Sink.cjs.prod.js +1205 -0
- package/Sink/dist/effect-Sink.esm.js +997 -0
- package/Sink/package.json +4 -0
- package/SortedMap/dist/effect-SortedMap.cjs.d.mts +2 -0
- package/SortedMap/dist/effect-SortedMap.cjs.d.mts.map +1 -0
- package/SortedMap/dist/effect-SortedMap.cjs.d.ts +2 -0
- package/SortedMap/dist/effect-SortedMap.cjs.d.ts.map +1 -0
- package/SortedMap/dist/effect-SortedMap.cjs.dev.js +202 -0
- package/SortedMap/dist/effect-SortedMap.cjs.js +7 -0
- package/SortedMap/dist/effect-SortedMap.cjs.mjs +20 -0
- package/SortedMap/dist/effect-SortedMap.cjs.prod.js +202 -0
- package/SortedMap/dist/effect-SortedMap.esm.js +168 -0
- package/SortedMap/package.json +4 -0
- package/SortedSet/dist/effect-SortedSet.cjs.d.mts +2 -0
- package/SortedSet/dist/effect-SortedSet.cjs.d.mts.map +1 -0
- package/SortedSet/dist/effect-SortedSet.cjs.d.ts +2 -0
- package/SortedSet/dist/effect-SortedSet.cjs.d.ts.map +1 -0
- package/SortedSet/dist/effect-SortedSet.cjs.dev.js +301 -0
- package/SortedSet/dist/effect-SortedSet.cjs.js +7 -0
- package/SortedSet/dist/effect-SortedSet.cjs.mjs +23 -0
- package/SortedSet/dist/effect-SortedSet.cjs.prod.js +301 -0
- package/SortedSet/dist/effect-SortedSet.esm.js +263 -0
- package/SortedSet/package.json +4 -0
- package/Stream/dist/effect-Stream.cjs.d.mts +2 -0
- package/Stream/dist/effect-Stream.cjs.d.mts.map +1 -0
- package/Stream/dist/effect-Stream.cjs.d.ts +2 -0
- package/Stream/dist/effect-Stream.cjs.d.ts.map +1 -0
- package/Stream/dist/effect-Stream.cjs.dev.js +3279 -0
- package/Stream/dist/effect-Stream.cjs.js +7 -0
- package/Stream/dist/effect-Stream.cjs.mjs +294 -0
- package/Stream/dist/effect-Stream.cjs.prod.js +3279 -0
- package/Stream/dist/effect-Stream.esm.js +2879 -0
- package/Stream/package.json +4 -0
- package/StreamEmit/dist/effect-StreamEmit.cjs.d.mts +2 -0
- package/StreamEmit/dist/effect-StreamEmit.cjs.d.mts.map +1 -0
- package/StreamEmit/dist/effect-StreamEmit.cjs.d.ts +2 -0
- package/StreamEmit/dist/effect-StreamEmit.cjs.d.ts.map +1 -0
- package/StreamEmit/dist/effect-StreamEmit.cjs.dev.js +2 -0
- package/StreamEmit/dist/effect-StreamEmit.cjs.js +7 -0
- package/StreamEmit/dist/effect-StreamEmit.cjs.mjs +1 -0
- package/StreamEmit/dist/effect-StreamEmit.cjs.prod.js +2 -0
- package/StreamEmit/dist/effect-StreamEmit.esm.js +1 -0
- package/StreamEmit/package.json +4 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.d.mts +2 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.d.mts.map +1 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.d.ts +2 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.d.ts.map +1 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.dev.js +19 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.js +7 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.mjs +12 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.cjs.prod.js +19 -0
- package/StreamHaltStrategy/dist/effect-StreamHaltStrategy.esm.js +97 -0
- package/StreamHaltStrategy/package.json +4 -0
- package/Streamable/dist/effect-Streamable.cjs.d.mts +2 -0
- package/Streamable/dist/effect-Streamable.cjs.d.mts.map +1 -0
- package/Streamable/dist/effect-Streamable.cjs.d.ts +2 -0
- package/Streamable/dist/effect-Streamable.cjs.d.ts.map +1 -0
- package/Streamable/dist/effect-Streamable.cjs.dev.js +152 -0
- package/Streamable/dist/effect-Streamable.cjs.js +7 -0
- package/Streamable/dist/effect-Streamable.cjs.mjs +3 -0
- package/Streamable/dist/effect-Streamable.cjs.prod.js +152 -0
- package/Streamable/dist/effect-Streamable.esm.js +42 -0
- package/Streamable/package.json +4 -0
- package/String/dist/effect-String.cjs.d.mts +2 -0
- package/String/dist/effect-String.cjs.d.mts.map +1 -0
- package/String/dist/effect-String.cjs.d.ts +2 -0
- package/String/dist/effect-String.cjs.d.ts.map +1 -0
- package/String/dist/effect-String.cjs.dev.js +656 -0
- package/String/dist/effect-String.cjs.js +7 -0
- package/String/dist/effect-String.cjs.mjs +46 -0
- package/String/dist/effect-String.cjs.prod.js +656 -0
- package/String/dist/effect-String.esm.js +600 -0
- package/String/package.json +4 -0
- package/Struct/dist/effect-Struct.cjs.d.mts +2 -0
- package/Struct/dist/effect-Struct.cjs.d.mts.map +1 -0
- package/Struct/dist/effect-Struct.cjs.d.ts +2 -0
- package/Struct/dist/effect-Struct.cjs.d.ts.map +1 -0
- package/Struct/dist/effect-Struct.cjs.dev.js +133 -0
- package/Struct/dist/effect-Struct.cjs.js +7 -0
- package/Struct/dist/effect-Struct.cjs.mjs +7 -0
- package/Struct/dist/effect-Struct.cjs.prod.js +133 -0
- package/Struct/dist/effect-Struct.esm.js +125 -0
- package/Struct/package.json +4 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.d.mts +2 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.d.mts.map +1 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.d.ts +2 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.d.ts.map +1 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.dev.js +343 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.js +7 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.mjs +24 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.cjs.prod.js +343 -0
- package/SubscriptionRef/dist/effect-SubscriptionRef.esm.js +160 -0
- package/SubscriptionRef/package.json +4 -0
- package/Supervisor/dist/effect-Supervisor.cjs.d.mts +2 -0
- package/Supervisor/dist/effect-Supervisor.cjs.d.mts.map +1 -0
- package/Supervisor/dist/effect-Supervisor.cjs.d.ts +2 -0
- package/Supervisor/dist/effect-Supervisor.cjs.d.ts.map +1 -0
- package/Supervisor/dist/effect-Supervisor.cjs.dev.js +239 -0
- package/Supervisor/dist/effect-Supervisor.cjs.js +7 -0
- package/Supervisor/dist/effect-Supervisor.cjs.mjs +10 -0
- package/Supervisor/dist/effect-Supervisor.cjs.prod.js +239 -0
- package/Supervisor/dist/effect-Supervisor.esm.js +148 -0
- package/Supervisor/package.json +4 -0
- package/Symbol/dist/effect-Symbol.cjs.d.mts +2 -0
- package/Symbol/dist/effect-Symbol.cjs.d.mts.map +1 -0
- package/Symbol/dist/effect-Symbol.cjs.d.ts +2 -0
- package/Symbol/dist/effect-Symbol.cjs.d.ts.map +1 -0
- package/Symbol/dist/effect-Symbol.cjs.dev.js +36 -0
- package/Symbol/dist/effect-Symbol.cjs.js +7 -0
- package/Symbol/dist/effect-Symbol.cjs.mjs +4 -0
- package/Symbol/dist/effect-Symbol.cjs.prod.js +36 -0
- package/Symbol/dist/effect-Symbol.esm.js +30 -0
- package/Symbol/package.json +4 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.d.mts +2 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.d.mts.map +1 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.d.ts +2 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.d.ts.map +1 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.dev.js +260 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.js +7 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.mjs +25 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.cjs.prod.js +260 -0
- package/SynchronizedRef/dist/effect-SynchronizedRef.esm.js +160 -0
- package/SynchronizedRef/package.json +4 -0
- package/TArray/dist/effect-TArray.cjs.d.mts +2 -0
- package/TArray/dist/effect-TArray.cjs.d.mts.map +1 -0
- package/TArray/dist/effect-TArray.cjs.d.ts +2 -0
- package/TArray/dist/effect-TArray.cjs.d.ts.map +1 -0
- package/TArray/dist/effect-TArray.cjs.dev.js +523 -0
- package/TArray/dist/effect-TArray.cjs.js +7 -0
- package/TArray/dist/effect-TArray.cjs.mjs +43 -0
- package/TArray/dist/effect-TArray.cjs.prod.js +523 -0
- package/TArray/dist/effect-TArray.esm.js +367 -0
- package/TArray/package.json +4 -0
- package/TDeferred/dist/effect-TDeferred.cjs.d.mts +2 -0
- package/TDeferred/dist/effect-TDeferred.cjs.d.mts.map +1 -0
- package/TDeferred/dist/effect-TDeferred.cjs.d.ts +2 -0
- package/TDeferred/dist/effect-TDeferred.cjs.d.ts.map +1 -0
- package/TDeferred/dist/effect-TDeferred.cjs.dev.js +225 -0
- package/TDeferred/dist/effect-TDeferred.cjs.js +7 -0
- package/TDeferred/dist/effect-TDeferred.cjs.mjs +9 -0
- package/TDeferred/dist/effect-TDeferred.cjs.prod.js +225 -0
- package/TDeferred/dist/effect-TDeferred.esm.js +63 -0
- package/TDeferred/package.json +4 -0
- package/TMap/dist/effect-TMap.cjs.d.mts +2 -0
- package/TMap/dist/effect-TMap.cjs.d.mts.map +1 -0
- package/TMap/dist/effect-TMap.cjs.d.ts +2 -0
- package/TMap/dist/effect-TMap.cjs.d.ts.map +1 -0
- package/TMap/dist/effect-TMap.cjs.dev.js +532 -0
- package/TMap/dist/effect-TMap.cjs.js +7 -0
- package/TMap/dist/effect-TMap.cjs.mjs +44 -0
- package/TMap/dist/effect-TMap.cjs.prod.js +532 -0
- package/TMap/dist/effect-TMap.esm.js +373 -0
- package/TMap/package.json +4 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.d.mts +2 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.d.mts.map +1 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.d.ts +2 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.d.ts.map +1 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.dev.js +465 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.js +7 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.mjs +21 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.cjs.prod.js +465 -0
- package/TPriorityQueue/dist/effect-TPriorityQueue.esm.js +184 -0
- package/TPriorityQueue/package.json +4 -0
- package/TPubSub/dist/effect-TPubSub.cjs.d.mts +2 -0
- package/TPubSub/dist/effect-TPubSub.cjs.d.mts.map +1 -0
- package/TPubSub/dist/effect-TPubSub.cjs.d.ts +2 -0
- package/TPubSub/dist/effect-TPubSub.cjs.d.ts.map +1 -0
- package/TPubSub/dist/effect-TPubSub.cjs.dev.js +657 -0
- package/TPubSub/dist/effect-TPubSub.cjs.js +7 -0
- package/TPubSub/dist/effect-TPubSub.cjs.mjs +17 -0
- package/TPubSub/dist/effect-TPubSub.cjs.prod.js +657 -0
- package/TPubSub/dist/effect-TPubSub.esm.js +157 -0
- package/TPubSub/package.json +4 -0
- package/TQueue/dist/effect-TQueue.cjs.d.mts +2 -0
- package/TQueue/dist/effect-TQueue.cjs.d.mts.map +1 -0
- package/TQueue/dist/effect-TQueue.cjs.d.ts +2 -0
- package/TQueue/dist/effect-TQueue.cjs.d.ts.map +1 -0
- package/TQueue/dist/effect-TQueue.cjs.dev.js +436 -0
- package/TQueue/dist/effect-TQueue.cjs.js +7 -0
- package/TQueue/dist/effect-TQueue.cjs.mjs +29 -0
- package/TQueue/dist/effect-TQueue.cjs.prod.js +436 -0
- package/TQueue/dist/effect-TQueue.esm.js +293 -0
- package/TQueue/package.json +4 -0
- package/TRandom/dist/effect-TRandom.cjs.d.mts +2 -0
- package/TRandom/dist/effect-TRandom.cjs.d.mts.map +1 -0
- package/TRandom/dist/effect-TRandom.cjs.d.ts +2 -0
- package/TRandom/dist/effect-TRandom.cjs.d.ts.map +1 -0
- package/TRandom/dist/effect-TRandom.cjs.dev.js +296 -0
- package/TRandom/dist/effect-TRandom.cjs.js +7 -0
- package/TRandom/dist/effect-TRandom.cjs.mjs +11 -0
- package/TRandom/dist/effect-TRandom.cjs.prod.js +296 -0
- package/TRandom/dist/effect-TRandom.esm.js +93 -0
- package/TRandom/package.json +4 -0
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.d.mts +2 -0
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.d.mts.map +1 -0
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.d.ts +2 -0
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.d.ts.map +1 -0
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.dev.js +537 -0
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.js +7 -0
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.mjs +21 -0
- package/TReentrantLock/dist/effect-TReentrantLock.cjs.prod.js +537 -0
- package/TReentrantLock/dist/effect-TReentrantLock.esm.js +199 -0
- package/TReentrantLock/package.json +4 -0
- package/TRef/dist/effect-TRef.cjs.d.mts +2 -0
- package/TRef/dist/effect-TRef.cjs.d.mts.map +1 -0
- package/TRef/dist/effect-TRef.cjs.d.ts +2 -0
- package/TRef/dist/effect-TRef.cjs.d.ts.map +1 -0
- package/TRef/dist/effect-TRef.cjs.dev.js +244 -0
- package/TRef/dist/effect-TRef.cjs.js +7 -0
- package/TRef/dist/effect-TRef.cjs.mjs +16 -0
- package/TRef/dist/effect-TRef.cjs.prod.js +244 -0
- package/TRef/dist/effect-TRef.esm.js +117 -0
- package/TRef/package.json +4 -0
- package/TSemaphore/dist/effect-TSemaphore.cjs.d.mts +2 -0
- package/TSemaphore/dist/effect-TSemaphore.cjs.d.mts.map +1 -0
- package/TSemaphore/dist/effect-TSemaphore.cjs.d.ts +2 -0
- package/TSemaphore/dist/effect-TSemaphore.cjs.d.ts.map +1 -0
- package/TSemaphore/dist/effect-TSemaphore.cjs.dev.js +289 -0
- package/TSemaphore/dist/effect-TSemaphore.cjs.js +7 -0
- package/TSemaphore/dist/effect-TSemaphore.cjs.mjs +14 -0
- package/TSemaphore/dist/effect-TSemaphore.cjs.prod.js +289 -0
- package/TSemaphore/dist/effect-TSemaphore.esm.js +97 -0
- package/TSemaphore/package.json +4 -0
- package/TSet/dist/effect-TSet.cjs.d.mts +2 -0
- package/TSet/dist/effect-TSet.cjs.d.mts.map +1 -0
- package/TSet/dist/effect-TSet.cjs.d.ts +2 -0
- package/TSet/dist/effect-TSet.cjs.d.ts.map +1 -0
- package/TSet/dist/effect-TSet.cjs.dev.js +521 -0
- package/TSet/dist/effect-TSet.cjs.js +7 -0
- package/TSet/dist/effect-TSet.cjs.mjs +32 -0
- package/TSet/dist/effect-TSet.cjs.prod.js +521 -0
- package/TSet/dist/effect-TSet.esm.js +268 -0
- package/TSet/package.json +4 -0
- package/Take/dist/effect-Take.cjs.d.mts +2 -0
- package/Take/dist/effect-Take.cjs.d.mts.map +1 -0
- package/Take/dist/effect-Take.cjs.d.ts +2 -0
- package/Take/dist/effect-Take.cjs.d.ts.map +1 -0
- package/Take/dist/effect-Take.cjs.dev.js +300 -0
- package/Take/dist/effect-Take.cjs.js +7 -0
- package/Take/dist/effect-Take.cjs.mjs +22 -0
- package/Take/dist/effect-Take.cjs.prod.js +300 -0
- package/Take/dist/effect-Take.esm.js +190 -0
- package/Take/package.json +4 -0
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.d.mts +2 -0
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.d.mts.map +1 -0
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.d.ts +2 -0
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.d.ts.map +1 -0
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.dev.js +140 -0
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.js +7 -0
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.mjs +11 -0
- package/TestAnnotation/dist/effect-TestAnnotation.cjs.prod.js +140 -0
- package/TestAnnotation/dist/effect-TestAnnotation.esm.js +111 -0
- package/TestAnnotation/package.json +4 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.d.mts +2 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.d.mts.map +1 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.d.ts +2 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.d.ts.map +1 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.dev.js +113 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.js +7 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.mjs +11 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.cjs.prod.js +113 -0
- package/TestAnnotationMap/dist/effect-TestAnnotationMap.esm.js +101 -0
- package/TestAnnotationMap/package.json +4 -0
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.d.mts +2 -0
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.d.mts.map +1 -0
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.d.ts +2 -0
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.d.ts.map +1 -0
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.dev.js +136 -0
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.js +7 -0
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.mjs +6 -0
- package/TestAnnotations/dist/effect-TestAnnotations.cjs.prod.js +136 -0
- package/TestAnnotations/dist/effect-TestAnnotations.esm.js +83 -0
- package/TestAnnotations/package.json +4 -0
- package/TestClock/dist/effect-TestClock.cjs.d.mts +2 -0
- package/TestClock/dist/effect-TestClock.cjs.d.mts.map +1 -0
- package/TestClock/dist/effect-TestClock.cjs.d.ts +2 -0
- package/TestClock/dist/effect-TestClock.cjs.d.ts.map +1 -0
- package/TestClock/dist/effect-TestClock.cjs.dev.js +630 -0
- package/TestClock/dist/effect-TestClock.cjs.js +7 -0
- package/TestClock/dist/effect-TestClock.cjs.mjs +16 -0
- package/TestClock/dist/effect-TestClock.cjs.prod.js +630 -0
- package/TestClock/dist/effect-TestClock.esm.js +411 -0
- package/TestClock/package.json +4 -0
- package/TestConfig/dist/effect-TestConfig.cjs.d.mts +2 -0
- package/TestConfig/dist/effect-TestConfig.cjs.d.mts.map +1 -0
- package/TestConfig/dist/effect-TestConfig.cjs.d.ts +2 -0
- package/TestConfig/dist/effect-TestConfig.cjs.d.ts.map +1 -0
- package/TestConfig/dist/effect-TestConfig.cjs.dev.js +43 -0
- package/TestConfig/dist/effect-TestConfig.cjs.js +7 -0
- package/TestConfig/dist/effect-TestConfig.cjs.mjs +4 -0
- package/TestConfig/dist/effect-TestConfig.cjs.prod.js +43 -0
- package/TestConfig/dist/effect-TestConfig.esm.js +27 -0
- package/TestConfig/package.json +4 -0
- package/TestContext/dist/effect-TestContext.cjs.d.mts +2 -0
- package/TestContext/dist/effect-TestContext.cjs.d.mts.map +1 -0
- package/TestContext/dist/effect-TestContext.cjs.d.ts +2 -0
- package/TestContext/dist/effect-TestContext.cjs.d.ts.map +1 -0
- package/TestContext/dist/effect-TestContext.cjs.dev.js +125 -0
- package/TestContext/dist/effect-TestContext.cjs.js +7 -0
- package/TestContext/dist/effect-TestContext.cjs.mjs +5 -0
- package/TestContext/dist/effect-TestContext.cjs.prod.js +125 -0
- package/TestContext/dist/effect-TestContext.esm.js +29 -0
- package/TestContext/package.json +4 -0
- package/TestLive/dist/effect-TestLive.cjs.d.mts +2 -0
- package/TestLive/dist/effect-TestLive.cjs.d.mts.map +1 -0
- package/TestLive/dist/effect-TestLive.cjs.d.ts +2 -0
- package/TestLive/dist/effect-TestLive.cjs.d.ts.map +1 -0
- package/TestLive/dist/effect-TestLive.cjs.dev.js +92 -0
- package/TestLive/dist/effect-TestLive.cjs.js +7 -0
- package/TestLive/dist/effect-TestLive.cjs.mjs +5 -0
- package/TestLive/dist/effect-TestLive.cjs.prod.js +92 -0
- package/TestLive/dist/effect-TestLive.esm.js +48 -0
- package/TestLive/package.json +4 -0
- package/TestServices/dist/effect-TestServices.cjs.d.mts +2 -0
- package/TestServices/dist/effect-TestServices.cjs.d.mts.map +1 -0
- package/TestServices/dist/effect-TestServices.cjs.d.ts +2 -0
- package/TestServices/dist/effect-TestServices.cjs.d.ts.map +1 -0
- package/TestServices/dist/effect-TestServices.cjs.dev.js +385 -0
- package/TestServices/dist/effect-TestServices.cjs.js +7 -0
- package/TestServices/dist/effect-TestServices.cjs.mjs +35 -0
- package/TestServices/dist/effect-TestServices.cjs.prod.js +385 -0
- package/TestServices/dist/effect-TestServices.esm.js +269 -0
- package/TestServices/package.json +4 -0
- package/TestSized/dist/effect-TestSized.cjs.d.mts +2 -0
- package/TestSized/dist/effect-TestSized.cjs.d.mts.map +1 -0
- package/TestSized/dist/effect-TestSized.cjs.d.ts +2 -0
- package/TestSized/dist/effect-TestSized.cjs.d.ts.map +1 -0
- package/TestSized/dist/effect-TestSized.cjs.dev.js +86 -0
- package/TestSized/dist/effect-TestSized.cjs.js +7 -0
- package/TestSized/dist/effect-TestSized.cjs.mjs +6 -0
- package/TestSized/dist/effect-TestSized.cjs.prod.js +86 -0
- package/TestSized/dist/effect-TestSized.esm.js +50 -0
- package/TestSized/package.json +4 -0
- package/Tracer/dist/effect-Tracer.cjs.d.mts +2 -0
- package/Tracer/dist/effect-Tracer.cjs.d.mts.map +1 -0
- package/Tracer/dist/effect-Tracer.cjs.d.ts +2 -0
- package/Tracer/dist/effect-Tracer.cjs.d.ts.map +1 -0
- package/Tracer/dist/effect-Tracer.cjs.dev.js +123 -0
- package/Tracer/dist/effect-Tracer.cjs.js +7 -0
- package/Tracer/dist/effect-Tracer.cjs.mjs +8 -0
- package/Tracer/dist/effect-Tracer.cjs.prod.js +123 -0
- package/Tracer/dist/effect-Tracer.esm.js +75 -0
- package/Tracer/package.json +4 -0
- package/Tuple/dist/effect-Tuple.cjs.d.mts +2 -0
- package/Tuple/dist/effect-Tuple.cjs.d.mts.map +1 -0
- package/Tuple/dist/effect-Tuple.cjs.d.ts +2 -0
- package/Tuple/dist/effect-Tuple.cjs.d.ts.map +1 -0
- package/Tuple/dist/effect-Tuple.cjs.dev.js +186 -0
- package/Tuple/dist/effect-Tuple.cjs.js +7 -0
- package/Tuple/dist/effect-Tuple.cjs.mjs +12 -0
- package/Tuple/dist/effect-Tuple.cjs.prod.js +186 -0
- package/Tuple/dist/effect-Tuple.esm.js +173 -0
- package/Tuple/package.json +4 -0
- package/Types/dist/effect-Types.cjs.d.mts +2 -0
- package/Types/dist/effect-Types.cjs.d.mts.map +1 -0
- package/Types/dist/effect-Types.cjs.d.ts +2 -0
- package/Types/dist/effect-Types.cjs.d.ts.map +1 -0
- package/Types/dist/effect-Types.cjs.dev.js +2 -0
- package/Types/dist/effect-Types.cjs.js +7 -0
- package/Types/dist/effect-Types.cjs.mjs +1 -0
- package/Types/dist/effect-Types.cjs.prod.js +2 -0
- package/Types/dist/effect-Types.esm.js +1 -0
- package/Types/package.json +4 -0
- package/Unify/dist/effect-Unify.cjs.d.mts +2 -0
- package/Unify/dist/effect-Unify.cjs.d.mts.map +1 -0
- package/Unify/dist/effect-Unify.cjs.d.ts +2 -0
- package/Unify/dist/effect-Unify.cjs.d.ts.map +1 -0
- package/Unify/dist/effect-Unify.cjs.dev.js +44 -0
- package/Unify/dist/effect-Unify.cjs.js +7 -0
- package/Unify/dist/effect-Unify.cjs.mjs +3 -0
- package/Unify/dist/effect-Unify.cjs.prod.js +44 -0
- package/Unify/dist/effect-Unify.esm.js +40 -0
- package/Unify/package.json +4 -0
- package/Utils/dist/effect-Utils.cjs.d.mts +2 -0
- package/Utils/dist/effect-Utils.cjs.d.mts.map +1 -0
- package/Utils/dist/effect-Utils.cjs.d.ts +2 -0
- package/Utils/dist/effect-Utils.cjs.d.ts.map +1 -0
- package/Utils/dist/effect-Utils.cjs.dev.js +361 -0
- package/Utils/dist/effect-Utils.cjs.js +7 -0
- package/Utils/dist/effect-Utils.cjs.mjs +8 -0
- package/Utils/dist/effect-Utils.cjs.prod.js +361 -0
- package/Utils/dist/effect-Utils.esm.js +352 -0
- package/Utils/package.json +4 -0
- package/dist/Context-607e9b4c.cjs.dev.js +222 -0
- package/dist/Context-c91d8ca0.cjs.prod.js +222 -0
- package/dist/Effectable-6a8a05f1.cjs.prod.js +234 -0
- package/dist/Effectable-71c10ab9.cjs.dev.js +234 -0
- package/dist/Either-a3f96c60.cjs.prod.js +105 -0
- package/dist/Either-e7500e90.cjs.dev.js +105 -0
- package/dist/ExecutionStrategy-4808fe5d.cjs.prod.js +168 -0
- package/dist/ExecutionStrategy-7d9d457b.cjs.dev.js +168 -0
- package/dist/FiberId-0f0b7779.cjs.prod.js +421 -0
- package/dist/FiberId-6595cf4c.cjs.dev.js +421 -0
- package/dist/HashSet-251c8294.cjs.prod.js +965 -0
- package/dist/HashSet-c12c037b.cjs.dev.js +965 -0
- package/dist/Option-01caa9d4.cjs.dev.js +81 -0
- package/dist/Option-dd52e82a.cjs.prod.js +81 -0
- package/dist/ReadonlyArray-9a1474f6.cjs.dev.js +10 -0
- package/dist/ReadonlyArray-f9ed7a05.cjs.prod.js +10 -0
- package/dist/Ref-00103de4.cjs.prod.js +262 -0
- package/dist/Ref-f990026b.cjs.dev.js +262 -0
- package/dist/RuntimeFlagsPatch-3890e860.cjs.prod.js +389 -0
- package/dist/RuntimeFlagsPatch-7d62915d.cjs.dev.js +389 -0
- package/dist/Stack-ada2d201.cjs.dev.js +11 -0
- package/dist/Stack-fc8f9fe5.cjs.prod.js +11 -0
- package/dist/StreamHaltStrategy-9a61b88d.cjs.dev.js +199 -0
- package/dist/StreamHaltStrategy-b495622b.cjs.prod.js +199 -0
- package/dist/boundaries-8dfe50cb.cjs.dev.js +54 -0
- package/dist/boundaries-ebe66d32.cjs.prod.js +54 -0
- package/dist/cache-0b148e42.cjs.prod.js +523 -0
- package/dist/cache-d709d5cb.cjs.dev.js +523 -0
- package/dist/childExecutorDecision-2eed6e25.cjs.dev.js +98 -0
- package/dist/childExecutorDecision-b5842db5.cjs.prod.js +98 -0
- package/dist/circular-5b6f6504.cjs.prod.js +108 -0
- package/dist/circular-6d2bb353.cjs.dev.js +108 -0
- package/dist/circular-952618e5.cjs.prod.js +341 -0
- package/dist/circular-aa705e70.cjs.dev.js +341 -0
- package/dist/config-8a7bf1ae.cjs.dev.js +474 -0
- package/dist/config-f0bd27af.cjs.prod.js +474 -0
- package/dist/configError-0c09b93c.cjs.dev.js +323 -0
- package/dist/configError-9021016b.cjs.prod.js +323 -0
- package/dist/configProvider-3d85d4ef.cjs.dev.js +447 -0
- package/dist/configProvider-ae007b10.cjs.prod.js +447 -0
- package/dist/configSecret-0bdfadd8.cjs.prod.js +74 -0
- package/dist/configSecret-938818ad.cjs.dev.js +74 -0
- package/dist/core-473934ce.cjs.prod.js +3572 -0
- package/dist/core-b4bf44d3.cjs.dev.js +3572 -0
- package/dist/core-d3f4e713.cjs.prod.js +1072 -0
- package/dist/core-dd1edd7a.cjs.dev.js +1072 -0
- package/dist/core-effect-6666f2dc.cjs.prod.js +1039 -0
- package/dist/core-effect-f4b1aad8.cjs.dev.js +1039 -0
- package/dist/dataSource-9f78e828.cjs.dev.js +74 -0
- package/dist/dataSource-d5d7f338.cjs.prod.js +74 -0
- package/dist/declarations/src/BigInt.d.ts +461 -0
- package/dist/declarations/src/BigInt.d.ts.map +1 -0
- package/dist/declarations/src/Boolean.d.ts +229 -0
- package/dist/declarations/src/Boolean.d.ts.map +1 -0
- package/dist/declarations/src/Brand.d.ts +230 -0
- package/dist/declarations/src/Brand.d.ts.map +1 -0
- package/dist/declarations/src/Cache.d.ts +218 -0
- package/dist/declarations/src/Cache.d.ts.map +1 -0
- package/dist/declarations/src/Cause.d.ts +718 -0
- package/dist/declarations/src/Cause.d.ts.map +1 -0
- package/dist/declarations/src/Channel.d.ts +1177 -0
- package/dist/declarations/src/Channel.d.ts.map +1 -0
- package/dist/declarations/src/ChannelChildExecutorDecision.d.ts +123 -0
- package/dist/declarations/src/ChannelChildExecutorDecision.d.ts.map +1 -0
- package/dist/declarations/src/ChannelMergeDecision.d.ts +77 -0
- package/dist/declarations/src/ChannelMergeDecision.d.ts.map +1 -0
- package/dist/declarations/src/ChannelMergeState.d.ts +122 -0
- package/dist/declarations/src/ChannelMergeState.d.ts.map +1 -0
- package/dist/declarations/src/ChannelMergeStrategy.d.ts +92 -0
- package/dist/declarations/src/ChannelMergeStrategy.d.ts.map +1 -0
- package/dist/declarations/src/ChannelSingleProducerAsyncInput.d.ts +57 -0
- package/dist/declarations/src/ChannelSingleProducerAsyncInput.d.ts.map +1 -0
- package/dist/declarations/src/ChannelUpstreamPullRequest.d.ts +96 -0
- package/dist/declarations/src/ChannelUpstreamPullRequest.d.ts.map +1 -0
- package/dist/declarations/src/ChannelUpstreamPullStrategy.d.ts +97 -0
- package/dist/declarations/src/ChannelUpstreamPullStrategy.d.ts.map +1 -0
- package/dist/declarations/src/Chunk.d.ts +754 -0
- package/dist/declarations/src/Chunk.d.ts.map +1 -0
- package/dist/declarations/src/Clock.d.ts +97 -0
- package/dist/declarations/src/Clock.d.ts.map +1 -0
- package/dist/declarations/src/Config.d.ts +388 -0
- package/dist/declarations/src/Config.d.ts.map +1 -0
- package/dist/declarations/src/ConfigError.d.ts +219 -0
- package/dist/declarations/src/ConfigError.d.ts.map +1 -0
- package/dist/declarations/src/ConfigProvider.d.ts +256 -0
- package/dist/declarations/src/ConfigProvider.d.ts.map +1 -0
- package/dist/declarations/src/ConfigProviderPathPatch.d.ts +86 -0
- package/dist/declarations/src/ConfigProviderPathPatch.d.ts.map +1 -0
- package/dist/declarations/src/ConfigSecret.d.ts +64 -0
- package/dist/declarations/src/ConfigSecret.d.ts.map +1 -0
- package/dist/declarations/src/Console.d.ts +196 -0
- package/dist/declarations/src/Console.d.ts.map +1 -0
- package/dist/declarations/src/Context.d.ts +339 -0
- package/dist/declarations/src/Context.d.ts.map +1 -0
- package/dist/declarations/src/Data.d.ts +248 -0
- package/dist/declarations/src/Data.d.ts.map +1 -0
- package/dist/declarations/src/DefaultServices.d.ts +26 -0
- package/dist/declarations/src/DefaultServices.d.ts.map +1 -0
- package/dist/declarations/src/Deferred.d.ts +247 -0
- package/dist/declarations/src/Deferred.d.ts.map +1 -0
- package/dist/declarations/src/Differ.d.ts +308 -0
- package/dist/declarations/src/Differ.d.ts.map +1 -0
- package/dist/declarations/src/Duration.d.ts +265 -0
- package/dist/declarations/src/Duration.d.ts.map +1 -0
- package/dist/declarations/src/Effect.d.ts +3735 -0
- package/dist/declarations/src/Effect.d.ts.map +1 -0
- package/dist/declarations/src/Effectable.d.ts +93 -0
- package/dist/declarations/src/Effectable.d.ts.map +1 -0
- package/dist/declarations/src/Either.d.ts +453 -0
- package/dist/declarations/src/Either.d.ts.map +1 -0
- package/dist/declarations/src/Encoding.d.ts +110 -0
- package/dist/declarations/src/Encoding.d.ts.map +1 -0
- package/dist/declarations/src/Equal.d.ts +34 -0
- package/dist/declarations/src/Equal.d.ts.map +1 -0
- package/dist/declarations/src/Equivalence.d.ts +134 -0
- package/dist/declarations/src/Equivalence.d.ts.map +1 -0
- package/dist/declarations/src/ExecutionStrategy.d.ts +100 -0
- package/dist/declarations/src/ExecutionStrategy.d.ts.map +1 -0
- package/dist/declarations/src/Exit.d.ts +406 -0
- package/dist/declarations/src/Exit.d.ts.map +1 -0
- package/dist/declarations/src/Fiber.d.ts +569 -0
- package/dist/declarations/src/Fiber.d.ts.map +1 -0
- package/dist/declarations/src/FiberId.d.ts +165 -0
- package/dist/declarations/src/FiberId.d.ts.map +1 -0
- package/dist/declarations/src/FiberRef.d.ts +307 -0
- package/dist/declarations/src/FiberRef.d.ts.map +1 -0
- package/dist/declarations/src/FiberRefs.d.ts +138 -0
- package/dist/declarations/src/FiberRefs.d.ts.map +1 -0
- package/dist/declarations/src/FiberRefsPatch.d.ts +95 -0
- package/dist/declarations/src/FiberRefsPatch.d.ts.map +1 -0
- package/dist/declarations/src/FiberStatus.d.ts +94 -0
- package/dist/declarations/src/FiberStatus.d.ts.map +1 -0
- package/dist/declarations/src/Function.d.ts +371 -0
- package/dist/declarations/src/Function.d.ts.map +1 -0
- package/dist/declarations/src/GlobalValue.d.ts +5 -0
- package/dist/declarations/src/GlobalValue.d.ts.map +1 -0
- package/dist/declarations/src/GroupBy.d.ts +86 -0
- package/dist/declarations/src/GroupBy.d.ts.map +1 -0
- package/dist/declarations/src/HKT.d.ts +40 -0
- package/dist/declarations/src/HKT.d.ts.map +1 -0
- package/dist/declarations/src/Hash.d.ts +63 -0
- package/dist/declarations/src/Hash.d.ts.map +1 -0
- package/dist/declarations/src/HashMap.d.ts +361 -0
- package/dist/declarations/src/HashMap.d.ts.map +1 -0
- package/dist/declarations/src/HashSet.d.ts +267 -0
- package/dist/declarations/src/HashSet.d.ts.map +1 -0
- package/dist/declarations/src/Inspectable.d.ts +31 -0
- package/dist/declarations/src/Inspectable.d.ts.map +1 -0
- package/dist/declarations/src/KeyedPool.d.ts +147 -0
- package/dist/declarations/src/KeyedPool.d.ts.map +1 -0
- package/dist/declarations/src/Layer.d.ts +747 -0
- package/dist/declarations/src/Layer.d.ts.map +1 -0
- package/dist/declarations/src/List.d.ts +478 -0
- package/dist/declarations/src/List.d.ts.map +1 -0
- package/dist/declarations/src/LogLevel.d.ts +203 -0
- package/dist/declarations/src/LogLevel.d.ts.map +1 -0
- package/dist/declarations/src/LogSpan.d.ts +19 -0
- package/dist/declarations/src/LogSpan.d.ts.map +1 -0
- package/dist/declarations/src/Logger.d.ts +238 -0
- package/dist/declarations/src/Logger.d.ts.map +1 -0
- package/dist/declarations/src/Match.d.ts +420 -0
- package/dist/declarations/src/Match.d.ts.map +1 -0
- package/dist/declarations/src/Metric.d.ts +595 -0
- package/dist/declarations/src/Metric.d.ts.map +1 -0
- package/dist/declarations/src/MetricBoundaries.d.ts +59 -0
- package/dist/declarations/src/MetricBoundaries.d.ts.map +1 -0
- package/dist/declarations/src/MetricHook.d.ts +120 -0
- package/dist/declarations/src/MetricHook.d.ts.map +1 -0
- package/dist/declarations/src/MetricKey.d.ts +182 -0
- package/dist/declarations/src/MetricKey.d.ts.map +1 -0
- package/dist/declarations/src/MetricKeyType.d.ts +221 -0
- package/dist/declarations/src/MetricKeyType.d.ts.map +1 -0
- package/dist/declarations/src/MetricLabel.d.ts +42 -0
- package/dist/declarations/src/MetricLabel.d.ts.map +1 -0
- package/dist/declarations/src/MetricPair.d.ts +53 -0
- package/dist/declarations/src/MetricPair.d.ts.map +1 -0
- package/dist/declarations/src/MetricPolling.d.ts +99 -0
- package/dist/declarations/src/MetricPolling.d.ts.map +1 -0
- package/dist/declarations/src/MetricRegistry.d.ts +38 -0
- package/dist/declarations/src/MetricRegistry.d.ts.map +1 -0
- package/dist/declarations/src/MetricState.d.ts +223 -0
- package/dist/declarations/src/MetricState.d.ts.map +1 -0
- package/dist/declarations/src/MutableHashMap.d.ts +87 -0
- package/dist/declarations/src/MutableHashMap.d.ts.map +1 -0
- package/dist/declarations/src/MutableHashSet.d.ts +61 -0
- package/dist/declarations/src/MutableHashSet.d.ts.map +1 -0
- package/dist/declarations/src/MutableList.d.ts +114 -0
- package/dist/declarations/src/MutableList.d.ts.map +1 -0
- package/dist/declarations/src/MutableQueue.d.ts +127 -0
- package/dist/declarations/src/MutableQueue.d.ts.map +1 -0
- package/dist/declarations/src/MutableRef.d.ts +118 -0
- package/dist/declarations/src/MutableRef.d.ts.map +1 -0
- package/dist/declarations/src/NonEmptyIterable.d.ts +21 -0
- package/dist/declarations/src/NonEmptyIterable.d.ts.map +1 -0
- package/dist/declarations/src/Number.d.ts +384 -0
- package/dist/declarations/src/Number.d.ts.map +1 -0
- package/dist/declarations/src/Option.d.ts +967 -0
- package/dist/declarations/src/Option.d.ts.map +1 -0
- package/dist/declarations/src/Order.d.ts +212 -0
- package/dist/declarations/src/Order.d.ts.map +1 -0
- package/dist/declarations/src/Ordering.d.ts +83 -0
- package/dist/declarations/src/Ordering.d.ts.map +1 -0
- package/dist/declarations/src/Pipeable.d.ts +35 -0
- package/dist/declarations/src/Pipeable.d.ts.map +1 -0
- package/dist/declarations/src/Pool.d.ts +136 -0
- package/dist/declarations/src/Pool.d.ts.map +1 -0
- package/dist/declarations/src/Predicate.d.ts +596 -0
- package/dist/declarations/src/Predicate.d.ts.map +1 -0
- package/dist/declarations/src/PubSub.d.ts +158 -0
- package/dist/declarations/src/PubSub.d.ts.map +1 -0
- package/dist/declarations/src/Queue.d.ts +501 -0
- package/dist/declarations/src/Queue.d.ts.map +1 -0
- package/dist/declarations/src/Random.d.ts +101 -0
- package/dist/declarations/src/Random.d.ts.map +1 -0
- package/dist/declarations/src/ReadonlyArray.d.ts +1254 -0
- package/dist/declarations/src/ReadonlyArray.d.ts.map +1 -0
- package/dist/declarations/src/ReadonlyRecord.d.ts +603 -0
- package/dist/declarations/src/ReadonlyRecord.d.ts.map +1 -0
- package/dist/declarations/src/RedBlackTree.d.ts +369 -0
- package/dist/declarations/src/RedBlackTree.d.ts.map +1 -0
- package/dist/declarations/src/Ref.d.ts +141 -0
- package/dist/declarations/src/Ref.d.ts.map +1 -0
- package/dist/declarations/src/Reloadable.d.ts +101 -0
- package/dist/declarations/src/Reloadable.d.ts.map +1 -0
- package/dist/declarations/src/Request.d.ts +251 -0
- package/dist/declarations/src/Request.d.ts.map +1 -0
- package/dist/declarations/src/RequestBlock.d.ts +113 -0
- package/dist/declarations/src/RequestBlock.d.ts.map +1 -0
- package/dist/declarations/src/RequestResolver.d.ts +218 -0
- package/dist/declarations/src/RequestResolver.d.ts.map +1 -0
- package/dist/declarations/src/Resource.d.ts +78 -0
- package/dist/declarations/src/Resource.d.ts.map +1 -0
- package/dist/declarations/src/Runtime.d.ts +180 -0
- package/dist/declarations/src/Runtime.d.ts.map +1 -0
- package/dist/declarations/src/RuntimeFlags.d.ts +297 -0
- package/dist/declarations/src/RuntimeFlags.d.ts.map +1 -0
- package/dist/declarations/src/RuntimeFlagsPatch.d.ts +161 -0
- package/dist/declarations/src/RuntimeFlagsPatch.d.ts.map +1 -0
- package/dist/declarations/src/STM.d.ts +1551 -0
- package/dist/declarations/src/STM.d.ts.map +1 -0
- package/dist/declarations/src/Schedule.d.ts +1073 -0
- package/dist/declarations/src/Schedule.d.ts.map +1 -0
- package/dist/declarations/src/ScheduleDecision.d.ts +50 -0
- package/dist/declarations/src/ScheduleDecision.d.ts.map +1 -0
- package/dist/declarations/src/ScheduleInterval.d.ts +136 -0
- package/dist/declarations/src/ScheduleInterval.d.ts.map +1 -0
- package/dist/declarations/src/ScheduleIntervals.d.ts +109 -0
- package/dist/declarations/src/ScheduleIntervals.d.ts.map +1 -0
- package/dist/declarations/src/Scheduler.d.ts +158 -0
- package/dist/declarations/src/Scheduler.d.ts.map +1 -0
- package/dist/declarations/src/Scope.d.ts +131 -0
- package/dist/declarations/src/Scope.d.ts.map +1 -0
- package/dist/declarations/src/ScopedCache.d.ts +126 -0
- package/dist/declarations/src/ScopedCache.d.ts.map +1 -0
- package/dist/declarations/src/ScopedRef.d.ts +82 -0
- package/dist/declarations/src/ScopedRef.d.ts.map +1 -0
- package/dist/declarations/src/Sink.d.ts +1127 -0
- package/dist/declarations/src/Sink.d.ts.map +1 -0
- package/dist/declarations/src/SortedMap.d.ts +136 -0
- package/dist/declarations/src/SortedMap.d.ts.map +1 -0
- package/dist/declarations/src/SortedSet.d.ts +185 -0
- package/dist/declarations/src/SortedSet.d.ts.map +1 -0
- package/dist/declarations/src/Stream.d.ts +3577 -0
- package/dist/declarations/src/Stream.d.ts.map +1 -0
- package/dist/declarations/src/StreamEmit.d.ts +73 -0
- package/dist/declarations/src/StreamEmit.d.ts.map +1 -0
- package/dist/declarations/src/StreamHaltStrategy.d.ts +92 -0
- package/dist/declarations/src/StreamHaltStrategy.d.ts.map +1 -0
- package/dist/declarations/src/Streamable.d.ts +27 -0
- package/dist/declarations/src/Streamable.d.ts.map +1 -0
- package/dist/declarations/src/String.d.ts +514 -0
- package/dist/declarations/src/String.d.ts.map +1 -0
- package/dist/declarations/src/Struct.d.ts +109 -0
- package/dist/declarations/src/Struct.d.ts.map +1 -0
- package/dist/declarations/src/SubscriptionRef.d.ts +211 -0
- package/dist/declarations/src/SubscriptionRef.d.ts.map +1 -0
- package/dist/declarations/src/Supervisor.d.ts +170 -0
- package/dist/declarations/src/Supervisor.d.ts.map +1 -0
- package/dist/declarations/src/Symbol.d.ts +25 -0
- package/dist/declarations/src/Symbol.d.ts.map +1 -0
- package/dist/declarations/src/SynchronizedRef.d.ts +205 -0
- package/dist/declarations/src/SynchronizedRef.d.ts.map +1 -0
- package/dist/declarations/src/TArray.d.ts +430 -0
- package/dist/declarations/src/TArray.d.ts.map +1 -0
- package/dist/declarations/src/TDeferred.d.ts +79 -0
- package/dist/declarations/src/TDeferred.d.ts.map +1 -0
- package/dist/declarations/src/TMap.d.ts +427 -0
- package/dist/declarations/src/TMap.d.ts.map +1 -0
- package/dist/declarations/src/TPriorityQueue.d.ts +185 -0
- package/dist/declarations/src/TPriorityQueue.d.ts.map +1 -0
- package/dist/declarations/src/TPubSub.d.ts +146 -0
- package/dist/declarations/src/TPubSub.d.ts.map +1 -0
- package/dist/declarations/src/TQueue.d.ts +383 -0
- package/dist/declarations/src/TQueue.d.ts.map +1 -0
- package/dist/declarations/src/TRandom.d.ts +108 -0
- package/dist/declarations/src/TRandom.d.ts.map +1 -0
- package/dist/declarations/src/TReentrantLock.d.ts +194 -0
- package/dist/declarations/src/TReentrantLock.d.ts.map +1 -0
- package/dist/declarations/src/TRef.d.ts +145 -0
- package/dist/declarations/src/TRef.d.ts.map +1 -0
- package/dist/declarations/src/TSemaphore.d.ts +105 -0
- package/dist/declarations/src/TSemaphore.d.ts.map +1 -0
- package/dist/declarations/src/TSet.d.ts +306 -0
- package/dist/declarations/src/TSet.d.ts.map +1 -0
- package/dist/declarations/src/Take.d.ts +214 -0
- package/dist/declarations/src/Take.d.ts.map +1 -0
- package/dist/declarations/src/TestAnnotation.d.ts +70 -0
- package/dist/declarations/src/TestAnnotation.d.ts.map +1 -0
- package/dist/declarations/src/TestAnnotationMap.d.ts +55 -0
- package/dist/declarations/src/TestAnnotationMap.d.ts.map +1 -0
- package/dist/declarations/src/TestAnnotations.d.ts +59 -0
- package/dist/declarations/src/TestAnnotations.d.ts.map +1 -0
- package/dist/declarations/src/TestClock.d.ts +149 -0
- package/dist/declarations/src/TestClock.d.ts.map +1 -0
- package/dist/declarations/src/TestConfig.d.ts +45 -0
- package/dist/declarations/src/TestConfig.d.ts.map +1 -0
- package/dist/declarations/src/TestContext.d.ts +15 -0
- package/dist/declarations/src/TestContext.d.ts.map +1 -0
- package/dist/declarations/src/TestLive.d.ts +35 -0
- package/dist/declarations/src/TestLive.d.ts.map +1 -0
- package/dist/declarations/src/TestServices.d.ts +231 -0
- package/dist/declarations/src/TestServices.d.ts.map +1 -0
- package/dist/declarations/src/TestSized.d.ts +36 -0
- package/dist/declarations/src/TestSized.d.ts.map +1 -0
- package/dist/declarations/src/Tracer.d.ts +112 -0
- package/dist/declarations/src/Tracer.d.ts.map +1 -0
- package/dist/declarations/src/Tuple.d.ts +173 -0
- package/dist/declarations/src/Tuple.d.ts.map +1 -0
- package/dist/declarations/src/Types.d.ts +113 -0
- package/dist/declarations/src/Types.d.ts.map +1 -0
- package/dist/declarations/src/Unify.d.ts +62 -0
- package/dist/declarations/src/Unify.d.ts.map +1 -0
- package/dist/declarations/src/Utils.d.ts +224 -0
- package/dist/declarations/src/Utils.d.ts.map +1 -0
- package/dist/declarations/src/index.d.ts +702 -0
- package/dist/declarations/src/index.d.ts.map +1 -0
- package/dist/defaultServices-6a9a2d2b.cjs.dev.js +328 -0
- package/dist/defaultServices-8ea5e664.cjs.prod.js +328 -0
- package/dist/effect.cjs.d.mts +2 -0
- package/dist/effect.cjs.d.mts.map +1 -0
- package/dist/effect.cjs.d.ts +2 -0
- package/dist/effect.cjs.d.ts.map +1 -0
- package/dist/effect.cjs.dev.js +476 -0
- package/dist/effect.cjs.js +7 -0
- package/dist/effect.cjs.mjs +150 -0
- package/dist/effect.cjs.prod.js +476 -0
- package/dist/effect.esm.js +285 -0
- package/dist/fiber-3d944398.cjs.dev.js +411 -0
- package/dist/fiber-cbd0613f.cjs.prod.js +411 -0
- package/dist/fiberRefs-99808a27.cjs.prod.js +181 -0
- package/dist/fiberRefs-ccc37f30.cjs.dev.js +181 -0
- package/dist/fiberRuntime-0c1e7478.cjs.dev.js +3012 -0
- package/dist/fiberRuntime-f1e80ca7.cjs.prod.js +3012 -0
- package/dist/groupBy-30f6e9ba.cjs.prod.js +219 -0
- package/dist/groupBy-8ae74e3b.cjs.dev.js +219 -0
- package/dist/hook-ad5af092.cjs.dev.js +375 -0
- package/dist/hook-cab99f9e.cjs.prod.js +375 -0
- package/dist/key-9c7368c8.cjs.prod.js +79 -0
- package/dist/key-e3189bbd.cjs.dev.js +79 -0
- package/dist/keyType-2ae6a00e.cjs.prod.js +243 -0
- package/dist/keyType-36962f62.cjs.dev.js +243 -0
- package/dist/label-a588e6cd.cjs.prod.js +44 -0
- package/dist/label-b0cebeae.cjs.dev.js +44 -0
- package/dist/layer-bfb9802a.cjs.prod.js +684 -0
- package/dist/layer-c284cf0d.cjs.dev.js +684 -0
- package/dist/mergeDecision-07c6b5c9.cjs.prod.js +86 -0
- package/dist/mergeDecision-be41e797.cjs.dev.js +86 -0
- package/dist/mergeState-75990fa2.cjs.prod.js +109 -0
- package/dist/mergeState-8153ce39.cjs.dev.js +109 -0
- package/dist/mergeStrategy-3dd6e55f.cjs.prod.js +72 -0
- package/dist/mergeStrategy-81ea5b80.cjs.dev.js +72 -0
- package/dist/pair-291b78d7.cjs.dev.js +42 -0
- package/dist/pair-6254cf85.cjs.prod.js +42 -0
- package/dist/patch-256bc574.cjs.prod.js +132 -0
- package/dist/patch-cda9b6c8.cjs.dev.js +132 -0
- package/dist/pathPatch-31ce8101.cjs.dev.js +90 -0
- package/dist/pathPatch-40b92af6.cjs.prod.js +90 -0
- package/dist/pool-122f0fad.cjs.prod.js +278 -0
- package/dist/pool-f6ca2038.cjs.dev.js +278 -0
- package/dist/query-5cc0ddf8.cjs.prod.js +104 -0
- package/dist/query-7bffa3c3.cjs.dev.js +104 -0
- package/dist/queue-4166cfdb.cjs.dev.js +548 -0
- package/dist/queue-e326fd89.cjs.prod.js +548 -0
- package/dist/registry-081e18a3.cjs.prod.js +114 -0
- package/dist/registry-377855a9.cjs.dev.js +114 -0
- package/dist/runtime-4078f059.cjs.prod.js +290 -0
- package/dist/runtime-d4514ab5.cjs.dev.js +290 -0
- package/dist/schedule-31e38871.cjs.dev.js +956 -0
- package/dist/schedule-f036b254.cjs.prod.js +956 -0
- package/dist/scopedRef-5ecf6468.cjs.dev.js +55 -0
- package/dist/scopedRef-8ce21228.cjs.prod.js +55 -0
- package/dist/singleProducerAsyncInput-8879d87c.cjs.prod.js +193 -0
- package/dist/singleProducerAsyncInput-ece7387b.cjs.dev.js +193 -0
- package/dist/sink-1794329b.cjs.dev.js +3093 -0
- package/dist/sink-9208df8d.cjs.prod.js +3093 -0
- package/dist/state-40d5dc71.cjs.prod.js +223 -0
- package/dist/state-620f7a22.cjs.dev.js +223 -0
- package/dist/stm-6ad7b384.cjs.prod.js +678 -0
- package/dist/stm-b080be31.cjs.dev.js +678 -0
- package/dist/stream-09aeeac3.cjs.dev.js +3652 -0
- package/dist/stream-e19805ca.cjs.prod.js +3652 -0
- package/dist/synchronizedRef-8fa16866.cjs.dev.js +62 -0
- package/dist/synchronizedRef-cc04ecbd.cjs.prod.js +62 -0
- package/dist/tArray-5e42c290.cjs.prod.js +330 -0
- package/dist/tArray-7d470ed7.cjs.dev.js +330 -0
- package/dist/tMap-a2cfde88.cjs.prod.js +535 -0
- package/dist/tMap-f0df0ea0.cjs.dev.js +535 -0
- package/dist/tQueue-085f70b5.cjs.dev.js +367 -0
- package/dist/tQueue-b80e940e.cjs.prod.js +367 -0
- package/dist/tRef-2e495254.cjs.dev.js +133 -0
- package/dist/tRef-42a212cb.cjs.prod.js +133 -0
- package/dist/take-114476e5.cjs.prod.js +152 -0
- package/dist/take-d4fa1beb.cjs.dev.js +152 -0
- package/dist/timeout-489f3f86.cjs.prod.js +25 -0
- package/dist/timeout-d380d3f8.cjs.dev.js +25 -0
- package/dist/upstreamPullRequest-7a694281.cjs.dev.js +79 -0
- package/dist/upstreamPullRequest-c89f818d.cjs.prod.js +79 -0
- package/dist/upstreamPullStrategy-63cc8967.cjs.prod.js +81 -0
- package/dist/upstreamPullStrategy-f9f1ab57.cjs.dev.js +81 -0
- package/internal/Context.esm.js +208 -0
- package/internal/Data.esm.js +52 -0
- package/internal/Differ/ChunkPatch.esm.js +131 -0
- package/internal/Differ/ContextPatch.esm.js +158 -0
- package/internal/Differ/HashMapPatch.esm.js +133 -0
- package/internal/Differ/HashSetPatch.esm.js +107 -0
- package/internal/Differ/OrPatch.esm.js +196 -0
- package/internal/Differ.esm.js +130 -0
- package/internal/Effectable.esm.js +89 -0
- package/internal/Either.esm.js +95 -0
- package/internal/Encoding/Base64.esm.js +74 -0
- package/internal/Encoding/Base64Url.esm.js +24 -0
- package/internal/Encoding/Common.esm.js +21 -0
- package/internal/Encoding/Hex.esm.js +55 -0
- package/internal/HashMap/array.esm.js +51 -0
- package/internal/HashMap/bitwise.esm.js +34 -0
- package/internal/HashMap/config.esm.js +16 -0
- package/internal/HashMap/keySet.esm.js +8 -0
- package/internal/HashMap/node.esm.js +253 -0
- package/internal/HashMap.esm.js +366 -0
- package/internal/HashSet.esm.js +211 -0
- package/internal/Option.esm.js +75 -0
- package/internal/ReadonlyArray.esm.js +8 -0
- package/internal/RedBlackTree/iterator.esm.js +204 -0
- package/internal/RedBlackTree/node.esm.js +43 -0
- package/internal/RedBlackTree.esm.js +1042 -0
- package/internal/Stack.esm.js +9 -0
- package/internal/blockedRequests.esm.js +365 -0
- package/internal/cache.esm.js +514 -0
- package/internal/cause.esm.js +1053 -0
- package/internal/channel/channelExecutor.esm.js +692 -0
- package/internal/channel/channelState.esm.js +78 -0
- package/internal/channel/childExecutorDecision.esm.js +71 -0
- package/internal/channel/continuation.esm.js +58 -0
- package/internal/channel/mergeDecision.esm.js +69 -0
- package/internal/channel/mergeState.esm.js +82 -0
- package/internal/channel/mergeStrategy.esm.js +55 -0
- package/internal/channel/singleProducerAsyncInput.esm.js +191 -0
- package/internal/channel/subexecutor.esm.js +153 -0
- package/internal/channel/upstreamPullRequest.esm.js +62 -0
- package/internal/channel/upstreamPullStrategy.esm.js +62 -0
- package/internal/channel.esm.js +647 -0
- package/internal/clock.esm.js +82 -0
- package/internal/completedRequestMap.esm.js +7 -0
- package/internal/concurrency.esm.js +47 -0
- package/internal/config.esm.js +374 -0
- package/internal/configError.esm.js +276 -0
- package/internal/configProvider/pathPatch.esm.js +83 -0
- package/internal/configProvider.esm.js +365 -0
- package/internal/configSecret.esm.js +66 -0
- package/internal/console.esm.js +72 -0
- package/internal/core-effect.esm.js +884 -0
- package/internal/core-stream.esm.js +293 -0
- package/internal/core.esm.js +1756 -0
- package/internal/dataSource.esm.js +61 -0
- package/internal/defaultServices/console.esm.js +96 -0
- package/internal/defaultServices.esm.js +85 -0
- package/internal/deferred.esm.js +37 -0
- package/internal/effect/circular.esm.js +314 -0
- package/internal/executionStrategy.esm.js +61 -0
- package/internal/fiber.esm.js +257 -0
- package/internal/fiberId.esm.js +243 -0
- package/internal/fiberMessage.esm.js +54 -0
- package/internal/fiberRefs/patch.esm.js +127 -0
- package/internal/fiberRefs.esm.js +169 -0
- package/internal/fiberRuntime.esm.js +2005 -0
- package/internal/fiberScope.esm.js +58 -0
- package/internal/fiberStatus.esm.js +89 -0
- package/internal/groupBy.esm.js +211 -0
- package/internal/keyedPool.esm.js +161 -0
- package/internal/layer/circular.esm.js +86 -0
- package/internal/layer.esm.js +575 -0
- package/internal/logSpan.esm.js +15 -0
- package/internal/logger-circular.esm.js +21 -0
- package/internal/logger.esm.js +213 -0
- package/internal/matcher.esm.js +314 -0
- package/internal/metric/boundaries.esm.js +48 -0
- package/internal/metric/hook.esm.js +366 -0
- package/internal/metric/key.esm.js +68 -0
- package/internal/metric/keyType.esm.js +225 -0
- package/internal/metric/label.esm.js +40 -0
- package/internal/metric/pair.esm.js +38 -0
- package/internal/metric/polling.esm.js +74 -0
- package/internal/metric/registry.esm.js +111 -0
- package/internal/metric/state.esm.js +205 -0
- package/internal/metric.esm.js +204 -0
- package/internal/opCodes/cause.esm.js +31 -0
- package/internal/opCodes/channel.esm.js +71 -0
- package/internal/opCodes/channelChildExecutorDecision.esm.js +16 -0
- package/internal/opCodes/channelMergeDecision.esm.js +11 -0
- package/internal/opCodes/channelMergeState.esm.js +16 -0
- package/internal/opCodes/channelMergeStrategy.esm.js +11 -0
- package/internal/opCodes/channelState.esm.js +21 -0
- package/internal/opCodes/channelUpstreamPullRequest.esm.js +11 -0
- package/internal/opCodes/channelUpstreamPullStrategy.esm.js +11 -0
- package/internal/opCodes/config.esm.js +56 -0
- package/internal/opCodes/configError.esm.js +31 -0
- package/internal/opCodes/continuation.esm.js +11 -0
- package/internal/opCodes/deferred.esm.js +11 -0
- package/internal/opCodes/effect.esm.js +71 -0
- package/internal/opCodes/layer.esm.js +46 -0
- package/internal/opCodes/streamHaltStrategy.esm.js +21 -0
- package/internal/pool.esm.js +271 -0
- package/internal/pubsub.esm.js +1102 -0
- package/internal/query.esm.js +100 -0
- package/internal/queue.esm.js +515 -0
- package/internal/random.esm.js +58 -0
- package/internal/ref.esm.js +121 -0
- package/internal/reloadable.esm.js +62 -0
- package/internal/request.esm.js +81 -0
- package/internal/resource.esm.js +35 -0
- package/internal/ringBuffer.esm.js +56 -0
- package/internal/runtime.esm.js +270 -0
- package/internal/runtimeFlags.esm.js +137 -0
- package/internal/runtimeFlagsPatch.esm.js +57 -0
- package/internal/schedule/decision.esm.js +45 -0
- package/internal/schedule/interval.esm.js +85 -0
- package/internal/schedule/intervals.esm.js +135 -0
- package/internal/schedule.esm.js +844 -0
- package/internal/scopedCache.esm.js +406 -0
- package/internal/scopedRef.esm.js +49 -0
- package/internal/singleShotGen.esm.js +30 -0
- package/internal/sink.esm.js +918 -0
- package/internal/stm/core.esm.js +553 -0
- package/internal/stm/opCodes/stm.esm.js +56 -0
- package/internal/stm/opCodes/stmState.esm.js +16 -0
- package/internal/stm/opCodes/strategy.esm.js +16 -0
- package/internal/stm/opCodes/tExit.esm.js +26 -0
- package/internal/stm/opCodes/tryCommit.esm.js +11 -0
- package/internal/stm/stm/entry.esm.js +47 -0
- package/internal/stm/stm/journal.esm.js +96 -0
- package/internal/stm/stm/stmState.esm.js +104 -0
- package/internal/stm/stm/tExit.esm.js +113 -0
- package/internal/stm/stm/tryCommit.esm.js +25 -0
- package/internal/stm/stm/txnId.esm.js +15 -0
- package/internal/stm/stm/versioned.esm.js +8 -0
- package/internal/stm/stm.esm.js +584 -0
- package/internal/stm/tArray.esm.js +287 -0
- package/internal/stm/tDeferred.esm.js +49 -0
- package/internal/stm/tMap.esm.js +492 -0
- package/internal/stm/tPriorityQueue.esm.js +156 -0
- package/internal/stm/tPubSub.esm.js +381 -0
- package/internal/stm/tQueue.esm.js +317 -0
- package/internal/stm/tRandom.esm.js +89 -0
- package/internal/stm/tReentrantLock.esm.js +216 -0
- package/internal/stm/tRef.esm.js +117 -0
- package/internal/stm/tSemaphore.esm.js +73 -0
- package/internal/stm/tSet.esm.js +113 -0
- package/internal/stream/debounceState.esm.js +39 -0
- package/internal/stream/emit.esm.js +51 -0
- package/internal/stream/haltStrategy.esm.js +74 -0
- package/internal/stream/handoff.esm.js +79 -0
- package/internal/stream/handoffSignal.esm.js +40 -0
- package/internal/stream/pull.esm.js +10 -0
- package/internal/stream/sinkEndReason.esm.js +27 -0
- package/internal/stream/zipAllState.esm.js +65 -0
- package/internal/stream/zipChunksState.esm.js +41 -0
- package/internal/stream.esm.js +2990 -0
- package/internal/string-utils.esm.js +66 -0
- package/internal/subscriptionRef.esm.js +65 -0
- package/internal/supervisor/patch.esm.js +156 -0
- package/internal/supervisor.esm.js +205 -0
- package/internal/synchronizedRef.esm.js +53 -0
- package/internal/take.esm.js +130 -0
- package/internal/testing/suspendedWarningData.esm.js +66 -0
- package/internal/testing/warningData.esm.js +75 -0
- package/internal/timeout.esm.js +22 -0
- package/internal/tracer.esm.js +74 -0
- package/package.json +1091 -31
- package/src/.index.ts +30 -0
- package/src/BigInt.ts +531 -0
- package/src/Boolean.ts +261 -0
- package/src/Brand.ts +336 -0
- package/src/Cache.ts +250 -0
- package/src/Cause.ts +813 -0
- package/src/Channel.ts +2254 -0
- package/src/ChannelChildExecutorDecision.ts +138 -0
- package/src/ChannelMergeDecision.ts +94 -0
- package/src/ChannelMergeState.ts +166 -0
- package/src/ChannelMergeStrategy.ts +107 -0
- package/src/ChannelSingleProducerAsyncInput.ts +68 -0
- package/src/ChannelUpstreamPullRequest.ts +110 -0
- package/src/ChannelUpstreamPullStrategy.ts +120 -0
- package/src/Chunk.ts +1325 -0
- package/src/Clock.ts +111 -0
- package/src/Config.ts +447 -0
- package/src/ConfigError.ts +267 -0
- package/src/ConfigProvider.ts +296 -0
- package/src/ConfigProviderPathPatch.ts +100 -0
- package/src/ConfigSecret.ts +76 -0
- package/src/Console.ts +222 -0
- package/src/Context.ts +365 -0
- package/src/Data.ts +379 -0
- package/src/DefaultServices.ts +34 -0
- package/src/Deferred.ts +283 -0
- package/src/Differ.ts +406 -0
- package/src/Duration.ts +558 -0
- package/src/Effect.ts +5075 -0
- package/src/Effectable.ts +107 -0
- package/src/Either.ts +626 -0
- package/src/Encoding.ts +130 -0
- package/src/Equal.ts +64 -0
- package/src/Equivalence.ts +235 -0
- package/src/ExecutionStrategy.ts +111 -0
- package/src/Exit.ts +464 -0
- package/src/Fiber.ts +650 -0
- package/src/FiberId.ts +187 -0
- package/src/FiberRef.ts +392 -0
- package/src/FiberRefs.ts +160 -0
- package/src/FiberRefsPatch.ts +105 -0
- package/src/FiberStatus.ts +108 -0
- package/src/Function.ts +834 -0
- package/src/GlobalValue.ts +20 -0
- package/src/GroupBy.ts +102 -0
- package/src/HKT.ts +44 -0
- package/src/Hash.ts +162 -0
- package/src/HashMap.ts +403 -0
- package/src/HashSet.ts +300 -0
- package/src/Inspectable.ts +45 -0
- package/src/KeyedPool.ts +160 -0
- package/src/Layer.ts +1017 -0
- package/src/List.ts +951 -0
- package/src/LogLevel.ts +266 -0
- package/src/LogSpan.ts +25 -0
- package/src/Logger.ts +315 -0
- package/src/Match.ts +800 -0
- package/src/Metric.ts +739 -0
- package/src/MetricBoundaries.ts +70 -0
- package/src/MetricHook.ts +139 -0
- package/src/MetricKey.ts +227 -0
- package/src/MetricKeyType.ts +257 -0
- package/src/MetricLabel.ts +47 -0
- package/src/MetricPair.ts +70 -0
- package/src/MetricPolling.ts +136 -0
- package/src/MetricRegistry.ts +47 -0
- package/src/MetricState.ts +256 -0
- package/src/MutableHashMap.ts +187 -0
- package/src/MutableHashSet.ts +118 -0
- package/src/MutableList.ts +289 -0
- package/src/MutableQueue.ts +227 -0
- package/src/MutableRef.ts +204 -0
- package/src/NonEmptyIterable.ts +30 -0
- package/src/Number.ts +434 -0
- package/src/Option.ts +1214 -0
- package/src/Order.ts +328 -0
- package/src/Ordering.ts +112 -0
- package/src/Pipeable.ts +318 -0
- package/src/Pool.ts +148 -0
- package/src/Predicate.ts +704 -0
- package/src/PubSub.ts +175 -0
- package/src/Queue.ts +583 -0
- package/src/Random.ts +115 -0
- package/src/ReadonlyArray.ts +2017 -0
- package/src/ReadonlyRecord.ts +914 -0
- package/src/RedBlackTree.ts +415 -0
- package/src/Ref.ts +159 -0
- package/src/Reloadable.ts +136 -0
- package/src/Request.ts +285 -0
- package/src/RequestBlock.ts +157 -0
- package/src/RequestResolver.ts +305 -0
- package/src/Resource.ts +97 -0
- package/src/Runtime.ts +216 -0
- package/src/RuntimeFlags.ts +336 -0
- package/src/RuntimeFlagsPatch.ts +183 -0
- package/src/STM.ts +2076 -0
- package/src/Schedule.ts +1396 -0
- package/src/ScheduleDecision.ts +62 -0
- package/src/ScheduleInterval.ts +151 -0
- package/src/ScheduleIntervals.ts +122 -0
- package/src/Scheduler.ts +359 -0
- package/src/Scope.ts +171 -0
- package/src/ScopedCache.ts +148 -0
- package/src/ScopedRef.ts +95 -0
- package/src/Sink.ts +1431 -0
- package/src/SortedMap.ts +229 -0
- package/src/SortedSet.ts +385 -0
- package/src/Stream.ts +4540 -0
- package/src/StreamEmit.ts +83 -0
- package/src/StreamHaltStrategy.ts +111 -0
- package/src/Streamable.ts +42 -0
- package/src/String.ts +682 -0
- package/src/Struct.ts +151 -0
- package/src/SubscriptionRef.ts +273 -0
- package/src/Supervisor.ts +239 -0
- package/src/Symbol.ts +28 -0
- package/src/SynchronizedRef.ts +249 -0
- package/src/TArray.ts +494 -0
- package/src/TDeferred.ts +99 -0
- package/src/TMap.ts +510 -0
- package/src/TPriorityQueue.ts +223 -0
- package/src/TPubSub.ts +187 -0
- package/src/TQueue.ts +431 -0
- package/src/TRandom.ts +129 -0
- package/src/TReentrantLock.ts +224 -0
- package/src/TRef.ts +176 -0
- package/src/TSemaphore.ts +129 -0
- package/src/TSet.ts +349 -0
- package/src/Take.ts +257 -0
- package/src/TestAnnotation.ts +166 -0
- package/src/TestAnnotationMap.ts +124 -0
- package/src/TestAnnotations.ts +113 -0
- package/src/TestClock.ts +552 -0
- package/src/TestConfig.ts +49 -0
- package/src/TestContext.ts +35 -0
- package/src/TestLive.ts +55 -0
- package/src/TestServices.ts +392 -0
- package/src/TestSized.ts +55 -0
- package/src/Tracer.ts +133 -0
- package/src/Tuple.ts +204 -0
- package/src/Types.ts +123 -0
- package/src/Unify.ts +118 -0
- package/src/Utils.ts +699 -0
- package/src/index.ts +845 -0
- package/src/internal/Common.ts +56 -0
- package/src/internal/Context.ts +252 -0
- package/src/internal/Data.ts +55 -0
- package/src/internal/Differ/ChunkPatch.ts +209 -0
- package/src/internal/Differ/ContextPatch.ts +229 -0
- package/src/internal/Differ/HashMapPatch.ts +217 -0
- package/src/internal/Differ/HashSetPatch.ts +174 -0
- package/src/internal/Differ/OrPatch.ts +296 -0
- package/src/internal/Differ.ts +184 -0
- package/src/internal/Effectable.ts +92 -0
- package/src/internal/Either.ts +107 -0
- package/src/internal/Encoding/Base64.ts +282 -0
- package/src/internal/Encoding/Base64Url.ts +28 -0
- package/src/internal/Encoding/Common.ts +24 -0
- package/src/internal/Encoding/Hex.ts +315 -0
- package/src/internal/HashMap/array.ts +49 -0
- package/src/internal/HashMap/bitwise.ts +32 -0
- package/src/internal/HashMap/config.ts +14 -0
- package/src/internal/HashMap/keySet.ts +8 -0
- package/src/internal/HashMap/node.ts +390 -0
- package/src/internal/HashMap.ts +533 -0
- package/src/internal/HashSet.ts +319 -0
- package/src/internal/Iterable.ts +54 -0
- package/src/internal/Option.ts +79 -0
- package/src/internal/ReadonlyArray.ts +8 -0
- package/src/internal/RedBlackTree/iterator.ts +207 -0
- package/src/internal/RedBlackTree/node.ts +48 -0
- package/src/internal/RedBlackTree.ts +1195 -0
- package/src/internal/Stack.ts +4 -0
- package/src/internal/blockedRequests.ts +512 -0
- package/src/internal/cache.ts +714 -0
- package/src/internal/cause.ts +1205 -0
- package/src/internal/channel/channelExecutor.ts +1193 -0
- package/src/internal/channel/channelState.ts +132 -0
- package/src/internal/channel/childExecutorDecision.ts +95 -0
- package/src/internal/channel/continuation.ts +171 -0
- package/src/internal/channel/mergeDecision.ts +115 -0
- package/src/internal/channel/mergeState.ts +120 -0
- package/src/internal/channel/mergeStrategy.ts +72 -0
- package/src/internal/channel/singleProducerAsyncInput.ts +261 -0
- package/src/internal/channel/subexecutor.ts +229 -0
- package/src/internal/channel/upstreamPullRequest.ts +83 -0
- package/src/internal/channel/upstreamPullStrategy.ts +86 -0
- package/src/internal/channel.ts +2520 -0
- package/src/internal/clock.ts +97 -0
- package/src/internal/completedRequestMap.ts +9 -0
- package/src/internal/concurrency.ts +83 -0
- package/src/internal/config.ts +598 -0
- package/src/internal/configError.ts +291 -0
- package/src/internal/configProvider/pathPatch.ts +97 -0
- package/src/internal/configProvider.ts +692 -0
- package/src/internal/configSecret.ts +71 -0
- package/src/internal/console.ts +136 -0
- package/src/internal/core-effect.ts +2161 -0
- package/src/internal/core-stream.ts +999 -0
- package/src/internal/core.ts +2776 -0
- package/src/internal/dataSource.ts +258 -0
- package/src/internal/defaultServices/console.ts +97 -0
- package/src/internal/defaultServices.ts +140 -0
- package/src/internal/deferred.ts +44 -0
- package/src/internal/effect/circular.ts +664 -0
- package/src/internal/executionStrategy.ts +72 -0
- package/src/internal/fiber.ts +350 -0
- package/src/internal/fiberId.ts +270 -0
- package/src/internal/fiberMessage.ts +85 -0
- package/src/internal/fiberRefs/patch.ts +144 -0
- package/src/internal/fiberRefs.ts +239 -0
- package/src/internal/fiberRuntime.ts +3478 -0
- package/src/internal/fiberScope.ts +72 -0
- package/src/internal/fiberStatus.ts +118 -0
- package/src/internal/groupBy.ts +520 -0
- package/src/internal/keyedPool.ts +240 -0
- package/src/internal/layer/circular.ts +215 -0
- package/src/internal/layer.ts +1246 -0
- package/src/internal/logSpan.ts +15 -0
- package/src/internal/logger-circular.ts +24 -0
- package/src/internal/logger.ts +307 -0
- package/src/internal/matcher.ts +594 -0
- package/src/internal/metric/boundaries.ts +72 -0
- package/src/internal/metric/hook.ts +459 -0
- package/src/internal/metric/key.ts +173 -0
- package/src/internal/metric/keyType.ts +263 -0
- package/src/internal/metric/label.ts +44 -0
- package/src/internal/metric/pair.ts +48 -0
- package/src/internal/metric/polling.ts +143 -0
- package/src/internal/metric/registry.ts +188 -0
- package/src/internal/metric/state.ts +286 -0
- package/src/internal/metric.ts +522 -0
- package/src/internal/opCodes/cause.ts +35 -0
- package/src/internal/opCodes/channel.ts +83 -0
- package/src/internal/opCodes/channelChildExecutorDecision.ts +17 -0
- package/src/internal/opCodes/channelMergeDecision.ts +11 -0
- package/src/internal/opCodes/channelMergeState.ts +17 -0
- package/src/internal/opCodes/channelMergeStrategy.ts +11 -0
- package/src/internal/opCodes/channelState.ts +23 -0
- package/src/internal/opCodes/channelUpstreamPullRequest.ts +11 -0
- package/src/internal/opCodes/channelUpstreamPullStrategy.ts +11 -0
- package/src/internal/opCodes/config.ts +65 -0
- package/src/internal/opCodes/configError.ts +35 -0
- package/src/internal/opCodes/continuation.ts +11 -0
- package/src/internal/opCodes/deferred.ts +11 -0
- package/src/internal/opCodes/effect.ts +83 -0
- package/src/internal/opCodes/layer.ts +53 -0
- package/src/internal/opCodes/streamHaltStrategy.ts +23 -0
- package/src/internal/pool.ts +499 -0
- package/src/internal/pubsub.ts +1557 -0
- package/src/internal/query.ts +199 -0
- package/src/internal/queue.ts +744 -0
- package/src/internal/random.ts +88 -0
- package/src/internal/ref.ts +164 -0
- package/src/internal/reloadable.ts +164 -0
- package/src/internal/request.ts +137 -0
- package/src/internal/resource.ts +64 -0
- package/src/internal/ringBuffer.ts +68 -0
- package/src/internal/runtime.ts +348 -0
- package/src/internal/runtimeFlags.ts +176 -0
- package/src/internal/runtimeFlagsPatch.ts +103 -0
- package/src/internal/schedule/decision.ts +47 -0
- package/src/internal/schedule/interval.ts +101 -0
- package/src/internal/schedule/intervals.ts +179 -0
- package/src/internal/schedule.ts +2096 -0
- package/src/internal/scopedCache.ts +634 -0
- package/src/internal/scopedRef.ts +133 -0
- package/src/internal/singleShotGen.ts +35 -0
- package/src/internal/sink.ts +2118 -0
- package/src/internal/stm/core.ts +804 -0
- package/src/internal/stm/opCodes/stm.ts +71 -0
- package/src/internal/stm/opCodes/stmState.ts +17 -0
- package/src/internal/stm/opCodes/strategy.ts +17 -0
- package/src/internal/stm/opCodes/tExit.ts +29 -0
- package/src/internal/stm/opCodes/tryCommit.ts +11 -0
- package/src/internal/stm/stm/entry.ts +59 -0
- package/src/internal/stm/stm/journal.ts +123 -0
- package/src/internal/stm/stm/opCodes/stm.ts +71 -0
- package/src/internal/stm/stm/opCodes/stmState.ts +17 -0
- package/src/internal/stm/stm/opCodes/strategy.ts +17 -0
- package/src/internal/stm/stm/opCodes/tExit.ts +29 -0
- package/src/internal/stm/stm/opCodes/tryCommit.ts +11 -0
- package/src/internal/stm/stm/stmState.ts +130 -0
- package/src/internal/stm/stm/tExit.ts +180 -0
- package/src/internal/stm/stm/tryCommit.ts +34 -0
- package/src/internal/stm/stm/txnId.ts +14 -0
- package/src/internal/stm/stm/versioned.ts +4 -0
- package/src/internal/stm/stm.ts +1491 -0
- package/src/internal/stm/tArray.ts +550 -0
- package/src/internal/stm/tDeferred.ts +79 -0
- package/src/internal/stm/tMap.ts +824 -0
- package/src/internal/stm/tPriorityQueue.ts +259 -0
- package/src/internal/stm/tPubSub.ts +542 -0
- package/src/internal/stm/tQueue.ts +400 -0
- package/src/internal/stm/tRandom.ts +140 -0
- package/src/internal/stm/tReentrantLock.ts +352 -0
- package/src/internal/stm/tRef.ts +190 -0
- package/src/internal/stm/tSemaphore.ts +113 -0
- package/src/internal/stm/tSet.ts +237 -0
- package/src/internal/stream/debounceState.ts +57 -0
- package/src/internal/stream/emit.ts +46 -0
- package/src/internal/stream/haltStrategy.ts +85 -0
- package/src/internal/stream/handoff.ts +185 -0
- package/src/internal/stream/handoffSignal.ts +59 -0
- package/src/internal/stream/pull.ts +35 -0
- package/src/internal/stream/sinkEndReason.ts +30 -0
- package/src/internal/stream/zipAllState.ts +88 -0
- package/src/internal/stream/zipChunksState.ts +56 -0
- package/src/internal/stream.ts +8092 -0
- package/src/internal/string-utils.ts +107 -0
- package/src/internal/subscriptionRef.ts +133 -0
- package/src/internal/supervisor/patch.ts +190 -0
- package/src/internal/supervisor.ts +301 -0
- package/src/internal/synchronizedRef.ts +115 -0
- package/src/internal/take.ts +198 -0
- package/src/internal/testing/sleep.ts +27 -0
- package/src/internal/testing/suspendedWarningData.ts +85 -0
- package/src/internal/testing/warningData.ts +94 -0
- package/src/internal/timeout.ts +23 -0
- package/src/internal/tracer.ts +101 -0
- package/src/tsconfig.json +49 -0
- package/Debug.d.ts +0 -31
- package/Debug.d.ts.map +0 -1
- package/Debug.js +0 -31
- package/Debug.js.map +0 -1
- package/Differ.d.ts +0 -61
- package/Differ.d.ts.map +0 -1
- package/Differ.js +0 -38
- package/Differ.js.map +0 -1
- package/Fiber.d.ts +0 -51
- package/Fiber.d.ts.map +0 -1
- package/Fiber.js +0 -35
- package/Fiber.js.map +0 -1
- package/FiberRefs.d.ts +0 -21
- package/FiberRefs.d.ts.map +0 -1
- package/FiberRefs.js +0 -26
- package/FiberRefs.js.map +0 -1
- package/Metric.d.ts +0 -101
- package/Metric.d.ts.map +0 -1
- package/Metric.js +0 -50
- package/Metric.js.map +0 -1
- package/Optic.d.ts +0 -62
- package/Optic.d.ts.map +0 -1
- package/Optic.js +0 -70
- package/Optic.js.map +0 -1
- package/Ref.d.ts +0 -31
- package/Ref.d.ts.map +0 -1
- package/Ref.js +0 -29
- package/Ref.js.map +0 -1
- package/Schedule.d.ts +0 -41
- package/Schedule.d.ts.map +0 -1
- package/Schedule.js +0 -32
- package/Schedule.js.map +0 -1
- package/_mjs/Debug.mjs +0 -27
- package/_mjs/Debug.mjs.map +0 -1
- package/_mjs/Differ.mjs +0 -61
- package/_mjs/Differ.mjs.map +0 -1
- package/_mjs/Fiber.mjs +0 -51
- package/_mjs/Fiber.mjs.map +0 -1
- package/_mjs/FiberRefs.mjs +0 -21
- package/_mjs/FiberRefs.mjs.map +0 -1
- package/_mjs/Metric.mjs +0 -101
- package/_mjs/Metric.mjs.map +0 -1
- package/_mjs/Optic.mjs +0 -62
- package/_mjs/Optic.mjs.map +0 -1
- package/_mjs/Ref.mjs +0 -31
- package/_mjs/Ref.mjs.map +0 -1
- package/_mjs/Schedule.mjs +0 -41
- package/_mjs/Schedule.mjs.map +0 -1
- package/_mjs/index.mjs +0 -939
- package/_mjs/index.mjs.map +0 -1
- package/index.d.ts +0 -939
- package/index.d.ts.map +0 -1
- package/index.js +0 -217
- package/index.js.map +0 -1
|
@@ -0,0 +1,3652 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Cause_dist_effectCause = require('../Cause/dist/effect-Cause.cjs.dev.js');
|
|
4
|
+
var ChannelMergeDecision_dist_effectChannelMergeDecision = require('../ChannelMergeDecision/dist/effect-ChannelMergeDecision.cjs.dev.js');
|
|
5
|
+
var Chunk_dist_effectChunk = require('../Chunk/dist/effect-Chunk.cjs.dev.js');
|
|
6
|
+
var Clock_dist_effectClock = require('../Clock/dist/effect-Clock.cjs.dev.js');
|
|
7
|
+
var Context_dist_effectContext = require('../Context/dist/effect-Context.cjs.dev.js');
|
|
8
|
+
var Deferred_dist_effectDeferred = require('../Deferred/dist/effect-Deferred.cjs.dev.js');
|
|
9
|
+
var Duration_dist_effectDuration = require('../Duration/dist/effect-Duration.cjs.dev.js');
|
|
10
|
+
var Effect_dist_effectEffect = require('../Effect/dist/effect-Effect.cjs.dev.js');
|
|
11
|
+
var Either_dist_effectEither = require('../Either/dist/effect-Either.cjs.dev.js');
|
|
12
|
+
var Equal_dist_effectEqual = require('../Equal/dist/effect-Equal.cjs.dev.js');
|
|
13
|
+
var Exit_dist_effectExit = require('../Exit/dist/effect-Exit.cjs.dev.js');
|
|
14
|
+
var Fiber_dist_effectFiber = require('../Fiber/dist/effect-Fiber.cjs.dev.js');
|
|
15
|
+
var Function_dist_effectFunction = require('../Function/dist/effect-Function.cjs.dev.js');
|
|
16
|
+
var Layer_dist_effectLayer = require('../Layer/dist/effect-Layer.cjs.dev.js');
|
|
17
|
+
var Option_dist_effectOption = require('../Option/dist/effect-Option.cjs.dev.js');
|
|
18
|
+
var Pipeable_dist_effectPipeable = require('../Pipeable/dist/effect-Pipeable.cjs.dev.js');
|
|
19
|
+
var PubSub_dist_effectPubSub = require('../PubSub/dist/effect-PubSub.cjs.dev.js');
|
|
20
|
+
var Queue_dist_effectQueue = require('../Queue/dist/effect-Queue.cjs.dev.js');
|
|
21
|
+
var Ref_dist_effectRef = require('./Ref-f990026b.cjs.dev.js');
|
|
22
|
+
var Runtime_dist_effectRuntime = require('../Runtime/dist/effect-Runtime.cjs.dev.js');
|
|
23
|
+
var Schedule_dist_effectSchedule = require('../Schedule/dist/effect-Schedule.cjs.dev.js');
|
|
24
|
+
var Scope_dist_effectScope = require('../Scope/dist/effect-Scope.cjs.dev.js');
|
|
25
|
+
var StreamHaltStrategy_dist_effectStreamHaltStrategy = require('./StreamHaltStrategy-9a61b88d.cjs.dev.js');
|
|
26
|
+
var sink = require('./sink-1794329b.cjs.dev.js');
|
|
27
|
+
var mergeStrategy = require('./mergeStrategy-81ea5b80.cjs.dev.js');
|
|
28
|
+
var singleProducerAsyncInput = require('./singleProducerAsyncInput-ece7387b.cjs.dev.js');
|
|
29
|
+
var take$2 = require('./take-d4fa1beb.cjs.dev.js');
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
class RingBuffer {
|
|
33
|
+
size = 0;
|
|
34
|
+
current = 0;
|
|
35
|
+
constructor(capacity) {
|
|
36
|
+
this.capacity = capacity;
|
|
37
|
+
this.array = Array.from({
|
|
38
|
+
length: capacity
|
|
39
|
+
}, Function_dist_effectFunction.constUndefined);
|
|
40
|
+
}
|
|
41
|
+
head() {
|
|
42
|
+
return Option_dist_effectOption.fromNullable(this.array[this.current]);
|
|
43
|
+
}
|
|
44
|
+
lastOrNull() {
|
|
45
|
+
if (this.size === 0) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
const index = this.current === 0 ? this.array.length - 1 : this.current - 1;
|
|
49
|
+
return this.array[index] ?? undefined;
|
|
50
|
+
}
|
|
51
|
+
put(value) {
|
|
52
|
+
this.array[this.current] = value;
|
|
53
|
+
this.increment();
|
|
54
|
+
}
|
|
55
|
+
dropLast() {
|
|
56
|
+
if (this.size > 0) {
|
|
57
|
+
this.decrement();
|
|
58
|
+
this.array[this.current] = undefined;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
toChunk() {
|
|
62
|
+
const begin = this.current - this.size;
|
|
63
|
+
const newArray = begin < 0 ? [...this.array.slice(this.capacity + begin, this.capacity), ...this.array.slice(0, this.current)] : this.array.slice(begin, this.current);
|
|
64
|
+
return Chunk_dist_effectChunk.fromIterable(newArray);
|
|
65
|
+
}
|
|
66
|
+
increment() {
|
|
67
|
+
if (this.size < this.capacity) {
|
|
68
|
+
this.size += 1;
|
|
69
|
+
}
|
|
70
|
+
this.current = (this.current + 1) % this.capacity;
|
|
71
|
+
}
|
|
72
|
+
decrement() {
|
|
73
|
+
this.size -= 1;
|
|
74
|
+
if (this.current > 0) {
|
|
75
|
+
this.current -= 1;
|
|
76
|
+
} else {
|
|
77
|
+
this.current = this.capacity - 1;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
const OP_NOT_STARTED = "NotStarted";
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
const OP_PREVIOUS = "Previous";
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
|
|
94
|
+
/** @internal */
|
|
95
|
+
const OP_CURRENT = "Current";
|
|
96
|
+
|
|
97
|
+
/** @internal */
|
|
98
|
+
|
|
99
|
+
/** @internal */
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
const notStarted = {
|
|
105
|
+
_tag: OP_NOT_STARTED
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
const previous = fiber => ({
|
|
110
|
+
_tag: OP_PREVIOUS,
|
|
111
|
+
fiber
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
const current = fiber => ({
|
|
116
|
+
_tag: OP_CURRENT,
|
|
117
|
+
fiber
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
/** @internal */
|
|
121
|
+
const make$2 = emit => {
|
|
122
|
+
const ops = {
|
|
123
|
+
chunk(as) {
|
|
124
|
+
return this(Effect_dist_effectEffect.succeed(as));
|
|
125
|
+
},
|
|
126
|
+
die(defect) {
|
|
127
|
+
return this(Effect_dist_effectEffect.die(defect));
|
|
128
|
+
},
|
|
129
|
+
dieMessage(message) {
|
|
130
|
+
return this(Effect_dist_effectEffect.dieMessage(message));
|
|
131
|
+
},
|
|
132
|
+
done(exit) {
|
|
133
|
+
return this(Effect_dist_effectEffect.suspend(() => Exit_dist_effectExit.mapBoth(exit, {
|
|
134
|
+
onFailure: Option_dist_effectOption.some,
|
|
135
|
+
onSuccess: Chunk_dist_effectChunk.of
|
|
136
|
+
})));
|
|
137
|
+
},
|
|
138
|
+
end() {
|
|
139
|
+
return this(Effect_dist_effectEffect.fail(Option_dist_effectOption.none()));
|
|
140
|
+
},
|
|
141
|
+
fail(e) {
|
|
142
|
+
return this(Effect_dist_effectEffect.fail(Option_dist_effectOption.some(e)));
|
|
143
|
+
},
|
|
144
|
+
fromEffect(effect) {
|
|
145
|
+
return this(Effect_dist_effectEffect.mapBoth(effect, {
|
|
146
|
+
onFailure: Option_dist_effectOption.some,
|
|
147
|
+
onSuccess: Chunk_dist_effectChunk.of
|
|
148
|
+
}));
|
|
149
|
+
},
|
|
150
|
+
fromEffectChunk(effect) {
|
|
151
|
+
return this(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some)));
|
|
152
|
+
},
|
|
153
|
+
halt(cause) {
|
|
154
|
+
return this(Effect_dist_effectEffect.failCause(Function_dist_effectFunction.pipe(cause, Cause_dist_effectCause.map(Option_dist_effectOption.some))));
|
|
155
|
+
},
|
|
156
|
+
single(value) {
|
|
157
|
+
return this(Effect_dist_effectEffect.succeed(Chunk_dist_effectChunk.of(value)));
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
return Object.assign(emit, ops);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
const HandoffTypeId = /*#__PURE__*/Symbol.for("effect/Stream/Handoff");
|
|
165
|
+
|
|
166
|
+
/** @internal */
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* A synchronous queue-like abstraction that allows a producer to offer an
|
|
170
|
+
* element and wait for it to be taken, and allows a consumer to wait for an
|
|
171
|
+
* element to be available.
|
|
172
|
+
*
|
|
173
|
+
* @internal
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
/** @internal */
|
|
177
|
+
const OP_HANDOFF_STATE_EMPTY = "Empty";
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
|
|
181
|
+
/** @internal */
|
|
182
|
+
const OP_HANDOFF_STATE_FULL = "Full";
|
|
183
|
+
|
|
184
|
+
/** @internal */
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
|
|
188
|
+
/** @internal */
|
|
189
|
+
const handoffStateEmpty = notifyConsumer => ({
|
|
190
|
+
_tag: OP_HANDOFF_STATE_EMPTY,
|
|
191
|
+
notifyConsumer
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
/** @internal */
|
|
195
|
+
const handoffStateFull = (value, notifyProducer) => ({
|
|
196
|
+
_tag: OP_HANDOFF_STATE_FULL,
|
|
197
|
+
value,
|
|
198
|
+
notifyProducer
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
/** @internal */
|
|
202
|
+
const handoffStateMatch = (onEmpty, onFull) => {
|
|
203
|
+
return self => {
|
|
204
|
+
switch (self._tag) {
|
|
205
|
+
case OP_HANDOFF_STATE_EMPTY:
|
|
206
|
+
{
|
|
207
|
+
return onEmpty(self.notifyConsumer);
|
|
208
|
+
}
|
|
209
|
+
case OP_HANDOFF_STATE_FULL:
|
|
210
|
+
{
|
|
211
|
+
return onFull(self.value, self.notifyProducer);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/** @internal */
|
|
218
|
+
const handoffVariance = {
|
|
219
|
+
_A: _ => _
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
const make$1 = () => Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.flatMap(deferred => Ref_dist_effectRef.make(handoffStateEmpty(deferred))), Effect_dist_effectEffect.map(ref => ({
|
|
224
|
+
[HandoffTypeId]: handoffVariance,
|
|
225
|
+
ref
|
|
226
|
+
})));
|
|
227
|
+
|
|
228
|
+
/** @internal */
|
|
229
|
+
const offer = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, value) => {
|
|
230
|
+
return Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred.make(), deferred => Effect_dist_effectEffect.flatten(Ref_dist_effectRef.modify(self.ref, state => Function_dist_effectFunction.pipe(state, handoffStateMatch(notifyConsumer => [Effect_dist_effectEffect.zipRight(Deferred_dist_effectDeferred.succeed(notifyConsumer, void 0), Deferred_dist_effectDeferred["await"](deferred)), handoffStateFull(value, deferred)], (_, notifyProducer) => [Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred["await"](notifyProducer), () => Function_dist_effectFunction.pipe(self, offer(value))), state])))));
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
/** @internal */
|
|
234
|
+
const take$1 = self => Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred.make(), deferred => Effect_dist_effectEffect.flatten(Ref_dist_effectRef.modify(self.ref, state => Function_dist_effectFunction.pipe(state, handoffStateMatch(notifyConsumer => [Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred["await"](notifyConsumer), () => take$1(self)), state], (value, notifyProducer) => [Effect_dist_effectEffect.as(Deferred_dist_effectDeferred.succeed(notifyProducer, void 0), value), handoffStateEmpty(deferred)])))));
|
|
235
|
+
|
|
236
|
+
/** @internal */
|
|
237
|
+
|
|
238
|
+
/** @internal */
|
|
239
|
+
const OP_EMIT = "Emit";
|
|
240
|
+
|
|
241
|
+
/** @internal */
|
|
242
|
+
|
|
243
|
+
/** @internal */
|
|
244
|
+
const OP_HALT = "Halt";
|
|
245
|
+
|
|
246
|
+
/** @internal */
|
|
247
|
+
|
|
248
|
+
/** @internal */
|
|
249
|
+
const OP_END = "End";
|
|
250
|
+
|
|
251
|
+
/** @internal */
|
|
252
|
+
|
|
253
|
+
/** @internal */
|
|
254
|
+
|
|
255
|
+
/** @internal */
|
|
256
|
+
|
|
257
|
+
/** @internal */
|
|
258
|
+
const emit = elements => ({
|
|
259
|
+
_tag: OP_EMIT,
|
|
260
|
+
elements
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
/** @internal */
|
|
264
|
+
const halt = cause => ({
|
|
265
|
+
_tag: OP_HALT,
|
|
266
|
+
cause
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
/** @internal */
|
|
270
|
+
const end$1 = reason => ({
|
|
271
|
+
_tag: OP_END,
|
|
272
|
+
reason
|
|
273
|
+
});
|
|
274
|
+
|
|
275
|
+
/** @internal */
|
|
276
|
+
const end = () => Effect_dist_effectEffect.fail(Option_dist_effectOption.none());
|
|
277
|
+
|
|
278
|
+
/** @internal */
|
|
279
|
+
const failCause$1 = cause => Effect_dist_effectEffect.mapError(Effect_dist_effectEffect.failCause(cause), Option_dist_effectOption.some);
|
|
280
|
+
|
|
281
|
+
/** @internal */
|
|
282
|
+
|
|
283
|
+
/** @internal */
|
|
284
|
+
const OP_SCHEDULE_END = "ScheduleEnd";
|
|
285
|
+
|
|
286
|
+
/** @internal */
|
|
287
|
+
|
|
288
|
+
/** @internal */
|
|
289
|
+
const OP_UPSTREAM_END = "UpstreamEnd";
|
|
290
|
+
|
|
291
|
+
/** @internal */
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
|
|
295
|
+
/** @internal */
|
|
296
|
+
|
|
297
|
+
/** @internal */
|
|
298
|
+
const ScheduleEnd = {
|
|
299
|
+
_tag: OP_SCHEDULE_END
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
/** @internal */
|
|
303
|
+
const UpstreamEnd = {
|
|
304
|
+
_tag: OP_UPSTREAM_END
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
/** @internal */
|
|
308
|
+
|
|
309
|
+
/** @internal */
|
|
310
|
+
const OP_DRAIN_LEFT = "DrainLeft";
|
|
311
|
+
|
|
312
|
+
/** @internal */
|
|
313
|
+
|
|
314
|
+
/** @internal */
|
|
315
|
+
const OP_DRAIN_RIGHT = "DrainRight";
|
|
316
|
+
|
|
317
|
+
/** @internal */
|
|
318
|
+
|
|
319
|
+
/** @internal */
|
|
320
|
+
const OP_PULL_BOTH$1 = "PullBoth";
|
|
321
|
+
|
|
322
|
+
/** @internal */
|
|
323
|
+
|
|
324
|
+
/** @internal */
|
|
325
|
+
const OP_PULL_LEFT$1 = "PullLeft";
|
|
326
|
+
|
|
327
|
+
/** @internal */
|
|
328
|
+
|
|
329
|
+
/** @internal */
|
|
330
|
+
const OP_PULL_RIGHT$1 = "PullRight";
|
|
331
|
+
|
|
332
|
+
/** @internal */
|
|
333
|
+
|
|
334
|
+
/** @internal */
|
|
335
|
+
|
|
336
|
+
/** @internal */
|
|
337
|
+
|
|
338
|
+
/** @internal */
|
|
339
|
+
|
|
340
|
+
/** @internal */
|
|
341
|
+
|
|
342
|
+
/** @internal */
|
|
343
|
+
|
|
344
|
+
/** @internal */
|
|
345
|
+
const DrainLeft = {
|
|
346
|
+
_tag: OP_DRAIN_LEFT
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
/** @internal */
|
|
350
|
+
const DrainRight = {
|
|
351
|
+
_tag: OP_DRAIN_RIGHT
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
/** @internal */
|
|
355
|
+
const PullBoth$1 = {
|
|
356
|
+
_tag: OP_PULL_BOTH$1
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
/** @internal */
|
|
360
|
+
const PullLeft$1 = rightChunk => ({
|
|
361
|
+
_tag: OP_PULL_LEFT$1,
|
|
362
|
+
rightChunk
|
|
363
|
+
});
|
|
364
|
+
|
|
365
|
+
/** @internal */
|
|
366
|
+
const PullRight$1 = leftChunk => ({
|
|
367
|
+
_tag: OP_PULL_RIGHT$1,
|
|
368
|
+
leftChunk
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
/** @internal */
|
|
372
|
+
|
|
373
|
+
/** @internal */
|
|
374
|
+
const OP_PULL_BOTH = "PullBoth";
|
|
375
|
+
|
|
376
|
+
/** @internal */
|
|
377
|
+
|
|
378
|
+
/** @internal */
|
|
379
|
+
const OP_PULL_LEFT = "PullLet";
|
|
380
|
+
|
|
381
|
+
/** @internal */
|
|
382
|
+
|
|
383
|
+
/** @internal */
|
|
384
|
+
const OP_PULL_RIGHT = "PullRight";
|
|
385
|
+
|
|
386
|
+
/** @internal */
|
|
387
|
+
|
|
388
|
+
/** @internal */
|
|
389
|
+
|
|
390
|
+
/** @internal */
|
|
391
|
+
|
|
392
|
+
/** @internal */
|
|
393
|
+
|
|
394
|
+
/** @internal */
|
|
395
|
+
const PullBoth = {
|
|
396
|
+
_tag: OP_PULL_BOTH
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
/** @internal */
|
|
400
|
+
const PullLeft = rightChunk => ({
|
|
401
|
+
_tag: OP_PULL_LEFT,
|
|
402
|
+
rightChunk
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
/** @internal */
|
|
406
|
+
const PullRight = leftChunk => ({
|
|
407
|
+
_tag: OP_PULL_RIGHT,
|
|
408
|
+
leftChunk
|
|
409
|
+
});
|
|
410
|
+
|
|
411
|
+
/** @internal */
|
|
412
|
+
const StreamSymbolKey = "effect/Stream";
|
|
413
|
+
|
|
414
|
+
/** @internal */
|
|
415
|
+
const StreamTypeId = /*#__PURE__*/Symbol.for(StreamSymbolKey);
|
|
416
|
+
|
|
417
|
+
/** @internal */
|
|
418
|
+
const streamVariance = {
|
|
419
|
+
_R: _ => _,
|
|
420
|
+
_E: _ => _,
|
|
421
|
+
_A: _ => _
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
/** @internal */
|
|
425
|
+
class StreamImpl {
|
|
426
|
+
[StreamTypeId] = streamVariance;
|
|
427
|
+
constructor(channel) {
|
|
428
|
+
this.channel = channel;
|
|
429
|
+
}
|
|
430
|
+
pipe() {
|
|
431
|
+
return Pipeable_dist_effectPipeable.pipeArguments(this, arguments);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/** @internal */
|
|
436
|
+
const isStream = u => typeof u === "object" && u != null && StreamTypeId in u || Effect_dist_effectEffect.isEffect(u);
|
|
437
|
+
|
|
438
|
+
/** @internal */
|
|
439
|
+
const DefaultChunkSize = 4096;
|
|
440
|
+
|
|
441
|
+
/** @internal */
|
|
442
|
+
const acquireRelease = (acquire, release) => scoped(Effect_dist_effectEffect.acquireRelease(acquire, release));
|
|
443
|
+
|
|
444
|
+
/** @internal */
|
|
445
|
+
const aggregate = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink) => aggregateWithin(self, sink, Schedule_dist_effectSchedule.forever));
|
|
446
|
+
|
|
447
|
+
/** @internal */
|
|
448
|
+
const aggregateWithin = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, sink, schedule) => filterMap(aggregateWithinEither(self, sink, schedule), _ => Either_dist_effectEither.match(_, {
|
|
449
|
+
onLeft: Option_dist_effectOption.none,
|
|
450
|
+
onRight: Option_dist_effectOption.some
|
|
451
|
+
})));
|
|
452
|
+
|
|
453
|
+
/** @internal */
|
|
454
|
+
const aggregateWithinEither = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, sink$1, schedule) => {
|
|
455
|
+
const layer = Effect_dist_effectEffect.all([make$1(), Ref_dist_effectRef.make(ScheduleEnd), Ref_dist_effectRef.make(Chunk_dist_effectChunk.empty()), Schedule_dist_effectSchedule.driver(schedule), Ref_dist_effectRef.make(false), Ref_dist_effectRef.make(false)]);
|
|
456
|
+
return Function_dist_effectFunction.pipe(fromEffect(layer), flatMap(([handoff, sinkEndReason, sinkLeftovers, scheduleDriver, consumed, endAfterEmit]) => {
|
|
457
|
+
const handoffProducer = sink.readWithCause({
|
|
458
|
+
onInput: input => sink.flatMap(sink.fromEffect(Function_dist_effectFunction.pipe(handoff, offer(emit(input)), Effect_dist_effectEffect.when(() => Chunk_dist_effectChunk.isNonEmpty(input)))), () => handoffProducer),
|
|
459
|
+
onFailure: cause => sink.fromEffect(offer(handoff, halt(cause))),
|
|
460
|
+
onDone: () => sink.fromEffect(offer(handoff, end$1(UpstreamEnd)))
|
|
461
|
+
});
|
|
462
|
+
const handoffConsumer = Function_dist_effectFunction.pipe(Ref_dist_effectRef.getAndSet(sinkLeftovers, Chunk_dist_effectChunk.empty()), Effect_dist_effectEffect.flatMap(leftovers => {
|
|
463
|
+
if (Chunk_dist_effectChunk.isNonEmpty(leftovers)) {
|
|
464
|
+
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(consumed, true), Effect_dist_effectEffect.zipRight(Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(sink.write(leftovers), sink.flatMap(() => handoffConsumer)))));
|
|
465
|
+
}
|
|
466
|
+
return Function_dist_effectFunction.pipe(take$1(handoff), Effect_dist_effectEffect.map(signal => {
|
|
467
|
+
switch (signal._tag) {
|
|
468
|
+
case OP_EMIT:
|
|
469
|
+
{
|
|
470
|
+
return Function_dist_effectFunction.pipe(sink.fromEffect(Ref_dist_effectRef.set(consumed, true)), sink.zipRight(sink.write(signal.elements)), sink.zipRight(sink.fromEffect(Ref_dist_effectRef.get(endAfterEmit))), sink.flatMap(bool => bool ? sink.unit : handoffConsumer));
|
|
471
|
+
}
|
|
472
|
+
case OP_HALT:
|
|
473
|
+
{
|
|
474
|
+
return sink.failCause(signal.cause);
|
|
475
|
+
}
|
|
476
|
+
case OP_END:
|
|
477
|
+
{
|
|
478
|
+
if (signal.reason._tag === OP_SCHEDULE_END) {
|
|
479
|
+
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(consumed), Effect_dist_effectEffect.map(bool => bool ? sink.fromEffect(Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(sinkEndReason, ScheduleEnd), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(endAfterEmit, true)))) : Function_dist_effectFunction.pipe(sink.fromEffect(Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(sinkEndReason, ScheduleEnd), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(endAfterEmit, true)))), sink.flatMap(() => handoffConsumer))), sink.unwrap);
|
|
480
|
+
}
|
|
481
|
+
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(sinkEndReason, signal.reason), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(endAfterEmit, true)), sink.fromEffect);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}));
|
|
485
|
+
}), sink.unwrap);
|
|
486
|
+
const timeout = lastB => scheduleDriver.next(lastB);
|
|
487
|
+
const scheduledAggregator = (sinkFiber, scheduleFiber, scope) => {
|
|
488
|
+
const forkSink = Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(consumed, false), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(endAfterEmit, false)), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(handoffConsumer, sink.pipeToOrFail(sink.toChannel(sink$1)), sink.collectElements, sink.run, Effect_dist_effectEffect.forkIn(scope))));
|
|
489
|
+
const handleSide = (leftovers, b, c) => Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(sinkLeftovers, Chunk_dist_effectChunk.flatten(leftovers)), Effect_dist_effectEffect.zipRight(Effect_dist_effectEffect.map(Ref_dist_effectRef.get(sinkEndReason), reason => {
|
|
490
|
+
switch (reason._tag) {
|
|
491
|
+
case OP_SCHEDULE_END:
|
|
492
|
+
{
|
|
493
|
+
return Function_dist_effectFunction.pipe(Effect_dist_effectEffect.all([Ref_dist_effectRef.get(consumed), forkSink, Function_dist_effectFunction.pipe(timeout(Option_dist_effectOption.some(b)), Effect_dist_effectEffect.forkIn(scope))]), Effect_dist_effectEffect.map(([wasConsumed, sinkFiber, scheduleFiber]) => {
|
|
494
|
+
const toWrite = Function_dist_effectFunction.pipe(c, Option_dist_effectOption.match({
|
|
495
|
+
onNone: () => Chunk_dist_effectChunk.of(Either_dist_effectEither.right(b)),
|
|
496
|
+
onSome: c => Chunk_dist_effectChunk.make(Either_dist_effectEither.right(b), Either_dist_effectEither.left(c))
|
|
497
|
+
}));
|
|
498
|
+
if (wasConsumed) {
|
|
499
|
+
return Function_dist_effectFunction.pipe(sink.write(toWrite), sink.flatMap(() => scheduledAggregator(sinkFiber, scheduleFiber, scope)));
|
|
500
|
+
}
|
|
501
|
+
return scheduledAggregator(sinkFiber, scheduleFiber, scope);
|
|
502
|
+
}), sink.unwrap);
|
|
503
|
+
}
|
|
504
|
+
case OP_UPSTREAM_END:
|
|
505
|
+
{
|
|
506
|
+
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(consumed), Effect_dist_effectEffect.map(wasConsumed => wasConsumed ? sink.write(Chunk_dist_effectChunk.of(Either_dist_effectEither.right(b))) : sink.unit), sink.unwrap);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
})), sink.unwrap);
|
|
510
|
+
return sink.unwrap(Effect_dist_effectEffect.raceWith(Fiber_dist_effectFiber.join(sinkFiber), Fiber_dist_effectFiber.join(scheduleFiber), {
|
|
511
|
+
onSelfDone: (sinkExit, _) => Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(scheduleFiber), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.suspend(() => sinkExit), Effect_dist_effectEffect.map(([leftovers, b]) => handleSide(leftovers, b, Option_dist_effectOption.none()))))),
|
|
512
|
+
onOtherDone: (scheduleExit, _) => Effect_dist_effectEffect.matchCauseEffect(Effect_dist_effectEffect.suspend(() => scheduleExit), {
|
|
513
|
+
onFailure: cause => Either_dist_effectEither.match(Cause_dist_effectCause.failureOrCause(cause), {
|
|
514
|
+
onLeft: () => Function_dist_effectFunction.pipe(handoff, offer(end$1(ScheduleEnd)), Effect_dist_effectEffect.forkDaemon, Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(sinkFiber), Effect_dist_effectEffect.map(([leftovers, b]) => handleSide(leftovers, b, Option_dist_effectOption.none()))))),
|
|
515
|
+
onRight: cause => Function_dist_effectFunction.pipe(handoff, offer(halt(cause)), Effect_dist_effectEffect.forkDaemon, Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(sinkFiber), Effect_dist_effectEffect.map(([leftovers, b]) => handleSide(leftovers, b, Option_dist_effectOption.none())))))
|
|
516
|
+
}),
|
|
517
|
+
onSuccess: c => Function_dist_effectFunction.pipe(handoff, offer(end$1(ScheduleEnd)), Effect_dist_effectEffect.forkDaemon, Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(sinkFiber), Effect_dist_effectEffect.map(([leftovers, b]) => handleSide(leftovers, b, Option_dist_effectOption.some(c))))))
|
|
518
|
+
})
|
|
519
|
+
}));
|
|
520
|
+
};
|
|
521
|
+
return unwrapScoped(Function_dist_effectFunction.pipe(self, toChannel, sink.pipeTo(handoffProducer), sink.run, Effect_dist_effectEffect.forkScoped, Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(handoffConsumer, sink.pipeToOrFail(sink.toChannel(sink$1)), sink.collectElements, sink.run, Effect_dist_effectEffect.forkScoped, Effect_dist_effectEffect.flatMap(sinkFiber => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.forkScoped(timeout(Option_dist_effectOption.none())), Effect_dist_effectEffect.flatMap(scheduleFiber => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.scope, Effect_dist_effectEffect.map(scope => new StreamImpl(scheduledAggregator(sinkFiber, scheduleFiber, scope)))))))))));
|
|
522
|
+
}));
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
/** @internal */
|
|
526
|
+
const as = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, value) => map(self, () => value));
|
|
527
|
+
|
|
528
|
+
/** @internal */
|
|
529
|
+
const _async = (register, outputBuffer = 16) => asyncOption(cb => {
|
|
530
|
+
register(cb);
|
|
531
|
+
return Option_dist_effectOption.none();
|
|
532
|
+
}, outputBuffer);
|
|
533
|
+
|
|
534
|
+
/** @internal */
|
|
535
|
+
const asyncEffect = (register, outputBuffer = 16) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.bounded(outputBuffer), queue => Queue_dist_effectQueue.shutdown(queue)), Effect_dist_effectEffect.flatMap(output => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.runtime(), Effect_dist_effectEffect.flatMap(runtime => Function_dist_effectFunction.pipe(register(make$2(k => Function_dist_effectFunction.pipe(take$2.fromPull(k), Effect_dist_effectEffect.flatMap(take => Queue_dist_effectQueue.offer(output, take)), Effect_dist_effectEffect.asUnit, Runtime_dist_effectRuntime.runPromiseExit(runtime)).then(exit => {
|
|
536
|
+
if (Exit_dist_effectExit.isFailure(exit)) {
|
|
537
|
+
if (!Cause_dist_effectCause.isInterrupted(exit.cause)) {
|
|
538
|
+
throw Cause_dist_effectCause.squash(exit.cause);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
}))), Effect_dist_effectEffect.map(() => {
|
|
542
|
+
const loop = Function_dist_effectFunction.pipe(Queue_dist_effectQueue.take(output), Effect_dist_effectEffect.flatMap(take$2.done), Effect_dist_effectEffect.match({
|
|
543
|
+
onFailure: maybeError => Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.shutdown(output)), sink.zipRight(Option_dist_effectOption.match(maybeError, {
|
|
544
|
+
onNone: () => sink.unit,
|
|
545
|
+
onSome: sink.fail
|
|
546
|
+
}))),
|
|
547
|
+
onSuccess: chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => loop))
|
|
548
|
+
}), sink.unwrap);
|
|
549
|
+
return loop;
|
|
550
|
+
}))))), sink.unwrapScoped, fromChannel);
|
|
551
|
+
|
|
552
|
+
/** @internal */
|
|
553
|
+
const asyncInterrupt = (register, outputBuffer = 16) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.bounded(outputBuffer), queue => Queue_dist_effectQueue.shutdown(queue)), Effect_dist_effectEffect.flatMap(output => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.runtime(), Effect_dist_effectEffect.flatMap(runtime => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.sync(() => register(make$2(k => Function_dist_effectFunction.pipe(take$2.fromPull(k), Effect_dist_effectEffect.flatMap(take => Queue_dist_effectQueue.offer(output, take)), Effect_dist_effectEffect.asUnit, Runtime_dist_effectRuntime.runPromiseExit(runtime)).then(exit => {
|
|
554
|
+
if (Exit_dist_effectExit.isFailure(exit)) {
|
|
555
|
+
if (!Cause_dist_effectCause.isInterrupted(exit.cause)) {
|
|
556
|
+
throw Cause_dist_effectCause.squash(exit.cause);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
})))), Effect_dist_effectEffect.map(Either_dist_effectEither.match({
|
|
560
|
+
onLeft: canceler => {
|
|
561
|
+
const loop = Function_dist_effectFunction.pipe(Queue_dist_effectQueue.take(output), Effect_dist_effectEffect.flatMap(take$2.done), Effect_dist_effectEffect.match({
|
|
562
|
+
onFailure: maybeError => sink.zipRight(sink.fromEffect(Queue_dist_effectQueue.shutdown(output)), Option_dist_effectOption.match(maybeError, {
|
|
563
|
+
onNone: () => sink.unit,
|
|
564
|
+
onSome: sink.fail
|
|
565
|
+
})),
|
|
566
|
+
onSuccess: chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => loop))
|
|
567
|
+
}), sink.unwrap);
|
|
568
|
+
return Function_dist_effectFunction.pipe(fromChannel(loop), ensuring(canceler));
|
|
569
|
+
},
|
|
570
|
+
onRight: stream => unwrap(Function_dist_effectFunction.pipe(Queue_dist_effectQueue.shutdown(output), Effect_dist_effectEffect.as(stream)))
|
|
571
|
+
})))))), unwrapScoped);
|
|
572
|
+
|
|
573
|
+
/** @internal */
|
|
574
|
+
const asyncOption = (register, outputBuffer = 16) => asyncInterrupt(emit => Option_dist_effectOption.match(register(emit), {
|
|
575
|
+
onNone: () => Either_dist_effectEither.left(Effect_dist_effectEffect.unit),
|
|
576
|
+
onSome: Either_dist_effectEither.right
|
|
577
|
+
}), outputBuffer);
|
|
578
|
+
|
|
579
|
+
/** @internal */
|
|
580
|
+
const asyncScoped = (register, outputBuffer = 16) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.bounded(outputBuffer), queue => Queue_dist_effectQueue.shutdown(queue)), Effect_dist_effectEffect.flatMap(output => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.runtime(), Effect_dist_effectEffect.flatMap(runtime => Function_dist_effectFunction.pipe(register(make$2(k => Function_dist_effectFunction.pipe(take$2.fromPull(k), Effect_dist_effectEffect.flatMap(take => Queue_dist_effectQueue.offer(output, take)), Effect_dist_effectEffect.asUnit, Runtime_dist_effectRuntime.runPromiseExit(runtime)).then(exit => {
|
|
581
|
+
if (Exit_dist_effectExit.isFailure(exit)) {
|
|
582
|
+
if (!Cause_dist_effectCause.isInterrupted(exit.cause)) {
|
|
583
|
+
throw Cause_dist_effectCause.squash(exit.cause);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
}))), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.make(false)), Effect_dist_effectEffect.flatMap(ref => Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(ref), Effect_dist_effectEffect.map(isDone => isDone ? end() : Function_dist_effectFunction.pipe(Queue_dist_effectQueue.take(output), Effect_dist_effectEffect.flatMap(take$2.done), Effect_dist_effectEffect.onError(() => Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(ref, true), Effect_dist_effectEffect.zipRight(Queue_dist_effectQueue.shutdown(output)))))))))))), scoped, flatMap(repeatEffectChunkOption));
|
|
587
|
+
|
|
588
|
+
/** @internal */
|
|
589
|
+
const branchAfter = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, n, f) => suspend(() => {
|
|
590
|
+
const buffering = acc => sink.readWith({
|
|
591
|
+
onInput: input => {
|
|
592
|
+
const nextSize = acc.length + input.length;
|
|
593
|
+
if (nextSize >= n) {
|
|
594
|
+
const [b1, b2] = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.splitAt(n - acc.length));
|
|
595
|
+
return running(Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(b1)), b2);
|
|
596
|
+
}
|
|
597
|
+
return buffering(Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.appendAll(input)));
|
|
598
|
+
},
|
|
599
|
+
onFailure: sink.fail,
|
|
600
|
+
onDone: () => running(acc, Chunk_dist_effectChunk.empty())
|
|
601
|
+
});
|
|
602
|
+
const running = (prefix, leftover) => sink.pipeTo(sink.zipRight(sink.write(leftover), sink.identityChannel()), toChannel(f(prefix)));
|
|
603
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(buffering(Chunk_dist_effectChunk.empty()))));
|
|
604
|
+
}));
|
|
605
|
+
|
|
606
|
+
/** @internal */
|
|
607
|
+
const broadcast = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, n, maximumLag) => Function_dist_effectFunction.pipe(self, broadcastedQueues(n, maximumLag), Effect_dist_effectEffect.map(tuple => tuple.map(queue => flattenTake(fromQueue(queue, {
|
|
608
|
+
shutdown: true
|
|
609
|
+
}))))));
|
|
610
|
+
|
|
611
|
+
/** @internal */
|
|
612
|
+
const broadcastDynamic = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, maximumLag) => Function_dist_effectFunction.pipe(self, broadcastedQueuesDynamic(maximumLag), Effect_dist_effectEffect.map(effect => flattenTake(flatMap(scoped(effect), fromQueue)))));
|
|
613
|
+
|
|
614
|
+
/** @internal */
|
|
615
|
+
const broadcastedQueues = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, n, maximumLag) => Effect_dist_effectEffect.flatMap(PubSub_dist_effectPubSub.bounded(maximumLag), pubsub => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.all(Array.from({
|
|
616
|
+
length: n
|
|
617
|
+
}, () => PubSub_dist_effectPubSub.subscribe(pubsub))), Effect_dist_effectEffect.tap(() => Effect_dist_effectEffect.forkScoped(runIntoPubSubScoped(self, pubsub))))));
|
|
618
|
+
|
|
619
|
+
/** @internal */
|
|
620
|
+
const broadcastedQueuesDynamic = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, maximumLag) => Effect_dist_effectEffect.map(toPubSub(self, maximumLag), PubSub_dist_effectPubSub.subscribe));
|
|
621
|
+
|
|
622
|
+
/** @internal */
|
|
623
|
+
const buffer = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
624
|
+
if (options.capacity === "unbounded") {
|
|
625
|
+
return bufferUnbounded(self);
|
|
626
|
+
} else if (options.strategy === "dropping") {
|
|
627
|
+
return bufferDropping(self, options.capacity);
|
|
628
|
+
} else if (options.strategy === "sliding") {
|
|
629
|
+
return bufferSliding(self, options.capacity);
|
|
630
|
+
}
|
|
631
|
+
const queue = toQueueOfElements(self, options);
|
|
632
|
+
return new StreamImpl(sink.unwrapScoped(Effect_dist_effectEffect.map(queue, queue => {
|
|
633
|
+
const process = Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.take(queue)), sink.flatMap(Exit_dist_effectExit.match({
|
|
634
|
+
onFailure: cause => Function_dist_effectFunction.pipe(Cause_dist_effectCause.flipCauseOption(cause), Option_dist_effectOption.match({
|
|
635
|
+
onNone: () => sink.unit,
|
|
636
|
+
onSome: sink.failCause
|
|
637
|
+
})),
|
|
638
|
+
onSuccess: value => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(value)), () => process)
|
|
639
|
+
})));
|
|
640
|
+
return process;
|
|
641
|
+
})));
|
|
642
|
+
});
|
|
643
|
+
|
|
644
|
+
/** @internal */
|
|
645
|
+
const bufferChunks = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
646
|
+
if (options.strategy === "dropping") {
|
|
647
|
+
return bufferChunksDropping(self, options.capacity);
|
|
648
|
+
} else if (options.strategy === "sliding") {
|
|
649
|
+
return bufferChunksSliding(self, options.capacity);
|
|
650
|
+
}
|
|
651
|
+
const queue = toQueue(self, options);
|
|
652
|
+
return new StreamImpl(sink.unwrapScoped(Effect_dist_effectEffect.map(queue, queue => {
|
|
653
|
+
const process = Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.take(queue)), sink.flatMap(take$2.match({
|
|
654
|
+
onEnd: () => sink.unit,
|
|
655
|
+
onFailure: sink.failCause,
|
|
656
|
+
onSuccess: value => Function_dist_effectFunction.pipe(sink.write(value), sink.flatMap(() => process))
|
|
657
|
+
})));
|
|
658
|
+
return process;
|
|
659
|
+
})));
|
|
660
|
+
});
|
|
661
|
+
const bufferChunksDropping = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => {
|
|
662
|
+
const queue = Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.dropping(capacity), queue => Queue_dist_effectQueue.shutdown(queue));
|
|
663
|
+
return new StreamImpl(bufferSignal(queue, toChannel(self)));
|
|
664
|
+
});
|
|
665
|
+
const bufferChunksSliding = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => {
|
|
666
|
+
const queue = Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.sliding(capacity), queue => Queue_dist_effectQueue.shutdown(queue));
|
|
667
|
+
return new StreamImpl(bufferSignal(queue, toChannel(self)));
|
|
668
|
+
});
|
|
669
|
+
const bufferDropping = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => {
|
|
670
|
+
const queue = Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.dropping(capacity), queue => Queue_dist_effectQueue.shutdown(queue));
|
|
671
|
+
return new StreamImpl(bufferSignal(queue, toChannel(rechunk(1)(self))));
|
|
672
|
+
});
|
|
673
|
+
const bufferSliding = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => {
|
|
674
|
+
const queue = Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.sliding(capacity), queue => Queue_dist_effectQueue.shutdown(queue));
|
|
675
|
+
return new StreamImpl(bufferSignal(queue, toChannel(Function_dist_effectFunction.pipe(self, rechunk(1)))));
|
|
676
|
+
});
|
|
677
|
+
const bufferUnbounded = self => {
|
|
678
|
+
const queue = toQueue(self, {
|
|
679
|
+
strategy: "unbounded"
|
|
680
|
+
});
|
|
681
|
+
return new StreamImpl(sink.unwrapScoped(Effect_dist_effectEffect.map(queue, queue => {
|
|
682
|
+
const process = Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.take(queue)), sink.flatMap(take$2.match({
|
|
683
|
+
onEnd: () => sink.unit,
|
|
684
|
+
onFailure: sink.failCause,
|
|
685
|
+
onSuccess: value => sink.flatMap(sink.write(value), () => process)
|
|
686
|
+
})));
|
|
687
|
+
return process;
|
|
688
|
+
})));
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
/** @internal */
|
|
692
|
+
const bufferSignal = (scoped, bufferChannel) => {
|
|
693
|
+
const producer = (queue, ref) => {
|
|
694
|
+
const terminate = take => Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(ref), Effect_dist_effectEffect.tap(Deferred_dist_effectDeferred["await"]), Effect_dist_effectEffect.zipRight(Deferred_dist_effectDeferred.make()), Effect_dist_effectEffect.flatMap(deferred => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.offer(queue, [take, deferred]), Effect_dist_effectEffect.zipRight(Ref_dist_effectRef.set(ref, deferred)), Effect_dist_effectEffect.zipRight(Deferred_dist_effectDeferred["await"](deferred)))), Effect_dist_effectEffect.asUnit, sink.fromEffect);
|
|
695
|
+
return sink.readWithCause({
|
|
696
|
+
onInput: input => Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.flatMap(deferred => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.offer(queue, [take$2.chunk(input), deferred]), Effect_dist_effectEffect.flatMap(added => Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(ref, deferred), Effect_dist_effectEffect.when(() => added))))), Effect_dist_effectEffect.asUnit, sink.fromEffect, sink.flatMap(() => producer(queue, ref))),
|
|
697
|
+
onFailure: error => terminate(take$2.failCause(error)),
|
|
698
|
+
onDone: () => terminate(take$2.end)
|
|
699
|
+
});
|
|
700
|
+
};
|
|
701
|
+
const consumer = queue => {
|
|
702
|
+
const process = Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.take(queue)), sink.flatMap(([take, deferred]) => sink.zipRight(sink.fromEffect(Deferred_dist_effectDeferred.succeed(deferred, void 0)), take$2.match(take, {
|
|
703
|
+
onEnd: () => sink.unit,
|
|
704
|
+
onFailure: sink.failCause,
|
|
705
|
+
onSuccess: value => Function_dist_effectFunction.pipe(sink.write(value), sink.flatMap(() => process))
|
|
706
|
+
}))));
|
|
707
|
+
return process;
|
|
708
|
+
};
|
|
709
|
+
return sink.unwrapScoped(Function_dist_effectFunction.pipe(scoped, Effect_dist_effectEffect.flatMap(queue => Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.tap(start => Deferred_dist_effectDeferred.succeed(start, void 0)), Effect_dist_effectEffect.flatMap(start => Function_dist_effectFunction.pipe(Ref_dist_effectRef.make(start), Effect_dist_effectEffect.flatMap(ref => Function_dist_effectFunction.pipe(bufferChannel, sink.pipeTo(producer(queue, ref)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.as(consumer(queue))))))));
|
|
710
|
+
};
|
|
711
|
+
|
|
712
|
+
/** @internal */
|
|
713
|
+
const catchAll = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => catchAllCause(self, cause => Either_dist_effectEither.match(Cause_dist_effectCause.failureOrCause(cause), {
|
|
714
|
+
onLeft: f,
|
|
715
|
+
onRight: failCause
|
|
716
|
+
})));
|
|
717
|
+
|
|
718
|
+
/** @internal */
|
|
719
|
+
const catchAllCause = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.catchAllCause(cause => toChannel(f(cause))))));
|
|
720
|
+
|
|
721
|
+
/** @internal */
|
|
722
|
+
const catchSome = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => Function_dist_effectFunction.pipe(self, catchAll(error => Function_dist_effectFunction.pipe(pf(error), Option_dist_effectOption.getOrElse(() => fail(error))))));
|
|
723
|
+
|
|
724
|
+
/** @internal */
|
|
725
|
+
const catchSomeCause = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => Function_dist_effectFunction.pipe(self, catchAllCause(cause => Function_dist_effectFunction.pipe(pf(cause), Option_dist_effectOption.getOrElse(() => failCause(cause))))));
|
|
726
|
+
|
|
727
|
+
/* @internal */
|
|
728
|
+
const catchTag = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, k, f) => catchAll(self, e => {
|
|
729
|
+
if ("_tag" in e && e["_tag"] === k) {
|
|
730
|
+
return f(e);
|
|
731
|
+
}
|
|
732
|
+
return fail(e);
|
|
733
|
+
}));
|
|
734
|
+
|
|
735
|
+
/** @internal */
|
|
736
|
+
const catchTags = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, cases) => catchAll(self, e => {
|
|
737
|
+
const keys = Object.keys(cases);
|
|
738
|
+
if ("_tag" in e && keys.includes(e["_tag"])) {
|
|
739
|
+
return cases[e["_tag"]](e);
|
|
740
|
+
}
|
|
741
|
+
return fail(e);
|
|
742
|
+
}));
|
|
743
|
+
|
|
744
|
+
/** @internal */
|
|
745
|
+
const changes = self => Function_dist_effectFunction.pipe(self, changesWith((x, y) => Equal_dist_effectEqual.equals(y)(x)));
|
|
746
|
+
|
|
747
|
+
/** @internal */
|
|
748
|
+
const changesWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
749
|
+
const writer = last => sink.readWithCause({
|
|
750
|
+
onInput: input => {
|
|
751
|
+
const [newLast, newChunk] = Chunk_dist_effectChunk.reduce(input, [last, Chunk_dist_effectChunk.empty()], ([option, outputs], output) => {
|
|
752
|
+
if (Option_dist_effectOption.isSome(option) && f(option.value, output)) {
|
|
753
|
+
return [Option_dist_effectOption.some(output), outputs];
|
|
754
|
+
}
|
|
755
|
+
return [Option_dist_effectOption.some(output), Function_dist_effectFunction.pipe(outputs, Chunk_dist_effectChunk.append(output))];
|
|
756
|
+
});
|
|
757
|
+
return sink.flatMap(sink.write(newChunk), () => writer(newLast));
|
|
758
|
+
},
|
|
759
|
+
onFailure: sink.failCause,
|
|
760
|
+
onDone: () => sink.unit
|
|
761
|
+
});
|
|
762
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer(Option_dist_effectOption.none()))));
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
/** @internal */
|
|
766
|
+
const changesWithEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
767
|
+
const writer = last => sink.readWithCause({
|
|
768
|
+
onInput: input => Function_dist_effectFunction.pipe(input, Effect_dist_effectEffect.reduce([last, Chunk_dist_effectChunk.empty()], ([option, outputs], output) => {
|
|
769
|
+
if (Option_dist_effectOption.isSome(option)) {
|
|
770
|
+
return Function_dist_effectFunction.pipe(f(option.value, output), Effect_dist_effectEffect.map(bool => bool ? [Option_dist_effectOption.some(output), outputs] : [Option_dist_effectOption.some(output), Function_dist_effectFunction.pipe(outputs, Chunk_dist_effectChunk.append(output))]));
|
|
771
|
+
}
|
|
772
|
+
return Effect_dist_effectEffect.succeed([Option_dist_effectOption.some(output), Function_dist_effectFunction.pipe(outputs, Chunk_dist_effectChunk.append(output))]);
|
|
773
|
+
}), sink.fromEffect, sink.flatMap(([newLast, newChunk]) => Function_dist_effectFunction.pipe(sink.write(newChunk), sink.flatMap(() => writer(newLast))))),
|
|
774
|
+
onFailure: sink.failCause,
|
|
775
|
+
onDone: () => sink.unit
|
|
776
|
+
});
|
|
777
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer(Option_dist_effectOption.none()))));
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
/** @internal */
|
|
781
|
+
const chunks = self => Function_dist_effectFunction.pipe(self, mapChunks(Chunk_dist_effectChunk.of));
|
|
782
|
+
|
|
783
|
+
/** @internal */
|
|
784
|
+
const chunksWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => flattenChunks(f(chunks(self))));
|
|
785
|
+
const unsome = effect => Effect_dist_effectEffect.catchAll(Effect_dist_effectEffect.asSome(effect), o => o._tag === "None" ? Effect_dist_effectEffect.succeedNone : Effect_dist_effectEffect.fail(o.value));
|
|
786
|
+
|
|
787
|
+
/** @internal */
|
|
788
|
+
const combine = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, that, s, f) => {
|
|
789
|
+
const producer = (handoff, latch) => Function_dist_effectFunction.pipe(sink.fromEffect(take$1(latch)), sink.zipRight(sink.readWithCause({
|
|
790
|
+
onInput: input => sink.flatMap(sink.fromEffect(Function_dist_effectFunction.pipe(handoff, offer(Exit_dist_effectExit.succeed(input)))), () => producer(handoff, latch)),
|
|
791
|
+
onFailure: cause => sink.fromEffect(offer(handoff, Exit_dist_effectExit.failCause(Function_dist_effectFunction.pipe(cause, Cause_dist_effectCause.map(Option_dist_effectOption.some))))),
|
|
792
|
+
onDone: () => sink.flatMap(sink.fromEffect(offer(handoff, Exit_dist_effectExit.fail(Option_dist_effectOption.none()))), () => producer(handoff, latch))
|
|
793
|
+
})));
|
|
794
|
+
return new StreamImpl(sink.unwrapScoped(Effect_dist_effectEffect.gen(function* ($) {
|
|
795
|
+
const left = yield* $(make$1());
|
|
796
|
+
const right = yield* $(make$1());
|
|
797
|
+
const latchL = yield* $(make$1());
|
|
798
|
+
const latchR = yield* $(make$1());
|
|
799
|
+
yield* $(toChannel(self), sink.concatMap(sink.writeChunk), sink.pipeTo(producer(left, latchL)), sink.runScoped, Effect_dist_effectEffect.forkScoped);
|
|
800
|
+
yield* $(toChannel(that), sink.concatMap(sink.writeChunk), sink.pipeTo(producer(right, latchR)), sink.runScoped, Effect_dist_effectEffect.forkScoped);
|
|
801
|
+
const pullLeft = Function_dist_effectFunction.pipe(latchL, offer(void 0),
|
|
802
|
+
// TODO: remove
|
|
803
|
+
Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(take$1(left), Effect_dist_effectEffect.flatMap(exit => Effect_dist_effectEffect.suspend(() => exit)))));
|
|
804
|
+
const pullRight = Function_dist_effectFunction.pipe(latchR, offer(void 0),
|
|
805
|
+
// TODO: remove
|
|
806
|
+
Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(take$1(right), Effect_dist_effectEffect.flatMap(exit => Effect_dist_effectEffect.suspend(() => exit)))));
|
|
807
|
+
return toChannel(unfoldEffect(s, s => Effect_dist_effectEffect.flatMap(f(s, pullLeft, pullRight), unsome)));
|
|
808
|
+
})));
|
|
809
|
+
});
|
|
810
|
+
|
|
811
|
+
/** @internal */
|
|
812
|
+
const combineChunks = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, that, s, f) => {
|
|
813
|
+
const producer = (handoff, latch) => sink.zipRight(sink.fromEffect(take$1(latch)), sink.readWithCause({
|
|
814
|
+
onInput: input => sink.flatMap(sink.fromEffect(Function_dist_effectFunction.pipe(handoff, offer(take$2.chunk(input)))), () => producer(handoff, latch)),
|
|
815
|
+
onFailure: cause => sink.fromEffect(offer(handoff, take$2.failCause(cause))),
|
|
816
|
+
onDone: () => sink.fromEffect(offer(handoff, take$2.end))
|
|
817
|
+
}));
|
|
818
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.all([make$1(), make$1(), make$1(), make$1()]), Effect_dist_effectEffect.tap(([left, _, latchL]) => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(producer(left, latchL)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.tap(([_, right, __, latchR]) => Function_dist_effectFunction.pipe(toChannel(that), sink.pipeTo(producer(right, latchR)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.map(([left, right, latchL, latchR]) => {
|
|
819
|
+
const pullLeft = Function_dist_effectFunction.pipe(latchL, offer(void 0), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(take$1(left), Effect_dist_effectEffect.flatMap(take$2.done))));
|
|
820
|
+
const pullRight = Function_dist_effectFunction.pipe(latchR, offer(void 0), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(take$1(right), Effect_dist_effectEffect.flatMap(take$2.done))));
|
|
821
|
+
return toChannel(unfoldChunkEffect(s, s => Effect_dist_effectEffect.flatMap(f(s, pullLeft, pullRight), unsome)));
|
|
822
|
+
}), sink.unwrapScoped));
|
|
823
|
+
});
|
|
824
|
+
|
|
825
|
+
/** @internal */
|
|
826
|
+
const concat = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.zipRight(toChannel(that)))));
|
|
827
|
+
|
|
828
|
+
/** @internal */
|
|
829
|
+
const concatAll = streams => suspend(() => Function_dist_effectFunction.pipe(streams, Chunk_dist_effectChunk.reduce(empty, (x, y) => concat(y)(x))));
|
|
830
|
+
|
|
831
|
+
/** @internal */
|
|
832
|
+
const cross = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, crossWith(that, (a, a2) => [a, a2])));
|
|
833
|
+
|
|
834
|
+
/** @internal */
|
|
835
|
+
const crossLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, crossWith(that, (a, _) => a)));
|
|
836
|
+
|
|
837
|
+
/** @internal */
|
|
838
|
+
const crossRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => flatMap(self, () => that));
|
|
839
|
+
|
|
840
|
+
/** @internal */
|
|
841
|
+
const crossWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => Function_dist_effectFunction.pipe(self, flatMap(a => Function_dist_effectFunction.pipe(that, map(b => f(a, b))))));
|
|
842
|
+
|
|
843
|
+
/** @internal */
|
|
844
|
+
const debounce = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, duration) => Function_dist_effectFunction.pipe(singleProducerAsyncInput.make(), Effect_dist_effectEffect.flatMap(input => Effect_dist_effectEffect.transplant(grafter => Function_dist_effectFunction.pipe(make$1(), Effect_dist_effectEffect.map(handoff => {
|
|
845
|
+
const enqueue = last => Function_dist_effectFunction.pipe(Clock_dist_effectClock.sleep(duration), Effect_dist_effectEffect.as(last), Effect_dist_effectEffect.fork, grafter, Effect_dist_effectEffect.map(fiber => consumer(previous(fiber))));
|
|
846
|
+
const producer = sink.readWithCause({
|
|
847
|
+
onInput: input => Option_dist_effectOption.match(Chunk_dist_effectChunk.last(input), {
|
|
848
|
+
onNone: () => producer,
|
|
849
|
+
onSome: last => sink.flatMap(sink.fromEffect(offer(handoff, emit(Chunk_dist_effectChunk.of(last)))), () => producer)
|
|
850
|
+
}),
|
|
851
|
+
onFailure: cause => sink.fromEffect(offer(handoff, halt(cause))),
|
|
852
|
+
onDone: () => sink.fromEffect(offer(handoff, end$1(UpstreamEnd)))
|
|
853
|
+
});
|
|
854
|
+
const consumer = state => {
|
|
855
|
+
switch (state._tag) {
|
|
856
|
+
case OP_NOT_STARTED:
|
|
857
|
+
{
|
|
858
|
+
return Function_dist_effectFunction.pipe(take$1(handoff), Effect_dist_effectEffect.map(signal => {
|
|
859
|
+
switch (signal._tag) {
|
|
860
|
+
case OP_EMIT:
|
|
861
|
+
{
|
|
862
|
+
return sink.unwrap(enqueue(signal.elements));
|
|
863
|
+
}
|
|
864
|
+
case OP_HALT:
|
|
865
|
+
{
|
|
866
|
+
return sink.failCause(signal.cause);
|
|
867
|
+
}
|
|
868
|
+
case OP_END:
|
|
869
|
+
{
|
|
870
|
+
return sink.unit;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
}), sink.unwrap);
|
|
874
|
+
}
|
|
875
|
+
case OP_PREVIOUS:
|
|
876
|
+
{
|
|
877
|
+
return sink.unwrap(Effect_dist_effectEffect.raceWith(Fiber_dist_effectFiber.join(state.fiber), take$1(handoff), {
|
|
878
|
+
onSelfDone: (leftExit, current$1) => Exit_dist_effectExit.match(leftExit, {
|
|
879
|
+
onFailure: cause => Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(current$1), Effect_dist_effectEffect.as(sink.failCause(cause))),
|
|
880
|
+
onSuccess: chunk => Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => consumer(current(current$1)))))
|
|
881
|
+
}),
|
|
882
|
+
onOtherDone: (rightExit, previous) => Exit_dist_effectExit.match(rightExit, {
|
|
883
|
+
onFailure: cause => Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(previous), Effect_dist_effectEffect.as(sink.failCause(cause))),
|
|
884
|
+
onSuccess: signal => {
|
|
885
|
+
switch (signal._tag) {
|
|
886
|
+
case OP_EMIT:
|
|
887
|
+
{
|
|
888
|
+
return Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(previous), Effect_dist_effectEffect.zipRight(enqueue(signal.elements)));
|
|
889
|
+
}
|
|
890
|
+
case OP_HALT:
|
|
891
|
+
{
|
|
892
|
+
return Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.interrupt(previous), Effect_dist_effectEffect.as(sink.failCause(signal.cause)));
|
|
893
|
+
}
|
|
894
|
+
case OP_END:
|
|
895
|
+
{
|
|
896
|
+
return Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(previous), Effect_dist_effectEffect.map(chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.zipRight(sink.unit))));
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
})
|
|
901
|
+
}));
|
|
902
|
+
}
|
|
903
|
+
case OP_CURRENT:
|
|
904
|
+
{
|
|
905
|
+
return Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.join(state.fiber), Effect_dist_effectEffect.map(signal => {
|
|
906
|
+
switch (signal._tag) {
|
|
907
|
+
case OP_EMIT:
|
|
908
|
+
{
|
|
909
|
+
return sink.unwrap(enqueue(signal.elements));
|
|
910
|
+
}
|
|
911
|
+
case OP_HALT:
|
|
912
|
+
{
|
|
913
|
+
return sink.failCause(signal.cause);
|
|
914
|
+
}
|
|
915
|
+
case OP_END:
|
|
916
|
+
{
|
|
917
|
+
return sink.unit;
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}), sink.unwrap);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
};
|
|
924
|
+
const debounceChannel = Function_dist_effectFunction.pipe(sink.fromInput(input), sink.pipeTo(producer), sink.run, Effect_dist_effectEffect.forkScoped, Effect_dist_effectEffect.as(Function_dist_effectFunction.pipe(consumer(notStarted), sink.embedInput(input))), sink.unwrapScoped);
|
|
925
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(debounceChannel)));
|
|
926
|
+
})))), unwrap));
|
|
927
|
+
|
|
928
|
+
/** @internal */
|
|
929
|
+
const die = defect => fromEffect(Effect_dist_effectEffect.die(defect));
|
|
930
|
+
|
|
931
|
+
/** @internal */
|
|
932
|
+
const dieSync = evaluate => fromEffect(Effect_dist_effectEffect.dieSync(evaluate));
|
|
933
|
+
|
|
934
|
+
/** @internal */
|
|
935
|
+
const dieMessage = message => fromEffect(Effect_dist_effectEffect.dieMessage(message));
|
|
936
|
+
|
|
937
|
+
/** @internal */
|
|
938
|
+
const distributedWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.flatMap(deferred => Function_dist_effectFunction.pipe(self, distributedWithDynamic({
|
|
939
|
+
maximumLag: options.maximumLag,
|
|
940
|
+
decide: a => Effect_dist_effectEffect.flatMap(Deferred_dist_effectDeferred["await"](deferred), f => f(a))
|
|
941
|
+
}), Effect_dist_effectEffect.flatMap(next => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.all(Chunk_dist_effectChunk.map(Chunk_dist_effectChunk.range(0, options.size - 1), id => Effect_dist_effectEffect.map(next, ([key, queue]) => [[key, id], queue]))), Effect_dist_effectEffect.map(Chunk_dist_effectChunk.unsafeFromArray), Effect_dist_effectEffect.flatMap(entries => {
|
|
942
|
+
const [mappings, queues] = Chunk_dist_effectChunk.reduceRight(entries, [new Map(), Chunk_dist_effectChunk.empty()], ([mappings, queues], [mapping, queue]) => [mappings.set(mapping[0], mapping[1]), Function_dist_effectFunction.pipe(queues, Chunk_dist_effectChunk.prepend(queue))]);
|
|
943
|
+
return Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.succeed(deferred, a => Effect_dist_effectEffect.map(options.decide(a), f => key => Function_dist_effectFunction.pipe(f(mappings.get(key))))), Effect_dist_effectEffect.as(Array.from(queues)));
|
|
944
|
+
})))))));
|
|
945
|
+
|
|
946
|
+
/** @internal */
|
|
947
|
+
const distributedWithDynamicId = {
|
|
948
|
+
ref: 0
|
|
949
|
+
};
|
|
950
|
+
const newDistributedWithDynamicId = () => {
|
|
951
|
+
const current = distributedWithDynamicId.ref;
|
|
952
|
+
distributedWithDynamicId.ref = current + 1;
|
|
953
|
+
return current;
|
|
954
|
+
};
|
|
955
|
+
|
|
956
|
+
/** @internal */
|
|
957
|
+
const distributedWithDynamic = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => distributedWithDynamicCallback(self, options.maximumLag, options.decide, () => Effect_dist_effectEffect.unit));
|
|
958
|
+
const distributedWithDynamicCallback = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, maximumLag, decide, done) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Ref_dist_effectRef.make(new Map()), (ref, _) => Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(ref), Effect_dist_effectEffect.flatMap(queues => Function_dist_effectFunction.pipe(queues.values(), Effect_dist_effectEffect.forEach(Queue_dist_effectQueue.shutdown))))), Effect_dist_effectEffect.flatMap(queuesRef => Effect_dist_effectEffect.gen(function* ($) {
|
|
959
|
+
const offer = a => Function_dist_effectFunction.pipe(decide(a), Effect_dist_effectEffect.flatMap(shouldProcess => Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(queuesRef), Effect_dist_effectEffect.flatMap(queues => Function_dist_effectFunction.pipe(queues.entries(), Effect_dist_effectEffect.reduce(Chunk_dist_effectChunk.empty(), (acc, [id, queue]) => {
|
|
960
|
+
if (shouldProcess(id)) {
|
|
961
|
+
return Function_dist_effectFunction.pipe(Queue_dist_effectQueue.offer(queue, Exit_dist_effectExit.succeed(a)), Effect_dist_effectEffect.matchCauseEffect({
|
|
962
|
+
onFailure: cause =>
|
|
963
|
+
// Ignore all downstream queues that were shut
|
|
964
|
+
// down and remove them later
|
|
965
|
+
Cause_dist_effectCause.isInterrupted(cause) ? Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(acc, Chunk_dist_effectChunk.prepend(id))) : Effect_dist_effectEffect.failCause(cause),
|
|
966
|
+
onSuccess: () => Effect_dist_effectEffect.succeed(acc)
|
|
967
|
+
}));
|
|
968
|
+
}
|
|
969
|
+
return Effect_dist_effectEffect.succeed(acc);
|
|
970
|
+
}), Effect_dist_effectEffect.flatMap(ids => {
|
|
971
|
+
if (Chunk_dist_effectChunk.isNonEmpty(ids)) {
|
|
972
|
+
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.update(queuesRef, map => {
|
|
973
|
+
for (const id of ids) {
|
|
974
|
+
map.delete(id);
|
|
975
|
+
}
|
|
976
|
+
return map;
|
|
977
|
+
}));
|
|
978
|
+
}
|
|
979
|
+
return Effect_dist_effectEffect.unit;
|
|
980
|
+
}))))), Effect_dist_effectEffect.asUnit);
|
|
981
|
+
const queuesLock = yield* $(Effect_dist_effectEffect.makeSemaphore(1));
|
|
982
|
+
const newQueue = yield* $(Ref_dist_effectRef.make(Function_dist_effectFunction.pipe(Queue_dist_effectQueue.bounded(maximumLag), Effect_dist_effectEffect.flatMap(queue => {
|
|
983
|
+
const id = newDistributedWithDynamicId();
|
|
984
|
+
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.update(queuesRef, map => map.set(id, queue)), Effect_dist_effectEffect.as([id, queue]));
|
|
985
|
+
}))));
|
|
986
|
+
const finalize = endTake =>
|
|
987
|
+
// Make sure that no queues are currently being added
|
|
988
|
+
queuesLock.withPermits(1)(Function_dist_effectFunction.pipe(Ref_dist_effectRef.set(newQueue, Function_dist_effectFunction.pipe(
|
|
989
|
+
// All newly created queues should end immediately
|
|
990
|
+
Queue_dist_effectQueue.bounded(1), Effect_dist_effectEffect.tap(queue => Queue_dist_effectQueue.offer(queue, endTake)), Effect_dist_effectEffect.flatMap(queue => {
|
|
991
|
+
const id = newDistributedWithDynamicId();
|
|
992
|
+
return Function_dist_effectFunction.pipe(Ref_dist_effectRef.update(queuesRef, map => map.set(id, queue)), Effect_dist_effectEffect.as([id, queue]));
|
|
993
|
+
}))), Effect_dist_effectEffect.zipRight(Function_dist_effectFunction.pipe(Ref_dist_effectRef.get(queuesRef), Effect_dist_effectEffect.flatMap(map => Function_dist_effectFunction.pipe(Chunk_dist_effectChunk.fromIterable(map.values()), Effect_dist_effectEffect.forEach(queue => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.offer(queue, endTake), Effect_dist_effectEffect.catchSomeCause(cause => Cause_dist_effectCause.isInterrupted(cause) ? Option_dist_effectOption.some(Effect_dist_effectEffect.unit) : Option_dist_effectOption.none()))))))), Effect_dist_effectEffect.zipRight(done(endTake)), Effect_dist_effectEffect.asUnit));
|
|
994
|
+
yield* $(self, runForEachScoped(offer), Effect_dist_effectEffect.matchCauseEffect({
|
|
995
|
+
onFailure: cause => finalize(Exit_dist_effectExit.failCause(Function_dist_effectFunction.pipe(cause, Cause_dist_effectCause.map(Option_dist_effectOption.some)))),
|
|
996
|
+
onSuccess: () => finalize(Exit_dist_effectExit.fail(Option_dist_effectOption.none()))
|
|
997
|
+
}), Effect_dist_effectEffect.forkScoped);
|
|
998
|
+
return queuesLock.withPermits(1)(Effect_dist_effectEffect.flatten(Ref_dist_effectRef.get(newQueue)));
|
|
999
|
+
}))));
|
|
1000
|
+
|
|
1001
|
+
/** @internal */
|
|
1002
|
+
const drain = self => new StreamImpl(sink.drain(toChannel(self)));
|
|
1003
|
+
|
|
1004
|
+
/** @internal */
|
|
1005
|
+
const drainFork = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(fromEffect(Deferred_dist_effectDeferred.make()), flatMap(backgroundDied => Function_dist_effectFunction.pipe(scoped(Function_dist_effectFunction.pipe(that, runForEachScoped(() => Effect_dist_effectEffect.unit), Effect_dist_effectEffect.catchAllCause(cause => Deferred_dist_effectDeferred.failCause(backgroundDied, cause)), Effect_dist_effectEffect.forkScoped)), crossRight(Function_dist_effectFunction.pipe(self, interruptWhenDeferred(backgroundDied)))))));
|
|
1006
|
+
|
|
1007
|
+
/** @internal */
|
|
1008
|
+
const drop = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => {
|
|
1009
|
+
const loop = r => sink.readWith({
|
|
1010
|
+
onInput: input => {
|
|
1011
|
+
const dropped = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.drop(r));
|
|
1012
|
+
const leftover = Math.max(0, r - input.length);
|
|
1013
|
+
const more = Chunk_dist_effectChunk.isEmpty(input) || leftover > 0;
|
|
1014
|
+
if (more) {
|
|
1015
|
+
return loop(leftover);
|
|
1016
|
+
}
|
|
1017
|
+
return Function_dist_effectFunction.pipe(sink.write(dropped), sink.zipRight(sink.identityChannel()));
|
|
1018
|
+
},
|
|
1019
|
+
onFailure: sink.fail,
|
|
1020
|
+
onDone: () => sink.unit
|
|
1021
|
+
});
|
|
1022
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop(n))));
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
/** @internal */
|
|
1026
|
+
const dropRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => {
|
|
1027
|
+
if (n <= 0) {
|
|
1028
|
+
return identityStream();
|
|
1029
|
+
}
|
|
1030
|
+
return suspend(() => {
|
|
1031
|
+
const queue = new RingBuffer(n);
|
|
1032
|
+
const reader = sink.readWith({
|
|
1033
|
+
onInput: input => {
|
|
1034
|
+
const outputs = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.filterMap(elem => {
|
|
1035
|
+
const head = queue.head();
|
|
1036
|
+
queue.put(elem);
|
|
1037
|
+
return head;
|
|
1038
|
+
}));
|
|
1039
|
+
return Function_dist_effectFunction.pipe(sink.write(outputs), sink.flatMap(() => reader));
|
|
1040
|
+
},
|
|
1041
|
+
onFailure: sink.fail,
|
|
1042
|
+
onDone: () => sink.unit
|
|
1043
|
+
});
|
|
1044
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(reader)));
|
|
1045
|
+
});
|
|
1046
|
+
});
|
|
1047
|
+
|
|
1048
|
+
/** @internal */
|
|
1049
|
+
const dropUntil = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => drop(dropWhile(self, a => !predicate(a)), 1));
|
|
1050
|
+
|
|
1051
|
+
/** @internal */
|
|
1052
|
+
const dropUntilEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1053
|
+
const loop = sink.readWith({
|
|
1054
|
+
onInput: input => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.dropUntil(input, predicate), Effect_dist_effectEffect.map(Chunk_dist_effectChunk.unsafeFromArray), Effect_dist_effectEffect.map(leftover => {
|
|
1055
|
+
const more = Chunk_dist_effectChunk.isEmpty(leftover);
|
|
1056
|
+
if (more) {
|
|
1057
|
+
return sink.suspend(() => loop);
|
|
1058
|
+
}
|
|
1059
|
+
return Function_dist_effectFunction.pipe(sink.write(leftover), sink.zipRight(sink.identityChannel()));
|
|
1060
|
+
}), sink.unwrap),
|
|
1061
|
+
onFailure: sink.fail,
|
|
1062
|
+
onDone: () => sink.unit
|
|
1063
|
+
});
|
|
1064
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop)));
|
|
1065
|
+
});
|
|
1066
|
+
|
|
1067
|
+
/** @internal */
|
|
1068
|
+
const dropWhile = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1069
|
+
const loop = sink.readWith({
|
|
1070
|
+
onInput: input => {
|
|
1071
|
+
const output = Chunk_dist_effectChunk.dropWhile(input, predicate);
|
|
1072
|
+
if (Chunk_dist_effectChunk.isEmpty(output)) {
|
|
1073
|
+
return sink.suspend(() => loop);
|
|
1074
|
+
}
|
|
1075
|
+
return sink.zipRight(sink.write(output), sink.identityChannel());
|
|
1076
|
+
},
|
|
1077
|
+
onFailure: sink.fail,
|
|
1078
|
+
onDone: sink.succeedNow
|
|
1079
|
+
});
|
|
1080
|
+
return new StreamImpl(sink.pipeToOrFail(toChannel(self), loop));
|
|
1081
|
+
});
|
|
1082
|
+
|
|
1083
|
+
/** @internal */
|
|
1084
|
+
const dropWhileEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1085
|
+
const loop = sink.readWith({
|
|
1086
|
+
onInput: input => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.dropWhile(input, predicate), Effect_dist_effectEffect.map(Chunk_dist_effectChunk.unsafeFromArray), Effect_dist_effectEffect.map(leftover => {
|
|
1087
|
+
const more = Chunk_dist_effectChunk.isEmpty(leftover);
|
|
1088
|
+
if (more) {
|
|
1089
|
+
return sink.suspend(() => loop);
|
|
1090
|
+
}
|
|
1091
|
+
return sink.zipRight(sink.write(leftover), sink.identityChannel());
|
|
1092
|
+
}), sink.unwrap),
|
|
1093
|
+
onFailure: sink.fail,
|
|
1094
|
+
onDone: () => sink.unit
|
|
1095
|
+
});
|
|
1096
|
+
return new StreamImpl(sink.pipeToOrFail(toChannel(self), loop));
|
|
1097
|
+
});
|
|
1098
|
+
|
|
1099
|
+
/** @internal */
|
|
1100
|
+
const either = self => Function_dist_effectFunction.pipe(self, map(Either_dist_effectEither.right), catchAll(error => make(Either_dist_effectEither.left(error))));
|
|
1101
|
+
|
|
1102
|
+
/** @internal */
|
|
1103
|
+
const empty = /*#__PURE__*/new StreamImpl( /*#__PURE__*/sink.write( /*#__PURE__*/Chunk_dist_effectChunk.empty()));
|
|
1104
|
+
|
|
1105
|
+
/** @internal */
|
|
1106
|
+
const ensuring = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, finalizer) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.ensuring(finalizer))));
|
|
1107
|
+
|
|
1108
|
+
/** @internal */
|
|
1109
|
+
const ensuringWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, finalizer) => new StreamImpl(sink.ensuringWith(toChannel(self), finalizer)));
|
|
1110
|
+
|
|
1111
|
+
/** @internal */
|
|
1112
|
+
const context = () => fromEffect(Effect_dist_effectEffect.context());
|
|
1113
|
+
|
|
1114
|
+
/** @internal */
|
|
1115
|
+
const contextWith = f => Function_dist_effectFunction.pipe(context(), map(f));
|
|
1116
|
+
|
|
1117
|
+
/** @internal */
|
|
1118
|
+
const contextWithEffect = f => Function_dist_effectFunction.pipe(context(), mapEffectSequential(f));
|
|
1119
|
+
|
|
1120
|
+
/** @internal */
|
|
1121
|
+
const contextWithStream = f => Function_dist_effectFunction.pipe(context(), flatMap(f));
|
|
1122
|
+
|
|
1123
|
+
/** @internal */
|
|
1124
|
+
const execute = effect => drain(fromEffect(effect));
|
|
1125
|
+
|
|
1126
|
+
/** @internal */
|
|
1127
|
+
const fail = error => fromEffectOption(Effect_dist_effectEffect.fail(Option_dist_effectOption.some(error)));
|
|
1128
|
+
|
|
1129
|
+
/** @internal */
|
|
1130
|
+
const failSync = evaluate => fromEffectOption(Effect_dist_effectEffect.failSync(() => Option_dist_effectOption.some(evaluate())));
|
|
1131
|
+
|
|
1132
|
+
/** @internal */
|
|
1133
|
+
const failCause = cause => fromEffect(Effect_dist_effectEffect.failCause(cause));
|
|
1134
|
+
|
|
1135
|
+
/** @internal */
|
|
1136
|
+
const failCauseSync = evaluate => fromEffect(Effect_dist_effectEffect.failCauseSync(evaluate));
|
|
1137
|
+
|
|
1138
|
+
/** @internal */
|
|
1139
|
+
const filter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => mapChunks(self, Chunk_dist_effectChunk.filter(predicate)));
|
|
1140
|
+
|
|
1141
|
+
/** @internal */
|
|
1142
|
+
const filterEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
1143
|
+
const loop = iterator => {
|
|
1144
|
+
const next = iterator.next();
|
|
1145
|
+
if (next.done) {
|
|
1146
|
+
return sink.readWithCause({
|
|
1147
|
+
onInput: input => loop(input[Symbol.iterator]()),
|
|
1148
|
+
onFailure: sink.failCause,
|
|
1149
|
+
onDone: sink.succeed
|
|
1150
|
+
});
|
|
1151
|
+
} else {
|
|
1152
|
+
return Function_dist_effectFunction.pipe(f(next.value), Effect_dist_effectEffect.map(bool => bool ? Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(next.value)), sink.flatMap(() => loop(iterator))) : loop(iterator)), sink.unwrap);
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
return new StreamImpl(sink.suspend(() => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]())))));
|
|
1156
|
+
});
|
|
1157
|
+
|
|
1158
|
+
/** @internal */
|
|
1159
|
+
const filterMap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => mapChunks(self, Chunk_dist_effectChunk.filterMap(pf)));
|
|
1160
|
+
|
|
1161
|
+
/** @internal */
|
|
1162
|
+
const filterMapEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => suspend(() => {
|
|
1163
|
+
const loop = iterator => {
|
|
1164
|
+
const next = iterator.next();
|
|
1165
|
+
if (next.done) {
|
|
1166
|
+
return sink.readWithCause({
|
|
1167
|
+
onInput: input => loop(input[Symbol.iterator]()),
|
|
1168
|
+
onFailure: sink.failCause,
|
|
1169
|
+
onDone: sink.succeed
|
|
1170
|
+
});
|
|
1171
|
+
} else {
|
|
1172
|
+
return Function_dist_effectFunction.pipe(pf(next.value), Option_dist_effectOption.match({
|
|
1173
|
+
onNone: () => Effect_dist_effectEffect.sync(() => loop(iterator)),
|
|
1174
|
+
onSome: Effect_dist_effectEffect.map(a2 => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(a2)), () => loop(iterator)))
|
|
1175
|
+
}), sink.unwrap);
|
|
1176
|
+
}
|
|
1177
|
+
};
|
|
1178
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]()))));
|
|
1179
|
+
}));
|
|
1180
|
+
|
|
1181
|
+
/** @internal */
|
|
1182
|
+
const filterMapWhile = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => {
|
|
1183
|
+
const loop = sink.readWith({
|
|
1184
|
+
onInput: input => {
|
|
1185
|
+
const mapped = Chunk_dist_effectChunk.filterMapWhile(input, pf);
|
|
1186
|
+
if (mapped.length === input.length) {
|
|
1187
|
+
return Function_dist_effectFunction.pipe(sink.write(mapped), sink.flatMap(() => loop));
|
|
1188
|
+
}
|
|
1189
|
+
return sink.write(mapped);
|
|
1190
|
+
},
|
|
1191
|
+
onFailure: sink.fail,
|
|
1192
|
+
onDone: sink.succeed
|
|
1193
|
+
});
|
|
1194
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop)));
|
|
1195
|
+
});
|
|
1196
|
+
|
|
1197
|
+
/** @internal */
|
|
1198
|
+
const filterMapWhileEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => suspend(() => {
|
|
1199
|
+
const loop = iterator => {
|
|
1200
|
+
const next = iterator.next();
|
|
1201
|
+
if (next.done) {
|
|
1202
|
+
return sink.readWithCause({
|
|
1203
|
+
onInput: input => loop(input[Symbol.iterator]()),
|
|
1204
|
+
onFailure: sink.failCause,
|
|
1205
|
+
onDone: sink.succeed
|
|
1206
|
+
});
|
|
1207
|
+
} else {
|
|
1208
|
+
return sink.unwrap(Option_dist_effectOption.match(pf(next.value), {
|
|
1209
|
+
onNone: () => Effect_dist_effectEffect.succeed(sink.unit),
|
|
1210
|
+
onSome: Effect_dist_effectEffect.map(a2 => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(a2)), () => loop(iterator)))
|
|
1211
|
+
}));
|
|
1212
|
+
}
|
|
1213
|
+
};
|
|
1214
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]()))));
|
|
1215
|
+
}));
|
|
1216
|
+
|
|
1217
|
+
/** @internal */
|
|
1218
|
+
const finalizer = finalizer => acquireRelease(Effect_dist_effectEffect.unit, () => finalizer);
|
|
1219
|
+
|
|
1220
|
+
/** @internal */
|
|
1221
|
+
const find = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1222
|
+
const loop = sink.readWith({
|
|
1223
|
+
onInput: input => Option_dist_effectOption.match(Chunk_dist_effectChunk.findFirst(input, predicate), {
|
|
1224
|
+
onNone: () => loop,
|
|
1225
|
+
onSome: n => sink.write(Chunk_dist_effectChunk.of(n))
|
|
1226
|
+
}),
|
|
1227
|
+
onFailure: sink.fail,
|
|
1228
|
+
onDone: () => sink.unit
|
|
1229
|
+
});
|
|
1230
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop)));
|
|
1231
|
+
});
|
|
1232
|
+
|
|
1233
|
+
/** @internal */
|
|
1234
|
+
const findEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
1235
|
+
const loop = sink.readWith({
|
|
1236
|
+
onInput: input => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.findFirst(input, predicate), Effect_dist_effectEffect.map(Option_dist_effectOption.match({
|
|
1237
|
+
onNone: () => loop,
|
|
1238
|
+
onSome: n => sink.write(Chunk_dist_effectChunk.of(n))
|
|
1239
|
+
})), sink.unwrap),
|
|
1240
|
+
onFailure: sink.fail,
|
|
1241
|
+
onDone: () => sink.unit
|
|
1242
|
+
});
|
|
1243
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop)));
|
|
1244
|
+
});
|
|
1245
|
+
|
|
1246
|
+
/** @internal */
|
|
1247
|
+
const flatMap = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof args[0] !== "function", (self, f, options) => {
|
|
1248
|
+
const bufferSize = options?.bufferSize ?? 16;
|
|
1249
|
+
if (options?.switch) {
|
|
1250
|
+
return matchConcurrency(options?.concurrency, () => flatMapParSwitchBuffer(self, 1, bufferSize, f), n => flatMapParSwitchBuffer(self, n, bufferSize, f));
|
|
1251
|
+
}
|
|
1252
|
+
return matchConcurrency(options?.concurrency, () => new StreamImpl(sink.concatMap(toChannel(self), as => Function_dist_effectFunction.pipe(as, Chunk_dist_effectChunk.map(a => toChannel(f(a))), Chunk_dist_effectChunk.reduce(sink.unit, (left, right) => Function_dist_effectFunction.pipe(left, sink.zipRight(right)))))), _ => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mergeMap(out => toChannel(f(out)), options))));
|
|
1253
|
+
});
|
|
1254
|
+
|
|
1255
|
+
/** @internal */
|
|
1256
|
+
const matchConcurrency = (concurrency, sequential, bounded) => {
|
|
1257
|
+
switch (concurrency) {
|
|
1258
|
+
case undefined:
|
|
1259
|
+
return sequential();
|
|
1260
|
+
case "unbounded":
|
|
1261
|
+
return bounded(Number.MAX_SAFE_INTEGER);
|
|
1262
|
+
default:
|
|
1263
|
+
return concurrency > 1 ? bounded(concurrency) : sequential();
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
1266
|
+
const flatMapParSwitchBuffer = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, n, bufferSize, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mergeMap(out => toChannel(f(out)), {
|
|
1267
|
+
concurrency: n,
|
|
1268
|
+
mergeStrategy: mergeStrategy.BufferSliding(),
|
|
1269
|
+
bufferSize
|
|
1270
|
+
}))));
|
|
1271
|
+
|
|
1272
|
+
/** @internal */
|
|
1273
|
+
const flatten = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, options) => flatMap(self, Function_dist_effectFunction.identity, options));
|
|
1274
|
+
|
|
1275
|
+
/** @internal */
|
|
1276
|
+
const flattenChunks = self => {
|
|
1277
|
+
const flatten = sink.readWithCause({
|
|
1278
|
+
onInput: chunks => sink.flatMap(sink.writeChunk(chunks), () => flatten),
|
|
1279
|
+
onFailure: sink.failCause,
|
|
1280
|
+
onDone: () => sink.unit
|
|
1281
|
+
});
|
|
1282
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(flatten)));
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
/** @internal */
|
|
1286
|
+
const flattenEffect = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, options) => options?.unordered ? flatMap(self, a => fromEffect(a), {
|
|
1287
|
+
concurrency: options.concurrency
|
|
1288
|
+
}) : matchConcurrency(options?.concurrency, () => mapEffectSequential(self, Function_dist_effectFunction.identity), n => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mapOutEffectPar(Function_dist_effectFunction.identity, n), sink.mapOut(Chunk_dist_effectChunk.of)))));
|
|
1289
|
+
|
|
1290
|
+
/** @internal */
|
|
1291
|
+
const flattenExitOption = self => {
|
|
1292
|
+
const processChunk = (chunk, cont) => {
|
|
1293
|
+
const [toEmit, rest] = Function_dist_effectFunction.pipe(chunk, Chunk_dist_effectChunk.splitWhere(exit => !Exit_dist_effectExit.isSuccess(exit)));
|
|
1294
|
+
const next = Function_dist_effectFunction.pipe(Chunk_dist_effectChunk.head(rest), Option_dist_effectOption.match({
|
|
1295
|
+
onNone: () => cont,
|
|
1296
|
+
onSome: Exit_dist_effectExit.match({
|
|
1297
|
+
onFailure: cause => Option_dist_effectOption.match(Cause_dist_effectCause.flipCauseOption(cause), {
|
|
1298
|
+
onNone: () => sink.unit,
|
|
1299
|
+
onSome: sink.failCause
|
|
1300
|
+
}),
|
|
1301
|
+
onSuccess: () => sink.unit
|
|
1302
|
+
})
|
|
1303
|
+
}));
|
|
1304
|
+
return Function_dist_effectFunction.pipe(sink.write(Function_dist_effectFunction.pipe(toEmit, Chunk_dist_effectChunk.filterMap(exit => Exit_dist_effectExit.isSuccess(exit) ? Option_dist_effectOption.some(exit.value) : Option_dist_effectOption.none()))), sink.flatMap(() => next));
|
|
1305
|
+
};
|
|
1306
|
+
const process = sink.readWithCause({
|
|
1307
|
+
onInput: chunk => processChunk(chunk, process),
|
|
1308
|
+
onFailure: cause => sink.failCause(cause),
|
|
1309
|
+
onDone: () => sink.unit
|
|
1310
|
+
});
|
|
1311
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(process)));
|
|
1312
|
+
};
|
|
1313
|
+
|
|
1314
|
+
/** @internal */
|
|
1315
|
+
const flattenIterables = self => Function_dist_effectFunction.pipe(self, map(Chunk_dist_effectChunk.fromIterable), flattenChunks);
|
|
1316
|
+
|
|
1317
|
+
/** @internal */
|
|
1318
|
+
const flattenTake = self => flattenChunks(flattenExitOption(Function_dist_effectFunction.pipe(self, map(take => take.exit))));
|
|
1319
|
+
|
|
1320
|
+
/** @internal */
|
|
1321
|
+
const forever = self => new StreamImpl(sink.repeated(toChannel(self)));
|
|
1322
|
+
|
|
1323
|
+
/** @internal */
|
|
1324
|
+
const fromAsyncIterable = (iterable, onError) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(Effect_dist_effectEffect.sync(() => iterable[Symbol.asyncIterator]()), iterator => iterator.return ? Effect_dist_effectEffect.promise(async () => iterator.return()) : Effect_dist_effectEffect.unit), Effect_dist_effectEffect.map(iterator => repeatEffectOption(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.tryPromise({
|
|
1325
|
+
try: async () => iterator.next(),
|
|
1326
|
+
catch: reason => Option_dist_effectOption.some(onError(reason))
|
|
1327
|
+
}), Effect_dist_effectEffect.flatMap(result => result.done ? Effect_dist_effectEffect.fail(Option_dist_effectOption.none()) : Effect_dist_effectEffect.succeed(result.value))))), unwrapScoped);
|
|
1328
|
+
|
|
1329
|
+
/** @internal */
|
|
1330
|
+
const fromChannel = channel => new StreamImpl(channel);
|
|
1331
|
+
|
|
1332
|
+
/** @internal */
|
|
1333
|
+
const toChannel = stream => {
|
|
1334
|
+
if ("channel" in stream) {
|
|
1335
|
+
return stream.channel;
|
|
1336
|
+
} else if (Effect_dist_effectEffect.isEffect(stream)) {
|
|
1337
|
+
return toChannel(fromEffect(stream));
|
|
1338
|
+
} else {
|
|
1339
|
+
throw new TypeError(`Expected a Stream.`);
|
|
1340
|
+
}
|
|
1341
|
+
};
|
|
1342
|
+
|
|
1343
|
+
/** @internal */
|
|
1344
|
+
const fromChunk = chunk => new StreamImpl(Chunk_dist_effectChunk.isEmpty(chunk) ? sink.unit : sink.write(chunk));
|
|
1345
|
+
|
|
1346
|
+
/** @internal */
|
|
1347
|
+
const fromChunkPubSub = (pubsub, options) => {
|
|
1348
|
+
if (options?.scoped) {
|
|
1349
|
+
const effect = Effect_dist_effectEffect.map(PubSub_dist_effectPubSub.subscribe(pubsub), fromChunkQueue);
|
|
1350
|
+
return options.shutdown ? Effect_dist_effectEffect.map(effect, ensuring(PubSub_dist_effectPubSub.shutdown(pubsub))) : effect;
|
|
1351
|
+
}
|
|
1352
|
+
const stream = flatMap(scoped(PubSub_dist_effectPubSub.subscribe(pubsub)), fromChunkQueue);
|
|
1353
|
+
return options?.shutdown ? ensuring(stream, PubSub_dist_effectPubSub.shutdown(pubsub)) : stream;
|
|
1354
|
+
};
|
|
1355
|
+
|
|
1356
|
+
/** @internal */
|
|
1357
|
+
const fromChunkQueue = (queue, options) => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.take(queue), Effect_dist_effectEffect.catchAllCause(cause => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.isShutdown(queue), Effect_dist_effectEffect.flatMap(isShutdown => isShutdown && Cause_dist_effectCause.isInterrupted(cause) ? end() : failCause$1(cause)))), repeatEffectChunkOption, options?.shutdown ? ensuring(Queue_dist_effectQueue.shutdown(queue)) : Function_dist_effectFunction.identity);
|
|
1358
|
+
|
|
1359
|
+
/** @internal */
|
|
1360
|
+
const fromChunks = (...chunks) => Function_dist_effectFunction.pipe(fromIterable(chunks), flatMap(fromChunk));
|
|
1361
|
+
|
|
1362
|
+
/** @internal */
|
|
1363
|
+
const fromEffect = effect => Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some), fromEffectOption);
|
|
1364
|
+
|
|
1365
|
+
/** @internal */
|
|
1366
|
+
const fromEffectOption = effect => new StreamImpl(sink.unwrap(Effect_dist_effectEffect.match(effect, {
|
|
1367
|
+
onFailure: Option_dist_effectOption.match({
|
|
1368
|
+
onNone: () => sink.unit,
|
|
1369
|
+
onSome: sink.fail
|
|
1370
|
+
}),
|
|
1371
|
+
onSuccess: a => sink.write(Chunk_dist_effectChunk.of(a))
|
|
1372
|
+
})));
|
|
1373
|
+
|
|
1374
|
+
/** @internal */
|
|
1375
|
+
const fromPubSub = (pubsub, options) => {
|
|
1376
|
+
const maxChunkSize = options?.maxChunkSize ?? DefaultChunkSize;
|
|
1377
|
+
if (options?.scoped) {
|
|
1378
|
+
const effect = Effect_dist_effectEffect.map(PubSub_dist_effectPubSub.subscribe(pubsub), queue => fromQueue(queue, {
|
|
1379
|
+
maxChunkSize,
|
|
1380
|
+
shutdown: true
|
|
1381
|
+
}));
|
|
1382
|
+
return options.shutdown ? Effect_dist_effectEffect.map(effect, ensuring(PubSub_dist_effectPubSub.shutdown(pubsub))) : effect;
|
|
1383
|
+
}
|
|
1384
|
+
const stream = flatMap(scoped(PubSub_dist_effectPubSub.subscribe(pubsub)), queue => fromQueue(queue, {
|
|
1385
|
+
maxChunkSize
|
|
1386
|
+
}));
|
|
1387
|
+
return options?.shutdown ? ensuring(stream, PubSub_dist_effectPubSub.shutdown(pubsub)) : stream;
|
|
1388
|
+
};
|
|
1389
|
+
|
|
1390
|
+
/** @internal */
|
|
1391
|
+
const fromIterable = iterable => suspend(() => Chunk_dist_effectChunk.isChunk(iterable) ? fromChunk(iterable) : fromIteratorSucceed(iterable[Symbol.iterator]()));
|
|
1392
|
+
|
|
1393
|
+
/** @internal */
|
|
1394
|
+
const fromIterableEffect = effect => Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.map(fromIterable), unwrap);
|
|
1395
|
+
|
|
1396
|
+
/** @internal */
|
|
1397
|
+
const fromIteratorSucceed = (iterator, maxChunkSize = DefaultChunkSize) => {
|
|
1398
|
+
return Function_dist_effectFunction.pipe(Effect_dist_effectEffect.sync(() => {
|
|
1399
|
+
let builder = [];
|
|
1400
|
+
const loop = iterator => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.sync(() => {
|
|
1401
|
+
let next = iterator.next();
|
|
1402
|
+
if (maxChunkSize === 1) {
|
|
1403
|
+
if (next.done) {
|
|
1404
|
+
return sink.unit;
|
|
1405
|
+
}
|
|
1406
|
+
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(next.value)), sink.flatMap(() => loop(iterator)));
|
|
1407
|
+
}
|
|
1408
|
+
builder = [];
|
|
1409
|
+
let count = 0;
|
|
1410
|
+
while (next.done === false) {
|
|
1411
|
+
builder.push(next.value);
|
|
1412
|
+
count = count + 1;
|
|
1413
|
+
if (count >= maxChunkSize) {
|
|
1414
|
+
break;
|
|
1415
|
+
}
|
|
1416
|
+
next = iterator.next();
|
|
1417
|
+
}
|
|
1418
|
+
if (count > 0) {
|
|
1419
|
+
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.unsafeFromArray(builder)), sink.flatMap(() => loop(iterator)));
|
|
1420
|
+
}
|
|
1421
|
+
return sink.unit;
|
|
1422
|
+
}), sink.unwrap);
|
|
1423
|
+
return new StreamImpl(loop(iterator));
|
|
1424
|
+
}), unwrap);
|
|
1425
|
+
};
|
|
1426
|
+
|
|
1427
|
+
/** @internal */
|
|
1428
|
+
const fromPull = effect => Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.map(repeatEffectChunkOption), unwrapScoped);
|
|
1429
|
+
|
|
1430
|
+
/** @internal */
|
|
1431
|
+
const fromQueue = (queue, options) => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.takeBetween(queue, 1, options?.maxChunkSize ?? DefaultChunkSize), Effect_dist_effectEffect.catchAllCause(cause => Function_dist_effectFunction.pipe(Queue_dist_effectQueue.isShutdown(queue), Effect_dist_effectEffect.flatMap(isShutdown => isShutdown && Cause_dist_effectCause.isInterrupted(cause) ? end() : failCause$1(cause)))), repeatEffectChunkOption, options?.shutdown ? ensuring(Queue_dist_effectQueue.shutdown(queue)) : Function_dist_effectFunction.identity);
|
|
1432
|
+
|
|
1433
|
+
/** @internal */
|
|
1434
|
+
const fromSchedule = schedule => Function_dist_effectFunction.pipe(Schedule_dist_effectSchedule.driver(schedule), Effect_dist_effectEffect.map(driver => repeatEffectOption(driver.next(void 0))), unwrap);
|
|
1435
|
+
|
|
1436
|
+
/** @internal */
|
|
1437
|
+
const fromReadableStream = (evaluate, onError) => unwrapScoped(Effect_dist_effectEffect.map(Effect_dist_effectEffect.acquireRelease(Effect_dist_effectEffect.sync(() => evaluate().getReader()), reader => Effect_dist_effectEffect.promise(() => reader.cancel())), reader => repeatEffectOption(Effect_dist_effectEffect.flatMap(Effect_dist_effectEffect.tryPromise({
|
|
1438
|
+
try: () => reader.read(),
|
|
1439
|
+
catch: reason => Option_dist_effectOption.some(onError(reason))
|
|
1440
|
+
}), ({
|
|
1441
|
+
done,
|
|
1442
|
+
value
|
|
1443
|
+
}) => done ? Effect_dist_effectEffect.fail(Option_dist_effectOption.none()) : Effect_dist_effectEffect.succeed(value)))));
|
|
1444
|
+
|
|
1445
|
+
/** @internal */
|
|
1446
|
+
const fromReadableStreamByob = (evaluate, onError, allocSize = 4096) => unwrapScoped(Effect_dist_effectEffect.map(Effect_dist_effectEffect.acquireRelease(Effect_dist_effectEffect.sync(() => evaluate().getReader({
|
|
1447
|
+
mode: "byob"
|
|
1448
|
+
})), reader => Effect_dist_effectEffect.promise(() => reader.cancel())), reader => catchAll(forever(readChunkStreamByobReader(reader, onError, allocSize)), error => typeof error === "object" && error !== null && "_tag" in error && error._tag === "EOF" ? empty : fail(error))));
|
|
1449
|
+
const readChunkStreamByobReader = (reader, onError, size) => {
|
|
1450
|
+
const buffer = new ArrayBuffer(size);
|
|
1451
|
+
return paginateEffect(0, offset => Effect_dist_effectEffect.flatMap(Effect_dist_effectEffect.tryPromise({
|
|
1452
|
+
try: () => reader.read(new Uint8Array(buffer, offset, buffer.byteLength - offset)),
|
|
1453
|
+
catch: reason => onError(reason)
|
|
1454
|
+
}), ({
|
|
1455
|
+
done,
|
|
1456
|
+
value
|
|
1457
|
+
}) => {
|
|
1458
|
+
if (done) {
|
|
1459
|
+
return Effect_dist_effectEffect.fail({
|
|
1460
|
+
_tag: "EOF"
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
const newOffset = offset + value.byteLength;
|
|
1464
|
+
return Effect_dist_effectEffect.succeed([value, newOffset >= buffer.byteLength ? Option_dist_effectOption.none() : Option_dist_effectOption.some(newOffset)]);
|
|
1465
|
+
}));
|
|
1466
|
+
};
|
|
1467
|
+
|
|
1468
|
+
/** @internal */
|
|
1469
|
+
const groupAdjacentBy = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
1470
|
+
const groupAdjacentByChunk = (state, chunk) => {
|
|
1471
|
+
if (Chunk_dist_effectChunk.isEmpty(chunk)) {
|
|
1472
|
+
return [state, Chunk_dist_effectChunk.empty()];
|
|
1473
|
+
}
|
|
1474
|
+
const builder = [];
|
|
1475
|
+
let from = 0;
|
|
1476
|
+
let until = 0;
|
|
1477
|
+
let key = undefined;
|
|
1478
|
+
let previousChunk = Chunk_dist_effectChunk.empty();
|
|
1479
|
+
switch (state._tag) {
|
|
1480
|
+
case "Some":
|
|
1481
|
+
{
|
|
1482
|
+
const tuple = state.value;
|
|
1483
|
+
key = tuple[0];
|
|
1484
|
+
let loop = true;
|
|
1485
|
+
while (loop && until < chunk.length) {
|
|
1486
|
+
const input = Chunk_dist_effectChunk.unsafeGet(chunk, until);
|
|
1487
|
+
const updatedKey = f(input);
|
|
1488
|
+
if (!Equal_dist_effectEqual.equals(key, updatedKey)) {
|
|
1489
|
+
const previousChunk = tuple[1];
|
|
1490
|
+
const additionalChunk = Chunk_dist_effectChunk.unsafeFromArray(Array.from(chunk).slice(from, until));
|
|
1491
|
+
const group = Chunk_dist_effectChunk.appendAllNonEmpty(previousChunk, additionalChunk);
|
|
1492
|
+
builder.push([key, group]);
|
|
1493
|
+
key = updatedKey;
|
|
1494
|
+
from = until;
|
|
1495
|
+
loop = false;
|
|
1496
|
+
}
|
|
1497
|
+
until = until + 1;
|
|
1498
|
+
}
|
|
1499
|
+
if (loop) {
|
|
1500
|
+
previousChunk = tuple[1];
|
|
1501
|
+
}
|
|
1502
|
+
break;
|
|
1503
|
+
}
|
|
1504
|
+
case "None":
|
|
1505
|
+
{
|
|
1506
|
+
key = f(Chunk_dist_effectChunk.unsafeGet(chunk, until));
|
|
1507
|
+
until = until + 1;
|
|
1508
|
+
break;
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
while (until < chunk.length) {
|
|
1512
|
+
const input = Chunk_dist_effectChunk.unsafeGet(chunk, until);
|
|
1513
|
+
const updatedKey = f(input);
|
|
1514
|
+
if (!Equal_dist_effectEqual.equals(key, updatedKey)) {
|
|
1515
|
+
builder.push([key, Chunk_dist_effectChunk.unsafeFromArray(Array.from(chunk).slice(from, until))]);
|
|
1516
|
+
key = updatedKey;
|
|
1517
|
+
from = until;
|
|
1518
|
+
}
|
|
1519
|
+
until = until + 1;
|
|
1520
|
+
}
|
|
1521
|
+
const nonEmptyChunk = Chunk_dist_effectChunk.appendAll(previousChunk, Chunk_dist_effectChunk.unsafeFromArray(Array.from(chunk).slice(from, until)));
|
|
1522
|
+
const output = Chunk_dist_effectChunk.unsafeFromArray(builder);
|
|
1523
|
+
return [Option_dist_effectOption.some([key, nonEmptyChunk]), output];
|
|
1524
|
+
};
|
|
1525
|
+
const groupAdjacent = state => sink.readWithCause({
|
|
1526
|
+
onInput: input => {
|
|
1527
|
+
const [updatedState, output] = groupAdjacentByChunk(state, input);
|
|
1528
|
+
return Chunk_dist_effectChunk.isEmpty(output) ? groupAdjacent(updatedState) : sink.flatMap(sink.write(output), () => groupAdjacent(updatedState));
|
|
1529
|
+
},
|
|
1530
|
+
onFailure: cause => Option_dist_effectOption.match(state, {
|
|
1531
|
+
onNone: () => sink.failCause(cause),
|
|
1532
|
+
onSome: output => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(output)), () => sink.failCause(cause))
|
|
1533
|
+
}),
|
|
1534
|
+
onDone: done => Option_dist_effectOption.match(state, {
|
|
1535
|
+
onNone: () => sink.succeedNow(done),
|
|
1536
|
+
onSome: output => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(output)), () => sink.succeedNow(done))
|
|
1537
|
+
})
|
|
1538
|
+
});
|
|
1539
|
+
return new StreamImpl(sink.pipeToOrFail(toChannel(self), groupAdjacent(Option_dist_effectOption.none())));
|
|
1540
|
+
});
|
|
1541
|
+
|
|
1542
|
+
/** @internal */
|
|
1543
|
+
const grouped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, chunkSize) => Function_dist_effectFunction.pipe(self, rechunk(chunkSize), chunks));
|
|
1544
|
+
|
|
1545
|
+
/** @internal */
|
|
1546
|
+
const groupedWithin = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, chunkSize, duration) => aggregateWithin(self, sink.collectAllN(chunkSize), Schedule_dist_effectSchedule.spaced(duration)));
|
|
1547
|
+
|
|
1548
|
+
/** @internal */
|
|
1549
|
+
const haltWhen = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, effect) => {
|
|
1550
|
+
const writer = fiber => Function_dist_effectFunction.pipe(Fiber_dist_effectFiber.poll(fiber), Effect_dist_effectEffect.map(Option_dist_effectOption.match({
|
|
1551
|
+
onNone: () => sink.readWith({
|
|
1552
|
+
onInput: input => sink.flatMap(sink.write(input), () => writer(fiber)),
|
|
1553
|
+
onFailure: sink.fail,
|
|
1554
|
+
onDone: () => sink.unit
|
|
1555
|
+
}),
|
|
1556
|
+
onSome: Exit_dist_effectExit.match({
|
|
1557
|
+
onFailure: sink.failCause,
|
|
1558
|
+
onSuccess: () => sink.unit
|
|
1559
|
+
})
|
|
1560
|
+
})), sink.unwrap);
|
|
1561
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.forkScoped(effect), Effect_dist_effectEffect.map(fiber => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer(fiber)))), sink.unwrapScoped));
|
|
1562
|
+
});
|
|
1563
|
+
|
|
1564
|
+
/** @internal */
|
|
1565
|
+
const haltAfter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, duration) => Function_dist_effectFunction.pipe(self, haltWhen(Clock_dist_effectClock.sleep(duration))));
|
|
1566
|
+
|
|
1567
|
+
/** @internal */
|
|
1568
|
+
const haltWhenDeferred = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, deferred) => {
|
|
1569
|
+
const writer = Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.poll(deferred), Effect_dist_effectEffect.map(Option_dist_effectOption.match({
|
|
1570
|
+
onNone: () => sink.readWith({
|
|
1571
|
+
onInput: input => Function_dist_effectFunction.pipe(sink.write(input), sink.flatMap(() => writer)),
|
|
1572
|
+
onFailure: sink.fail,
|
|
1573
|
+
onDone: () => sink.unit
|
|
1574
|
+
}),
|
|
1575
|
+
onSome: effect => sink.unwrap(Effect_dist_effectEffect.match(effect, {
|
|
1576
|
+
onFailure: sink.fail,
|
|
1577
|
+
onSuccess: () => sink.unit
|
|
1578
|
+
}))
|
|
1579
|
+
})), sink.unwrap);
|
|
1580
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer)));
|
|
1581
|
+
});
|
|
1582
|
+
|
|
1583
|
+
/** @internal */
|
|
1584
|
+
const identityStream = () => new StreamImpl(sink.identityChannel());
|
|
1585
|
+
|
|
1586
|
+
/** @internal */
|
|
1587
|
+
const interleave = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, interleaveWith(that, forever(make(true, false)))));
|
|
1588
|
+
|
|
1589
|
+
/** @internal */
|
|
1590
|
+
const interleaveWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, decider) => {
|
|
1591
|
+
const producer = handoff => sink.readWithCause({
|
|
1592
|
+
onInput: value => sink.flatMap(sink.fromEffect(offer(handoff, take$2.of(value))), () => producer(handoff)),
|
|
1593
|
+
onFailure: cause => sink.fromEffect(offer(handoff, take$2.failCause(cause))),
|
|
1594
|
+
onDone: () => sink.fromEffect(offer(handoff, take$2.end))
|
|
1595
|
+
});
|
|
1596
|
+
return new StreamImpl(sink.unwrapScoped(Function_dist_effectFunction.pipe(make$1(), Effect_dist_effectEffect.zip(make$1()), Effect_dist_effectEffect.tap(([left]) => Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.pipeTo(producer(left)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.tap(([_, right]) => Function_dist_effectFunction.pipe(toChannel(that), sink.concatMap(sink.writeChunk), sink.pipeTo(producer(right)), sink.runScoped, Effect_dist_effectEffect.forkScoped)), Effect_dist_effectEffect.map(([left, right]) => {
|
|
1597
|
+
const process = (leftDone, rightDone) => sink.readWithCause({
|
|
1598
|
+
onInput: bool => {
|
|
1599
|
+
if (bool && !leftDone) {
|
|
1600
|
+
return Function_dist_effectFunction.pipe(sink.fromEffect(take$1(left)), sink.flatMap(take$2.match({
|
|
1601
|
+
onEnd: () => rightDone ? sink.unit : process(true, rightDone),
|
|
1602
|
+
onFailure: sink.failCause,
|
|
1603
|
+
onSuccess: chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => process(leftDone, rightDone)))
|
|
1604
|
+
})));
|
|
1605
|
+
}
|
|
1606
|
+
if (!bool && !rightDone) {
|
|
1607
|
+
return Function_dist_effectFunction.pipe(sink.fromEffect(take$1(right)), sink.flatMap(take$2.match({
|
|
1608
|
+
onEnd: () => leftDone ? sink.unit : process(leftDone, true),
|
|
1609
|
+
onFailure: sink.failCause,
|
|
1610
|
+
onSuccess: chunk => Function_dist_effectFunction.pipe(sink.write(chunk), sink.flatMap(() => process(leftDone, rightDone)))
|
|
1611
|
+
})));
|
|
1612
|
+
}
|
|
1613
|
+
return process(leftDone, rightDone);
|
|
1614
|
+
},
|
|
1615
|
+
onFailure: sink.failCause,
|
|
1616
|
+
onDone: () => sink.unit
|
|
1617
|
+
});
|
|
1618
|
+
return Function_dist_effectFunction.pipe(toChannel(decider), sink.concatMap(sink.writeChunk), sink.pipeTo(process(false, false)));
|
|
1619
|
+
}))));
|
|
1620
|
+
});
|
|
1621
|
+
|
|
1622
|
+
/** @internal */
|
|
1623
|
+
const intersperse = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, element) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(sink.suspend(() => {
|
|
1624
|
+
const writer = isFirst => sink.readWithCause({
|
|
1625
|
+
onInput: chunk => {
|
|
1626
|
+
const builder = [];
|
|
1627
|
+
let flagResult = isFirst;
|
|
1628
|
+
for (const output of chunk) {
|
|
1629
|
+
if (flagResult) {
|
|
1630
|
+
flagResult = false;
|
|
1631
|
+
builder.push(output);
|
|
1632
|
+
} else {
|
|
1633
|
+
builder.push(element);
|
|
1634
|
+
builder.push(output);
|
|
1635
|
+
}
|
|
1636
|
+
}
|
|
1637
|
+
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.unsafeFromArray(builder)), sink.flatMap(() => writer(flagResult)));
|
|
1638
|
+
},
|
|
1639
|
+
onFailure: sink.failCause,
|
|
1640
|
+
onDone: () => sink.unit
|
|
1641
|
+
});
|
|
1642
|
+
return writer(true);
|
|
1643
|
+
})))));
|
|
1644
|
+
|
|
1645
|
+
/** @internal */
|
|
1646
|
+
const intersperseAffixes = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, {
|
|
1647
|
+
end,
|
|
1648
|
+
middle,
|
|
1649
|
+
start
|
|
1650
|
+
}) => Function_dist_effectFunction.pipe(make(start), concat(Function_dist_effectFunction.pipe(self, intersperse(middle))), concat(make(end))));
|
|
1651
|
+
|
|
1652
|
+
/** @internal */
|
|
1653
|
+
const interruptAfter = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, duration) => Function_dist_effectFunction.pipe(self, interruptWhen(Clock_dist_effectClock.sleep(duration))));
|
|
1654
|
+
|
|
1655
|
+
/** @internal */
|
|
1656
|
+
const interruptWhen = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, effect) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.interruptWhen(effect))));
|
|
1657
|
+
|
|
1658
|
+
/** @internal */
|
|
1659
|
+
const interruptWhenDeferred = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, deferred) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.interruptWhenDeferred(deferred))));
|
|
1660
|
+
|
|
1661
|
+
/** @internal */
|
|
1662
|
+
const iterate = (value, next) => unfold(value, a => Option_dist_effectOption.some([a, next(a)]));
|
|
1663
|
+
|
|
1664
|
+
/** @internal */
|
|
1665
|
+
const make = (...as) => fromIterable(as);
|
|
1666
|
+
|
|
1667
|
+
/** @internal */
|
|
1668
|
+
const map = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapOut(Chunk_dist_effectChunk.map(f)))));
|
|
1669
|
+
|
|
1670
|
+
/** @internal */
|
|
1671
|
+
const mapAccum = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => {
|
|
1672
|
+
const accumulator = s => sink.readWith({
|
|
1673
|
+
onInput: input => {
|
|
1674
|
+
const [nextS, chunk] = Chunk_dist_effectChunk.mapAccum(input, s, f);
|
|
1675
|
+
return sink.flatMap(sink.write(chunk), () => accumulator(nextS));
|
|
1676
|
+
},
|
|
1677
|
+
onFailure: sink.fail,
|
|
1678
|
+
onDone: () => sink.unit
|
|
1679
|
+
});
|
|
1680
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(accumulator(s))));
|
|
1681
|
+
});
|
|
1682
|
+
|
|
1683
|
+
/** @internal */
|
|
1684
|
+
const mapAccumEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => suspend(() => {
|
|
1685
|
+
const accumulator = s => sink.readWith({
|
|
1686
|
+
onInput: input => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.suspend(() => {
|
|
1687
|
+
const outputs = [];
|
|
1688
|
+
const emit = output => Effect_dist_effectEffect.sync(() => {
|
|
1689
|
+
outputs.push(output);
|
|
1690
|
+
});
|
|
1691
|
+
return Function_dist_effectFunction.pipe(input, Effect_dist_effectEffect.reduce(s, (s, a) => Function_dist_effectFunction.pipe(f(s, a), Effect_dist_effectEffect.flatMap(([s, a]) => Function_dist_effectFunction.pipe(emit(a), Effect_dist_effectEffect.as(s))))), Effect_dist_effectEffect.match({
|
|
1692
|
+
onFailure: error => {
|
|
1693
|
+
if (outputs.length !== 0) {
|
|
1694
|
+
return sink.zipRight(sink.write(Chunk_dist_effectChunk.unsafeFromArray(outputs)), sink.fail(error));
|
|
1695
|
+
}
|
|
1696
|
+
return sink.fail(error);
|
|
1697
|
+
},
|
|
1698
|
+
onSuccess: s => sink.flatMap(sink.write(Chunk_dist_effectChunk.unsafeFromArray(outputs)), () => accumulator(s))
|
|
1699
|
+
}));
|
|
1700
|
+
}), sink.unwrap),
|
|
1701
|
+
onFailure: sink.fail,
|
|
1702
|
+
onDone: () => sink.unit
|
|
1703
|
+
});
|
|
1704
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(accumulator(s))));
|
|
1705
|
+
}));
|
|
1706
|
+
|
|
1707
|
+
/** @internal */
|
|
1708
|
+
const mapBoth = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => Function_dist_effectFunction.pipe(self, mapError(options.onFailure), map(options.onSuccess)));
|
|
1709
|
+
|
|
1710
|
+
/** @internal */
|
|
1711
|
+
const mapChunks = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapOut(f))));
|
|
1712
|
+
|
|
1713
|
+
/** @internal */
|
|
1714
|
+
const mapChunksEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapOutEffect(f))));
|
|
1715
|
+
|
|
1716
|
+
/** @internal */
|
|
1717
|
+
const mapConcat = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapConcatChunk(a => Chunk_dist_effectChunk.fromIterable(f(a)))));
|
|
1718
|
+
|
|
1719
|
+
/** @internal */
|
|
1720
|
+
const mapConcatChunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapChunks(Chunk_dist_effectChunk.flatMap(f))));
|
|
1721
|
+
|
|
1722
|
+
/** @internal */
|
|
1723
|
+
const mapConcatChunkEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapEffectSequential(f), mapConcatChunk(Function_dist_effectFunction.identity)));
|
|
1724
|
+
|
|
1725
|
+
/** @internal */
|
|
1726
|
+
const mapConcatEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapEffectSequential(a => Function_dist_effectFunction.pipe(f(a), Effect_dist_effectEffect.map(Chunk_dist_effectChunk.fromIterable))), mapConcatChunk(Function_dist_effectFunction.identity)));
|
|
1727
|
+
|
|
1728
|
+
/** @internal */
|
|
1729
|
+
const mapEffectSequential = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
1730
|
+
const loop = iterator => {
|
|
1731
|
+
const next = iterator.next();
|
|
1732
|
+
if (next.done) {
|
|
1733
|
+
return sink.readWithCause({
|
|
1734
|
+
onInput: elem => loop(elem[Symbol.iterator]()),
|
|
1735
|
+
onFailure: sink.failCause,
|
|
1736
|
+
onDone: sink.succeed
|
|
1737
|
+
});
|
|
1738
|
+
} else {
|
|
1739
|
+
const value = next.value;
|
|
1740
|
+
return sink.unwrap(Effect_dist_effectEffect.map(f(value), a2 => sink.flatMap(sink.write(Chunk_dist_effectChunk.of(a2)), () => loop(iterator))));
|
|
1741
|
+
}
|
|
1742
|
+
};
|
|
1743
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(sink.suspend(() => loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]())))));
|
|
1744
|
+
});
|
|
1745
|
+
|
|
1746
|
+
/** @internal */
|
|
1747
|
+
const mapEffectPar = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, n, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.concatMap(sink.writeChunk), sink.mapOutEffectPar(f, n), sink.mapOut(Chunk_dist_effectChunk.of))));
|
|
1748
|
+
|
|
1749
|
+
/** @internal */
|
|
1750
|
+
const mapError = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapError(f))));
|
|
1751
|
+
|
|
1752
|
+
/** @internal */
|
|
1753
|
+
const mapErrorCause = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.mapErrorCause(f))));
|
|
1754
|
+
|
|
1755
|
+
/** @internal */
|
|
1756
|
+
const merge = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[1]), (self, that, options) => mergeWith(self, that, {
|
|
1757
|
+
onSelf: Function_dist_effectFunction.identity,
|
|
1758
|
+
onOther: Function_dist_effectFunction.identity,
|
|
1759
|
+
haltStrategy: options?.haltStrategy
|
|
1760
|
+
}));
|
|
1761
|
+
|
|
1762
|
+
/** @internal */
|
|
1763
|
+
const mergeAll = /*#__PURE__*/Function_dist_effectFunction.dual(args => Symbol.iterator in args[0], (streams, options) => flatten(fromIterable(streams), options));
|
|
1764
|
+
|
|
1765
|
+
/** @internal */
|
|
1766
|
+
const mergeEither = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => mergeWith(self, that, {
|
|
1767
|
+
onSelf: Either_dist_effectEither.left,
|
|
1768
|
+
onOther: Either_dist_effectEither.right
|
|
1769
|
+
}));
|
|
1770
|
+
|
|
1771
|
+
/** @internal */
|
|
1772
|
+
const mergeLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, merge(drain(that))));
|
|
1773
|
+
|
|
1774
|
+
/** @internal */
|
|
1775
|
+
const mergeRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(drain(self), merge(that)));
|
|
1776
|
+
|
|
1777
|
+
/** @internal */
|
|
1778
|
+
const mergeWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, other, options) => {
|
|
1779
|
+
const strategy = options.haltStrategy ? StreamHaltStrategy_dist_effectStreamHaltStrategy.fromInput(options.haltStrategy) : StreamHaltStrategy_dist_effectStreamHaltStrategy.Both;
|
|
1780
|
+
const handler = terminate => exit => terminate || !Exit_dist_effectExit.isSuccess(exit) ?
|
|
1781
|
+
// TODO: remove
|
|
1782
|
+
ChannelMergeDecision_dist_effectChannelMergeDecision.Done(Effect_dist_effectEffect.suspend(() => exit)) : ChannelMergeDecision_dist_effectChannelMergeDecision.Await(exit => Effect_dist_effectEffect.suspend(() => exit));
|
|
1783
|
+
return new StreamImpl(sink.mergeWith(toChannel(map(self, options.onSelf)), {
|
|
1784
|
+
other: toChannel(map(other, options.onOther)),
|
|
1785
|
+
onSelfDone: handler(strategy._tag === "Either" || strategy._tag === "Left"),
|
|
1786
|
+
onOtherDone: handler(strategy._tag === "Either" || strategy._tag === "Right")
|
|
1787
|
+
}));
|
|
1788
|
+
});
|
|
1789
|
+
|
|
1790
|
+
/** @internal */
|
|
1791
|
+
const mkString = self => run(self, sink.mkString);
|
|
1792
|
+
|
|
1793
|
+
/** @internal */
|
|
1794
|
+
const never = /*#__PURE__*/fromEffect(Effect_dist_effectEffect.never);
|
|
1795
|
+
|
|
1796
|
+
/** @internal */
|
|
1797
|
+
const onError = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, cleanup) => Function_dist_effectFunction.pipe(self, catchAllCause(cause => fromEffect(Function_dist_effectFunction.pipe(cleanup(cause), Effect_dist_effectEffect.zipRight(Effect_dist_effectEffect.failCause(cause)))))));
|
|
1798
|
+
|
|
1799
|
+
/** @internal */
|
|
1800
|
+
const onDone = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, cleanup) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.ensuringWith(exit => Exit_dist_effectExit.isSuccess(exit) ? cleanup() : Effect_dist_effectEffect.unit))));
|
|
1801
|
+
|
|
1802
|
+
/** @internal */
|
|
1803
|
+
const orDie = self => Function_dist_effectFunction.pipe(self, orDieWith(Function_dist_effectFunction.identity));
|
|
1804
|
+
|
|
1805
|
+
/** @internal */
|
|
1806
|
+
const orDieWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.orDieWith(f))));
|
|
1807
|
+
|
|
1808
|
+
/** @internal */
|
|
1809
|
+
const orElse = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.orElse(() => toChannel(that())))));
|
|
1810
|
+
|
|
1811
|
+
/** @internal */
|
|
1812
|
+
const orElseEither = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, map(Either_dist_effectEither.left), orElse(() => Function_dist_effectFunction.pipe(that(), map(Either_dist_effectEither.right)))));
|
|
1813
|
+
|
|
1814
|
+
/** @internal */
|
|
1815
|
+
const orElseFail = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, error) => Function_dist_effectFunction.pipe(self, orElse(() => failSync(error))));
|
|
1816
|
+
|
|
1817
|
+
/** @internal */
|
|
1818
|
+
const orElseIfEmpty = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, element) => Function_dist_effectFunction.pipe(self, orElseIfEmptyChunk(() => Chunk_dist_effectChunk.of(element()))));
|
|
1819
|
+
|
|
1820
|
+
/** @internal */
|
|
1821
|
+
const orElseIfEmptyChunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, chunk) => Function_dist_effectFunction.pipe(self, orElseIfEmptyStream(() => new StreamImpl(sink.write(chunk())))));
|
|
1822
|
+
|
|
1823
|
+
/** @internal */
|
|
1824
|
+
const orElseIfEmptyStream = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, stream) => {
|
|
1825
|
+
const writer = sink.readWith({
|
|
1826
|
+
onInput: input => {
|
|
1827
|
+
if (Chunk_dist_effectChunk.isEmpty(input)) {
|
|
1828
|
+
return sink.suspend(() => writer);
|
|
1829
|
+
}
|
|
1830
|
+
return Function_dist_effectFunction.pipe(sink.write(input), sink.zipRight(sink.identityChannel()));
|
|
1831
|
+
},
|
|
1832
|
+
onFailure: sink.fail,
|
|
1833
|
+
onDone: () => sink.suspend(() => toChannel(stream()))
|
|
1834
|
+
});
|
|
1835
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(writer)));
|
|
1836
|
+
});
|
|
1837
|
+
|
|
1838
|
+
/** @internal */
|
|
1839
|
+
const orElseSucceed = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, value) => Function_dist_effectFunction.pipe(self, orElse(() => sync(value))));
|
|
1840
|
+
|
|
1841
|
+
/** @internal */
|
|
1842
|
+
const paginate = (s, f) => paginateChunk(s, s => {
|
|
1843
|
+
const page = f(s);
|
|
1844
|
+
return [Chunk_dist_effectChunk.of(page[0]), page[1]];
|
|
1845
|
+
});
|
|
1846
|
+
|
|
1847
|
+
/** @internal */
|
|
1848
|
+
const paginateChunk = (s, f) => {
|
|
1849
|
+
const loop = s => {
|
|
1850
|
+
const page = f(s);
|
|
1851
|
+
return Option_dist_effectOption.match(page[1], {
|
|
1852
|
+
onNone: () => sink.zipRight(sink.write(page[0]), sink.unit),
|
|
1853
|
+
onSome: s => sink.flatMap(sink.write(page[0]), () => loop(s))
|
|
1854
|
+
});
|
|
1855
|
+
};
|
|
1856
|
+
return new StreamImpl(sink.suspend(() => loop(s)));
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
/** @internal */
|
|
1860
|
+
const paginateChunkEffect = (s, f) => {
|
|
1861
|
+
const loop = s => sink.unwrap(Effect_dist_effectEffect.map(f(s), ([chunk, option]) => Option_dist_effectOption.match(option, {
|
|
1862
|
+
onNone: () => sink.zipRight(sink.write(chunk), sink.unit),
|
|
1863
|
+
onSome: s => sink.flatMap(sink.write(chunk), () => loop(s))
|
|
1864
|
+
})));
|
|
1865
|
+
return new StreamImpl(sink.suspend(() => loop(s)));
|
|
1866
|
+
};
|
|
1867
|
+
|
|
1868
|
+
/** @internal */
|
|
1869
|
+
const paginateEffect = (s, f) => paginateChunkEffect(s, s => Function_dist_effectFunction.pipe(f(s), Effect_dist_effectEffect.map(([a, s]) => [Chunk_dist_effectChunk.of(a), s])));
|
|
1870
|
+
|
|
1871
|
+
/** @internal */
|
|
1872
|
+
const peel = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => {
|
|
1873
|
+
const OP_EMIT = "Emit";
|
|
1874
|
+
const OP_HALT = "Halt";
|
|
1875
|
+
const OP_END = "End";
|
|
1876
|
+
return Function_dist_effectFunction.pipe(Deferred_dist_effectDeferred.make(), Effect_dist_effectEffect.flatMap(deferred => Function_dist_effectFunction.pipe(make$1(), Effect_dist_effectEffect.map(handoff => {
|
|
1877
|
+
const consumer = sink.foldSink(sink.collectLeftover(sink$1), {
|
|
1878
|
+
onFailure: error => sink.zipRight$1(sink.fromEffect$1(Deferred_dist_effectDeferred.fail(deferred, error)), sink.fail$1(error)),
|
|
1879
|
+
onSuccess: ([z, leftovers]) => {
|
|
1880
|
+
const loop = sink.readWithCause({
|
|
1881
|
+
onInput: elements => sink.flatMap(sink.fromEffect(offer(handoff, {
|
|
1882
|
+
_tag: OP_EMIT,
|
|
1883
|
+
elements
|
|
1884
|
+
})), () => loop),
|
|
1885
|
+
onFailure: cause => sink.zipRight(sink.fromEffect(offer(handoff, {
|
|
1886
|
+
_tag: OP_HALT,
|
|
1887
|
+
cause
|
|
1888
|
+
})), sink.failCause(cause)),
|
|
1889
|
+
onDone: _ => sink.zipRight(sink.fromEffect(offer(handoff, {
|
|
1890
|
+
_tag: OP_END
|
|
1891
|
+
})), sink.unit)
|
|
1892
|
+
});
|
|
1893
|
+
return sink.fromChannel(Function_dist_effectFunction.pipe(sink.fromEffect(Deferred_dist_effectDeferred.succeed(deferred, z)), sink.zipRight(sink.fromEffect(Function_dist_effectFunction.pipe(handoff, offer({
|
|
1894
|
+
_tag: OP_EMIT,
|
|
1895
|
+
elements: leftovers
|
|
1896
|
+
})))), sink.zipRight(loop)));
|
|
1897
|
+
}
|
|
1898
|
+
});
|
|
1899
|
+
const producer = Function_dist_effectFunction.pipe(take$1(handoff), Effect_dist_effectEffect.map(signal => {
|
|
1900
|
+
switch (signal._tag) {
|
|
1901
|
+
case OP_EMIT:
|
|
1902
|
+
{
|
|
1903
|
+
return Function_dist_effectFunction.pipe(sink.write(signal.elements), sink.flatMap(() => producer));
|
|
1904
|
+
}
|
|
1905
|
+
case OP_HALT:
|
|
1906
|
+
{
|
|
1907
|
+
return sink.failCause(signal.cause);
|
|
1908
|
+
}
|
|
1909
|
+
case OP_END:
|
|
1910
|
+
{
|
|
1911
|
+
return sink.unit;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
}), sink.unwrap);
|
|
1915
|
+
return Function_dist_effectFunction.pipe(self, tapErrorCause(cause => Deferred_dist_effectDeferred.failCause(deferred, cause)), run(consumer), Effect_dist_effectEffect.forkScoped, Effect_dist_effectEffect.zipRight(Deferred_dist_effectDeferred["await"](deferred)), Effect_dist_effectEffect.map(z => [z, new StreamImpl(producer)]));
|
|
1916
|
+
}))), Effect_dist_effectEffect.flatten);
|
|
1917
|
+
});
|
|
1918
|
+
|
|
1919
|
+
/** @internal */
|
|
1920
|
+
const partition = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof args[1] === "function", (self, predicate, options) => partitionEither(self, a => Effect_dist_effectEffect.succeed(predicate(a) ? Either_dist_effectEither.left(a) : Either_dist_effectEither.right(a)), options));
|
|
1921
|
+
|
|
1922
|
+
/** @internal */
|
|
1923
|
+
const partitionEither = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof args[1] === "function", (self, predicate, options) => Function_dist_effectFunction.pipe(mapEffectSequential(self, predicate), distributedWith({
|
|
1924
|
+
size: 2,
|
|
1925
|
+
maximumLag: options?.bufferSize ?? 16,
|
|
1926
|
+
decide: Either_dist_effectEither.match({
|
|
1927
|
+
onLeft: () => Effect_dist_effectEffect.succeed(n => n === 0),
|
|
1928
|
+
onRight: () => Effect_dist_effectEffect.succeed(n => n === 1)
|
|
1929
|
+
})
|
|
1930
|
+
}), Effect_dist_effectEffect.flatMap(([queue1, queue2]) => Effect_dist_effectEffect.succeed([filterMap(flattenExitOption(fromQueue(queue1, {
|
|
1931
|
+
shutdown: true
|
|
1932
|
+
})), _ => Either_dist_effectEither.match(_, {
|
|
1933
|
+
onLeft: Option_dist_effectOption.some,
|
|
1934
|
+
onRight: Option_dist_effectOption.none
|
|
1935
|
+
})), filterMap(flattenExitOption(fromQueue(queue2, {
|
|
1936
|
+
shutdown: true
|
|
1937
|
+
})), _ => Either_dist_effectEither.match(_, {
|
|
1938
|
+
onLeft: Option_dist_effectOption.none,
|
|
1939
|
+
onRight: Option_dist_effectOption.some
|
|
1940
|
+
}))]))));
|
|
1941
|
+
|
|
1942
|
+
/** @internal */
|
|
1943
|
+
const pipeThrough = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(sink.toChannel(sink$1)))));
|
|
1944
|
+
|
|
1945
|
+
/** @internal */
|
|
1946
|
+
const pipeThroughChannel = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, channel) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(channel))));
|
|
1947
|
+
|
|
1948
|
+
/** @internal */
|
|
1949
|
+
const pipeThroughChannelOrFail = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, chan) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(chan))));
|
|
1950
|
+
|
|
1951
|
+
/** @internal */
|
|
1952
|
+
const prepend = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, values) => new StreamImpl(sink.zipRight(sink.write(values), toChannel(self))));
|
|
1953
|
+
|
|
1954
|
+
/** @internal */
|
|
1955
|
+
const provideContext = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, context) => new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.provideContext(context))));
|
|
1956
|
+
|
|
1957
|
+
/** @internal */
|
|
1958
|
+
const provideLayer = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, layer) => new StreamImpl(sink.unwrapScoped(Function_dist_effectFunction.pipe(Layer_dist_effectLayer.build(layer), Effect_dist_effectEffect.map(env => Function_dist_effectFunction.pipe(toChannel(self), sink.provideContext(env)))))));
|
|
1959
|
+
|
|
1960
|
+
/** @internal */
|
|
1961
|
+
const provideService = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, resource) => provideServiceEffect(self, tag, Effect_dist_effectEffect.succeed(resource)));
|
|
1962
|
+
|
|
1963
|
+
/** @internal */
|
|
1964
|
+
const provideServiceEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, effect) => provideServiceStream(self, tag, fromEffect(effect)));
|
|
1965
|
+
|
|
1966
|
+
/** @internal */
|
|
1967
|
+
const provideServiceStream = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, stream) => contextWithStream(env => flatMap(stream, service => Function_dist_effectFunction.pipe(self, provideContext(Context_dist_effectContext.add(env, tag, service))))));
|
|
1968
|
+
|
|
1969
|
+
/** @internal */
|
|
1970
|
+
const mapInputContext = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => contextWithStream(env => Function_dist_effectFunction.pipe(self, provideContext(f(env)))));
|
|
1971
|
+
|
|
1972
|
+
/** @internal */
|
|
1973
|
+
const provideSomeLayer = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, layer) =>
|
|
1974
|
+
// @ts-expect-error
|
|
1975
|
+
Function_dist_effectFunction.pipe(self, provideLayer(Function_dist_effectFunction.pipe(Layer_dist_effectLayer.context(), Layer_dist_effectLayer.merge(layer)))));
|
|
1976
|
+
|
|
1977
|
+
/** @internal */
|
|
1978
|
+
const range = (min, max, chunkSize = DefaultChunkSize) => suspend(() => {
|
|
1979
|
+
if (min > max) {
|
|
1980
|
+
return empty;
|
|
1981
|
+
}
|
|
1982
|
+
const go = (min, max, chunkSize) => {
|
|
1983
|
+
const remaining = max - min + 1;
|
|
1984
|
+
if (remaining > chunkSize) {
|
|
1985
|
+
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.range(min, min + chunkSize - 1)), sink.flatMap(() => go(min + chunkSize, max, chunkSize)));
|
|
1986
|
+
}
|
|
1987
|
+
return sink.write(Chunk_dist_effectChunk.range(min, min + remaining - 1));
|
|
1988
|
+
};
|
|
1989
|
+
return new StreamImpl(go(min, max, chunkSize));
|
|
1990
|
+
});
|
|
1991
|
+
|
|
1992
|
+
/** @internal */
|
|
1993
|
+
const rechunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => suspend(() => {
|
|
1994
|
+
const target = Math.max(n, 1);
|
|
1995
|
+
const process = rechunkProcess(new StreamRechunker(target), target);
|
|
1996
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(process)));
|
|
1997
|
+
}));
|
|
1998
|
+
|
|
1999
|
+
/** @internal */
|
|
2000
|
+
const rechunkProcess = (rechunker, target) => sink.readWithCause({
|
|
2001
|
+
onInput: chunk => {
|
|
2002
|
+
if (chunk.length === target && rechunker.isEmpty()) {
|
|
2003
|
+
return sink.flatMap(sink.write(chunk), () => rechunkProcess(rechunker, target));
|
|
2004
|
+
}
|
|
2005
|
+
if (chunk.length > 0) {
|
|
2006
|
+
const chunks = [];
|
|
2007
|
+
let result = undefined;
|
|
2008
|
+
let index = 0;
|
|
2009
|
+
while (index < chunk.length) {
|
|
2010
|
+
while (index < chunk.length && result === undefined) {
|
|
2011
|
+
result = rechunker.write(Function_dist_effectFunction.pipe(chunk, Chunk_dist_effectChunk.unsafeGet(index)));
|
|
2012
|
+
index = index + 1;
|
|
2013
|
+
}
|
|
2014
|
+
if (result !== undefined) {
|
|
2015
|
+
chunks.push(result);
|
|
2016
|
+
result = undefined;
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
return sink.flatMap(sink.writeAll(...chunks), () => rechunkProcess(rechunker, target));
|
|
2020
|
+
}
|
|
2021
|
+
return sink.suspend(() => rechunkProcess(rechunker, target));
|
|
2022
|
+
},
|
|
2023
|
+
onFailure: cause => sink.zipRight(rechunker.emitIfNotEmpty(), sink.failCause(cause)),
|
|
2024
|
+
onDone: () => rechunker.emitIfNotEmpty()
|
|
2025
|
+
});
|
|
2026
|
+
|
|
2027
|
+
/** @internal */
|
|
2028
|
+
class StreamRechunker {
|
|
2029
|
+
builder = [];
|
|
2030
|
+
pos = 0;
|
|
2031
|
+
constructor(n) {
|
|
2032
|
+
this.n = n;
|
|
2033
|
+
}
|
|
2034
|
+
isEmpty() {
|
|
2035
|
+
return this.pos === 0;
|
|
2036
|
+
}
|
|
2037
|
+
write(elem) {
|
|
2038
|
+
this.builder.push(elem);
|
|
2039
|
+
this.pos += 1;
|
|
2040
|
+
if (this.pos === this.n) {
|
|
2041
|
+
const result = Chunk_dist_effectChunk.unsafeFromArray(this.builder);
|
|
2042
|
+
this.builder = [];
|
|
2043
|
+
this.pos = 0;
|
|
2044
|
+
return result;
|
|
2045
|
+
}
|
|
2046
|
+
return undefined;
|
|
2047
|
+
}
|
|
2048
|
+
emitIfNotEmpty() {
|
|
2049
|
+
if (this.pos !== 0) {
|
|
2050
|
+
return sink.write(Chunk_dist_effectChunk.unsafeFromArray(this.builder));
|
|
2051
|
+
}
|
|
2052
|
+
return sink.unit;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
/** @internal */
|
|
2057
|
+
const refineOrDie = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => Function_dist_effectFunction.pipe(self, refineOrDieWith(pf, Function_dist_effectFunction.identity)));
|
|
2058
|
+
|
|
2059
|
+
/** @internal */
|
|
2060
|
+
const refineOrDieWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, pf, f) => new StreamImpl(sink.catchAll(toChannel(self), error => Option_dist_effectOption.match(pf(error), {
|
|
2061
|
+
onNone: () => sink.failCause(Cause_dist_effectCause.die(f(error))),
|
|
2062
|
+
onSome: sink.fail
|
|
2063
|
+
}))));
|
|
2064
|
+
|
|
2065
|
+
/** @internal */
|
|
2066
|
+
const repeat = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => filterMap(repeatEither(self, schedule), _ => Either_dist_effectEither.match(_, {
|
|
2067
|
+
onLeft: Option_dist_effectOption.none,
|
|
2068
|
+
onRight: Option_dist_effectOption.some
|
|
2069
|
+
})));
|
|
2070
|
+
|
|
2071
|
+
/** @internal */
|
|
2072
|
+
const repeatEffect = effect => repeatEffectOption(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some)));
|
|
2073
|
+
|
|
2074
|
+
/** @internal */
|
|
2075
|
+
const repeatEffectChunk = effect => repeatEffectChunkOption(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some)));
|
|
2076
|
+
|
|
2077
|
+
/** @internal */
|
|
2078
|
+
const repeatEffectChunkOption = effect => unfoldChunkEffect(effect, effect => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.map(effect, chunk => Option_dist_effectOption.some([chunk, effect])), Effect_dist_effectEffect.catchAll(Option_dist_effectOption.match({
|
|
2079
|
+
onNone: () => Effect_dist_effectEffect.succeed(Option_dist_effectOption.none()),
|
|
2080
|
+
onSome: Effect_dist_effectEffect.fail
|
|
2081
|
+
}))));
|
|
2082
|
+
|
|
2083
|
+
/** @internal */
|
|
2084
|
+
const repeatEffectOption = effect => repeatEffectChunkOption(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.map(Chunk_dist_effectChunk.of)));
|
|
2085
|
+
|
|
2086
|
+
/** @internal */
|
|
2087
|
+
const repeatEither = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => repeatWith(self, schedule, {
|
|
2088
|
+
onElement: a => Either_dist_effectEither.right(a),
|
|
2089
|
+
onSchedule: Either_dist_effectEither.left
|
|
2090
|
+
}));
|
|
2091
|
+
|
|
2092
|
+
/** @internal */
|
|
2093
|
+
const repeatElements = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => filterMap(repeatElementsWith(self, schedule, {
|
|
2094
|
+
onElement: a => Option_dist_effectOption.some(a),
|
|
2095
|
+
onSchedule: Option_dist_effectOption.none
|
|
2096
|
+
}), Function_dist_effectFunction.identity));
|
|
2097
|
+
|
|
2098
|
+
/** @internal */
|
|
2099
|
+
const repeatElementsWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, schedule, options) => {
|
|
2100
|
+
const driver = Function_dist_effectFunction.pipe(Schedule_dist_effectSchedule.driver(schedule), Effect_dist_effectEffect.map(driver => {
|
|
2101
|
+
const feed = input => Option_dist_effectOption.match(Chunk_dist_effectChunk.head(input), {
|
|
2102
|
+
onNone: () => loop,
|
|
2103
|
+
onSome: a => sink.zipRight(sink.write(Chunk_dist_effectChunk.of(options.onElement(a))), step(Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.drop(1)), a))
|
|
2104
|
+
});
|
|
2105
|
+
const step = (input, a) => {
|
|
2106
|
+
const advance = Function_dist_effectFunction.pipe(driver.next(a), Effect_dist_effectEffect.as(Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(options.onElement(a))), sink.flatMap(() => step(input, a)))));
|
|
2107
|
+
const reset = Function_dist_effectFunction.pipe(driver.last(), Effect_dist_effectEffect.orDie, Effect_dist_effectEffect.flatMap(b => Function_dist_effectFunction.pipe(driver.reset(), Effect_dist_effectEffect.map(() => Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(options.onSchedule(b))), sink.zipRight(feed(input)))))));
|
|
2108
|
+
return Function_dist_effectFunction.pipe(advance, Effect_dist_effectEffect.orElse(() => reset), sink.unwrap);
|
|
2109
|
+
};
|
|
2110
|
+
const loop = sink.readWith({
|
|
2111
|
+
onInput: feed,
|
|
2112
|
+
onFailure: sink.fail,
|
|
2113
|
+
onDone: () => sink.unit
|
|
2114
|
+
});
|
|
2115
|
+
return loop;
|
|
2116
|
+
}), sink.unwrap);
|
|
2117
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(driver)));
|
|
2118
|
+
});
|
|
2119
|
+
|
|
2120
|
+
/** @internal */
|
|
2121
|
+
const repeatValue = value => new StreamImpl(sink.repeated(sink.write(Chunk_dist_effectChunk.of(value))));
|
|
2122
|
+
|
|
2123
|
+
/** @internal */
|
|
2124
|
+
const repeatWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, schedule, options) => {
|
|
2125
|
+
return Function_dist_effectFunction.pipe(Schedule_dist_effectSchedule.driver(schedule), Effect_dist_effectEffect.map(driver => {
|
|
2126
|
+
const scheduleOutput = Function_dist_effectFunction.pipe(driver.last(), Effect_dist_effectEffect.orDie, Effect_dist_effectEffect.map(options.onSchedule));
|
|
2127
|
+
const process = Function_dist_effectFunction.pipe(self, map(options.onElement), toChannel);
|
|
2128
|
+
const loop = sink.unwrap(Effect_dist_effectEffect.match(driver.next(void 0), {
|
|
2129
|
+
onFailure: () => sink.unit,
|
|
2130
|
+
onSuccess: () => Function_dist_effectFunction.pipe(process, sink.zipRight(Function_dist_effectFunction.pipe(scheduleOutput, Effect_dist_effectEffect.map(c => Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(c)), sink.flatMap(() => loop))), sink.unwrap)))
|
|
2131
|
+
}));
|
|
2132
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(process, sink.zipRight(loop)));
|
|
2133
|
+
}), unwrap);
|
|
2134
|
+
});
|
|
2135
|
+
|
|
2136
|
+
/** @internal */
|
|
2137
|
+
const repeatWithSchedule = (value, schedule) => repeatEffectWithSchedule(Effect_dist_effectEffect.succeed(value), schedule);
|
|
2138
|
+
|
|
2139
|
+
/** @internal */
|
|
2140
|
+
const repeatEffectWithSchedule = (effect, schedule) => flatMap(fromEffect(Effect_dist_effectEffect.zip(effect, Schedule_dist_effectSchedule.driver(schedule))), ([a, driver]) => concat(succeed(a), unfoldEffect(a, s => Effect_dist_effectEffect.matchEffect(driver.next(s), {
|
|
2141
|
+
onFailure: Effect_dist_effectEffect.succeed,
|
|
2142
|
+
onSuccess: () => Effect_dist_effectEffect.map(effect, nextA => Option_dist_effectOption.some([nextA, nextA]))
|
|
2143
|
+
}))));
|
|
2144
|
+
|
|
2145
|
+
/** @internal */
|
|
2146
|
+
const retry = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => unwrap(Effect_dist_effectEffect.map(Schedule_dist_effectSchedule.driver(schedule), driver => {
|
|
2147
|
+
const loop = catchAll(self, error => unwrap(Effect_dist_effectEffect.matchEffect(driver.next(error), {
|
|
2148
|
+
onFailure: () => Effect_dist_effectEffect.fail(error),
|
|
2149
|
+
onSuccess: () => Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(loop, tap(() => driver.reset())))
|
|
2150
|
+
})));
|
|
2151
|
+
return loop;
|
|
2152
|
+
})));
|
|
2153
|
+
|
|
2154
|
+
/** @internal */
|
|
2155
|
+
const run = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(sink.toChannel(sink$1)), sink.runDrain));
|
|
2156
|
+
|
|
2157
|
+
/** @internal */
|
|
2158
|
+
const runCollect = self => Function_dist_effectFunction.pipe(self, run(sink.collectAll()));
|
|
2159
|
+
|
|
2160
|
+
/** @internal */
|
|
2161
|
+
const runCount = self => Function_dist_effectFunction.pipe(self, run(sink.count));
|
|
2162
|
+
|
|
2163
|
+
/** @internal */
|
|
2164
|
+
const runDrain = self => Function_dist_effectFunction.pipe(self, run(sink.drain$1));
|
|
2165
|
+
|
|
2166
|
+
/** @internal */
|
|
2167
|
+
const runFold = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScoped(s, Function_dist_effectFunction.constTrue, f), Effect_dist_effectEffect.scoped));
|
|
2168
|
+
|
|
2169
|
+
/** @internal */
|
|
2170
|
+
const runFoldEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScopedEffect(s, Function_dist_effectFunction.constTrue, f), Effect_dist_effectEffect.scoped));
|
|
2171
|
+
|
|
2172
|
+
/** @internal */
|
|
2173
|
+
const runFoldScoped = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScoped(s, Function_dist_effectFunction.constTrue, f)));
|
|
2174
|
+
|
|
2175
|
+
/** @internal */
|
|
2176
|
+
const runFoldScopedEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScopedEffect(s, Function_dist_effectFunction.constTrue, f)));
|
|
2177
|
+
|
|
2178
|
+
/** @internal */
|
|
2179
|
+
const runFoldWhile = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, s, cont, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScoped(s, cont, f), Effect_dist_effectEffect.scoped));
|
|
2180
|
+
|
|
2181
|
+
/** @internal */
|
|
2182
|
+
const runFoldWhileEffect = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, s, cont, f) => Function_dist_effectFunction.pipe(self, runFoldWhileScopedEffect(s, cont, f), Effect_dist_effectEffect.scoped));
|
|
2183
|
+
|
|
2184
|
+
/** @internal */
|
|
2185
|
+
const runFoldWhileScoped = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, s, cont, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.fold(s, cont, f))));
|
|
2186
|
+
|
|
2187
|
+
/** @internal */
|
|
2188
|
+
const runFoldWhileScopedEffect = /*#__PURE__*/Function_dist_effectFunction.dual(4, (self, s, cont, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.foldEffect(s, cont, f))));
|
|
2189
|
+
|
|
2190
|
+
/** @internal */
|
|
2191
|
+
const runForEach = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, run(sink.forEach(f))));
|
|
2192
|
+
|
|
2193
|
+
/** @internal */
|
|
2194
|
+
const runForEachChunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, run(sink.forEachChunk(f))));
|
|
2195
|
+
|
|
2196
|
+
/** @internal */
|
|
2197
|
+
const runForEachChunkScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.forEachChunk(f))));
|
|
2198
|
+
|
|
2199
|
+
/** @internal */
|
|
2200
|
+
const runForEachScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.forEach(f))));
|
|
2201
|
+
|
|
2202
|
+
/** @internal */
|
|
2203
|
+
const runForEachWhile = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, run(sink.forEachWhile(f))));
|
|
2204
|
+
|
|
2205
|
+
/** @internal */
|
|
2206
|
+
const runForEachWhileScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, runScoped(sink.forEachWhile(f))));
|
|
2207
|
+
|
|
2208
|
+
/** @internal */
|
|
2209
|
+
const runHead = self => Function_dist_effectFunction.pipe(self, run(sink.head()));
|
|
2210
|
+
|
|
2211
|
+
/** @internal */
|
|
2212
|
+
const runIntoPubSub = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pubsub) => Function_dist_effectFunction.pipe(self, runIntoQueue(pubsub)));
|
|
2213
|
+
|
|
2214
|
+
/** @internal */
|
|
2215
|
+
const runIntoPubSubScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pubsub) => Function_dist_effectFunction.pipe(self, runIntoQueueScoped(pubsub)));
|
|
2216
|
+
|
|
2217
|
+
/** @internal */
|
|
2218
|
+
const runIntoQueue = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, queue) => Function_dist_effectFunction.pipe(self, runIntoQueueScoped(queue), Effect_dist_effectEffect.scoped));
|
|
2219
|
+
|
|
2220
|
+
/** @internal */
|
|
2221
|
+
const runIntoQueueElementsScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, queue) => {
|
|
2222
|
+
const writer = sink.readWithCause({
|
|
2223
|
+
onInput: input => sink.flatMap(sink.fromEffect(Queue_dist_effectQueue.offerAll(queue, Chunk_dist_effectChunk.map(input, Exit_dist_effectExit.succeed))), () => writer),
|
|
2224
|
+
onFailure: cause => sink.fromEffect(Queue_dist_effectQueue.offer(queue, Exit_dist_effectExit.failCause(Cause_dist_effectCause.map(cause, Option_dist_effectOption.some)))),
|
|
2225
|
+
onDone: () => sink.fromEffect(Queue_dist_effectQueue.offer(queue, Exit_dist_effectExit.fail(Option_dist_effectOption.none())))
|
|
2226
|
+
});
|
|
2227
|
+
return Function_dist_effectFunction.pipe(sink.pipeTo(toChannel(self), writer), sink.drain, sink.runScoped, Effect_dist_effectEffect.asUnit);
|
|
2228
|
+
});
|
|
2229
|
+
|
|
2230
|
+
/** @internal */
|
|
2231
|
+
const runIntoQueueScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, queue) => {
|
|
2232
|
+
const writer = sink.readWithCause({
|
|
2233
|
+
onInput: input => sink.flatMap(sink.write(take$2.chunk(input)), () => writer),
|
|
2234
|
+
onFailure: cause => sink.write(take$2.failCause(cause)),
|
|
2235
|
+
onDone: () => sink.write(take$2.end)
|
|
2236
|
+
});
|
|
2237
|
+
return Function_dist_effectFunction.pipe(sink.pipeTo(toChannel(self), writer), sink.mapOutEffect(take => Queue_dist_effectQueue.offer(queue, take)), sink.drain, sink.runScoped, Effect_dist_effectEffect.asUnit);
|
|
2238
|
+
});
|
|
2239
|
+
|
|
2240
|
+
/** @internal */
|
|
2241
|
+
const runLast = self => Function_dist_effectFunction.pipe(self, run(sink.last()));
|
|
2242
|
+
|
|
2243
|
+
/** @internal */
|
|
2244
|
+
const runScoped = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(sink.toChannel(sink$1)), sink.drain, sink.runScoped));
|
|
2245
|
+
|
|
2246
|
+
/** @internal */
|
|
2247
|
+
const runSum = self => Function_dist_effectFunction.pipe(self, run(sink.sum));
|
|
2248
|
+
|
|
2249
|
+
/** @internal */
|
|
2250
|
+
const scan = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => Function_dist_effectFunction.pipe(self, scanEffect(s, (s, a) => Effect_dist_effectEffect.succeed(f(s, a)))));
|
|
2251
|
+
|
|
2252
|
+
/** @internal */
|
|
2253
|
+
const scanReduce = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, scanReduceEffect((a2, a) => Effect_dist_effectEffect.succeed(f(a2, a)))));
|
|
2254
|
+
|
|
2255
|
+
/** @internal */
|
|
2256
|
+
const scanReduceEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => Function_dist_effectFunction.pipe(self, mapAccumEffect(Option_dist_effectOption.none(), (option, a) => {
|
|
2257
|
+
switch (option._tag) {
|
|
2258
|
+
case "None":
|
|
2259
|
+
{
|
|
2260
|
+
return Effect_dist_effectEffect.succeed([Option_dist_effectOption.some(a), a]);
|
|
2261
|
+
}
|
|
2262
|
+
case "Some":
|
|
2263
|
+
{
|
|
2264
|
+
return Function_dist_effectFunction.pipe(f(option.value, a), Effect_dist_effectEffect.map(b => [Option_dist_effectOption.some(b), b]));
|
|
2265
|
+
}
|
|
2266
|
+
}
|
|
2267
|
+
})));
|
|
2268
|
+
|
|
2269
|
+
/** @internal */
|
|
2270
|
+
const schedule = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, schedule) => filterMap(scheduleWith(self, schedule, {
|
|
2271
|
+
onElement: Option_dist_effectOption.some,
|
|
2272
|
+
onSchedule: Option_dist_effectOption.none
|
|
2273
|
+
}), Function_dist_effectFunction.identity));
|
|
2274
|
+
|
|
2275
|
+
/** @internal */
|
|
2276
|
+
const scheduleWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, schedule, options) => {
|
|
2277
|
+
const loop = (driver, iterator) => {
|
|
2278
|
+
const next = iterator.next();
|
|
2279
|
+
if (next.done) {
|
|
2280
|
+
return sink.readWithCause({
|
|
2281
|
+
onInput: chunk => loop(driver, chunk[Symbol.iterator]()),
|
|
2282
|
+
onFailure: sink.failCause,
|
|
2283
|
+
onDone: sink.succeedNow
|
|
2284
|
+
});
|
|
2285
|
+
}
|
|
2286
|
+
return sink.unwrap(Effect_dist_effectEffect.matchEffect(driver.next(next.value), {
|
|
2287
|
+
onFailure: () => Function_dist_effectFunction.pipe(driver.last(), Effect_dist_effectEffect.orDie, Effect_dist_effectEffect.map(b => Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.make(options.onElement(next.value), options.onSchedule(b))), sink.flatMap(() => loop(driver, iterator)))), Effect_dist_effectEffect.zipLeft(driver.reset())),
|
|
2288
|
+
onSuccess: () => Effect_dist_effectEffect.succeed(Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(options.onElement(next.value))), sink.flatMap(() => loop(driver, iterator))))
|
|
2289
|
+
}));
|
|
2290
|
+
};
|
|
2291
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(sink.fromEffect(Schedule_dist_effectSchedule.driver(schedule)), sink.flatMap(driver => Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(driver, Chunk_dist_effectChunk.empty()[Symbol.iterator]()))))));
|
|
2292
|
+
});
|
|
2293
|
+
|
|
2294
|
+
/** @internal */
|
|
2295
|
+
const scanEffect = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, s, f) => new StreamImpl(Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(s)), sink.flatMap(() => toChannel(Function_dist_effectFunction.pipe(self, mapAccumEffect(s, (s, a) => Function_dist_effectFunction.pipe(f(s, a), Effect_dist_effectEffect.map(s => [s, s])))))))));
|
|
2296
|
+
|
|
2297
|
+
/** @internal */
|
|
2298
|
+
const scoped = effect => new StreamImpl(sink.ensuring(sink.scoped(Function_dist_effectFunction.pipe(effect, Effect_dist_effectEffect.map(Chunk_dist_effectChunk.of))), Effect_dist_effectEffect.unit));
|
|
2299
|
+
|
|
2300
|
+
/** @internal */
|
|
2301
|
+
const some = self => Function_dist_effectFunction.pipe(self, mapError(Option_dist_effectOption.some), someOrFail(() => Option_dist_effectOption.none()));
|
|
2302
|
+
|
|
2303
|
+
/** @internal */
|
|
2304
|
+
const someOrElse = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, fallback) => Function_dist_effectFunction.pipe(self, map(Option_dist_effectOption.getOrElse(fallback))));
|
|
2305
|
+
|
|
2306
|
+
/** @internal */
|
|
2307
|
+
const someOrFail = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, error) => mapEffectSequential(self, Option_dist_effectOption.match({
|
|
2308
|
+
onNone: () => Effect_dist_effectEffect.failSync(error),
|
|
2309
|
+
onSome: Effect_dist_effectEffect.succeed
|
|
2310
|
+
})));
|
|
2311
|
+
|
|
2312
|
+
/** @internal */
|
|
2313
|
+
const sliding = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, chunkSize) => slidingSize(self, chunkSize, 1));
|
|
2314
|
+
|
|
2315
|
+
/** @internal */
|
|
2316
|
+
const slidingSize = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, chunkSize, stepSize) => {
|
|
2317
|
+
if (chunkSize <= 0 || stepSize <= 0) {
|
|
2318
|
+
return die(Cause_dist_effectCause.IllegalArgumentException("Invalid bounds - `chunkSize` and `stepSize` must be greater than zero"));
|
|
2319
|
+
}
|
|
2320
|
+
return new StreamImpl(sink.suspend(() => {
|
|
2321
|
+
const queue = new RingBuffer(chunkSize);
|
|
2322
|
+
const emitOnStreamEnd = (queueSize, channelEnd) => {
|
|
2323
|
+
if (queueSize < chunkSize) {
|
|
2324
|
+
const items = queue.toChunk();
|
|
2325
|
+
const result = Chunk_dist_effectChunk.isEmpty(items) ? Chunk_dist_effectChunk.empty() : Chunk_dist_effectChunk.of(items);
|
|
2326
|
+
return Function_dist_effectFunction.pipe(sink.write(result), sink.flatMap(() => channelEnd));
|
|
2327
|
+
}
|
|
2328
|
+
const lastEmitIndex = queueSize - (queueSize - chunkSize) % stepSize;
|
|
2329
|
+
if (lastEmitIndex === queueSize) {
|
|
2330
|
+
return channelEnd;
|
|
2331
|
+
}
|
|
2332
|
+
const leftovers = queueSize - (lastEmitIndex - chunkSize + stepSize);
|
|
2333
|
+
const lastItems = Function_dist_effectFunction.pipe(queue.toChunk(), Chunk_dist_effectChunk.takeRight(leftovers));
|
|
2334
|
+
const result = Chunk_dist_effectChunk.isEmpty(lastItems) ? Chunk_dist_effectChunk.empty() : Chunk_dist_effectChunk.of(lastItems);
|
|
2335
|
+
return Function_dist_effectFunction.pipe(sink.write(result), sink.flatMap(() => channelEnd));
|
|
2336
|
+
};
|
|
2337
|
+
const reader = queueSize => sink.readWithCause({
|
|
2338
|
+
onInput: input => sink.flatMap(sink.write(Chunk_dist_effectChunk.filterMap(input, (element, index) => {
|
|
2339
|
+
queue.put(element);
|
|
2340
|
+
const currentIndex = queueSize + index + 1;
|
|
2341
|
+
if (currentIndex < chunkSize || (currentIndex - chunkSize) % stepSize > 0) {
|
|
2342
|
+
return Option_dist_effectOption.none();
|
|
2343
|
+
}
|
|
2344
|
+
return Option_dist_effectOption.some(queue.toChunk());
|
|
2345
|
+
})), () => reader(queueSize + input.length)),
|
|
2346
|
+
onFailure: cause => emitOnStreamEnd(queueSize, sink.failCause(cause)),
|
|
2347
|
+
onDone: () => emitOnStreamEnd(queueSize, sink.unit)
|
|
2348
|
+
});
|
|
2349
|
+
return Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(reader(0)));
|
|
2350
|
+
}));
|
|
2351
|
+
});
|
|
2352
|
+
|
|
2353
|
+
/** @internal */
|
|
2354
|
+
const split = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
2355
|
+
const split = (leftovers, input) => {
|
|
2356
|
+
const [chunk, remaining] = Function_dist_effectFunction.pipe(leftovers, Chunk_dist_effectChunk.appendAll(input), Chunk_dist_effectChunk.splitWhere(predicate));
|
|
2357
|
+
if (Chunk_dist_effectChunk.isEmpty(chunk) || Chunk_dist_effectChunk.isEmpty(remaining)) {
|
|
2358
|
+
return loop(Function_dist_effectFunction.pipe(chunk, Chunk_dist_effectChunk.appendAll(Function_dist_effectFunction.pipe(remaining, Chunk_dist_effectChunk.drop(1)))));
|
|
2359
|
+
}
|
|
2360
|
+
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(chunk)), sink.flatMap(() => split(Chunk_dist_effectChunk.empty(), Function_dist_effectFunction.pipe(remaining, Chunk_dist_effectChunk.drop(1)))));
|
|
2361
|
+
};
|
|
2362
|
+
const loop = leftovers => sink.readWith({
|
|
2363
|
+
onInput: input => split(leftovers, input),
|
|
2364
|
+
onFailure: sink.fail,
|
|
2365
|
+
onDone: () => {
|
|
2366
|
+
if (Chunk_dist_effectChunk.isEmpty(leftovers)) {
|
|
2367
|
+
return sink.unit;
|
|
2368
|
+
}
|
|
2369
|
+
if (Option_dist_effectOption.isNone(Function_dist_effectFunction.pipe(leftovers, Chunk_dist_effectChunk.findFirst(predicate)))) {
|
|
2370
|
+
return sink.zipRight(sink.write(Chunk_dist_effectChunk.of(leftovers)), sink.unit);
|
|
2371
|
+
}
|
|
2372
|
+
return sink.zipRight(split(Chunk_dist_effectChunk.empty(), leftovers), sink.unit);
|
|
2373
|
+
}
|
|
2374
|
+
});
|
|
2375
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(Chunk_dist_effectChunk.empty()))));
|
|
2376
|
+
});
|
|
2377
|
+
|
|
2378
|
+
/** @internal */
|
|
2379
|
+
const splitOnChunk = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, delimiter) => {
|
|
2380
|
+
const next = (leftover, delimiterIndex) => sink.readWithCause({
|
|
2381
|
+
onInput: inputChunk => {
|
|
2382
|
+
let buffer;
|
|
2383
|
+
const [carry, delimiterCursor] = Function_dist_effectFunction.pipe(inputChunk, Chunk_dist_effectChunk.reduce([Function_dist_effectFunction.pipe(leftover, Option_dist_effectOption.getOrElse(() => Chunk_dist_effectChunk.empty())), delimiterIndex], ([carry, delimiterCursor], a) => {
|
|
2384
|
+
const concatenated = Function_dist_effectFunction.pipe(carry, Chunk_dist_effectChunk.append(a));
|
|
2385
|
+
if (delimiterCursor < delimiter.length && Equal_dist_effectEqual.equals(a, Function_dist_effectFunction.pipe(delimiter, Chunk_dist_effectChunk.unsafeGet(delimiterCursor)))) {
|
|
2386
|
+
if (delimiterCursor + 1 === delimiter.length) {
|
|
2387
|
+
if (buffer === undefined) {
|
|
2388
|
+
buffer = [];
|
|
2389
|
+
}
|
|
2390
|
+
buffer.push(Function_dist_effectFunction.pipe(concatenated, Chunk_dist_effectChunk.take(concatenated.length - delimiter.length)));
|
|
2391
|
+
return [Chunk_dist_effectChunk.empty(), 0];
|
|
2392
|
+
}
|
|
2393
|
+
return [concatenated, delimiterCursor + 1];
|
|
2394
|
+
}
|
|
2395
|
+
return [concatenated, Equal_dist_effectEqual.equals(a, Function_dist_effectFunction.pipe(delimiter, Chunk_dist_effectChunk.unsafeGet(0))) ? 1 : 0];
|
|
2396
|
+
}));
|
|
2397
|
+
const output = buffer === undefined ? Chunk_dist_effectChunk.empty() : Chunk_dist_effectChunk.unsafeFromArray(buffer);
|
|
2398
|
+
return sink.flatMap(sink.write(output), () => next(Chunk_dist_effectChunk.isNonEmpty(carry) ? Option_dist_effectOption.some(carry) : Option_dist_effectOption.none(), delimiterCursor));
|
|
2399
|
+
},
|
|
2400
|
+
onFailure: cause => Option_dist_effectOption.match(leftover, {
|
|
2401
|
+
onNone: () => sink.failCause(cause),
|
|
2402
|
+
onSome: chunk => sink.zipRight(sink.write(Chunk_dist_effectChunk.of(chunk)), sink.failCause(cause))
|
|
2403
|
+
}),
|
|
2404
|
+
onDone: done => Option_dist_effectOption.match(leftover, {
|
|
2405
|
+
onNone: () => sink.succeed(done),
|
|
2406
|
+
onSome: chunk => sink.zipRight(sink.write(Chunk_dist_effectChunk.of(chunk)), sink.succeed(done))
|
|
2407
|
+
})
|
|
2408
|
+
});
|
|
2409
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(next(Option_dist_effectOption.none(), 0))));
|
|
2410
|
+
});
|
|
2411
|
+
|
|
2412
|
+
/** @internal */
|
|
2413
|
+
const splitLines = self => suspend(() => {
|
|
2414
|
+
let stringBuilder = "";
|
|
2415
|
+
let midCRLF = false;
|
|
2416
|
+
const splitLinesChunk = chunk => {
|
|
2417
|
+
const chunkBuilder = [];
|
|
2418
|
+
Chunk_dist_effectChunk.map(chunk, str => {
|
|
2419
|
+
if (str.length !== 0) {
|
|
2420
|
+
let from = 0;
|
|
2421
|
+
let indexOfCR = str.indexOf("\r");
|
|
2422
|
+
let indexOfLF = str.indexOf("\n");
|
|
2423
|
+
if (midCRLF) {
|
|
2424
|
+
if (indexOfLF === 0) {
|
|
2425
|
+
chunkBuilder.push(stringBuilder);
|
|
2426
|
+
stringBuilder = "";
|
|
2427
|
+
from = 1;
|
|
2428
|
+
indexOfLF = str.indexOf("\n", from);
|
|
2429
|
+
} else {
|
|
2430
|
+
stringBuilder = stringBuilder + "\r";
|
|
2431
|
+
}
|
|
2432
|
+
midCRLF = false;
|
|
2433
|
+
}
|
|
2434
|
+
while (indexOfCR !== -1 || indexOfLF !== -1) {
|
|
2435
|
+
if (indexOfCR === -1 || indexOfLF !== -1 && indexOfLF < indexOfCR) {
|
|
2436
|
+
if (stringBuilder.length === 0) {
|
|
2437
|
+
chunkBuilder.push(str.substring(from, indexOfLF));
|
|
2438
|
+
} else {
|
|
2439
|
+
chunkBuilder.push(stringBuilder + str.substring(from, indexOfLF));
|
|
2440
|
+
stringBuilder = "";
|
|
2441
|
+
}
|
|
2442
|
+
from = indexOfLF + 1;
|
|
2443
|
+
indexOfLF = str.indexOf("\n", from);
|
|
2444
|
+
} else {
|
|
2445
|
+
if (str.length === indexOfCR + 1) {
|
|
2446
|
+
midCRLF = true;
|
|
2447
|
+
indexOfCR = -1;
|
|
2448
|
+
} else {
|
|
2449
|
+
if (indexOfLF === indexOfCR + 1) {
|
|
2450
|
+
if (stringBuilder.length === 0) {
|
|
2451
|
+
chunkBuilder.push(str.substring(from, indexOfCR));
|
|
2452
|
+
} else {
|
|
2453
|
+
stringBuilder = stringBuilder + str.substring(from, indexOfCR);
|
|
2454
|
+
chunkBuilder.push(stringBuilder);
|
|
2455
|
+
stringBuilder = "";
|
|
2456
|
+
}
|
|
2457
|
+
from = indexOfCR + 2;
|
|
2458
|
+
indexOfCR = str.indexOf("\r", from);
|
|
2459
|
+
indexOfLF = str.indexOf("\n", from);
|
|
2460
|
+
} else {
|
|
2461
|
+
indexOfCR = str.indexOf("\r", indexOfCR + 1);
|
|
2462
|
+
}
|
|
2463
|
+
}
|
|
2464
|
+
}
|
|
2465
|
+
}
|
|
2466
|
+
if (midCRLF) {
|
|
2467
|
+
stringBuilder = stringBuilder + str.substring(from, str.length - 1);
|
|
2468
|
+
} else {
|
|
2469
|
+
stringBuilder = stringBuilder + str.substring(from, str.length);
|
|
2470
|
+
}
|
|
2471
|
+
}
|
|
2472
|
+
});
|
|
2473
|
+
return Chunk_dist_effectChunk.unsafeFromArray(chunkBuilder);
|
|
2474
|
+
};
|
|
2475
|
+
const loop = sink.readWithCause({
|
|
2476
|
+
onInput: input => {
|
|
2477
|
+
const out = splitLinesChunk(input);
|
|
2478
|
+
return Chunk_dist_effectChunk.isEmpty(out) ? loop : sink.flatMap(sink.write(out), () => loop);
|
|
2479
|
+
},
|
|
2480
|
+
onFailure: cause => stringBuilder.length === 0 ? sink.failCause(cause) : sink.flatMap(sink.write(Chunk_dist_effectChunk.of(stringBuilder)), () => sink.failCause(cause)),
|
|
2481
|
+
onDone: done => stringBuilder.length === 0 ? sink.succeed(done) : sink.flatMap(sink.write(Chunk_dist_effectChunk.of(stringBuilder)), () => sink.succeed(done))
|
|
2482
|
+
});
|
|
2483
|
+
return new StreamImpl(sink.pipeTo(toChannel(self), loop));
|
|
2484
|
+
});
|
|
2485
|
+
|
|
2486
|
+
/** @internal */
|
|
2487
|
+
const succeed = value => fromChunk(Chunk_dist_effectChunk.of(value));
|
|
2488
|
+
|
|
2489
|
+
/** @internal */
|
|
2490
|
+
const sync = evaluate => suspend(() => fromChunk(Chunk_dist_effectChunk.of(evaluate())));
|
|
2491
|
+
|
|
2492
|
+
/** @internal */
|
|
2493
|
+
const suspend = stream => new StreamImpl(sink.suspend(() => toChannel(stream())));
|
|
2494
|
+
|
|
2495
|
+
/** @internal */
|
|
2496
|
+
const take = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => {
|
|
2497
|
+
if (!Number.isInteger(n)) {
|
|
2498
|
+
return die(Cause_dist_effectCause.IllegalArgumentException(`${n} must be an integer`));
|
|
2499
|
+
}
|
|
2500
|
+
const loop = n => sink.readWith({
|
|
2501
|
+
onInput: input => {
|
|
2502
|
+
const taken = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.take(Math.min(n, Number.POSITIVE_INFINITY)));
|
|
2503
|
+
const leftover = Math.max(0, n - taken.length);
|
|
2504
|
+
const more = leftover > 0;
|
|
2505
|
+
if (more) {
|
|
2506
|
+
return Function_dist_effectFunction.pipe(sink.write(taken), sink.flatMap(() => loop(leftover)));
|
|
2507
|
+
}
|
|
2508
|
+
return sink.write(taken);
|
|
2509
|
+
},
|
|
2510
|
+
onFailure: sink.fail,
|
|
2511
|
+
onDone: sink.succeed
|
|
2512
|
+
});
|
|
2513
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(0 < n ? loop(n) : sink.unit)));
|
|
2514
|
+
});
|
|
2515
|
+
|
|
2516
|
+
/** @internal */
|
|
2517
|
+
const takeRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, n) => {
|
|
2518
|
+
if (n <= 0) {
|
|
2519
|
+
return empty;
|
|
2520
|
+
}
|
|
2521
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(Effect_dist_effectEffect.succeed(new RingBuffer(n)), Effect_dist_effectEffect.map(queue => {
|
|
2522
|
+
const reader = sink.readWith({
|
|
2523
|
+
onInput: input => {
|
|
2524
|
+
for (const element of input) {
|
|
2525
|
+
queue.put(element);
|
|
2526
|
+
}
|
|
2527
|
+
return reader;
|
|
2528
|
+
},
|
|
2529
|
+
onFailure: sink.fail,
|
|
2530
|
+
onDone: () => Function_dist_effectFunction.pipe(sink.write(queue.toChunk()), sink.zipRight(sink.unit))
|
|
2531
|
+
});
|
|
2532
|
+
return Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(reader));
|
|
2533
|
+
}), sink.unwrap));
|
|
2534
|
+
});
|
|
2535
|
+
|
|
2536
|
+
/** @internal */
|
|
2537
|
+
const takeUntil = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
2538
|
+
const loop = sink.readWith({
|
|
2539
|
+
onInput: input => {
|
|
2540
|
+
const taken = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.takeWhile(a => !predicate(a)));
|
|
2541
|
+
const last = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.drop(taken.length), Chunk_dist_effectChunk.take(1));
|
|
2542
|
+
if (Chunk_dist_effectChunk.isEmpty(last)) {
|
|
2543
|
+
return Function_dist_effectFunction.pipe(sink.write(taken), sink.flatMap(() => loop));
|
|
2544
|
+
}
|
|
2545
|
+
return sink.write(Function_dist_effectFunction.pipe(taken, Chunk_dist_effectChunk.appendAll(last)));
|
|
2546
|
+
},
|
|
2547
|
+
onFailure: sink.fail,
|
|
2548
|
+
onDone: sink.succeed
|
|
2549
|
+
});
|
|
2550
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop)));
|
|
2551
|
+
});
|
|
2552
|
+
|
|
2553
|
+
/** @internal */
|
|
2554
|
+
const takeUntilEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
2555
|
+
const loop = iterator => {
|
|
2556
|
+
const next = iterator.next();
|
|
2557
|
+
if (next.done) {
|
|
2558
|
+
return sink.readWithCause({
|
|
2559
|
+
onInput: elem => loop(elem[Symbol.iterator]()),
|
|
2560
|
+
onFailure: sink.failCause,
|
|
2561
|
+
onDone: sink.succeed
|
|
2562
|
+
});
|
|
2563
|
+
}
|
|
2564
|
+
return Function_dist_effectFunction.pipe(predicate(next.value), Effect_dist_effectEffect.map(bool => bool ? sink.write(Chunk_dist_effectChunk.of(next.value)) : Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(next.value)), sink.flatMap(() => loop(iterator)))), sink.unwrap);
|
|
2565
|
+
};
|
|
2566
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop(Chunk_dist_effectChunk.empty()[Symbol.iterator]()))));
|
|
2567
|
+
});
|
|
2568
|
+
|
|
2569
|
+
/** @internal */
|
|
2570
|
+
const takeWhile = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => {
|
|
2571
|
+
const loop = sink.readWith({
|
|
2572
|
+
onInput: input => {
|
|
2573
|
+
const taken = Function_dist_effectFunction.pipe(input, Chunk_dist_effectChunk.takeWhile(predicate));
|
|
2574
|
+
const more = taken.length === input.length;
|
|
2575
|
+
if (more) {
|
|
2576
|
+
return Function_dist_effectFunction.pipe(sink.write(taken), sink.flatMap(() => loop));
|
|
2577
|
+
}
|
|
2578
|
+
return sink.write(taken);
|
|
2579
|
+
},
|
|
2580
|
+
onFailure: sink.fail,
|
|
2581
|
+
onDone: sink.succeed
|
|
2582
|
+
});
|
|
2583
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(loop)));
|
|
2584
|
+
});
|
|
2585
|
+
|
|
2586
|
+
/** @internal */
|
|
2587
|
+
const tap = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => mapEffectSequential(self, a => Effect_dist_effectEffect.as(f(a), a)));
|
|
2588
|
+
|
|
2589
|
+
/** @internal */
|
|
2590
|
+
const tapBoth = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, {
|
|
2591
|
+
onFailure,
|
|
2592
|
+
onSuccess
|
|
2593
|
+
}) => Function_dist_effectFunction.pipe(self, tapError(onFailure), tap(onSuccess)));
|
|
2594
|
+
|
|
2595
|
+
/** @internal */
|
|
2596
|
+
const tapError = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => catchAll(self, error => fromEffect(Effect_dist_effectEffect.zipRight(f(error), Effect_dist_effectEffect.fail(error)))));
|
|
2597
|
+
|
|
2598
|
+
/** @internal */
|
|
2599
|
+
const tapErrorCause = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, f) => {
|
|
2600
|
+
const loop = sink.readWithCause({
|
|
2601
|
+
onInput: chunk => sink.flatMap(sink.write(chunk), () => loop),
|
|
2602
|
+
onFailure: cause => sink.fromEffect(Effect_dist_effectEffect.zipRight(f(cause), Effect_dist_effectEffect.failCause(cause))),
|
|
2603
|
+
onDone: sink.succeedNow
|
|
2604
|
+
});
|
|
2605
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(loop)));
|
|
2606
|
+
});
|
|
2607
|
+
|
|
2608
|
+
/** @internal */
|
|
2609
|
+
const tapSink = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => Function_dist_effectFunction.pipe(fromEffect(Effect_dist_effectEffect.all([Queue_dist_effectQueue.bounded(1), Deferred_dist_effectDeferred.make()])), flatMap(([queue, deferred]) => {
|
|
2610
|
+
const right = flattenTake(fromQueue(queue, {
|
|
2611
|
+
maxChunkSize: 1
|
|
2612
|
+
}));
|
|
2613
|
+
const loop = sink.readWithCause({
|
|
2614
|
+
onInput: chunk => Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.offer(queue, take$2.chunk(chunk))), sink.foldCauseChannel({
|
|
2615
|
+
onFailure: () => sink.flatMap(sink.write(chunk), () => sink.identityChannel()),
|
|
2616
|
+
onSuccess: () => sink.flatMap(sink.write(chunk), () => loop)
|
|
2617
|
+
})),
|
|
2618
|
+
onFailure: cause => Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.offer(queue, take$2.failCause(cause))), sink.foldCauseChannel({
|
|
2619
|
+
onFailure: () => sink.failCause(cause),
|
|
2620
|
+
onSuccess: () => sink.failCause(cause)
|
|
2621
|
+
})),
|
|
2622
|
+
onDone: () => Function_dist_effectFunction.pipe(sink.fromEffect(Queue_dist_effectQueue.offer(queue, take$2.end)), sink.foldCauseChannel({
|
|
2623
|
+
onFailure: () => sink.unit,
|
|
2624
|
+
onSuccess: () => sink.unit
|
|
2625
|
+
}))
|
|
2626
|
+
});
|
|
2627
|
+
return Function_dist_effectFunction.pipe(new StreamImpl(Function_dist_effectFunction.pipe(sink.pipeTo(toChannel(self), loop), sink.ensuring(Effect_dist_effectEffect.zipRight(Effect_dist_effectEffect.forkDaemon(Queue_dist_effectQueue.offer(queue, take$2.end)), Deferred_dist_effectDeferred["await"](deferred))))), merge(execute(Function_dist_effectFunction.pipe(run(right, sink$1), Effect_dist_effectEffect.ensuring(Effect_dist_effectEffect.zipRight(Queue_dist_effectQueue.shutdown(queue), Deferred_dist_effectDeferred.succeed(deferred, void 0)))))));
|
|
2628
|
+
})));
|
|
2629
|
+
|
|
2630
|
+
/** @internal */
|
|
2631
|
+
const throttle = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => throttleEffect(self, {
|
|
2632
|
+
...options,
|
|
2633
|
+
cost: chunk => Effect_dist_effectEffect.succeed(options.cost(chunk))
|
|
2634
|
+
}));
|
|
2635
|
+
|
|
2636
|
+
/** @internal */
|
|
2637
|
+
const throttleEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
2638
|
+
if (options.strategy === "enforce") {
|
|
2639
|
+
return throttleEnforceEffect(self, options.cost, options.units, options.duration, options.burst ?? 0);
|
|
2640
|
+
}
|
|
2641
|
+
return throttleShapeEffect(self, options.cost, options.units, options.duration, options.burst ?? 0);
|
|
2642
|
+
});
|
|
2643
|
+
const throttleEnforceEffect = (self, cost, units, duration, burst) => {
|
|
2644
|
+
const loop = (tokens, timestampMillis) => sink.readWithCause({
|
|
2645
|
+
onInput: input => Function_dist_effectFunction.pipe(cost(input), Effect_dist_effectEffect.zip(Clock_dist_effectClock.currentTimeMillis), Effect_dist_effectEffect.map(([weight, currentTimeMillis]) => {
|
|
2646
|
+
const elapsed = currentTimeMillis - timestampMillis;
|
|
2647
|
+
const cycles = elapsed / Duration_dist_effectDuration.toMillis(duration);
|
|
2648
|
+
const sum = tokens + cycles * units;
|
|
2649
|
+
const max = units + burst < 0 ? Number.POSITIVE_INFINITY : units + burst;
|
|
2650
|
+
const available = sum < 0 ? max : Math.min(sum, max);
|
|
2651
|
+
if (weight <= available) {
|
|
2652
|
+
return Function_dist_effectFunction.pipe(sink.write(input), sink.flatMap(() => loop(available - weight, currentTimeMillis)));
|
|
2653
|
+
}
|
|
2654
|
+
return loop(tokens, timestampMillis);
|
|
2655
|
+
}), sink.unwrap),
|
|
2656
|
+
onFailure: sink.failCause,
|
|
2657
|
+
onDone: () => sink.unit
|
|
2658
|
+
});
|
|
2659
|
+
const throttled = Function_dist_effectFunction.pipe(Clock_dist_effectClock.currentTimeMillis, Effect_dist_effectEffect.map(currentTimeMillis => loop(units, currentTimeMillis)), sink.unwrap);
|
|
2660
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(throttled)));
|
|
2661
|
+
};
|
|
2662
|
+
const throttleShapeEffect = (self, costFn, units, duration, burst) => {
|
|
2663
|
+
const loop = (tokens, timestampMillis) => sink.readWithCause({
|
|
2664
|
+
onInput: input => Function_dist_effectFunction.pipe(costFn(input), Effect_dist_effectEffect.zip(Clock_dist_effectClock.currentTimeMillis), Effect_dist_effectEffect.map(([weight, currentTimeMillis]) => {
|
|
2665
|
+
const elapsed = currentTimeMillis - timestampMillis;
|
|
2666
|
+
const cycles = elapsed / Duration_dist_effectDuration.toMillis(duration);
|
|
2667
|
+
const sum = tokens + cycles * units;
|
|
2668
|
+
const max = units + burst < 0 ? Number.POSITIVE_INFINITY : units + burst;
|
|
2669
|
+
const available = sum < 0 ? max : Math.min(sum, max);
|
|
2670
|
+
const remaining = available - weight;
|
|
2671
|
+
const waitCycles = remaining >= 0 ? 0 : -remaining / units;
|
|
2672
|
+
const delay = Duration_dist_effectDuration.millis(Math.max(0, waitCycles * Duration_dist_effectDuration.toMillis(duration)));
|
|
2673
|
+
if (Duration_dist_effectDuration.greaterThan(delay, Duration_dist_effectDuration.zero)) {
|
|
2674
|
+
return Function_dist_effectFunction.pipe(sink.fromEffect(Clock_dist_effectClock.sleep(delay)), sink.zipRight(sink.write(input)), sink.flatMap(() => loop(remaining, currentTimeMillis)));
|
|
2675
|
+
}
|
|
2676
|
+
return sink.flatMap(sink.write(input), () => loop(remaining, currentTimeMillis));
|
|
2677
|
+
}), sink.unwrap),
|
|
2678
|
+
onFailure: sink.failCause,
|
|
2679
|
+
onDone: () => sink.unit
|
|
2680
|
+
});
|
|
2681
|
+
const throttled = Function_dist_effectFunction.pipe(Clock_dist_effectClock.currentTimeMillis, Effect_dist_effectEffect.map(currentTimeMillis => loop(units, currentTimeMillis)), sink.unwrap);
|
|
2682
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(throttled)));
|
|
2683
|
+
};
|
|
2684
|
+
|
|
2685
|
+
/** @internal */
|
|
2686
|
+
const tick = interval => repeatWithSchedule(void 0, Schedule_dist_effectSchedule.spaced(interval));
|
|
2687
|
+
|
|
2688
|
+
/** @internal */
|
|
2689
|
+
const timeout = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, duration) => Function_dist_effectFunction.pipe(toPull(self), Effect_dist_effectEffect.map(Effect_dist_effectEffect.timeoutFail({
|
|
2690
|
+
onTimeout: () => Option_dist_effectOption.none(),
|
|
2691
|
+
duration
|
|
2692
|
+
})), fromPull));
|
|
2693
|
+
|
|
2694
|
+
/** @internal */
|
|
2695
|
+
const timeoutFail = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, error, duration) => Function_dist_effectFunction.pipe(self, timeoutTo(duration, failSync(error))));
|
|
2696
|
+
|
|
2697
|
+
/** @internal */
|
|
2698
|
+
const timeoutFailCause = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, cause, duration) => Function_dist_effectFunction.pipe(toPull(self), Effect_dist_effectEffect.map(Effect_dist_effectEffect.timeoutFailCause({
|
|
2699
|
+
onTimeout: () => Cause_dist_effectCause.map(cause(), Option_dist_effectOption.some),
|
|
2700
|
+
duration
|
|
2701
|
+
})), fromPull));
|
|
2702
|
+
|
|
2703
|
+
/** @internal */
|
|
2704
|
+
const timeoutTo = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, duration, that) => {
|
|
2705
|
+
const StreamTimeout = Cause_dist_effectCause.RuntimeException("Stream Timeout");
|
|
2706
|
+
return Function_dist_effectFunction.pipe(self, timeoutFailCause(() => Cause_dist_effectCause.die(StreamTimeout), duration), catchSomeCause(cause => Cause_dist_effectCause.isDieType(cause) && Cause_dist_effectCause.isRuntimeException(cause.defect) && cause.defect.message !== undefined && cause.defect.message === "Stream Timeout" ? Option_dist_effectOption.some(that) : Option_dist_effectOption.none()));
|
|
2707
|
+
});
|
|
2708
|
+
|
|
2709
|
+
/** @internal */
|
|
2710
|
+
const toPubSub = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, capacity) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.acquireRelease(PubSub_dist_effectPubSub.bounded(capacity), pubsub => PubSub_dist_effectPubSub.shutdown(pubsub)), Effect_dist_effectEffect.tap(pubsub => Function_dist_effectFunction.pipe(self, runIntoPubSubScoped(pubsub), Effect_dist_effectEffect.forkScoped))));
|
|
2711
|
+
|
|
2712
|
+
/** @internal */
|
|
2713
|
+
const toPull = self => Effect_dist_effectEffect.map(sink.toPull(toChannel(self)), pull => Function_dist_effectFunction.pipe(pull, Effect_dist_effectEffect.mapError(Option_dist_effectOption.some), Effect_dist_effectEffect.flatMap(Either_dist_effectEither.match({
|
|
2714
|
+
onLeft: () => Effect_dist_effectEffect.fail(Option_dist_effectOption.none()),
|
|
2715
|
+
onRight: Effect_dist_effectEffect.succeed
|
|
2716
|
+
}))));
|
|
2717
|
+
|
|
2718
|
+
/** @internal */
|
|
2719
|
+
const toQueue = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, options) => Effect_dist_effectEffect.tap(Effect_dist_effectEffect.acquireRelease(options?.strategy === "unbounded" ? Queue_dist_effectQueue.unbounded() : options?.strategy === "dropping" ? Queue_dist_effectQueue.dropping(options.capacity ?? 2) : options?.strategy === "sliding" ? Queue_dist_effectQueue.sliding(options.capacity ?? 2) : Queue_dist_effectQueue.bounded(options?.capacity ?? 2), queue => Queue_dist_effectQueue.shutdown(queue)), queue => Effect_dist_effectEffect.forkScoped(runIntoQueueScoped(self, queue))));
|
|
2720
|
+
|
|
2721
|
+
/** @internal */
|
|
2722
|
+
const toQueueOfElements = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, options) => Effect_dist_effectEffect.tap(Effect_dist_effectEffect.acquireRelease(Queue_dist_effectQueue.bounded(options?.capacity ?? 2), queue => Queue_dist_effectQueue.shutdown(queue)), queue => Effect_dist_effectEffect.forkScoped(runIntoQueueElementsScoped(self, queue))));
|
|
2723
|
+
|
|
2724
|
+
/** @internal */
|
|
2725
|
+
const toReadableStream = source => {
|
|
2726
|
+
let pull;
|
|
2727
|
+
let scope;
|
|
2728
|
+
return new ReadableStream({
|
|
2729
|
+
start(controller) {
|
|
2730
|
+
scope = Effect_dist_effectEffect.runSync(Scope_dist_effectScope.make());
|
|
2731
|
+
pull = Function_dist_effectFunction.pipe(toPull(source), Scope_dist_effectScope.use(scope), Effect_dist_effectEffect.runSync, Effect_dist_effectEffect.tap(chunk => Effect_dist_effectEffect.sync(() => {
|
|
2732
|
+
Chunk_dist_effectChunk.map(chunk, a => {
|
|
2733
|
+
controller.enqueue(a);
|
|
2734
|
+
});
|
|
2735
|
+
})), Effect_dist_effectEffect.tapErrorCause(() => Scope_dist_effectScope.close(scope, Exit_dist_effectExit.unit)), Effect_dist_effectEffect.catchTags({
|
|
2736
|
+
"None": () => Effect_dist_effectEffect.sync(() => {
|
|
2737
|
+
controller.close();
|
|
2738
|
+
}),
|
|
2739
|
+
"Some": error => Effect_dist_effectEffect.sync(() => {
|
|
2740
|
+
controller.error(error.value);
|
|
2741
|
+
})
|
|
2742
|
+
}), Effect_dist_effectEffect.asUnit);
|
|
2743
|
+
},
|
|
2744
|
+
pull() {
|
|
2745
|
+
return Effect_dist_effectEffect.runPromise(pull);
|
|
2746
|
+
},
|
|
2747
|
+
cancel() {
|
|
2748
|
+
return Effect_dist_effectEffect.runPromise(Scope_dist_effectScope.close(scope, Exit_dist_effectExit.unit));
|
|
2749
|
+
}
|
|
2750
|
+
});
|
|
2751
|
+
};
|
|
2752
|
+
|
|
2753
|
+
/** @internal */
|
|
2754
|
+
const transduce = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, sink$1) => {
|
|
2755
|
+
const newChannel = sink.suspend(() => {
|
|
2756
|
+
const leftovers = {
|
|
2757
|
+
ref: Chunk_dist_effectChunk.empty()
|
|
2758
|
+
};
|
|
2759
|
+
const upstreamDone = {
|
|
2760
|
+
ref: false
|
|
2761
|
+
};
|
|
2762
|
+
const buffer = sink.suspend(() => {
|
|
2763
|
+
const leftover = leftovers.ref;
|
|
2764
|
+
if (Chunk_dist_effectChunk.isEmpty(leftover)) {
|
|
2765
|
+
return sink.readWith({
|
|
2766
|
+
onInput: input => Function_dist_effectFunction.pipe(sink.write(input), sink.flatMap(() => buffer)),
|
|
2767
|
+
onFailure: sink.fail,
|
|
2768
|
+
onDone: sink.succeedNow
|
|
2769
|
+
});
|
|
2770
|
+
}
|
|
2771
|
+
leftovers.ref = Chunk_dist_effectChunk.empty();
|
|
2772
|
+
return Function_dist_effectFunction.pipe(sink.writeChunk(leftover), sink.flatMap(() => buffer));
|
|
2773
|
+
});
|
|
2774
|
+
const concatAndGet = chunk => {
|
|
2775
|
+
const leftover = leftovers.ref;
|
|
2776
|
+
const concatenated = Chunk_dist_effectChunk.appendAll(leftover, Chunk_dist_effectChunk.filter(chunk, chunk => chunk.length !== 0));
|
|
2777
|
+
leftovers.ref = concatenated;
|
|
2778
|
+
return concatenated;
|
|
2779
|
+
};
|
|
2780
|
+
const upstreamMarker = sink.readWith({
|
|
2781
|
+
onInput: input => sink.flatMap(sink.write(input), () => upstreamMarker),
|
|
2782
|
+
onFailure: sink.fail,
|
|
2783
|
+
onDone: done => sink.zipRight(sink.sync(() => {
|
|
2784
|
+
upstreamDone.ref = true;
|
|
2785
|
+
}), sink.succeedNow(done))
|
|
2786
|
+
});
|
|
2787
|
+
const transducer = Function_dist_effectFunction.pipe(sink$1, sink.toChannel, sink.collectElements, sink.flatMap(([leftover, z]) => Function_dist_effectFunction.pipe(sink.succeed([upstreamDone.ref, concatAndGet(leftover)]), sink.flatMap(([done, newLeftovers]) => {
|
|
2788
|
+
const nextChannel = done && Chunk_dist_effectChunk.isEmpty(newLeftovers) ? sink.unit : transducer;
|
|
2789
|
+
return Function_dist_effectFunction.pipe(sink.write(Chunk_dist_effectChunk.of(z)), sink.flatMap(() => nextChannel));
|
|
2790
|
+
}))));
|
|
2791
|
+
return Function_dist_effectFunction.pipe(toChannel(self), sink.pipeTo(upstreamMarker), sink.pipeTo(buffer), sink.pipeToOrFail(transducer));
|
|
2792
|
+
});
|
|
2793
|
+
return new StreamImpl(newChannel);
|
|
2794
|
+
});
|
|
2795
|
+
|
|
2796
|
+
/** @internal */
|
|
2797
|
+
const unfold = (s, f) => unfoldChunk(s, s => Function_dist_effectFunction.pipe(f(s), Option_dist_effectOption.map(([a, s]) => [Chunk_dist_effectChunk.of(a), s])));
|
|
2798
|
+
|
|
2799
|
+
/** @internal */
|
|
2800
|
+
const unfoldChunk = (s, f) => {
|
|
2801
|
+
const loop = s => Option_dist_effectOption.match(f(s), {
|
|
2802
|
+
onNone: () => sink.unit,
|
|
2803
|
+
onSome: ([chunk, s]) => sink.flatMap(sink.write(chunk), () => loop(s))
|
|
2804
|
+
});
|
|
2805
|
+
return new StreamImpl(sink.suspend(() => loop(s)));
|
|
2806
|
+
};
|
|
2807
|
+
|
|
2808
|
+
/** @internal */
|
|
2809
|
+
const unfoldChunkEffect = (s, f) => suspend(() => {
|
|
2810
|
+
const loop = s => sink.unwrap(Effect_dist_effectEffect.map(f(s), Option_dist_effectOption.match({
|
|
2811
|
+
onNone: () => sink.unit,
|
|
2812
|
+
onSome: ([chunk, s]) => sink.flatMap(sink.write(chunk), () => loop(s))
|
|
2813
|
+
})));
|
|
2814
|
+
return new StreamImpl(loop(s));
|
|
2815
|
+
});
|
|
2816
|
+
|
|
2817
|
+
/** @internal */
|
|
2818
|
+
const unfoldEffect = (s, f) => unfoldChunkEffect(s, s => Function_dist_effectFunction.pipe(f(s), Effect_dist_effectEffect.map(Option_dist_effectOption.map(([a, s]) => [Chunk_dist_effectChunk.of(a), s]))));
|
|
2819
|
+
|
|
2820
|
+
/** @internal */
|
|
2821
|
+
const unit = /*#__PURE__*/succeed(void 0);
|
|
2822
|
+
|
|
2823
|
+
/** @internal */
|
|
2824
|
+
const unwrap = effect => flatten(fromEffect(effect));
|
|
2825
|
+
|
|
2826
|
+
/** @internal */
|
|
2827
|
+
const unwrapScoped = effect => flatten(scoped(effect));
|
|
2828
|
+
|
|
2829
|
+
/** @internal */
|
|
2830
|
+
const updateService = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, f) => Function_dist_effectFunction.pipe(self, mapInputContext(context => Function_dist_effectFunction.pipe(context, Context_dist_effectContext.add(tag, f(Function_dist_effectFunction.pipe(context, Context_dist_effectContext.unsafeGet(tag))))))));
|
|
2831
|
+
|
|
2832
|
+
/** @internal */
|
|
2833
|
+
const when = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, predicate) => Function_dist_effectFunction.pipe(self, whenEffect(Effect_dist_effectEffect.sync(predicate))));
|
|
2834
|
+
|
|
2835
|
+
/** @internal */
|
|
2836
|
+
const whenCase = (evaluate, pf) => whenCaseEffect(pf)(Effect_dist_effectEffect.sync(evaluate));
|
|
2837
|
+
|
|
2838
|
+
/** @internal */
|
|
2839
|
+
const whenCaseEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, pf) => Function_dist_effectFunction.pipe(fromEffect(self), flatMap(a => Function_dist_effectFunction.pipe(pf(a), Option_dist_effectOption.getOrElse(() => empty)))));
|
|
2840
|
+
|
|
2841
|
+
/** @internal */
|
|
2842
|
+
const whenEffect = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, effect) => Function_dist_effectFunction.pipe(fromEffect(effect), flatMap(bool => bool ? self : empty)));
|
|
2843
|
+
|
|
2844
|
+
/** @internal */
|
|
2845
|
+
const withSpan = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, name, options) => new StreamImpl(sink.withSpan(toChannel(self), name, options)));
|
|
2846
|
+
|
|
2847
|
+
/** @internal */
|
|
2848
|
+
const zip = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipWith(that, (a, a2) => [a, a2])));
|
|
2849
|
+
|
|
2850
|
+
/** @internal */
|
|
2851
|
+
const zipFlatten = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipWith(that, (a, a2) => [...a, a2])));
|
|
2852
|
+
|
|
2853
|
+
/** @internal */
|
|
2854
|
+
const zipAll = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => zipAllWith(self, {
|
|
2855
|
+
other: options.other,
|
|
2856
|
+
onSelf: a => [a, options.defaultOther],
|
|
2857
|
+
onOther: a2 => [options.defaultSelf, a2],
|
|
2858
|
+
onBoth: (a, a2) => [a, a2]
|
|
2859
|
+
}));
|
|
2860
|
+
|
|
2861
|
+
/** @internal */
|
|
2862
|
+
const zipAllLeft = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, other, defaultSelf) => zipAllWith(self, {
|
|
2863
|
+
other,
|
|
2864
|
+
onSelf: Function_dist_effectFunction.identity,
|
|
2865
|
+
onOther: () => defaultSelf,
|
|
2866
|
+
onBoth: a => a
|
|
2867
|
+
}));
|
|
2868
|
+
|
|
2869
|
+
/** @internal */
|
|
2870
|
+
const zipAllRight = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, other, defaultRight) => zipAllWith(self, {
|
|
2871
|
+
other,
|
|
2872
|
+
onSelf: () => defaultRight,
|
|
2873
|
+
onOther: Function_dist_effectFunction.identity,
|
|
2874
|
+
onBoth: (_, a2) => a2
|
|
2875
|
+
}));
|
|
2876
|
+
|
|
2877
|
+
/** @internal */
|
|
2878
|
+
const zipAllSortedByKey = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => zipAllSortedByKeyWith(self, {
|
|
2879
|
+
other: options.other,
|
|
2880
|
+
onSelf: a => [a, options.defaultOther],
|
|
2881
|
+
onOther: a2 => [options.defaultSelf, a2],
|
|
2882
|
+
onBoth: (a, a2) => [a, a2],
|
|
2883
|
+
order: options.order
|
|
2884
|
+
}));
|
|
2885
|
+
|
|
2886
|
+
/** @internal */
|
|
2887
|
+
const zipAllSortedByKeyLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => zipAllSortedByKeyWith(self, {
|
|
2888
|
+
other: options.other,
|
|
2889
|
+
onSelf: Function_dist_effectFunction.identity,
|
|
2890
|
+
onOther: () => options.defaultSelf,
|
|
2891
|
+
onBoth: a => a,
|
|
2892
|
+
order: options.order
|
|
2893
|
+
}));
|
|
2894
|
+
|
|
2895
|
+
/** @internal */
|
|
2896
|
+
const zipAllSortedByKeyRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => zipAllSortedByKeyWith(self, {
|
|
2897
|
+
other: options.other,
|
|
2898
|
+
onSelf: () => options.defaultOther,
|
|
2899
|
+
onOther: Function_dist_effectFunction.identity,
|
|
2900
|
+
onBoth: (_, a2) => a2,
|
|
2901
|
+
order: options.order
|
|
2902
|
+
}));
|
|
2903
|
+
|
|
2904
|
+
/** @internal */
|
|
2905
|
+
const zipAllSortedByKeyWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
2906
|
+
const pull = (state, pullLeft, pullRight) => {
|
|
2907
|
+
switch (state._tag) {
|
|
2908
|
+
case OP_DRAIN_LEFT:
|
|
2909
|
+
{
|
|
2910
|
+
return Function_dist_effectFunction.pipe(pullLeft, Effect_dist_effectEffect.match({
|
|
2911
|
+
onFailure: Exit_dist_effectExit.fail,
|
|
2912
|
+
onSuccess: leftChunk => Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(leftChunk, ([k, a]) => [k, options.onSelf(a)]), DrainLeft])
|
|
2913
|
+
}));
|
|
2914
|
+
}
|
|
2915
|
+
case OP_DRAIN_RIGHT:
|
|
2916
|
+
{
|
|
2917
|
+
return Function_dist_effectFunction.pipe(pullRight, Effect_dist_effectEffect.match({
|
|
2918
|
+
onFailure: Exit_dist_effectExit.fail,
|
|
2919
|
+
onSuccess: rightChunk => Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(rightChunk, ([k, a2]) => [k, options.onOther(a2)]), DrainRight])
|
|
2920
|
+
}));
|
|
2921
|
+
}
|
|
2922
|
+
case OP_PULL_BOTH$1:
|
|
2923
|
+
{
|
|
2924
|
+
return Function_dist_effectFunction.pipe(unsome(pullLeft), Effect_dist_effectEffect.zip(unsome(pullRight), {
|
|
2925
|
+
concurrent: true
|
|
2926
|
+
}), Effect_dist_effectEffect.matchEffect({
|
|
2927
|
+
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error))),
|
|
2928
|
+
onSuccess: ([leftOption, rightOption]) => {
|
|
2929
|
+
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
2930
|
+
if (Chunk_dist_effectChunk.isEmpty(leftOption.value) && Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
2931
|
+
return pull(PullBoth$1, pullLeft, pullRight);
|
|
2932
|
+
}
|
|
2933
|
+
if (Chunk_dist_effectChunk.isEmpty(leftOption.value)) {
|
|
2934
|
+
return pull(PullLeft$1(rightOption.value), pullLeft, pullRight);
|
|
2935
|
+
}
|
|
2936
|
+
if (Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
2937
|
+
return pull(PullRight$1(leftOption.value), pullLeft, pullRight);
|
|
2938
|
+
}
|
|
2939
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(merge(leftOption.value, rightOption.value)));
|
|
2940
|
+
}
|
|
2941
|
+
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isNone(rightOption)) {
|
|
2942
|
+
if (Chunk_dist_effectChunk.isEmpty(leftOption.value)) {
|
|
2943
|
+
return pull(DrainLeft, pullLeft, pullRight);
|
|
2944
|
+
}
|
|
2945
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Function_dist_effectFunction.pipe(leftOption.value, Chunk_dist_effectChunk.map(([k, a]) => [k, options.onSelf(a)])), DrainLeft]));
|
|
2946
|
+
}
|
|
2947
|
+
if (Option_dist_effectOption.isNone(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
2948
|
+
if (Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
2949
|
+
return pull(DrainRight, pullLeft, pullRight);
|
|
2950
|
+
}
|
|
2951
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Function_dist_effectFunction.pipe(rightOption.value, Chunk_dist_effectChunk.map(([k, a2]) => [k, options.onOther(a2)])), DrainRight]));
|
|
2952
|
+
}
|
|
2953
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.none()));
|
|
2954
|
+
}
|
|
2955
|
+
}));
|
|
2956
|
+
}
|
|
2957
|
+
case OP_PULL_LEFT$1:
|
|
2958
|
+
{
|
|
2959
|
+
return Effect_dist_effectEffect.matchEffect(pullLeft, {
|
|
2960
|
+
onFailure: Option_dist_effectOption.match({
|
|
2961
|
+
onNone: () => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Function_dist_effectFunction.pipe(state.rightChunk, Chunk_dist_effectChunk.map(([k, a2]) => [k, options.onOther(a2)])), DrainRight])),
|
|
2962
|
+
onSome: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error)))
|
|
2963
|
+
}),
|
|
2964
|
+
onSuccess: leftChunk => Chunk_dist_effectChunk.isEmpty(leftChunk) ? pull(PullLeft$1(state.rightChunk), pullLeft, pullRight) : Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(merge(leftChunk, state.rightChunk)))
|
|
2965
|
+
});
|
|
2966
|
+
}
|
|
2967
|
+
case OP_PULL_RIGHT$1:
|
|
2968
|
+
{
|
|
2969
|
+
return Effect_dist_effectEffect.matchEffect(pullRight, {
|
|
2970
|
+
onFailure: Option_dist_effectOption.match({
|
|
2971
|
+
onNone: () => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(state.leftChunk, ([k, a]) => [k, options.onSelf(a)]), DrainLeft])),
|
|
2972
|
+
onSome: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error)))
|
|
2973
|
+
}),
|
|
2974
|
+
onSuccess: rightChunk => Chunk_dist_effectChunk.isEmpty(rightChunk) ? pull(PullRight$1(state.leftChunk), pullLeft, pullRight) : Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(merge(state.leftChunk, rightChunk)))
|
|
2975
|
+
});
|
|
2976
|
+
}
|
|
2977
|
+
}
|
|
2978
|
+
};
|
|
2979
|
+
const merge = (leftChunk, rightChunk) => {
|
|
2980
|
+
const hasNext = (chunk, index) => index < chunk.length - 1;
|
|
2981
|
+
const builder = [];
|
|
2982
|
+
let state = undefined;
|
|
2983
|
+
let leftIndex = 0;
|
|
2984
|
+
let rightIndex = 0;
|
|
2985
|
+
let leftTuple = Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.unsafeGet(leftIndex));
|
|
2986
|
+
let rightTuple = Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.unsafeGet(rightIndex));
|
|
2987
|
+
let k1 = leftTuple[0];
|
|
2988
|
+
let a = leftTuple[1];
|
|
2989
|
+
let k2 = rightTuple[0];
|
|
2990
|
+
let a2 = rightTuple[1];
|
|
2991
|
+
let loop = true;
|
|
2992
|
+
while (loop) {
|
|
2993
|
+
const compare = options.order(k1, k2);
|
|
2994
|
+
if (compare === 0) {
|
|
2995
|
+
builder.push([k1, options.onBoth(a, a2)]);
|
|
2996
|
+
if (hasNext(leftChunk, leftIndex) && hasNext(rightChunk, rightIndex)) {
|
|
2997
|
+
leftIndex = leftIndex + 1;
|
|
2998
|
+
rightIndex = rightIndex + 1;
|
|
2999
|
+
leftTuple = Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.unsafeGet(leftIndex));
|
|
3000
|
+
rightTuple = Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.unsafeGet(rightIndex));
|
|
3001
|
+
k1 = leftTuple[0];
|
|
3002
|
+
a = leftTuple[1];
|
|
3003
|
+
k2 = rightTuple[0];
|
|
3004
|
+
a2 = rightTuple[1];
|
|
3005
|
+
} else if (hasNext(leftChunk, leftIndex)) {
|
|
3006
|
+
state = PullRight$1(Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.drop(leftIndex + 1)));
|
|
3007
|
+
loop = false;
|
|
3008
|
+
} else if (hasNext(rightChunk, rightIndex)) {
|
|
3009
|
+
state = PullLeft$1(Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.drop(rightIndex + 1)));
|
|
3010
|
+
loop = false;
|
|
3011
|
+
} else {
|
|
3012
|
+
state = PullBoth$1;
|
|
3013
|
+
loop = false;
|
|
3014
|
+
}
|
|
3015
|
+
} else if (compare < 0) {
|
|
3016
|
+
builder.push([k1, options.onSelf(a)]);
|
|
3017
|
+
if (hasNext(leftChunk, leftIndex)) {
|
|
3018
|
+
leftIndex = leftIndex + 1;
|
|
3019
|
+
leftTuple = Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.unsafeGet(leftIndex));
|
|
3020
|
+
k1 = leftTuple[0];
|
|
3021
|
+
a = leftTuple[1];
|
|
3022
|
+
} else {
|
|
3023
|
+
const rightBuilder = [];
|
|
3024
|
+
rightBuilder.push(rightTuple);
|
|
3025
|
+
while (hasNext(rightChunk, rightIndex)) {
|
|
3026
|
+
rightIndex = rightIndex + 1;
|
|
3027
|
+
rightTuple = Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.unsafeGet(rightIndex));
|
|
3028
|
+
rightBuilder.push(rightTuple);
|
|
3029
|
+
}
|
|
3030
|
+
state = PullLeft$1(Chunk_dist_effectChunk.unsafeFromArray(rightBuilder));
|
|
3031
|
+
loop = false;
|
|
3032
|
+
}
|
|
3033
|
+
} else {
|
|
3034
|
+
builder.push([k2, options.onOther(a2)]);
|
|
3035
|
+
if (hasNext(rightChunk, rightIndex)) {
|
|
3036
|
+
rightIndex = rightIndex + 1;
|
|
3037
|
+
rightTuple = Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.unsafeGet(rightIndex));
|
|
3038
|
+
k2 = rightTuple[0];
|
|
3039
|
+
a2 = rightTuple[1];
|
|
3040
|
+
} else {
|
|
3041
|
+
const leftBuilder = [];
|
|
3042
|
+
leftBuilder.push(leftTuple);
|
|
3043
|
+
while (hasNext(leftChunk, leftIndex)) {
|
|
3044
|
+
leftIndex = leftIndex + 1;
|
|
3045
|
+
leftTuple = Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.unsafeGet(leftIndex));
|
|
3046
|
+
leftBuilder.push(leftTuple);
|
|
3047
|
+
}
|
|
3048
|
+
state = PullRight$1(Chunk_dist_effectChunk.unsafeFromArray(leftBuilder));
|
|
3049
|
+
loop = false;
|
|
3050
|
+
}
|
|
3051
|
+
}
|
|
3052
|
+
}
|
|
3053
|
+
return [Chunk_dist_effectChunk.unsafeFromArray(builder), state];
|
|
3054
|
+
};
|
|
3055
|
+
return combineChunks(self, options.other, PullBoth$1, pull);
|
|
3056
|
+
});
|
|
3057
|
+
|
|
3058
|
+
/** @internal */
|
|
3059
|
+
const zipAllWith = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, options) => {
|
|
3060
|
+
const pull = (state, pullLeft, pullRight) => {
|
|
3061
|
+
switch (state._tag) {
|
|
3062
|
+
case OP_DRAIN_LEFT:
|
|
3063
|
+
{
|
|
3064
|
+
return Effect_dist_effectEffect.matchEffect(pullLeft, {
|
|
3065
|
+
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(error)),
|
|
3066
|
+
onSuccess: leftChunk => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(leftChunk, options.onSelf), DrainLeft]))
|
|
3067
|
+
});
|
|
3068
|
+
}
|
|
3069
|
+
case OP_DRAIN_RIGHT:
|
|
3070
|
+
{
|
|
3071
|
+
return Effect_dist_effectEffect.matchEffect(pullRight, {
|
|
3072
|
+
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(error)),
|
|
3073
|
+
onSuccess: rightChunk => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(rightChunk, options.onOther), DrainRight]))
|
|
3074
|
+
});
|
|
3075
|
+
}
|
|
3076
|
+
case OP_PULL_BOTH$1:
|
|
3077
|
+
{
|
|
3078
|
+
return Function_dist_effectFunction.pipe(unsome(pullLeft), Effect_dist_effectEffect.zip(unsome(pullRight), {
|
|
3079
|
+
concurrent: true
|
|
3080
|
+
}), Effect_dist_effectEffect.matchEffect({
|
|
3081
|
+
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error))),
|
|
3082
|
+
onSuccess: ([leftOption, rightOption]) => {
|
|
3083
|
+
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
3084
|
+
if (Chunk_dist_effectChunk.isEmpty(leftOption.value) && Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
3085
|
+
return pull(PullBoth$1, pullLeft, pullRight);
|
|
3086
|
+
}
|
|
3087
|
+
if (Chunk_dist_effectChunk.isEmpty(leftOption.value)) {
|
|
3088
|
+
return pull(PullLeft$1(rightOption.value), pullLeft, pullRight);
|
|
3089
|
+
}
|
|
3090
|
+
if (Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
3091
|
+
return pull(PullRight$1(leftOption.value), pullLeft, pullRight);
|
|
3092
|
+
}
|
|
3093
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(leftOption.value, rightOption.value, options.onBoth)));
|
|
3094
|
+
}
|
|
3095
|
+
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isNone(rightOption)) {
|
|
3096
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(leftOption.value, options.onSelf), DrainLeft]));
|
|
3097
|
+
}
|
|
3098
|
+
if (Option_dist_effectOption.isNone(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
3099
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(rightOption.value, options.onOther), DrainRight]));
|
|
3100
|
+
}
|
|
3101
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.none()));
|
|
3102
|
+
}
|
|
3103
|
+
}));
|
|
3104
|
+
}
|
|
3105
|
+
case OP_PULL_LEFT$1:
|
|
3106
|
+
{
|
|
3107
|
+
return Effect_dist_effectEffect.matchEffect(pullLeft, {
|
|
3108
|
+
onFailure: Option_dist_effectOption.match({
|
|
3109
|
+
onNone: () => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(state.rightChunk, options.onOther), DrainRight])),
|
|
3110
|
+
onSome: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error)))
|
|
3111
|
+
}),
|
|
3112
|
+
onSuccess: leftChunk => {
|
|
3113
|
+
if (Chunk_dist_effectChunk.isEmpty(leftChunk)) {
|
|
3114
|
+
return pull(PullLeft$1(state.rightChunk), pullLeft, pullRight);
|
|
3115
|
+
}
|
|
3116
|
+
if (Chunk_dist_effectChunk.isEmpty(state.rightChunk)) {
|
|
3117
|
+
return pull(PullRight$1(leftChunk), pullLeft, pullRight);
|
|
3118
|
+
}
|
|
3119
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(leftChunk, state.rightChunk, options.onBoth)));
|
|
3120
|
+
}
|
|
3121
|
+
});
|
|
3122
|
+
}
|
|
3123
|
+
case OP_PULL_RIGHT$1:
|
|
3124
|
+
{
|
|
3125
|
+
return Effect_dist_effectEffect.matchEffect(pullRight, {
|
|
3126
|
+
onFailure: Option_dist_effectOption.match({
|
|
3127
|
+
onNone: () => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed([Chunk_dist_effectChunk.map(state.leftChunk, options.onSelf), DrainLeft])),
|
|
3128
|
+
onSome: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error)))
|
|
3129
|
+
}),
|
|
3130
|
+
onSuccess: rightChunk => {
|
|
3131
|
+
if (Chunk_dist_effectChunk.isEmpty(rightChunk)) {
|
|
3132
|
+
return pull(PullRight$1(state.leftChunk), pullLeft, pullRight);
|
|
3133
|
+
}
|
|
3134
|
+
if (Chunk_dist_effectChunk.isEmpty(state.leftChunk)) {
|
|
3135
|
+
return pull(PullLeft$1(rightChunk), pullLeft, pullRight);
|
|
3136
|
+
}
|
|
3137
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(state.leftChunk, rightChunk, options.onBoth)));
|
|
3138
|
+
}
|
|
3139
|
+
});
|
|
3140
|
+
}
|
|
3141
|
+
}
|
|
3142
|
+
};
|
|
3143
|
+
const zip = (leftChunk, rightChunk, f) => {
|
|
3144
|
+
const [output, either] = zipChunks(leftChunk, rightChunk, f);
|
|
3145
|
+
switch (either._tag) {
|
|
3146
|
+
case "Left":
|
|
3147
|
+
{
|
|
3148
|
+
if (Chunk_dist_effectChunk.isEmpty(either.left)) {
|
|
3149
|
+
return [output, PullBoth$1];
|
|
3150
|
+
}
|
|
3151
|
+
return [output, PullRight$1(either.left)];
|
|
3152
|
+
}
|
|
3153
|
+
case "Right":
|
|
3154
|
+
{
|
|
3155
|
+
if (Chunk_dist_effectChunk.isEmpty(either.right)) {
|
|
3156
|
+
return [output, PullBoth$1];
|
|
3157
|
+
}
|
|
3158
|
+
return [output, PullLeft$1(either.right)];
|
|
3159
|
+
}
|
|
3160
|
+
}
|
|
3161
|
+
};
|
|
3162
|
+
return combineChunks(self, options.other, PullBoth$1, pull);
|
|
3163
|
+
});
|
|
3164
|
+
|
|
3165
|
+
/** @internal */
|
|
3166
|
+
const zipLatest = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipLatestWith(that, (a, a2) => [a, a2])));
|
|
3167
|
+
|
|
3168
|
+
/** @internal */
|
|
3169
|
+
const zipLatestWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => {
|
|
3170
|
+
const pullNonEmpty = pull => Function_dist_effectFunction.pipe(pull, Effect_dist_effectEffect.flatMap(chunk => Chunk_dist_effectChunk.isEmpty(chunk) ? pullNonEmpty(pull) : Effect_dist_effectEffect.succeed(chunk)));
|
|
3171
|
+
return Function_dist_effectFunction.pipe(toPull(self), Effect_dist_effectEffect.map(pullNonEmpty), Effect_dist_effectEffect.zip(Function_dist_effectFunction.pipe(toPull(that), Effect_dist_effectEffect.map(pullNonEmpty))), Effect_dist_effectEffect.flatMap(([left, right]) => Function_dist_effectFunction.pipe(fromEffectOption(Effect_dist_effectEffect.raceWith(left, right, {
|
|
3172
|
+
onSelfDone: (leftDone, rightFiber) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.suspend(() => leftDone), Effect_dist_effectEffect.zipWith(Fiber_dist_effectFiber.join(rightFiber), (l, r) => [l, r, true])),
|
|
3173
|
+
onOtherDone: (rightDone, leftFiber) => Function_dist_effectFunction.pipe(Effect_dist_effectEffect.suspend(() => rightDone), Effect_dist_effectEffect.zipWith(Fiber_dist_effectFiber.join(leftFiber), (l, r) => [r, l, false]))
|
|
3174
|
+
})), flatMap(([l, r, leftFirst]) => Function_dist_effectFunction.pipe(fromEffect(Ref_dist_effectRef.make([Chunk_dist_effectChunk.unsafeLast(l), Chunk_dist_effectChunk.unsafeLast(r)])), flatMap(latest => Function_dist_effectFunction.pipe(fromChunk(leftFirst ? Function_dist_effectFunction.pipe(r, Chunk_dist_effectChunk.map(a2 => f(Chunk_dist_effectChunk.unsafeLast(l), a2))) : Function_dist_effectFunction.pipe(l, Chunk_dist_effectChunk.map(a => f(a, Chunk_dist_effectChunk.unsafeLast(r))))), concat(Function_dist_effectFunction.pipe(repeatEffectOption(left), mergeEither(repeatEffectOption(right)), mapEffectSequential(Either_dist_effectEither.match({
|
|
3175
|
+
onLeft: leftChunk => Function_dist_effectFunction.pipe(Ref_dist_effectRef.modify(latest, ([_, rightLatest]) => [Function_dist_effectFunction.pipe(leftChunk, Chunk_dist_effectChunk.map(a => f(a, rightLatest))), [Chunk_dist_effectChunk.unsafeLast(leftChunk), rightLatest]])),
|
|
3176
|
+
onRight: rightChunk => Function_dist_effectFunction.pipe(Ref_dist_effectRef.modify(latest, ([leftLatest, _]) => [Function_dist_effectFunction.pipe(rightChunk, Chunk_dist_effectChunk.map(a2 => f(leftLatest, a2))), [leftLatest, Chunk_dist_effectChunk.unsafeLast(rightChunk)]]))
|
|
3177
|
+
})), flatMap(fromChunk))))))), toPull)), fromPull);
|
|
3178
|
+
});
|
|
3179
|
+
|
|
3180
|
+
/** @internal */
|
|
3181
|
+
const zipLeft = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipWithChunks(that, (left, right) => {
|
|
3182
|
+
if (left.length > right.length) {
|
|
3183
|
+
return [Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.take(right.length)), Either_dist_effectEither.left(Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.take(right.length)))];
|
|
3184
|
+
}
|
|
3185
|
+
return [left, Either_dist_effectEither.right(Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.drop(left.length)))];
|
|
3186
|
+
})));
|
|
3187
|
+
|
|
3188
|
+
/** @internal */
|
|
3189
|
+
const zipRight = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, that) => Function_dist_effectFunction.pipe(self, zipWithChunks(that, (left, right) => {
|
|
3190
|
+
if (left.length > right.length) {
|
|
3191
|
+
return [right, Either_dist_effectEither.left(Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.take(right.length)))];
|
|
3192
|
+
}
|
|
3193
|
+
return [Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.take(left.length)), Either_dist_effectEither.right(Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.drop(left.length)))];
|
|
3194
|
+
})));
|
|
3195
|
+
|
|
3196
|
+
/** @internal */
|
|
3197
|
+
const zipWith = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => Function_dist_effectFunction.pipe(self, zipWithChunks(that, (leftChunk, rightChunk) => zipChunks(leftChunk, rightChunk, f))));
|
|
3198
|
+
|
|
3199
|
+
/** @internal */
|
|
3200
|
+
const zipWithChunks = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, that, f) => {
|
|
3201
|
+
const pull = (state, pullLeft, pullRight) => {
|
|
3202
|
+
switch (state._tag) {
|
|
3203
|
+
case OP_PULL_BOTH:
|
|
3204
|
+
{
|
|
3205
|
+
return Function_dist_effectFunction.pipe(unsome(pullLeft), Effect_dist_effectEffect.zip(unsome(pullRight), {
|
|
3206
|
+
concurrent: true
|
|
3207
|
+
}), Effect_dist_effectEffect.matchEffect({
|
|
3208
|
+
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.some(error))),
|
|
3209
|
+
onSuccess: ([leftOption, rightOption]) => {
|
|
3210
|
+
if (Option_dist_effectOption.isSome(leftOption) && Option_dist_effectOption.isSome(rightOption)) {
|
|
3211
|
+
if (Chunk_dist_effectChunk.isEmpty(leftOption.value) && Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
3212
|
+
return pull(PullBoth, pullLeft, pullRight);
|
|
3213
|
+
}
|
|
3214
|
+
if (Chunk_dist_effectChunk.isEmpty(leftOption.value)) {
|
|
3215
|
+
return pull(PullLeft(rightOption.value), pullLeft, pullRight);
|
|
3216
|
+
}
|
|
3217
|
+
if (Chunk_dist_effectChunk.isEmpty(rightOption.value)) {
|
|
3218
|
+
return pull(PullRight(leftOption.value), pullLeft, pullRight);
|
|
3219
|
+
}
|
|
3220
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(leftOption.value, rightOption.value)));
|
|
3221
|
+
}
|
|
3222
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(Option_dist_effectOption.none()));
|
|
3223
|
+
}
|
|
3224
|
+
}));
|
|
3225
|
+
}
|
|
3226
|
+
case OP_PULL_LEFT:
|
|
3227
|
+
{
|
|
3228
|
+
return Effect_dist_effectEffect.matchEffect(pullLeft, {
|
|
3229
|
+
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(error)),
|
|
3230
|
+
onSuccess: leftChunk => {
|
|
3231
|
+
if (Chunk_dist_effectChunk.isEmpty(leftChunk)) {
|
|
3232
|
+
return pull(PullLeft(state.rightChunk), pullLeft, pullRight);
|
|
3233
|
+
}
|
|
3234
|
+
if (Chunk_dist_effectChunk.isEmpty(state.rightChunk)) {
|
|
3235
|
+
return pull(PullRight(leftChunk), pullLeft, pullRight);
|
|
3236
|
+
}
|
|
3237
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(leftChunk, state.rightChunk)));
|
|
3238
|
+
}
|
|
3239
|
+
});
|
|
3240
|
+
}
|
|
3241
|
+
case OP_PULL_RIGHT:
|
|
3242
|
+
{
|
|
3243
|
+
return Effect_dist_effectEffect.matchEffect(pullRight, {
|
|
3244
|
+
onFailure: error => Effect_dist_effectEffect.succeed(Exit_dist_effectExit.fail(error)),
|
|
3245
|
+
onSuccess: rightChunk => {
|
|
3246
|
+
if (Chunk_dist_effectChunk.isEmpty(rightChunk)) {
|
|
3247
|
+
return pull(PullRight(state.leftChunk), pullLeft, pullRight);
|
|
3248
|
+
}
|
|
3249
|
+
if (Chunk_dist_effectChunk.isEmpty(state.leftChunk)) {
|
|
3250
|
+
return pull(PullLeft(rightChunk), pullLeft, pullRight);
|
|
3251
|
+
}
|
|
3252
|
+
return Effect_dist_effectEffect.succeed(Exit_dist_effectExit.succeed(zip(state.leftChunk, rightChunk)));
|
|
3253
|
+
}
|
|
3254
|
+
});
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
};
|
|
3258
|
+
const zip = (leftChunk, rightChunk) => {
|
|
3259
|
+
const [output, either] = f(leftChunk, rightChunk);
|
|
3260
|
+
switch (either._tag) {
|
|
3261
|
+
case "Left":
|
|
3262
|
+
{
|
|
3263
|
+
if (Chunk_dist_effectChunk.isEmpty(either.left)) {
|
|
3264
|
+
return [output, PullBoth];
|
|
3265
|
+
}
|
|
3266
|
+
return [output, PullRight(either.left)];
|
|
3267
|
+
}
|
|
3268
|
+
case "Right":
|
|
3269
|
+
{
|
|
3270
|
+
if (Chunk_dist_effectChunk.isEmpty(either.right)) {
|
|
3271
|
+
return [output, PullBoth];
|
|
3272
|
+
}
|
|
3273
|
+
return [output, PullLeft(either.right)];
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
};
|
|
3277
|
+
return Function_dist_effectFunction.pipe(self, combineChunks(that, PullBoth, pull));
|
|
3278
|
+
});
|
|
3279
|
+
|
|
3280
|
+
/** @internal */
|
|
3281
|
+
const zipWithIndex = self => Function_dist_effectFunction.pipe(self, mapAccum(0, (index, a) => [index + 1, [a, index]]));
|
|
3282
|
+
|
|
3283
|
+
/** @internal */
|
|
3284
|
+
const zipWithNext = self => {
|
|
3285
|
+
const process = last => sink.readWithCause({
|
|
3286
|
+
onInput: input => {
|
|
3287
|
+
const [newLast, chunk] = Chunk_dist_effectChunk.mapAccum(input, last, (prev, curr) => [Option_dist_effectOption.some(curr), Function_dist_effectFunction.pipe(prev, Option_dist_effectOption.map(a => [a, curr]))]);
|
|
3288
|
+
const output = Chunk_dist_effectChunk.filterMap(chunk, option => Option_dist_effectOption.isSome(option) ? Option_dist_effectOption.some([option.value[0], Option_dist_effectOption.some(option.value[1])]) : Option_dist_effectOption.none());
|
|
3289
|
+
return sink.flatMap(sink.write(output), () => process(newLast));
|
|
3290
|
+
},
|
|
3291
|
+
onFailure: sink.failCause,
|
|
3292
|
+
onDone: () => Option_dist_effectOption.match(last, {
|
|
3293
|
+
onNone: () => sink.unit,
|
|
3294
|
+
onSome: value => sink.zipRight(sink.write(Chunk_dist_effectChunk.of([value, Option_dist_effectOption.none()])), sink.unit)
|
|
3295
|
+
})
|
|
3296
|
+
});
|
|
3297
|
+
return new StreamImpl(Function_dist_effectFunction.pipe(toChannel(self), sink.pipeToOrFail(process(Option_dist_effectOption.none()))));
|
|
3298
|
+
};
|
|
3299
|
+
|
|
3300
|
+
/** @internal */
|
|
3301
|
+
const zipWithPrevious = self => Function_dist_effectFunction.pipe(self, mapAccum(Option_dist_effectOption.none(), (prev, curr) => [Option_dist_effectOption.some(curr), [prev, curr]]));
|
|
3302
|
+
|
|
3303
|
+
/** @internal */
|
|
3304
|
+
const zipWithPreviousAndNext = self => Function_dist_effectFunction.pipe(zipWithNext(zipWithPrevious(self)), map(([[prev, curr], next]) => [prev, curr, Function_dist_effectFunction.pipe(next, Option_dist_effectOption.map(tuple => tuple[1]))]));
|
|
3305
|
+
|
|
3306
|
+
/** @internal */
|
|
3307
|
+
const zipChunks = (left, right, f) => {
|
|
3308
|
+
if (left.length > right.length) {
|
|
3309
|
+
return [Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.take(right.length), Chunk_dist_effectChunk.zipWith(right, f)), Either_dist_effectEither.left(Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.drop(right.length)))];
|
|
3310
|
+
}
|
|
3311
|
+
return [Function_dist_effectFunction.pipe(left, Chunk_dist_effectChunk.zipWith(Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.take(left.length)), f)), Either_dist_effectEither.right(Function_dist_effectFunction.pipe(right, Chunk_dist_effectChunk.drop(left.length)))];
|
|
3312
|
+
};
|
|
3313
|
+
|
|
3314
|
+
// Do notation
|
|
3315
|
+
|
|
3316
|
+
/** @internal */
|
|
3317
|
+
const Do = /*#__PURE__*/succeed({});
|
|
3318
|
+
|
|
3319
|
+
/** @internal */
|
|
3320
|
+
const bind = /*#__PURE__*/Function_dist_effectFunction.dual(args => typeof args[0] !== "string", (self, tag, f, options) => flatMap(self, k => map(f(k), a => ({
|
|
3321
|
+
...k,
|
|
3322
|
+
[tag]: a
|
|
3323
|
+
})), options));
|
|
3324
|
+
|
|
3325
|
+
/* @internal */
|
|
3326
|
+
const bindTo = /*#__PURE__*/Function_dist_effectFunction.dual(2, (self, tag) => map(self, a => ({
|
|
3327
|
+
[tag]: a
|
|
3328
|
+
})));
|
|
3329
|
+
|
|
3330
|
+
/* @internal */
|
|
3331
|
+
const let_ = /*#__PURE__*/Function_dist_effectFunction.dual(3, (self, tag, f) => map(self, k => ({
|
|
3332
|
+
...k,
|
|
3333
|
+
[tag]: f(k)
|
|
3334
|
+
})));
|
|
3335
|
+
|
|
3336
|
+
// Circular with Channel
|
|
3337
|
+
|
|
3338
|
+
/** @internal */
|
|
3339
|
+
const channelToStream = self => {
|
|
3340
|
+
return new StreamImpl(self);
|
|
3341
|
+
};
|
|
3342
|
+
|
|
3343
|
+
// =============================================================================
|
|
3344
|
+
// encoding
|
|
3345
|
+
// =============================================================================
|
|
3346
|
+
|
|
3347
|
+
/** @internal */
|
|
3348
|
+
const decodeText = /*#__PURE__*/Function_dist_effectFunction.dual(args => isStream(args[0]), (self, encoding = "utf-8") => suspend(() => {
|
|
3349
|
+
const decoder = new TextDecoder(encoding);
|
|
3350
|
+
return map(self, s => decoder.decode(s));
|
|
3351
|
+
}));
|
|
3352
|
+
|
|
3353
|
+
/** @internal */
|
|
3354
|
+
const encodeText = self => suspend(() => {
|
|
3355
|
+
const encoder = new TextEncoder();
|
|
3356
|
+
return map(self, s => encoder.encode(s));
|
|
3357
|
+
});
|
|
3358
|
+
|
|
3359
|
+
exports.DefaultChunkSize = DefaultChunkSize;
|
|
3360
|
+
exports.Do = Do;
|
|
3361
|
+
exports.StreamTypeId = StreamTypeId;
|
|
3362
|
+
exports._async = _async;
|
|
3363
|
+
exports.acquireRelease = acquireRelease;
|
|
3364
|
+
exports.aggregate = aggregate;
|
|
3365
|
+
exports.aggregateWithin = aggregateWithin;
|
|
3366
|
+
exports.aggregateWithinEither = aggregateWithinEither;
|
|
3367
|
+
exports.as = as;
|
|
3368
|
+
exports.asyncEffect = asyncEffect;
|
|
3369
|
+
exports.asyncInterrupt = asyncInterrupt;
|
|
3370
|
+
exports.asyncOption = asyncOption;
|
|
3371
|
+
exports.asyncScoped = asyncScoped;
|
|
3372
|
+
exports.bind = bind;
|
|
3373
|
+
exports.bindTo = bindTo;
|
|
3374
|
+
exports.branchAfter = branchAfter;
|
|
3375
|
+
exports.broadcast = broadcast;
|
|
3376
|
+
exports.broadcastDynamic = broadcastDynamic;
|
|
3377
|
+
exports.broadcastedQueues = broadcastedQueues;
|
|
3378
|
+
exports.broadcastedQueuesDynamic = broadcastedQueuesDynamic;
|
|
3379
|
+
exports.buffer = buffer;
|
|
3380
|
+
exports.bufferChunks = bufferChunks;
|
|
3381
|
+
exports.catchAll = catchAll;
|
|
3382
|
+
exports.catchAllCause = catchAllCause;
|
|
3383
|
+
exports.catchSome = catchSome;
|
|
3384
|
+
exports.catchSomeCause = catchSomeCause;
|
|
3385
|
+
exports.catchTag = catchTag;
|
|
3386
|
+
exports.catchTags = catchTags;
|
|
3387
|
+
exports.changes = changes;
|
|
3388
|
+
exports.changesWith = changesWith;
|
|
3389
|
+
exports.changesWithEffect = changesWithEffect;
|
|
3390
|
+
exports.channelToStream = channelToStream;
|
|
3391
|
+
exports.chunks = chunks;
|
|
3392
|
+
exports.chunksWith = chunksWith;
|
|
3393
|
+
exports.combine = combine;
|
|
3394
|
+
exports.combineChunks = combineChunks;
|
|
3395
|
+
exports.concat = concat;
|
|
3396
|
+
exports.concatAll = concatAll;
|
|
3397
|
+
exports.context = context;
|
|
3398
|
+
exports.contextWith = contextWith;
|
|
3399
|
+
exports.contextWithEffect = contextWithEffect;
|
|
3400
|
+
exports.contextWithStream = contextWithStream;
|
|
3401
|
+
exports.cross = cross;
|
|
3402
|
+
exports.crossLeft = crossLeft;
|
|
3403
|
+
exports.crossRight = crossRight;
|
|
3404
|
+
exports.crossWith = crossWith;
|
|
3405
|
+
exports.debounce = debounce;
|
|
3406
|
+
exports.decodeText = decodeText;
|
|
3407
|
+
exports.die = die;
|
|
3408
|
+
exports.dieMessage = dieMessage;
|
|
3409
|
+
exports.dieSync = dieSync;
|
|
3410
|
+
exports.distributedWith = distributedWith;
|
|
3411
|
+
exports.distributedWithDynamic = distributedWithDynamic;
|
|
3412
|
+
exports.distributedWithDynamicCallback = distributedWithDynamicCallback;
|
|
3413
|
+
exports.drain = drain;
|
|
3414
|
+
exports.drainFork = drainFork;
|
|
3415
|
+
exports.drop = drop;
|
|
3416
|
+
exports.dropRight = dropRight;
|
|
3417
|
+
exports.dropUntil = dropUntil;
|
|
3418
|
+
exports.dropUntilEffect = dropUntilEffect;
|
|
3419
|
+
exports.dropWhile = dropWhile;
|
|
3420
|
+
exports.dropWhileEffect = dropWhileEffect;
|
|
3421
|
+
exports.either = either;
|
|
3422
|
+
exports.empty = empty;
|
|
3423
|
+
exports.encodeText = encodeText;
|
|
3424
|
+
exports.ensuring = ensuring;
|
|
3425
|
+
exports.ensuringWith = ensuringWith;
|
|
3426
|
+
exports.execute = execute;
|
|
3427
|
+
exports.fail = fail;
|
|
3428
|
+
exports.failCause = failCause;
|
|
3429
|
+
exports.failCauseSync = failCauseSync;
|
|
3430
|
+
exports.failSync = failSync;
|
|
3431
|
+
exports.filter = filter;
|
|
3432
|
+
exports.filterEffect = filterEffect;
|
|
3433
|
+
exports.filterMap = filterMap;
|
|
3434
|
+
exports.filterMapEffect = filterMapEffect;
|
|
3435
|
+
exports.filterMapWhile = filterMapWhile;
|
|
3436
|
+
exports.filterMapWhileEffect = filterMapWhileEffect;
|
|
3437
|
+
exports.finalizer = finalizer;
|
|
3438
|
+
exports.find = find;
|
|
3439
|
+
exports.findEffect = findEffect;
|
|
3440
|
+
exports.flatMap = flatMap;
|
|
3441
|
+
exports.flatten = flatten;
|
|
3442
|
+
exports.flattenChunks = flattenChunks;
|
|
3443
|
+
exports.flattenEffect = flattenEffect;
|
|
3444
|
+
exports.flattenExitOption = flattenExitOption;
|
|
3445
|
+
exports.flattenIterables = flattenIterables;
|
|
3446
|
+
exports.flattenTake = flattenTake;
|
|
3447
|
+
exports.forever = forever;
|
|
3448
|
+
exports.fromAsyncIterable = fromAsyncIterable;
|
|
3449
|
+
exports.fromChannel = fromChannel;
|
|
3450
|
+
exports.fromChunk = fromChunk;
|
|
3451
|
+
exports.fromChunkPubSub = fromChunkPubSub;
|
|
3452
|
+
exports.fromChunkQueue = fromChunkQueue;
|
|
3453
|
+
exports.fromChunks = fromChunks;
|
|
3454
|
+
exports.fromEffect = fromEffect;
|
|
3455
|
+
exports.fromEffectOption = fromEffectOption;
|
|
3456
|
+
exports.fromIterable = fromIterable;
|
|
3457
|
+
exports.fromIterableEffect = fromIterableEffect;
|
|
3458
|
+
exports.fromIteratorSucceed = fromIteratorSucceed;
|
|
3459
|
+
exports.fromPubSub = fromPubSub;
|
|
3460
|
+
exports.fromPull = fromPull;
|
|
3461
|
+
exports.fromQueue = fromQueue;
|
|
3462
|
+
exports.fromReadableStream = fromReadableStream;
|
|
3463
|
+
exports.fromReadableStreamByob = fromReadableStreamByob;
|
|
3464
|
+
exports.fromSchedule = fromSchedule;
|
|
3465
|
+
exports.groupAdjacentBy = groupAdjacentBy;
|
|
3466
|
+
exports.grouped = grouped;
|
|
3467
|
+
exports.groupedWithin = groupedWithin;
|
|
3468
|
+
exports.haltAfter = haltAfter;
|
|
3469
|
+
exports.haltWhen = haltWhen;
|
|
3470
|
+
exports.haltWhenDeferred = haltWhenDeferred;
|
|
3471
|
+
exports.identityStream = identityStream;
|
|
3472
|
+
exports.interleave = interleave;
|
|
3473
|
+
exports.interleaveWith = interleaveWith;
|
|
3474
|
+
exports.interruptAfter = interruptAfter;
|
|
3475
|
+
exports.interruptWhen = interruptWhen;
|
|
3476
|
+
exports.interruptWhenDeferred = interruptWhenDeferred;
|
|
3477
|
+
exports.intersperse = intersperse;
|
|
3478
|
+
exports.intersperseAffixes = intersperseAffixes;
|
|
3479
|
+
exports.isStream = isStream;
|
|
3480
|
+
exports.iterate = iterate;
|
|
3481
|
+
exports.let_ = let_;
|
|
3482
|
+
exports.make = make;
|
|
3483
|
+
exports.map = map;
|
|
3484
|
+
exports.mapAccum = mapAccum;
|
|
3485
|
+
exports.mapAccumEffect = mapAccumEffect;
|
|
3486
|
+
exports.mapBoth = mapBoth;
|
|
3487
|
+
exports.mapChunks = mapChunks;
|
|
3488
|
+
exports.mapChunksEffect = mapChunksEffect;
|
|
3489
|
+
exports.mapConcat = mapConcat;
|
|
3490
|
+
exports.mapConcatChunk = mapConcatChunk;
|
|
3491
|
+
exports.mapConcatChunkEffect = mapConcatChunkEffect;
|
|
3492
|
+
exports.mapConcatEffect = mapConcatEffect;
|
|
3493
|
+
exports.mapEffectPar = mapEffectPar;
|
|
3494
|
+
exports.mapEffectSequential = mapEffectSequential;
|
|
3495
|
+
exports.mapError = mapError;
|
|
3496
|
+
exports.mapErrorCause = mapErrorCause;
|
|
3497
|
+
exports.mapInputContext = mapInputContext;
|
|
3498
|
+
exports.matchConcurrency = matchConcurrency;
|
|
3499
|
+
exports.merge = merge;
|
|
3500
|
+
exports.mergeAll = mergeAll;
|
|
3501
|
+
exports.mergeEither = mergeEither;
|
|
3502
|
+
exports.mergeLeft = mergeLeft;
|
|
3503
|
+
exports.mergeRight = mergeRight;
|
|
3504
|
+
exports.mergeWith = mergeWith;
|
|
3505
|
+
exports.mkString = mkString;
|
|
3506
|
+
exports.never = never;
|
|
3507
|
+
exports.onDone = onDone;
|
|
3508
|
+
exports.onError = onError;
|
|
3509
|
+
exports.orDie = orDie;
|
|
3510
|
+
exports.orDieWith = orDieWith;
|
|
3511
|
+
exports.orElse = orElse;
|
|
3512
|
+
exports.orElseEither = orElseEither;
|
|
3513
|
+
exports.orElseFail = orElseFail;
|
|
3514
|
+
exports.orElseIfEmpty = orElseIfEmpty;
|
|
3515
|
+
exports.orElseIfEmptyChunk = orElseIfEmptyChunk;
|
|
3516
|
+
exports.orElseIfEmptyStream = orElseIfEmptyStream;
|
|
3517
|
+
exports.orElseSucceed = orElseSucceed;
|
|
3518
|
+
exports.paginate = paginate;
|
|
3519
|
+
exports.paginateChunk = paginateChunk;
|
|
3520
|
+
exports.paginateChunkEffect = paginateChunkEffect;
|
|
3521
|
+
exports.paginateEffect = paginateEffect;
|
|
3522
|
+
exports.partition = partition;
|
|
3523
|
+
exports.partitionEither = partitionEither;
|
|
3524
|
+
exports.peel = peel;
|
|
3525
|
+
exports.pipeThrough = pipeThrough;
|
|
3526
|
+
exports.pipeThroughChannel = pipeThroughChannel;
|
|
3527
|
+
exports.pipeThroughChannelOrFail = pipeThroughChannelOrFail;
|
|
3528
|
+
exports.prepend = prepend;
|
|
3529
|
+
exports.provideContext = provideContext;
|
|
3530
|
+
exports.provideLayer = provideLayer;
|
|
3531
|
+
exports.provideService = provideService;
|
|
3532
|
+
exports.provideServiceEffect = provideServiceEffect;
|
|
3533
|
+
exports.provideServiceStream = provideServiceStream;
|
|
3534
|
+
exports.provideSomeLayer = provideSomeLayer;
|
|
3535
|
+
exports.range = range;
|
|
3536
|
+
exports.rechunk = rechunk;
|
|
3537
|
+
exports.refineOrDie = refineOrDie;
|
|
3538
|
+
exports.refineOrDieWith = refineOrDieWith;
|
|
3539
|
+
exports.repeat = repeat;
|
|
3540
|
+
exports.repeatEffect = repeatEffect;
|
|
3541
|
+
exports.repeatEffectChunk = repeatEffectChunk;
|
|
3542
|
+
exports.repeatEffectChunkOption = repeatEffectChunkOption;
|
|
3543
|
+
exports.repeatEffectOption = repeatEffectOption;
|
|
3544
|
+
exports.repeatEffectWithSchedule = repeatEffectWithSchedule;
|
|
3545
|
+
exports.repeatEither = repeatEither;
|
|
3546
|
+
exports.repeatElements = repeatElements;
|
|
3547
|
+
exports.repeatElementsWith = repeatElementsWith;
|
|
3548
|
+
exports.repeatValue = repeatValue;
|
|
3549
|
+
exports.repeatWith = repeatWith;
|
|
3550
|
+
exports.retry = retry;
|
|
3551
|
+
exports.run = run;
|
|
3552
|
+
exports.runCollect = runCollect;
|
|
3553
|
+
exports.runCount = runCount;
|
|
3554
|
+
exports.runDrain = runDrain;
|
|
3555
|
+
exports.runFold = runFold;
|
|
3556
|
+
exports.runFoldEffect = runFoldEffect;
|
|
3557
|
+
exports.runFoldScoped = runFoldScoped;
|
|
3558
|
+
exports.runFoldScopedEffect = runFoldScopedEffect;
|
|
3559
|
+
exports.runFoldWhile = runFoldWhile;
|
|
3560
|
+
exports.runFoldWhileEffect = runFoldWhileEffect;
|
|
3561
|
+
exports.runFoldWhileScoped = runFoldWhileScoped;
|
|
3562
|
+
exports.runFoldWhileScopedEffect = runFoldWhileScopedEffect;
|
|
3563
|
+
exports.runForEach = runForEach;
|
|
3564
|
+
exports.runForEachChunk = runForEachChunk;
|
|
3565
|
+
exports.runForEachChunkScoped = runForEachChunkScoped;
|
|
3566
|
+
exports.runForEachScoped = runForEachScoped;
|
|
3567
|
+
exports.runForEachWhile = runForEachWhile;
|
|
3568
|
+
exports.runForEachWhileScoped = runForEachWhileScoped;
|
|
3569
|
+
exports.runHead = runHead;
|
|
3570
|
+
exports.runIntoPubSub = runIntoPubSub;
|
|
3571
|
+
exports.runIntoPubSubScoped = runIntoPubSubScoped;
|
|
3572
|
+
exports.runIntoQueue = runIntoQueue;
|
|
3573
|
+
exports.runIntoQueueElementsScoped = runIntoQueueElementsScoped;
|
|
3574
|
+
exports.runIntoQueueScoped = runIntoQueueScoped;
|
|
3575
|
+
exports.runLast = runLast;
|
|
3576
|
+
exports.runScoped = runScoped;
|
|
3577
|
+
exports.runSum = runSum;
|
|
3578
|
+
exports.scan = scan;
|
|
3579
|
+
exports.scanEffect = scanEffect;
|
|
3580
|
+
exports.scanReduce = scanReduce;
|
|
3581
|
+
exports.scanReduceEffect = scanReduceEffect;
|
|
3582
|
+
exports.schedule = schedule;
|
|
3583
|
+
exports.scheduleWith = scheduleWith;
|
|
3584
|
+
exports.scoped = scoped;
|
|
3585
|
+
exports.sliding = sliding;
|
|
3586
|
+
exports.slidingSize = slidingSize;
|
|
3587
|
+
exports.some = some;
|
|
3588
|
+
exports.someOrElse = someOrElse;
|
|
3589
|
+
exports.someOrFail = someOrFail;
|
|
3590
|
+
exports.split = split;
|
|
3591
|
+
exports.splitLines = splitLines;
|
|
3592
|
+
exports.splitOnChunk = splitOnChunk;
|
|
3593
|
+
exports.succeed = succeed;
|
|
3594
|
+
exports.suspend = suspend;
|
|
3595
|
+
exports.sync = sync;
|
|
3596
|
+
exports.take = take;
|
|
3597
|
+
exports.takeRight = takeRight;
|
|
3598
|
+
exports.takeUntil = takeUntil;
|
|
3599
|
+
exports.takeUntilEffect = takeUntilEffect;
|
|
3600
|
+
exports.takeWhile = takeWhile;
|
|
3601
|
+
exports.tap = tap;
|
|
3602
|
+
exports.tapBoth = tapBoth;
|
|
3603
|
+
exports.tapError = tapError;
|
|
3604
|
+
exports.tapErrorCause = tapErrorCause;
|
|
3605
|
+
exports.tapSink = tapSink;
|
|
3606
|
+
exports.throttle = throttle;
|
|
3607
|
+
exports.throttleEffect = throttleEffect;
|
|
3608
|
+
exports.tick = tick;
|
|
3609
|
+
exports.timeout = timeout;
|
|
3610
|
+
exports.timeoutFail = timeoutFail;
|
|
3611
|
+
exports.timeoutFailCause = timeoutFailCause;
|
|
3612
|
+
exports.timeoutTo = timeoutTo;
|
|
3613
|
+
exports.toChannel = toChannel;
|
|
3614
|
+
exports.toPubSub = toPubSub;
|
|
3615
|
+
exports.toPull = toPull;
|
|
3616
|
+
exports.toQueue = toQueue;
|
|
3617
|
+
exports.toQueueOfElements = toQueueOfElements;
|
|
3618
|
+
exports.toReadableStream = toReadableStream;
|
|
3619
|
+
exports.transduce = transduce;
|
|
3620
|
+
exports.unfold = unfold;
|
|
3621
|
+
exports.unfoldChunk = unfoldChunk;
|
|
3622
|
+
exports.unfoldChunkEffect = unfoldChunkEffect;
|
|
3623
|
+
exports.unfoldEffect = unfoldEffect;
|
|
3624
|
+
exports.unit = unit;
|
|
3625
|
+
exports.unwrap = unwrap;
|
|
3626
|
+
exports.unwrapScoped = unwrapScoped;
|
|
3627
|
+
exports.updateService = updateService;
|
|
3628
|
+
exports.when = when;
|
|
3629
|
+
exports.whenCase = whenCase;
|
|
3630
|
+
exports.whenCaseEffect = whenCaseEffect;
|
|
3631
|
+
exports.whenEffect = whenEffect;
|
|
3632
|
+
exports.withSpan = withSpan;
|
|
3633
|
+
exports.zip = zip;
|
|
3634
|
+
exports.zipAll = zipAll;
|
|
3635
|
+
exports.zipAllLeft = zipAllLeft;
|
|
3636
|
+
exports.zipAllRight = zipAllRight;
|
|
3637
|
+
exports.zipAllSortedByKey = zipAllSortedByKey;
|
|
3638
|
+
exports.zipAllSortedByKeyLeft = zipAllSortedByKeyLeft;
|
|
3639
|
+
exports.zipAllSortedByKeyRight = zipAllSortedByKeyRight;
|
|
3640
|
+
exports.zipAllSortedByKeyWith = zipAllSortedByKeyWith;
|
|
3641
|
+
exports.zipAllWith = zipAllWith;
|
|
3642
|
+
exports.zipFlatten = zipFlatten;
|
|
3643
|
+
exports.zipLatest = zipLatest;
|
|
3644
|
+
exports.zipLatestWith = zipLatestWith;
|
|
3645
|
+
exports.zipLeft = zipLeft;
|
|
3646
|
+
exports.zipRight = zipRight;
|
|
3647
|
+
exports.zipWith = zipWith;
|
|
3648
|
+
exports.zipWithChunks = zipWithChunks;
|
|
3649
|
+
exports.zipWithIndex = zipWithIndex;
|
|
3650
|
+
exports.zipWithNext = zipWithNext;
|
|
3651
|
+
exports.zipWithPrevious = zipWithPrevious;
|
|
3652
|
+
exports.zipWithPreviousAndNext = zipWithPreviousAndNext;
|