@effect/stream
Advanced tools
Comparing version 0.36.1 to 0.37.0
320
Channel.js
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.withSpan = exports.updateService = exports.unwrapScoped = exports.unwrap = exports.unit = exports.toStream = exports.toSink = exports.toQueue = exports.toPull = exports.toHub = exports.sync = exports.succeed = exports.scoped = exports.runDrain = exports.runCollect = exports.run = exports.repeated = exports.readWithCause = exports.readWith = exports.readOrFail = exports.read = exports.provideSomeLayer = exports.provideService = exports.provideLayer = exports.provideContext = exports.pipeToOrFail = exports.pipeTo = exports.orElse = exports.orDieWith = exports.orDie = exports.never = exports.mergeWith = exports.mergeOutWith = exports.mergeOut = exports.mergeMap = exports.mergeAllWith = exports.mergeAllUnboundedWith = exports.mergeAllUnbounded = exports.mergeAll = exports.mapOutEffectPar = exports.mapOutEffect = exports.mapOut = exports.mapErrorCause = exports.mapError = exports.mapEffect = exports.map = exports.isChannelException = exports.interruptWhenDeferred = exports.interruptWhen = exports.identity = exports.fromQueue = exports.fromOption = exports.fromInput = exports.fromHubScoped = exports.fromHub = exports.fromEither = exports.fromEffect = exports.foldChannel = exports.foldCauseChannel = exports.flatten = exports.flatMap = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.ensuringWith = exports.ensuring = exports.emitCollect = exports.embedInput = exports.drain = exports.doneCollect = exports.contramapInEffect = exports.contramapIn = exports.contramapErrorEffect = exports.contramapError = exports.contramapEffect = exports.contramapContext = exports.contramap = exports.contextWithEffect = exports.contextWithChannel = exports.contextWith = exports.context = exports.concatOut = exports.concatMapWithCustom = exports.concatMapWith = exports.concatMap = exports.concatAllWith = exports.concatAll = exports.collect = exports.catchAllCause = exports.catchAll = exports.bufferChunk = exports.buffer = exports.asUnit = exports.as = exports.acquireUseRelease = exports.acquireReleaseOut = exports.ChannelTypeId = exports.ChannelExceptionTypeId = exports.ChannelException = void 0; | ||
exports.withSpan = exports.updateService = exports.unwrapScoped = exports.unwrap = exports.unit = exports.toStream = exports.toSink = exports.toQueue = exports.toPull = exports.toHub = exports.sync = exports.succeed = exports.scoped = exports.runDrain = exports.runCollect = exports.run = exports.repeated = exports.readWithCause = exports.readWith = exports.readOrFail = exports.read = exports.provideSomeLayer = exports.provideService = exports.provideLayer = exports.provideContext = exports.pipeToOrFail = exports.pipeTo = exports.orElse = exports.orDieWith = exports.orDie = exports.never = exports.mergeWith = exports.mergeOutWith = exports.mergeOut = exports.mergeMap = exports.mergeAllWith = exports.mergeAllUnboundedWith = exports.mergeAllUnbounded = exports.mergeAll = exports.mapOutEffectPar = exports.mapOutEffect = exports.mapOut = exports.mapInputInEffect = exports.mapInputIn = exports.mapInputErrorEffect = exports.mapInputError = exports.mapInputEffect = exports.mapInputContext = exports.mapInput = exports.mapErrorCause = exports.mapError = exports.mapEffect = exports.map = exports.isChannelException = exports.interruptWhenDeferred = exports.interruptWhen = exports.identity = exports.fromQueue = exports.fromOption = exports.fromInput = exports.fromHubScoped = exports.fromHub = exports.fromEither = exports.fromEffect = exports.foldChannel = exports.foldCauseChannel = exports.flatten = exports.flatMap = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.ensuringWith = exports.ensuring = exports.emitCollect = exports.embedInput = exports.drain = exports.doneCollect = exports.contextWithEffect = exports.contextWithChannel = exports.contextWith = exports.context = exports.concatOut = exports.concatMapWithCustom = exports.concatMapWith = exports.concatMap = exports.concatAllWith = exports.concatAll = exports.collect = exports.catchAllCause = exports.catchAll = exports.bufferChunk = exports.buffer = exports.asUnit = exports.as = exports.acquireUseRelease = exports.acquireReleaseOut = exports.ChannelTypeId = exports.ChannelExceptionTypeId = exports.ChannelException = void 0; | ||
exports.zipRight = exports.zipLeft = exports.zip = exports.writeChunk = exports.writeAll = exports.write = void 0; | ||
@@ -19,3 +19,3 @@ var channel = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stream/internal/channel")); | ||
*/ | ||
const ChannelTypeId = core.ChannelTypeId; | ||
const ChannelTypeId = exports.ChannelTypeId = core.ChannelTypeId; | ||
/** | ||
@@ -25,4 +25,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.ChannelTypeId = ChannelTypeId; | ||
const ChannelExceptionTypeId = channel.ChannelExceptionTypeId; | ||
const ChannelExceptionTypeId = exports.ChannelExceptionTypeId = channel.ChannelExceptionTypeId; | ||
/** | ||
@@ -32,4 +31,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.ChannelExceptionTypeId = ChannelExceptionTypeId; | ||
const acquireUseRelease = channel.acquireUseRelease; | ||
const acquireUseRelease = exports.acquireUseRelease = channel.acquireUseRelease; | ||
/** | ||
@@ -39,4 +37,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.acquireUseRelease = acquireUseRelease; | ||
const acquireReleaseOut = core.acquireReleaseOut; | ||
const acquireReleaseOut = exports.acquireReleaseOut = core.acquireReleaseOut; | ||
/** | ||
@@ -52,4 +49,3 @@ * Returns a new channel that is the same as this one, except the terminal | ||
*/ | ||
exports.acquireReleaseOut = acquireReleaseOut; | ||
const as = channel.as; | ||
const as = exports.as = channel.as; | ||
/** | ||
@@ -59,4 +55,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.as = as; | ||
const asUnit = channel.asUnit; | ||
const asUnit = exports.asUnit = channel.asUnit; | ||
/** | ||
@@ -70,4 +65,3 @@ * Creates a channel backed by a buffer. When the buffer is empty, the channel | ||
*/ | ||
exports.asUnit = asUnit; | ||
const buffer = channel.buffer; | ||
const buffer = exports.buffer = channel.buffer; | ||
/** | ||
@@ -77,4 +71,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.buffer = buffer; | ||
const bufferChunk = channel.bufferChunk; | ||
const bufferChunk = exports.bufferChunk = channel.bufferChunk; | ||
/** | ||
@@ -88,4 +81,3 @@ * Returns a new channel that is the same as this one, except if this channel | ||
*/ | ||
exports.bufferChunk = bufferChunk; | ||
const catchAll = channel.catchAll; | ||
const catchAll = exports.catchAll = channel.catchAll; | ||
/** | ||
@@ -99,4 +91,3 @@ * Returns a new channel that is the same as this one, except if this channel | ||
*/ | ||
exports.catchAll = catchAll; | ||
const catchAllCause = core.catchAllCause; | ||
const catchAllCause = exports.catchAllCause = core.catchAllCause; | ||
/** | ||
@@ -108,4 +99,3 @@ * Concat sequentially a channel of channels. | ||
*/ | ||
exports.catchAllCause = catchAllCause; | ||
const concatAll = core.concatAll; | ||
const concatAll = exports.concatAll = core.concatAll; | ||
/** | ||
@@ -117,4 +107,3 @@ * Concat sequentially a channel of channels. | ||
*/ | ||
exports.concatAll = concatAll; | ||
const concatAllWith = core.concatAllWith; | ||
const concatAllWith = exports.concatAllWith = core.concatAllWith; | ||
/** | ||
@@ -129,4 +118,3 @@ * Returns a new channel whose outputs are fed to the specified factory | ||
*/ | ||
exports.concatAllWith = concatAllWith; | ||
const concatMap = channel.concatMap; | ||
const concatMap = exports.concatMap = channel.concatMap; | ||
/** | ||
@@ -143,4 +131,3 @@ * Returns a new channel whose outputs are fed to the specified factory | ||
*/ | ||
exports.concatMap = concatMap; | ||
const concatMapWith = core.concatMapWith; | ||
const concatMapWith = exports.concatMapWith = core.concatMapWith; | ||
/** | ||
@@ -157,4 +144,3 @@ * Returns a new channel whose outputs are fed to the specified factory | ||
*/ | ||
exports.concatMapWith = concatMapWith; | ||
const concatMapWithCustom = core.concatMapWithCustom; | ||
const concatMapWithCustom = exports.concatMapWithCustom = core.concatMapWithCustom; | ||
/** | ||
@@ -167,4 +153,3 @@ * Returns a new channel, which is the same as this one, except its outputs | ||
*/ | ||
exports.concatMapWithCustom = concatMapWithCustom; | ||
const collect = channel.collect; | ||
const collect = exports.collect = channel.collect; | ||
/** | ||
@@ -178,4 +163,3 @@ * Returns a new channel, which is the concatenation of all the channels that | ||
*/ | ||
exports.collect = collect; | ||
const concatOut = channel.concatOut; | ||
const concatOut = exports.concatOut = channel.concatOut; | ||
/** | ||
@@ -188,4 +172,3 @@ * Returns a new channel which is the same as this one but applies the given | ||
*/ | ||
exports.concatOut = concatOut; | ||
const contramap = channel.contramap; | ||
const mapInput = exports.mapInput = channel.mapInput; | ||
/** | ||
@@ -198,4 +181,3 @@ * Returns a new channel which is the same as this one but applies the given | ||
*/ | ||
exports.contramap = contramap; | ||
const contramapEffect = channel.contramapEffect; | ||
const mapInputEffect = exports.mapInputEffect = channel.mapInputEffect; | ||
/** | ||
@@ -208,4 +190,3 @@ * Returns a new channel which is the same as this one but applies the given | ||
*/ | ||
exports.contramapEffect = contramapEffect; | ||
const contramapError = channel.contramapError; | ||
const mapInputError = exports.mapInputError = channel.mapInputError; | ||
/** | ||
@@ -218,4 +199,3 @@ * Returns a new channel which is the same as this one but applies the given | ||
*/ | ||
exports.contramapError = contramapError; | ||
const contramapErrorEffect = channel.contramapErrorEffect; | ||
const mapInputErrorEffect = exports.mapInputErrorEffect = channel.mapInputErrorEffect; | ||
/** | ||
@@ -228,4 +208,3 @@ * Returns a new channel which is the same as this one but applies the given | ||
*/ | ||
exports.contramapErrorEffect = contramapErrorEffect; | ||
const contramapIn = channel.contramapIn; | ||
const mapInputIn = exports.mapInputIn = channel.mapInputIn; | ||
/** | ||
@@ -238,4 +217,3 @@ * Returns a new channel which is the same as this one but applies the given | ||
*/ | ||
exports.contramapIn = contramapIn; | ||
const contramapInEffect = channel.contramapInEffect; | ||
const mapInputInEffect = exports.mapInputInEffect = channel.mapInputInEffect; | ||
/** | ||
@@ -253,4 +231,3 @@ * Returns a new channel, which is the same as this one, except that all the | ||
*/ | ||
exports.contramapInEffect = contramapInEffect; | ||
const doneCollect = channel.doneCollect; | ||
const doneCollect = exports.doneCollect = channel.doneCollect; | ||
/** | ||
@@ -263,4 +240,3 @@ * Returns a new channel which reads all the elements from upstream's output | ||
*/ | ||
exports.doneCollect = doneCollect; | ||
const drain = channel.drain; | ||
const drain = exports.drain = channel.drain; | ||
/** | ||
@@ -273,4 +249,3 @@ * Returns a new channel which connects the given `AsyncInputProducer` as | ||
*/ | ||
exports.drain = drain; | ||
const embedInput = core.embedInput; | ||
const embedInput = exports.embedInput = core.embedInput; | ||
/** | ||
@@ -283,4 +258,3 @@ * Returns a new channel that collects the output and terminal value of this | ||
*/ | ||
exports.embedInput = embedInput; | ||
const emitCollect = channel.emitCollect; | ||
const emitCollect = exports.emitCollect = channel.emitCollect; | ||
/** | ||
@@ -294,4 +268,3 @@ * Returns a new channel with an attached finalizer. The finalizer is | ||
*/ | ||
exports.emitCollect = emitCollect; | ||
const ensuring = channel.ensuring; | ||
const ensuring = exports.ensuring = channel.ensuring; | ||
/** | ||
@@ -305,4 +278,3 @@ * Returns a new channel with an attached finalizer. The finalizer is | ||
*/ | ||
exports.ensuring = ensuring; | ||
const ensuringWith = core.ensuringWith; | ||
const ensuringWith = exports.ensuringWith = core.ensuringWith; | ||
/** | ||
@@ -314,4 +286,3 @@ * Accesses the whole context of the channel. | ||
*/ | ||
exports.ensuringWith = ensuringWith; | ||
const context = channel.context; | ||
const context = exports.context = channel.context; | ||
/** | ||
@@ -323,4 +294,3 @@ * Accesses the context of the channel with the specified function. | ||
*/ | ||
exports.context = context; | ||
const contextWith = channel.contextWith; | ||
const contextWith = exports.contextWith = channel.contextWith; | ||
/** | ||
@@ -332,4 +302,3 @@ * Accesses the context of the channel in the context of a channel. | ||
*/ | ||
exports.contextWith = contextWith; | ||
const contextWithChannel = channel.contextWithChannel; | ||
const contextWithChannel = exports.contextWithChannel = channel.contextWithChannel; | ||
/** | ||
@@ -341,4 +310,3 @@ * Accesses the context of the channel in the context of an effect. | ||
*/ | ||
exports.contextWithChannel = contextWithChannel; | ||
const contextWithEffect = channel.contextWithEffect; | ||
const contextWithEffect = exports.contextWithEffect = channel.contextWithEffect; | ||
/** | ||
@@ -350,4 +318,3 @@ * Constructs a channel that fails immediately with the specified error. | ||
*/ | ||
exports.contextWithEffect = contextWithEffect; | ||
const fail = core.fail; | ||
const fail = exports.fail = core.fail; | ||
/** | ||
@@ -360,4 +327,3 @@ * Constructs a channel that succeeds immediately with the specified lazily | ||
*/ | ||
exports.fail = fail; | ||
const failSync = core.failSync; | ||
const failSync = exports.failSync = core.failSync; | ||
/** | ||
@@ -369,4 +335,3 @@ * Constructs a channel that fails immediately with the specified `Cause`. | ||
*/ | ||
exports.failSync = failSync; | ||
const failCause = core.failCause; | ||
const failCause = exports.failCause = core.failCause; | ||
/** | ||
@@ -379,4 +344,3 @@ * Constructs a channel that succeeds immediately with the specified lazily | ||
*/ | ||
exports.failCause = failCause; | ||
const failCauseSync = core.failCauseSync; | ||
const failCauseSync = exports.failCauseSync = core.failCauseSync; | ||
/** | ||
@@ -392,4 +356,3 @@ * Returns a new channel, which sequentially combines this channel, together | ||
*/ | ||
exports.failCauseSync = failCauseSync; | ||
const flatMap = core.flatMap; | ||
const flatMap = exports.flatMap = core.flatMap; | ||
/** | ||
@@ -403,4 +366,3 @@ * Returns a new channel, which flattens the terminal value of this channel. | ||
*/ | ||
exports.flatMap = flatMap; | ||
const flatten = channel.flatten; | ||
const flatten = exports.flatten = channel.flatten; | ||
/** | ||
@@ -412,4 +374,3 @@ * Folds over the result of this channel. | ||
*/ | ||
exports.flatten = flatten; | ||
const foldChannel = channel.foldChannel; | ||
const foldChannel = exports.foldChannel = channel.foldChannel; | ||
/** | ||
@@ -421,4 +382,3 @@ * Folds over the result of this channel including any cause of termination. | ||
*/ | ||
exports.foldChannel = foldChannel; | ||
const foldCauseChannel = core.foldCauseChannel; | ||
const foldCauseChannel = exports.foldCauseChannel = core.foldCauseChannel; | ||
/** | ||
@@ -430,4 +390,3 @@ * Use an effect to end a channel. | ||
*/ | ||
exports.foldCauseChannel = foldCauseChannel; | ||
const fromEffect = core.fromEffect; | ||
const fromEffect = exports.fromEffect = core.fromEffect; | ||
/** | ||
@@ -439,4 +398,3 @@ * Constructs a channel from an `Either`. | ||
*/ | ||
exports.fromEffect = fromEffect; | ||
const fromEither = channel.fromEither; | ||
const fromEither = exports.fromEither = channel.fromEither; | ||
/** | ||
@@ -448,4 +406,3 @@ * Construct a `Channel` from an `AsyncInputConsumer`. | ||
*/ | ||
exports.fromEither = fromEither; | ||
const fromInput = channel.fromInput; | ||
const fromInput = exports.fromInput = channel.fromInput; | ||
/** | ||
@@ -457,4 +414,3 @@ * Construct a `Channel` from a `Hub`. | ||
*/ | ||
exports.fromInput = fromInput; | ||
const fromHub = channel.fromHub; | ||
const fromHub = exports.fromHub = channel.fromHub; | ||
/** | ||
@@ -466,4 +422,3 @@ * Construct a `Channel` from a `Hub` within a scoped effect. | ||
*/ | ||
exports.fromHub = fromHub; | ||
const fromHubScoped = channel.fromHubScoped; | ||
const fromHubScoped = exports.fromHubScoped = channel.fromHubScoped; | ||
/** | ||
@@ -475,4 +430,3 @@ * Construct a `Channel` from an `Option`. | ||
*/ | ||
exports.fromHubScoped = fromHubScoped; | ||
const fromOption = channel.fromOption; | ||
const fromOption = exports.fromOption = channel.fromOption; | ||
/** | ||
@@ -484,4 +438,3 @@ * Construct a `Channel` from a `Queue`. | ||
*/ | ||
exports.fromOption = fromOption; | ||
const fromQueue = channel.fromQueue; | ||
const fromQueue = exports.fromQueue = channel.fromQueue; | ||
/** | ||
@@ -491,4 +444,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.fromQueue = fromQueue; | ||
const identity = channel.identityChannel; | ||
const identity = exports.identity = channel.identityChannel; | ||
/** | ||
@@ -506,4 +458,3 @@ * Returns a new channel, which is the same as this one, except it will be | ||
*/ | ||
exports.identity = identity; | ||
const interruptWhen = channel.interruptWhen; | ||
const interruptWhen = exports.interruptWhen = channel.interruptWhen; | ||
/** | ||
@@ -520,4 +471,3 @@ * Returns a new channel, which is the same as this one, except it will be | ||
*/ | ||
exports.interruptWhen = interruptWhen; | ||
const interruptWhenDeferred = channel.interruptWhenDeferred; | ||
const interruptWhenDeferred = exports.interruptWhenDeferred = channel.interruptWhenDeferred; | ||
/** | ||
@@ -531,4 +481,3 @@ * Returns a new channel, which is the same as this one, except the terminal | ||
*/ | ||
exports.interruptWhenDeferred = interruptWhenDeferred; | ||
const map = channel.map; | ||
const map = exports.map = channel.map; | ||
/** | ||
@@ -542,4 +491,3 @@ * Returns a new channel, which is the same as this one, except the terminal | ||
*/ | ||
exports.map = map; | ||
const mapEffect = channel.mapEffect; | ||
const mapEffect = exports.mapEffect = channel.mapEffect; | ||
/** | ||
@@ -553,4 +501,3 @@ * Returns a new channel, which is the same as this one, except the failure | ||
*/ | ||
exports.mapEffect = mapEffect; | ||
const mapError = channel.mapError; | ||
const mapError = exports.mapError = channel.mapError; | ||
/** | ||
@@ -563,4 +510,3 @@ * A more powerful version of `mapError` which also surfaces the `Cause` | ||
*/ | ||
exports.mapError = mapError; | ||
const mapErrorCause = channel.mapErrorCause; | ||
const mapErrorCause = exports.mapErrorCause = channel.mapErrorCause; | ||
/** | ||
@@ -572,4 +518,3 @@ * Maps the output of this channel using the specified function. | ||
*/ | ||
exports.mapErrorCause = mapErrorCause; | ||
const mapOut = channel.mapOut; | ||
const mapOut = exports.mapOut = channel.mapOut; | ||
/** | ||
@@ -582,4 +527,3 @@ * Creates a channel that is like this channel but the given effectful function | ||
*/ | ||
exports.mapOut = mapOut; | ||
const mapOutEffect = channel.mapOutEffect; | ||
const mapOutEffect = exports.mapOutEffect = channel.mapOutEffect; | ||
/** | ||
@@ -593,4 +537,3 @@ * Creates a channel that is like this channel but the given ZIO function gets | ||
*/ | ||
exports.mapOutEffect = mapOutEffect; | ||
const mapOutEffectPar = channel.mapOutEffectPar; | ||
const mapOutEffectPar = exports.mapOutEffectPar = channel.mapOutEffectPar; | ||
/** | ||
@@ -600,4 +543,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.mapOutEffectPar = mapOutEffectPar; | ||
const mergeAll = channel.mergeAll; | ||
const mergeAll = exports.mergeAll = channel.mergeAll; | ||
/** | ||
@@ -607,4 +549,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.mergeAll = mergeAll; | ||
const mergeAllUnbounded = channel.mergeAllUnbounded; | ||
const mergeAllUnbounded = exports.mergeAllUnbounded = channel.mergeAllUnbounded; | ||
/** | ||
@@ -614,4 +555,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.mergeAllUnbounded = mergeAllUnbounded; | ||
const mergeAllUnboundedWith = channel.mergeAllUnboundedWith; | ||
const mergeAllUnboundedWith = exports.mergeAllUnboundedWith = channel.mergeAllUnboundedWith; | ||
/** | ||
@@ -621,4 +561,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.mergeAllUnboundedWith = mergeAllUnboundedWith; | ||
const mergeAllWith = channel.mergeAllWith; | ||
const mergeAllWith = exports.mergeAllWith = channel.mergeAllWith; | ||
/** | ||
@@ -635,4 +574,3 @@ * Returns a new channel which creates a new channel for each emitted element | ||
*/ | ||
exports.mergeAllWith = mergeAllWith; | ||
const mergeMap = channel.mergeMap; | ||
const mergeMap = exports.mergeMap = channel.mergeMap; | ||
/** | ||
@@ -645,4 +583,3 @@ * Returns a new channel which merges a number of channels emitted by this | ||
*/ | ||
exports.mergeMap = mergeMap; | ||
const mergeOut = channel.mergeOut; | ||
const mergeOut = exports.mergeOut = channel.mergeOut; | ||
/** | ||
@@ -657,4 +594,3 @@ * Returns a new channel which merges a number of channels emitted by this | ||
*/ | ||
exports.mergeOut = mergeOut; | ||
const mergeOutWith = channel.mergeOutWith; | ||
const mergeOutWith = exports.mergeOutWith = channel.mergeOutWith; | ||
/** | ||
@@ -669,4 +605,3 @@ * Returns a new channel, which is the merge of this channel and the specified | ||
*/ | ||
exports.mergeOutWith = mergeOutWith; | ||
const mergeWith = channel.mergeWith; | ||
const mergeWith = exports.mergeWith = channel.mergeWith; | ||
/** | ||
@@ -678,4 +613,3 @@ * Returns a channel that never completes | ||
*/ | ||
exports.mergeWith = mergeWith; | ||
const never = channel.never; | ||
const never = exports.never = channel.never; | ||
/** | ||
@@ -688,4 +622,3 @@ * Translates channel failure into death of the fiber, making all failures | ||
*/ | ||
exports.never = never; | ||
const orDie = channel.orDie; | ||
const orDie = exports.orDie = channel.orDie; | ||
/** | ||
@@ -698,4 +631,3 @@ * Keeps none of the errors, and terminates the fiber with them, using the | ||
*/ | ||
exports.orDie = orDie; | ||
const orDieWith = channel.orDieWith; | ||
const orDieWith = exports.orDieWith = channel.orDieWith; | ||
/** | ||
@@ -709,4 +641,3 @@ * Returns a new channel that will perform the operations of this one, until | ||
*/ | ||
exports.orDieWith = orDieWith; | ||
const orElse = channel.orElse; | ||
const orElse = exports.orElse = channel.orElse; | ||
/** | ||
@@ -721,4 +652,3 @@ * Returns a new channel that pipes the output of this channel into the | ||
*/ | ||
exports.orElse = orElse; | ||
const pipeTo = core.pipeTo; | ||
const pipeTo = exports.pipeTo = core.pipeTo; | ||
/** | ||
@@ -732,4 +662,3 @@ * Returns a new channel that pipes the output of this channel into the | ||
*/ | ||
exports.pipeTo = pipeTo; | ||
const pipeToOrFail = channel.pipeToOrFail; | ||
const pipeToOrFail = exports.pipeToOrFail = channel.pipeToOrFail; | ||
/** | ||
@@ -742,4 +671,3 @@ * Provides the channel with its required context, which eliminates its | ||
*/ | ||
exports.pipeToOrFail = pipeToOrFail; | ||
const provideContext = core.provideContext; | ||
const provideContext = exports.provideContext = core.provideContext; | ||
/** | ||
@@ -751,4 +679,3 @@ * Provides a layer to the channel, which translates it to another level. | ||
*/ | ||
exports.provideContext = provideContext; | ||
const provideLayer = channel.provideLayer; | ||
const provideLayer = exports.provideLayer = channel.provideLayer; | ||
/** | ||
@@ -761,4 +688,3 @@ * Transforms the context being provided to the channel with the specified | ||
*/ | ||
exports.provideLayer = provideLayer; | ||
const contramapContext = channel.contramapContext; | ||
const mapInputContext = exports.mapInputContext = channel.mapInputContext; | ||
/** | ||
@@ -771,4 +697,3 @@ * Splits the context into two parts, providing one part using the | ||
*/ | ||
exports.contramapContext = contramapContext; | ||
const provideSomeLayer = channel.provideSomeLayer; | ||
const provideSomeLayer = exports.provideSomeLayer = channel.provideSomeLayer; | ||
/** | ||
@@ -781,4 +706,3 @@ * Provides the effect with the single service it requires. If the effect | ||
*/ | ||
exports.provideSomeLayer = provideSomeLayer; | ||
const provideService = channel.provideService; | ||
const provideService = exports.provideService = channel.provideService; | ||
/** | ||
@@ -788,4 +712,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.provideService = provideService; | ||
const read = channel.read; | ||
const read = exports.read = channel.read; | ||
/** | ||
@@ -795,4 +718,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.read = read; | ||
const readOrFail = core.readOrFail; | ||
const readOrFail = exports.readOrFail = core.readOrFail; | ||
/** | ||
@@ -802,4 +724,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.readOrFail = readOrFail; | ||
const readWith = core.readWith; | ||
const readWith = exports.readWith = core.readWith; | ||
/** | ||
@@ -809,4 +730,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.readWith = readWith; | ||
const readWithCause = core.readWithCause; | ||
const readWithCause = exports.readWithCause = core.readWithCause; | ||
/** | ||
@@ -818,4 +738,3 @@ * Creates a channel which repeatedly runs this channel. | ||
*/ | ||
exports.readWithCause = readWithCause; | ||
const repeated = channel.repeated; | ||
const repeated = exports.repeated = channel.repeated; | ||
/** | ||
@@ -827,4 +746,3 @@ * Runs a channel until the end is received. | ||
*/ | ||
exports.repeated = repeated; | ||
const run = channel.run; | ||
const run = exports.run = channel.run; | ||
/** | ||
@@ -839,4 +757,3 @@ * Run the channel until it finishes with a done value or fails with an error | ||
*/ | ||
exports.run = run; | ||
const runCollect = channel.runCollect; | ||
const runCollect = exports.runCollect = channel.runCollect; | ||
/** | ||
@@ -848,4 +765,3 @@ * Runs a channel until the end is received. | ||
*/ | ||
exports.runCollect = runCollect; | ||
const runDrain = channel.runDrain; | ||
const runDrain = exports.runDrain = channel.runDrain; | ||
/** | ||
@@ -857,4 +773,3 @@ * Use a scoped effect to emit an output element. | ||
*/ | ||
exports.runDrain = runDrain; | ||
const scoped = channel.scoped; | ||
const scoped = exports.scoped = channel.scoped; | ||
/** | ||
@@ -866,4 +781,3 @@ * Constructs a channel that succeeds immediately with the specified value. | ||
*/ | ||
exports.scoped = scoped; | ||
const succeed = core.succeed; | ||
const succeed = exports.succeed = core.succeed; | ||
/** | ||
@@ -875,4 +789,3 @@ * Constructs a channel that succeeds immediately with the specified lazy value. | ||
*/ | ||
exports.succeed = succeed; | ||
const sync = core.sync; | ||
const sync = exports.sync = core.sync; | ||
/** | ||
@@ -884,4 +797,3 @@ * Converts a `Channel` to a `Hub`. | ||
*/ | ||
exports.sync = sync; | ||
const toHub = channel.toHub; | ||
const toHub = exports.toHub = channel.toHub; | ||
/** | ||
@@ -896,4 +808,3 @@ * Returns a scoped `Effect` that can be used to repeatedly pull elements from | ||
*/ | ||
exports.toHub = toHub; | ||
const toPull = channel.toPull; | ||
const toPull = exports.toPull = channel.toPull; | ||
/** | ||
@@ -905,4 +816,3 @@ * Converts a `Channel` to a `Queue`. | ||
*/ | ||
exports.toPull = toPull; | ||
const toQueue = channel.toQueue; | ||
const toQueue = exports.toQueue = channel.toQueue; | ||
/** Converts this channel to a `Sink`. | ||
@@ -913,4 +823,3 @@ * | ||
*/ | ||
exports.toQueue = toQueue; | ||
const toSink = sink.channelToSink; | ||
const toSink = exports.toSink = sink.channelToSink; | ||
/** | ||
@@ -922,4 +831,3 @@ * Converts this channel to a `Stream`. | ||
*/ | ||
exports.toSink = toSink; | ||
const toStream = stream.channelToStream; | ||
const toStream = exports.toStream = stream.channelToStream; | ||
/** | ||
@@ -929,4 +837,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.toStream = toStream; | ||
const unit = core.unit; | ||
const unit = exports.unit = core.unit; | ||
/** | ||
@@ -938,4 +845,3 @@ * Makes a channel from an effect that returns a channel in case of success. | ||
*/ | ||
exports.unit = unit; | ||
const unwrap = channel.unwrap; | ||
const unwrap = exports.unwrap = channel.unwrap; | ||
/** | ||
@@ -947,4 +853,3 @@ * Makes a channel from a managed that returns a channel in case of success. | ||
*/ | ||
exports.unwrap = unwrap; | ||
const unwrapScoped = channel.unwrapScoped; | ||
const unwrapScoped = exports.unwrapScoped = channel.unwrapScoped; | ||
/** | ||
@@ -956,4 +861,3 @@ * Updates a service in the context of this channel. | ||
*/ | ||
exports.unwrapScoped = unwrapScoped; | ||
const updateService = channel.updateService; | ||
const updateService = exports.updateService = channel.updateService; | ||
/** | ||
@@ -965,4 +869,3 @@ * Wraps the channel with a new span for tracing. | ||
*/ | ||
exports.updateService = updateService; | ||
const withSpan = channel.withSpan; | ||
const withSpan = exports.withSpan = channel.withSpan; | ||
/** | ||
@@ -974,4 +877,3 @@ * Writes a single value to the channel. | ||
*/ | ||
exports.withSpan = withSpan; | ||
const write = core.write; | ||
const write = exports.write = core.write; | ||
/** | ||
@@ -983,4 +885,3 @@ * Writes a sequence of values to the channel. | ||
*/ | ||
exports.write = write; | ||
const writeAll = channel.writeAll; | ||
const writeAll = exports.writeAll = channel.writeAll; | ||
/** | ||
@@ -992,4 +893,3 @@ * Writes a `Chunk` of values to the channel. | ||
*/ | ||
exports.writeAll = writeAll; | ||
const writeChunk = channel.writeChunk; | ||
const writeChunk = exports.writeChunk = channel.writeChunk; | ||
/** | ||
@@ -1003,4 +903,3 @@ * Returns a new channel that is the sequential composition of this channel | ||
*/ | ||
exports.writeChunk = writeChunk; | ||
const zip = channel.zip; | ||
const zip = exports.zip = channel.zip; | ||
/** | ||
@@ -1014,4 +913,3 @@ * Returns a new channel that is the sequential composition of this channel | ||
*/ | ||
exports.zip = zip; | ||
const zipLeft = channel.zipLeft; | ||
const zipLeft = exports.zipLeft = channel.zipLeft; | ||
/** | ||
@@ -1025,4 +923,3 @@ * Returns a new channel that is the sequential composition of this channel | ||
*/ | ||
exports.zipLeft = zipLeft; | ||
const zipRight = channel.zipRight; | ||
const zipRight = exports.zipRight = channel.zipRight; | ||
/** | ||
@@ -1035,4 +932,3 @@ * Represents a generic checked exception which occurs when a `Channel` is | ||
*/ | ||
exports.zipRight = zipRight; | ||
const ChannelException = channel.ChannelException; | ||
const ChannelException = exports.ChannelException = channel.ChannelException; | ||
/** | ||
@@ -1045,5 +941,3 @@ * Returns `true` if the specified value is an `ChannelException`, `false` | ||
*/ | ||
exports.ChannelException = ChannelException; | ||
const isChannelException = channel.isChannelException; | ||
exports.isChannelException = isChannelException; | ||
const isChannelException = exports.isChannelException = channel.isChannelException; | ||
//# sourceMappingURL=Channel.js.map |
@@ -18,3 +18,3 @@ "use strict"; | ||
*/ | ||
const ChildExecutorDecisionTypeId = internal.ChildExecutorDecisionTypeId; | ||
const ChildExecutorDecisionTypeId = exports.ChildExecutorDecisionTypeId = internal.ChildExecutorDecisionTypeId; | ||
/** | ||
@@ -24,4 +24,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.ChildExecutorDecisionTypeId = ChildExecutorDecisionTypeId; | ||
const Continue = internal.Continue; | ||
const Continue = exports.Continue = internal.Continue; | ||
/** | ||
@@ -31,4 +30,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Continue = Continue; | ||
const Close = internal.Close; | ||
const Close = exports.Close = internal.Close; | ||
/** | ||
@@ -38,4 +36,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Close = Close; | ||
const Yield = internal.Yield; | ||
const Yield = exports.Yield = internal.Yield; | ||
/** | ||
@@ -48,4 +45,3 @@ * Returns `true` if the specified value is a `ChildExecutorDecision`, `false` | ||
*/ | ||
exports.Yield = Yield; | ||
const isChildExecutorDecision = internal.isChildExecutorDecision; | ||
const isChildExecutorDecision = exports.isChildExecutorDecision = internal.isChildExecutorDecision; | ||
/** | ||
@@ -58,4 +54,3 @@ * Returns `true` if the specified `ChildExecutorDecision` is a `Continue`, | ||
*/ | ||
exports.isChildExecutorDecision = isChildExecutorDecision; | ||
const isContinue = internal.isContinue; | ||
const isContinue = exports.isContinue = internal.isContinue; | ||
/** | ||
@@ -68,4 +63,3 @@ * Returns `true` if the specified `ChildExecutorDecision` is a `Close`, `false` | ||
*/ | ||
exports.isContinue = isContinue; | ||
const isClose = internal.isClose; | ||
const isClose = exports.isClose = internal.isClose; | ||
/** | ||
@@ -78,4 +72,3 @@ * Returns `true` if the specified `ChildExecutorDecision` is a `Yield`, `false` | ||
*/ | ||
exports.isClose = isClose; | ||
const isYield = internal.isYield; | ||
const isYield = exports.isYield = internal.isYield; | ||
/** | ||
@@ -87,5 +80,3 @@ * Folds over a `ChildExecutorDecision` to produce a value of type `A`. | ||
*/ | ||
exports.isYield = isYield; | ||
const match = internal.match; | ||
exports.match = match; | ||
const match = exports.match = internal.match; | ||
//# sourceMappingURL=ChildExecutorDecision.js.map |
@@ -14,3 +14,3 @@ "use strict"; | ||
*/ | ||
const MergeDecisionTypeId = internal.MergeDecisionTypeId; | ||
const MergeDecisionTypeId = exports.MergeDecisionTypeId = internal.MergeDecisionTypeId; | ||
/** | ||
@@ -20,4 +20,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.MergeDecisionTypeId = MergeDecisionTypeId; | ||
const Done = internal.Done; | ||
const Done = exports.Done = internal.Done; | ||
/** | ||
@@ -27,4 +26,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Done = Done; | ||
const Await = internal.Await; | ||
const Await = exports.Await = internal.Await; | ||
/** | ||
@@ -34,4 +32,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Await = Await; | ||
const AwaitConst = internal.AwaitConst; | ||
const AwaitConst = exports.AwaitConst = internal.AwaitConst; | ||
/** | ||
@@ -44,4 +41,3 @@ * Returns `true` if the specified value is a `MergeDecision`, `false` | ||
*/ | ||
exports.AwaitConst = AwaitConst; | ||
const isMergeDecision = internal.isMergeDecision; | ||
const isMergeDecision = exports.isMergeDecision = internal.isMergeDecision; | ||
/** | ||
@@ -51,5 +47,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.isMergeDecision = isMergeDecision; | ||
const match = internal.match; | ||
exports.match = match; | ||
const match = exports.match = internal.match; | ||
//# sourceMappingURL=MergeDecision.js.map |
@@ -14,3 +14,3 @@ "use strict"; | ||
*/ | ||
const MergeStateTypeId = internal.MergeStateTypeId; | ||
const MergeStateTypeId = exports.MergeStateTypeId = internal.MergeStateTypeId; | ||
/** | ||
@@ -20,4 +20,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.MergeStateTypeId = MergeStateTypeId; | ||
const BothRunning = internal.BothRunning; | ||
const BothRunning = exports.BothRunning = internal.BothRunning; | ||
/** | ||
@@ -27,4 +26,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.BothRunning = BothRunning; | ||
const LeftDone = internal.LeftDone; | ||
const LeftDone = exports.LeftDone = internal.LeftDone; | ||
/** | ||
@@ -34,4 +32,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.LeftDone = LeftDone; | ||
const RightDone = internal.RightDone; | ||
const RightDone = exports.RightDone = internal.RightDone; | ||
/** | ||
@@ -43,4 +40,3 @@ * Returns `true` if the specified value is a `MergeState`, `false` otherwise. | ||
*/ | ||
exports.RightDone = RightDone; | ||
const isMergeState = internal.isMergeState; | ||
const isMergeState = exports.isMergeState = internal.isMergeState; | ||
/** | ||
@@ -53,4 +49,3 @@ * Returns `true` if the specified `MergeState` is a `BothRunning`, `false` | ||
*/ | ||
exports.isMergeState = isMergeState; | ||
const isBothRunning = internal.isBothRunning; | ||
const isBothRunning = exports.isBothRunning = internal.isBothRunning; | ||
/** | ||
@@ -63,4 +58,3 @@ * Returns `true` if the specified `MergeState` is a `LeftDone`, `false` | ||
*/ | ||
exports.isBothRunning = isBothRunning; | ||
const isLeftDone = internal.isLeftDone; | ||
const isLeftDone = exports.isLeftDone = internal.isLeftDone; | ||
/** | ||
@@ -73,4 +67,3 @@ * Returns `true` if the specified `MergeState` is a `RightDone`, `false` | ||
*/ | ||
exports.isLeftDone = isLeftDone; | ||
const isRightDone = internal.isRightDone; | ||
const isRightDone = exports.isRightDone = internal.isRightDone; | ||
/** | ||
@@ -80,5 +73,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.isRightDone = isRightDone; | ||
const match = internal.match; | ||
exports.match = match; | ||
const match = exports.match = internal.match; | ||
//# sourceMappingURL=MergeState.js.map |
@@ -18,3 +18,3 @@ "use strict"; | ||
*/ | ||
const MergeStrategyTypeId = internal.MergeStrategyTypeId; | ||
const MergeStrategyTypeId = exports.MergeStrategyTypeId = internal.MergeStrategyTypeId; | ||
/** | ||
@@ -24,4 +24,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.MergeStrategyTypeId = MergeStrategyTypeId; | ||
const BackPressure = internal.BackPressure; | ||
const BackPressure = exports.BackPressure = internal.BackPressure; | ||
/** | ||
@@ -31,4 +30,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.BackPressure = BackPressure; | ||
const BufferSliding = internal.BufferSliding; | ||
const BufferSliding = exports.BufferSliding = internal.BufferSliding; | ||
/** | ||
@@ -41,4 +39,3 @@ * Returns `true` if the specified value is a `MergeStrategy`, `false` | ||
*/ | ||
exports.BufferSliding = BufferSliding; | ||
const isMergeStrategy = internal.isMergeStrategy; | ||
const isMergeStrategy = exports.isMergeStrategy = internal.isMergeStrategy; | ||
/** | ||
@@ -51,4 +48,3 @@ * Returns `true` if the specified `MergeStrategy` is a `BackPressure`, `false` | ||
*/ | ||
exports.isMergeStrategy = isMergeStrategy; | ||
const isBackPressure = internal.isBackPressure; | ||
const isBackPressure = exports.isBackPressure = internal.isBackPressure; | ||
/** | ||
@@ -61,4 +57,3 @@ * Returns `true` if the specified `MergeStrategy` is a `BufferSliding`, `false` | ||
*/ | ||
exports.isBackPressure = isBackPressure; | ||
const isBufferSliding = internal.isBufferSliding; | ||
const isBufferSliding = exports.isBufferSliding = internal.isBufferSliding; | ||
/** | ||
@@ -70,5 +65,3 @@ * Folds an `MergeStrategy` into a value of type `A`. | ||
*/ | ||
exports.isBufferSliding = isBufferSliding; | ||
const match = internal.match; | ||
exports.match = match; | ||
const match = exports.match = internal.match; | ||
//# sourceMappingURL=MergeStrategy.js.map |
@@ -14,4 +14,3 @@ "use strict"; | ||
*/ | ||
const make = internal.make; | ||
exports.make = make; | ||
const make = exports.make = internal.make; | ||
//# sourceMappingURL=SingleProducerAsyncInput.js.map |
@@ -18,3 +18,3 @@ "use strict"; | ||
*/ | ||
const UpstreamPullRequestTypeId = internal.UpstreamPullRequestTypeId; | ||
const UpstreamPullRequestTypeId = exports.UpstreamPullRequestTypeId = internal.UpstreamPullRequestTypeId; | ||
/** | ||
@@ -24,4 +24,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.UpstreamPullRequestTypeId = UpstreamPullRequestTypeId; | ||
const Pulled = internal.Pulled; | ||
const Pulled = exports.Pulled = internal.Pulled; | ||
/** | ||
@@ -31,4 +30,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Pulled = Pulled; | ||
const NoUpstream = internal.NoUpstream; | ||
const NoUpstream = exports.NoUpstream = internal.NoUpstream; | ||
/** | ||
@@ -41,4 +39,3 @@ * Returns `true` if the specified value is an `UpstreamPullRequest`, `false` | ||
*/ | ||
exports.NoUpstream = NoUpstream; | ||
const isUpstreamPullRequest = internal.isUpstreamPullRequest; | ||
const isUpstreamPullRequest = exports.isUpstreamPullRequest = internal.isUpstreamPullRequest; | ||
/** | ||
@@ -51,4 +48,3 @@ * Returns `true` if the specified `UpstreamPullRequest` is a `Pulled`, `false` | ||
*/ | ||
exports.isUpstreamPullRequest = isUpstreamPullRequest; | ||
const isPulled = internal.isPulled; | ||
const isPulled = exports.isPulled = internal.isPulled; | ||
/** | ||
@@ -61,4 +57,3 @@ * Returns `true` if the specified `UpstreamPullRequest` is a `NoUpstream`, | ||
*/ | ||
exports.isPulled = isPulled; | ||
const isNoUpstream = internal.isNoUpstream; | ||
const isNoUpstream = exports.isNoUpstream = internal.isNoUpstream; | ||
/** | ||
@@ -70,5 +65,3 @@ * Folds an `UpstreamPullRequest<A>` into a value of type `Z`. | ||
*/ | ||
exports.isNoUpstream = isNoUpstream; | ||
const match = internal.match; | ||
exports.match = match; | ||
const match = exports.match = internal.match; | ||
//# sourceMappingURL=UpstreamPullRequest.js.map |
@@ -14,3 +14,3 @@ "use strict"; | ||
*/ | ||
const UpstreamPullStrategyTypeId = internal.UpstreamPullStrategyTypeId; | ||
const UpstreamPullStrategyTypeId = exports.UpstreamPullStrategyTypeId = internal.UpstreamPullStrategyTypeId; | ||
/** | ||
@@ -20,4 +20,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.UpstreamPullStrategyTypeId = UpstreamPullStrategyTypeId; | ||
const PullAfterNext = internal.PullAfterNext; | ||
const PullAfterNext = exports.PullAfterNext = internal.PullAfterNext; | ||
/** | ||
@@ -27,4 +26,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.PullAfterNext = PullAfterNext; | ||
const PullAfterAllEnqueued = internal.PullAfterAllEnqueued; | ||
const PullAfterAllEnqueued = exports.PullAfterAllEnqueued = internal.PullAfterAllEnqueued; | ||
/** | ||
@@ -37,4 +35,3 @@ * Returns `true` if the specified value is an `UpstreamPullStrategy`, `false` | ||
*/ | ||
exports.PullAfterAllEnqueued = PullAfterAllEnqueued; | ||
const isUpstreamPullStrategy = internal.isUpstreamPullStrategy; | ||
const isUpstreamPullStrategy = exports.isUpstreamPullStrategy = internal.isUpstreamPullStrategy; | ||
/** | ||
@@ -47,4 +44,3 @@ * Returns `true` if the specified `UpstreamPullStrategy` is a `PullAfterNext`, | ||
*/ | ||
exports.isUpstreamPullStrategy = isUpstreamPullStrategy; | ||
const isPullAfterNext = internal.isPullAfterNext; | ||
const isPullAfterNext = exports.isPullAfterNext = internal.isPullAfterNext; | ||
/** | ||
@@ -57,4 +53,3 @@ * Returns `true` if the specified `UpstreamPullStrategy` is a | ||
*/ | ||
exports.isPullAfterNext = isPullAfterNext; | ||
const isPullAfterAllEnqueued = internal.isPullAfterAllEnqueued; | ||
const isPullAfterAllEnqueued = exports.isPullAfterAllEnqueued = internal.isPullAfterAllEnqueued; | ||
/** | ||
@@ -66,5 +61,3 @@ * Folds an `UpstreamPullStrategy<A>` into a value of type `Z`. | ||
*/ | ||
exports.isPullAfterAllEnqueued = isPullAfterAllEnqueued; | ||
const match = internal.match; | ||
exports.match = match; | ||
const match = exports.match = internal.match; | ||
//# sourceMappingURL=UpstreamPullStrategy.js.map |
@@ -55,16 +55,10 @@ /** | ||
export declare const evaluate: { | ||
<K, E, V, R2, E2, A>(f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>): <R>(self: GroupBy<R, E, K, V>) => Stream.Stream<R2 | R, E | E2, A>; | ||
<R, K, E, V, R2, E2, A>(self: GroupBy<R, E, K, V>, f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>): Stream.Stream<R | R2, E | E2, A>; | ||
<K, E, V, R2, E2, A>(f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, options?: { | ||
readonly bufferSize?: number; | ||
}): <R>(self: GroupBy<R, E, K, V>) => Stream.Stream<R2 | R, E | E2, A>; | ||
<R, K, E, V, R2, E2, A>(self: GroupBy<R, E, K, V>, f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, options?: { | ||
readonly bufferSize?: number; | ||
}): Stream.Stream<R | R2, E | E2, A>; | ||
}; | ||
/** | ||
* Like `evaluate`, but with a configurable `bufferSize` parameter. | ||
* | ||
* @since 1.0.0 | ||
* @category destructors | ||
*/ | ||
export declare const evaluateBuffer: { | ||
<K, E, V, R2, E2, A>(f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, bufferSize: number): <R>(self: GroupBy<R, E, K, V>) => Stream.Stream<R2 | R, E | E2, A>; | ||
<R, K, E, V, R2, E2, A>(self: GroupBy<R, E, K, V>, f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, bufferSize: number): Stream.Stream<R | R2, E | E2, A>; | ||
}; | ||
/** | ||
* Filter the groups to be processed. | ||
@@ -71,0 +65,0 @@ * |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.make = exports.first = exports.filter = exports.evaluateBuffer = exports.evaluate = exports.GroupByTypeId = void 0; | ||
exports.make = exports.first = exports.filter = exports.evaluate = exports.GroupByTypeId = void 0; | ||
var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stream/internal/groupBy")); | ||
@@ -15,3 +15,3 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
*/ | ||
const GroupByTypeId = internal.GroupByTypeId; | ||
const GroupByTypeId = exports.GroupByTypeId = internal.GroupByTypeId; | ||
/** | ||
@@ -24,13 +24,4 @@ * Run the function across all groups, collecting the results in an | ||
*/ | ||
exports.GroupByTypeId = GroupByTypeId; | ||
const evaluate = internal.evaluate; | ||
const evaluate = exports.evaluate = internal.evaluate; | ||
/** | ||
* Like `evaluate`, but with a configurable `bufferSize` parameter. | ||
* | ||
* @since 1.0.0 | ||
* @category destructors | ||
*/ | ||
exports.evaluate = evaluate; | ||
const evaluateBuffer = internal.evaluateBuffer; | ||
/** | ||
* Filter the groups to be processed. | ||
@@ -41,4 +32,3 @@ * | ||
*/ | ||
exports.evaluateBuffer = evaluateBuffer; | ||
const filter = internal.filter; | ||
const filter = exports.filter = internal.filter; | ||
/** | ||
@@ -50,4 +40,3 @@ * Only consider the first `n` groups found in the `Stream`. | ||
*/ | ||
exports.filter = filter; | ||
const first = internal.first; | ||
const first = exports.first = internal.first; | ||
/** | ||
@@ -59,5 +48,3 @@ * Constructs a `GroupBy` from a `Stream`. | ||
*/ | ||
exports.first = first; | ||
const make = internal.make; | ||
exports.make = make; | ||
const make = exports.make = internal.make; | ||
//# sourceMappingURL=GroupBy.js.map |
import * as Effect from "@effect/io/Effect"; | ||
import type * as Channel from "@effect/stream/Channel"; | ||
export declare const contramapInEffect: (<Env1, InErr, InElem0, InElem>(f: (a: InElem0) => Effect.Effect<Env1, InErr, InElem>) => <Env, InDone, OutErr, OutElem, OutDone>(self: Channel.Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>) => Channel.Channel<Env1 | Env, InErr, InElem0, InDone, OutErr, OutElem, OutDone>) & (<Env_1, InDone_1, OutErr_1, OutElem_1, OutDone_1, Env1_1, InErr_1, InElem0_1, InElem_1>(self: Channel.Channel<Env_1, InErr_1, InElem_1, InDone_1, OutErr_1, OutElem_1, OutDone_1>, f: (a: InElem0_1) => Effect.Effect<Env1_1, InErr_1, InElem_1>) => Channel.Channel<Env_1 | Env1_1, InErr_1, InElem0_1, InDone_1, OutErr_1, OutElem_1, OutDone_1>); | ||
export declare const mapInputInEffect: (<Env1, InErr, InElem0, InElem>(f: (a: InElem0) => Effect.Effect<Env1, InErr, InElem>) => <Env, InDone, OutErr, OutElem, OutDone>(self: Channel.Channel<Env, InErr, InElem, InDone, OutErr, OutElem, OutDone>) => Channel.Channel<Env1 | Env, InErr, InElem0, InDone, OutErr, OutElem, OutDone>) & (<Env_1, InDone_1, OutErr_1, OutElem_1, OutDone_1, Env1_1, InErr_1, InElem0_1, InElem_1>(self: Channel.Channel<Env_1, InErr_1, InElem_1, InDone_1, OutErr_1, OutElem_1, OutDone_1>, f: (a: InElem0_1) => Effect.Effect<Env1_1, InErr_1, InElem_1>) => Channel.Channel<Env_1 | Env1_1, InErr_1, InElem0_1, InDone_1, OutErr_1, OutElem_1, OutDone_1>); | ||
//# sourceMappingURL=channel.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.zipRight = exports.zipLeft = exports.zip = exports.writeChunk = exports.writeAll = exports.withSpan = exports.updateService = exports.unwrapScoped = exports.unwrap = exports.toQueue = exports.toPull = exports.toHub = exports.serviceWithEffect = exports.serviceWithChannel = exports.serviceWith = exports.service = exports.scoped = exports.runDrain = exports.runCollect = exports.run = exports.repeated = exports.read = exports.provideSomeLayer = exports.provideService = exports.provideLayer = exports.pipeToOrFail = exports.orElse = exports.orDieWith = exports.orDie = exports.never = exports.mergeWith = exports.mergeOutWith = exports.mergeOut = exports.mergeMap = exports.mergeAllWith = exports.mergeAllUnboundedWith = exports.mergeAllUnbounded = exports.mergeAll = exports.mapOutEffectPar = exports.mapOutEffect = exports.mapOut = exports.mapErrorCause = exports.mapError = exports.mapEffect = exports.map = exports.isChannelException = exports.interruptWhenDeferred = exports.interruptWhen = exports.identityChannel = exports.fromQueue = exports.fromOption = exports.fromInput = exports.fromHubScoped = exports.fromHub = exports.fromEither = exports.foldChannel = exports.flatten = exports.ensuring = exports.emitCollect = exports.drain = exports.doneCollect = exports.contramapInEffect = exports.contramapIn = exports.contramapErrorEffect = exports.contramapError = exports.contramapEffect = exports.contramapContext = exports.contramap = exports.contextWithEffect = exports.contextWithChannel = exports.contextWith = exports.context = exports.concatOut = exports.concatMap = exports.collect = exports.catchAll = exports.bufferChunk = exports.buffer = exports.asUnit = exports.as = exports.acquireUseRelease = exports.ChannelExceptionTypeId = exports.ChannelException = void 0; | ||
exports.zipRight = exports.zipLeft = exports.zip = exports.writeChunk = exports.writeAll = exports.withSpan = exports.updateService = exports.unwrapScoped = exports.unwrap = exports.toQueue = exports.toPull = exports.toHub = exports.serviceWithEffect = exports.serviceWithChannel = exports.serviceWith = exports.service = exports.scoped = exports.runDrain = exports.runCollect = exports.run = exports.repeated = exports.read = exports.provideSomeLayer = exports.provideService = exports.provideLayer = exports.pipeToOrFail = exports.orElse = exports.orDieWith = exports.orDie = exports.never = exports.mergeWith = exports.mergeOutWith = exports.mergeOut = exports.mergeMap = exports.mergeAllWith = exports.mergeAllUnboundedWith = exports.mergeAllUnbounded = exports.mergeAll = exports.mapOutEffectPar = exports.mapOutEffect = exports.mapOut = exports.mapInputInEffect = exports.mapInputIn = exports.mapInputErrorEffect = exports.mapInputError = exports.mapInputEffect = exports.mapInputContext = exports.mapInput = exports.mapErrorCause = exports.mapError = exports.mapEffect = exports.map = exports.isChannelException = exports.interruptWhenDeferred = exports.interruptWhen = exports.identityChannel = exports.fromQueue = exports.fromOption = exports.fromInput = exports.fromHubScoped = exports.fromHub = exports.fromEither = exports.foldChannel = exports.flatten = exports.ensuring = exports.emitCollect = exports.drain = exports.doneCollect = exports.contextWithEffect = exports.contextWithChannel = exports.contextWith = exports.context = exports.concatOut = exports.concatMap = exports.collect = exports.catchAll = exports.bufferChunk = exports.buffer = exports.asUnit = exports.as = exports.acquireUseRelease = exports.ChannelExceptionTypeId = exports.ChannelException = void 0; | ||
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk")); | ||
@@ -39,5 +39,4 @@ var Context = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Context")); | ||
exports.acquireUseRelease = acquireUseRelease; | ||
const as = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => map(self, () => value)); | ||
const as = exports.as = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => map(self, () => value)); | ||
/** @internal */ | ||
exports.as = as; | ||
const asUnit = self => map(self, _Function.constVoid); | ||
@@ -63,3 +62,3 @@ /** @internal */ | ||
exports.bufferChunk = bufferChunk; | ||
const catchAll = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.catchAllCause(self, cause => Either.match(Cause.failureOrCause(cause), { | ||
const catchAll = exports.catchAll = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.catchAllCause(self, cause => Either.match(Cause.failureOrCause(cause), { | ||
onLeft: f, | ||
@@ -69,7 +68,5 @@ onRight: core.failCause | ||
/** @internal */ | ||
exports.catchAll = catchAll; | ||
const concatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.concatMapWith(self, f, () => void 0, () => void 0)); | ||
const concatMap = exports.concatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.concatMapWith(self, f, () => void 0, () => void 0)); | ||
/** @internal */ | ||
exports.concatMap = concatMap; | ||
const collect = /*#__PURE__*/(0, _Function.dual)(2, (self, pf) => { | ||
const collect = exports.collect = /*#__PURE__*/(0, _Function.dual)(2, (self, pf) => { | ||
const collector = core.readWith({ | ||
@@ -86,7 +83,6 @@ onInput: out => Option.match(pf(out), { | ||
/** @internal */ | ||
exports.collect = collect; | ||
const concatOut = self => core.concatAll(self); | ||
/** @internal */ | ||
exports.concatOut = concatOut; | ||
const contramap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapInput = exports.mapInput = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const reader = core.readWith({ | ||
@@ -100,4 +96,3 @@ onInput: inElem => core.flatMap(core.write(inElem), () => reader), | ||
/** @internal */ | ||
exports.contramap = contramap; | ||
const contramapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapInputEffect = exports.mapInputEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const reader = core.readWith({ | ||
@@ -111,4 +106,3 @@ onInput: inElem => core.flatMap(core.write(inElem), () => reader), | ||
/** @internal */ | ||
exports.contramapEffect = contramapEffect; | ||
const contramapError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapInputError = exports.mapInputError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const reader = core.readWith({ | ||
@@ -122,4 +116,3 @@ onInput: inElem => core.flatMap(core.write(inElem), () => reader), | ||
/** @internal */ | ||
exports.contramapError = contramapError; | ||
const contramapErrorEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapInputErrorEffect = exports.mapInputErrorEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const reader = core.readWith({ | ||
@@ -133,4 +126,3 @@ onInput: inElem => core.flatMap(core.write(inElem), () => reader), | ||
/** @internal */ | ||
exports.contramapErrorEffect = contramapErrorEffect; | ||
const contramapIn = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapInputIn = exports.mapInputIn = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const reader = core.readWith({ | ||
@@ -143,4 +135,3 @@ onInput: inElem => core.flatMap(core.write(f(inElem)), () => reader), | ||
}); | ||
exports.contramapIn = contramapIn; | ||
const contramapInEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapInputInEffect = exports.mapInputInEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const reader = core.readWith({ | ||
@@ -154,3 +145,2 @@ onInput: inElem => core.flatMap(core.flatMap(core.fromEffect(f(inElem)), core.write), () => reader), | ||
/** @internal */ | ||
exports.contramapInEffect = contramapInEffect; | ||
const doneCollect = self => core.suspend(() => { | ||
@@ -185,5 +175,4 @@ const builder = []; | ||
exports.emitCollect = emitCollect; | ||
const ensuring = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => core.ensuringWith(self, () => finalizer)); | ||
const ensuring = exports.ensuring = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => core.ensuringWith(self, () => finalizer)); | ||
/** @internal */ | ||
exports.ensuring = ensuring; | ||
const context = () => core.fromEffect(Effect.context()); | ||
@@ -204,3 +193,3 @@ /** @internal */ | ||
exports.flatten = flatten; | ||
const foldChannel = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => core.foldCauseChannel(self, { | ||
const foldChannel = exports.foldChannel = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => core.foldCauseChannel(self, { | ||
onFailure: cause => { | ||
@@ -222,3 +211,2 @@ const either = Cause.failureOrCause(cause); | ||
/** @internal */ | ||
exports.foldChannel = foldChannel; | ||
const fromEither = either => core.suspend(() => Either.match(either, { | ||
@@ -263,3 +251,3 @@ onLeft: core.fail, | ||
exports.identityChannel = identityChannel; | ||
const interruptWhen = /*#__PURE__*/(0, _Function.dual)(2, (self, effect) => mergeWith(self, { | ||
const interruptWhen = exports.interruptWhen = /*#__PURE__*/(0, _Function.dual)(2, (self, effect) => mergeWith(self, { | ||
other: core.fromEffect(effect), | ||
@@ -270,19 +258,13 @@ onSelfDone: selfDone => mergeDecision.Done(Effect.suspend(() => selfDone)), | ||
/** @internal */ | ||
exports.interruptWhen = interruptWhen; | ||
const interruptWhenDeferred = /*#__PURE__*/(0, _Function.dual)(2, (self, deferred) => interruptWhen(self, Deferred.await(deferred))); | ||
const interruptWhenDeferred = exports.interruptWhenDeferred = /*#__PURE__*/(0, _Function.dual)(2, (self, deferred) => interruptWhen(self, Deferred.await(deferred))); | ||
/** @internal */ | ||
exports.interruptWhenDeferred = interruptWhenDeferred; | ||
const map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.flatMap(self, a => core.sync(() => f(a)))); | ||
const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.flatMap(self, a => core.sync(() => f(a)))); | ||
/** @internal */ | ||
exports.map = map; | ||
const mapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.flatMap(self, z => core.fromEffect(f(z)))); | ||
const mapEffect = exports.mapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.flatMap(self, z => core.fromEffect(f(z)))); | ||
/** @internal */ | ||
exports.mapEffect = mapEffect; | ||
const mapError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => mapErrorCause(self, Cause.map(f))); | ||
const mapError = exports.mapError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => mapErrorCause(self, Cause.map(f))); | ||
/** @internal */ | ||
exports.mapError = mapError; | ||
const mapErrorCause = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.catchAllCause(self, cause => core.failCause(f(cause)))); | ||
const mapErrorCause = exports.mapErrorCause = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => core.catchAllCause(self, cause => core.failCause(f(cause)))); | ||
/** @internal */ | ||
exports.mapErrorCause = mapErrorCause; | ||
const mapOut = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapOut = exports.mapOut = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const reader = core.readWith({ | ||
@@ -296,4 +278,3 @@ onInput: outElem => core.flatMap(core.write(f(outElem)), () => reader), | ||
/** @internal */ | ||
exports.mapOut = mapOut; | ||
const mapOutEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapOutEffect = exports.mapOutEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const reader = core.readWithCause({ | ||
@@ -307,4 +288,3 @@ onInput: outElem => core.flatMap(() => reader)(core.flatMap(core.write)(core.fromEffect(f(outElem)))), | ||
/** @internal */ | ||
exports.mapOutEffect = mapOutEffect; | ||
const mapOutEffectPar = /*#__PURE__*/(0, _Function.dual)(3, (self, f, n) => unwrapScoped(Effect.map(queue => { | ||
const mapOutEffectPar = exports.mapOutEffectPar = /*#__PURE__*/(0, _Function.dual)(3, (self, f, n) => unwrapScoped(Effect.map(queue => { | ||
const consumer = unwrap(Effect.matchCause(Effect.flatten(Queue.take(queue)), { | ||
@@ -344,3 +324,2 @@ onFailure: core.failCause, | ||
/** @internal */ | ||
exports.mapOutEffectPar = mapOutEffectPar; | ||
const mergeAll = options => { | ||
@@ -431,16 +410,13 @@ return channels => mergeAllWith(options)(channels, _Function.constVoid); | ||
exports.mergeAllWith = mergeAllWith; | ||
const mergeMap = /*#__PURE__*/(0, _Function.dual)(3, (self, f, options) => mergeAll(options)(mapOut(self, f))); | ||
const mergeMap = exports.mergeMap = /*#__PURE__*/(0, _Function.dual)(3, (self, f, options) => mergeAll(options)(mapOut(self, f))); | ||
/** @internal */ | ||
exports.mergeMap = mergeMap; | ||
const mergeOut = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => mergeAll({ | ||
const mergeOut = exports.mergeOut = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => mergeAll({ | ||
concurrency: n | ||
})(mapOut(self, _Function.identity))); | ||
/** @internal */ | ||
exports.mergeOut = mergeOut; | ||
const mergeOutWith = /*#__PURE__*/(0, _Function.dual)(3, (self, n, f) => mergeAllWith({ | ||
const mergeOutWith = exports.mergeOutWith = /*#__PURE__*/(0, _Function.dual)(3, (self, n, f) => mergeAllWith({ | ||
concurrency: n | ||
})(mapOut(self, _Function.identity), f)); | ||
/** @internal */ | ||
exports.mergeOutWith = mergeOutWith; | ||
const mergeWith = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => unwrapScoped(Effect.flatMap(singleProducerAsyncInput.make(), input => { | ||
const mergeWith = exports.mergeWith = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => unwrapScoped(Effect.flatMap(singleProducerAsyncInput.make(), input => { | ||
const queueReader = fromInput(input); | ||
@@ -507,18 +483,13 @@ return Effect.map(Effect.zip(toPull(core.pipeTo(queueReader, self)), toPull(core.pipeTo(queueReader, options.other))), ([pullL, pullR]) => { | ||
/** @internal */ | ||
exports.mergeWith = mergeWith; | ||
const never = /*#__PURE__*/core.fromEffect(Effect.never); | ||
const never = exports.never = /*#__PURE__*/core.fromEffect(Effect.never); | ||
/** @internal */ | ||
exports.never = never; | ||
const orDie = /*#__PURE__*/(0, _Function.dual)(2, (self, error) => orDieWith(self, error)); | ||
const orDie = exports.orDie = /*#__PURE__*/(0, _Function.dual)(2, (self, error) => orDieWith(self, error)); | ||
/** @internal */ | ||
exports.orDie = orDie; | ||
const orDieWith = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => catchAll(self, e => { | ||
const orDieWith = exports.orDieWith = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => catchAll(self, e => { | ||
throw f(e); | ||
})); | ||
/** @internal */ | ||
exports.orDieWith = orDieWith; | ||
const orElse = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => catchAll(self, that)); | ||
const orElse = exports.orElse = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => catchAll(self, that)); | ||
/** @internal */ | ||
exports.orElse = orElse; | ||
const pipeToOrFail = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => core.suspend(() => { | ||
const pipeToOrFail = exports.pipeToOrFail = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => core.suspend(() => { | ||
let channelException = undefined; | ||
@@ -535,6 +506,3 @@ const reader = core.readWith({ | ||
onInput: outElem => core.flatMap(() => writer)(core.write(outElem)), | ||
onFailure: annotatedCause => { | ||
const unannotated = Cause.unannotate(annotatedCause); | ||
return Cause.isDieType(unannotated) && isChannelException(unannotated.defect) && Equal.equals(unannotated.defect, channelException) ? core.fail(unannotated.defect.error) : core.failCause(annotatedCause); | ||
}, | ||
onFailure: cause => Cause.isDieType(cause) && isChannelException(cause.defect) && Equal.equals(cause.defect, channelException) ? core.fail(cause.defect.error) : core.failCause(cause), | ||
onDone: core.succeedNow | ||
@@ -545,19 +513,14 @@ }); | ||
/** @internal */ | ||
exports.pipeToOrFail = pipeToOrFail; | ||
const provideService = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, service) => { | ||
const provideService = exports.provideService = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, service) => { | ||
return core.flatMap(context(), context => core.provideContext(self, Context.add(context, tag, service))); | ||
}); | ||
/** @internal */ | ||
exports.provideService = provideService; | ||
const provideLayer = /*#__PURE__*/(0, _Function.dual)(2, (self, layer) => unwrapScoped(Effect.map(Layer.build(layer), env => core.provideContext(self, env)))); | ||
const provideLayer = exports.provideLayer = /*#__PURE__*/(0, _Function.dual)(2, (self, layer) => unwrapScoped(Effect.map(Layer.build(layer), env => core.provideContext(self, env)))); | ||
/** @internal */ | ||
exports.provideLayer = provideLayer; | ||
const contramapContext = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => contextWithChannel(context => core.provideContext(self, f(context)))); | ||
const mapInputContext = exports.mapInputContext = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => contextWithChannel(context => core.provideContext(self, f(context)))); | ||
/** @internal */ | ||
exports.contramapContext = contramapContext; | ||
const provideSomeLayer = /*#__PURE__*/(0, _Function.dual)(2, (self, layer) => | ||
const provideSomeLayer = exports.provideSomeLayer = /*#__PURE__*/(0, _Function.dual)(2, (self, layer) => | ||
// @ts-expect-error | ||
provideLayer(self, Layer.merge(Layer.context(), layer))); | ||
/** @internal */ | ||
exports.provideSomeLayer = provideSomeLayer; | ||
const read = () => core.readOrFail(Option.none()); | ||
@@ -644,8 +607,6 @@ /** @internal */ | ||
exports.unwrapScoped = unwrapScoped; | ||
const updateService = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, f) => contramapContext(self, context => Context.merge(context, Context.make(tag, f(Context.unsafeGet(context, tag)))))); | ||
const updateService = exports.updateService = /*#__PURE__*/(0, _Function.dual)(3, (self, tag, f) => mapInputContext(self, context => Context.merge(context, Context.make(tag, f(Context.unsafeGet(context, tag)))))); | ||
/** @internal */ | ||
exports.updateService = updateService; | ||
const withSpan = /*#__PURE__*/(0, _Function.dual)(3, (self, name, options) => unwrapScoped(Effect.as(Effect.withSpanScoped(name, options), self))); | ||
const withSpan = exports.withSpan = /*#__PURE__*/(0, _Function.dual)(3, (self, name, options) => unwrapScoped(Effect.as(Effect.withSpanScoped(name, options), self))); | ||
/** @internal */ | ||
exports.withSpan = withSpan; | ||
const writeAll = (...outs) => writeChunk(Chunk.fromIterable(outs)); | ||
@@ -661,3 +622,3 @@ /** @internal */ | ||
/** @internal */ | ||
const zip = /*#__PURE__*/(0, _Function.dual)(args => core.isChannel(args[1]), (self, that, options) => options?.concurrent ? mergeWith(self, { | ||
const zip = exports.zip = /*#__PURE__*/(0, _Function.dual)(args => core.isChannel(args[1]), (self, that, options) => options?.concurrent ? mergeWith(self, { | ||
other: that, | ||
@@ -668,16 +629,12 @@ onSelfDone: exit1 => mergeDecision.Await(exit2 => Effect.suspend(() => Exit.zip(exit1, exit2))), | ||
/** @internal */ | ||
exports.zip = zip; | ||
const zipLeft = /*#__PURE__*/(0, _Function.dual)(args => core.isChannel(args[1]), (self, that, options) => options?.concurrent ? map(zip(self, that, { | ||
const zipLeft = exports.zipLeft = /*#__PURE__*/(0, _Function.dual)(args => core.isChannel(args[1]), (self, that, options) => options?.concurrent ? map(zip(self, that, { | ||
concurrent: true | ||
}), tuple => tuple[0]) : core.flatMap(self, z => as(that, z))); | ||
/** @internal */ | ||
exports.zipLeft = zipLeft; | ||
const zipRight = /*#__PURE__*/(0, _Function.dual)(args => core.isChannel(args[1]), (self, that, options) => options?.concurrent ? map(zip(self, that, { | ||
const zipRight = exports.zipRight = /*#__PURE__*/(0, _Function.dual)(args => core.isChannel(args[1]), (self, that, options) => options?.concurrent ? map(zip(self, that, { | ||
concurrent: true | ||
}), tuple => tuple[1]) : core.flatMap(self, () => that)); | ||
/** @internal */ | ||
exports.zipRight = zipRight; | ||
const ChannelExceptionTypeId = /*#__PURE__*/Symbol.for("@effect/stream/Channel/errors/ChannelException"); | ||
const ChannelExceptionTypeId = exports.ChannelExceptionTypeId = /*#__PURE__*/Symbol.for("@effect/stream/Channel/errors/ChannelException"); | ||
/** @internal */ | ||
exports.ChannelExceptionTypeId = ChannelExceptionTypeId; | ||
const ChannelException = error => ({ | ||
@@ -684,0 +641,0 @@ _tag: "ChannelException", |
@@ -145,3 +145,3 @@ "use strict"; | ||
{ | ||
const effect = this._providedEnv === undefined ? this._currentChannel.effect() : Effect.provideContext(this._providedEnv)(this._currentChannel.effect()); | ||
const effect = this._providedEnv === undefined ? this._currentChannel.effect() : Effect.provide(this._providedEnv)(this._currentChannel.effect()); | ||
result = ChannelState.FromEffect(Effect.matchCauseEffect(effect, { | ||
@@ -370,3 +370,3 @@ onFailure: cause => { | ||
} | ||
return Effect.provideContext(this._providedEnv)(effect); | ||
return Effect.provide(this._providedEnv)(effect); | ||
} | ||
@@ -373,0 +373,0 @@ runEnsuring(ensuring) { |
@@ -12,5 +12,4 @@ "use strict"; | ||
/** @internal */ | ||
const ChannelStateTypeId = /*#__PURE__*/Symbol.for("@effect/stream/Channel/State"); | ||
const ChannelStateTypeId = exports.ChannelStateTypeId = /*#__PURE__*/Symbol.for("@effect/stream/Channel/State"); | ||
/** @internal */ | ||
exports.ChannelStateTypeId = ChannelStateTypeId; | ||
const channelStateVariance = { | ||
@@ -17,0 +16,0 @@ _R: _ => _, |
@@ -14,5 +14,4 @@ "use strict"; | ||
/** @internal */ | ||
const ChildExecutorDecisionTypeId = /*#__PURE__*/Symbol.for(ChildExecutorDecisionSymbolKey); | ||
const ChildExecutorDecisionTypeId = exports.ChildExecutorDecisionTypeId = /*#__PURE__*/Symbol.for(ChildExecutorDecisionSymbolKey); | ||
/** @internal */ | ||
exports.ChildExecutorDecisionTypeId = ChildExecutorDecisionTypeId; | ||
const proto = { | ||
@@ -56,3 +55,3 @@ [ChildExecutorDecisionTypeId]: ChildExecutorDecisionTypeId | ||
exports.isYield = isYield; | ||
const match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
onClose, | ||
@@ -77,3 +76,2 @@ onContinue, | ||
}); | ||
exports.match = match; | ||
//# sourceMappingURL=childExecutorDecision.js.map |
@@ -13,5 +13,4 @@ "use strict"; | ||
/** @internal */ | ||
const ContinuationTypeId = /*#__PURE__*/Symbol.for("@effect/stream/Channel/Continuation"); | ||
const ContinuationTypeId = exports.ContinuationTypeId = /*#__PURE__*/Symbol.for("@effect/stream/Channel/Continuation"); | ||
/** @internal */ | ||
exports.ContinuationTypeId = ContinuationTypeId; | ||
const continuationVariance = { | ||
@@ -18,0 +17,0 @@ _Env: _ => _, |
@@ -14,5 +14,4 @@ "use strict"; | ||
/** @internal */ | ||
const MergeDecisionTypeId = /*#__PURE__*/Symbol.for(MergeDecisionSymbolKey); | ||
const MergeDecisionTypeId = exports.MergeDecisionTypeId = /*#__PURE__*/Symbol.for(MergeDecisionSymbolKey); | ||
/** @internal */ | ||
exports.MergeDecisionTypeId = MergeDecisionTypeId; | ||
const proto = { | ||
@@ -50,3 +49,3 @@ [MergeDecisionTypeId]: { | ||
exports.isMergeDecision = isMergeDecision; | ||
const match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
onAwait, | ||
@@ -67,3 +66,2 @@ onDone | ||
}); | ||
exports.match = match; | ||
//# sourceMappingURL=mergeDecision.js.map |
@@ -14,5 +14,4 @@ "use strict"; | ||
/** @internal */ | ||
const MergeStateTypeId = /*#__PURE__*/Symbol.for(MergeStateSymbolKey); | ||
const MergeStateTypeId = exports.MergeStateTypeId = /*#__PURE__*/Symbol.for(MergeStateSymbolKey); | ||
/** @internal */ | ||
exports.MergeStateTypeId = MergeStateTypeId; | ||
const proto = { | ||
@@ -67,3 +66,3 @@ [MergeStateTypeId]: MergeStateTypeId | ||
exports.isRightDone = isRightDone; | ||
const match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
onBothRunning, | ||
@@ -88,3 +87,2 @@ onLeftDone, | ||
}); | ||
exports.match = match; | ||
//# sourceMappingURL=mergeState.js.map |
@@ -14,5 +14,4 @@ "use strict"; | ||
/** @internal */ | ||
const MergeStrategyTypeId = /*#__PURE__*/Symbol.for(MergeStrategySymbolKey); | ||
const MergeStrategyTypeId = exports.MergeStrategyTypeId = /*#__PURE__*/Symbol.for(MergeStrategySymbolKey); | ||
/** @internal */ | ||
exports.MergeStrategyTypeId = MergeStrategyTypeId; | ||
const proto = { | ||
@@ -45,3 +44,3 @@ [MergeStrategyTypeId]: MergeStrategyTypeId | ||
exports.isBufferSliding = isBufferSliding; | ||
const match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
onBackPressure, | ||
@@ -61,3 +60,2 @@ onBufferSliding | ||
}); | ||
exports.match = match; | ||
//# sourceMappingURL=mergeStrategy.js.map |
@@ -12,12 +12,9 @@ "use strict"; | ||
/** @internal */ | ||
const OP_PULL_FROM_CHILD = "PullFromChild"; | ||
const OP_PULL_FROM_CHILD = exports.OP_PULL_FROM_CHILD = "PullFromChild"; | ||
/** @internal */ | ||
exports.OP_PULL_FROM_CHILD = OP_PULL_FROM_CHILD; | ||
const OP_PULL_FROM_UPSTREAM = "PullFromUpstream"; | ||
const OP_PULL_FROM_UPSTREAM = exports.OP_PULL_FROM_UPSTREAM = "PullFromUpstream"; | ||
/** @internal */ | ||
exports.OP_PULL_FROM_UPSTREAM = OP_PULL_FROM_UPSTREAM; | ||
const OP_DRAIN_CHILD_EXECUTORS = "DrainChildExecutors"; | ||
const OP_DRAIN_CHILD_EXECUTORS = exports.OP_DRAIN_CHILD_EXECUTORS = "DrainChildExecutors"; | ||
/** @internal */ | ||
exports.OP_DRAIN_CHILD_EXECUTORS = OP_DRAIN_CHILD_EXECUTORS; | ||
const OP_EMIT = "Emit"; | ||
const OP_EMIT = exports.OP_EMIT = "Emit"; | ||
/** | ||
@@ -29,3 +26,2 @@ * Execute the `childExecutor` and on each emitted value, decide what to do by | ||
*/ | ||
exports.OP_EMIT = OP_EMIT; | ||
class PullFromChild { | ||
@@ -32,0 +28,0 @@ constructor(childExecutor, parentSubexecutor, onEmit) { |
@@ -14,5 +14,4 @@ "use strict"; | ||
/** @internal */ | ||
const UpstreamPullRequestTypeId = /*#__PURE__*/Symbol.for(UpstreamPullRequestSymbolKey); | ||
const UpstreamPullRequestTypeId = exports.UpstreamPullRequestTypeId = /*#__PURE__*/Symbol.for(UpstreamPullRequestSymbolKey); | ||
/** @internal */ | ||
exports.UpstreamPullRequestTypeId = UpstreamPullRequestTypeId; | ||
const upstreamPullRequestVariance = { | ||
@@ -51,3 +50,3 @@ _A: _ => _ | ||
exports.isNoUpstream = isNoUpstream; | ||
const match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
onNoUpstream, | ||
@@ -67,3 +66,2 @@ onPulled | ||
}); | ||
exports.match = match; | ||
//# sourceMappingURL=upstreamPullRequest.js.map |
@@ -14,5 +14,4 @@ "use strict"; | ||
/** @internal */ | ||
const UpstreamPullStrategyTypeId = /*#__PURE__*/Symbol.for(UpstreamPullStrategySymbolKey); | ||
const UpstreamPullStrategyTypeId = exports.UpstreamPullStrategyTypeId = /*#__PURE__*/Symbol.for(UpstreamPullStrategySymbolKey); | ||
/** @internal */ | ||
exports.UpstreamPullStrategyTypeId = UpstreamPullStrategyTypeId; | ||
const upstreamPullStrategyVariance = { | ||
@@ -51,3 +50,3 @@ _A: _ => _ | ||
exports.isPullAfterAllEnqueued = isPullAfterAllEnqueued; | ||
const match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
onAllEnqueued, | ||
@@ -67,3 +66,2 @@ onNext | ||
}); | ||
exports.match = match; | ||
//# sourceMappingURL=upstreamPullStrategy.js.map |
@@ -23,5 +23,4 @@ "use strict"; | ||
/** @internal */ | ||
const ChannelTypeId = /*#__PURE__*/Symbol.for(ChannelSymbolKey); | ||
const ChannelTypeId = exports.ChannelTypeId = /*#__PURE__*/Symbol.for(ChannelSymbolKey); | ||
/** @internal */ | ||
exports.ChannelTypeId = ChannelTypeId; | ||
const channelVariance = { | ||
@@ -47,3 +46,3 @@ _Env: _ => _, | ||
exports.isChannel = isChannel; | ||
const acquireReleaseOut = /*#__PURE__*/(0, _Function.dual)(2, (self, release) => { | ||
const acquireReleaseOut = exports.acquireReleaseOut = /*#__PURE__*/(0, _Function.dual)(2, (self, release) => { | ||
const op = Object.create(proto); | ||
@@ -56,4 +55,3 @@ op._tag = OpCodes.OP_BRACKET_OUT; | ||
/** @internal */ | ||
exports.acquireReleaseOut = acquireReleaseOut; | ||
const catchAllCause = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const catchAllCause = exports.catchAllCause = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const op = Object.create(proto); | ||
@@ -66,3 +64,2 @@ op._tag = OpCodes.OP_FOLD; | ||
/** @internal */ | ||
exports.catchAllCause = catchAllCause; | ||
const collectElements = self => { | ||
@@ -100,3 +97,3 @@ return suspend(() => { | ||
exports.concatAllWith = concatAllWith; | ||
const concatMapWith = /*#__PURE__*/(0, _Function.dual)(4, (self, f, g, h) => { | ||
const concatMapWith = exports.concatMapWith = /*#__PURE__*/(0, _Function.dual)(4, (self, f, g, h) => { | ||
const op = Object.create(proto); | ||
@@ -113,4 +110,3 @@ op._tag = OpCodes.OP_CONCAT_ALL; | ||
/** @internal */ | ||
exports.concatMapWith = concatMapWith; | ||
const concatMapWithCustom = /*#__PURE__*/(0, _Function.dual)(6, (self, f, g, h, onPull, onEmit) => { | ||
const concatMapWithCustom = exports.concatMapWithCustom = /*#__PURE__*/(0, _Function.dual)(6, (self, f, g, h, onPull, onEmit) => { | ||
const op = Object.create(proto); | ||
@@ -127,4 +123,3 @@ op._tag = OpCodes.OP_CONCAT_ALL; | ||
/** @internal */ | ||
exports.concatMapWithCustom = concatMapWithCustom; | ||
const embedInput = /*#__PURE__*/(0, _Function.dual)(2, (self, input) => { | ||
const embedInput = exports.embedInput = /*#__PURE__*/(0, _Function.dual)(2, (self, input) => { | ||
const op = Object.create(proto); | ||
@@ -137,4 +132,3 @@ op._tag = OpCodes.OP_BRIDGE; | ||
/** @internal */ | ||
exports.embedInput = embedInput; | ||
const ensuringWith = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => { | ||
const ensuringWith = exports.ensuringWith = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => { | ||
const op = Object.create(proto); | ||
@@ -147,3 +141,2 @@ op._tag = OpCodes.OP_ENSURING; | ||
/** @internal */ | ||
exports.ensuringWith = ensuringWith; | ||
const fail = error => failCause(Cause.fail(error)); | ||
@@ -166,3 +159,3 @@ /** @internal */ | ||
exports.failCauseSync = failCauseSync; | ||
const flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const op = Object.create(proto); | ||
@@ -175,4 +168,3 @@ op._tag = OpCodes.OP_FOLD; | ||
/** @internal */ | ||
exports.flatMap = flatMap; | ||
const foldCauseChannel = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { | ||
const foldCauseChannel = exports.foldCauseChannel = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { | ||
const op = Object.create(proto); | ||
@@ -185,3 +177,2 @@ op._tag = OpCodes.OP_FOLD; | ||
/** @internal */ | ||
exports.foldCauseChannel = foldCauseChannel; | ||
const fromEffect = effect => { | ||
@@ -195,3 +186,3 @@ const op = Object.create(proto); | ||
exports.fromEffect = fromEffect; | ||
const pipeTo = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { | ||
const pipeTo = exports.pipeTo = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => { | ||
const op = Object.create(proto); | ||
@@ -204,4 +195,3 @@ op._tag = OpCodes.OP_PIPE_TO; | ||
/** @internal */ | ||
exports.pipeTo = pipeTo; | ||
const provideContext = /*#__PURE__*/(0, _Function.dual)(2, (self, env) => { | ||
const provideContext = exports.provideContext = /*#__PURE__*/(0, _Function.dual)(2, (self, env) => { | ||
const op = Object.create(proto); | ||
@@ -214,3 +204,2 @@ op._tag = OpCodes.OP_PROVIDE; | ||
/** @internal */ | ||
exports.provideContext = provideContext; | ||
const readOrFail = error => { | ||
@@ -270,5 +259,4 @@ const op = Object.create(proto); | ||
exports.sync = sync; | ||
const unit = /*#__PURE__*/succeedNow(void 0); | ||
const unit = exports.unit = /*#__PURE__*/succeedNow(void 0); | ||
/** @internal */ | ||
exports.unit = unit; | ||
const write = out => { | ||
@@ -275,0 +263,0 @@ const op = Object.create(proto); |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.mapEffectOptions = exports.make = exports.groupByKey = exports.groupByIterable = exports.groupBy = exports.first = exports.filter = exports.evaluateBuffer = exports.evaluate = exports.bindEffect = exports.GroupByTypeId = void 0; | ||
exports.mapEffectOptions = exports.make = exports.groupByKey = exports.groupByIterable = exports.groupBy = exports.first = exports.filter = exports.evaluate = exports.bindEffect = exports.GroupByTypeId = void 0; | ||
var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk")); | ||
@@ -29,5 +29,4 @@ var _Function = /*#__PURE__*/require("@effect/data/Function"); | ||
/** @internal */ | ||
const GroupByTypeId = /*#__PURE__*/Symbol.for(GroupBySymbolKey); | ||
const GroupByTypeId = exports.GroupByTypeId = /*#__PURE__*/Symbol.for(GroupBySymbolKey); | ||
/** @internal */ | ||
exports.GroupByTypeId = GroupByTypeId; | ||
const groupByVariance = { | ||
@@ -40,14 +39,10 @@ _R: _ => _, | ||
/** @internal */ | ||
const evaluate = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => evaluateBuffer(self, f, 16)); | ||
/** @internal */ | ||
exports.evaluate = evaluate; | ||
const evaluateBuffer = /*#__PURE__*/(0, _Function.dual)(3, (self, f, bufferSize) => stream.flatMap(self.grouped, ([key, queue]) => f(key, stream.flattenTake(stream.fromQueue(queue, { | ||
const evaluate = exports.evaluate = /*#__PURE__*/(0, _Function.dual)(3, (self, f, options) => stream.flatMap(self.grouped, ([key, queue]) => f(key, stream.flattenTake(stream.fromQueue(queue, { | ||
shutdown: true | ||
}))), { | ||
concurrency: "unbounded", | ||
bufferSize | ||
bufferSize: options?.bufferSize ?? 16 | ||
})); | ||
/** @internal */ | ||
exports.evaluateBuffer = evaluateBuffer; | ||
const filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => make(stream.filterEffect(tuple => { | ||
const filter = exports.filter = /*#__PURE__*/(0, _Function.dual)(2, (self, predicate) => make(stream.filterEffect(tuple => { | ||
if (predicate(tuple[0])) { | ||
@@ -59,4 +54,3 @@ return Effect.as(true)(Effect.succeed(tuple)); | ||
/** @internal */ | ||
exports.filter = filter; | ||
const first = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => make(stream.map(tuple => tuple[0])(stream.filterEffect(tuple => { | ||
const first = exports.first = /*#__PURE__*/(0, _Function.dual)(2, (self, n) => make(stream.map(tuple => tuple[0])(stream.filterEffect(tuple => { | ||
const index = tuple[1]; | ||
@@ -70,3 +64,2 @@ const queue = tuple[0][1]; | ||
/** @internal */ | ||
exports.first = first; | ||
const make = grouped => ({ | ||
@@ -82,3 +75,3 @@ [GroupByTypeId]: groupByVariance, | ||
exports.make = make; | ||
const groupBy = /*#__PURE__*/(0, _Function.dual)(args => typeof args[0] !== "function", (self, f, options) => make(stream.unwrapScoped(Effect.gen(function* ($) { | ||
const groupBy = exports.groupBy = /*#__PURE__*/(0, _Function.dual)(args => typeof args[0] !== "function", (self, f, options) => make(stream.unwrapScoped(Effect.gen(function* ($) { | ||
const decider = yield* $(Deferred.make()); | ||
@@ -97,4 +90,3 @@ const output = yield* $(Effect.acquireRelease(Queue.bounded(options?.bufferSize ?? 16), queue => Queue.shutdown(queue))); | ||
/** @internal */ | ||
exports.groupBy = groupBy; | ||
const mapEffectOptions = /*#__PURE__*/(0, _Function.dual)(args => typeof args[0] !== "function", (self, f, options) => { | ||
const mapEffectOptions = exports.mapEffectOptions = /*#__PURE__*/(0, _Function.dual)(args => typeof args[0] !== "function", (self, f, options) => { | ||
if (options?.key) { | ||
@@ -110,8 +102,6 @@ return evaluate(groupByKey(self, options.key, { | ||
/** @internal */ | ||
exports.mapEffectOptions = mapEffectOptions; | ||
const bindEffect = /*#__PURE__*/(0, _Function.dual)(args => typeof args[0] !== "string", (self, tag, f, options) => mapEffectOptions(self, k => Effect.map(f(k), a => ({ | ||
const bindEffect = exports.bindEffect = /*#__PURE__*/(0, _Function.dual)(args => typeof args[0] !== "string", (self, tag, f, options) => mapEffectOptions(self, k => Effect.map(f(k), a => ({ | ||
...k, | ||
[tag]: a | ||
})), options)); | ||
exports.bindEffect = bindEffect; | ||
const mapDequeue = (dequeue, f) => new MapDequeue(dequeue, f); | ||
@@ -177,3 +167,3 @@ class MapDequeue { | ||
/** @internal */ | ||
const groupByKey = /*#__PURE__*/(0, _Function.dual)(args => typeof args[0] !== "function", (self, f, options) => { | ||
const groupByKey = exports.groupByKey = /*#__PURE__*/(0, _Function.dual)(args => typeof args[0] !== "function", (self, f, options) => { | ||
const loop = (map, outerQueue) => core.readWithCause({ | ||
@@ -205,4 +195,3 @@ onInput: input => core.flatMap(core.fromEffect(Effect.forEach(groupByIterable(input, f), ([key, values]) => { | ||
*/ | ||
exports.groupByKey = groupByKey; | ||
const groupByIterable = /*#__PURE__*/(0, _Function.dual)(2, (iterable, f) => { | ||
const groupByIterable = exports.groupByIterable = /*#__PURE__*/(0, _Function.dual)(2, (iterable, f) => { | ||
const builder = []; | ||
@@ -226,3 +215,2 @@ const iterator = iterable[Symbol.iterator](); | ||
}); | ||
exports.groupByIterable = groupByIterable; | ||
//# sourceMappingURL=groupBy.js.map |
@@ -8,43 +8,29 @@ "use strict"; | ||
/** @internal */ | ||
const OP_BRACKET_OUT = "BracketOut"; | ||
const OP_BRACKET_OUT = exports.OP_BRACKET_OUT = "BracketOut"; | ||
/** @internal */ | ||
exports.OP_BRACKET_OUT = OP_BRACKET_OUT; | ||
const OP_BRIDGE = "Bridge"; | ||
const OP_BRIDGE = exports.OP_BRIDGE = "Bridge"; | ||
/** @internal */ | ||
exports.OP_BRIDGE = OP_BRIDGE; | ||
const OP_CONCAT_ALL = "ConcatAll"; | ||
const OP_CONCAT_ALL = exports.OP_CONCAT_ALL = "ConcatAll"; | ||
/** @internal */ | ||
exports.OP_CONCAT_ALL = OP_CONCAT_ALL; | ||
const OP_EMIT = "Emit"; | ||
const OP_EMIT = exports.OP_EMIT = "Emit"; | ||
/** @internal */ | ||
exports.OP_EMIT = OP_EMIT; | ||
const OP_ENSURING = "Ensuring"; | ||
const OP_ENSURING = exports.OP_ENSURING = "Ensuring"; | ||
/** @internal */ | ||
exports.OP_ENSURING = OP_ENSURING; | ||
const OP_FAIL = "Fail"; | ||
const OP_FAIL = exports.OP_FAIL = "Fail"; | ||
/** @internal */ | ||
exports.OP_FAIL = OP_FAIL; | ||
const OP_FOLD = "Fold"; | ||
const OP_FOLD = exports.OP_FOLD = "Fold"; | ||
/** @internal */ | ||
exports.OP_FOLD = OP_FOLD; | ||
const OP_FROM_EFFECT = "FromEffect"; | ||
const OP_FROM_EFFECT = exports.OP_FROM_EFFECT = "FromEffect"; | ||
/** @internal */ | ||
exports.OP_FROM_EFFECT = OP_FROM_EFFECT; | ||
const OP_PIPE_TO = "PipeTo"; | ||
const OP_PIPE_TO = exports.OP_PIPE_TO = "PipeTo"; | ||
/** @internal */ | ||
exports.OP_PIPE_TO = OP_PIPE_TO; | ||
const OP_PROVIDE = "Provide"; | ||
const OP_PROVIDE = exports.OP_PROVIDE = "Provide"; | ||
/** @internal */ | ||
exports.OP_PROVIDE = OP_PROVIDE; | ||
const OP_READ = "Read"; | ||
const OP_READ = exports.OP_READ = "Read"; | ||
/** @internal */ | ||
exports.OP_READ = OP_READ; | ||
const OP_SUCCEED = "Succeed"; | ||
const OP_SUCCEED = exports.OP_SUCCEED = "Succeed"; | ||
/** @internal */ | ||
exports.OP_SUCCEED = OP_SUCCEED; | ||
const OP_SUCCEED_NOW = "SucceedNow"; | ||
const OP_SUCCEED_NOW = exports.OP_SUCCEED_NOW = "SucceedNow"; | ||
/** @internal */ | ||
exports.OP_SUCCEED_NOW = OP_SUCCEED_NOW; | ||
const OP_SUSPEND = "Suspend"; | ||
exports.OP_SUSPEND = OP_SUSPEND; | ||
const OP_SUSPEND = exports.OP_SUSPEND = "Suspend"; | ||
//# sourceMappingURL=channel.js.map |
@@ -8,13 +8,9 @@ "use strict"; | ||
/** @internal */ | ||
const OP_DONE = "Done"; | ||
const OP_DONE = exports.OP_DONE = "Done"; | ||
/** @internal */ | ||
exports.OP_DONE = OP_DONE; | ||
const OP_EMIT = "Emit"; | ||
const OP_EMIT = exports.OP_EMIT = "Emit"; | ||
/** @internal */ | ||
exports.OP_EMIT = OP_EMIT; | ||
const OP_FROM_EFFECT = "FromEffect"; | ||
const OP_FROM_EFFECT = exports.OP_FROM_EFFECT = "FromEffect"; | ||
/** @internal */ | ||
exports.OP_FROM_EFFECT = OP_FROM_EFFECT; | ||
const OP_READ = "Read"; | ||
exports.OP_READ = OP_READ; | ||
const OP_READ = exports.OP_READ = "Read"; | ||
//# sourceMappingURL=channelState.js.map |
@@ -8,10 +8,7 @@ "use strict"; | ||
/** @internal */ | ||
const OP_CONTINUE = "Continue"; | ||
const OP_CONTINUE = exports.OP_CONTINUE = "Continue"; | ||
/** @internal */ | ||
exports.OP_CONTINUE = OP_CONTINUE; | ||
const OP_CLOSE = "Close"; | ||
const OP_CLOSE = exports.OP_CLOSE = "Close"; | ||
/** @internal */ | ||
exports.OP_CLOSE = OP_CLOSE; | ||
const OP_YIELD = "Yield"; | ||
exports.OP_YIELD = OP_YIELD; | ||
const OP_YIELD = exports.OP_YIELD = "Yield"; | ||
//# sourceMappingURL=childExecutorDecision.js.map |
@@ -8,7 +8,5 @@ "use strict"; | ||
/** @internal */ | ||
const OP_CONTINUATION_K = "ContinuationK"; | ||
const OP_CONTINUATION_K = exports.OP_CONTINUATION_K = "ContinuationK"; | ||
/** @internal */ | ||
exports.OP_CONTINUATION_K = OP_CONTINUATION_K; | ||
const OP_CONTINUATION_FINALIZER = "ContinuationFinalizer"; | ||
exports.OP_CONTINUATION_FINALIZER = OP_CONTINUATION_FINALIZER; | ||
const OP_CONTINUATION_FINALIZER = exports.OP_CONTINUATION_FINALIZER = "ContinuationFinalizer"; | ||
//# sourceMappingURL=continuation.js.map |
@@ -8,13 +8,9 @@ "use strict"; | ||
/** @internal */ | ||
const OP_LEFT = "Left"; | ||
const OP_LEFT = exports.OP_LEFT = "Left"; | ||
/** @internal */ | ||
exports.OP_LEFT = OP_LEFT; | ||
const OP_RIGHT = "Right"; | ||
const OP_RIGHT = exports.OP_RIGHT = "Right"; | ||
/** @internal */ | ||
exports.OP_RIGHT = OP_RIGHT; | ||
const OP_BOTH = "Both"; | ||
const OP_BOTH = exports.OP_BOTH = "Both"; | ||
/** @internal */ | ||
exports.OP_BOTH = OP_BOTH; | ||
const OP_EITHER = "Either"; | ||
exports.OP_EITHER = OP_EITHER; | ||
const OP_EITHER = exports.OP_EITHER = "Either"; | ||
//# sourceMappingURL=haltStrategy.js.map |
@@ -8,7 +8,5 @@ "use strict"; | ||
/** @internal */ | ||
const OP_DONE = "Done"; | ||
const OP_DONE = exports.OP_DONE = "Done"; | ||
/** @internal */ | ||
exports.OP_DONE = OP_DONE; | ||
const OP_AWAIT = "Await"; | ||
exports.OP_AWAIT = OP_AWAIT; | ||
const OP_AWAIT = exports.OP_AWAIT = "Await"; | ||
//# sourceMappingURL=mergeDecision.js.map |
@@ -8,10 +8,7 @@ "use strict"; | ||
/** @internal */ | ||
const OP_BOTH_RUNNING = "BothRunning"; | ||
const OP_BOTH_RUNNING = exports.OP_BOTH_RUNNING = "BothRunning"; | ||
/** @internal */ | ||
exports.OP_BOTH_RUNNING = OP_BOTH_RUNNING; | ||
const OP_LEFT_DONE = "LeftDone"; | ||
const OP_LEFT_DONE = exports.OP_LEFT_DONE = "LeftDone"; | ||
/** @internal */ | ||
exports.OP_LEFT_DONE = OP_LEFT_DONE; | ||
const OP_RIGHT_DONE = "RightDone"; | ||
exports.OP_RIGHT_DONE = OP_RIGHT_DONE; | ||
const OP_RIGHT_DONE = exports.OP_RIGHT_DONE = "RightDone"; | ||
//# sourceMappingURL=mergeState.js.map |
@@ -8,7 +8,5 @@ "use strict"; | ||
/** @internal */ | ||
const OP_BACK_PRESSURE = "BackPressure"; | ||
const OP_BACK_PRESSURE = exports.OP_BACK_PRESSURE = "BackPressure"; | ||
/** @internal */ | ||
exports.OP_BACK_PRESSURE = OP_BACK_PRESSURE; | ||
const OP_BUFFER_SLIDING = "BufferSliding"; | ||
exports.OP_BUFFER_SLIDING = OP_BUFFER_SLIDING; | ||
const OP_BUFFER_SLIDING = exports.OP_BUFFER_SLIDING = "BufferSliding"; | ||
//# sourceMappingURL=mergeStrategy.js.map |
@@ -8,7 +8,5 @@ "use strict"; | ||
/** @internal */ | ||
const OP_PULLED = "Pulled"; | ||
const OP_PULLED = exports.OP_PULLED = "Pulled"; | ||
/** @internal */ | ||
exports.OP_PULLED = OP_PULLED; | ||
const OP_NO_UPSTREAM = "NoUpstream"; | ||
exports.OP_NO_UPSTREAM = OP_NO_UPSTREAM; | ||
const OP_NO_UPSTREAM = exports.OP_NO_UPSTREAM = "NoUpstream"; | ||
//# sourceMappingURL=upstreamPullRequest.js.map |
@@ -8,7 +8,5 @@ "use strict"; | ||
/** @internal */ | ||
const OP_PULL_AFTER_NEXT = "PullAfterNext"; | ||
const OP_PULL_AFTER_NEXT = exports.OP_PULL_AFTER_NEXT = "PullAfterNext"; | ||
/** @internal */ | ||
exports.OP_PULL_AFTER_NEXT = OP_PULL_AFTER_NEXT; | ||
const OP_PULL_AFTER_ALL_ENQUEUED = "PullAfterAllEnqueued"; | ||
exports.OP_PULL_AFTER_ALL_ENQUEUED = OP_PULL_AFTER_ALL_ENQUEUED; | ||
const OP_PULL_AFTER_ALL_ENQUEUED = exports.OP_PULL_AFTER_ALL_ENQUEUED = "PullAfterAllEnqueued"; | ||
//# sourceMappingURL=upstreamPullStrategy.js.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.sum = exports.succeed = exports.splitWhere = exports.some = exports.serviceWithSink = exports.serviceWithEffect = exports.serviceWith = exports.service = exports.refineOrDieWith = exports.refineOrDie = exports.raceWith = exports.raceBoth = exports.race = exports.provideContext = exports.orElse = exports.never = exports.mkString = exports.mapLeftover = exports.mapError = exports.mapEffect = exports.map = exports.leftover = exports.last = exports.isSink = exports.ignoreLeftover = exports.head = exports.fromQueue = exports.fromPush = exports.fromHub = exports.fromEffect = exports.fromChannel = exports.forEachWhile = exports.forEachChunkWhile = exports.forEachChunk = exports.forEach = exports.foldWeightedEffect = exports.foldWeightedDecomposeEffect = exports.foldWeightedDecompose = exports.foldWeighted = exports.foldUntilEffect = exports.foldUntil = exports.foldSink = exports.foldLeftEffect = exports.foldLeftChunksEffect = exports.foldLeftChunks = exports.foldLeft = exports.foldEffect = exports.foldChunksEffect = exports.foldChunks = exports.fold = exports.flatMap = exports.findEffect = exports.filterInputEffect = exports.filterInput = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.every = exports.ensuringWith = exports.ensuring = exports.dropWhileEffect = exports.dropWhile = exports.dropUntilEffect = exports.dropUntil = exports.drop = exports.drain = exports.dimapEffect = exports.dimapChunksEffect = exports.dimapChunks = exports.dimap = exports.dieSync = exports.dieMessage = exports.die = exports.count = exports.contramapEffect = exports.contramapChunksEffect = exports.contramapChunks = exports.contramap = exports.contextWithSink = exports.contextWithEffect = exports.contextWith = exports.context = exports.collectLeftover = exports.collectAllWhileWith = exports.collectAllWhileEffect = exports.collectAllWhile = exports.collectAllUntilEffect = exports.collectAllUntil = exports.collectAllToSetN = exports.collectAllToSet = exports.collectAllToMapN = exports.collectAllToMap = exports.collectAllN = exports.collectAllFrom = exports.collectAll = exports.channelToSink = exports.as = exports.SinkTypeId = exports.SinkImpl = void 0; | ||
exports.sum = exports.succeed = exports.splitWhere = exports.some = exports.serviceWithSink = exports.serviceWithEffect = exports.serviceWith = exports.service = exports.refineOrDieWith = exports.refineOrDie = exports.raceWith = exports.raceBoth = exports.race = exports.provideContext = exports.orElse = exports.never = exports.mkString = exports.mapLeftover = exports.mapInputEffect = exports.mapInputChunksEffect = exports.mapInputChunks = exports.mapInput = exports.mapError = exports.mapEffect = exports.map = exports.leftover = exports.last = exports.isSink = exports.ignoreLeftover = exports.head = exports.fromQueue = exports.fromPush = exports.fromHub = exports.fromEffect = exports.fromChannel = exports.forEachWhile = exports.forEachChunkWhile = exports.forEachChunk = exports.forEach = exports.foldWeightedEffect = exports.foldWeightedDecomposeEffect = exports.foldWeightedDecompose = exports.foldWeighted = exports.foldUntilEffect = exports.foldUntil = exports.foldSink = exports.foldLeftEffect = exports.foldLeftChunksEffect = exports.foldLeftChunks = exports.foldLeft = exports.foldEffect = exports.foldChunksEffect = exports.foldChunks = exports.fold = exports.flatMap = exports.findEffect = exports.filterInputEffect = exports.filterInput = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.every = exports.ensuringWith = exports.ensuring = exports.dropWhileEffect = exports.dropWhile = exports.dropUntilEffect = exports.dropUntil = exports.drop = exports.drain = exports.dimapEffect = exports.dimapChunksEffect = exports.dimapChunks = exports.dimap = exports.dieSync = exports.dieMessage = exports.die = exports.count = exports.contextWithSink = exports.contextWithEffect = exports.contextWith = exports.context = exports.collectLeftover = exports.collectAllWhileWith = exports.collectAllWhileEffect = exports.collectAllWhile = exports.collectAllUntilEffect = exports.collectAllUntil = exports.collectAllToSetN = exports.collectAllToSet = exports.collectAllToMapN = exports.collectAllToMap = exports.collectAllN = exports.collectAllFrom = exports.collectAll = exports.channelToSink = exports.as = exports.SinkTypeId = exports.SinkImpl = void 0; | ||
exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.withDuration = exports.unwrapScoped = exports.unwrap = exports.toChannel = exports.timed = exports.take = exports.sync = exports.suspend = exports.summarized = void 0; | ||
@@ -34,5 +34,4 @@ var Chunk = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/data/Chunk")); | ||
/** @internal */ | ||
const SinkTypeId = /*#__PURE__*/Symbol.for(SinkSymbolKey); | ||
const SinkTypeId = exports.SinkTypeId = /*#__PURE__*/Symbol.for(SinkSymbolKey); | ||
/** @internal */ | ||
exports.SinkTypeId = SinkTypeId; | ||
const sinkVariance = { | ||
@@ -64,5 +63,4 @@ _R: _ => _, | ||
exports.suspend = suspend; | ||
const as = /*#__PURE__*/(0, _Function.dual)(2, (self, z) => map(() => z)(self)); | ||
const as = exports.as = /*#__PURE__*/(0, _Function.dual)(2, (self, z) => map(() => z)(self)); | ||
/** @internal */ | ||
exports.as = as; | ||
const collectAll = () => new SinkImpl(collectAllLoop(Chunk.empty())); | ||
@@ -176,3 +174,3 @@ /** @internal */ | ||
/** @internal */ | ||
const collectAllWhileWith = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { | ||
const collectAllWhileWith = exports.collectAllWhileWith = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { | ||
const refs = Effect.zip(Ref.make(false))(Ref.make(Chunk.empty())); | ||
@@ -190,3 +188,2 @@ const newChannel = core.flatMap(([leftoversRef, upstreamDoneRef]) => { | ||
/** @internal */ | ||
exports.collectAllWhileWith = collectAllWhileWith; | ||
const collectAllWhileWithLoop = (self, leftoversRef, upstreamDoneRef, currentResult, p, f) => { | ||
@@ -205,9 +202,7 @@ return channel.foldChannel({ | ||
exports.collectLeftover = collectLeftover; | ||
const contramap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => contramapChunks(Chunk.map(f))(self)); | ||
const mapInput = exports.mapInput = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => mapInputChunks(Chunk.map(f))(self)); | ||
/** @internal */ | ||
exports.contramap = contramap; | ||
const contramapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => contramapChunksEffect(self, chunk => Effect.map(Effect.forEach(chunk, v => f(v)), Chunk.unsafeFromArray))); | ||
const mapInputEffect = exports.mapInputEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => mapInputChunksEffect(self, chunk => Effect.map(Effect.forEach(chunk, v => f(v)), Chunk.unsafeFromArray))); | ||
/** @internal */ | ||
exports.contramapEffect = contramapEffect; | ||
const contramapChunks = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapInputChunks = exports.mapInputChunks = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const loop = core.readWith({ | ||
@@ -221,4 +216,3 @@ onInput: chunk => core.flatMap(() => loop)(core.write(f(chunk))), | ||
/** @internal */ | ||
exports.contramapChunks = contramapChunks; | ||
const contramapChunksEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const mapInputChunksEffect = exports.mapInputChunksEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const loop = core.readWith({ | ||
@@ -232,3 +226,2 @@ onInput: chunk => core.flatMap(() => loop)(core.flatMap(core.write)(core.fromEffect(f(chunk)))), | ||
/** @internal */ | ||
exports.contramapChunksEffect = contramapChunksEffect; | ||
const die = defect => failCause(Cause.die(defect)); | ||
@@ -243,17 +236,12 @@ /** @internal */ | ||
exports.dieSync = dieSync; | ||
const dimap = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => map(contramap(self, options.onInput), options.onDone)); | ||
const dimap = exports.dimap = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => map(mapInput(self, options.onInput), options.onDone)); | ||
/** @internal */ | ||
exports.dimap = dimap; | ||
const dimapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => mapEffect(contramapEffect(self, options.onInput), options.onDone)); | ||
const dimapEffect = exports.dimapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => mapEffect(mapInputEffect(self, options.onInput), options.onDone)); | ||
/** @internal */ | ||
exports.dimapEffect = dimapEffect; | ||
const dimapChunks = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => map(contramapChunks(self, options.onInput), options.onDone)); | ||
const dimapChunks = exports.dimapChunks = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => map(mapInputChunks(self, options.onInput), options.onDone)); | ||
/** @internal */ | ||
exports.dimapChunks = dimapChunks; | ||
const dimapChunksEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => mapEffect(contramapChunksEffect(self, options.onInput), options.onDone)); | ||
const dimapChunksEffect = exports.dimapChunksEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => mapEffect(mapInputChunksEffect(self, options.onInput), options.onDone)); | ||
/** @internal */ | ||
exports.dimapChunksEffect = dimapChunksEffect; | ||
const drain = /*#__PURE__*/new SinkImpl( /*#__PURE__*/channel.drain( /*#__PURE__*/channel.identityChannel())); | ||
const drain = exports.drain = /*#__PURE__*/new SinkImpl( /*#__PURE__*/channel.drain( /*#__PURE__*/channel.identityChannel())); | ||
/** @internal */ | ||
exports.drain = drain; | ||
const drop = n => suspend(() => new SinkImpl(dropLoop(n))); | ||
@@ -318,8 +306,6 @@ /** @internal */ | ||
/** @internal */ | ||
const ensuring = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => new SinkImpl(channel.ensuring(finalizer)(toChannel(self)))); | ||
const ensuring = exports.ensuring = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => new SinkImpl(channel.ensuring(finalizer)(toChannel(self)))); | ||
/** @internal */ | ||
exports.ensuring = ensuring; | ||
const ensuringWith = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => new SinkImpl(core.ensuringWith(finalizer)(toChannel(self)))); | ||
const ensuringWith = exports.ensuringWith = /*#__PURE__*/(0, _Function.dual)(2, (self, finalizer) => new SinkImpl(core.ensuringWith(finalizer)(toChannel(self)))); | ||
/** @internal */ | ||
exports.ensuringWith = ensuringWith; | ||
const context = () => fromEffect(Effect.context()); | ||
@@ -353,10 +339,9 @@ /** @internal */ | ||
const filterInput = f => { | ||
return self => contramapChunks(Chunk.filter(f))(self); | ||
return self => mapInputChunks(Chunk.filter(f))(self); | ||
}; | ||
/** @internal */ | ||
exports.filterInput = filterInput; | ||
const filterInputEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => contramapChunksEffect(self, chunk => Effect.map(Effect.filter(chunk, f), Chunk.unsafeFromArray))); | ||
const filterInputEffect = exports.filterInputEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => mapInputChunksEffect(self, chunk => Effect.map(Effect.filter(chunk, f), Chunk.unsafeFromArray))); | ||
/** @internal */ | ||
exports.filterInputEffect = filterInputEffect; | ||
const findEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const findEffect = exports.findEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const newChannel = core.flatMap(([leftoversRef, upstreamDoneRef]) => { | ||
@@ -385,3 +370,2 @@ const upstreamMarker = core.readWith({ | ||
/** @internal */ | ||
exports.findEffect = findEffect; | ||
const fold = (s, contFn, f) => suspend(() => new SinkImpl(foldReader(s, contFn, f))); | ||
@@ -418,3 +402,3 @@ /** @internal */ | ||
/** @internal */ | ||
const foldSink = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { | ||
const foldSink = exports.foldSink = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { | ||
const newChannel = channel.foldChannel({ | ||
@@ -442,3 +426,2 @@ onFailure: error => toChannel(options.onFailure(error)), | ||
/** @internal */ | ||
exports.foldSink = foldSink; | ||
const foldChunks = (s, contFn, f) => suspend(() => new SinkImpl(foldChunksReader(s, contFn, f))); | ||
@@ -619,3 +602,3 @@ /** @internal */ | ||
/** @internal */ | ||
const flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => foldSink(self, { | ||
const flatMap = exports.flatMap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => foldSink(self, { | ||
onFailure: fail, | ||
@@ -625,3 +608,2 @@ onSuccess: f | ||
/** @internal */ | ||
exports.flatMap = flatMap; | ||
const forEach = f => { | ||
@@ -723,29 +705,21 @@ const process = core.readWithCause({ | ||
exports.leftover = leftover; | ||
const map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
return new SinkImpl(channel.map(f)(toChannel(self))); | ||
}); | ||
/** @internal */ | ||
exports.map = map; | ||
const mapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => new SinkImpl(channel.mapEffect(f)(toChannel(self)))); | ||
const mapEffect = exports.mapEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => new SinkImpl(channel.mapEffect(f)(toChannel(self)))); | ||
/** @internal */ | ||
exports.mapEffect = mapEffect; | ||
const mapError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => new SinkImpl(channel.mapError(f)(toChannel(self)))); | ||
const mapError = exports.mapError = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => new SinkImpl(channel.mapError(f)(toChannel(self)))); | ||
/** @internal */ | ||
exports.mapError = mapError; | ||
const mapLeftover = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => new SinkImpl(channel.mapOut(Chunk.map(f))(toChannel(self)))); | ||
const mapLeftover = exports.mapLeftover = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => new SinkImpl(channel.mapOut(Chunk.map(f))(toChannel(self)))); | ||
/** @internal */ | ||
exports.mapLeftover = mapLeftover; | ||
const never = /*#__PURE__*/fromEffect(Effect.never); | ||
const never = exports.never = /*#__PURE__*/fromEffect(Effect.never); | ||
/** @internal */ | ||
exports.never = never; | ||
const orElse = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => new SinkImpl(channel.orElse(() => toChannel(that()))(toChannel(self)))); | ||
const orElse = exports.orElse = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => new SinkImpl(channel.orElse(() => toChannel(that()))(toChannel(self)))); | ||
/** @internal */ | ||
exports.orElse = orElse; | ||
const provideContext = /*#__PURE__*/(0, _Function.dual)(2, (self, context) => new SinkImpl(core.provideContext(context)(toChannel(self)))); | ||
const provideContext = exports.provideContext = /*#__PURE__*/(0, _Function.dual)(2, (self, context) => new SinkImpl(core.provideContext(context)(toChannel(self)))); | ||
/** @internal */ | ||
exports.provideContext = provideContext; | ||
const race = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => map(Either.merge)(raceBoth(that)(self))); | ||
const race = exports.race = /*#__PURE__*/(0, _Function.dual)(2, (self, that) => map(Either.merge)(raceBoth(that)(self))); | ||
/** @internal */ | ||
exports.race = race; | ||
const raceBoth = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, options) => raceWith(self, { | ||
const raceBoth = exports.raceBoth = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, options) => raceWith(self, { | ||
other: that, | ||
@@ -757,4 +731,3 @@ onSelfDone: selfDone => mergeDecision.Done(Effect.map(selfDone, Either.left)), | ||
/** @internal */ | ||
exports.raceBoth = raceBoth; | ||
const raceWith = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { | ||
const raceWith = exports.raceWith = /*#__PURE__*/(0, _Function.dual)(2, (self, options) => { | ||
const scoped = Effect.gen(function* ($) { | ||
@@ -780,7 +753,5 @@ const hub = yield* $(Hub.bounded(options?.capacity ?? 16)); | ||
/** @internal */ | ||
exports.raceWith = raceWith; | ||
const refineOrDie = /*#__PURE__*/(0, _Function.dual)(2, (self, pf) => refineOrDieWith(pf, _Function.identity)(self)); | ||
const refineOrDie = exports.refineOrDie = /*#__PURE__*/(0, _Function.dual)(2, (self, pf) => refineOrDieWith(pf, _Function.identity)(self)); | ||
/** @internal */ | ||
exports.refineOrDie = refineOrDie; | ||
const refineOrDieWith = /*#__PURE__*/(0, _Function.dual)(3, (self, pf, f) => { | ||
const refineOrDieWith = exports.refineOrDieWith = /*#__PURE__*/(0, _Function.dual)(3, (self, pf, f) => { | ||
const newChannel = channel.catchAll(error => Option.match(pf(error), { | ||
@@ -793,3 +764,2 @@ onNone: () => core.failCauseSync(() => Cause.die(f(error))), | ||
/** @internal */ | ||
exports.refineOrDieWith = refineOrDieWith; | ||
const service = tag => serviceWith(tag, _Function.identity); | ||
@@ -810,3 +780,3 @@ /** @internal */ | ||
exports.some = some; | ||
const splitWhere = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const splitWhere = exports.splitWhere = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => { | ||
const newChannel = core.flatMap(ref => core.flatMap(([leftovers, z]) => core.flatMap(leftover => channel.zipRight(core.succeed(z))(core.write(Chunk.appendAll(Chunk.flatten(leftovers))(leftover))))(core.fromEffect(Ref.get(ref))))(core.collectElements(channel.pipeToOrFail(toChannel(self))(splitWhereSplitter(false, ref, f)))))(core.fromEffect(Ref.make(Chunk.empty()))); | ||
@@ -816,3 +786,2 @@ return new SinkImpl(newChannel); | ||
/** @internal */ | ||
exports.splitWhere = splitWhere; | ||
const splitWhereSplitter = (written, leftovers, f) => core.readWithCause({ | ||
@@ -860,6 +829,5 @@ onInput: input => { | ||
exports.succeed = succeed; | ||
const sum = /*#__PURE__*/foldLeftChunks(0, (acc, chunk) => acc + Chunk.reduce(chunk, 0, (s, a) => s + a)); | ||
const sum = exports.sum = /*#__PURE__*/foldLeftChunks(0, (acc, chunk) => acc + Chunk.reduce(chunk, 0, (s, a) => s + a)); | ||
/** @internal */ | ||
exports.sum = sum; | ||
const summarized = /*#__PURE__*/(0, _Function.dual)(3, (self, summary, f) => { | ||
const summarized = exports.summarized = /*#__PURE__*/(0, _Function.dual)(3, (self, summary, f) => { | ||
const newChannel = core.flatMap(start => core.flatMap(done => channel.map(end => [done, f(start, end)])(core.fromEffect(summary)))(toChannel(self)))(core.fromEffect(summary)); | ||
@@ -869,3 +837,2 @@ return new SinkImpl(newChannel); | ||
/** @internal */ | ||
exports.summarized = summarized; | ||
const sync = evaluate => new SinkImpl(core.sync(evaluate)); | ||
@@ -894,12 +861,9 @@ /** @internal */ | ||
exports.withDuration = withDuration; | ||
const zip = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, options) => zipWith(self, that, (z, z2) => [z, z2], options)); | ||
const zip = exports.zip = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, options) => zipWith(self, that, (z, z2) => [z, z2], options)); | ||
/** @internal */ | ||
exports.zip = zip; | ||
const zipLeft = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, options) => zipWith(self, that, (z, _) => z, options)); | ||
const zipLeft = exports.zipLeft = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, options) => zipWith(self, that, (z, _) => z, options)); | ||
/** @internal */ | ||
exports.zipLeft = zipLeft; | ||
const zipRight = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, options) => zipWith(self, that, (_, z2) => z2, options)); | ||
const zipRight = exports.zipRight = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, options) => zipWith(self, that, (_, z2) => z2, options)); | ||
/** @internal */ | ||
exports.zipRight = zipRight; | ||
const zipWith = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, f, options) => options?.concurrent ? raceWith(self, { | ||
const zipWith = exports.zipWith = /*#__PURE__*/(0, _Function.dual)(args => isSink(args[1]), (self, that, f, options) => options?.concurrent ? raceWith(self, { | ||
other: that, | ||
@@ -923,3 +887,2 @@ onSelfDone: Exit.match({ | ||
/** @internal */ | ||
exports.zipWith = zipWith; | ||
const channelToSink = self => new SinkImpl(self); | ||
@@ -929,6 +892,5 @@ // Constants | ||
exports.channelToSink = channelToSink; | ||
const count = /*#__PURE__*/foldLeftChunks(0, (acc, chunk) => acc + chunk.length); | ||
const count = exports.count = /*#__PURE__*/foldLeftChunks(0, (acc, chunk) => acc + chunk.length); | ||
/** @internal */ | ||
exports.count = count; | ||
const mkString = /*#__PURE__*/suspend(() => { | ||
const mkString = exports.mkString = /*#__PURE__*/suspend(() => { | ||
const strings = []; | ||
@@ -940,5 +902,3 @@ return map(() => strings.join(""))(foldLeftChunks(void 0, (_, elems) => Chunk.map(elems, elem => { | ||
/** @internal */ | ||
exports.mkString = mkString; | ||
const timed = /*#__PURE__*/map(tuple => tuple[1])( /*#__PURE__*/withDuration(drain)); | ||
exports.timed = timed; | ||
const timed = exports.timed = /*#__PURE__*/map(tuple => tuple[1])( /*#__PURE__*/withDuration(drain)); | ||
//# sourceMappingURL=sink.js.map |
@@ -8,16 +8,12 @@ "use strict"; | ||
/** @internal */ | ||
const OP_NOT_STARTED = "NotStarted"; | ||
const OP_NOT_STARTED = exports.OP_NOT_STARTED = "NotStarted"; | ||
/** @internal */ | ||
exports.OP_NOT_STARTED = OP_NOT_STARTED; | ||
const OP_PREVIOUS = "Previous"; | ||
const OP_PREVIOUS = exports.OP_PREVIOUS = "Previous"; | ||
/** @internal */ | ||
exports.OP_PREVIOUS = OP_PREVIOUS; | ||
const OP_CURRENT = "Current"; | ||
const OP_CURRENT = exports.OP_CURRENT = "Current"; | ||
/** @internal */ | ||
exports.OP_CURRENT = OP_CURRENT; | ||
const notStarted = { | ||
const notStarted = exports.notStarted = { | ||
_tag: OP_NOT_STARTED | ||
}; | ||
/** @internal */ | ||
exports.notStarted = notStarted; | ||
const previous = fiber => ({ | ||
@@ -24,0 +20,0 @@ _tag: OP_PREVIOUS, |
@@ -12,22 +12,18 @@ "use strict"; | ||
/** @internal */ | ||
const Left = { | ||
const Left = exports.Left = { | ||
_tag: OpCodes.OP_LEFT | ||
}; | ||
/** @internal */ | ||
exports.Left = Left; | ||
const Right = { | ||
const Right = exports.Right = { | ||
_tag: OpCodes.OP_RIGHT | ||
}; | ||
/** @internal */ | ||
exports.Right = Right; | ||
const Both = { | ||
const Both = exports.Both = { | ||
_tag: OpCodes.OP_BOTH | ||
}; | ||
/** @internal */ | ||
exports.Both = Both; | ||
const Either = { | ||
const Either = exports.Either = { | ||
_tag: OpCodes.OP_EITHER | ||
}; | ||
/** @internal */ | ||
exports.Either = Either; | ||
const fromInput = input => { | ||
@@ -61,3 +57,3 @@ switch (input) { | ||
exports.isEither = isEither; | ||
const match = /*#__PURE__*/(0, _Function.dual)(5, (self, onLeft, onRight, onBoth, onEither) => { | ||
const match = exports.match = /*#__PURE__*/(0, _Function.dual)(5, (self, onLeft, onRight, onBoth, onEither) => { | ||
switch (self._tag) { | ||
@@ -82,3 +78,2 @@ case OpCodes.OP_LEFT: | ||
}); | ||
exports.match = match; | ||
//# sourceMappingURL=haltStrategy.js.map |
@@ -15,11 +15,8 @@ "use strict"; | ||
/** @internal */ | ||
const HandoffTypeId = /*#__PURE__*/Symbol.for("@effect/stream/Stream/Handoff"); | ||
const HandoffTypeId = exports.HandoffTypeId = /*#__PURE__*/Symbol.for("@effect/stream/Stream/Handoff"); | ||
/** @internal */ | ||
exports.HandoffTypeId = HandoffTypeId; | ||
const OP_HANDOFF_STATE_EMPTY = "Empty"; | ||
const OP_HANDOFF_STATE_EMPTY = exports.OP_HANDOFF_STATE_EMPTY = "Empty"; | ||
/** @internal */ | ||
exports.OP_HANDOFF_STATE_EMPTY = OP_HANDOFF_STATE_EMPTY; | ||
const OP_HANDOFF_STATE_FULL = "Full"; | ||
const OP_HANDOFF_STATE_FULL = exports.OP_HANDOFF_STATE_FULL = "Full"; | ||
/** @internal */ | ||
exports.OP_HANDOFF_STATE_FULL = OP_HANDOFF_STATE_FULL; | ||
const handoffStateEmpty = notifyConsumer => ({ | ||
@@ -61,7 +58,6 @@ _tag: OP_HANDOFF_STATE_EMPTY, | ||
exports.make = make; | ||
const offer = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => { | ||
const offer = exports.offer = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => { | ||
return Effect.flatMap(Deferred.make(), deferred => Effect.flatten(Ref.modify(self.ref, state => handoffStateMatch(notifyConsumer => [Effect.zipRight(Deferred.succeed(notifyConsumer, void 0), Deferred.await(deferred)), handoffStateFull(value, deferred)], (_, notifyProducer) => [Effect.flatMap(Deferred.await(notifyProducer), () => offer(value)(self)), state])(state)))); | ||
}); | ||
/** @internal */ | ||
exports.offer = offer; | ||
const take = self => Effect.flatMap(Deferred.make(), deferred => Effect.flatten(Ref.modify(self.ref, state => handoffStateMatch(notifyConsumer => [Effect.flatMap(Deferred.await(notifyConsumer), () => take(self)), state], (value, notifyProducer) => [Effect.as(Deferred.succeed(notifyProducer, void 0), value), handoffStateEmpty(deferred)])(state)))); | ||
@@ -68,0 +64,0 @@ /** @internal */ |
@@ -8,11 +8,8 @@ "use strict"; | ||
/** @internal */ | ||
const OP_EMIT = "Emit"; | ||
const OP_EMIT = exports.OP_EMIT = "Emit"; | ||
/** @internal */ | ||
exports.OP_EMIT = OP_EMIT; | ||
const OP_HALT = "Halt"; | ||
const OP_HALT = exports.OP_HALT = "Halt"; | ||
/** @internal */ | ||
exports.OP_HALT = OP_HALT; | ||
const OP_END = "End"; | ||
const OP_END = exports.OP_END = "End"; | ||
/** @internal */ | ||
exports.OP_END = OP_END; | ||
const emit = elements => ({ | ||
@@ -19,0 +16,0 @@ _tag: OP_EMIT, |
@@ -8,17 +8,13 @@ "use strict"; | ||
/** @internal */ | ||
const OP_SCHEDULE_END = "ScheduleEnd"; | ||
const OP_SCHEDULE_END = exports.OP_SCHEDULE_END = "ScheduleEnd"; | ||
/** @internal */ | ||
exports.OP_SCHEDULE_END = OP_SCHEDULE_END; | ||
const OP_UPSTREAM_END = "UpstreamEnd"; | ||
const OP_UPSTREAM_END = exports.OP_UPSTREAM_END = "UpstreamEnd"; | ||
/** @internal */ | ||
exports.OP_UPSTREAM_END = OP_UPSTREAM_END; | ||
const ScheduleEnd = { | ||
const ScheduleEnd = exports.ScheduleEnd = { | ||
_tag: OP_SCHEDULE_END | ||
}; | ||
/** @internal */ | ||
exports.ScheduleEnd = ScheduleEnd; | ||
const UpstreamEnd = { | ||
const UpstreamEnd = exports.UpstreamEnd = { | ||
_tag: OP_UPSTREAM_END | ||
}; | ||
exports.UpstreamEnd = UpstreamEnd; | ||
//# sourceMappingURL=sinkEndReason.js.map |
@@ -8,32 +8,24 @@ "use strict"; | ||
/** @internal */ | ||
const OP_DRAIN_LEFT = "DrainLeft"; | ||
const OP_DRAIN_LEFT = exports.OP_DRAIN_LEFT = "DrainLeft"; | ||
/** @internal */ | ||
exports.OP_DRAIN_LEFT = OP_DRAIN_LEFT; | ||
const OP_DRAIN_RIGHT = "DrainRight"; | ||
const OP_DRAIN_RIGHT = exports.OP_DRAIN_RIGHT = "DrainRight"; | ||
/** @internal */ | ||
exports.OP_DRAIN_RIGHT = OP_DRAIN_RIGHT; | ||
const OP_PULL_BOTH = "PullBoth"; | ||
const OP_PULL_BOTH = exports.OP_PULL_BOTH = "PullBoth"; | ||
/** @internal */ | ||
exports.OP_PULL_BOTH = OP_PULL_BOTH; | ||
const OP_PULL_LEFT = "PullLeft"; | ||
const OP_PULL_LEFT = exports.OP_PULL_LEFT = "PullLeft"; | ||
/** @internal */ | ||
exports.OP_PULL_LEFT = OP_PULL_LEFT; | ||
const OP_PULL_RIGHT = "PullRight"; | ||
const OP_PULL_RIGHT = exports.OP_PULL_RIGHT = "PullRight"; | ||
/** @internal */ | ||
exports.OP_PULL_RIGHT = OP_PULL_RIGHT; | ||
const DrainLeft = { | ||
const DrainLeft = exports.DrainLeft = { | ||
_tag: OP_DRAIN_LEFT | ||
}; | ||
/** @internal */ | ||
exports.DrainLeft = DrainLeft; | ||
const DrainRight = { | ||
const DrainRight = exports.DrainRight = { | ||
_tag: OP_DRAIN_RIGHT | ||
}; | ||
/** @internal */ | ||
exports.DrainRight = DrainRight; | ||
const PullBoth = { | ||
const PullBoth = exports.PullBoth = { | ||
_tag: OP_PULL_BOTH | ||
}; | ||
/** @internal */ | ||
exports.PullBoth = PullBoth; | ||
const PullLeft = rightChunk => ({ | ||
@@ -40,0 +32,0 @@ _tag: OP_PULL_LEFT, |
@@ -8,16 +8,12 @@ "use strict"; | ||
/** @internal */ | ||
const OP_PULL_BOTH = "PullBoth"; | ||
const OP_PULL_BOTH = exports.OP_PULL_BOTH = "PullBoth"; | ||
/** @internal */ | ||
exports.OP_PULL_BOTH = OP_PULL_BOTH; | ||
const OP_PULL_LEFT = "PullLet"; | ||
const OP_PULL_LEFT = exports.OP_PULL_LEFT = "PullLet"; | ||
/** @internal */ | ||
exports.OP_PULL_LEFT = OP_PULL_LEFT; | ||
const OP_PULL_RIGHT = "PullRight"; | ||
const OP_PULL_RIGHT = exports.OP_PULL_RIGHT = "PullRight"; | ||
/** @internal */ | ||
exports.OP_PULL_RIGHT = OP_PULL_RIGHT; | ||
const PullBoth = { | ||
const PullBoth = exports.PullBoth = { | ||
_tag: OP_PULL_BOTH | ||
}; | ||
/** @internal */ | ||
exports.PullBoth = PullBoth; | ||
const PullLeft = rightChunk => ({ | ||
@@ -24,0 +20,0 @@ _tag: OP_PULL_LEFT, |
@@ -22,5 +22,4 @@ "use strict"; | ||
/** @internal */ | ||
const SubscriptionRefTypeId = /*#__PURE__*/Symbol.for(SubscriptionRefSymbolKey); | ||
const SubscriptionRefTypeId = exports.SubscriptionRefTypeId = /*#__PURE__*/Symbol.for(SubscriptionRefSymbolKey); | ||
/** @internal */ | ||
exports.SubscriptionRefTypeId = SubscriptionRefTypeId; | ||
const subscriptionRefVariance = { | ||
@@ -64,10 +63,7 @@ _A: _ => _ | ||
exports.make = make; | ||
const modify = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.modify(f)); | ||
const modify = exports.modify = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.modify(f)); | ||
/** @internal */ | ||
exports.modify = modify; | ||
const modifyEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.modifyEffect(f)); | ||
const modifyEffect = exports.modifyEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => self.modifyEffect(f)); | ||
/** @internal */ | ||
exports.modifyEffect = modifyEffect; | ||
const set = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => self.semaphore.withPermits(1)(Effect.zipLeft(Hub.publish(self.hub, value))(Ref.set(self.ref, value)))); | ||
exports.set = set; | ||
const set = exports.set = /*#__PURE__*/(0, _Function.dual)(2, (self, value) => self.semaphore.withPermits(1)(Effect.zipLeft(Hub.publish(self.hub, value))(Ref.set(self.ref, value)))); | ||
//# sourceMappingURL=subscriptionRef.js.map |
@@ -20,5 +20,4 @@ "use strict"; | ||
/** @internal */ | ||
const TakeTypeId = /*#__PURE__*/Symbol.for(TakeSymbolKey); | ||
const TakeTypeId = exports.TakeTypeId = /*#__PURE__*/Symbol.for(TakeSymbolKey); | ||
/** @internal */ | ||
exports.TakeTypeId = TakeTypeId; | ||
const takeVariance = { | ||
@@ -53,5 +52,4 @@ _E: _ => _, | ||
exports.done = done; | ||
const end = /*#__PURE__*/new TakeImpl( /*#__PURE__*/Exit.fail( /*#__PURE__*/Option.none())); | ||
const end = exports.end = /*#__PURE__*/new TakeImpl( /*#__PURE__*/Exit.fail( /*#__PURE__*/Option.none())); | ||
/** @internal */ | ||
exports.end = end; | ||
const fail = error => new TakeImpl(Exit.fail(Option.some(error))); | ||
@@ -105,3 +103,3 @@ /** @internal */ | ||
exports.make = make; | ||
const match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
const match = exports.match = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
onEnd, | ||
@@ -118,4 +116,3 @@ onFailure, | ||
/** @internal */ | ||
exports.match = match; | ||
const matchEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
const matchEffect = exports.matchEffect = /*#__PURE__*/(0, _Function.dual)(2, (self, { | ||
onEnd, | ||
@@ -132,11 +129,8 @@ onFailure, | ||
/** @internal */ | ||
exports.matchEffect = matchEffect; | ||
const map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => new TakeImpl(Exit.map(Chunk.map(f))(self.exit))); | ||
const map = exports.map = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => new TakeImpl(Exit.map(Chunk.map(f))(self.exit))); | ||
/** @internal */ | ||
exports.map = map; | ||
const of = value => new TakeImpl(Exit.succeed(Chunk.of(value))); | ||
/** @internal */ | ||
exports.of = of; | ||
const tap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => Effect.asUnit(Exit.forEachEffect(f)(self.exit))); | ||
exports.tap = tap; | ||
const tap = exports.tap = /*#__PURE__*/(0, _Function.dual)(2, (self, f) => Effect.asUnit(Exit.forEachEffect(f)(self.exit))); | ||
//# sourceMappingURL=take.js.map |
{ | ||
"name": "@effect/stream", | ||
"version": "0.36.1", | ||
"version": "0.37.0", | ||
"description": "Functional programming in TypeScript", | ||
@@ -28,5 +28,5 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@effect/data": "^0.18.3", | ||
"@effect/io": "^0.40.0" | ||
"@effect/data": "^0.18.6", | ||
"@effect/io": "^0.41.0" | ||
} | ||
} |
@@ -218,3 +218,3 @@ /** | ||
*/ | ||
export declare const contramap: (<In0, In>(f: (input: In0) => In) => <R, E, L, Z>(self: Sink<R, E, In, L, Z>) => Sink<R, E, In0, L, Z>) & (<R_1, E_1, L_1, Z_1, In0_1, In_1>(self: Sink<R_1, E_1, In_1, L_1, Z_1>, f: (input: In0_1) => In_1) => Sink<R_1, E_1, In0_1, L_1, Z_1>); | ||
export declare const mapInput: (<In0, In>(f: (input: In0) => In) => <R, E, L, Z>(self: Sink<R, E, In, L, Z>) => Sink<R, E, In0, L, Z>) & (<R_1, E_1, L_1, Z_1, In0_1, In_1>(self: Sink<R_1, E_1, In_1, L_1, Z_1>, f: (input: In0_1) => In_1) => Sink<R_1, E_1, In0_1, L_1, Z_1>); | ||
/** | ||
@@ -226,3 +226,3 @@ * Effectfully transforms this sink's input elements. | ||
*/ | ||
export declare const contramapEffect: (<In0, R2, E2, In>(f: (input: In0) => Effect.Effect<R2, E2, In>) => <R, E, L, Z>(self: Sink<R, E, In, L, Z>) => Sink<R2 | R, E2 | E, In0, L, Z>) & (<R_1, E_1, L_1, Z_1, In0_1, R2_1, E2_1, In_1>(self: Sink<R_1, E_1, In_1, L_1, Z_1>, f: (input: In0_1) => Effect.Effect<R2_1, E2_1, In_1>) => Sink<R_1 | R2_1, E_1 | E2_1, In0_1, L_1, Z_1>); | ||
export declare const mapInputEffect: (<In0, R2, E2, In>(f: (input: In0) => Effect.Effect<R2, E2, In>) => <R, E, L, Z>(self: Sink<R, E, In, L, Z>) => Sink<R2 | R, E2 | E, In0, L, Z>) & (<R_1, E_1, L_1, Z_1, In0_1, R2_1, E2_1, In_1>(self: Sink<R_1, E_1, In_1, L_1, Z_1>, f: (input: In0_1) => Effect.Effect<R2_1, E2_1, In_1>) => Sink<R_1 | R2_1, E_1 | E2_1, In0_1, L_1, Z_1>); | ||
/** | ||
@@ -234,3 +234,3 @@ * Transforms this sink's input chunks. `f` must preserve chunking-invariance. | ||
*/ | ||
export declare const contramapChunks: { | ||
export declare const mapInputChunks: { | ||
<In0, In>(f: (chunk: Chunk.Chunk<In0>) => Chunk.Chunk<In>): <R, E, L, Z>(self: Sink<R, E, In, L, Z>) => Sink<R, E, In0, L, Z>; | ||
@@ -246,3 +246,3 @@ <R, E, L, Z, In0, In>(self: Sink<R, E, In, L, Z>, f: (chunk: Chunk.Chunk<In0>) => Chunk.Chunk<In>): Sink<R, E, In0, L, Z>; | ||
*/ | ||
export declare const contramapChunksEffect: { | ||
export declare const mapInputChunksEffect: { | ||
<In0, R2, E2, In>(f: (chunk: Chunk.Chunk<In0>) => Effect.Effect<R2, E2, Chunk.Chunk<In>>): <R, E, L, Z>(self: Sink<R, E, In, L, Z>) => Sink<R2 | R, E2 | E, In0, L, Z>; | ||
@@ -249,0 +249,0 @@ <R, E, L, Z, In0, R2, E2, In>(self: Sink<R, E, In, L, Z>, f: (chunk: Chunk.Chunk<In0>) => Effect.Effect<R2, E2, Chunk.Chunk<In>>): Sink<R | R2, E | E2, In0, L, Z>; |
320
Sink.js
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.unwrap = exports.toChannel = exports.timed = exports.take = exports.sync = exports.suspend = exports.summarized = exports.sum = exports.succeed = exports.splitWhere = exports.some = exports.refineOrDieWith = exports.refineOrDie = exports.raceWith = exports.raceBoth = exports.race = exports.provideContext = exports.orElse = exports.never = exports.mkString = exports.mapLeftover = exports.mapError = exports.mapEffect = exports.map = exports.leftover = exports.last = exports.ignoreLeftover = exports.head = exports.fromQueue = exports.fromPush = exports.fromHub = exports.fromEffect = exports.fromChannel = exports.forEachWhile = exports.forEachChunkWhile = exports.forEachChunk = exports.forEach = exports.foldWeightedEffect = exports.foldWeightedDecomposeEffect = exports.foldWeightedDecompose = exports.foldWeighted = exports.foldUntilEffect = exports.foldUntil = exports.foldSink = exports.foldLeftEffect = exports.foldLeftChunksEffect = exports.foldLeftChunks = exports.foldLeft = exports.foldEffect = exports.foldChunksEffect = exports.foldChunks = exports.fold = exports.flatMap = exports.findEffect = exports.filterInputEffect = exports.filterInput = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.every = exports.ensuringWith = exports.ensuring = exports.dropWhileEffect = exports.dropWhile = exports.dropUntilEffect = exports.dropUntil = exports.drop = exports.drain = exports.dimapEffect = exports.dimapChunksEffect = exports.dimapChunks = exports.dimap = exports.dieSync = exports.dieMessage = exports.die = exports.count = exports.contramapEffect = exports.contramapChunksEffect = exports.contramapChunks = exports.contramap = exports.contextWithSink = exports.contextWithEffect = exports.contextWith = exports.context = exports.collectLeftover = exports.collectAllWhileWith = exports.collectAllWhileEffect = exports.collectAllWhile = exports.collectAllUntilEffect = exports.collectAllUntil = exports.collectAllToSetN = exports.collectAllToSet = exports.collectAllToMapN = exports.collectAllToMap = exports.collectAllN = exports.collectAllFrom = exports.collectAll = exports.as = exports.SinkTypeId = void 0; | ||
exports.unwrap = exports.toChannel = exports.timed = exports.take = exports.sync = exports.suspend = exports.summarized = exports.sum = exports.succeed = exports.splitWhere = exports.some = exports.refineOrDieWith = exports.refineOrDie = exports.raceWith = exports.raceBoth = exports.race = exports.provideContext = exports.orElse = exports.never = exports.mkString = exports.mapLeftover = exports.mapInputEffect = exports.mapInputChunksEffect = exports.mapInputChunks = exports.mapInput = exports.mapError = exports.mapEffect = exports.map = exports.leftover = exports.last = exports.ignoreLeftover = exports.head = exports.fromQueue = exports.fromPush = exports.fromHub = exports.fromEffect = exports.fromChannel = exports.forEachWhile = exports.forEachChunkWhile = exports.forEachChunk = exports.forEach = exports.foldWeightedEffect = exports.foldWeightedDecomposeEffect = exports.foldWeightedDecompose = exports.foldWeighted = exports.foldUntilEffect = exports.foldUntil = exports.foldSink = exports.foldLeftEffect = exports.foldLeftChunksEffect = exports.foldLeftChunks = exports.foldLeft = exports.foldEffect = exports.foldChunksEffect = exports.foldChunks = exports.fold = exports.flatMap = exports.findEffect = exports.filterInputEffect = exports.filterInput = exports.failSync = exports.failCauseSync = exports.failCause = exports.fail = exports.every = exports.ensuringWith = exports.ensuring = exports.dropWhileEffect = exports.dropWhile = exports.dropUntilEffect = exports.dropUntil = exports.drop = exports.drain = exports.dimapEffect = exports.dimapChunksEffect = exports.dimapChunks = exports.dimap = exports.dieSync = exports.dieMessage = exports.die = exports.count = exports.contextWithSink = exports.contextWithEffect = exports.contextWith = exports.context = exports.collectLeftover = exports.collectAllWhileWith = exports.collectAllWhileEffect = exports.collectAllWhile = exports.collectAllUntilEffect = exports.collectAllUntil = exports.collectAllToSetN = exports.collectAllToSet = exports.collectAllToMapN = exports.collectAllToMap = exports.collectAllN = exports.collectAllFrom = exports.collectAll = exports.as = exports.SinkTypeId = void 0; | ||
exports.zipWith = exports.zipRight = exports.zipLeft = exports.zip = exports.withDuration = exports.unwrapScoped = void 0; | ||
@@ -16,3 +16,3 @@ var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/stream/internal/sink")); | ||
*/ | ||
const SinkTypeId = internal.SinkTypeId; | ||
const SinkTypeId = exports.SinkTypeId = internal.SinkTypeId; | ||
/** | ||
@@ -24,4 +24,3 @@ * Replaces this sink's result with the provided value. | ||
*/ | ||
exports.SinkTypeId = SinkTypeId; | ||
const as = internal.as; | ||
const as = exports.as = internal.as; | ||
/** | ||
@@ -33,4 +32,3 @@ * A sink that collects all elements into a `Chunk`. | ||
*/ | ||
exports.as = as; | ||
const collectAll = internal.collectAll; | ||
const collectAll = exports.collectAll = internal.collectAll; | ||
/** | ||
@@ -42,4 +40,3 @@ * A sink that collects first `n` elements into a chunk. | ||
*/ | ||
exports.collectAll = collectAll; | ||
const collectAllN = internal.collectAllN; | ||
const collectAllN = exports.collectAllN = internal.collectAllN; | ||
/** | ||
@@ -51,4 +48,3 @@ * Repeatedly runs the sink and accumulates its results into a `Chunk`. | ||
*/ | ||
exports.collectAllN = collectAllN; | ||
const collectAllFrom = internal.collectAllFrom; | ||
const collectAllFrom = exports.collectAllFrom = internal.collectAllFrom; | ||
/** | ||
@@ -62,4 +58,3 @@ * A sink that collects all of its inputs into a map. The keys are extracted | ||
*/ | ||
exports.collectAllFrom = collectAllFrom; | ||
const collectAllToMap = internal.collectAllToMap; | ||
const collectAllToMap = exports.collectAllToMap = internal.collectAllToMap; | ||
/** | ||
@@ -73,4 +68,3 @@ * A sink that collects first `n` keys into a map. The keys are calculated | ||
*/ | ||
exports.collectAllToMap = collectAllToMap; | ||
const collectAllToMapN = internal.collectAllToMapN; | ||
const collectAllToMapN = exports.collectAllToMapN = internal.collectAllToMapN; | ||
/** | ||
@@ -82,4 +76,3 @@ * A sink that collects all of its inputs into a set. | ||
*/ | ||
exports.collectAllToMapN = collectAllToMapN; | ||
const collectAllToSet = internal.collectAllToSet; | ||
const collectAllToSet = exports.collectAllToSet = internal.collectAllToSet; | ||
/** | ||
@@ -91,4 +84,3 @@ * A sink that collects first `n` distinct inputs into a set. | ||
*/ | ||
exports.collectAllToSet = collectAllToSet; | ||
const collectAllToSetN = internal.collectAllToSetN; | ||
const collectAllToSetN = exports.collectAllToSetN = internal.collectAllToSetN; | ||
/** | ||
@@ -101,4 +93,3 @@ * Accumulates incoming elements into a chunk until predicate `p` is | ||
*/ | ||
exports.collectAllToSetN = collectAllToSetN; | ||
const collectAllUntil = internal.collectAllUntil; | ||
const collectAllUntil = exports.collectAllUntil = internal.collectAllUntil; | ||
/** | ||
@@ -111,4 +102,3 @@ * Accumulates incoming elements into a chunk until effectful predicate `p` is | ||
*/ | ||
exports.collectAllUntil = collectAllUntil; | ||
const collectAllUntilEffect = internal.collectAllUntilEffect; | ||
const collectAllUntilEffect = exports.collectAllUntilEffect = internal.collectAllUntilEffect; | ||
/** | ||
@@ -121,4 +111,3 @@ * Accumulates incoming elements into a chunk as long as they verify predicate | ||
*/ | ||
exports.collectAllUntilEffect = collectAllUntilEffect; | ||
const collectAllWhile = internal.collectAllWhile; | ||
const collectAllWhile = exports.collectAllWhile = internal.collectAllWhile; | ||
/** | ||
@@ -131,4 +120,3 @@ * Accumulates incoming elements into a chunk as long as they verify effectful | ||
*/ | ||
exports.collectAllWhile = collectAllWhile; | ||
const collectAllWhileEffect = internal.collectAllWhileEffect; | ||
const collectAllWhileEffect = exports.collectAllWhileEffect = internal.collectAllWhileEffect; | ||
/** | ||
@@ -141,4 +129,3 @@ * Repeatedly runs the sink for as long as its results satisfy the predicate | ||
*/ | ||
exports.collectAllWhileEffect = collectAllWhileEffect; | ||
const collectAllWhileWith = internal.collectAllWhileWith; | ||
const collectAllWhileWith = exports.collectAllWhileWith = internal.collectAllWhileWith; | ||
/** | ||
@@ -151,4 +138,3 @@ * Collects the leftovers from the stream when the sink succeeds and returns | ||
*/ | ||
exports.collectAllWhileWith = collectAllWhileWith; | ||
const collectLeftover = internal.collectLeftover; | ||
const collectLeftover = exports.collectLeftover = internal.collectLeftover; | ||
/** | ||
@@ -160,4 +146,3 @@ * Transforms this sink's input elements. | ||
*/ | ||
exports.collectLeftover = collectLeftover; | ||
const contramap = internal.contramap; | ||
const mapInput = exports.mapInput = internal.mapInput; | ||
/** | ||
@@ -169,4 +154,3 @@ * Effectfully transforms this sink's input elements. | ||
*/ | ||
exports.contramap = contramap; | ||
const contramapEffect = internal.contramapEffect; | ||
const mapInputEffect = exports.mapInputEffect = internal.mapInputEffect; | ||
/** | ||
@@ -178,4 +162,3 @@ * Transforms this sink's input chunks. `f` must preserve chunking-invariance. | ||
*/ | ||
exports.contramapEffect = contramapEffect; | ||
const contramapChunks = internal.contramapChunks; | ||
const mapInputChunks = exports.mapInputChunks = internal.mapInputChunks; | ||
/** | ||
@@ -188,4 +171,3 @@ * Effectfully transforms this sink's input chunks. `f` must preserve | ||
*/ | ||
exports.contramapChunks = contramapChunks; | ||
const contramapChunksEffect = internal.contramapChunksEffect; | ||
const mapInputChunksEffect = exports.mapInputChunksEffect = internal.mapInputChunksEffect; | ||
/** | ||
@@ -197,4 +179,3 @@ * A sink that counts the number of elements fed to it. | ||
*/ | ||
exports.contramapChunksEffect = contramapChunksEffect; | ||
const count = internal.count; | ||
const count = exports.count = internal.count; | ||
/** | ||
@@ -206,4 +187,3 @@ * Creates a sink halting with the specified defect. | ||
*/ | ||
exports.count = count; | ||
const die = internal.die; | ||
const die = exports.die = internal.die; | ||
/** | ||
@@ -216,4 +196,3 @@ * Creates a sink halting with the specified message, wrapped in a | ||
*/ | ||
exports.die = die; | ||
const dieMessage = internal.dieMessage; | ||
const dieMessage = exports.dieMessage = internal.dieMessage; | ||
/** | ||
@@ -225,4 +204,3 @@ * Creates a sink halting with the specified defect. | ||
*/ | ||
exports.dieMessage = dieMessage; | ||
const dieSync = internal.dieSync; | ||
const dieSync = exports.dieSync = internal.dieSync; | ||
/** | ||
@@ -235,4 +213,3 @@ * Transforms both inputs and result of this sink using the provided | ||
*/ | ||
exports.dieSync = dieSync; | ||
const dimap = internal.dimap; | ||
const dimap = exports.dimap = internal.dimap; | ||
/** | ||
@@ -245,4 +222,3 @@ * Effectfully transforms both inputs and result of this sink using the | ||
*/ | ||
exports.dimap = dimap; | ||
const dimapEffect = internal.dimapEffect; | ||
const dimapEffect = exports.dimapEffect = internal.dimapEffect; | ||
/** | ||
@@ -255,4 +231,3 @@ * Transforms both input chunks and result of this sink using the provided | ||
*/ | ||
exports.dimapEffect = dimapEffect; | ||
const dimapChunks = internal.dimapChunks; | ||
const dimapChunks = exports.dimapChunks = internal.dimapChunks; | ||
/** | ||
@@ -265,4 +240,3 @@ * Effectfully transforms both input chunks and result of this sink using the | ||
*/ | ||
exports.dimapChunks = dimapChunks; | ||
const dimapChunksEffect = internal.dimapChunksEffect; | ||
const dimapChunksEffect = exports.dimapChunksEffect = internal.dimapChunksEffect; | ||
/** | ||
@@ -274,4 +248,3 @@ * A sink that ignores its inputs. | ||
*/ | ||
exports.dimapChunksEffect = dimapChunksEffect; | ||
const drain = internal.drain; | ||
const drain = exports.drain = internal.drain; | ||
/** | ||
@@ -283,4 +256,3 @@ * Creates a sink that drops `n` elements. | ||
*/ | ||
exports.drain = drain; | ||
const drop = internal.drop; | ||
const drop = exports.drop = internal.drop; | ||
/** | ||
@@ -292,4 +264,3 @@ * Drops incoming elements until the predicate is satisfied. | ||
*/ | ||
exports.drop = drop; | ||
const dropUntil = internal.dropUntil; | ||
const dropUntil = exports.dropUntil = internal.dropUntil; | ||
/** | ||
@@ -301,4 +272,3 @@ * Drops incoming elements until the effectful predicate is satisfied. | ||
*/ | ||
exports.dropUntil = dropUntil; | ||
const dropUntilEffect = internal.dropUntilEffect; | ||
const dropUntilEffect = exports.dropUntilEffect = internal.dropUntilEffect; | ||
/** | ||
@@ -310,4 +280,3 @@ * Drops incoming elements as long as the predicate is satisfied. | ||
*/ | ||
exports.dropUntilEffect = dropUntilEffect; | ||
const dropWhile = internal.dropWhile; | ||
const dropWhile = exports.dropWhile = internal.dropWhile; | ||
/** | ||
@@ -319,4 +288,3 @@ * Drops incoming elements as long as the effectful predicate is satisfied. | ||
*/ | ||
exports.dropWhile = dropWhile; | ||
const dropWhileEffect = internal.dropWhileEffect; | ||
const dropWhileEffect = exports.dropWhileEffect = internal.dropWhileEffect; | ||
/** | ||
@@ -330,4 +298,3 @@ * Returns a new sink with an attached finalizer. The finalizer is guaranteed | ||
*/ | ||
exports.dropWhileEffect = dropWhileEffect; | ||
const ensuring = internal.ensuring; | ||
const ensuring = exports.ensuring = internal.ensuring; | ||
/** | ||
@@ -341,4 +308,3 @@ * Returns a new sink with an attached finalizer. The finalizer is guaranteed | ||
*/ | ||
exports.ensuring = ensuring; | ||
const ensuringWith = internal.ensuringWith; | ||
const ensuringWith = exports.ensuringWith = internal.ensuringWith; | ||
/** | ||
@@ -350,4 +316,3 @@ * Accesses the whole context of the sink. | ||
*/ | ||
exports.ensuringWith = ensuringWith; | ||
const context = internal.context; | ||
const context = exports.context = internal.context; | ||
/** | ||
@@ -359,4 +324,3 @@ * Accesses the context of the sink. | ||
*/ | ||
exports.context = context; | ||
const contextWith = internal.contextWith; | ||
const contextWith = exports.contextWith = internal.contextWith; | ||
/** | ||
@@ -368,4 +332,3 @@ * Accesses the context of the sink in the context of an effect. | ||
*/ | ||
exports.contextWith = contextWith; | ||
const contextWithEffect = internal.contextWithEffect; | ||
const contextWithEffect = exports.contextWithEffect = internal.contextWithEffect; | ||
/** | ||
@@ -377,4 +340,3 @@ * Accesses the context of the sink in the context of a sink. | ||
*/ | ||
exports.contextWithEffect = contextWithEffect; | ||
const contextWithSink = internal.contextWithSink; | ||
const contextWithSink = exports.contextWithSink = internal.contextWithSink; | ||
/** | ||
@@ -386,4 +348,3 @@ * A sink that returns whether all elements satisfy the specified predicate. | ||
*/ | ||
exports.contextWithSink = contextWithSink; | ||
const every = internal.every; | ||
const every = exports.every = internal.every; | ||
/** | ||
@@ -395,4 +356,3 @@ * A sink that always fails with the specified error. | ||
*/ | ||
exports.every = every; | ||
const fail = internal.fail; | ||
const fail = exports.fail = internal.fail; | ||
/** | ||
@@ -404,4 +364,3 @@ * A sink that always fails with the specified lazily evaluated error. | ||
*/ | ||
exports.fail = fail; | ||
const failSync = internal.failSync; | ||
const failSync = exports.failSync = internal.failSync; | ||
/** | ||
@@ -413,4 +372,3 @@ * Creates a sink halting with a specified `Cause`. | ||
*/ | ||
exports.failSync = failSync; | ||
const failCause = internal.failCause; | ||
const failCause = exports.failCause = internal.failCause; | ||
/** | ||
@@ -422,4 +380,3 @@ * Creates a sink halting with a specified lazily evaluated `Cause`. | ||
*/ | ||
exports.failCause = failCause; | ||
const failCauseSync = internal.failCauseSync; | ||
const failCauseSync = exports.failCauseSync = internal.failCauseSync; | ||
/** | ||
@@ -431,4 +388,3 @@ * Filters the sink's input with the given predicate. | ||
*/ | ||
exports.failCauseSync = failCauseSync; | ||
const filterInput = internal.filterInput; | ||
const filterInput = exports.filterInput = internal.filterInput; | ||
/** | ||
@@ -440,4 +396,3 @@ * Effectfully filter the input of this sink using the specified predicate. | ||
*/ | ||
exports.filterInput = filterInput; | ||
const filterInputEffect = internal.filterInputEffect; | ||
const filterInputEffect = exports.filterInputEffect = internal.filterInputEffect; | ||
/** | ||
@@ -449,4 +404,3 @@ * Creates a sink that produces values until one verifies the predicate `f`. | ||
*/ | ||
exports.filterInputEffect = filterInputEffect; | ||
const findEffect = internal.findEffect; | ||
const findEffect = exports.findEffect = internal.findEffect; | ||
/** | ||
@@ -459,4 +413,3 @@ * A sink that folds its inputs with the provided function, termination | ||
*/ | ||
exports.findEffect = findEffect; | ||
const fold = internal.fold; | ||
const fold = exports.fold = internal.fold; | ||
/** | ||
@@ -468,4 +421,3 @@ * Folds over the result of the sink | ||
*/ | ||
exports.fold = fold; | ||
const foldSink = internal.foldSink; | ||
const foldSink = exports.foldSink = internal.foldSink; | ||
/** | ||
@@ -480,4 +432,3 @@ * A sink that folds its input chunks with the provided function, termination | ||
*/ | ||
exports.foldSink = foldSink; | ||
const foldChunks = internal.foldChunks; | ||
const foldChunks = exports.foldChunks = internal.foldChunks; | ||
/** | ||
@@ -492,4 +443,3 @@ * A sink that effectfully folds its input chunks with the provided function, | ||
*/ | ||
exports.foldChunks = foldChunks; | ||
const foldChunksEffect = internal.foldChunksEffect; | ||
const foldChunksEffect = exports.foldChunksEffect = internal.foldChunksEffect; | ||
/** | ||
@@ -502,4 +452,3 @@ * A sink that effectfully folds its inputs with the provided function, | ||
*/ | ||
exports.foldChunksEffect = foldChunksEffect; | ||
const foldEffect = internal.foldEffect; | ||
const foldEffect = exports.foldEffect = internal.foldEffect; | ||
/** | ||
@@ -511,4 +460,3 @@ * A sink that folds its inputs with the provided function and initial state. | ||
*/ | ||
exports.foldEffect = foldEffect; | ||
const foldLeft = internal.foldLeft; | ||
const foldLeft = exports.foldLeft = internal.foldLeft; | ||
/** | ||
@@ -521,4 +469,3 @@ * A sink that folds its input chunks with the provided function and initial | ||
*/ | ||
exports.foldLeft = foldLeft; | ||
const foldLeftChunks = internal.foldLeftChunks; | ||
const foldLeftChunks = exports.foldLeftChunks = internal.foldLeftChunks; | ||
/** | ||
@@ -531,4 +478,3 @@ * A sink that effectfully folds its input chunks with the provided function | ||
*/ | ||
exports.foldLeftChunks = foldLeftChunks; | ||
const foldLeftChunksEffect = internal.foldLeftChunksEffect; | ||
const foldLeftChunksEffect = exports.foldLeftChunksEffect = internal.foldLeftChunksEffect; | ||
/** | ||
@@ -541,4 +487,3 @@ * A sink that effectfully folds its inputs with the provided function and | ||
*/ | ||
exports.foldLeftChunksEffect = foldLeftChunksEffect; | ||
const foldLeftEffect = internal.foldLeftEffect; | ||
const foldLeftEffect = exports.foldLeftEffect = internal.foldLeftEffect; | ||
/** | ||
@@ -553,4 +498,3 @@ * Creates a sink that folds elements of type `In` into a structure of type | ||
*/ | ||
exports.foldLeftEffect = foldLeftEffect; | ||
const foldUntil = internal.foldUntil; | ||
const foldUntil = exports.foldUntil = internal.foldUntil; | ||
/** | ||
@@ -565,4 +509,3 @@ * Creates a sink that effectfully folds elements of type `In` into a | ||
*/ | ||
exports.foldUntil = foldUntil; | ||
const foldUntilEffect = internal.foldUntilEffect; | ||
const foldUntilEffect = exports.foldUntilEffect = internal.foldUntilEffect; | ||
/** | ||
@@ -581,4 +524,3 @@ * Creates a sink that folds elements of type `In` into a structure of type | ||
*/ | ||
exports.foldUntilEffect = foldUntilEffect; | ||
const foldWeighted = internal.foldWeighted; | ||
const foldWeighted = exports.foldWeighted = internal.foldWeighted; | ||
/** | ||
@@ -621,4 +563,3 @@ * Creates a sink that folds elements of type `In` into a structure of type | ||
*/ | ||
exports.foldWeighted = foldWeighted; | ||
const foldWeightedDecompose = internal.foldWeightedDecompose; | ||
const foldWeightedDecompose = exports.foldWeightedDecompose = internal.foldWeightedDecompose; | ||
/** | ||
@@ -641,4 +582,3 @@ * Creates a sink that effectfully folds elements of type `In` into a | ||
*/ | ||
exports.foldWeightedDecompose = foldWeightedDecompose; | ||
const foldWeightedDecomposeEffect = internal.foldWeightedDecomposeEffect; | ||
const foldWeightedDecomposeEffect = exports.foldWeightedDecomposeEffect = internal.foldWeightedDecomposeEffect; | ||
/** | ||
@@ -657,4 +597,3 @@ * Creates a sink that effectfully folds elements of type `In` into a | ||
*/ | ||
exports.foldWeightedDecomposeEffect = foldWeightedDecomposeEffect; | ||
const foldWeightedEffect = internal.foldWeightedEffect; | ||
const foldWeightedEffect = exports.foldWeightedEffect = internal.foldWeightedEffect; | ||
/** | ||
@@ -667,4 +606,3 @@ * A sink that executes the provided effectful function for every element fed | ||
*/ | ||
exports.foldWeightedEffect = foldWeightedEffect; | ||
const forEach = internal.forEach; | ||
const forEach = exports.forEach = internal.forEach; | ||
/** | ||
@@ -677,4 +615,3 @@ * A sink that executes the provided effectful function for every chunk fed to | ||
*/ | ||
exports.forEach = forEach; | ||
const forEachChunk = internal.forEachChunk; | ||
const forEachChunk = exports.forEachChunk = internal.forEachChunk; | ||
/** | ||
@@ -687,4 +624,3 @@ * A sink that executes the provided effectful function for every chunk fed to | ||
*/ | ||
exports.forEachChunk = forEachChunk; | ||
const forEachChunkWhile = internal.forEachChunkWhile; | ||
const forEachChunkWhile = exports.forEachChunkWhile = internal.forEachChunkWhile; | ||
/** | ||
@@ -697,4 +633,3 @@ * A sink that executes the provided effectful function for every element fed | ||
*/ | ||
exports.forEachChunkWhile = forEachChunkWhile; | ||
const forEachWhile = internal.forEachWhile; | ||
const forEachWhile = exports.forEachWhile = internal.forEachWhile; | ||
/** | ||
@@ -710,4 +645,3 @@ * Runs this sink until it yields a result, then uses that result to create | ||
*/ | ||
exports.forEachWhile = forEachWhile; | ||
const flatMap = internal.flatMap; | ||
const flatMap = exports.flatMap = internal.flatMap; | ||
/** | ||
@@ -719,4 +653,3 @@ * Creates a sink from a `Channel`. | ||
*/ | ||
exports.flatMap = flatMap; | ||
const fromChannel = internal.fromChannel; | ||
const fromChannel = exports.fromChannel = internal.fromChannel; | ||
/** | ||
@@ -728,4 +661,3 @@ * Creates a `Channel` from a Sink. | ||
*/ | ||
exports.fromChannel = fromChannel; | ||
const toChannel = internal.toChannel; | ||
const toChannel = exports.toChannel = internal.toChannel; | ||
/** | ||
@@ -737,4 +669,3 @@ * Creates a single-value sink produced from an effect. | ||
*/ | ||
exports.toChannel = toChannel; | ||
const fromEffect = internal.fromEffect; | ||
const fromEffect = exports.fromEffect = internal.fromEffect; | ||
/** | ||
@@ -747,4 +678,3 @@ * Create a sink which publishes each element to the specified hub. | ||
*/ | ||
exports.fromEffect = fromEffect; | ||
const fromHub = internal.fromHub; | ||
const fromHub = exports.fromHub = internal.fromHub; | ||
/** | ||
@@ -756,4 +686,3 @@ * Creates a sink from a chunk processing function. | ||
*/ | ||
exports.fromHub = fromHub; | ||
const fromPush = internal.fromPush; | ||
const fromPush = exports.fromPush = internal.fromPush; | ||
/** | ||
@@ -766,4 +695,3 @@ * Create a sink which enqueues each element into the specified queue. | ||
*/ | ||
exports.fromPush = fromPush; | ||
const fromQueue = internal.fromQueue; | ||
const fromQueue = exports.fromQueue = internal.fromQueue; | ||
/** | ||
@@ -775,4 +703,3 @@ * Creates a sink containing the first value. | ||
*/ | ||
exports.fromQueue = fromQueue; | ||
const head = internal.head; | ||
const head = exports.head = internal.head; | ||
/** | ||
@@ -784,4 +711,3 @@ * Drains the remaining elements from the stream after the sink finishes | ||
*/ | ||
exports.head = head; | ||
const ignoreLeftover = internal.ignoreLeftover; | ||
const ignoreLeftover = exports.ignoreLeftover = internal.ignoreLeftover; | ||
/** | ||
@@ -793,4 +719,3 @@ * Creates a sink containing the last value. | ||
*/ | ||
exports.ignoreLeftover = ignoreLeftover; | ||
const last = internal.last; | ||
const last = exports.last = internal.last; | ||
/** | ||
@@ -803,4 +728,3 @@ * Creates a sink that does not consume any input but provides the given chunk | ||
*/ | ||
exports.last = last; | ||
const leftover = internal.leftover; | ||
const leftover = exports.leftover = internal.leftover; | ||
/** | ||
@@ -812,4 +736,3 @@ * Transforms this sink's result. | ||
*/ | ||
exports.leftover = leftover; | ||
const map = internal.map; | ||
const map = exports.map = internal.map; | ||
/** | ||
@@ -821,4 +744,3 @@ * Effectfully transforms this sink's result. | ||
*/ | ||
exports.map = map; | ||
const mapEffect = internal.mapEffect; | ||
const mapEffect = exports.mapEffect = internal.mapEffect; | ||
/** | ||
@@ -830,4 +752,3 @@ * Transforms the errors emitted by this sink using `f`. | ||
*/ | ||
exports.mapEffect = mapEffect; | ||
const mapError = internal.mapError; | ||
const mapError = exports.mapError = internal.mapError; | ||
/** | ||
@@ -839,4 +760,3 @@ * Transforms the leftovers emitted by this sink using `f`. | ||
*/ | ||
exports.mapError = mapError; | ||
const mapLeftover = internal.mapLeftover; | ||
const mapLeftover = exports.mapLeftover = internal.mapLeftover; | ||
/** | ||
@@ -848,4 +768,3 @@ * Creates a sink which transforms it's inputs into a string. | ||
*/ | ||
exports.mapLeftover = mapLeftover; | ||
const mkString = internal.mkString; | ||
const mkString = exports.mkString = internal.mkString; | ||
/** | ||
@@ -857,4 +776,3 @@ * Creates a sink which never terminates. | ||
*/ | ||
exports.mkString = mkString; | ||
const never = internal.never; | ||
const never = exports.never = internal.never; | ||
/** | ||
@@ -866,4 +784,3 @@ * Switch to another sink in case of failure | ||
*/ | ||
exports.never = never; | ||
const orElse = internal.orElse; | ||
const orElse = exports.orElse = internal.orElse; | ||
/** | ||
@@ -876,4 +793,3 @@ * Provides the sink with its required context, which eliminates its | ||
*/ | ||
exports.orElse = orElse; | ||
const provideContext = internal.provideContext; | ||
const provideContext = exports.provideContext = internal.provideContext; | ||
/** | ||
@@ -886,4 +802,3 @@ * Runs both sinks in parallel on the input, , returning the result or the | ||
*/ | ||
exports.provideContext = provideContext; | ||
const race = internal.race; | ||
const race = exports.race = internal.race; | ||
/** | ||
@@ -896,4 +811,3 @@ * Runs both sinks in parallel on the input, returning the result or the error | ||
*/ | ||
exports.race = race; | ||
const raceBoth = internal.raceBoth; | ||
const raceBoth = exports.raceBoth = internal.raceBoth; | ||
/** | ||
@@ -906,4 +820,3 @@ * Runs both sinks in parallel on the input, using the specified merge | ||
*/ | ||
exports.raceBoth = raceBoth; | ||
const raceWith = internal.raceWith; | ||
const raceWith = exports.raceWith = internal.raceWith; | ||
/** | ||
@@ -913,4 +826,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.raceWith = raceWith; | ||
const refineOrDie = internal.refineOrDie; | ||
const refineOrDie = exports.refineOrDie = internal.refineOrDie; | ||
/** | ||
@@ -920,4 +832,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.refineOrDie = refineOrDie; | ||
const refineOrDieWith = internal.refineOrDieWith; | ||
const refineOrDieWith = exports.refineOrDieWith = internal.refineOrDieWith; | ||
/** | ||
@@ -929,4 +840,3 @@ * A sink that returns whether an element satisfies the specified predicate. | ||
*/ | ||
exports.refineOrDieWith = refineOrDieWith; | ||
const some = internal.some; | ||
const some = exports.some = internal.some; | ||
/** | ||
@@ -940,4 +850,3 @@ * Splits the sink on the specified predicate, returning a new sink that | ||
*/ | ||
exports.some = some; | ||
const splitWhere = internal.splitWhere; | ||
const splitWhere = exports.splitWhere = internal.splitWhere; | ||
/** | ||
@@ -949,4 +858,3 @@ * A sink that immediately ends with the specified value. | ||
*/ | ||
exports.splitWhere = splitWhere; | ||
const succeed = internal.succeed; | ||
const succeed = exports.succeed = internal.succeed; | ||
/** | ||
@@ -958,4 +866,3 @@ * A sink that sums incoming numeric values. | ||
*/ | ||
exports.succeed = succeed; | ||
const sum = internal.sum; | ||
const sum = exports.sum = internal.sum; | ||
/** | ||
@@ -968,4 +875,3 @@ * Summarize a sink by running an effect when the sink starts and again when | ||
*/ | ||
exports.sum = sum; | ||
const summarized = internal.summarized; | ||
const summarized = exports.summarized = internal.summarized; | ||
/** | ||
@@ -978,4 +884,3 @@ * Returns a lazily constructed sink that may require effects for its | ||
*/ | ||
exports.summarized = summarized; | ||
const suspend = internal.suspend; | ||
const suspend = exports.suspend = internal.suspend; | ||
/** | ||
@@ -987,4 +892,3 @@ * A sink that immediately ends with the specified lazy value. | ||
*/ | ||
exports.suspend = suspend; | ||
const sync = internal.sync; | ||
const sync = exports.sync = internal.sync; | ||
/** | ||
@@ -996,4 +900,3 @@ * A sink that takes the specified number of values. | ||
*/ | ||
exports.sync = sync; | ||
const take = internal.take; | ||
const take = exports.take = internal.take; | ||
/** | ||
@@ -1003,4 +906,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.take = take; | ||
const timed = internal.timed; | ||
const timed = exports.timed = internal.timed; | ||
/** | ||
@@ -1012,4 +914,3 @@ * Creates a sink produced from an effect. | ||
*/ | ||
exports.timed = timed; | ||
const unwrap = internal.unwrap; | ||
const unwrap = exports.unwrap = internal.unwrap; | ||
/** | ||
@@ -1021,4 +922,3 @@ * Creates a sink produced from a scoped effect. | ||
*/ | ||
exports.unwrap = unwrap; | ||
const unwrapScoped = internal.unwrapScoped; | ||
const unwrapScoped = exports.unwrapScoped = internal.unwrapScoped; | ||
/** | ||
@@ -1030,4 +930,3 @@ * Returns the sink that executes this one and times its execution. | ||
*/ | ||
exports.unwrapScoped = unwrapScoped; | ||
const withDuration = internal.withDuration; | ||
const withDuration = exports.withDuration = internal.withDuration; | ||
/** | ||
@@ -1041,4 +940,3 @@ * Feeds inputs to this sink until it yields a result, then switches over to | ||
*/ | ||
exports.withDuration = withDuration; | ||
const zip = internal.zip; | ||
const zip = exports.zip = internal.zip; | ||
/** | ||
@@ -1050,4 +948,3 @@ * Like `Sink.zip` but keeps only the result from this sink. | ||
*/ | ||
exports.zip = zip; | ||
const zipLeft = internal.zipLeft; | ||
const zipLeft = exports.zipLeft = internal.zipLeft; | ||
/** | ||
@@ -1059,4 +956,3 @@ * Like `Sink.zip` but keeps only the result from `that` sink. | ||
*/ | ||
exports.zipLeft = zipLeft; | ||
const zipRight = internal.zipRight; | ||
const zipRight = exports.zipRight = internal.zipRight; | ||
/** | ||
@@ -1070,5 +966,3 @@ * Feeds inputs to this sink until it yields a result, then switches over to | ||
*/ | ||
exports.zipRight = zipRight; | ||
const zipWith = internal.zipWith; | ||
exports.zipWith = zipWith; | ||
const zipWith = exports.zipWith = internal.zipWith; | ||
//# sourceMappingURL=Sink.js.map |
@@ -62,20 +62,4 @@ /** | ||
<K, E, V, R2, E2, A>( | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A> | ||
): <R>(self: GroupBy<R, E, K, V>) => Stream.Stream<R2 | R, E | E2, A> | ||
<R, K, E, V, R2, E2, A>( | ||
self: GroupBy<R, E, K, V>, | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A> | ||
): Stream.Stream<R | R2, E | E2, A> | ||
} = internal.evaluate | ||
/** | ||
* Like `evaluate`, but with a configurable `bufferSize` parameter. | ||
* | ||
* @since 1.0.0 | ||
* @category destructors | ||
*/ | ||
export const evaluateBuffer: { | ||
<K, E, V, R2, E2, A>( | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, | ||
bufferSize: number | ||
options?: { readonly bufferSize?: number } | ||
): <R>(self: GroupBy<R, E, K, V>) => Stream.Stream<R2 | R, E | E2, A> | ||
@@ -85,5 +69,5 @@ <R, K, E, V, R2, E2, A>( | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, | ||
bufferSize: number | ||
options?: { readonly bufferSize?: number } | ||
): Stream.Stream<R | R2, E | E2, A> | ||
} = internal.evaluateBuffer | ||
} = internal.evaluate | ||
@@ -90,0 +74,0 @@ /** |
@@ -253,3 +253,3 @@ import type * as Context from "@effect/data/Context" | ||
this._currentChannel.effect(), | ||
Effect.provideContext(this._providedEnv) | ||
Effect.provide(this._providedEnv) | ||
) | ||
@@ -570,3 +570,3 @@ | ||
} | ||
return pipe(effect, Effect.provideContext(this._providedEnv)) | ||
return pipe(effect, Effect.provide(this._providedEnv)) | ||
} | ||
@@ -573,0 +573,0 @@ |
@@ -41,21 +41,4 @@ import * as Chunk from "@effect/data/Chunk" | ||
<K, E, V, R2, E2, A>( | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A> | ||
) => <R>(self: GroupBy.GroupBy<R, E, K, V>) => Stream.Stream<R2 | R, E | E2, A>, | ||
<R, K, E, V, R2, E2, A>( | ||
self: GroupBy.GroupBy<R, E, K, V>, | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A> | ||
) => Stream.Stream<R2 | R, E | E2, A> | ||
>( | ||
2, | ||
<R, K, E, V, R2, E2, A>( | ||
self: GroupBy.GroupBy<R, E, K, V>, | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A> | ||
): Stream.Stream<R | R2, E | E2, A> => evaluateBuffer(self, f, 16) | ||
) | ||
/** @internal */ | ||
export const evaluateBuffer = dual< | ||
<K, E, V, R2, E2, A>( | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, | ||
bufferSize: number | ||
options?: { readonly bufferSize?: number } | ||
) => <R>(self: GroupBy.GroupBy<R, E, K, V>) => Stream.Stream<R2 | R, E | E2, A>, | ||
@@ -65,3 +48,3 @@ <R, K, E, V, R2, E2, A>( | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, | ||
bufferSize: number | ||
options?: { readonly bufferSize?: number } | ||
) => Stream.Stream<R2 | R, E | E2, A> | ||
@@ -73,3 +56,3 @@ >( | ||
f: (key: K, stream: Stream.Stream<never, E, V>) => Stream.Stream<R2, E2, A>, | ||
bufferSize: number | ||
options?: { readonly bufferSize?: number } | ||
): Stream.Stream<R | R2, E | E2, A> => | ||
@@ -79,3 +62,3 @@ stream.flatMap( | ||
([key, queue]) => f(key, stream.flattenTake(stream.fromQueue(queue, { shutdown: true }))), | ||
{ concurrency: "unbounded", bufferSize } | ||
{ concurrency: "unbounded", bufferSize: options?.bufferSize ?? 16 } | ||
) | ||
@@ -82,0 +65,0 @@ ) |
@@ -130,3 +130,3 @@ import * as Chunk from "@effect/data/Chunk" | ||
): Z | Z2 | Z3 => | ||
Exit.match<Option.Option<E>, Chunk.Chunk<A>, Z | Z2 | Z3>(self.exit, { | ||
Exit.match(self.exit, { | ||
onFailure: (cause) => | ||
@@ -133,0 +133,0 @@ Option.match(Cause.flipCauseOption(cause), { |
@@ -269,3 +269,3 @@ /** | ||
*/ | ||
export const contramap = internal.contramap | ||
export const mapInput = internal.mapInput | ||
@@ -278,3 +278,3 @@ /** | ||
*/ | ||
export const contramapEffect = internal.contramapEffect | ||
export const mapInputEffect = internal.mapInputEffect | ||
@@ -287,3 +287,3 @@ /** | ||
*/ | ||
export const contramapChunks: { | ||
export const mapInputChunks: { | ||
<In0, In>( | ||
@@ -296,3 +296,3 @@ f: (chunk: Chunk.Chunk<In0>) => Chunk.Chunk<In> | ||
): Sink<R, E, In0, L, Z> | ||
} = internal.contramapChunks | ||
} = internal.mapInputChunks | ||
@@ -306,3 +306,3 @@ /** | ||
*/ | ||
export const contramapChunksEffect: { | ||
export const mapInputChunksEffect: { | ||
<In0, R2, E2, In>( | ||
@@ -315,3 +315,3 @@ f: (chunk: Chunk.Chunk<In0>) => Effect.Effect<R2, E2, Chunk.Chunk<In>> | ||
): Sink<R | R2, E | E2, In0, L, Z> | ||
} = internal.contramapChunksEffect | ||
} = internal.mapInputChunksEffect | ||
@@ -318,0 +318,0 @@ /** |
@@ -18,3 +18,3 @@ "use strict"; | ||
*/ | ||
const Left = internal.Left; | ||
const Left = exports.Left = internal.Left; | ||
/** | ||
@@ -24,4 +24,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Left = Left; | ||
const Right = internal.Right; | ||
const Right = exports.Right = internal.Right; | ||
/** | ||
@@ -31,4 +30,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Right = Right; | ||
const Both = internal.Both; | ||
const Both = exports.Both = internal.Both; | ||
/** | ||
@@ -38,4 +36,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Both = Both; | ||
const Either = internal.Either; | ||
const Either = exports.Either = internal.Either; | ||
/** | ||
@@ -45,4 +42,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.Either = Either; | ||
const fromInput = internal.fromInput; | ||
const fromInput = exports.fromInput = internal.fromInput; | ||
/** | ||
@@ -52,4 +48,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.fromInput = fromInput; | ||
const isLeft = internal.isLeft; | ||
const isLeft = exports.isLeft = internal.isLeft; | ||
/** | ||
@@ -59,4 +54,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.isLeft = isLeft; | ||
const isRight = internal.isRight; | ||
const isRight = exports.isRight = internal.isRight; | ||
/** | ||
@@ -66,4 +60,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.isRight = isRight; | ||
const isBoth = internal.isBoth; | ||
const isBoth = exports.isBoth = internal.isBoth; | ||
/** | ||
@@ -73,4 +66,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.isBoth = isBoth; | ||
const isEither = internal.isEither; | ||
const isEither = exports.isEither = internal.isEither; | ||
/** | ||
@@ -80,5 +72,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.isEither = isEither; | ||
const match = internal.match; | ||
exports.match = match; | ||
const match = exports.match = internal.match; | ||
//# sourceMappingURL=HaltStrategy.js.map |
@@ -16,3 +16,3 @@ "use strict"; | ||
*/ | ||
const SubscriptionRefTypeId = internal.SubscriptionRefTypeId; | ||
const SubscriptionRefTypeId = exports.SubscriptionRefTypeId = internal.SubscriptionRefTypeId; | ||
/** | ||
@@ -22,4 +22,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.SubscriptionRefTypeId = SubscriptionRefTypeId; | ||
const get = internal.get; | ||
const get = exports.get = internal.get; | ||
/** | ||
@@ -29,4 +28,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.get = get; | ||
const getAndSet = Ref.getAndSet; | ||
const getAndSet = exports.getAndSet = Ref.getAndSet; | ||
/** | ||
@@ -36,4 +34,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.getAndSet = getAndSet; | ||
const getAndUpdate = Ref.getAndUpdate; | ||
const getAndUpdate = exports.getAndUpdate = Ref.getAndUpdate; | ||
/** | ||
@@ -43,4 +40,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.getAndUpdate = getAndUpdate; | ||
const getAndUpdateEffect = Synchronized.getAndUpdateEffect; | ||
const getAndUpdateEffect = exports.getAndUpdateEffect = Synchronized.getAndUpdateEffect; | ||
/** | ||
@@ -50,4 +46,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.getAndUpdateEffect = getAndUpdateEffect; | ||
const getAndUpdateSome = Ref.getAndUpdateSome; | ||
const getAndUpdateSome = exports.getAndUpdateSome = Ref.getAndUpdateSome; | ||
/** | ||
@@ -57,4 +52,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.getAndUpdateSome = getAndUpdateSome; | ||
const getAndUpdateSomeEffect = Synchronized.getAndUpdateSomeEffect; | ||
const getAndUpdateSomeEffect = exports.getAndUpdateSomeEffect = Synchronized.getAndUpdateSomeEffect; | ||
/** | ||
@@ -66,4 +60,3 @@ * Creates a new `SubscriptionRef` with the specified value. | ||
*/ | ||
exports.getAndUpdateSomeEffect = getAndUpdateSomeEffect; | ||
const make = internal.make; | ||
const make = exports.make = internal.make; | ||
/** | ||
@@ -73,4 +66,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.make = make; | ||
const modify = internal.modify; | ||
const modify = exports.modify = internal.modify; | ||
/** | ||
@@ -80,4 +72,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.modify = modify; | ||
const modifyEffect = internal.modifyEffect; | ||
const modifyEffect = exports.modifyEffect = internal.modifyEffect; | ||
/** | ||
@@ -87,4 +78,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.modifyEffect = modifyEffect; | ||
const modifySome = Ref.modifySome; | ||
const modifySome = exports.modifySome = Ref.modifySome; | ||
/** | ||
@@ -94,4 +84,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.modifySome = modifySome; | ||
const modifySomeEffect = Synchronized.modifySomeEffect; | ||
const modifySomeEffect = exports.modifySomeEffect = Synchronized.modifySomeEffect; | ||
/** | ||
@@ -101,4 +90,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.modifySomeEffect = modifySomeEffect; | ||
const set = internal.set; | ||
const set = exports.set = internal.set; | ||
/** | ||
@@ -108,4 +96,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.set = set; | ||
const setAndGet = Ref.setAndGet; | ||
const setAndGet = exports.setAndGet = Ref.setAndGet; | ||
/** | ||
@@ -115,4 +102,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.setAndGet = setAndGet; | ||
const update = Ref.update; | ||
const update = exports.update = Ref.update; | ||
/** | ||
@@ -122,4 +108,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.update = update; | ||
const updateEffect = Synchronized.updateEffect; | ||
const updateEffect = exports.updateEffect = Synchronized.updateEffect; | ||
/** | ||
@@ -129,4 +114,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.updateEffect = updateEffect; | ||
const updateAndGet = Ref.updateAndGet; | ||
const updateAndGet = exports.updateAndGet = Ref.updateAndGet; | ||
/** | ||
@@ -136,4 +120,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.updateAndGet = updateAndGet; | ||
const updateAndGetEffect = Synchronized.updateAndGetEffect; | ||
const updateAndGetEffect = exports.updateAndGetEffect = Synchronized.updateAndGetEffect; | ||
/** | ||
@@ -143,4 +126,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.updateAndGetEffect = updateAndGetEffect; | ||
const updateSome = Ref.updateSome; | ||
const updateSome = exports.updateSome = Ref.updateSome; | ||
/** | ||
@@ -150,4 +132,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.updateSome = updateSome; | ||
const updateSomeEffect = Synchronized.updateSomeEffect; | ||
const updateSomeEffect = exports.updateSomeEffect = Synchronized.updateSomeEffect; | ||
/** | ||
@@ -157,4 +138,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.updateSomeEffect = updateSomeEffect; | ||
const updateSomeAndGet = Ref.updateSomeAndGet; | ||
const updateSomeAndGet = exports.updateSomeAndGet = Ref.updateSomeAndGet; | ||
/** | ||
@@ -164,5 +144,3 @@ * @since 1.0.0 | ||
*/ | ||
exports.updateSomeAndGet = updateSomeAndGet; | ||
const updateSomeAndGetEffect = Synchronized.updateSomeAndGetEffect; | ||
exports.updateSomeAndGetEffect = updateSomeAndGetEffect; | ||
const updateSomeAndGetEffect = exports.updateSomeAndGetEffect = Synchronized.updateSomeAndGetEffect; | ||
//# sourceMappingURL=SubscriptionRef.js.map |
60
Take.js
@@ -14,3 +14,3 @@ "use strict"; | ||
*/ | ||
const TakeTypeId = internal.TakeTypeId; | ||
const TakeTypeId = exports.TakeTypeId = internal.TakeTypeId; | ||
/** | ||
@@ -22,4 +22,3 @@ * Creates a `Take` with the specified chunk. | ||
*/ | ||
exports.TakeTypeId = TakeTypeId; | ||
const chunk = internal.chunk; | ||
const chunk = exports.chunk = internal.chunk; | ||
/** | ||
@@ -31,4 +30,3 @@ * Creates a failing `Take` with the specified defect. | ||
*/ | ||
exports.chunk = chunk; | ||
const die = internal.die; | ||
const die = exports.die = internal.die; | ||
/** | ||
@@ -40,4 +38,3 @@ * Creates a failing `Take` with the specified error message. | ||
*/ | ||
exports.die = die; | ||
const dieMessage = internal.dieMessage; | ||
const dieMessage = exports.dieMessage = internal.dieMessage; | ||
/** | ||
@@ -49,4 +46,3 @@ * Transforms a `Take<E, A>` to an `Effect<never, E, A>`. | ||
*/ | ||
exports.dieMessage = dieMessage; | ||
const done = internal.done; | ||
const done = exports.done = internal.done; | ||
/** | ||
@@ -58,4 +54,3 @@ * Represents the end-of-stream marker. | ||
*/ | ||
exports.done = done; | ||
const end = internal.end; | ||
const end = exports.end = internal.end; | ||
/** | ||
@@ -67,4 +62,3 @@ * Creates a failing `Take` with the specified error. | ||
*/ | ||
exports.end = end; | ||
const fail = internal.fail; | ||
const fail = exports.fail = internal.fail; | ||
/** | ||
@@ -76,4 +70,3 @@ * Creates a failing `Take` with the specified cause. | ||
*/ | ||
exports.fail = fail; | ||
const failCause = internal.failCause; | ||
const failCause = exports.failCause = internal.failCause; | ||
/** | ||
@@ -87,4 +80,3 @@ * Creates an effect from `Effect<R, E, A>` that does not fail, but succeeds with | ||
*/ | ||
exports.failCause = failCause; | ||
const fromEffect = internal.fromEffect; | ||
const fromEffect = exports.fromEffect = internal.fromEffect; | ||
/** | ||
@@ -96,4 +88,3 @@ * Creates a `Take` from an `Exit`. | ||
*/ | ||
exports.fromEffect = fromEffect; | ||
const fromExit = internal.fromExit; | ||
const fromExit = exports.fromExit = internal.fromExit; | ||
/** | ||
@@ -107,4 +98,3 @@ * Creates effect from `Effect<R, Option<E>, Chunk<A>>` that does not fail, but | ||
*/ | ||
exports.fromExit = fromExit; | ||
const fromPull = internal.fromPull; | ||
const fromPull = exports.fromPull = internal.fromPull; | ||
/** | ||
@@ -116,4 +106,3 @@ * Checks if this `take` is done (`Take.end`). | ||
*/ | ||
exports.fromPull = fromPull; | ||
const isDone = internal.isDone; | ||
const isDone = exports.isDone = internal.isDone; | ||
/** | ||
@@ -125,4 +114,3 @@ * Checks if this `take` is a failure. | ||
*/ | ||
exports.isDone = isDone; | ||
const isFailure = internal.isFailure; | ||
const isFailure = exports.isFailure = internal.isFailure; | ||
/** | ||
@@ -134,4 +122,3 @@ * Checks if this `take` is a success. | ||
*/ | ||
exports.isFailure = isFailure; | ||
const isSuccess = internal.isSuccess; | ||
const isSuccess = exports.isSuccess = internal.isSuccess; | ||
/** | ||
@@ -143,4 +130,3 @@ * Constructs a `Take`. | ||
*/ | ||
exports.isSuccess = isSuccess; | ||
const make = internal.make; | ||
const make = exports.make = internal.make; | ||
/** | ||
@@ -152,4 +138,3 @@ * Transforms `Take<E, A>` to `Take<E, B>` by applying function `f`. | ||
*/ | ||
exports.make = make; | ||
const map = internal.map; | ||
const map = exports.map = internal.map; | ||
/** | ||
@@ -162,4 +147,3 @@ * Folds over the failure cause, success value and end-of-stream marker to | ||
*/ | ||
exports.map = map; | ||
const match = internal.match; | ||
const match = exports.match = internal.match; | ||
/** | ||
@@ -174,4 +158,3 @@ * Effectful version of `Take.fold`. | ||
*/ | ||
exports.match = match; | ||
const matchEffect = internal.matchEffect; | ||
const matchEffect = exports.matchEffect = internal.matchEffect; | ||
/** | ||
@@ -183,4 +166,3 @@ * Creates a `Take` with a single value chunk. | ||
*/ | ||
exports.matchEffect = matchEffect; | ||
const of = internal.of; | ||
const of = exports.of = internal.of; | ||
/** | ||
@@ -192,5 +174,3 @@ * Returns an effect that effectfully "peeks" at the success of this take. | ||
*/ | ||
exports.of = of; | ||
const tap = internal.tap; | ||
exports.tap = tap; | ||
const tap = exports.tap = internal.tap; | ||
//# sourceMappingURL=Take.js.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3418799
57105