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,3478 @@
|
|
|
1
|
+
import * as Boolean from "../Boolean"
|
|
2
|
+
import type * as Cause from "../Cause"
|
|
3
|
+
import * as Chunk from "../Chunk"
|
|
4
|
+
import type * as Clock from "../Clock"
|
|
5
|
+
import type { ConfigProvider } from "../ConfigProvider"
|
|
6
|
+
import * as Context from "../Context"
|
|
7
|
+
import * as Deferred from "../Deferred"
|
|
8
|
+
import type * as Effect from "../Effect"
|
|
9
|
+
import type * as Either from "../Either"
|
|
10
|
+
import * as ExecutionStrategy from "../ExecutionStrategy"
|
|
11
|
+
import type * as Exit from "../Exit"
|
|
12
|
+
import type * as Fiber from "../Fiber"
|
|
13
|
+
import * as FiberId from "../FiberId"
|
|
14
|
+
import type * as FiberRef from "../FiberRef"
|
|
15
|
+
import * as FiberRefs from "../FiberRefs"
|
|
16
|
+
import * as FiberRefsPatch from "../FiberRefsPatch"
|
|
17
|
+
import * as FiberStatus from "../FiberStatus"
|
|
18
|
+
import type { LazyArg } from "../Function"
|
|
19
|
+
import { dual, identity, pipe } from "../Function"
|
|
20
|
+
import * as HashMap from "../HashMap"
|
|
21
|
+
import * as HashSet from "../HashSet"
|
|
22
|
+
import * as _RequestBlock from "../internal/blockedRequests"
|
|
23
|
+
import * as internalCause from "../internal/cause"
|
|
24
|
+
import * as clock from "../internal/clock"
|
|
25
|
+
import { currentRequestMap } from "../internal/completedRequestMap"
|
|
26
|
+
import * as concurrency from "../internal/concurrency"
|
|
27
|
+
import { configProviderTag } from "../internal/configProvider"
|
|
28
|
+
import * as core from "../internal/core"
|
|
29
|
+
import * as internalEffect from "../internal/core-effect"
|
|
30
|
+
import * as defaultServices from "../internal/defaultServices"
|
|
31
|
+
import { consoleTag } from "../internal/defaultServices/console"
|
|
32
|
+
import * as executionStrategy from "../internal/executionStrategy"
|
|
33
|
+
import * as internalFiber from "../internal/fiber"
|
|
34
|
+
import * as FiberMessage from "../internal/fiberMessage"
|
|
35
|
+
import * as fiberRefs from "../internal/fiberRefs"
|
|
36
|
+
import * as fiberScope from "../internal/fiberScope"
|
|
37
|
+
import * as internalLogger from "../internal/logger"
|
|
38
|
+
import * as metric from "../internal/metric"
|
|
39
|
+
import * as metricBoundaries from "../internal/metric/boundaries"
|
|
40
|
+
import * as metricLabel from "../internal/metric/label"
|
|
41
|
+
import * as OpCodes from "../internal/opCodes/effect"
|
|
42
|
+
import { complete } from "../internal/request"
|
|
43
|
+
import * as _runtimeFlags from "../internal/runtimeFlags"
|
|
44
|
+
import { OpSupervision } from "../internal/runtimeFlags"
|
|
45
|
+
import * as supervisor from "../internal/supervisor"
|
|
46
|
+
import * as SupervisorPatch from "../internal/supervisor/patch"
|
|
47
|
+
import * as tracer from "../internal/tracer"
|
|
48
|
+
import type { Logger } from "../Logger"
|
|
49
|
+
import * as LogLevel from "../LogLevel"
|
|
50
|
+
import type * as MetricLabel from "../MetricLabel"
|
|
51
|
+
import * as MRef from "../MutableRef"
|
|
52
|
+
import * as Option from "../Option"
|
|
53
|
+
import { pipeArguments } from "../Pipeable"
|
|
54
|
+
import * as Predicate from "../Predicate"
|
|
55
|
+
import * as RA from "../ReadonlyArray"
|
|
56
|
+
import * as Ref from "../Ref"
|
|
57
|
+
import type { Entry, Request } from "../Request"
|
|
58
|
+
import type * as RequestBlock from "../RequestBlock"
|
|
59
|
+
import type * as RuntimeFlags from "../RuntimeFlags"
|
|
60
|
+
import * as RuntimeFlagsPatch from "../RuntimeFlagsPatch"
|
|
61
|
+
import { currentScheduler, type Scheduler } from "../Scheduler"
|
|
62
|
+
import type * as Scope from "../Scope"
|
|
63
|
+
import type * as Supervisor from "../Supervisor"
|
|
64
|
+
import type * as Tracer from "../Tracer"
|
|
65
|
+
import type { Concurrency } from "../Types"
|
|
66
|
+
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const fiberStarted = metric.counter("effect_fiber_started")
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const fiberActive = metric.counter("effect_fiber_active")
|
|
71
|
+
/** @internal */
|
|
72
|
+
export const fiberSuccesses = metric.counter("effect_fiber_successes")
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const fiberFailures = metric.counter("effect_fiber_failures")
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const fiberLifetimes = metric.tagged(
|
|
77
|
+
metric.histogram(
|
|
78
|
+
"effect_fiber_lifetimes",
|
|
79
|
+
metricBoundaries.exponential({
|
|
80
|
+
start: 1.0,
|
|
81
|
+
factor: 1.3,
|
|
82
|
+
count: 100
|
|
83
|
+
})
|
|
84
|
+
),
|
|
85
|
+
"time_unit",
|
|
86
|
+
"milliseconds"
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
/** @internal */
|
|
90
|
+
type EvaluationSignal =
|
|
91
|
+
| EvaluationSignalContinue
|
|
92
|
+
| EvaluationSignalDone
|
|
93
|
+
| EvaluationSignalYieldNow
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
const EvaluationSignalContinue = "Continue" as const
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
type EvaluationSignalContinue = typeof EvaluationSignalContinue
|
|
100
|
+
|
|
101
|
+
/** @internal */
|
|
102
|
+
const EvaluationSignalDone = "Done" as const
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
type EvaluationSignalDone = typeof EvaluationSignalDone
|
|
106
|
+
|
|
107
|
+
/** @internal */
|
|
108
|
+
const EvaluationSignalYieldNow = "Yield" as const
|
|
109
|
+
|
|
110
|
+
/** @internal */
|
|
111
|
+
type EvaluationSignalYieldNow = typeof EvaluationSignalYieldNow
|
|
112
|
+
|
|
113
|
+
/** @internal */
|
|
114
|
+
export const runtimeFiberVariance = {
|
|
115
|
+
_E: (_: never) => _,
|
|
116
|
+
_A: (_: never) => _
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const absurd = (_: never): never => {
|
|
120
|
+
throw new Error(
|
|
121
|
+
`BUG: FiberRuntime - ${JSON.stringify(_)} - please report an issue at https://github.com/Effect-TS/io/issues`
|
|
122
|
+
)
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const contOpSuccess = {
|
|
126
|
+
[OpCodes.OP_ON_SUCCESS]: (
|
|
127
|
+
_: FiberRuntime<any, any>,
|
|
128
|
+
cont: core.OnSuccess,
|
|
129
|
+
value: unknown
|
|
130
|
+
) => {
|
|
131
|
+
return cont.i1(value)
|
|
132
|
+
},
|
|
133
|
+
["OnStep"]: (
|
|
134
|
+
_: FiberRuntime<any, any>,
|
|
135
|
+
cont: core.OnStep,
|
|
136
|
+
value: unknown
|
|
137
|
+
) => {
|
|
138
|
+
return cont.i1(core.exitSucceed(value))
|
|
139
|
+
},
|
|
140
|
+
[OpCodes.OP_ON_SUCCESS_AND_FAILURE]: (
|
|
141
|
+
_: FiberRuntime<any, any>,
|
|
142
|
+
cont: core.OnSuccessAndFailure,
|
|
143
|
+
value: unknown
|
|
144
|
+
) => {
|
|
145
|
+
return cont.i2(value)
|
|
146
|
+
},
|
|
147
|
+
[OpCodes.OP_REVERT_FLAGS]: (
|
|
148
|
+
self: FiberRuntime<any, any>,
|
|
149
|
+
cont: core.RevertFlags,
|
|
150
|
+
value: unknown
|
|
151
|
+
) => {
|
|
152
|
+
self.patchRuntimeFlags(self._runtimeFlags, cont.patch)
|
|
153
|
+
if (_runtimeFlags.interruptible(self._runtimeFlags) && self.isInterrupted()) {
|
|
154
|
+
return core.exitFailCause(self.getInterruptedCause())
|
|
155
|
+
} else {
|
|
156
|
+
return core.exitSucceed(value)
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
[OpCodes.OP_WHILE]: (
|
|
160
|
+
self: FiberRuntime<any, any>,
|
|
161
|
+
cont: core.While,
|
|
162
|
+
value: unknown
|
|
163
|
+
) => {
|
|
164
|
+
cont.i2(value)
|
|
165
|
+
if (cont.i0()) {
|
|
166
|
+
self.pushStack(cont)
|
|
167
|
+
return cont.i1()
|
|
168
|
+
} else {
|
|
169
|
+
return core.unit
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const drainQueueWhileRunningTable = {
|
|
175
|
+
[FiberMessage.OP_INTERRUPT_SIGNAL]: (
|
|
176
|
+
self: FiberRuntime<any, any>,
|
|
177
|
+
runtimeFlags: RuntimeFlags.RuntimeFlags,
|
|
178
|
+
cur: Effect.Effect<any, any, any>,
|
|
179
|
+
message: FiberMessage.FiberMessage & { _tag: FiberMessage.OP_INTERRUPT_SIGNAL }
|
|
180
|
+
) => {
|
|
181
|
+
self.processNewInterruptSignal(message.cause)
|
|
182
|
+
return _runtimeFlags.interruptible(runtimeFlags) ? core.exitFailCause(message.cause) : cur
|
|
183
|
+
},
|
|
184
|
+
[FiberMessage.OP_RESUME]: (
|
|
185
|
+
_self: FiberRuntime<any, any>,
|
|
186
|
+
_runtimeFlags: RuntimeFlags.RuntimeFlags,
|
|
187
|
+
_cur: Effect.Effect<any, any, any>,
|
|
188
|
+
_message: FiberMessage.FiberMessage
|
|
189
|
+
) => {
|
|
190
|
+
throw new Error("It is illegal to have multiple concurrent run loops in a single fiber")
|
|
191
|
+
},
|
|
192
|
+
[FiberMessage.OP_STATEFUL]: (
|
|
193
|
+
self: FiberRuntime<any, any>,
|
|
194
|
+
runtimeFlags: RuntimeFlags.RuntimeFlags,
|
|
195
|
+
cur: Effect.Effect<any, any, any>,
|
|
196
|
+
message: FiberMessage.FiberMessage & { _tag: FiberMessage.OP_STATEFUL }
|
|
197
|
+
) => {
|
|
198
|
+
message.onFiber(self, FiberStatus.running(runtimeFlags))
|
|
199
|
+
return cur
|
|
200
|
+
},
|
|
201
|
+
[FiberMessage.OP_YIELD_NOW]: (
|
|
202
|
+
_self: FiberRuntime<any, any>,
|
|
203
|
+
_runtimeFlags: RuntimeFlags.RuntimeFlags,
|
|
204
|
+
cur: Effect.Effect<any, any, any>,
|
|
205
|
+
_message: FiberMessage.FiberMessage & { _tag: FiberMessage.OP_YIELD_NOW }
|
|
206
|
+
) => {
|
|
207
|
+
return core.flatMap(core.yieldNow(), () => cur)
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Executes all requests, submitting requests to each data source in parallel.
|
|
213
|
+
*/
|
|
214
|
+
const runBlockedRequests = <R>(self: RequestBlock.RequestBlock<R>) =>
|
|
215
|
+
core.forEachSequentialDiscard(
|
|
216
|
+
_RequestBlock.flatten(self),
|
|
217
|
+
(requestsByRequestResolver) =>
|
|
218
|
+
forEachParUnboundedDiscard(
|
|
219
|
+
_RequestBlock.sequentialCollectionToChunk(requestsByRequestResolver),
|
|
220
|
+
([dataSource, sequential]) => {
|
|
221
|
+
const map = new Map<Request<any, any>, Entry<any>>()
|
|
222
|
+
for (const block of sequential) {
|
|
223
|
+
for (const entry of block) {
|
|
224
|
+
map.set(entry.request as Request<any, any>, entry)
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return core.fiberRefLocally(
|
|
228
|
+
invokeWithInterrupt(dataSource.runAll(sequential), sequential.flat()),
|
|
229
|
+
currentRequestMap,
|
|
230
|
+
map
|
|
231
|
+
)
|
|
232
|
+
},
|
|
233
|
+
false
|
|
234
|
+
)
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
/** @internal */
|
|
238
|
+
export class FiberRuntime<E, A> implements Fiber.RuntimeFiber<E, A> {
|
|
239
|
+
readonly [internalFiber.FiberTypeId] = internalFiber.fiberVariance
|
|
240
|
+
|
|
241
|
+
readonly [internalFiber.RuntimeFiberTypeId] = runtimeFiberVariance
|
|
242
|
+
|
|
243
|
+
pipe() {
|
|
244
|
+
return pipeArguments(this, arguments)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
private _fiberRefs: FiberRefs.FiberRefs
|
|
248
|
+
private _fiberId: FiberId.Runtime
|
|
249
|
+
public _runtimeFlags: RuntimeFlags.RuntimeFlags
|
|
250
|
+
|
|
251
|
+
private _queue = new Array<FiberMessage.FiberMessage>()
|
|
252
|
+
private _children: Set<FiberRuntime<any, any>> | null = null
|
|
253
|
+
private _observers = new Array<(exit: Exit.Exit<E, A>) => void>()
|
|
254
|
+
private _running = false
|
|
255
|
+
private _stack: Array<core.Continuation> = []
|
|
256
|
+
private _asyncInterruptor: ((effect: Effect.Effect<any, any, any>) => any) | null = null
|
|
257
|
+
private _asyncBlockingOn: FiberId.FiberId | null = null
|
|
258
|
+
private _exitValue: Exit.Exit<E, A> | null = null
|
|
259
|
+
private _steps: Array<boolean> = [false]
|
|
260
|
+
public _supervisor: Supervisor.Supervisor<any>
|
|
261
|
+
public _scheduler: Scheduler
|
|
262
|
+
private _tracer: Tracer.Tracer
|
|
263
|
+
public currentOpCount: number = 0
|
|
264
|
+
private isYielding = false
|
|
265
|
+
|
|
266
|
+
constructor(
|
|
267
|
+
fiberId: FiberId.Runtime,
|
|
268
|
+
fiberRefs0: FiberRefs.FiberRefs,
|
|
269
|
+
runtimeFlags0: RuntimeFlags.RuntimeFlags
|
|
270
|
+
) {
|
|
271
|
+
this._runtimeFlags = runtimeFlags0
|
|
272
|
+
this._fiberId = fiberId
|
|
273
|
+
this._fiberRefs = fiberRefs0
|
|
274
|
+
this._supervisor = this.getFiberRef(currentSupervisor)
|
|
275
|
+
this._scheduler = this.getFiberRef(currentScheduler)
|
|
276
|
+
if (_runtimeFlags.runtimeMetrics(runtimeFlags0)) {
|
|
277
|
+
const tags = this.getFiberRef(core.currentMetricLabels)
|
|
278
|
+
fiberStarted.unsafeUpdate(1, tags)
|
|
279
|
+
fiberActive.unsafeUpdate(1, tags)
|
|
280
|
+
}
|
|
281
|
+
this._tracer = Context.get(this.getFiberRef(defaultServices.currentServices), tracer.tracerTag)
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* The identity of the fiber.
|
|
286
|
+
*/
|
|
287
|
+
id(): FiberId.Runtime {
|
|
288
|
+
return this._fiberId
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Begins execution of the effect associated with this fiber on in the
|
|
293
|
+
* background. This can be called to "kick off" execution of a fiber after
|
|
294
|
+
* it has been created.
|
|
295
|
+
*/
|
|
296
|
+
resume<E, A>(effect: Effect.Effect<any, E, A>): void {
|
|
297
|
+
this.tell(FiberMessage.resume(effect))
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* The status of the fiber.
|
|
302
|
+
*/
|
|
303
|
+
status(): Effect.Effect<never, never, FiberStatus.FiberStatus> {
|
|
304
|
+
return this.ask((_, status) => status)
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Gets the fiber runtime flags.
|
|
309
|
+
*/
|
|
310
|
+
runtimeFlags(): Effect.Effect<never, never, RuntimeFlags.RuntimeFlags> {
|
|
311
|
+
return this.ask((state, status) => {
|
|
312
|
+
if (FiberStatus.isDone(status)) {
|
|
313
|
+
return state._runtimeFlags
|
|
314
|
+
}
|
|
315
|
+
return status.runtimeFlags
|
|
316
|
+
})
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Returns the current `FiberScope` for the fiber.
|
|
321
|
+
*/
|
|
322
|
+
scope(): fiberScope.FiberScope {
|
|
323
|
+
return fiberScope.unsafeMake(this)
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Retrieves the immediate children of the fiber.
|
|
328
|
+
*/
|
|
329
|
+
children(): Effect.Effect<never, never, Array<Fiber.RuntimeFiber<any, any>>> {
|
|
330
|
+
return this.ask((fiber) => Array.from(fiber.getChildren()))
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Gets the fiber's set of children.
|
|
335
|
+
*/
|
|
336
|
+
getChildren(): Set<FiberRuntime<any, any>> {
|
|
337
|
+
if (this._children === null) {
|
|
338
|
+
this._children = new Set()
|
|
339
|
+
}
|
|
340
|
+
return this._children
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Retrieves the interrupted cause of the fiber, which will be `Cause.empty`
|
|
345
|
+
* if the fiber has not been interrupted.
|
|
346
|
+
*
|
|
347
|
+
* **NOTE**: This method is safe to invoke on any fiber, but if not invoked
|
|
348
|
+
* on this fiber, then values derived from the fiber's state (including the
|
|
349
|
+
* log annotations and log level) may not be up-to-date.
|
|
350
|
+
*/
|
|
351
|
+
getInterruptedCause() {
|
|
352
|
+
return this.getFiberRef(core.currentInterruptedCause)
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Retrieves the whole set of fiber refs.
|
|
357
|
+
*/
|
|
358
|
+
fiberRefs(): Effect.Effect<never, never, FiberRefs.FiberRefs> {
|
|
359
|
+
return this.ask((fiber) => fiber.getFiberRefs())
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* Returns an effect that will contain information computed from the fiber
|
|
364
|
+
* state and status while running on the fiber.
|
|
365
|
+
*
|
|
366
|
+
* This allows the outside world to interact safely with mutable fiber state
|
|
367
|
+
* without locks or immutable data.
|
|
368
|
+
*/
|
|
369
|
+
ask<Z>(
|
|
370
|
+
f: (runtime: FiberRuntime<any, any>, status: FiberStatus.FiberStatus) => Z
|
|
371
|
+
): Effect.Effect<never, never, Z> {
|
|
372
|
+
return core.suspend(() => {
|
|
373
|
+
const deferred = core.deferredUnsafeMake<never, Z>(this._fiberId)
|
|
374
|
+
this.tell(
|
|
375
|
+
FiberMessage.stateful((fiber, status) => {
|
|
376
|
+
core.deferredUnsafeDone(deferred, core.sync(() => f(fiber, status)))
|
|
377
|
+
})
|
|
378
|
+
)
|
|
379
|
+
return core.deferredAwait(deferred)
|
|
380
|
+
})
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Adds a message to be processed by the fiber on the fiber.
|
|
385
|
+
*/
|
|
386
|
+
tell(message: FiberMessage.FiberMessage): void {
|
|
387
|
+
this._queue.push(message)
|
|
388
|
+
if (!this._running) {
|
|
389
|
+
this._running = true
|
|
390
|
+
this.drainQueueLaterOnExecutor()
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
await(): Effect.Effect<never, never, Exit.Exit<E, A>> {
|
|
395
|
+
return core.async<never, never, Exit.Exit<E, A>>((resume) => {
|
|
396
|
+
const cb = (exit: Exit.Exit<E, A>) => resume(core.succeed(exit))
|
|
397
|
+
this.tell(
|
|
398
|
+
FiberMessage.stateful((fiber, _) => {
|
|
399
|
+
if (fiber._exitValue !== null) {
|
|
400
|
+
cb(this._exitValue!)
|
|
401
|
+
} else {
|
|
402
|
+
fiber.addObserver(cb)
|
|
403
|
+
}
|
|
404
|
+
})
|
|
405
|
+
)
|
|
406
|
+
return core.sync(() =>
|
|
407
|
+
this.tell(
|
|
408
|
+
FiberMessage.stateful((fiber, _) => {
|
|
409
|
+
fiber.removeObserver(cb)
|
|
410
|
+
})
|
|
411
|
+
)
|
|
412
|
+
)
|
|
413
|
+
}, this.id())
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
inheritAll(): Effect.Effect<never, never, void> {
|
|
417
|
+
return core.withFiberRuntime<never, never, void>((parentFiber, parentStatus) => {
|
|
418
|
+
const parentFiberId = parentFiber.id()
|
|
419
|
+
const parentFiberRefs = parentFiber.getFiberRefs()
|
|
420
|
+
const parentRuntimeFlags = parentStatus.runtimeFlags
|
|
421
|
+
const childFiberRefs = this.getFiberRefs()
|
|
422
|
+
const updatedFiberRefs = fiberRefs.joinAs(parentFiberRefs, parentFiberId, childFiberRefs)
|
|
423
|
+
|
|
424
|
+
parentFiber.setFiberRefs(updatedFiberRefs)
|
|
425
|
+
|
|
426
|
+
const updatedRuntimeFlags = parentFiber.getFiberRef(currentRuntimeFlags)
|
|
427
|
+
|
|
428
|
+
const patch = pipe(
|
|
429
|
+
_runtimeFlags.diff(parentRuntimeFlags, updatedRuntimeFlags),
|
|
430
|
+
// Do not inherit WindDown or Interruption!
|
|
431
|
+
RuntimeFlagsPatch.exclude(_runtimeFlags.Interruption),
|
|
432
|
+
RuntimeFlagsPatch.exclude(_runtimeFlags.WindDown)
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
return core.updateRuntimeFlags(patch)
|
|
436
|
+
})
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/**
|
|
440
|
+
* Tentatively observes the fiber, but returns immediately if it is not
|
|
441
|
+
* already done.
|
|
442
|
+
*/
|
|
443
|
+
poll(): Effect.Effect<never, never, Option.Option<Exit.Exit<E, A>>> {
|
|
444
|
+
return core.sync(() => Option.fromNullable(this._exitValue))
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Unsafely observes the fiber, but returns immediately if it is not
|
|
449
|
+
* already done.
|
|
450
|
+
*/
|
|
451
|
+
unsafePoll(): Exit.Exit<E, A> | null {
|
|
452
|
+
return this._exitValue
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* In the background, interrupts the fiber as if interrupted from the specified fiber.
|
|
457
|
+
*/
|
|
458
|
+
interruptAsFork(fiberId: FiberId.FiberId): Effect.Effect<never, never, void> {
|
|
459
|
+
return core.sync(() => this.tell(FiberMessage.interruptSignal(internalCause.interrupt(fiberId))))
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/**
|
|
463
|
+
* Adds an observer to the list of observers.
|
|
464
|
+
*
|
|
465
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
466
|
+
*/
|
|
467
|
+
addObserver(observer: (exit: Exit.Exit<E, A>) => void): void {
|
|
468
|
+
if (this._exitValue !== null) {
|
|
469
|
+
observer(this._exitValue!)
|
|
470
|
+
} else {
|
|
471
|
+
this._observers.push(observer)
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Removes the specified observer from the list of observers that will be
|
|
477
|
+
* notified when the fiber exits.
|
|
478
|
+
*
|
|
479
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
480
|
+
*/
|
|
481
|
+
removeObserver(observer: (exit: Exit.Exit<E, A>) => void): void {
|
|
482
|
+
this._observers = this._observers.filter((o) => o !== observer)
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Retrieves all fiber refs of the fiber.
|
|
486
|
+
*
|
|
487
|
+
* **NOTE**: This method is safe to invoke on any fiber, but if not invoked
|
|
488
|
+
* on this fiber, then values derived from the fiber's state (including the
|
|
489
|
+
* log annotations and log level) may not be up-to-date.
|
|
490
|
+
*/
|
|
491
|
+
getFiberRefs(): FiberRefs.FiberRefs {
|
|
492
|
+
this.setFiberRef(currentRuntimeFlags, this._runtimeFlags)
|
|
493
|
+
return this._fiberRefs
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* Deletes the specified fiber ref.
|
|
498
|
+
*
|
|
499
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
500
|
+
*/
|
|
501
|
+
unsafeDeleteFiberRef<X>(fiberRef: FiberRef.FiberRef<X>): void {
|
|
502
|
+
this._fiberRefs = fiberRefs.delete_(this._fiberRefs, fiberRef)
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Retrieves the state of the fiber ref, or else its initial value.
|
|
507
|
+
*
|
|
508
|
+
* **NOTE**: This method is safe to invoke on any fiber, but if not invoked
|
|
509
|
+
* on this fiber, then values derived from the fiber's state (including the
|
|
510
|
+
* log annotations and log level) may not be up-to-date.
|
|
511
|
+
*/
|
|
512
|
+
getFiberRef<X>(fiberRef: FiberRef.FiberRef<X>): X {
|
|
513
|
+
if (this._fiberRefs.locals.has(fiberRef)) {
|
|
514
|
+
return this._fiberRefs.locals.get(fiberRef)![0][1] as X
|
|
515
|
+
}
|
|
516
|
+
return fiberRef.initial
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
/**
|
|
520
|
+
* Sets the fiber ref to the specified value.
|
|
521
|
+
*
|
|
522
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
523
|
+
*/
|
|
524
|
+
setFiberRef<X>(fiberRef: FiberRef.FiberRef<X>, value: X): void {
|
|
525
|
+
this._fiberRefs = fiberRefs.updatedAs(this._fiberRefs, {
|
|
526
|
+
fiberId: this._fiberId,
|
|
527
|
+
fiberRef,
|
|
528
|
+
value
|
|
529
|
+
})
|
|
530
|
+
this.refreshRefCache()
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
refreshRefCache() {
|
|
534
|
+
this._tracer = Context.get(this.getFiberRef(defaultServices.currentServices), tracer.tracerTag)
|
|
535
|
+
this._supervisor = this.getFiberRef(currentSupervisor)
|
|
536
|
+
this._scheduler = this.getFiberRef(currentScheduler)
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Wholesale replaces all fiber refs of this fiber.
|
|
541
|
+
*
|
|
542
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
543
|
+
*/
|
|
544
|
+
setFiberRefs(fiberRefs: FiberRefs.FiberRefs): void {
|
|
545
|
+
this._fiberRefs = fiberRefs
|
|
546
|
+
this.refreshRefCache()
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Adds a reference to the specified fiber inside the children set.
|
|
551
|
+
*
|
|
552
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
553
|
+
*/
|
|
554
|
+
addChild(child: FiberRuntime<any, any>) {
|
|
555
|
+
this.getChildren().add(child)
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/**
|
|
559
|
+
* Removes a reference to the specified fiber inside the children set.
|
|
560
|
+
*
|
|
561
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
562
|
+
*/
|
|
563
|
+
removeChild(child: FiberRuntime<any, any>) {
|
|
564
|
+
this.getChildren().delete(child)
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
/**
|
|
568
|
+
* On the current thread, executes all messages in the fiber's inbox. This
|
|
569
|
+
* method may return before all work is done, in the event the fiber executes
|
|
570
|
+
* an asynchronous operation.
|
|
571
|
+
*
|
|
572
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
573
|
+
*/
|
|
574
|
+
drainQueueOnCurrentThread() {
|
|
575
|
+
let recurse = true
|
|
576
|
+
while (recurse) {
|
|
577
|
+
let evaluationSignal: EvaluationSignal = EvaluationSignalContinue
|
|
578
|
+
const prev = (globalThis as any)[internalFiber.currentFiberURI]
|
|
579
|
+
;(globalThis as any)[internalFiber.currentFiberURI] = this
|
|
580
|
+
try {
|
|
581
|
+
while (evaluationSignal === EvaluationSignalContinue) {
|
|
582
|
+
evaluationSignal = this._queue.length === 0 ?
|
|
583
|
+
EvaluationSignalDone :
|
|
584
|
+
this.evaluateMessageWhileSuspended(this._queue.splice(0, 1)[0]!)
|
|
585
|
+
}
|
|
586
|
+
} finally {
|
|
587
|
+
this._running = false
|
|
588
|
+
;(globalThis as any)[internalFiber.currentFiberURI] = prev
|
|
589
|
+
}
|
|
590
|
+
// Maybe someone added something to the queue between us checking, and us
|
|
591
|
+
// giving up the drain. If so, we need to restart the draining, but only
|
|
592
|
+
// if we beat everyone else to the restart:
|
|
593
|
+
if (this._queue.length > 0 && !this._running) {
|
|
594
|
+
this._running = true
|
|
595
|
+
if (evaluationSignal === EvaluationSignalYieldNow) {
|
|
596
|
+
this.drainQueueLaterOnExecutor()
|
|
597
|
+
recurse = false
|
|
598
|
+
} else {
|
|
599
|
+
recurse = true
|
|
600
|
+
}
|
|
601
|
+
} else {
|
|
602
|
+
recurse = false
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Schedules the execution of all messages in the fiber's inbox.
|
|
609
|
+
*
|
|
610
|
+
* This method will return immediately after the scheduling
|
|
611
|
+
* operation is completed, but potentially before such messages have been
|
|
612
|
+
* executed.
|
|
613
|
+
*
|
|
614
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
615
|
+
*/
|
|
616
|
+
drainQueueLaterOnExecutor() {
|
|
617
|
+
this._scheduler.scheduleTask(
|
|
618
|
+
this.run,
|
|
619
|
+
this.getFiberRef(core.currentSchedulingPriority)
|
|
620
|
+
)
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Drains the fiber's message queue while the fiber is actively running,
|
|
625
|
+
* returning the next effect to execute, which may be the input effect if no
|
|
626
|
+
* additional effect needs to be executed.
|
|
627
|
+
*
|
|
628
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
629
|
+
*/
|
|
630
|
+
drainQueueWhileRunning(
|
|
631
|
+
runtimeFlags: RuntimeFlags.RuntimeFlags,
|
|
632
|
+
cur0: Effect.Effect<any, any, any>
|
|
633
|
+
) {
|
|
634
|
+
let cur = cur0
|
|
635
|
+
while (this._queue.length > 0) {
|
|
636
|
+
const message = this._queue.splice(0, 1)[0]
|
|
637
|
+
// @ts-expect-error
|
|
638
|
+
cur = drainQueueWhileRunningTable[message._tag](this, runtimeFlags, cur, message)
|
|
639
|
+
}
|
|
640
|
+
return cur
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Determines if the fiber is interrupted.
|
|
645
|
+
*
|
|
646
|
+
* **NOTE**: This method is safe to invoke on any fiber, but if not invoked
|
|
647
|
+
* on this fiber, then values derived from the fiber's state (including the
|
|
648
|
+
* log annotations and log level) may not be up-to-date.
|
|
649
|
+
*/
|
|
650
|
+
isInterrupted(): boolean {
|
|
651
|
+
return !internalCause.isEmpty(this.getFiberRef(core.currentInterruptedCause))
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
/**
|
|
655
|
+
* Adds an interruptor to the set of interruptors that are interrupting this
|
|
656
|
+
* fiber.
|
|
657
|
+
*
|
|
658
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
659
|
+
*/
|
|
660
|
+
addInterruptedCause(cause: Cause.Cause<never>) {
|
|
661
|
+
const oldSC = this.getFiberRef(core.currentInterruptedCause)
|
|
662
|
+
this.setFiberRef(core.currentInterruptedCause, internalCause.sequential(oldSC, cause))
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* Processes a new incoming interrupt signal.
|
|
667
|
+
*
|
|
668
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
669
|
+
*/
|
|
670
|
+
processNewInterruptSignal(cause: Cause.Cause<never>): void {
|
|
671
|
+
this.addInterruptedCause(cause)
|
|
672
|
+
this.sendInterruptSignalToAllChildren()
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
/**
|
|
676
|
+
* Interrupts all children of the current fiber, returning an effect that will
|
|
677
|
+
* await the exit of the children. This method will return null if the fiber
|
|
678
|
+
* has no children.
|
|
679
|
+
*
|
|
680
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
681
|
+
*/
|
|
682
|
+
sendInterruptSignalToAllChildren(): boolean {
|
|
683
|
+
if (this._children === null || this._children.size === 0) {
|
|
684
|
+
return false
|
|
685
|
+
}
|
|
686
|
+
let told = false
|
|
687
|
+
for (const child of this._children) {
|
|
688
|
+
child.tell(FiberMessage.interruptSignal(internalCause.interrupt(this.id())))
|
|
689
|
+
told = true
|
|
690
|
+
}
|
|
691
|
+
return told
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* Interrupts all children of the current fiber, returning an effect that will
|
|
696
|
+
* await the exit of the children. This method will return null if the fiber
|
|
697
|
+
* has no children.
|
|
698
|
+
*
|
|
699
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
700
|
+
*/
|
|
701
|
+
interruptAllChildren() {
|
|
702
|
+
if (this.sendInterruptSignalToAllChildren()) {
|
|
703
|
+
const it = this._children!.values()
|
|
704
|
+
this._children = null
|
|
705
|
+
let isDone = false
|
|
706
|
+
const body = () => {
|
|
707
|
+
const next = it.next()
|
|
708
|
+
if (!next.done) {
|
|
709
|
+
return core.asUnit(next.value.await())
|
|
710
|
+
} else {
|
|
711
|
+
return core.sync(() => {
|
|
712
|
+
isDone = true
|
|
713
|
+
})
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
return core.whileLoop({
|
|
717
|
+
while: () => !isDone,
|
|
718
|
+
body,
|
|
719
|
+
step: () => {
|
|
720
|
+
//
|
|
721
|
+
}
|
|
722
|
+
})
|
|
723
|
+
}
|
|
724
|
+
return null
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
reportExitValue(exit: Exit.Exit<E, A>) {
|
|
728
|
+
if (_runtimeFlags.runtimeMetrics(this._runtimeFlags)) {
|
|
729
|
+
const tags = this.getFiberRef(core.currentMetricLabels)
|
|
730
|
+
fiberActive.unsafeUpdate(-1, tags)
|
|
731
|
+
switch (exit._tag) {
|
|
732
|
+
case OpCodes.OP_SUCCESS: {
|
|
733
|
+
fiberSuccesses.unsafeUpdate(1, tags)
|
|
734
|
+
break
|
|
735
|
+
}
|
|
736
|
+
case OpCodes.OP_FAILURE: {
|
|
737
|
+
fiberFailures.unsafeUpdate(1, tags)
|
|
738
|
+
break
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
if (exit._tag === "Failure") {
|
|
743
|
+
const level = this.getFiberRef(core.currentUnhandledErrorLogLevel)
|
|
744
|
+
if (!internalCause.isInterruptedOnly(exit.cause) && level._tag === "Some") {
|
|
745
|
+
this.log("Fiber terminated with a non handled error", exit.cause, level)
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
setExitValue(exit: Exit.Exit<E, A>) {
|
|
751
|
+
this._exitValue = exit
|
|
752
|
+
|
|
753
|
+
if (_runtimeFlags.runtimeMetrics(this._runtimeFlags)) {
|
|
754
|
+
const tags = this.getFiberRef(core.currentMetricLabels)
|
|
755
|
+
const startTimeMillis = this.id().startTimeMillis
|
|
756
|
+
const endTimeMillis = new Date().getTime()
|
|
757
|
+
fiberLifetimes.unsafeUpdate(endTimeMillis - startTimeMillis, tags)
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
this.reportExitValue(exit)
|
|
761
|
+
|
|
762
|
+
for (let i = this._observers.length - 1; i >= 0; i--) {
|
|
763
|
+
this._observers[i](exit)
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
getLoggers() {
|
|
768
|
+
return this.getFiberRef(currentLoggers)
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
log(
|
|
772
|
+
message: unknown,
|
|
773
|
+
cause: Cause.Cause<any>,
|
|
774
|
+
overrideLogLevel: Option.Option<LogLevel.LogLevel>
|
|
775
|
+
): void {
|
|
776
|
+
const logLevel = Option.isSome(overrideLogLevel) ?
|
|
777
|
+
overrideLogLevel.value :
|
|
778
|
+
this.getFiberRef(core.currentLogLevel)
|
|
779
|
+
const minimumLogLevel = this.getFiberRef(currentMinimumLogLevel)
|
|
780
|
+
if (LogLevel.greaterThan(minimumLogLevel, logLevel)) {
|
|
781
|
+
return
|
|
782
|
+
}
|
|
783
|
+
const spans = this.getFiberRef(core.currentLogSpan)
|
|
784
|
+
const annotations = this.getFiberRef(core.currentLogAnnotations)
|
|
785
|
+
const loggers = this.getLoggers()
|
|
786
|
+
const contextMap = this.getFiberRefs()
|
|
787
|
+
if (HashSet.size(loggers) > 0) {
|
|
788
|
+
const clockService = Context.get(this.getFiberRef(defaultServices.currentServices), clock.clockTag)
|
|
789
|
+
const date = new Date(clockService.unsafeCurrentTimeMillis())
|
|
790
|
+
for (const logger of loggers) {
|
|
791
|
+
logger.log({
|
|
792
|
+
fiberId: this.id(),
|
|
793
|
+
logLevel,
|
|
794
|
+
message,
|
|
795
|
+
cause,
|
|
796
|
+
context: contextMap,
|
|
797
|
+
spans,
|
|
798
|
+
annotations,
|
|
799
|
+
date
|
|
800
|
+
})
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* Evaluates a single message on the current thread, while the fiber is
|
|
807
|
+
* suspended. This method should only be called while evaluation of the
|
|
808
|
+
* fiber's effect is suspended due to an asynchronous operation.
|
|
809
|
+
*
|
|
810
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
811
|
+
*/
|
|
812
|
+
evaluateMessageWhileSuspended(message: FiberMessage.FiberMessage): EvaluationSignal {
|
|
813
|
+
switch (message._tag) {
|
|
814
|
+
case FiberMessage.OP_YIELD_NOW: {
|
|
815
|
+
return EvaluationSignalYieldNow
|
|
816
|
+
}
|
|
817
|
+
case FiberMessage.OP_INTERRUPT_SIGNAL: {
|
|
818
|
+
this.processNewInterruptSignal(message.cause)
|
|
819
|
+
if (this._asyncInterruptor !== null) {
|
|
820
|
+
this._asyncInterruptor(core.exitFailCause(message.cause))
|
|
821
|
+
this._asyncInterruptor = null
|
|
822
|
+
}
|
|
823
|
+
return EvaluationSignalContinue
|
|
824
|
+
}
|
|
825
|
+
case FiberMessage.OP_RESUME: {
|
|
826
|
+
this._asyncInterruptor = null
|
|
827
|
+
this._asyncBlockingOn = null
|
|
828
|
+
this.evaluateEffect(message.effect)
|
|
829
|
+
return EvaluationSignalContinue
|
|
830
|
+
}
|
|
831
|
+
case FiberMessage.OP_STATEFUL: {
|
|
832
|
+
message.onFiber(
|
|
833
|
+
this,
|
|
834
|
+
this._exitValue !== null ?
|
|
835
|
+
FiberStatus.done :
|
|
836
|
+
FiberStatus.suspended(this._runtimeFlags, this._asyncBlockingOn!)
|
|
837
|
+
)
|
|
838
|
+
return EvaluationSignalContinue
|
|
839
|
+
}
|
|
840
|
+
default: {
|
|
841
|
+
return absurd(message)
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* Evaluates an effect until completion, potentially asynchronously.
|
|
848
|
+
*
|
|
849
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
850
|
+
*/
|
|
851
|
+
evaluateEffect(effect0: Effect.Effect<any, any, any>) {
|
|
852
|
+
this._supervisor.onResume(this)
|
|
853
|
+
try {
|
|
854
|
+
let effect: Effect.Effect<any, any, any> | null =
|
|
855
|
+
_runtimeFlags.interruptible(this._runtimeFlags) && this.isInterrupted() ?
|
|
856
|
+
core.exitFailCause(this.getInterruptedCause()) :
|
|
857
|
+
effect0
|
|
858
|
+
while (effect !== null) {
|
|
859
|
+
try {
|
|
860
|
+
const eff: Effect.Effect<any, any, any> = effect
|
|
861
|
+
const exit = this.runLoop(eff)
|
|
862
|
+
this._runtimeFlags = pipe(this._runtimeFlags, _runtimeFlags.enable(_runtimeFlags.WindDown))
|
|
863
|
+
const interruption = this.interruptAllChildren()
|
|
864
|
+
if (interruption !== null) {
|
|
865
|
+
effect = core.flatMap(interruption, () => exit)
|
|
866
|
+
} else {
|
|
867
|
+
if (this._queue.length === 0) {
|
|
868
|
+
// No more messages to process, so we will allow the fiber to end life:
|
|
869
|
+
this.setExitValue(exit)
|
|
870
|
+
} else {
|
|
871
|
+
// There are messages, possibly added by the final op executed by
|
|
872
|
+
// the fiber. To be safe, we should execute those now before we
|
|
873
|
+
// allow the fiber to end life:
|
|
874
|
+
this.tell(FiberMessage.resume(exit))
|
|
875
|
+
}
|
|
876
|
+
effect = null
|
|
877
|
+
}
|
|
878
|
+
} catch (e) {
|
|
879
|
+
if (core.isEffect(e)) {
|
|
880
|
+
if ((e as core.Primitive)._op === OpCodes.OP_YIELD) {
|
|
881
|
+
if (_runtimeFlags.cooperativeYielding(this._runtimeFlags)) {
|
|
882
|
+
this.tell(FiberMessage.yieldNow())
|
|
883
|
+
this.tell(FiberMessage.resume(core.exitUnit))
|
|
884
|
+
effect = null
|
|
885
|
+
} else {
|
|
886
|
+
effect = core.exitUnit
|
|
887
|
+
}
|
|
888
|
+
} else if ((e as core.Primitive)._op === OpCodes.OP_ASYNC) {
|
|
889
|
+
// Terminate this evaluation, async resumption will continue evaluation:
|
|
890
|
+
effect = null
|
|
891
|
+
}
|
|
892
|
+
} else {
|
|
893
|
+
throw e
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
} finally {
|
|
898
|
+
this._supervisor.onSuspend(this)
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/**
|
|
903
|
+
* Begins execution of the effect associated with this fiber on the current
|
|
904
|
+
* thread. This can be called to "kick off" execution of a fiber after it has
|
|
905
|
+
* been created, in hopes that the effect can be executed synchronously.
|
|
906
|
+
*
|
|
907
|
+
* This is not the normal way of starting a fiber, but it is useful when the
|
|
908
|
+
* express goal of executing the fiber is to synchronously produce its exit.
|
|
909
|
+
*/
|
|
910
|
+
start<R>(effect: Effect.Effect<R, E, A>): void {
|
|
911
|
+
if (!this._running) {
|
|
912
|
+
this._running = true
|
|
913
|
+
const prev = (globalThis as any)[internalFiber.currentFiberURI]
|
|
914
|
+
;(globalThis as any)[internalFiber.currentFiberURI] = this
|
|
915
|
+
try {
|
|
916
|
+
this.evaluateEffect(effect)
|
|
917
|
+
} finally {
|
|
918
|
+
this._running = false
|
|
919
|
+
;(globalThis as any)[internalFiber.currentFiberURI] = prev
|
|
920
|
+
// Because we're special casing `start`, we have to be responsible
|
|
921
|
+
// for spinning up the fiber if there were new messages added to
|
|
922
|
+
// the queue between the completion of the effect and the transition
|
|
923
|
+
// to the not running state.
|
|
924
|
+
if (this._queue.length > 0) {
|
|
925
|
+
this.drainQueueLaterOnExecutor()
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
} else {
|
|
929
|
+
this.tell(FiberMessage.resume(effect))
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Begins execution of the effect associated with this fiber on in the
|
|
935
|
+
* background, and on the correct thread pool. This can be called to "kick
|
|
936
|
+
* off" execution of a fiber after it has been created, in hopes that the
|
|
937
|
+
* effect can be executed synchronously.
|
|
938
|
+
*/
|
|
939
|
+
startFork<R>(effect: Effect.Effect<R, E, A>): void {
|
|
940
|
+
this.tell(FiberMessage.resume(effect))
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
/**
|
|
944
|
+
* Takes the current runtime flags, patches them to return the new runtime
|
|
945
|
+
* flags, and then makes any changes necessary to fiber state based on the
|
|
946
|
+
* specified patch.
|
|
947
|
+
*
|
|
948
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
949
|
+
*/
|
|
950
|
+
patchRuntimeFlags(oldRuntimeFlags: RuntimeFlags.RuntimeFlags, patch: RuntimeFlagsPatch.RuntimeFlagsPatch) {
|
|
951
|
+
const newRuntimeFlags = _runtimeFlags.patch(oldRuntimeFlags, patch)
|
|
952
|
+
;(globalThis as any)[internalFiber.currentFiberURI] = this
|
|
953
|
+
this._runtimeFlags = newRuntimeFlags
|
|
954
|
+
return newRuntimeFlags
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Initiates an asynchronous operation, by building a callback that will
|
|
959
|
+
* resume execution, and then feeding that callback to the registration
|
|
960
|
+
* function, handling error cases and repeated resumptions appropriately.
|
|
961
|
+
*
|
|
962
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
963
|
+
*/
|
|
964
|
+
initiateAsync(
|
|
965
|
+
runtimeFlags: RuntimeFlags.RuntimeFlags,
|
|
966
|
+
asyncRegister: (resume: (effect: Effect.Effect<any, any, any>) => void) => void
|
|
967
|
+
) {
|
|
968
|
+
let alreadyCalled = false
|
|
969
|
+
const callback = (effect: Effect.Effect<any, any, any>) => {
|
|
970
|
+
if (!alreadyCalled) {
|
|
971
|
+
alreadyCalled = true
|
|
972
|
+
this.tell(FiberMessage.resume(effect))
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
if (_runtimeFlags.interruptible(runtimeFlags)) {
|
|
976
|
+
this._asyncInterruptor = callback
|
|
977
|
+
}
|
|
978
|
+
try {
|
|
979
|
+
asyncRegister(callback)
|
|
980
|
+
} catch (e) {
|
|
981
|
+
callback(core.failCause(internalCause.die(e)))
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
pushStack(cont: core.Continuation) {
|
|
986
|
+
this._stack.push(cont)
|
|
987
|
+
if (cont._op === "OnStep") {
|
|
988
|
+
this._steps.push(true)
|
|
989
|
+
}
|
|
990
|
+
if (cont._op === "RevertFlags") {
|
|
991
|
+
this._steps.push(false)
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
popStack() {
|
|
996
|
+
const item = this._stack.pop()
|
|
997
|
+
if (item) {
|
|
998
|
+
if (item._op === "OnStep" || item._op === "RevertFlags") {
|
|
999
|
+
this._steps.pop()
|
|
1000
|
+
}
|
|
1001
|
+
return item
|
|
1002
|
+
}
|
|
1003
|
+
return
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
getNextSuccessCont() {
|
|
1007
|
+
let frame = this.popStack()
|
|
1008
|
+
while (frame) {
|
|
1009
|
+
if (frame._op !== OpCodes.OP_ON_FAILURE) {
|
|
1010
|
+
return frame
|
|
1011
|
+
}
|
|
1012
|
+
frame = this.popStack()
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
getNextFailCont() {
|
|
1017
|
+
let frame = this.popStack()
|
|
1018
|
+
while (frame) {
|
|
1019
|
+
if (frame._op !== OpCodes.OP_ON_SUCCESS && frame._op !== OpCodes.OP_WHILE) {
|
|
1020
|
+
return frame
|
|
1021
|
+
}
|
|
1022
|
+
frame = this.popStack()
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
[OpCodes.OP_TAG](op: core.Primitive & { _op: OpCodes.OP_SYNC }) {
|
|
1027
|
+
return core.map(
|
|
1028
|
+
core.fiberRefGet(core.currentContext),
|
|
1029
|
+
(context) => {
|
|
1030
|
+
try {
|
|
1031
|
+
return Context.unsafeGet(context, op as unknown as Context.Tag<any, any>)
|
|
1032
|
+
} catch (e) {
|
|
1033
|
+
console.log(e)
|
|
1034
|
+
throw e
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
)
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
["Left"](op: core.Primitive & { _op: "Left" }) {
|
|
1041
|
+
return core.fail(op.left)
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
["None"](_: core.Primitive & { _op: "None" }) {
|
|
1045
|
+
return core.fail(internalCause.NoSuchElementException())
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
["Right"](op: core.Primitive & { _op: "Right" }) {
|
|
1049
|
+
return core.exitSucceed(op.right)
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
["Some"](op: core.Primitive & { _op: "Some" }) {
|
|
1053
|
+
return core.exitSucceed(op.value)
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
[OpCodes.OP_SYNC](op: core.Primitive & { _op: OpCodes.OP_SYNC }) {
|
|
1057
|
+
const value = op.i0()
|
|
1058
|
+
const cont = this.getNextSuccessCont()
|
|
1059
|
+
if (cont !== undefined) {
|
|
1060
|
+
if (!(cont._op in contOpSuccess)) {
|
|
1061
|
+
// @ts-expect-error
|
|
1062
|
+
absurd(cont)
|
|
1063
|
+
}
|
|
1064
|
+
// @ts-expect-error
|
|
1065
|
+
return contOpSuccess[cont._op](this, cont, value)
|
|
1066
|
+
} else {
|
|
1067
|
+
throw core.exitSucceed(value)
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
[OpCodes.OP_SUCCESS](op: core.Primitive & { _op: OpCodes.OP_SUCCESS }) {
|
|
1072
|
+
const oldCur = op
|
|
1073
|
+
const cont = this.getNextSuccessCont()
|
|
1074
|
+
if (cont !== undefined) {
|
|
1075
|
+
if (!(cont._op in contOpSuccess)) {
|
|
1076
|
+
// @ts-expect-error
|
|
1077
|
+
absurd(cont)
|
|
1078
|
+
}
|
|
1079
|
+
// @ts-expect-error
|
|
1080
|
+
return contOpSuccess[cont._op](this, cont, oldCur.i0)
|
|
1081
|
+
} else {
|
|
1082
|
+
throw oldCur
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
[OpCodes.OP_FAILURE](op: core.Primitive & { _op: OpCodes.OP_FAILURE }) {
|
|
1087
|
+
const cause = op.i0
|
|
1088
|
+
const cont = this.getNextFailCont()
|
|
1089
|
+
if (cont !== undefined) {
|
|
1090
|
+
switch (cont._op) {
|
|
1091
|
+
case OpCodes.OP_ON_FAILURE:
|
|
1092
|
+
case OpCodes.OP_ON_SUCCESS_AND_FAILURE: {
|
|
1093
|
+
if (!(_runtimeFlags.interruptible(this._runtimeFlags) && this.isInterrupted())) {
|
|
1094
|
+
return cont.i1(cause)
|
|
1095
|
+
} else {
|
|
1096
|
+
return core.exitFailCause(internalCause.stripFailures(cause))
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
case "OnStep": {
|
|
1100
|
+
if (!(_runtimeFlags.interruptible(this._runtimeFlags) && this.isInterrupted())) {
|
|
1101
|
+
return cont.i1(core.exitFailCause(cause))
|
|
1102
|
+
} else {
|
|
1103
|
+
return core.exitFailCause(internalCause.stripFailures(cause))
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
case OpCodes.OP_REVERT_FLAGS: {
|
|
1107
|
+
this.patchRuntimeFlags(this._runtimeFlags, cont.patch)
|
|
1108
|
+
if (_runtimeFlags.interruptible(this._runtimeFlags) && this.isInterrupted()) {
|
|
1109
|
+
return core.exitFailCause(internalCause.sequential(cause, this.getInterruptedCause()))
|
|
1110
|
+
} else {
|
|
1111
|
+
return core.exitFailCause(cause)
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
default: {
|
|
1115
|
+
absurd(cont)
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
} else {
|
|
1119
|
+
throw core.exitFailCause(cause)
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
[OpCodes.OP_WITH_RUNTIME](op: core.Primitive & { _op: OpCodes.OP_WITH_RUNTIME }) {
|
|
1124
|
+
return op.i0(
|
|
1125
|
+
this as FiberRuntime<unknown, unknown>,
|
|
1126
|
+
FiberStatus.running(this._runtimeFlags) as FiberStatus.Running
|
|
1127
|
+
)
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
["Blocked"](op: core.Primitive & { _op: "Blocked" }) {
|
|
1131
|
+
if (this._steps[this._steps.length - 1]) {
|
|
1132
|
+
const nextOp = this.popStack()
|
|
1133
|
+
if (nextOp) {
|
|
1134
|
+
switch (nextOp._op) {
|
|
1135
|
+
case "OnStep": {
|
|
1136
|
+
return nextOp.i1(op)
|
|
1137
|
+
}
|
|
1138
|
+
case "OnSuccess": {
|
|
1139
|
+
return core.blocked(op.i0, core.flatMap(op.i1, nextOp.i1))
|
|
1140
|
+
}
|
|
1141
|
+
case "OnSuccessAndFailure": {
|
|
1142
|
+
return core.blocked(
|
|
1143
|
+
op.i0,
|
|
1144
|
+
core.matchCauseEffect(op.i1, {
|
|
1145
|
+
onFailure: nextOp.i1,
|
|
1146
|
+
onSuccess: nextOp.i2
|
|
1147
|
+
})
|
|
1148
|
+
)
|
|
1149
|
+
}
|
|
1150
|
+
case "OnFailure": {
|
|
1151
|
+
return core.blocked(op.i0, core.catchAllCause(op.i1, nextOp.i1))
|
|
1152
|
+
}
|
|
1153
|
+
case "While": {
|
|
1154
|
+
return core.blocked(
|
|
1155
|
+
op.i0,
|
|
1156
|
+
core.flatMap(op.i1, (a) => {
|
|
1157
|
+
nextOp.i2(a)
|
|
1158
|
+
if (nextOp.i0()) {
|
|
1159
|
+
return core.whileLoop({
|
|
1160
|
+
while: nextOp.i0,
|
|
1161
|
+
body: nextOp.i1,
|
|
1162
|
+
step: nextOp.i2
|
|
1163
|
+
})
|
|
1164
|
+
}
|
|
1165
|
+
return core.unit
|
|
1166
|
+
})
|
|
1167
|
+
)
|
|
1168
|
+
}
|
|
1169
|
+
case "RevertFlags": {
|
|
1170
|
+
this.pushStack(nextOp)
|
|
1171
|
+
break
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
return core.uninterruptibleMask((restore) =>
|
|
1177
|
+
core.flatMap(
|
|
1178
|
+
fork(core.runRequestBlock(op.i0)),
|
|
1179
|
+
() => restore(op.i1)
|
|
1180
|
+
)
|
|
1181
|
+
)
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
["RunBlocked"](op: core.Primitive & { _op: "RunBlocked" }) {
|
|
1185
|
+
return runBlockedRequests(op.i0)
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
[OpCodes.OP_UPDATE_RUNTIME_FLAGS](op: core.Primitive & { _op: OpCodes.OP_UPDATE_RUNTIME_FLAGS }) {
|
|
1189
|
+
const updateFlags = op.i0
|
|
1190
|
+
const oldRuntimeFlags = this._runtimeFlags
|
|
1191
|
+
const newRuntimeFlags = _runtimeFlags.patch(oldRuntimeFlags, updateFlags)
|
|
1192
|
+
// One more chance to short circuit: if we're immediately going
|
|
1193
|
+
// to interrupt. Interruption will cause immediate reversion of
|
|
1194
|
+
// the flag, so as long as we "peek ahead", there's no need to
|
|
1195
|
+
// set them to begin with.
|
|
1196
|
+
if (_runtimeFlags.interruptible(newRuntimeFlags) && this.isInterrupted()) {
|
|
1197
|
+
return core.exitFailCause(this.getInterruptedCause())
|
|
1198
|
+
} else {
|
|
1199
|
+
// Impossible to short circuit, so record the changes
|
|
1200
|
+
this.patchRuntimeFlags(this._runtimeFlags, updateFlags)
|
|
1201
|
+
if (op.i1) {
|
|
1202
|
+
// Since we updated the flags, we need to revert them
|
|
1203
|
+
const revertFlags = _runtimeFlags.diff(newRuntimeFlags, oldRuntimeFlags)
|
|
1204
|
+
this.pushStack(new core.RevertFlags(revertFlags, op))
|
|
1205
|
+
return op.i1(oldRuntimeFlags)
|
|
1206
|
+
} else {
|
|
1207
|
+
return core.exitUnit
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
[OpCodes.OP_ON_SUCCESS](op: core.Primitive & { _op: OpCodes.OP_ON_SUCCESS }) {
|
|
1213
|
+
this.pushStack(op)
|
|
1214
|
+
return op.i0
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
["OnStep"](op: core.Primitive & { _op: "OnStep" }) {
|
|
1218
|
+
this.pushStack(op)
|
|
1219
|
+
return op.i0
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
[OpCodes.OP_ON_FAILURE](op: core.Primitive & { _op: OpCodes.OP_ON_FAILURE }) {
|
|
1223
|
+
this.pushStack(op)
|
|
1224
|
+
return op.i0
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
[OpCodes.OP_ON_SUCCESS_AND_FAILURE](op: core.Primitive & { _op: OpCodes.OP_ON_SUCCESS_AND_FAILURE }) {
|
|
1228
|
+
this.pushStack(op)
|
|
1229
|
+
return op.i0
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
[OpCodes.OP_ASYNC](op: core.Primitive & { _op: OpCodes.OP_ASYNC }) {
|
|
1233
|
+
this._asyncBlockingOn = op.i1
|
|
1234
|
+
this.initiateAsync(this._runtimeFlags, op.i0)
|
|
1235
|
+
throw op
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
[OpCodes.OP_YIELD](op: core.Primitive & { op: OpCodes.OP_YIELD }) {
|
|
1239
|
+
this.isYielding = false
|
|
1240
|
+
throw op
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
[OpCodes.OP_WHILE](op: core.Primitive & { _op: OpCodes.OP_WHILE }) {
|
|
1244
|
+
const check = op.i0
|
|
1245
|
+
const body = op.i1
|
|
1246
|
+
if (check()) {
|
|
1247
|
+
this.pushStack(op)
|
|
1248
|
+
return body()
|
|
1249
|
+
} else {
|
|
1250
|
+
return core.exitUnit
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
[OpCodes.OP_COMMIT](op: core.Primitive & { _op: OpCodes.OP_COMMIT }) {
|
|
1255
|
+
return op.commit()
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
/**
|
|
1259
|
+
* The main run-loop for evaluating effects.
|
|
1260
|
+
*
|
|
1261
|
+
* **NOTE**: This method must be invoked by the fiber itself.
|
|
1262
|
+
*/
|
|
1263
|
+
runLoop(effect0: Effect.Effect<any, any, any>): Exit.Exit<any, any> {
|
|
1264
|
+
let cur = effect0
|
|
1265
|
+
this.currentOpCount = 0
|
|
1266
|
+
// eslint-disable-next-line no-constant-condition
|
|
1267
|
+
while (true) {
|
|
1268
|
+
if ((this._runtimeFlags & OpSupervision) !== 0) {
|
|
1269
|
+
this._supervisor.onEffect(this, cur)
|
|
1270
|
+
}
|
|
1271
|
+
if (this._queue.length > 0) {
|
|
1272
|
+
cur = this.drainQueueWhileRunning(this._runtimeFlags, cur)
|
|
1273
|
+
}
|
|
1274
|
+
if (!this.isYielding) {
|
|
1275
|
+
this.currentOpCount += 1
|
|
1276
|
+
const shouldYield = this._scheduler.shouldYield(this)
|
|
1277
|
+
if (shouldYield !== false) {
|
|
1278
|
+
this.isYielding = true
|
|
1279
|
+
this.currentOpCount = 0
|
|
1280
|
+
const oldCur = cur
|
|
1281
|
+
cur = core.flatMap(core.yieldNow({ priority: shouldYield }), () => oldCur)
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
try {
|
|
1285
|
+
if (!("_op" in cur)) {
|
|
1286
|
+
console.log(cur)
|
|
1287
|
+
}
|
|
1288
|
+
if (!((cur as core.Primitive)._op in this)) {
|
|
1289
|
+
if (typeof cur === "function") {
|
|
1290
|
+
console.log((cur as any)())
|
|
1291
|
+
}
|
|
1292
|
+
// @ts-expect-error
|
|
1293
|
+
absurd(cur)
|
|
1294
|
+
}
|
|
1295
|
+
// @ts-expect-error
|
|
1296
|
+
cur = this._tracer.context(
|
|
1297
|
+
// @ts-expect-error
|
|
1298
|
+
() => this[(cur as core.Primitive)._op](cur as core.Primitive),
|
|
1299
|
+
this
|
|
1300
|
+
)
|
|
1301
|
+
} catch (e) {
|
|
1302
|
+
if (core.isEffect(e)) {
|
|
1303
|
+
if (
|
|
1304
|
+
(e as core.Primitive)._op === OpCodes.OP_YIELD ||
|
|
1305
|
+
(e as core.Primitive)._op === OpCodes.OP_ASYNC
|
|
1306
|
+
) {
|
|
1307
|
+
throw e
|
|
1308
|
+
}
|
|
1309
|
+
if (
|
|
1310
|
+
(e as core.Primitive)._op === OpCodes.OP_SUCCESS ||
|
|
1311
|
+
(e as core.Primitive)._op === OpCodes.OP_FAILURE
|
|
1312
|
+
) {
|
|
1313
|
+
return e as Exit.Exit<E, A>
|
|
1314
|
+
}
|
|
1315
|
+
} else {
|
|
1316
|
+
if (core.isEffectError(e)) {
|
|
1317
|
+
cur = core.exitFailCause(e.cause)
|
|
1318
|
+
} else if (internalCause.isInterruptedException(e)) {
|
|
1319
|
+
cur = core.exitFailCause(
|
|
1320
|
+
internalCause.sequential(internalCause.die(e), internalCause.interrupt(FiberId.none))
|
|
1321
|
+
)
|
|
1322
|
+
} else {
|
|
1323
|
+
cur = core.exitFailCause(internalCause.die(e))
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1330
|
+
run = () => {
|
|
1331
|
+
this.drainQueueOnCurrentThread()
|
|
1332
|
+
}
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
// circular with Logger
|
|
1336
|
+
|
|
1337
|
+
/** @internal */
|
|
1338
|
+
export const currentMinimumLogLevel: FiberRef.FiberRef<LogLevel.LogLevel> = core.fiberRefUnsafeMake<LogLevel.LogLevel>(
|
|
1339
|
+
LogLevel.fromLiteral("Info")
|
|
1340
|
+
)
|
|
1341
|
+
|
|
1342
|
+
/** @internal */
|
|
1343
|
+
export const getConsole = (refs: FiberRefs.FiberRefs) => {
|
|
1344
|
+
const defaultServicesValue = FiberRefs.getOrDefault(refs, defaultServices.currentServices)
|
|
1345
|
+
const cnsl = Context.get(defaultServicesValue, consoleTag)
|
|
1346
|
+
return cnsl.unsafe
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
/** @internal */
|
|
1350
|
+
export const defaultLogger: Logger<unknown, void> = internalLogger.makeLogger((options) => {
|
|
1351
|
+
const formatted = internalLogger.stringLogger.log(options)
|
|
1352
|
+
getConsole(options.context).log(formatted)
|
|
1353
|
+
})
|
|
1354
|
+
|
|
1355
|
+
/** @internal */
|
|
1356
|
+
export const filterMinimumLogLevel: Logger<unknown, void> = internalLogger.makeLogger((options) => {
|
|
1357
|
+
const formatted = internalLogger.stringLogger.log(options)
|
|
1358
|
+
getConsole(options.context).log(formatted)
|
|
1359
|
+
})
|
|
1360
|
+
|
|
1361
|
+
/** @internal */
|
|
1362
|
+
export const logFmtLogger: Logger<unknown, void> = internalLogger.makeLogger((options) => {
|
|
1363
|
+
const formatted = internalLogger.logfmtLogger.log(options)
|
|
1364
|
+
getConsole(options.context).log(formatted)
|
|
1365
|
+
})
|
|
1366
|
+
|
|
1367
|
+
/** @internal */
|
|
1368
|
+
export const tracerLogger = internalLogger.makeLogger<unknown, void>(({
|
|
1369
|
+
annotations,
|
|
1370
|
+
cause,
|
|
1371
|
+
context,
|
|
1372
|
+
fiberId,
|
|
1373
|
+
logLevel,
|
|
1374
|
+
message
|
|
1375
|
+
}) => {
|
|
1376
|
+
const span = Option.flatMap(fiberRefs.get(context, core.currentContext), Context.getOption(tracer.spanTag))
|
|
1377
|
+
const clockService = Option.map(
|
|
1378
|
+
fiberRefs.get(context, defaultServices.currentServices),
|
|
1379
|
+
(_) => Context.get(_, clock.clockTag)
|
|
1380
|
+
)
|
|
1381
|
+
if (span._tag === "None" || span.value._tag === "ExternalSpan" || clockService._tag === "None") {
|
|
1382
|
+
return
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
const attributes = Object.fromEntries(HashMap.map(annotations, (value) => internalLogger.serializeUnknown(value)))
|
|
1386
|
+
attributes["effect.fiberId"] = FiberId.threadName(fiberId)
|
|
1387
|
+
attributes["effect.logLevel"] = logLevel.label
|
|
1388
|
+
|
|
1389
|
+
if (cause !== null && cause._tag !== "Empty") {
|
|
1390
|
+
attributes["effect.cause"] = internalCause.pretty(cause)
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
span.value.event(
|
|
1394
|
+
String(message),
|
|
1395
|
+
clockService.value.unsafeCurrentTimeNanos(),
|
|
1396
|
+
attributes
|
|
1397
|
+
)
|
|
1398
|
+
})
|
|
1399
|
+
|
|
1400
|
+
/** @internal */
|
|
1401
|
+
export const currentLoggers: FiberRef.FiberRef<
|
|
1402
|
+
HashSet.HashSet<Logger<unknown, any>>
|
|
1403
|
+
> = core.fiberRefUnsafeMakeHashSet(HashSet.make(defaultLogger, tracerLogger))
|
|
1404
|
+
|
|
1405
|
+
// circular with Effect
|
|
1406
|
+
|
|
1407
|
+
/* @internal */
|
|
1408
|
+
export const acquireRelease: {
|
|
1409
|
+
<A, R2, X>(
|
|
1410
|
+
release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R2, never, X>
|
|
1411
|
+
): <R, E>(acquire: Effect.Effect<R, E, A>) => Effect.Effect<R2 | R | Scope.Scope, E, A>
|
|
1412
|
+
<R, E, A, R2, X>(
|
|
1413
|
+
acquire: Effect.Effect<R, E, A>,
|
|
1414
|
+
release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R2, never, X>
|
|
1415
|
+
): Effect.Effect<Scope.Scope | R | R2, E, A>
|
|
1416
|
+
} = dual<
|
|
1417
|
+
{
|
|
1418
|
+
<A, R2, X>(
|
|
1419
|
+
release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R2, never, X>
|
|
1420
|
+
): <R, E>(acquire: Effect.Effect<R, E, A>) => Effect.Effect<R | R2 | Scope.Scope, E, A>
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
<R, E, A, R2, X>(
|
|
1424
|
+
acquire: Effect.Effect<R, E, A>,
|
|
1425
|
+
release: (a: A, exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R2, never, X>
|
|
1426
|
+
): Effect.Effect<R | R2 | Scope.Scope, E, A>
|
|
1427
|
+
}
|
|
1428
|
+
>((args) => core.isEffect(args[0]), (acquire, release) => {
|
|
1429
|
+
return core.uninterruptible(
|
|
1430
|
+
core.tap(acquire, (a) => addFinalizer((exit) => release(a, exit)))
|
|
1431
|
+
)
|
|
1432
|
+
})
|
|
1433
|
+
|
|
1434
|
+
/* @internal */
|
|
1435
|
+
export const acquireReleaseInterruptible: {
|
|
1436
|
+
<A, R2, X>(
|
|
1437
|
+
release: (exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R2, never, X>
|
|
1438
|
+
): <R, E>(acquire: Effect.Effect<R, E, A>) => Effect.Effect<Scope.Scope | R2 | R, E, A>
|
|
1439
|
+
<R, E, A, R2, X>(
|
|
1440
|
+
acquire: Effect.Effect<R, E, A>,
|
|
1441
|
+
release: (exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R2, never, X>
|
|
1442
|
+
): Effect.Effect<Scope.Scope | R | R2, E, A>
|
|
1443
|
+
} = dual<
|
|
1444
|
+
{
|
|
1445
|
+
<A, R2, X>(
|
|
1446
|
+
release: (exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R2, never, X>
|
|
1447
|
+
): <R, E>(acquire: Effect.Effect<R, E, A>) => Effect.Effect<R | R2 | Scope.Scope, E, A>
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
<R, E, A, R2, X>(
|
|
1451
|
+
acquire: Effect.Effect<R, E, A>,
|
|
1452
|
+
release: (exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R2, never, X>
|
|
1453
|
+
): Effect.Effect<R | R2 | Scope.Scope, E, A>
|
|
1454
|
+
}
|
|
1455
|
+
>((args) => core.isEffect(args[0]), (acquire, release) => {
|
|
1456
|
+
return ensuring(
|
|
1457
|
+
acquire,
|
|
1458
|
+
addFinalizer((exit) => release(exit))
|
|
1459
|
+
)
|
|
1460
|
+
})
|
|
1461
|
+
|
|
1462
|
+
/* @internal */
|
|
1463
|
+
export const addFinalizer = <R, X>(
|
|
1464
|
+
finalizer: (exit: Exit.Exit<unknown, unknown>) => Effect.Effect<R, never, X>
|
|
1465
|
+
): Effect.Effect<R | Scope.Scope, never, void> =>
|
|
1466
|
+
core.withFiberRuntime(
|
|
1467
|
+
(runtime) => {
|
|
1468
|
+
const acquireRefs = runtime.getFiberRefs()
|
|
1469
|
+
const acquireFlags = runtime._runtimeFlags
|
|
1470
|
+
return core.flatMap(scope, (scope) =>
|
|
1471
|
+
core.scopeAddFinalizerExit(scope, (exit) =>
|
|
1472
|
+
core.withFiberRuntime((runtimeFinalizer) => {
|
|
1473
|
+
const preRefs = runtimeFinalizer.getFiberRefs()
|
|
1474
|
+
const preFlags = runtimeFinalizer._runtimeFlags
|
|
1475
|
+
const patchRefs = FiberRefsPatch.diff(preRefs, acquireRefs)
|
|
1476
|
+
const patchFlags = _runtimeFlags.diff(preFlags, acquireFlags)
|
|
1477
|
+
const inverseRefs = FiberRefsPatch.diff(acquireRefs, preRefs)
|
|
1478
|
+
runtimeFinalizer.setFiberRefs(
|
|
1479
|
+
FiberRefsPatch.patch(patchRefs, runtimeFinalizer.id(), acquireRefs)
|
|
1480
|
+
)
|
|
1481
|
+
|
|
1482
|
+
return ensuring(
|
|
1483
|
+
core.withRuntimeFlags(finalizer(exit) as Effect.Effect<never, never, X>, patchFlags),
|
|
1484
|
+
core.sync(() => {
|
|
1485
|
+
runtimeFinalizer.setFiberRefs(
|
|
1486
|
+
FiberRefsPatch.patch(inverseRefs, runtimeFinalizer.id(), runtimeFinalizer.getFiberRefs())
|
|
1487
|
+
)
|
|
1488
|
+
})
|
|
1489
|
+
)
|
|
1490
|
+
})))
|
|
1491
|
+
}
|
|
1492
|
+
)
|
|
1493
|
+
|
|
1494
|
+
/* @internal */
|
|
1495
|
+
export const daemonChildren = <R, E, A>(self: Effect.Effect<R, E, A>): Effect.Effect<R, E, A> => {
|
|
1496
|
+
const forkScope = core.fiberRefLocally(core.currentForkScopeOverride, Option.some(fiberScope.globalScope))
|
|
1497
|
+
return forkScope(self)
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
/** @internal */
|
|
1501
|
+
const _existsParFound = Symbol.for("effect/Effect/existsPar/found")
|
|
1502
|
+
|
|
1503
|
+
/* @internal */
|
|
1504
|
+
export const exists = dual<
|
|
1505
|
+
<R, E, A>(f: (a: A, i: number) => Effect.Effect<R, E, boolean>, options?: {
|
|
1506
|
+
readonly concurrency?: Concurrency
|
|
1507
|
+
readonly batching?: boolean | "inherit"
|
|
1508
|
+
}) => (elements: Iterable<A>) => Effect.Effect<R, E, boolean>,
|
|
1509
|
+
<R, E, A>(elements: Iterable<A>, f: (a: A, i: number) => Effect.Effect<R, E, boolean>, options?: {
|
|
1510
|
+
readonly concurrency: Concurrency
|
|
1511
|
+
readonly batching?: boolean | "inherit"
|
|
1512
|
+
}) => Effect.Effect<R, E, boolean>
|
|
1513
|
+
>((args) => Predicate.isIterable(args[0]), (elements, f, options) =>
|
|
1514
|
+
concurrency.matchSimple(
|
|
1515
|
+
options,
|
|
1516
|
+
() => core.suspend(() => existsLoop(elements[Symbol.iterator](), 0, f)),
|
|
1517
|
+
() =>
|
|
1518
|
+
core.matchEffect(
|
|
1519
|
+
forEachOptions(
|
|
1520
|
+
elements,
|
|
1521
|
+
(a, i) => core.if_(f(a, i), { onTrue: core.fail(_existsParFound), onFalse: core.unit }),
|
|
1522
|
+
options
|
|
1523
|
+
),
|
|
1524
|
+
{
|
|
1525
|
+
onFailure: (e) => e === _existsParFound ? core.succeed(true) : core.fail(e),
|
|
1526
|
+
onSuccess: () => core.succeed(false)
|
|
1527
|
+
}
|
|
1528
|
+
)
|
|
1529
|
+
))
|
|
1530
|
+
|
|
1531
|
+
const existsLoop = <R, E, A>(
|
|
1532
|
+
iterator: Iterator<A>,
|
|
1533
|
+
index: number,
|
|
1534
|
+
f: (a: A, i: number) => Effect.Effect<R, E, boolean>
|
|
1535
|
+
): Effect.Effect<R, E, boolean> => {
|
|
1536
|
+
const next = iterator.next()
|
|
1537
|
+
if (next.done) {
|
|
1538
|
+
return core.succeed(false)
|
|
1539
|
+
}
|
|
1540
|
+
return pipe(core.flatMap(
|
|
1541
|
+
f(next.value, index),
|
|
1542
|
+
(b) => b ? core.succeed(b) : existsLoop(iterator, index + 1, f)
|
|
1543
|
+
))
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
/* @internal */
|
|
1547
|
+
export const filter = dual<
|
|
1548
|
+
<A, R, E>(
|
|
1549
|
+
f: (a: A, i: number) => Effect.Effect<R, E, boolean>,
|
|
1550
|
+
options?: {
|
|
1551
|
+
readonly concurrency?: Concurrency
|
|
1552
|
+
readonly batching?: boolean | "inherit"
|
|
1553
|
+
readonly negate?: boolean
|
|
1554
|
+
}
|
|
1555
|
+
) => (elements: Iterable<A>) => Effect.Effect<R, E, Array<A>>,
|
|
1556
|
+
<A, R, E>(elements: Iterable<A>, f: (a: A, i: number) => Effect.Effect<R, E, boolean>, options?: {
|
|
1557
|
+
readonly concurrency?: Concurrency
|
|
1558
|
+
readonly batching?: boolean | "inherit"
|
|
1559
|
+
readonly negate?: boolean
|
|
1560
|
+
}) => Effect.Effect<R, E, Array<A>>
|
|
1561
|
+
>(
|
|
1562
|
+
(args) => Predicate.isIterable(args[0]),
|
|
1563
|
+
<A, R, E>(elements: Iterable<A>, f: (a: A, i: number) => Effect.Effect<R, E, boolean>, options?: {
|
|
1564
|
+
readonly concurrency?: Concurrency
|
|
1565
|
+
readonly batching?: boolean | "inherit"
|
|
1566
|
+
readonly negate?: boolean
|
|
1567
|
+
}) => {
|
|
1568
|
+
const predicate = options?.negate ? (a: A, i: number) => core.map(f(a, i), Boolean.not) : f
|
|
1569
|
+
return concurrency.matchSimple(
|
|
1570
|
+
options,
|
|
1571
|
+
() =>
|
|
1572
|
+
core.suspend(() =>
|
|
1573
|
+
RA.fromIterable(elements).reduceRight(
|
|
1574
|
+
(effect, a, i) =>
|
|
1575
|
+
core.zipWith(
|
|
1576
|
+
effect,
|
|
1577
|
+
core.suspend(() => predicate(a, i)),
|
|
1578
|
+
(list, b) => b ? [a, ...list] : list
|
|
1579
|
+
),
|
|
1580
|
+
core.sync(() => new Array<A>()) as Effect.Effect<R, E, Array<A>>
|
|
1581
|
+
)
|
|
1582
|
+
),
|
|
1583
|
+
() =>
|
|
1584
|
+
core.map(
|
|
1585
|
+
forEachOptions(
|
|
1586
|
+
elements,
|
|
1587
|
+
(a, i) => core.map(predicate(a, i), (b) => (b ? Option.some(a) : Option.none())),
|
|
1588
|
+
options
|
|
1589
|
+
),
|
|
1590
|
+
RA.compact
|
|
1591
|
+
)
|
|
1592
|
+
)
|
|
1593
|
+
}
|
|
1594
|
+
)
|
|
1595
|
+
|
|
1596
|
+
// === all
|
|
1597
|
+
|
|
1598
|
+
const allResolveInput = (
|
|
1599
|
+
input: Iterable<Effect.Effect<any, any, any>> | Record<string, Effect.Effect<any, any, any>>
|
|
1600
|
+
): readonly [Iterable<Effect.Effect<any, any, any>>, Option.Option<(as: ReadonlyArray<any>) => any>] => {
|
|
1601
|
+
if (Array.isArray(input) || Predicate.isIterable(input)) {
|
|
1602
|
+
return [input, Option.none()]
|
|
1603
|
+
}
|
|
1604
|
+
const keys = Object.keys(input)
|
|
1605
|
+
const size = keys.length
|
|
1606
|
+
return [
|
|
1607
|
+
keys.map((k) => input[k]),
|
|
1608
|
+
Option.some((values: ReadonlyArray<any>) => {
|
|
1609
|
+
const res = {}
|
|
1610
|
+
for (let i = 0; i < size; i++) {
|
|
1611
|
+
;(res as any)[keys[i]] = values[i]
|
|
1612
|
+
}
|
|
1613
|
+
return res
|
|
1614
|
+
})
|
|
1615
|
+
]
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
const allValidate = (
|
|
1619
|
+
effects: Iterable<Effect.Effect<any, any, any>>,
|
|
1620
|
+
reconcile: Option.Option<(as: ReadonlyArray<any>) => any>,
|
|
1621
|
+
options?: {
|
|
1622
|
+
readonly concurrency?: Concurrency
|
|
1623
|
+
readonly batching?: boolean | "inherit"
|
|
1624
|
+
readonly discard?: boolean
|
|
1625
|
+
readonly mode?: "default" | "validate" | "either"
|
|
1626
|
+
}
|
|
1627
|
+
) => {
|
|
1628
|
+
const eitherEffects: Array<Effect.Effect<unknown, never, Either.Either<unknown, unknown>>> = []
|
|
1629
|
+
for (const effect of effects) {
|
|
1630
|
+
eitherEffects.push(core.either(effect))
|
|
1631
|
+
}
|
|
1632
|
+
return core.flatMap(
|
|
1633
|
+
forEachOptions(eitherEffects, identity, {
|
|
1634
|
+
concurrency: options?.concurrency,
|
|
1635
|
+
batching: options?.batching
|
|
1636
|
+
}),
|
|
1637
|
+
(eithers) => {
|
|
1638
|
+
const none = Option.none()
|
|
1639
|
+
const size = eithers.length
|
|
1640
|
+
const errors: Array<unknown> = new Array(size)
|
|
1641
|
+
const successes: Array<unknown> = new Array(size)
|
|
1642
|
+
let errored = false
|
|
1643
|
+
for (let i = 0; i < size; i++) {
|
|
1644
|
+
const either = eithers[i] as Either.Either<unknown, unknown>
|
|
1645
|
+
if (either._tag === "Left") {
|
|
1646
|
+
errors[i] = Option.some(either.left)
|
|
1647
|
+
errored = true
|
|
1648
|
+
} else {
|
|
1649
|
+
successes[i] = either.right
|
|
1650
|
+
errors[i] = none
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
if (errored) {
|
|
1654
|
+
return reconcile._tag === "Some" ?
|
|
1655
|
+
core.fail(reconcile.value(errors)) :
|
|
1656
|
+
core.fail(errors)
|
|
1657
|
+
} else if (options?.discard) {
|
|
1658
|
+
return core.unit
|
|
1659
|
+
}
|
|
1660
|
+
return reconcile._tag === "Some" ?
|
|
1661
|
+
core.succeed(reconcile.value(successes)) :
|
|
1662
|
+
core.succeed(successes)
|
|
1663
|
+
}
|
|
1664
|
+
)
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
const allEither = (
|
|
1668
|
+
effects: Iterable<Effect.Effect<any, any, any>>,
|
|
1669
|
+
reconcile: Option.Option<(as: ReadonlyArray<any>) => any>,
|
|
1670
|
+
options?: {
|
|
1671
|
+
readonly concurrency?: Concurrency
|
|
1672
|
+
readonly batching?: boolean | "inherit"
|
|
1673
|
+
readonly discard?: boolean
|
|
1674
|
+
readonly mode?: "default" | "validate" | "either"
|
|
1675
|
+
}
|
|
1676
|
+
) => {
|
|
1677
|
+
const eitherEffects: Array<Effect.Effect<unknown, never, Either.Either<unknown, unknown>>> = []
|
|
1678
|
+
for (const effect of effects) {
|
|
1679
|
+
eitherEffects.push(core.either(effect))
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
if (options?.discard) {
|
|
1683
|
+
return forEachOptions(eitherEffects, identity, {
|
|
1684
|
+
concurrency: options?.concurrency,
|
|
1685
|
+
batching: options?.batching,
|
|
1686
|
+
discard: true
|
|
1687
|
+
})
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1690
|
+
return core.map(
|
|
1691
|
+
forEachOptions(eitherEffects, identity, {
|
|
1692
|
+
concurrency: options?.concurrency,
|
|
1693
|
+
batching: options?.batching
|
|
1694
|
+
}),
|
|
1695
|
+
(eithers) =>
|
|
1696
|
+
reconcile._tag === "Some" ?
|
|
1697
|
+
reconcile.value(eithers) :
|
|
1698
|
+
eithers
|
|
1699
|
+
)
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
/* @internal */
|
|
1703
|
+
export const all = <
|
|
1704
|
+
const Arg extends Iterable<Effect.Effect<any, any, any>> | Record<string, Effect.Effect<any, any, any>>,
|
|
1705
|
+
O extends {
|
|
1706
|
+
readonly concurrency?: Concurrency
|
|
1707
|
+
readonly batching?: boolean | "inherit"
|
|
1708
|
+
readonly discard?: boolean
|
|
1709
|
+
readonly mode?: "default" | "validate" | "either"
|
|
1710
|
+
}
|
|
1711
|
+
>(
|
|
1712
|
+
arg: Arg,
|
|
1713
|
+
options?: O
|
|
1714
|
+
): Effect.All.Return<Arg, O> => {
|
|
1715
|
+
const [effects, reconcile] = allResolveInput(arg)
|
|
1716
|
+
|
|
1717
|
+
if (options?.mode === "validate") {
|
|
1718
|
+
return allValidate(effects, reconcile, options) as any
|
|
1719
|
+
} else if (options?.mode === "either") {
|
|
1720
|
+
return allEither(effects, reconcile, options) as any
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
return reconcile._tag === "Some"
|
|
1724
|
+
? core.map(
|
|
1725
|
+
forEachOptions(effects, identity, options as any),
|
|
1726
|
+
reconcile.value
|
|
1727
|
+
) as any
|
|
1728
|
+
: forEachOptions(effects, identity, options as any) as any
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
/* @internal */
|
|
1732
|
+
export const allWith = <
|
|
1733
|
+
O extends {
|
|
1734
|
+
readonly concurrency?: Concurrency
|
|
1735
|
+
readonly batching?: boolean | "inherit"
|
|
1736
|
+
readonly discard?: boolean
|
|
1737
|
+
readonly mode?: "default" | "validate" | "either"
|
|
1738
|
+
}
|
|
1739
|
+
>(options?: O) =>
|
|
1740
|
+
<const Arg extends Iterable<Effect.Effect<any, any, any>> | Record<string, Effect.Effect<any, any, any>>>(
|
|
1741
|
+
arg: Arg
|
|
1742
|
+
): Effect.All.Return<Arg, O> => all(arg, options)
|
|
1743
|
+
|
|
1744
|
+
/* @internal */
|
|
1745
|
+
export const allSuccesses = <R, E, A>(
|
|
1746
|
+
elements: Iterable<Effect.Effect<R, E, A>>,
|
|
1747
|
+
options?: {
|
|
1748
|
+
readonly concurrency?: Concurrency
|
|
1749
|
+
readonly batching?: boolean | "inherit"
|
|
1750
|
+
}
|
|
1751
|
+
): Effect.Effect<R, never, Array<A>> =>
|
|
1752
|
+
core.map(
|
|
1753
|
+
all(RA.fromIterable(elements).map(core.exit), options),
|
|
1754
|
+
RA.filterMap((exit) => core.exitIsSuccess(exit) ? Option.some(exit.i0) : Option.none())
|
|
1755
|
+
)
|
|
1756
|
+
|
|
1757
|
+
/* @internal */
|
|
1758
|
+
export const replicate = dual<
|
|
1759
|
+
(n: number) => <R, E, A>(self: Effect.Effect<R, E, A>) => Array<Effect.Effect<R, E, A>>,
|
|
1760
|
+
<R, E, A>(self: Effect.Effect<R, E, A>, n: number) => Array<Effect.Effect<R, E, A>>
|
|
1761
|
+
>(2, (self, n) => Array.from({ length: n }, () => self))
|
|
1762
|
+
|
|
1763
|
+
/* @internal */
|
|
1764
|
+
export const replicateEffect = dual<
|
|
1765
|
+
{
|
|
1766
|
+
(n: number, options?: {
|
|
1767
|
+
readonly concurrency?: Concurrency
|
|
1768
|
+
readonly batching?: boolean | "inherit"
|
|
1769
|
+
readonly discard?: false
|
|
1770
|
+
}): <R, E, A>(self: Effect.Effect<R, E, A>) => Effect.Effect<R, E, Array<A>>
|
|
1771
|
+
(n: number, options: {
|
|
1772
|
+
readonly concurrency?: Concurrency
|
|
1773
|
+
readonly batching?: boolean | "inherit"
|
|
1774
|
+
readonly discard: true
|
|
1775
|
+
}): <R, E, A>(self: Effect.Effect<R, E, A>) => Effect.Effect<R, E, void>
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
<R, E, A>(self: Effect.Effect<R, E, A>, n: number, options?: {
|
|
1779
|
+
readonly concurrency?: Concurrency
|
|
1780
|
+
readonly batching?: boolean | "inherit"
|
|
1781
|
+
readonly discard?: false
|
|
1782
|
+
}): Effect.Effect<R, E, Array<A>>
|
|
1783
|
+
<R, E, A>(self: Effect.Effect<R, E, A>, n: number, options: {
|
|
1784
|
+
readonly concurrency?: Concurrency
|
|
1785
|
+
readonly batching?: boolean | "inherit"
|
|
1786
|
+
readonly discard: true
|
|
1787
|
+
}): Effect.Effect<R, E, void>
|
|
1788
|
+
}
|
|
1789
|
+
>(
|
|
1790
|
+
(args) => core.isEffect(args[0]),
|
|
1791
|
+
(self, n, options) =>
|
|
1792
|
+
all(
|
|
1793
|
+
replicate(self, n),
|
|
1794
|
+
options as {
|
|
1795
|
+
readonly concurrency?: Concurrency
|
|
1796
|
+
readonly batching?: boolean | "inherit"
|
|
1797
|
+
readonly discard?: boolean
|
|
1798
|
+
}
|
|
1799
|
+
)
|
|
1800
|
+
)
|
|
1801
|
+
|
|
1802
|
+
// @ts-expect-error
|
|
1803
|
+
export const forEachOptions = dual<
|
|
1804
|
+
{
|
|
1805
|
+
<A, R, E, B>(f: (a: A, i: number) => Effect.Effect<R, E, B>, options?: {
|
|
1806
|
+
readonly concurrency?: Concurrency
|
|
1807
|
+
readonly batching?: boolean | "inherit"
|
|
1808
|
+
readonly discard?: false
|
|
1809
|
+
}): (self: Iterable<A>) => Effect.Effect<R, E, Array<B>>
|
|
1810
|
+
<A, R, E, B>(f: (a: A, i: number) => Effect.Effect<R, E, B>, options: {
|
|
1811
|
+
readonly concurrency?: Concurrency
|
|
1812
|
+
readonly batching?: boolean | "inherit"
|
|
1813
|
+
readonly discard: true
|
|
1814
|
+
}): (self: Iterable<A>) => Effect.Effect<R, E, void>
|
|
1815
|
+
},
|
|
1816
|
+
{
|
|
1817
|
+
<A, R, E, B>(self: Iterable<A>, f: (a: A, i: number) => Effect.Effect<R, E, B>, options?: {
|
|
1818
|
+
readonly concurrency?: Concurrency
|
|
1819
|
+
readonly batching?: boolean | "inherit"
|
|
1820
|
+
readonly discard?: false
|
|
1821
|
+
}): Effect.Effect<R, E, Array<B>>
|
|
1822
|
+
<A, R, E, B>(self: Iterable<A>, f: (a: A, i: number) => Effect.Effect<R, E, B>, options: {
|
|
1823
|
+
readonly concurrency?: Concurrency
|
|
1824
|
+
readonly batching?: boolean | "inherit"
|
|
1825
|
+
readonly discard: true
|
|
1826
|
+
}): Effect.Effect<R, E, void>
|
|
1827
|
+
}
|
|
1828
|
+
>((args) => Predicate.isIterable(args[0]), (self, f, options) =>
|
|
1829
|
+
core.withFiberRuntime((r) => {
|
|
1830
|
+
const requestBatchingEnabled = options?.batching === true ||
|
|
1831
|
+
(options?.batching === "inherit" && r.getFiberRef(core.currentRequestBatching))
|
|
1832
|
+
|
|
1833
|
+
if (options?.discard) {
|
|
1834
|
+
return concurrency.match(
|
|
1835
|
+
options,
|
|
1836
|
+
() =>
|
|
1837
|
+
finalizersMask(ExecutionStrategy.sequential)((restore) =>
|
|
1838
|
+
requestBatchingEnabled
|
|
1839
|
+
? forEachBatchedDiscard(self, (a, i) => restore(f(a, i)))
|
|
1840
|
+
: core.forEachSequentialDiscard(self, (a, i) => restore(f(a, i)))
|
|
1841
|
+
),
|
|
1842
|
+
() =>
|
|
1843
|
+
finalizersMask(ExecutionStrategy.parallel)((restore) =>
|
|
1844
|
+
forEachParUnboundedDiscard(self, (a, i) => restore(f(a, i)), requestBatchingEnabled)
|
|
1845
|
+
),
|
|
1846
|
+
(n) =>
|
|
1847
|
+
finalizersMask(ExecutionStrategy.parallelN(n))((restore) =>
|
|
1848
|
+
forEachParNDiscard(self, n, (a, i) => restore(f(a, i)), requestBatchingEnabled)
|
|
1849
|
+
)
|
|
1850
|
+
)
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
return concurrency.match(
|
|
1854
|
+
options,
|
|
1855
|
+
() =>
|
|
1856
|
+
finalizersMask(ExecutionStrategy.sequential)((restore) =>
|
|
1857
|
+
requestBatchingEnabled
|
|
1858
|
+
? forEachParN(self, 1, (a, i) => restore(f(a, i)), true)
|
|
1859
|
+
: core.forEachSequential(self, (a, i) => restore(f(a, i)))
|
|
1860
|
+
),
|
|
1861
|
+
() =>
|
|
1862
|
+
finalizersMask(ExecutionStrategy.parallel)((restore) =>
|
|
1863
|
+
forEachParUnbounded(self, (a, i) => restore(f(a, i)), requestBatchingEnabled)
|
|
1864
|
+
),
|
|
1865
|
+
(n) =>
|
|
1866
|
+
finalizersMask(ExecutionStrategy.parallelN(n))((restore) =>
|
|
1867
|
+
forEachParN(self, n, (a, i) => restore(f(a, i)), requestBatchingEnabled)
|
|
1868
|
+
)
|
|
1869
|
+
)
|
|
1870
|
+
}))
|
|
1871
|
+
|
|
1872
|
+
/* @internal */
|
|
1873
|
+
export const forEachParUnbounded = <A, R, E, B>(
|
|
1874
|
+
self: Iterable<A>,
|
|
1875
|
+
f: (a: A, i: number) => Effect.Effect<R, E, B>,
|
|
1876
|
+
batching: boolean
|
|
1877
|
+
): Effect.Effect<R, E, Array<B>> =>
|
|
1878
|
+
core.suspend(() => {
|
|
1879
|
+
const as = RA.fromIterable(self)
|
|
1880
|
+
const array = new Array<B>(as.length)
|
|
1881
|
+
const fn = (a: A, i: number) => core.flatMap(f(a, i), (b) => core.sync(() => array[i] = b))
|
|
1882
|
+
return core.zipRight(forEachParUnboundedDiscard(as, fn, batching), core.succeed(array))
|
|
1883
|
+
})
|
|
1884
|
+
|
|
1885
|
+
const forEachBatchedDiscard = <R, E, A, _>(
|
|
1886
|
+
self: Iterable<A>,
|
|
1887
|
+
f: (a: A, i: number) => Effect.Effect<R, E, _>
|
|
1888
|
+
): Effect.Effect<R, E, void> =>
|
|
1889
|
+
core.suspend(() => {
|
|
1890
|
+
const as = RA.fromIterable(self)
|
|
1891
|
+
const size = as.length
|
|
1892
|
+
if (size === 0) {
|
|
1893
|
+
return core.unit
|
|
1894
|
+
} else if (size === 1) {
|
|
1895
|
+
return core.asUnit(f(as[0], 0))
|
|
1896
|
+
}
|
|
1897
|
+
const effects = as.map(f)
|
|
1898
|
+
const blocked = new Array<Effect.Blocked<R, E, void>>()
|
|
1899
|
+
const loop = (i: number): Effect.Effect<R, E, void> =>
|
|
1900
|
+
i === effects.length ?
|
|
1901
|
+
core.suspend(() => {
|
|
1902
|
+
if (blocked.length > 0) {
|
|
1903
|
+
const requests = blocked.map((b) => b.i0).reduce(_RequestBlock.par)
|
|
1904
|
+
return core.blocked(
|
|
1905
|
+
requests,
|
|
1906
|
+
forEachBatchedDiscard(blocked.map((b) => b.i1), identity)
|
|
1907
|
+
)
|
|
1908
|
+
}
|
|
1909
|
+
return core.unit
|
|
1910
|
+
}) :
|
|
1911
|
+
core.flatMapStep(effects[i], (s) => {
|
|
1912
|
+
if (s._op === "Blocked") {
|
|
1913
|
+
blocked.push(s)
|
|
1914
|
+
return loop(i + 1)
|
|
1915
|
+
} else if (s._op === "Failure") {
|
|
1916
|
+
return core.suspend(() => {
|
|
1917
|
+
if (blocked.length > 0) {
|
|
1918
|
+
const requests = blocked.map((b) => b.i0).reduce(_RequestBlock.par)
|
|
1919
|
+
return core.blocked(
|
|
1920
|
+
requests,
|
|
1921
|
+
core.flatMap(forEachBatchedDiscard(blocked.map((b) => b.i1), identity), () => s)
|
|
1922
|
+
)
|
|
1923
|
+
}
|
|
1924
|
+
return core.unit
|
|
1925
|
+
})
|
|
1926
|
+
} else {
|
|
1927
|
+
return loop(i + 1)
|
|
1928
|
+
}
|
|
1929
|
+
})
|
|
1930
|
+
return loop(0)
|
|
1931
|
+
})
|
|
1932
|
+
|
|
1933
|
+
/* @internal */
|
|
1934
|
+
export const forEachParUnboundedDiscard = <R, E, A, _>(
|
|
1935
|
+
self: Iterable<A>,
|
|
1936
|
+
f: (a: A, i: number) => Effect.Effect<R, E, _>,
|
|
1937
|
+
batching: boolean
|
|
1938
|
+
): Effect.Effect<R, E, void> =>
|
|
1939
|
+
core.suspend(() => {
|
|
1940
|
+
const as = RA.fromIterable(self)
|
|
1941
|
+
const size = as.length
|
|
1942
|
+
if (size === 0) {
|
|
1943
|
+
return core.unit
|
|
1944
|
+
} else if (size === 1) {
|
|
1945
|
+
return core.asUnit(f(as[0], 0))
|
|
1946
|
+
}
|
|
1947
|
+
return core.uninterruptibleMask((restore) => {
|
|
1948
|
+
const deferred = core.deferredUnsafeMake<void, Effect.Effect<any, any, any>>(FiberId.none)
|
|
1949
|
+
let ref = 0
|
|
1950
|
+
const residual: Array<Effect.Blocked<any, any, any>> = []
|
|
1951
|
+
const joinOrder: Array<Fiber.RuntimeFiber<any, any>> = []
|
|
1952
|
+
const process = core.transplant((graft) =>
|
|
1953
|
+
core.forEachSequential(as, (a, i) =>
|
|
1954
|
+
pipe(
|
|
1955
|
+
graft(pipe(
|
|
1956
|
+
core.suspend(() => restore((batching ? core.step : core.exit)(f(a, i)))),
|
|
1957
|
+
core.flatMap(
|
|
1958
|
+
(exit) => {
|
|
1959
|
+
switch (exit._op) {
|
|
1960
|
+
case "Failure": {
|
|
1961
|
+
if (residual.length > 0) {
|
|
1962
|
+
const requests = residual.map((blocked) => blocked.i0).reduce(_RequestBlock.par)
|
|
1963
|
+
const _continue = forEachParUnboundedDiscard(residual, (blocked) => blocked.i1, batching)
|
|
1964
|
+
return core.blocked(
|
|
1965
|
+
requests,
|
|
1966
|
+
core.matchCauseEffect(_continue, {
|
|
1967
|
+
onFailure: (cause) =>
|
|
1968
|
+
core.zipRight(
|
|
1969
|
+
core.deferredFail(deferred, void 0),
|
|
1970
|
+
core.failCause(internalCause.parallel(cause, exit.cause))
|
|
1971
|
+
),
|
|
1972
|
+
onSuccess: () =>
|
|
1973
|
+
core.zipRight(
|
|
1974
|
+
core.deferredFail(deferred, void 0),
|
|
1975
|
+
core.failCause(exit.cause)
|
|
1976
|
+
)
|
|
1977
|
+
})
|
|
1978
|
+
)
|
|
1979
|
+
}
|
|
1980
|
+
return core.zipRight(
|
|
1981
|
+
core.deferredFail(deferred, void 0),
|
|
1982
|
+
core.failCause(exit.cause)
|
|
1983
|
+
)
|
|
1984
|
+
}
|
|
1985
|
+
default: {
|
|
1986
|
+
if (exit._op === "Blocked") {
|
|
1987
|
+
residual.push(exit)
|
|
1988
|
+
}
|
|
1989
|
+
if (ref + 1 === size) {
|
|
1990
|
+
if (residual.length > 0) {
|
|
1991
|
+
const requests = residual.map((blocked) => blocked.i0).reduce(_RequestBlock.par)
|
|
1992
|
+
const _continue = forEachParUnboundedDiscard(residual, (blocked) => blocked.i1, batching)
|
|
1993
|
+
return core.deferredSucceed(deferred, core.blocked(requests, _continue))
|
|
1994
|
+
} else {
|
|
1995
|
+
core.deferredUnsafeDone(deferred, core.exitSucceed(core.exitUnit))
|
|
1996
|
+
}
|
|
1997
|
+
} else {
|
|
1998
|
+
ref = ref + 1
|
|
1999
|
+
}
|
|
2000
|
+
return core.unit
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
)
|
|
2005
|
+
)),
|
|
2006
|
+
forkDaemon,
|
|
2007
|
+
core.map((fiber) => {
|
|
2008
|
+
fiber.addObserver(() => {
|
|
2009
|
+
joinOrder.push(fiber)
|
|
2010
|
+
})
|
|
2011
|
+
return fiber
|
|
2012
|
+
})
|
|
2013
|
+
))
|
|
2014
|
+
)
|
|
2015
|
+
return core.flatMap(process, (fibers) =>
|
|
2016
|
+
core.matchCauseEffect(
|
|
2017
|
+
restore(core.deferredAwait(deferred)),
|
|
2018
|
+
{
|
|
2019
|
+
onFailure: (cause) =>
|
|
2020
|
+
core.flatMap(
|
|
2021
|
+
forEachParUnbounded(fibers, core.interruptFiber, batching),
|
|
2022
|
+
(exits) => {
|
|
2023
|
+
const exit = core.exitCollectAll(exits, { parallel: true })
|
|
2024
|
+
if (exit._tag === "Some" && core.exitIsFailure(exit.value)) {
|
|
2025
|
+
return core.failCause(
|
|
2026
|
+
internalCause.parallel(internalCause.stripFailures(cause), exit.value.i0)
|
|
2027
|
+
)
|
|
2028
|
+
} else {
|
|
2029
|
+
return core.failCause(internalCause.stripFailures(cause))
|
|
2030
|
+
}
|
|
2031
|
+
}
|
|
2032
|
+
),
|
|
2033
|
+
onSuccess: (rest) =>
|
|
2034
|
+
core.flatMap(rest, () => core.forEachSequentialDiscard(joinOrder, (f) => f.inheritAll()))
|
|
2035
|
+
}
|
|
2036
|
+
))
|
|
2037
|
+
})
|
|
2038
|
+
})
|
|
2039
|
+
|
|
2040
|
+
/* @internal */
|
|
2041
|
+
export const forEachParN = <A, R, E, B>(
|
|
2042
|
+
self: Iterable<A>,
|
|
2043
|
+
n: number,
|
|
2044
|
+
f: (a: A, i: number) => Effect.Effect<R, E, B>,
|
|
2045
|
+
batching: boolean
|
|
2046
|
+
): Effect.Effect<R, E, Array<B>> =>
|
|
2047
|
+
core.suspend(() => {
|
|
2048
|
+
const as = RA.fromIterable(self)
|
|
2049
|
+
const array = new Array<B>(as.length)
|
|
2050
|
+
const fn = (a: A, i: number) => core.map(f(a, i), (b) => array[i] = b)
|
|
2051
|
+
return core.zipRight(forEachParNDiscard(as, n, fn, batching), core.succeed(array))
|
|
2052
|
+
})
|
|
2053
|
+
|
|
2054
|
+
/* @internal */
|
|
2055
|
+
export const forEachParNDiscard = <A, R, E, _>(
|
|
2056
|
+
self: Iterable<A>,
|
|
2057
|
+
n: number,
|
|
2058
|
+
f: (a: A, i: number) => Effect.Effect<R, E, _>,
|
|
2059
|
+
batching: boolean
|
|
2060
|
+
): Effect.Effect<R, E, void> =>
|
|
2061
|
+
core.suspend(() => {
|
|
2062
|
+
let i = 0
|
|
2063
|
+
const iterator = self[Symbol.iterator]()
|
|
2064
|
+
const residual: Array<Effect.Blocked<any, any, any>> = []
|
|
2065
|
+
const worker: Effect.Effect<R, E, void> = core.flatMap(
|
|
2066
|
+
core.sync(() => iterator.next()),
|
|
2067
|
+
(next) =>
|
|
2068
|
+
next.done ?
|
|
2069
|
+
core.unit :
|
|
2070
|
+
core.flatMap((batching ? core.step : core.exit)(core.asUnit(f(next.value, i++))), (res) => {
|
|
2071
|
+
switch (res._op) {
|
|
2072
|
+
case "Blocked": {
|
|
2073
|
+
residual.push(res)
|
|
2074
|
+
return worker
|
|
2075
|
+
}
|
|
2076
|
+
case "Failure": {
|
|
2077
|
+
return res
|
|
2078
|
+
}
|
|
2079
|
+
case "Success":
|
|
2080
|
+
return worker
|
|
2081
|
+
}
|
|
2082
|
+
})
|
|
2083
|
+
)
|
|
2084
|
+
const effects: Array<Effect.Effect<R, E, void>> = []
|
|
2085
|
+
for (let i = 0; i < n; i++) {
|
|
2086
|
+
effects.push(worker)
|
|
2087
|
+
}
|
|
2088
|
+
return core.flatMap(core.exit(forEachParUnboundedDiscard(effects, identity, batching)), (exit) => {
|
|
2089
|
+
if (residual.length === 0) {
|
|
2090
|
+
return exit
|
|
2091
|
+
}
|
|
2092
|
+
const requests = residual.map((blocked) => blocked.i0).reduce(_RequestBlock.par)
|
|
2093
|
+
const _continue = forEachParNDiscard(residual, n, (blocked) => blocked.i1, batching)
|
|
2094
|
+
if (exit._tag === "Failure") {
|
|
2095
|
+
return core.blocked(
|
|
2096
|
+
requests,
|
|
2097
|
+
core.matchCauseEffect(_continue, {
|
|
2098
|
+
onFailure: (cause) => core.exitFailCause(internalCause.parallel(exit.cause, cause)),
|
|
2099
|
+
onSuccess: () => exit
|
|
2100
|
+
})
|
|
2101
|
+
)
|
|
2102
|
+
}
|
|
2103
|
+
return core.blocked(requests, _continue)
|
|
2104
|
+
})
|
|
2105
|
+
})
|
|
2106
|
+
|
|
2107
|
+
/* @internal */
|
|
2108
|
+
export const fork = <R, E, A>(self: Effect.Effect<R, E, A>): Effect.Effect<R, never, Fiber.RuntimeFiber<E, A>> =>
|
|
2109
|
+
core.withFiberRuntime<R, never, Fiber.RuntimeFiber<E, A>>((state, status) =>
|
|
2110
|
+
core.succeed(unsafeFork(self, state, status.runtimeFlags))
|
|
2111
|
+
)
|
|
2112
|
+
|
|
2113
|
+
/* @internal */
|
|
2114
|
+
export const forkDaemon = <R, E, A>(self: Effect.Effect<R, E, A>): Effect.Effect<R, never, Fiber.RuntimeFiber<E, A>> =>
|
|
2115
|
+
forkWithScopeOverride(self, fiberScope.globalScope)
|
|
2116
|
+
|
|
2117
|
+
/* @internal */
|
|
2118
|
+
export const forkWithErrorHandler = dual<
|
|
2119
|
+
<E, X>(
|
|
2120
|
+
handler: (e: E) => Effect.Effect<never, never, X>
|
|
2121
|
+
) => <R, A>(self: Effect.Effect<R, E, A>) => Effect.Effect<R, never, Fiber.RuntimeFiber<E, A>>,
|
|
2122
|
+
<R, E, A, X>(
|
|
2123
|
+
self: Effect.Effect<R, E, A>,
|
|
2124
|
+
handler: (e: E) => Effect.Effect<never, never, X>
|
|
2125
|
+
) => Effect.Effect<R, never, Fiber.RuntimeFiber<E, A>>
|
|
2126
|
+
>(2, (self, handler) =>
|
|
2127
|
+
fork(core.onError(self, (cause) => {
|
|
2128
|
+
const either = internalCause.failureOrCause(cause)
|
|
2129
|
+
switch (either._tag) {
|
|
2130
|
+
case "Left": {
|
|
2131
|
+
return handler(either.left)
|
|
2132
|
+
}
|
|
2133
|
+
case "Right": {
|
|
2134
|
+
return core.failCause(either.right)
|
|
2135
|
+
}
|
|
2136
|
+
}
|
|
2137
|
+
})))
|
|
2138
|
+
|
|
2139
|
+
/** @internal */
|
|
2140
|
+
export const unsafeFork = <R, E, A, E2, B>(
|
|
2141
|
+
effect: Effect.Effect<R, E, A>,
|
|
2142
|
+
parentFiber: FiberRuntime<E2, B>,
|
|
2143
|
+
parentRuntimeFlags: RuntimeFlags.RuntimeFlags,
|
|
2144
|
+
overrideScope: fiberScope.FiberScope | null = null
|
|
2145
|
+
): FiberRuntime<E, A> => {
|
|
2146
|
+
const childFiber = unsafeMakeChildFiber(effect, parentFiber, parentRuntimeFlags, overrideScope)
|
|
2147
|
+
childFiber.resume(effect)
|
|
2148
|
+
return childFiber
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
/** @internal */
|
|
2152
|
+
export const unsafeMakeChildFiber = <R, E, A, E2, B>(
|
|
2153
|
+
effect: Effect.Effect<R, E, A>,
|
|
2154
|
+
parentFiber: FiberRuntime<E2, B>,
|
|
2155
|
+
parentRuntimeFlags: RuntimeFlags.RuntimeFlags,
|
|
2156
|
+
overrideScope: fiberScope.FiberScope | null = null
|
|
2157
|
+
): FiberRuntime<E, A> => {
|
|
2158
|
+
const childId = FiberId.unsafeMake()
|
|
2159
|
+
const parentFiberRefs = parentFiber.getFiberRefs()
|
|
2160
|
+
const childFiberRefs = fiberRefs.forkAs(parentFiberRefs, childId)
|
|
2161
|
+
const childFiber = new FiberRuntime<E, A>(childId, childFiberRefs, parentRuntimeFlags)
|
|
2162
|
+
const childContext = fiberRefs.getOrDefault(
|
|
2163
|
+
childFiberRefs,
|
|
2164
|
+
core.currentContext as unknown as FiberRef.FiberRef<Context.Context<R>>
|
|
2165
|
+
)
|
|
2166
|
+
const supervisor = childFiber._supervisor
|
|
2167
|
+
|
|
2168
|
+
supervisor.onStart(
|
|
2169
|
+
childContext,
|
|
2170
|
+
effect,
|
|
2171
|
+
Option.some(parentFiber),
|
|
2172
|
+
childFiber
|
|
2173
|
+
)
|
|
2174
|
+
|
|
2175
|
+
childFiber.addObserver((exit) => supervisor.onEnd(exit, childFiber))
|
|
2176
|
+
|
|
2177
|
+
const parentScope = overrideScope !== null ? overrideScope : pipe(
|
|
2178
|
+
parentFiber.getFiberRef(core.currentForkScopeOverride),
|
|
2179
|
+
Option.getOrElse(() => parentFiber.scope())
|
|
2180
|
+
)
|
|
2181
|
+
|
|
2182
|
+
parentScope.add(parentRuntimeFlags, childFiber)
|
|
2183
|
+
|
|
2184
|
+
return childFiber
|
|
2185
|
+
}
|
|
2186
|
+
|
|
2187
|
+
/* @internal */
|
|
2188
|
+
const forkWithScopeOverride = <R, E, A>(
|
|
2189
|
+
self: Effect.Effect<R, E, A>,
|
|
2190
|
+
scopeOverride: fiberScope.FiberScope
|
|
2191
|
+
): Effect.Effect<R, never, Fiber.RuntimeFiber<E, A>> =>
|
|
2192
|
+
core.withFiberRuntime<R, never, Fiber.RuntimeFiber<E, A>>((parentFiber, parentStatus) =>
|
|
2193
|
+
core.succeed(unsafeFork(self, parentFiber, parentStatus.runtimeFlags, scopeOverride))
|
|
2194
|
+
)
|
|
2195
|
+
|
|
2196
|
+
/* @internal */
|
|
2197
|
+
export const mergeAll = dual<
|
|
2198
|
+
<Z, A>(zero: Z, f: (z: Z, a: A, i: number) => Z, options?: {
|
|
2199
|
+
readonly concurrency?: Concurrency
|
|
2200
|
+
readonly batching?: boolean | "inherit"
|
|
2201
|
+
}) => <R, E>(elements: Iterable<Effect.Effect<R, E, A>>) => Effect.Effect<R, E, Z>,
|
|
2202
|
+
<R, E, A, Z>(elements: Iterable<Effect.Effect<R, E, A>>, zero: Z, f: (z: Z, a: A, i: number) => Z, options?: {
|
|
2203
|
+
readonly concurrency?: Concurrency
|
|
2204
|
+
readonly batching?: boolean | "inherit"
|
|
2205
|
+
}) => Effect.Effect<R, E, Z>
|
|
2206
|
+
>(
|
|
2207
|
+
(args) => Predicate.isIterable(args[0]),
|
|
2208
|
+
<R, E, A, Z>(elements: Iterable<Effect.Effect<R, E, A>>, zero: Z, f: (z: Z, a: A, i: number) => Z, options?: {
|
|
2209
|
+
readonly concurrency?: Concurrency
|
|
2210
|
+
readonly batching?: boolean | "inherit"
|
|
2211
|
+
}) =>
|
|
2212
|
+
concurrency.matchSimple(
|
|
2213
|
+
options,
|
|
2214
|
+
() =>
|
|
2215
|
+
RA.fromIterable(elements).reduce(
|
|
2216
|
+
(acc, a, i) => core.zipWith(acc, a, (acc, a) => f(acc, a, i)),
|
|
2217
|
+
core.succeed(zero) as Effect.Effect<R, E, Z>
|
|
2218
|
+
),
|
|
2219
|
+
() =>
|
|
2220
|
+
core.flatMap(Ref.make(zero), (acc) =>
|
|
2221
|
+
core.flatMap(
|
|
2222
|
+
forEachOptions(
|
|
2223
|
+
elements,
|
|
2224
|
+
(effect, i) => core.flatMap(effect, (a) => Ref.update(acc, (b) => f(b, a, i))),
|
|
2225
|
+
options
|
|
2226
|
+
),
|
|
2227
|
+
() => Ref.get(acc)
|
|
2228
|
+
))
|
|
2229
|
+
)
|
|
2230
|
+
)
|
|
2231
|
+
|
|
2232
|
+
/* @internal */
|
|
2233
|
+
export const partition = dual<
|
|
2234
|
+
<R, E, A, B>(
|
|
2235
|
+
f: (a: A, i: number) => Effect.Effect<R, E, B>,
|
|
2236
|
+
options?: {
|
|
2237
|
+
readonly concurrency?: Concurrency
|
|
2238
|
+
readonly batching?: boolean | "inherit"
|
|
2239
|
+
}
|
|
2240
|
+
) => (elements: Iterable<A>) => Effect.Effect<R, never, readonly [Array<E>, Array<B>]>,
|
|
2241
|
+
<R, E, A, B>(
|
|
2242
|
+
elements: Iterable<A>,
|
|
2243
|
+
f: (a: A, i: number) => Effect.Effect<R, E, B>,
|
|
2244
|
+
options?: {
|
|
2245
|
+
readonly concurrency?: Concurrency
|
|
2246
|
+
readonly batching?: boolean | "inherit"
|
|
2247
|
+
}
|
|
2248
|
+
) => Effect.Effect<R, never, readonly [Array<E>, Array<B>]>
|
|
2249
|
+
>((args) => Predicate.isIterable(args[0]), (elements, f, options) =>
|
|
2250
|
+
pipe(
|
|
2251
|
+
forEachOptions(elements, (a, i) => core.either(f(a, i)), options),
|
|
2252
|
+
core.map((chunk) => core.partitionMap(chunk, identity))
|
|
2253
|
+
))
|
|
2254
|
+
|
|
2255
|
+
/* @internal */
|
|
2256
|
+
export const validateAll = dual<
|
|
2257
|
+
{
|
|
2258
|
+
<R, E, A, B>(
|
|
2259
|
+
f: (a: A, i: number) => Effect.Effect<R, E, B>,
|
|
2260
|
+
options?: {
|
|
2261
|
+
readonly concurrency?: Concurrency
|
|
2262
|
+
readonly batching?: boolean | "inherit"
|
|
2263
|
+
readonly discard?: false
|
|
2264
|
+
}
|
|
2265
|
+
): (elements: Iterable<A>) => Effect.Effect<R, Array<E>, Array<B>>
|
|
2266
|
+
<R, E, A, B>(
|
|
2267
|
+
f: (a: A, i: number) => Effect.Effect<R, E, B>,
|
|
2268
|
+
options: {
|
|
2269
|
+
readonly concurrency?: Concurrency
|
|
2270
|
+
readonly batching?: boolean | "inherit"
|
|
2271
|
+
readonly discard: true
|
|
2272
|
+
}
|
|
2273
|
+
): (elements: Iterable<A>) => Effect.Effect<R, Array<E>, void>
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
<R, E, A, B>(
|
|
2277
|
+
elements: Iterable<A>,
|
|
2278
|
+
f: (a: A, i: number) => Effect.Effect<R, E, B>,
|
|
2279
|
+
options?: {
|
|
2280
|
+
readonly concurrency?: Concurrency
|
|
2281
|
+
readonly batching?: boolean | "inherit"
|
|
2282
|
+
readonly discard?: false
|
|
2283
|
+
}
|
|
2284
|
+
): Effect.Effect<R, Array<E>, Array<B>>
|
|
2285
|
+
<R, E, A, B>(
|
|
2286
|
+
elements: Iterable<A>,
|
|
2287
|
+
f: (a: A, i: number) => Effect.Effect<R, E, B>,
|
|
2288
|
+
options: {
|
|
2289
|
+
readonly concurrency?: Concurrency
|
|
2290
|
+
readonly batching?: boolean | "inherit"
|
|
2291
|
+
readonly discard: true
|
|
2292
|
+
}
|
|
2293
|
+
): Effect.Effect<R, Array<E>, void>
|
|
2294
|
+
}
|
|
2295
|
+
>(
|
|
2296
|
+
(args) => Predicate.isIterable(args[0]),
|
|
2297
|
+
<R, E, A, B>(elements: Iterable<A>, f: (a: A, i: number) => Effect.Effect<R, E, B>, options?: {
|
|
2298
|
+
readonly concurrency?: Concurrency
|
|
2299
|
+
readonly batching?: boolean | "inherit"
|
|
2300
|
+
readonly discard?: boolean
|
|
2301
|
+
}): Effect.Effect<R, Array<E>, any> =>
|
|
2302
|
+
core.flatMap(
|
|
2303
|
+
partition(elements, f, {
|
|
2304
|
+
concurrency: options?.concurrency,
|
|
2305
|
+
batching: options?.batching
|
|
2306
|
+
}),
|
|
2307
|
+
([es, bs]) =>
|
|
2308
|
+
es.length === 0
|
|
2309
|
+
? options?.discard ? core.unit : core.succeed(bs)
|
|
2310
|
+
: core.fail(es)
|
|
2311
|
+
)
|
|
2312
|
+
)
|
|
2313
|
+
|
|
2314
|
+
/* @internal */
|
|
2315
|
+
export const raceAll = <R, E, A>(all: Iterable<Effect.Effect<R, E, A>>) => {
|
|
2316
|
+
const list = Chunk.fromIterable(all)
|
|
2317
|
+
if (!Chunk.isNonEmpty(list)) {
|
|
2318
|
+
return core.dieSync(() => internalCause.IllegalArgumentException(`Received an empty collection of effects`))
|
|
2319
|
+
}
|
|
2320
|
+
const self = Chunk.headNonEmpty(list)
|
|
2321
|
+
const effects = Chunk.tailNonEmpty(list)
|
|
2322
|
+
const inheritAll = (res: readonly [A, Fiber.Fiber<E, A>]) =>
|
|
2323
|
+
pipe(
|
|
2324
|
+
internalFiber.inheritAll(res[1]),
|
|
2325
|
+
core.as(res[0])
|
|
2326
|
+
)
|
|
2327
|
+
return pipe(
|
|
2328
|
+
core.deferredMake<E, readonly [A, Fiber.Fiber<E, A>]>(),
|
|
2329
|
+
core.flatMap((done) =>
|
|
2330
|
+
pipe(
|
|
2331
|
+
Ref.make(effects.length),
|
|
2332
|
+
core.flatMap((fails) =>
|
|
2333
|
+
core.uninterruptibleMask<R, E, A>((restore) =>
|
|
2334
|
+
pipe(
|
|
2335
|
+
fork(core.interruptible(self)),
|
|
2336
|
+
core.flatMap((head) =>
|
|
2337
|
+
pipe(
|
|
2338
|
+
effects,
|
|
2339
|
+
core.forEachSequential((effect) => fork(core.interruptible(effect))),
|
|
2340
|
+
core.map(Chunk.unsafeFromArray),
|
|
2341
|
+
core.map((tail) => pipe(tail, Chunk.prepend(head)) as Chunk.Chunk<Fiber.RuntimeFiber<E, A>>),
|
|
2342
|
+
core.tap((fibers) =>
|
|
2343
|
+
pipe(
|
|
2344
|
+
fibers,
|
|
2345
|
+
RA.reduce(core.unit, (effect, fiber) =>
|
|
2346
|
+
pipe(
|
|
2347
|
+
effect,
|
|
2348
|
+
core.zipRight(
|
|
2349
|
+
pipe(
|
|
2350
|
+
internalFiber._await(fiber),
|
|
2351
|
+
core.flatMap(raceAllArbiter(fibers, fiber, done, fails)),
|
|
2352
|
+
fork,
|
|
2353
|
+
core.asUnit
|
|
2354
|
+
)
|
|
2355
|
+
)
|
|
2356
|
+
))
|
|
2357
|
+
)
|
|
2358
|
+
),
|
|
2359
|
+
core.flatMap((fibers) =>
|
|
2360
|
+
pipe(
|
|
2361
|
+
restore(pipe(Deferred.await(done), core.flatMap(inheritAll))),
|
|
2362
|
+
core.onInterrupt(() =>
|
|
2363
|
+
pipe(
|
|
2364
|
+
fibers,
|
|
2365
|
+
RA.reduce(
|
|
2366
|
+
core.unit,
|
|
2367
|
+
(effect, fiber) => pipe(effect, core.zipLeft(core.interruptFiber(fiber)))
|
|
2368
|
+
)
|
|
2369
|
+
)
|
|
2370
|
+
)
|
|
2371
|
+
)
|
|
2372
|
+
)
|
|
2373
|
+
)
|
|
2374
|
+
)
|
|
2375
|
+
)
|
|
2376
|
+
)
|
|
2377
|
+
)
|
|
2378
|
+
)
|
|
2379
|
+
)
|
|
2380
|
+
)
|
|
2381
|
+
}
|
|
2382
|
+
|
|
2383
|
+
/* @internal */
|
|
2384
|
+
const raceAllArbiter = <E, E1, A, A1>(
|
|
2385
|
+
fibers: Iterable<Fiber.Fiber<E | E1, A | A1>>,
|
|
2386
|
+
winner: Fiber.Fiber<E | E1, A | A1>,
|
|
2387
|
+
deferred: Deferred.Deferred<E | E1, readonly [A | A1, Fiber.Fiber<E | E1, A | A1>]>,
|
|
2388
|
+
fails: Ref.Ref<number>
|
|
2389
|
+
) =>
|
|
2390
|
+
(exit: Exit.Exit<E | E1, A | A1>): Effect.Effect<never, never, void> =>
|
|
2391
|
+
core.exitMatchEffect(exit, {
|
|
2392
|
+
onFailure: (cause) =>
|
|
2393
|
+
pipe(
|
|
2394
|
+
Ref.modify(fails, (fails) =>
|
|
2395
|
+
[
|
|
2396
|
+
fails === 0 ?
|
|
2397
|
+
pipe(core.deferredFailCause(deferred, cause), core.asUnit) :
|
|
2398
|
+
core.unit,
|
|
2399
|
+
fails - 1
|
|
2400
|
+
] as const),
|
|
2401
|
+
core.flatten
|
|
2402
|
+
),
|
|
2403
|
+
onSuccess: (value): Effect.Effect<never, never, void> =>
|
|
2404
|
+
pipe(
|
|
2405
|
+
core.deferredSucceed(deferred, [value, winner] as const),
|
|
2406
|
+
core.flatMap((set) =>
|
|
2407
|
+
set ?
|
|
2408
|
+
pipe(
|
|
2409
|
+
Chunk.fromIterable(fibers),
|
|
2410
|
+
RA.reduce(
|
|
2411
|
+
core.unit,
|
|
2412
|
+
(effect, fiber) =>
|
|
2413
|
+
fiber === winner ?
|
|
2414
|
+
effect :
|
|
2415
|
+
pipe(effect, core.zipLeft(core.interruptFiber(fiber)))
|
|
2416
|
+
)
|
|
2417
|
+
) :
|
|
2418
|
+
core.unit
|
|
2419
|
+
)
|
|
2420
|
+
)
|
|
2421
|
+
})
|
|
2422
|
+
|
|
2423
|
+
/* @internal */
|
|
2424
|
+
export const reduceEffect = dual<
|
|
2425
|
+
<R, E, A>(
|
|
2426
|
+
zero: Effect.Effect<R, E, A>,
|
|
2427
|
+
f: (acc: A, a: A, i: number) => A,
|
|
2428
|
+
options?: {
|
|
2429
|
+
readonly concurrency?: Concurrency
|
|
2430
|
+
readonly batching?: boolean | "inherit"
|
|
2431
|
+
}
|
|
2432
|
+
) => (elements: Iterable<Effect.Effect<R, E, A>>) => Effect.Effect<R, E, A>,
|
|
2433
|
+
<R, E, A>(
|
|
2434
|
+
elements: Iterable<Effect.Effect<R, E, A>>,
|
|
2435
|
+
zero: Effect.Effect<R, E, A>,
|
|
2436
|
+
f: (acc: A, a: A, i: number) => A,
|
|
2437
|
+
options?: {
|
|
2438
|
+
readonly concurrency?: Concurrency
|
|
2439
|
+
readonly batching?: boolean | "inherit"
|
|
2440
|
+
}
|
|
2441
|
+
) => Effect.Effect<R, E, A>
|
|
2442
|
+
>((args) => Predicate.isIterable(args[0]), <R, E, A>(
|
|
2443
|
+
elements: Iterable<Effect.Effect<R, E, A>>,
|
|
2444
|
+
zero: Effect.Effect<R, E, A>,
|
|
2445
|
+
f: (acc: A, a: A, i: number) => A,
|
|
2446
|
+
options?: {
|
|
2447
|
+
readonly concurrency?: Concurrency
|
|
2448
|
+
readonly batching?: boolean | "inherit"
|
|
2449
|
+
}
|
|
2450
|
+
) =>
|
|
2451
|
+
concurrency.matchSimple(
|
|
2452
|
+
options,
|
|
2453
|
+
() => RA.fromIterable(elements).reduce((acc, a, i) => core.zipWith(acc, a, (acc, a) => f(acc, a, i)), zero),
|
|
2454
|
+
() =>
|
|
2455
|
+
core.suspend(() =>
|
|
2456
|
+
pipe(
|
|
2457
|
+
mergeAll(
|
|
2458
|
+
[zero, ...elements],
|
|
2459
|
+
Option.none() as Option.Option<A>,
|
|
2460
|
+
(acc, elem, i) => {
|
|
2461
|
+
switch (acc._tag) {
|
|
2462
|
+
case "None": {
|
|
2463
|
+
return Option.some(elem)
|
|
2464
|
+
}
|
|
2465
|
+
case "Some": {
|
|
2466
|
+
return Option.some(f(acc.value, elem, i))
|
|
2467
|
+
}
|
|
2468
|
+
}
|
|
2469
|
+
},
|
|
2470
|
+
options
|
|
2471
|
+
),
|
|
2472
|
+
core.map((option) => {
|
|
2473
|
+
switch (option._tag) {
|
|
2474
|
+
case "None": {
|
|
2475
|
+
throw new Error(
|
|
2476
|
+
"BUG: Effect.reduceEffect - please report an issue at https://github.com/Effect-TS/io/issues"
|
|
2477
|
+
)
|
|
2478
|
+
}
|
|
2479
|
+
case "Some": {
|
|
2480
|
+
return option.value
|
|
2481
|
+
}
|
|
2482
|
+
}
|
|
2483
|
+
})
|
|
2484
|
+
)
|
|
2485
|
+
)
|
|
2486
|
+
))
|
|
2487
|
+
|
|
2488
|
+
/* @internal */
|
|
2489
|
+
export const parallelFinalizers = <R, E, A>(self: Effect.Effect<R, E, A>): Effect.Effect<R, E, A> =>
|
|
2490
|
+
core.contextWithEffect((context) =>
|
|
2491
|
+
Option.match(Context.getOption(context, scopeTag), {
|
|
2492
|
+
onNone: () => self,
|
|
2493
|
+
onSome: (scope) => {
|
|
2494
|
+
switch (scope.strategy._tag) {
|
|
2495
|
+
case "Parallel":
|
|
2496
|
+
return self
|
|
2497
|
+
case "Sequential":
|
|
2498
|
+
case "ParallelN":
|
|
2499
|
+
return core.flatMap(
|
|
2500
|
+
core.scopeFork(scope, ExecutionStrategy.parallel),
|
|
2501
|
+
(inner) => scopeExtend(self, inner)
|
|
2502
|
+
)
|
|
2503
|
+
}
|
|
2504
|
+
}
|
|
2505
|
+
})
|
|
2506
|
+
)
|
|
2507
|
+
|
|
2508
|
+
/* @internal */
|
|
2509
|
+
export const parallelNFinalizers =
|
|
2510
|
+
(parallelism: number) => <R, E, A>(self: Effect.Effect<R, E, A>): Effect.Effect<R, E, A> =>
|
|
2511
|
+
core.contextWithEffect((context) =>
|
|
2512
|
+
Option.match(Context.getOption(context, scopeTag), {
|
|
2513
|
+
onNone: () => self,
|
|
2514
|
+
onSome: (scope) => {
|
|
2515
|
+
if (scope.strategy._tag === "ParallelN" && scope.strategy.parallelism === parallelism) {
|
|
2516
|
+
return self
|
|
2517
|
+
}
|
|
2518
|
+
return core.flatMap(
|
|
2519
|
+
core.scopeFork(scope, ExecutionStrategy.parallelN(parallelism)),
|
|
2520
|
+
(inner) => scopeExtend(self, inner)
|
|
2521
|
+
)
|
|
2522
|
+
}
|
|
2523
|
+
})
|
|
2524
|
+
)
|
|
2525
|
+
|
|
2526
|
+
/* @internal */
|
|
2527
|
+
export const finalizersMask = (strategy: ExecutionStrategy.ExecutionStrategy) =>
|
|
2528
|
+
<R, E, A>(
|
|
2529
|
+
self: (restore: <R1, E1, A1>(self: Effect.Effect<R1, E1, A1>) => Effect.Effect<R1, E1, A1>) => Effect.Effect<R, E, A>
|
|
2530
|
+
): Effect.Effect<R, E, A> =>
|
|
2531
|
+
core.contextWithEffect((context) =>
|
|
2532
|
+
Option.match(Context.getOption(context, scopeTag), {
|
|
2533
|
+
onNone: () => self(identity),
|
|
2534
|
+
onSome: (scope) => {
|
|
2535
|
+
const patch = strategy._tag === "Parallel"
|
|
2536
|
+
? parallelFinalizers
|
|
2537
|
+
: strategy._tag === "Sequential"
|
|
2538
|
+
? sequentialFinalizers
|
|
2539
|
+
: parallelNFinalizers(strategy.parallelism)
|
|
2540
|
+
switch (scope.strategy._tag) {
|
|
2541
|
+
case "Parallel":
|
|
2542
|
+
return patch(self(parallelFinalizers))
|
|
2543
|
+
case "Sequential":
|
|
2544
|
+
return patch(self(sequentialFinalizers))
|
|
2545
|
+
case "ParallelN":
|
|
2546
|
+
return patch(self(parallelNFinalizers(scope.strategy.parallelism)))
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
})
|
|
2550
|
+
)
|
|
2551
|
+
|
|
2552
|
+
/* @internal */
|
|
2553
|
+
export const scopeWith = <R, E, A>(
|
|
2554
|
+
f: (scope: Scope.Scope) => Effect.Effect<R, E, A>
|
|
2555
|
+
): Effect.Effect<R | Scope.Scope, E, A> => core.flatMap(scopeTag, f)
|
|
2556
|
+
|
|
2557
|
+
/* @internal */
|
|
2558
|
+
export const scopedEffect = <R, E, A>(effect: Effect.Effect<R, E, A>): Effect.Effect<Exclude<R, Scope.Scope>, E, A> =>
|
|
2559
|
+
core.flatMap(scopeMake(), (scope) => scopeUse(scope)(effect))
|
|
2560
|
+
|
|
2561
|
+
/* @internal */
|
|
2562
|
+
export const sequentialFinalizers = <R, E, A>(self: Effect.Effect<R, E, A>): Effect.Effect<R, E, A> =>
|
|
2563
|
+
core.contextWithEffect((context) =>
|
|
2564
|
+
Option.match(Context.getOption(context, scopeTag), {
|
|
2565
|
+
onNone: () => self,
|
|
2566
|
+
onSome: (scope) => {
|
|
2567
|
+
switch (scope.strategy._tag) {
|
|
2568
|
+
case "Sequential":
|
|
2569
|
+
return self
|
|
2570
|
+
case "Parallel":
|
|
2571
|
+
case "ParallelN":
|
|
2572
|
+
return core.flatMap(
|
|
2573
|
+
core.scopeFork(scope, ExecutionStrategy.sequential),
|
|
2574
|
+
(inner) => scopeExtend(self, inner)
|
|
2575
|
+
)
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
})
|
|
2579
|
+
)
|
|
2580
|
+
|
|
2581
|
+
/* @internal */
|
|
2582
|
+
export const tagMetricsScoped = (key: string, value: string): Effect.Effect<Scope.Scope, never, void> =>
|
|
2583
|
+
labelMetricsScoped([metricLabel.make(key, value)])
|
|
2584
|
+
|
|
2585
|
+
/* @internal */
|
|
2586
|
+
export const labelMetricsScoped = (
|
|
2587
|
+
labels: ReadonlyArray<MetricLabel.MetricLabel>
|
|
2588
|
+
): Effect.Effect<Scope.Scope, never, void> => labelMetricsScopedSet(HashSet.fromIterable(labels))
|
|
2589
|
+
|
|
2590
|
+
/* @internal */
|
|
2591
|
+
export const labelMetricsScopedSet = (
|
|
2592
|
+
labels: HashSet.HashSet<MetricLabel.MetricLabel>
|
|
2593
|
+
): Effect.Effect<Scope.Scope, never, void> =>
|
|
2594
|
+
fiberRefLocallyScopedWith(core.currentMetricLabels, (set) => pipe(set, HashSet.union(labels)))
|
|
2595
|
+
|
|
2596
|
+
/* @internal */
|
|
2597
|
+
export const using = dual<
|
|
2598
|
+
<A, R2, E2, A2>(
|
|
2599
|
+
use: (a: A) => Effect.Effect<R2, E2, A2>
|
|
2600
|
+
) => <R, E>(self: Effect.Effect<R, E, A>) => Effect.Effect<Exclude<R, Scope.Scope> | R2, E | E2, A2>,
|
|
2601
|
+
<R, E, A, R2, E2, A2>(
|
|
2602
|
+
self: Effect.Effect<R, E, A>,
|
|
2603
|
+
use: (a: A) => Effect.Effect<R2, E2, A2>
|
|
2604
|
+
) => Effect.Effect<Exclude<R, Scope.Scope> | R2, E | E2, A2>
|
|
2605
|
+
>(2, (self, use) =>
|
|
2606
|
+
core.acquireUseRelease(
|
|
2607
|
+
scopeMake(),
|
|
2608
|
+
(scope) => core.flatMap(scopeExtend(self, scope), use),
|
|
2609
|
+
(scope, exit) => core.scopeClose(scope, exit)
|
|
2610
|
+
))
|
|
2611
|
+
|
|
2612
|
+
/** @internal */
|
|
2613
|
+
export const validate = dual<
|
|
2614
|
+
<R1, E1, B>(
|
|
2615
|
+
that: Effect.Effect<R1, E1, B>,
|
|
2616
|
+
options?: {
|
|
2617
|
+
readonly concurrent?: boolean
|
|
2618
|
+
readonly batching?: boolean | "inherit"
|
|
2619
|
+
}
|
|
2620
|
+
) => <R, E, A>(self: Effect.Effect<R, E, A>) => Effect.Effect<R | R1, E | E1, [A, B]>,
|
|
2621
|
+
<R, E, A, R1, E1, B>(
|
|
2622
|
+
self: Effect.Effect<R, E, A>,
|
|
2623
|
+
that: Effect.Effect<R1, E1, B>,
|
|
2624
|
+
options?: {
|
|
2625
|
+
readonly concurrent?: boolean
|
|
2626
|
+
readonly batching?: boolean | "inherit"
|
|
2627
|
+
}
|
|
2628
|
+
) => Effect.Effect<R | R1, E | E1, [A, B]>
|
|
2629
|
+
>(
|
|
2630
|
+
(args) => core.isEffect(args[1]),
|
|
2631
|
+
(self, that, options) => validateWith(self, that, (a, b) => [a, b], options)
|
|
2632
|
+
)
|
|
2633
|
+
|
|
2634
|
+
/** @internal */
|
|
2635
|
+
export const validateWith = dual<
|
|
2636
|
+
<A, R1, E1, B, C>(
|
|
2637
|
+
that: Effect.Effect<R1, E1, B>,
|
|
2638
|
+
f: (a: A, b: B) => C,
|
|
2639
|
+
options?: {
|
|
2640
|
+
readonly concurrent?: boolean
|
|
2641
|
+
readonly batching?: boolean | "inherit"
|
|
2642
|
+
}
|
|
2643
|
+
) => <R, E>(self: Effect.Effect<R, E, A>) => Effect.Effect<R | R1, E | E1, C>,
|
|
2644
|
+
<R, E, A, R1, E1, B, C>(
|
|
2645
|
+
self: Effect.Effect<R, E, A>,
|
|
2646
|
+
that: Effect.Effect<R1, E1, B>,
|
|
2647
|
+
f: (a: A, b: B) => C,
|
|
2648
|
+
options?: {
|
|
2649
|
+
readonly concurrent?: boolean
|
|
2650
|
+
readonly batching?: boolean | "inherit"
|
|
2651
|
+
}
|
|
2652
|
+
) => Effect.Effect<R | R1, E | E1, C>
|
|
2653
|
+
>((args) => core.isEffect(args[1]), (self, that, f, options) =>
|
|
2654
|
+
core.flatten(zipWithOptions(
|
|
2655
|
+
core.exit(self),
|
|
2656
|
+
core.exit(that),
|
|
2657
|
+
(ea, eb) =>
|
|
2658
|
+
core.exitZipWith(ea, eb, {
|
|
2659
|
+
onSuccess: f,
|
|
2660
|
+
onFailure: (ca, cb) => options?.concurrent ? internalCause.parallel(ca, cb) : internalCause.sequential(ca, cb)
|
|
2661
|
+
}),
|
|
2662
|
+
options
|
|
2663
|
+
)))
|
|
2664
|
+
|
|
2665
|
+
/* @internal */
|
|
2666
|
+
export const validateAllPar = dual<
|
|
2667
|
+
<R, E, A, B>(
|
|
2668
|
+
f: (a: A) => Effect.Effect<R, E, B>
|
|
2669
|
+
) => (elements: Iterable<A>) => Effect.Effect<R, Array<E>, Array<B>>,
|
|
2670
|
+
<R, E, A, B>(
|
|
2671
|
+
elements: Iterable<A>,
|
|
2672
|
+
f: (a: A) => Effect.Effect<R, E, B>
|
|
2673
|
+
) => Effect.Effect<R, Array<E>, Array<B>>
|
|
2674
|
+
>(2, (elements, f) =>
|
|
2675
|
+
core.flatMap(
|
|
2676
|
+
partition(elements, f),
|
|
2677
|
+
([es, bs]) =>
|
|
2678
|
+
es.length === 0
|
|
2679
|
+
? core.succeed(bs)
|
|
2680
|
+
: core.fail(es)
|
|
2681
|
+
))
|
|
2682
|
+
|
|
2683
|
+
/* @internal */
|
|
2684
|
+
export const validateAllParDiscard = dual<
|
|
2685
|
+
<R, E, A, B>(
|
|
2686
|
+
f: (a: A) => Effect.Effect<R, E, B>
|
|
2687
|
+
) => (elements: Iterable<A>) => Effect.Effect<R, Array<E>, void>,
|
|
2688
|
+
<R, E, A, B>(elements: Iterable<A>, f: (a: A) => Effect.Effect<R, E, B>) => Effect.Effect<R, Array<E>, void>
|
|
2689
|
+
>(2, (elements, f) =>
|
|
2690
|
+
core.flatMap(
|
|
2691
|
+
partition(elements, f),
|
|
2692
|
+
([es, _]) =>
|
|
2693
|
+
es.length === 0
|
|
2694
|
+
? core.unit
|
|
2695
|
+
: core.fail(es)
|
|
2696
|
+
))
|
|
2697
|
+
|
|
2698
|
+
/* @internal */
|
|
2699
|
+
export const validateFirst = dual<
|
|
2700
|
+
<R, E, A, B>(f: (a: A, i: number) => Effect.Effect<R, E, B>, options?: {
|
|
2701
|
+
readonly concurrency?: Concurrency
|
|
2702
|
+
readonly batching?: boolean | "inherit"
|
|
2703
|
+
}) => (elements: Iterable<A>) => Effect.Effect<R, Array<E>, B>,
|
|
2704
|
+
<R, E, A, B>(elements: Iterable<A>, f: (a: A, i: number) => Effect.Effect<R, E, B>, options?: {
|
|
2705
|
+
readonly concurrency?: Concurrency
|
|
2706
|
+
readonly batching?: boolean | "inherit"
|
|
2707
|
+
}) => Effect.Effect<R, Array<E>, B>
|
|
2708
|
+
>(
|
|
2709
|
+
(args) => Predicate.isIterable(args[0]),
|
|
2710
|
+
(elements, f, options) => core.flip(forEachOptions(elements, (a, i) => core.flip(f(a, i)), options))
|
|
2711
|
+
)
|
|
2712
|
+
|
|
2713
|
+
/* @internal */
|
|
2714
|
+
export const withClockScoped = <A extends Clock.Clock>(value: A) =>
|
|
2715
|
+
fiberRefLocallyScopedWith(defaultServices.currentServices, Context.add(clock.clockTag, value))
|
|
2716
|
+
|
|
2717
|
+
/* @internal */
|
|
2718
|
+
export const withConfigProviderScoped = (value: ConfigProvider) =>
|
|
2719
|
+
fiberRefLocallyScopedWith(defaultServices.currentServices, Context.add(configProviderTag, value))
|
|
2720
|
+
|
|
2721
|
+
/* @internal */
|
|
2722
|
+
export const withEarlyRelease = <R, E, A>(
|
|
2723
|
+
self: Effect.Effect<R, E, A>
|
|
2724
|
+
): Effect.Effect<R | Scope.Scope, E, readonly [Effect.Effect<never, never, void>, A]> =>
|
|
2725
|
+
scopeWith((parent) =>
|
|
2726
|
+
core.flatMap(core.scopeFork(parent, executionStrategy.sequential), (child) =>
|
|
2727
|
+
pipe(
|
|
2728
|
+
self,
|
|
2729
|
+
scopeExtend(child),
|
|
2730
|
+
core.map((value) =>
|
|
2731
|
+
[
|
|
2732
|
+
core.fiberIdWith((fiberId) => core.scopeClose(child, core.exitInterrupt(fiberId))),
|
|
2733
|
+
value
|
|
2734
|
+
] as const
|
|
2735
|
+
)
|
|
2736
|
+
))
|
|
2737
|
+
)
|
|
2738
|
+
|
|
2739
|
+
/** @internal */
|
|
2740
|
+
export const zipOptions = dual<
|
|
2741
|
+
<R2, E2, A2>(
|
|
2742
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2743
|
+
options?: {
|
|
2744
|
+
readonly concurrent?: boolean
|
|
2745
|
+
readonly batching?: boolean | "inherit"
|
|
2746
|
+
}
|
|
2747
|
+
) => <R, E, A>(
|
|
2748
|
+
self: Effect.Effect<R, E, A>
|
|
2749
|
+
) => Effect.Effect<R | R2, E | E2, [A, A2]>,
|
|
2750
|
+
<R, E, A, R2, E2, A2>(
|
|
2751
|
+
self: Effect.Effect<R, E, A>,
|
|
2752
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2753
|
+
options?: {
|
|
2754
|
+
readonly concurrent?: boolean
|
|
2755
|
+
readonly batching?: boolean | "inherit"
|
|
2756
|
+
}
|
|
2757
|
+
) => Effect.Effect<R | R2, E | E2, [A, A2]>
|
|
2758
|
+
>((args) => core.isEffect(args[1]), (
|
|
2759
|
+
self,
|
|
2760
|
+
that,
|
|
2761
|
+
options
|
|
2762
|
+
) => zipWithOptions(self, that, (a, b) => [a, b], options))
|
|
2763
|
+
|
|
2764
|
+
/** @internal */
|
|
2765
|
+
export const zipLeftOptions = dual<
|
|
2766
|
+
<R2, E2, A2>(
|
|
2767
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2768
|
+
options?: {
|
|
2769
|
+
readonly concurrent?: boolean
|
|
2770
|
+
readonly batching?: boolean | "inherit"
|
|
2771
|
+
}
|
|
2772
|
+
) => <R, E, A>(
|
|
2773
|
+
self: Effect.Effect<R, E, A>
|
|
2774
|
+
) => Effect.Effect<R | R2, E | E2, A>,
|
|
2775
|
+
<R, E, A, R2, E2, A2>(
|
|
2776
|
+
self: Effect.Effect<R, E, A>,
|
|
2777
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2778
|
+
options?: {
|
|
2779
|
+
readonly concurrent?: boolean
|
|
2780
|
+
readonly batching?: boolean | "inherit"
|
|
2781
|
+
}
|
|
2782
|
+
) => Effect.Effect<R | R2, E | E2, A>
|
|
2783
|
+
>(
|
|
2784
|
+
(args) => core.isEffect(args[1]),
|
|
2785
|
+
(self, that, options) => zipWithOptions(self, that, (a, _) => a, options)
|
|
2786
|
+
)
|
|
2787
|
+
|
|
2788
|
+
/** @internal */
|
|
2789
|
+
export const zipRightOptions = dual<
|
|
2790
|
+
<R2, E2, A2>(
|
|
2791
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2792
|
+
options?: {
|
|
2793
|
+
readonly concurrent?: boolean
|
|
2794
|
+
readonly batching?: boolean | "inherit"
|
|
2795
|
+
}
|
|
2796
|
+
) => <R, E, A>(self: Effect.Effect<R, E, A>) => Effect.Effect<R | R2, E | E2, A2>,
|
|
2797
|
+
<R, E, A, R2, E2, A2>(
|
|
2798
|
+
self: Effect.Effect<R, E, A>,
|
|
2799
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2800
|
+
options?: {
|
|
2801
|
+
readonly concurrent?: boolean
|
|
2802
|
+
readonly batching?: boolean | "inherit"
|
|
2803
|
+
}
|
|
2804
|
+
) => Effect.Effect<R | R2, E | E2, A2>
|
|
2805
|
+
>((args) => core.isEffect(args[1]), (self, that, options) => zipWithOptions(self, that, (_, b) => b, options))
|
|
2806
|
+
|
|
2807
|
+
/** @internal */
|
|
2808
|
+
export const zipWithOptions = dual<
|
|
2809
|
+
<R2, E2, A2, A, B>(
|
|
2810
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2811
|
+
f: (a: A, b: A2) => B,
|
|
2812
|
+
options?: {
|
|
2813
|
+
readonly concurrent?: boolean
|
|
2814
|
+
readonly batching?: boolean | "inherit"
|
|
2815
|
+
}
|
|
2816
|
+
) => <R, E>(
|
|
2817
|
+
self: Effect.Effect<R, E, A>
|
|
2818
|
+
) => Effect.Effect<R | R2, E | E2, B>,
|
|
2819
|
+
<R, E, A, R2, E2, A2, B>(
|
|
2820
|
+
self: Effect.Effect<R, E, A>,
|
|
2821
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2822
|
+
f: (a: A, b: A2) => B,
|
|
2823
|
+
options?: {
|
|
2824
|
+
readonly concurrent?: boolean
|
|
2825
|
+
readonly batching?: boolean | "inherit"
|
|
2826
|
+
}
|
|
2827
|
+
) => Effect.Effect<R | R2, E | E2, B>
|
|
2828
|
+
>((args) => core.isEffect(args[1]), <R, E, A, R2, E2, A2, B>(
|
|
2829
|
+
self: Effect.Effect<R, E, A>,
|
|
2830
|
+
that: Effect.Effect<R2, E2, A2>,
|
|
2831
|
+
f: (a: A, b: A2) => B,
|
|
2832
|
+
options?: {
|
|
2833
|
+
readonly concurrent?: boolean
|
|
2834
|
+
readonly batching?: boolean | "inherit"
|
|
2835
|
+
}
|
|
2836
|
+
): Effect.Effect<R | R2, E | E2, B> =>
|
|
2837
|
+
core.map(
|
|
2838
|
+
all([self, that], {
|
|
2839
|
+
concurrency: options?.concurrent ? 2 : 1,
|
|
2840
|
+
batching: options?.batching
|
|
2841
|
+
}),
|
|
2842
|
+
([a, a2]) => f(a, a2)
|
|
2843
|
+
))
|
|
2844
|
+
|
|
2845
|
+
/* @internal */
|
|
2846
|
+
export const withRuntimeFlagsScoped = (
|
|
2847
|
+
update: RuntimeFlagsPatch.RuntimeFlagsPatch
|
|
2848
|
+
): Effect.Effect<Scope.Scope, never, void> => {
|
|
2849
|
+
if (update === RuntimeFlagsPatch.empty) {
|
|
2850
|
+
return core.unit
|
|
2851
|
+
}
|
|
2852
|
+
return pipe(
|
|
2853
|
+
core.runtimeFlags,
|
|
2854
|
+
core.flatMap((runtimeFlags) => {
|
|
2855
|
+
const updatedRuntimeFlags = _runtimeFlags.patch(runtimeFlags, update)
|
|
2856
|
+
const revertRuntimeFlags = _runtimeFlags.diff(updatedRuntimeFlags, runtimeFlags)
|
|
2857
|
+
return pipe(
|
|
2858
|
+
core.updateRuntimeFlags(update),
|
|
2859
|
+
core.zipRight(addFinalizer(() => core.updateRuntimeFlags(revertRuntimeFlags))),
|
|
2860
|
+
core.asUnit
|
|
2861
|
+
)
|
|
2862
|
+
}),
|
|
2863
|
+
core.uninterruptible
|
|
2864
|
+
)
|
|
2865
|
+
}
|
|
2866
|
+
|
|
2867
|
+
// circular with ReleaseMap
|
|
2868
|
+
|
|
2869
|
+
/* @internal */
|
|
2870
|
+
export const releaseMapReleaseAll = (
|
|
2871
|
+
strategy: ExecutionStrategy.ExecutionStrategy,
|
|
2872
|
+
exit: Exit.Exit<unknown, unknown>
|
|
2873
|
+
) =>
|
|
2874
|
+
(self: core.ReleaseMap): Effect.Effect<never, never, void> =>
|
|
2875
|
+
core.suspend(() => {
|
|
2876
|
+
switch (self.state._tag) {
|
|
2877
|
+
case "Exited": {
|
|
2878
|
+
return core.unit
|
|
2879
|
+
}
|
|
2880
|
+
case "Running": {
|
|
2881
|
+
const finalizersMap = self.state.finalizers
|
|
2882
|
+
const update = self.state.update
|
|
2883
|
+
const finalizers = Array.from(finalizersMap.keys()).sort((a, b) => b - a).map((key) => finalizersMap.get(key)!)
|
|
2884
|
+
self.state = { _tag: "Exited", nextKey: self.state.nextKey, exit, update }
|
|
2885
|
+
return executionStrategy.isSequential(strategy) ?
|
|
2886
|
+
pipe(
|
|
2887
|
+
finalizers,
|
|
2888
|
+
core.forEachSequential((fin) => core.exit(update(fin)(exit))),
|
|
2889
|
+
core.flatMap((results) =>
|
|
2890
|
+
pipe(
|
|
2891
|
+
core.exitCollectAll(results),
|
|
2892
|
+
Option.map(core.exitAsUnit),
|
|
2893
|
+
Option.getOrElse(() => core.exitUnit)
|
|
2894
|
+
)
|
|
2895
|
+
)
|
|
2896
|
+
) :
|
|
2897
|
+
executionStrategy.isParallel(strategy) ?
|
|
2898
|
+
pipe(
|
|
2899
|
+
forEachParUnbounded(finalizers, (fin) => core.exit(update(fin)(exit)), false),
|
|
2900
|
+
core.flatMap((results) =>
|
|
2901
|
+
pipe(
|
|
2902
|
+
core.exitCollectAll(results, { parallel: true }),
|
|
2903
|
+
Option.map(core.exitAsUnit),
|
|
2904
|
+
Option.getOrElse(() => core.exitUnit)
|
|
2905
|
+
)
|
|
2906
|
+
)
|
|
2907
|
+
) :
|
|
2908
|
+
pipe(
|
|
2909
|
+
forEachParN(finalizers, strategy.parallelism, (fin) => core.exit(update(fin)(exit)), false),
|
|
2910
|
+
core.flatMap((results) =>
|
|
2911
|
+
pipe(
|
|
2912
|
+
core.exitCollectAll(results, { parallel: true }),
|
|
2913
|
+
Option.map(core.exitAsUnit),
|
|
2914
|
+
Option.getOrElse(() => core.exitUnit)
|
|
2915
|
+
)
|
|
2916
|
+
)
|
|
2917
|
+
)
|
|
2918
|
+
}
|
|
2919
|
+
}
|
|
2920
|
+
})
|
|
2921
|
+
|
|
2922
|
+
// circular with Scope
|
|
2923
|
+
|
|
2924
|
+
/** @internal */
|
|
2925
|
+
export const scopeTag = Context.Tag<Scope.Scope>(core.ScopeTypeId)
|
|
2926
|
+
|
|
2927
|
+
/* @internal */
|
|
2928
|
+
export const scope: Effect.Effect<Scope.Scope, never, Scope.Scope> = scopeTag
|
|
2929
|
+
|
|
2930
|
+
/* @internal */
|
|
2931
|
+
export const scopeMake = (
|
|
2932
|
+
strategy: ExecutionStrategy.ExecutionStrategy = executionStrategy.sequential
|
|
2933
|
+
): Effect.Effect<never, never, Scope.Scope.Closeable> =>
|
|
2934
|
+
core.map(core.releaseMapMake, (rm): Scope.Scope.Closeable => ({
|
|
2935
|
+
[core.ScopeTypeId]: core.ScopeTypeId,
|
|
2936
|
+
[core.CloseableScopeTypeId]: core.CloseableScopeTypeId,
|
|
2937
|
+
strategy,
|
|
2938
|
+
pipe() {
|
|
2939
|
+
return pipeArguments(this, arguments)
|
|
2940
|
+
},
|
|
2941
|
+
fork: (strategy) =>
|
|
2942
|
+
core.uninterruptible(
|
|
2943
|
+
pipe(
|
|
2944
|
+
scopeMake(strategy),
|
|
2945
|
+
core.flatMap((scope) =>
|
|
2946
|
+
pipe(
|
|
2947
|
+
core.releaseMapAdd(rm, (exit) => core.scopeClose(scope, exit)),
|
|
2948
|
+
core.tap((fin) => core.scopeAddFinalizerExit(scope, fin)),
|
|
2949
|
+
core.as(scope)
|
|
2950
|
+
)
|
|
2951
|
+
)
|
|
2952
|
+
)
|
|
2953
|
+
),
|
|
2954
|
+
close: (exit) => core.asUnit(releaseMapReleaseAll(strategy, exit)(rm)),
|
|
2955
|
+
addFinalizer: (fin) => core.asUnit(core.releaseMapAdd(fin)(rm))
|
|
2956
|
+
}))
|
|
2957
|
+
|
|
2958
|
+
/* @internal */
|
|
2959
|
+
export const scopeExtend = dual<
|
|
2960
|
+
(scope: Scope.Scope) => <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<Exclude<R, Scope.Scope>, E, A>,
|
|
2961
|
+
<R, E, A>(effect: Effect.Effect<R, E, A>, scope: Scope.Scope) => Effect.Effect<Exclude<R, Scope.Scope>, E, A>
|
|
2962
|
+
>(
|
|
2963
|
+
2,
|
|
2964
|
+
<R, E, A>(effect: Effect.Effect<R, E, A>, scope: Scope.Scope) =>
|
|
2965
|
+
core.mapInputContext<Exclude<R, Scope.Scope>, R, E, A>(
|
|
2966
|
+
effect,
|
|
2967
|
+
// @ts-expect-error
|
|
2968
|
+
Context.merge(Context.make(scopeTag, scope))
|
|
2969
|
+
)
|
|
2970
|
+
)
|
|
2971
|
+
|
|
2972
|
+
/* @internal */
|
|
2973
|
+
export const scopeUse = dual<
|
|
2974
|
+
(
|
|
2975
|
+
scope: Scope.Scope.Closeable
|
|
2976
|
+
) => <R, E, A>(effect: Effect.Effect<R, E, A>) => Effect.Effect<Exclude<R, Scope.Scope>, E, A>,
|
|
2977
|
+
<R, E, A>(
|
|
2978
|
+
effect: Effect.Effect<R, E, A>,
|
|
2979
|
+
scope: Scope.Scope.Closeable
|
|
2980
|
+
) => Effect.Effect<Exclude<R, Scope.Scope>, E, A>
|
|
2981
|
+
>(2, (effect, scope) =>
|
|
2982
|
+
pipe(
|
|
2983
|
+
effect,
|
|
2984
|
+
scopeExtend(scope),
|
|
2985
|
+
core.onExit((exit) => scope.close(exit))
|
|
2986
|
+
))
|
|
2987
|
+
|
|
2988
|
+
// circular with Supervisor
|
|
2989
|
+
|
|
2990
|
+
/** @internal */
|
|
2991
|
+
export const fiberRefUnsafeMakeSupervisor = (
|
|
2992
|
+
initial: Supervisor.Supervisor<any>
|
|
2993
|
+
): FiberRef.FiberRef<Supervisor.Supervisor<any>> =>
|
|
2994
|
+
core.fiberRefUnsafeMakePatch(initial, {
|
|
2995
|
+
differ: SupervisorPatch.differ,
|
|
2996
|
+
fork: SupervisorPatch.empty
|
|
2997
|
+
})
|
|
2998
|
+
|
|
2999
|
+
// circular with FiberRef
|
|
3000
|
+
|
|
3001
|
+
/* @internal */
|
|
3002
|
+
export const fiberRefLocallyScoped = dual<
|
|
3003
|
+
<A>(value: A) => (self: FiberRef.FiberRef<A>) => Effect.Effect<Scope.Scope, never, void>,
|
|
3004
|
+
<A>(self: FiberRef.FiberRef<A>, value: A) => Effect.Effect<Scope.Scope, never, void>
|
|
3005
|
+
>(2, (self, value) =>
|
|
3006
|
+
core.asUnit(
|
|
3007
|
+
acquireRelease(
|
|
3008
|
+
core.flatMap(
|
|
3009
|
+
core.fiberRefGet(self),
|
|
3010
|
+
(oldValue) => core.as(core.fiberRefSet(self, value), oldValue)
|
|
3011
|
+
),
|
|
3012
|
+
(oldValue) => core.fiberRefSet(self, oldValue)
|
|
3013
|
+
)
|
|
3014
|
+
))
|
|
3015
|
+
|
|
3016
|
+
/* @internal */
|
|
3017
|
+
export const fiberRefLocallyScopedWith = dual<
|
|
3018
|
+
<A>(f: (a: A) => A) => (self: FiberRef.FiberRef<A>) => Effect.Effect<Scope.Scope, never, void>,
|
|
3019
|
+
<A>(self: FiberRef.FiberRef<A>, f: (a: A) => A) => Effect.Effect<Scope.Scope, never, void>
|
|
3020
|
+
>(2, (self, f) => core.fiberRefGetWith(self, (a) => fiberRefLocallyScoped(self, f(a))))
|
|
3021
|
+
|
|
3022
|
+
/* @internal */
|
|
3023
|
+
export const fiberRefMake = <A>(
|
|
3024
|
+
initial: A,
|
|
3025
|
+
options?: {
|
|
3026
|
+
readonly fork?: (a: A) => A
|
|
3027
|
+
readonly join?: (left: A, right: A) => A
|
|
3028
|
+
}
|
|
3029
|
+
): Effect.Effect<Scope.Scope, never, FiberRef.FiberRef<A>> =>
|
|
3030
|
+
fiberRefMakeWith(() => core.fiberRefUnsafeMake(initial, options))
|
|
3031
|
+
|
|
3032
|
+
/* @internal */
|
|
3033
|
+
export const fiberRefMakeWith = <Value>(
|
|
3034
|
+
ref: LazyArg<FiberRef.FiberRef<Value>>
|
|
3035
|
+
): Effect.Effect<Scope.Scope, never, FiberRef.FiberRef<Value>> =>
|
|
3036
|
+
acquireRelease(
|
|
3037
|
+
core.tap(core.sync(ref), (ref) => core.fiberRefUpdate(ref, identity)),
|
|
3038
|
+
(fiberRef) => core.fiberRefDelete(fiberRef)
|
|
3039
|
+
)
|
|
3040
|
+
|
|
3041
|
+
/* @internal */
|
|
3042
|
+
export const fiberRefMakeContext = <A>(
|
|
3043
|
+
initial: Context.Context<A>
|
|
3044
|
+
): Effect.Effect<Scope.Scope, never, FiberRef.FiberRef<Context.Context<A>>> =>
|
|
3045
|
+
fiberRefMakeWith(() => core.fiberRefUnsafeMakeContext(initial))
|
|
3046
|
+
|
|
3047
|
+
/* @internal */
|
|
3048
|
+
export const fiberRefMakeRuntimeFlags = (
|
|
3049
|
+
initial: RuntimeFlags.RuntimeFlags
|
|
3050
|
+
): Effect.Effect<Scope.Scope, never, FiberRef.FiberRef<RuntimeFlags.RuntimeFlags>> =>
|
|
3051
|
+
fiberRefMakeWith(() => core.fiberRefUnsafeMakeRuntimeFlags(initial))
|
|
3052
|
+
|
|
3053
|
+
/** @internal */
|
|
3054
|
+
export const currentRuntimeFlags: FiberRef.FiberRef<RuntimeFlags.RuntimeFlags> = core.fiberRefUnsafeMakeRuntimeFlags(
|
|
3055
|
+
_runtimeFlags.none
|
|
3056
|
+
)
|
|
3057
|
+
|
|
3058
|
+
/** @internal */
|
|
3059
|
+
export const currentSupervisor: FiberRef.FiberRef<Supervisor.Supervisor<any>> = fiberRefUnsafeMakeSupervisor(
|
|
3060
|
+
supervisor.none
|
|
3061
|
+
)
|
|
3062
|
+
|
|
3063
|
+
// circular with Fiber
|
|
3064
|
+
|
|
3065
|
+
/* @internal */
|
|
3066
|
+
export const fiberAwaitAll = (fibers: Iterable<Fiber.Fiber<any, any>>): Effect.Effect<never, never, void> =>
|
|
3067
|
+
core.asUnit(internalFiber._await(fiberAll(fibers)))
|
|
3068
|
+
|
|
3069
|
+
/** @internal */
|
|
3070
|
+
export const fiberAll = <E, A>(fibers: Iterable<Fiber.Fiber<E, A>>): Fiber.Fiber<E, Array<A>> => ({
|
|
3071
|
+
[internalFiber.FiberTypeId]: internalFiber.fiberVariance,
|
|
3072
|
+
id: () => RA.fromIterable(fibers).reduce((id, fiber) => FiberId.combine(id, fiber.id()), FiberId.none),
|
|
3073
|
+
await: () => core.exit(forEachParUnbounded(fibers, (fiber) => core.flatten(fiber.await()), false)),
|
|
3074
|
+
children: () => core.map(forEachParUnbounded(fibers, (fiber) => fiber.children(), false), RA.flatten),
|
|
3075
|
+
inheritAll: () => core.forEachSequentialDiscard(fibers, (fiber) => fiber.inheritAll()),
|
|
3076
|
+
poll: () =>
|
|
3077
|
+
core.map(
|
|
3078
|
+
core.forEachSequential(fibers, (fiber) => fiber.poll()),
|
|
3079
|
+
RA.reduceRight(
|
|
3080
|
+
Option.some<Exit.Exit<E, Array<A>>>(core.exitSucceed(new Array())),
|
|
3081
|
+
(optionB, optionA) => {
|
|
3082
|
+
switch (optionA._tag) {
|
|
3083
|
+
case "None": {
|
|
3084
|
+
return Option.none()
|
|
3085
|
+
}
|
|
3086
|
+
case "Some": {
|
|
3087
|
+
switch (optionB._tag) {
|
|
3088
|
+
case "None": {
|
|
3089
|
+
return Option.none()
|
|
3090
|
+
}
|
|
3091
|
+
case "Some": {
|
|
3092
|
+
return Option.some(
|
|
3093
|
+
core.exitZipWith(optionA.value, optionB.value, {
|
|
3094
|
+
onSuccess: (a, chunk) => [a, ...chunk],
|
|
3095
|
+
onFailure: internalCause.parallel
|
|
3096
|
+
})
|
|
3097
|
+
)
|
|
3098
|
+
}
|
|
3099
|
+
}
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
)
|
|
3104
|
+
),
|
|
3105
|
+
interruptAsFork: (fiberId) => core.forEachSequentialDiscard(fibers, (fiber) => fiber.interruptAsFork(fiberId)),
|
|
3106
|
+
pipe() {
|
|
3107
|
+
return pipeArguments(this, arguments)
|
|
3108
|
+
}
|
|
3109
|
+
})
|
|
3110
|
+
|
|
3111
|
+
/* @internal */
|
|
3112
|
+
export const fiberInterruptFork = <E, A>(self: Fiber.Fiber<E, A>): Effect.Effect<never, never, void> =>
|
|
3113
|
+
core.asUnit(forkDaemon(core.interruptFiber(self)))
|
|
3114
|
+
|
|
3115
|
+
/* @internal */
|
|
3116
|
+
export const fiberJoinAll = <E, A>(fibers: Iterable<Fiber.Fiber<E, A>>): Effect.Effect<never, E, void> =>
|
|
3117
|
+
core.asUnit(internalFiber.join(fiberAll(fibers)))
|
|
3118
|
+
|
|
3119
|
+
/* @internal */
|
|
3120
|
+
export const fiberScoped = <E, A>(self: Fiber.Fiber<E, A>): Effect.Effect<Scope.Scope, never, Fiber.Fiber<E, A>> =>
|
|
3121
|
+
acquireRelease(core.succeed(self), core.interruptFiber)
|
|
3122
|
+
|
|
3123
|
+
//
|
|
3124
|
+
// circular race
|
|
3125
|
+
//
|
|
3126
|
+
|
|
3127
|
+
/** @internal */
|
|
3128
|
+
export const raceWith = dual<
|
|
3129
|
+
<E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(
|
|
3130
|
+
other: Effect.Effect<R1, E1, A1>,
|
|
3131
|
+
options: {
|
|
3132
|
+
readonly onSelfDone: (exit: Exit.Exit<E, A>, fiber: Fiber.Fiber<E1, A1>) => Effect.Effect<R2, E2, A2>
|
|
3133
|
+
readonly onOtherDone: (exit: Exit.Exit<E1, A1>, fiber: Fiber.Fiber<E, A>) => Effect.Effect<R3, E3, A3>
|
|
3134
|
+
}
|
|
3135
|
+
) => <R>(self: Effect.Effect<R, E, A>) => Effect.Effect<R | R1 | R2 | R3, E2 | E3, A2 | A3>,
|
|
3136
|
+
<R, E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(
|
|
3137
|
+
self: Effect.Effect<R, E, A>,
|
|
3138
|
+
other: Effect.Effect<R1, E1, A1>,
|
|
3139
|
+
options: {
|
|
3140
|
+
readonly onSelfDone: (exit: Exit.Exit<E, A>, fiber: Fiber.Fiber<E1, A1>) => Effect.Effect<R2, E2, A2>
|
|
3141
|
+
readonly onOtherDone: (exit: Exit.Exit<E1, A1>, fiber: Fiber.Fiber<E, A>) => Effect.Effect<R3, E3, A3>
|
|
3142
|
+
}
|
|
3143
|
+
) => Effect.Effect<R | R1 | R2 | R3, E2 | E3, A2 | A3>
|
|
3144
|
+
>(3, <R, E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(
|
|
3145
|
+
self: Effect.Effect<R, E, A>,
|
|
3146
|
+
other: Effect.Effect<R1, E1, A1>,
|
|
3147
|
+
options: {
|
|
3148
|
+
readonly onSelfDone: (exit: Exit.Exit<E, A>, fiber: Fiber.Fiber<E1, A1>) => Effect.Effect<R2, E2, A2>
|
|
3149
|
+
readonly onOtherDone: (exit: Exit.Exit<E1, A1>, fiber: Fiber.Fiber<E, A>) => Effect.Effect<R3, E3, A3>
|
|
3150
|
+
}
|
|
3151
|
+
) =>
|
|
3152
|
+
raceFibersWith(self, other, {
|
|
3153
|
+
onSelfWin: (winner, loser) =>
|
|
3154
|
+
core.flatMap(winner.await(), (exit) => {
|
|
3155
|
+
switch (exit._tag) {
|
|
3156
|
+
case OpCodes.OP_SUCCESS: {
|
|
3157
|
+
return core.flatMap(
|
|
3158
|
+
winner.inheritAll(),
|
|
3159
|
+
() => options.onSelfDone(exit, loser)
|
|
3160
|
+
)
|
|
3161
|
+
}
|
|
3162
|
+
case OpCodes.OP_FAILURE: {
|
|
3163
|
+
return options.onSelfDone(exit, loser)
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
}),
|
|
3167
|
+
onOtherWin: (winner, loser) =>
|
|
3168
|
+
core.flatMap(winner.await(), (exit) => {
|
|
3169
|
+
switch (exit._tag) {
|
|
3170
|
+
case OpCodes.OP_SUCCESS: {
|
|
3171
|
+
return core.flatMap(
|
|
3172
|
+
winner.inheritAll(),
|
|
3173
|
+
() => options.onOtherDone(exit, loser)
|
|
3174
|
+
)
|
|
3175
|
+
}
|
|
3176
|
+
case OpCodes.OP_FAILURE: {
|
|
3177
|
+
return options.onOtherDone(exit, loser)
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
})
|
|
3181
|
+
}))
|
|
3182
|
+
|
|
3183
|
+
/** @internal */
|
|
3184
|
+
export const disconnect = <R, E, A>(self: Effect.Effect<R, E, A>): Effect.Effect<R, E, A> =>
|
|
3185
|
+
core.uninterruptibleMask((restore) =>
|
|
3186
|
+
core.fiberIdWith((fiberId) =>
|
|
3187
|
+
core.flatMap(forkDaemon(restore(self)), (fiber) =>
|
|
3188
|
+
pipe(
|
|
3189
|
+
restore(internalFiber.join(fiber)),
|
|
3190
|
+
core.onInterrupt(() => pipe(fiber, internalFiber.interruptAsFork(fiberId)))
|
|
3191
|
+
))
|
|
3192
|
+
)
|
|
3193
|
+
)
|
|
3194
|
+
|
|
3195
|
+
/** @internal */
|
|
3196
|
+
export const race = dual<
|
|
3197
|
+
<R2, E2, A2>(
|
|
3198
|
+
that: Effect.Effect<R2, E2, A2>
|
|
3199
|
+
) => <R, E, A>(
|
|
3200
|
+
self: Effect.Effect<R, E, A>
|
|
3201
|
+
) => Effect.Effect<R | R2, E | E2, A | A2>,
|
|
3202
|
+
<R, E, A, R2, E2, A2>(
|
|
3203
|
+
self: Effect.Effect<R, E, A>,
|
|
3204
|
+
that: Effect.Effect<R2, E2, A2>
|
|
3205
|
+
) => Effect.Effect<R | R2, E | E2, A | A2>
|
|
3206
|
+
>(
|
|
3207
|
+
2,
|
|
3208
|
+
(self, that) =>
|
|
3209
|
+
core.fiberIdWith((parentFiberId) =>
|
|
3210
|
+
raceWith(self, that, {
|
|
3211
|
+
onSelfDone: (exit, right) =>
|
|
3212
|
+
core.exitMatchEffect(exit, {
|
|
3213
|
+
onFailure: (cause) =>
|
|
3214
|
+
pipe(
|
|
3215
|
+
internalFiber.join(right),
|
|
3216
|
+
internalEffect.mapErrorCause((cause2) => internalCause.parallel(cause, cause2))
|
|
3217
|
+
),
|
|
3218
|
+
onSuccess: (value) =>
|
|
3219
|
+
pipe(
|
|
3220
|
+
right,
|
|
3221
|
+
core.interruptAsFiber(parentFiberId),
|
|
3222
|
+
core.as(value)
|
|
3223
|
+
)
|
|
3224
|
+
}),
|
|
3225
|
+
onOtherDone: (exit, left) =>
|
|
3226
|
+
core.exitMatchEffect(exit, {
|
|
3227
|
+
onFailure: (cause) =>
|
|
3228
|
+
pipe(
|
|
3229
|
+
internalFiber.join(left),
|
|
3230
|
+
internalEffect.mapErrorCause((cause2) => internalCause.parallel(cause2, cause))
|
|
3231
|
+
),
|
|
3232
|
+
onSuccess: (value) =>
|
|
3233
|
+
pipe(
|
|
3234
|
+
left,
|
|
3235
|
+
core.interruptAsFiber(parentFiberId),
|
|
3236
|
+
core.as(value)
|
|
3237
|
+
)
|
|
3238
|
+
})
|
|
3239
|
+
})
|
|
3240
|
+
)
|
|
3241
|
+
)
|
|
3242
|
+
|
|
3243
|
+
/** @internal */
|
|
3244
|
+
export const raceFibersWith = dual<
|
|
3245
|
+
<E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(
|
|
3246
|
+
other: Effect.Effect<R1, E1, A1>,
|
|
3247
|
+
options: {
|
|
3248
|
+
readonly onSelfWin: (
|
|
3249
|
+
winner: Fiber.RuntimeFiber<E, A>,
|
|
3250
|
+
loser: Fiber.RuntimeFiber<E1, A1>
|
|
3251
|
+
) => Effect.Effect<R2, E2, A2>
|
|
3252
|
+
readonly onOtherWin: (
|
|
3253
|
+
winner: Fiber.RuntimeFiber<E1, A1>,
|
|
3254
|
+
loser: Fiber.RuntimeFiber<E, A>
|
|
3255
|
+
) => Effect.Effect<R3, E3, A3>
|
|
3256
|
+
readonly selfScope?: fiberScope.FiberScope
|
|
3257
|
+
readonly otherScope?: fiberScope.FiberScope
|
|
3258
|
+
}
|
|
3259
|
+
) => <R>(self: Effect.Effect<R, E, A>) => Effect.Effect<
|
|
3260
|
+
R | R1 | R2 | R3,
|
|
3261
|
+
E2 | E3,
|
|
3262
|
+
A2 | A3
|
|
3263
|
+
>,
|
|
3264
|
+
<R, E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(
|
|
3265
|
+
self: Effect.Effect<R, E, A>,
|
|
3266
|
+
other: Effect.Effect<R1, E1, A1>,
|
|
3267
|
+
options: {
|
|
3268
|
+
readonly onSelfWin: (
|
|
3269
|
+
winner: Fiber.RuntimeFiber<E, A>,
|
|
3270
|
+
loser: Fiber.RuntimeFiber<E1, A1>
|
|
3271
|
+
) => Effect.Effect<R2, E2, A2>
|
|
3272
|
+
readonly onOtherWin: (
|
|
3273
|
+
winner: Fiber.RuntimeFiber<E1, A1>,
|
|
3274
|
+
loser: Fiber.RuntimeFiber<E, A>
|
|
3275
|
+
) => Effect.Effect<R3, E3, A3>
|
|
3276
|
+
readonly selfScope?: fiberScope.FiberScope
|
|
3277
|
+
readonly otherScope?: fiberScope.FiberScope
|
|
3278
|
+
}
|
|
3279
|
+
) => Effect.Effect<
|
|
3280
|
+
R | R1 | R2 | R3,
|
|
3281
|
+
E2 | E3,
|
|
3282
|
+
A2 | A3
|
|
3283
|
+
>
|
|
3284
|
+
>(3, <R, E, A, R1, E1, A1, R2, E2, A2, R3, E3, A3>(
|
|
3285
|
+
self: Effect.Effect<R, E, A>,
|
|
3286
|
+
other: Effect.Effect<R1, E1, A1>,
|
|
3287
|
+
options: {
|
|
3288
|
+
readonly onSelfWin: (
|
|
3289
|
+
winner: Fiber.RuntimeFiber<E, A>,
|
|
3290
|
+
loser: Fiber.RuntimeFiber<E1, A1>
|
|
3291
|
+
) => Effect.Effect<R2, E2, A2>
|
|
3292
|
+
readonly onOtherWin: (
|
|
3293
|
+
winner: Fiber.RuntimeFiber<E1, A1>,
|
|
3294
|
+
loser: Fiber.RuntimeFiber<E, A>
|
|
3295
|
+
) => Effect.Effect<R3, E3, A3>
|
|
3296
|
+
readonly selfScope?: fiberScope.FiberScope
|
|
3297
|
+
readonly otherScope?: fiberScope.FiberScope
|
|
3298
|
+
}
|
|
3299
|
+
) =>
|
|
3300
|
+
core.withFiberRuntime<R | R1 | R2 | R3, E2 | E3, A2 | A3>((parentFiber, parentStatus) => {
|
|
3301
|
+
const parentRuntimeFlags = parentStatus.runtimeFlags
|
|
3302
|
+
const raceIndicator = MRef.make(true)
|
|
3303
|
+
const leftFiber: FiberRuntime<E, A> = unsafeMakeChildFiber(
|
|
3304
|
+
self,
|
|
3305
|
+
parentFiber,
|
|
3306
|
+
parentRuntimeFlags,
|
|
3307
|
+
options.selfScope
|
|
3308
|
+
)
|
|
3309
|
+
const rightFiber: FiberRuntime<E1, A1> = unsafeMakeChildFiber(
|
|
3310
|
+
other,
|
|
3311
|
+
parentFiber,
|
|
3312
|
+
parentRuntimeFlags,
|
|
3313
|
+
options.otherScope
|
|
3314
|
+
)
|
|
3315
|
+
return core.async<R | R1 | R2 | R3, E2 | E3, A2 | A3>((cb) => {
|
|
3316
|
+
leftFiber.addObserver(() => completeRace(leftFiber, rightFiber, options.onSelfWin, raceIndicator, cb))
|
|
3317
|
+
rightFiber.addObserver(() => completeRace(rightFiber, leftFiber, options.onOtherWin, raceIndicator, cb))
|
|
3318
|
+
leftFiber.startFork(self)
|
|
3319
|
+
rightFiber.startFork(other)
|
|
3320
|
+
}, FiberId.combine(leftFiber.id(), rightFiber.id()))
|
|
3321
|
+
}))
|
|
3322
|
+
|
|
3323
|
+
const completeRace = <R, R1, R2, E2, A2, R3, E3, A3>(
|
|
3324
|
+
winner: Fiber.RuntimeFiber<any, any>,
|
|
3325
|
+
loser: Fiber.RuntimeFiber<any, any>,
|
|
3326
|
+
cont: (winner: Fiber.RuntimeFiber<any, any>, loser: Fiber.RuntimeFiber<any, any>) => Effect.Effect<any, any, any>,
|
|
3327
|
+
ab: MRef.MutableRef<boolean>,
|
|
3328
|
+
cb: (_: Effect.Effect<R | R1 | R2 | R3, E2 | E3, A2 | A3>) => void
|
|
3329
|
+
): void => {
|
|
3330
|
+
if (MRef.compareAndSet(true, false)(ab)) {
|
|
3331
|
+
cb(cont(winner, loser))
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
/** @internal */
|
|
3336
|
+
export const ensuring = dual<
|
|
3337
|
+
<R1, X>(
|
|
3338
|
+
finalizer: Effect.Effect<R1, never, X>
|
|
3339
|
+
) => <R, E, A>(
|
|
3340
|
+
self: Effect.Effect<R, E, A>
|
|
3341
|
+
) => Effect.Effect<R | R1, E, A>,
|
|
3342
|
+
<R, E, A, R1, X>(
|
|
3343
|
+
self: Effect.Effect<R, E, A>,
|
|
3344
|
+
finalizer: Effect.Effect<R1, never, X>
|
|
3345
|
+
) => Effect.Effect<R | R1, E, A>
|
|
3346
|
+
>(2, (self, finalizer) =>
|
|
3347
|
+
core.uninterruptibleMask((restore) =>
|
|
3348
|
+
core.matchCauseEffect(restore(self), {
|
|
3349
|
+
onFailure: (cause1) =>
|
|
3350
|
+
core.matchCauseEffect(finalizer, {
|
|
3351
|
+
onFailure: (cause2) => core.failCause(internalCause.sequential(cause1, cause2)),
|
|
3352
|
+
onSuccess: () => core.failCause(cause1)
|
|
3353
|
+
}),
|
|
3354
|
+
onSuccess: (a) => core.as(finalizer, a)
|
|
3355
|
+
})
|
|
3356
|
+
))
|
|
3357
|
+
|
|
3358
|
+
/** @internal */
|
|
3359
|
+
export const invokeWithInterrupt: <R, E, A>(
|
|
3360
|
+
self: Effect.Effect<R, E, A>,
|
|
3361
|
+
entries: ReadonlyArray<Entry<unknown>>
|
|
3362
|
+
) => Effect.Effect<R, E, void> = <R, E, A>(dataSource: Effect.Effect<R, E, A>, all: ReadonlyArray<Entry<unknown>>) =>
|
|
3363
|
+
core.fiberIdWith((id) =>
|
|
3364
|
+
core.flatMap(
|
|
3365
|
+
core.flatMap(
|
|
3366
|
+
forkDaemon(core.interruptible(dataSource)),
|
|
3367
|
+
(processing) =>
|
|
3368
|
+
core.async<never, E, void>((cb) => {
|
|
3369
|
+
const counts = all.map((_) => _.listeners.count)
|
|
3370
|
+
const checkDone = () => {
|
|
3371
|
+
if (counts.every((count) => count === 0)) {
|
|
3372
|
+
cleanup.forEach((f) => f())
|
|
3373
|
+
cb(core.interruptFiber(processing))
|
|
3374
|
+
}
|
|
3375
|
+
}
|
|
3376
|
+
processing.addObserver((exit) => {
|
|
3377
|
+
cleanup.forEach((f) => f())
|
|
3378
|
+
cb(exit)
|
|
3379
|
+
})
|
|
3380
|
+
const cleanup = all.map((r, i) => {
|
|
3381
|
+
const observer = (count: number) => {
|
|
3382
|
+
counts[i] = count
|
|
3383
|
+
checkDone()
|
|
3384
|
+
}
|
|
3385
|
+
r.listeners.addObserver(observer)
|
|
3386
|
+
return () => r.listeners.removeObserver(observer)
|
|
3387
|
+
})
|
|
3388
|
+
checkDone()
|
|
3389
|
+
return core.sync(() => {
|
|
3390
|
+
cleanup.forEach((f) => f())
|
|
3391
|
+
})
|
|
3392
|
+
})
|
|
3393
|
+
),
|
|
3394
|
+
() =>
|
|
3395
|
+
core.suspend(() => {
|
|
3396
|
+
const residual = all.flatMap((entry) => {
|
|
3397
|
+
if (!entry.state.completed) {
|
|
3398
|
+
return [entry]
|
|
3399
|
+
}
|
|
3400
|
+
return []
|
|
3401
|
+
})
|
|
3402
|
+
return core.forEachSequentialDiscard(
|
|
3403
|
+
residual,
|
|
3404
|
+
(entry) => complete(entry.request as any, core.exitInterrupt(id))
|
|
3405
|
+
)
|
|
3406
|
+
})
|
|
3407
|
+
)
|
|
3408
|
+
)
|
|
3409
|
+
|
|
3410
|
+
/** @internal */
|
|
3411
|
+
export const interruptWhenPossible = dual<
|
|
3412
|
+
(all: Iterable<Request<any, any>>) => <R, E, A>(
|
|
3413
|
+
self: Effect.Effect<R, E, A>
|
|
3414
|
+
) => Effect.Effect<R, E, void>,
|
|
3415
|
+
<R, E, A>(
|
|
3416
|
+
self: Effect.Effect<R, E, A>,
|
|
3417
|
+
all: Iterable<Request<any, any>>
|
|
3418
|
+
) => Effect.Effect<R, E, void>
|
|
3419
|
+
>(2, (self, all) =>
|
|
3420
|
+
core.fiberRefGetWith(
|
|
3421
|
+
currentRequestMap,
|
|
3422
|
+
(map) =>
|
|
3423
|
+
core.suspend(() => {
|
|
3424
|
+
const entries = RA.fromIterable(all).flatMap((_) => map.has(_) ? [map.get(_)!] : [])
|
|
3425
|
+
return invokeWithInterrupt(self, entries)
|
|
3426
|
+
})
|
|
3427
|
+
))
|
|
3428
|
+
|
|
3429
|
+
// circular Tracer
|
|
3430
|
+
|
|
3431
|
+
/** @internal */
|
|
3432
|
+
export const makeSpanScoped = (
|
|
3433
|
+
name: string,
|
|
3434
|
+
options?: {
|
|
3435
|
+
readonly attributes?: Record<string, unknown>
|
|
3436
|
+
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
3437
|
+
readonly parent?: Tracer.ParentSpan
|
|
3438
|
+
readonly root?: boolean
|
|
3439
|
+
readonly context?: Context.Context<never>
|
|
3440
|
+
}
|
|
3441
|
+
): Effect.Effect<Scope.Scope, never, Tracer.Span> =>
|
|
3442
|
+
acquireRelease(
|
|
3443
|
+
internalEffect.makeSpan(name, options),
|
|
3444
|
+
(span, exit) =>
|
|
3445
|
+
core.flatMap(
|
|
3446
|
+
internalEffect.currentTimeNanosTracing,
|
|
3447
|
+
(endTime) => core.sync(() => span.end(endTime, exit))
|
|
3448
|
+
)
|
|
3449
|
+
)
|
|
3450
|
+
|
|
3451
|
+
/* @internal */
|
|
3452
|
+
export const withTracerScoped = (value: Tracer.Tracer): Effect.Effect<Scope.Scope, never, void> =>
|
|
3453
|
+
fiberRefLocallyScopedWith(defaultServices.currentServices, Context.add(tracer.tracerTag, value))
|
|
3454
|
+
|
|
3455
|
+
/** @internal */
|
|
3456
|
+
export const withSpanScoped = dual<
|
|
3457
|
+
(name: string, options?: {
|
|
3458
|
+
readonly attributes?: Record<string, unknown>
|
|
3459
|
+
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
3460
|
+
readonly parent?: Tracer.ParentSpan
|
|
3461
|
+
readonly root?: boolean
|
|
3462
|
+
readonly context?: Context.Context<never>
|
|
3463
|
+
}) => <R, E, A>(self: Effect.Effect<R, E, A>) => Effect.Effect<Exclude<R, Tracer.ParentSpan> | Scope.Scope, E, A>,
|
|
3464
|
+
<R, E, A>(self: Effect.Effect<R, E, A>, name: string, options?: {
|
|
3465
|
+
readonly attributes?: Record<string, unknown>
|
|
3466
|
+
readonly links?: ReadonlyArray<Tracer.SpanLink>
|
|
3467
|
+
readonly parent?: Tracer.ParentSpan
|
|
3468
|
+
readonly root?: boolean
|
|
3469
|
+
readonly context?: Context.Context<never>
|
|
3470
|
+
}) => Effect.Effect<Exclude<R, Tracer.ParentSpan> | Scope.Scope, E, A>
|
|
3471
|
+
>(
|
|
3472
|
+
(args) => typeof args[0] !== "string",
|
|
3473
|
+
(self, name, options) =>
|
|
3474
|
+
core.flatMap(
|
|
3475
|
+
makeSpanScoped(name, options),
|
|
3476
|
+
(span) => internalEffect.provideService(self, tracer.spanTag, span)
|
|
3477
|
+
)
|
|
3478
|
+
)
|