@effect/platform-node-shared
Advanced tools
Comparing version 0.13.2 to 0.13.3
@@ -51,3 +51,2 @@ "use strict"; | ||
}), stream => Effect.sync(() => { | ||
stream.removeAllListeners(); | ||
if ("closed" in stream && !stream.closed) { | ||
@@ -79,3 +78,2 @@ stream.destroy(); | ||
}), stream => Effect.sync(() => { | ||
stream.removeAllListeners(); | ||
if ("closed" in stream && !stream.closed) { | ||
@@ -89,3 +87,2 @@ stream.destroy(); | ||
const fromDuplex = (evaluate, onError, options = {}) => Channel.acquireUseRelease(Effect.tap(Effect.zip(Effect.sync(evaluate), Queue.unbounded()), ([duplex, queue]) => readableOffer(duplex, queue, onError)), ([duplex, queue]) => Channel.embedInput(readableTake(duplex, queue, options.chunkSize ? Number(options.chunkSize) : undefined), writeInput(duplex, cause => Queue.offer(queue, Either.left(Exit.failCause(cause))), options)), ([duplex, queue]) => Effect.zipRight(Effect.sync(() => { | ||
duplex.removeAllListeners(); | ||
if (!duplex.closed) { | ||
@@ -108,3 +105,2 @@ duplex.destroy(); | ||
const fromReadableChannel = (evaluate, onError, chunkSize) => Channel.acquireUseRelease(Effect.tap(Effect.zip(Effect.sync(evaluate), Queue.unbounded()), ([readable, queue]) => readableOffer(readable, queue, onError)), ([readable, queue]) => readableTake(readable, queue, chunkSize), ([readable, queue]) => Effect.zipRight(Effect.sync(() => { | ||
readable.removeAllListeners(); | ||
if ("closed" in readable && !readable.closed) { | ||
@@ -111,0 +107,0 @@ readable.destroy(); |
@@ -42,3 +42,2 @@ import { SystemError } from "@effect/platform/Error"; | ||
}), stream => Effect.sync(() => { | ||
stream.removeAllListeners(); | ||
if ("closed" in stream && !stream.closed) { | ||
@@ -69,3 +68,2 @@ stream.destroy(); | ||
}), stream => Effect.sync(() => { | ||
stream.removeAllListeners(); | ||
if ("closed" in stream && !stream.closed) { | ||
@@ -78,3 +76,2 @@ stream.destroy(); | ||
export const fromDuplex = (evaluate, onError, options = {}) => Channel.acquireUseRelease(Effect.tap(Effect.zip(Effect.sync(evaluate), Queue.unbounded()), ([duplex, queue]) => readableOffer(duplex, queue, onError)), ([duplex, queue]) => Channel.embedInput(readableTake(duplex, queue, options.chunkSize ? Number(options.chunkSize) : undefined), writeInput(duplex, cause => Queue.offer(queue, Either.left(Exit.failCause(cause))), options)), ([duplex, queue]) => Effect.zipRight(Effect.sync(() => { | ||
duplex.removeAllListeners(); | ||
if (!duplex.closed) { | ||
@@ -96,3 +93,2 @@ duplex.destroy(); | ||
export const fromReadableChannel = (evaluate, onError, chunkSize) => Channel.acquireUseRelease(Effect.tap(Effect.zip(Effect.sync(evaluate), Queue.unbounded()), ([readable, queue]) => readableOffer(readable, queue, onError)), ([readable, queue]) => readableTake(readable, queue, chunkSize), ([readable, queue]) => Effect.zipRight(Effect.sync(() => { | ||
readable.removeAllListeners(); | ||
if ("closed" in readable && !readable.closed) { | ||
@@ -99,0 +95,0 @@ readable.destroy(); |
{ | ||
"name": "@effect/platform-node-shared", | ||
"version": "0.13.2", | ||
"version": "0.13.3", | ||
"description": "Unified interfaces for common platform-specific services", | ||
@@ -17,3 +17,3 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@effect/platform": "^0.63.2", | ||
"@effect/platform": "^0.63.3", | ||
"effect": "^3.7.2" | ||
@@ -20,0 +20,0 @@ }, |
@@ -66,3 +66,2 @@ import { type PlatformError, SystemError } from "@effect/platform/Error" | ||
Effect.sync(() => { | ||
stream.removeAllListeners() | ||
if ("closed" in stream && !stream.closed) { | ||
@@ -106,3 +105,2 @@ stream.destroy() | ||
Effect.sync(() => { | ||
stream.removeAllListeners() | ||
if ("closed" in stream && !stream.closed) { | ||
@@ -141,3 +139,2 @@ stream.destroy() | ||
Effect.sync(() => { | ||
duplex.removeAllListeners() | ||
if (!duplex.closed) { | ||
@@ -216,3 +213,2 @@ duplex.destroy() | ||
Effect.sync(() => { | ||
readable.removeAllListeners() | ||
if ("closed" in readable && !readable.closed) { | ||
@@ -219,0 +215,0 @@ readable.destroy() |
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
389224
5522