@effect/platform-node
Advanced tools
Comparing version 0.22.1 to 0.23.0
@@ -16,6 +16,7 @@ 'use strict'; | ||
var error = require('../../dist/error-e477c10b.cjs.dev.js'); | ||
var sink = require('../../dist/sink-a2069d86.cjs.dev.js'); | ||
var stream = require('../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
var sink = require('../../dist/sink-3a150604.cjs.dev.js'); | ||
var stream = require('../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('@effect/platform/Error'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Chunk'); | ||
@@ -22,0 +23,0 @@ require('effect/Either'); |
@@ -16,6 +16,7 @@ 'use strict'; | ||
var error = require('../../dist/error-4f074a3a.cjs.prod.js'); | ||
var sink = require('../../dist/sink-5526bd6c.cjs.prod.js'); | ||
var stream = require('../../dist/stream-c01737c4.cjs.prod.js'); | ||
var sink = require('../../dist/sink-570c8582.cjs.prod.js'); | ||
var stream = require('../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('@effect/platform/Error'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Chunk'); | ||
@@ -22,0 +23,0 @@ require('effect/Either'); |
@@ -13,6 +13,7 @@ import * as Command from '@effect/platform/Command'; | ||
import { h as handleErrnoException } from '../../dist/error-4865cb95.esm.js'; | ||
import { f as fromWritable } from '../../dist/sink-f7795af1.esm.js'; | ||
import { f as fromReadable } from '../../dist/stream-36ca9d0a.esm.js'; | ||
import { f as fromWritable } from '../../dist/sink-5dfcc09e.esm.js'; | ||
import { f as fromReadable } from '../../dist/stream-faaffb40.esm.js'; | ||
import '@effect/platform/Error'; | ||
import 'effect/Channel'; | ||
import 'effect/Deferred'; | ||
import 'effect/Chunk'; | ||
@@ -19,0 +20,0 @@ import 'effect/Either'; |
@@ -5,2 +5,3 @@ /** | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import type { LazyArg } from "effect/Function"; | ||
@@ -14,3 +15,3 @@ import type { Sink } from "effect/Sink"; | ||
*/ | ||
export declare const fromWritable: <E, A>(evaluate: LazyArg<Writable>, onError: (error: unknown) => E, options?: FromWritableOptions) => Sink<never, E, A, never, void>; | ||
export declare const fromWritable: <E, A = string | Uint8Array>(evaluate: LazyArg<Writable | NodeJS.WritableStream>, onError: (error: unknown) => E, options?: FromWritableOptions) => Sink<never, E, A, never, void>; | ||
//# sourceMappingURL=Sink.d.ts.map |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
/** | ||
@@ -34,3 +35,3 @@ * @since 1.0.0 | ||
*/ | ||
export declare const fromReadable: <E, A = Uint8Array>(evaluate: LazyArg<Readable>, onError: (error: unknown) => E, { chunkSize }?: FromReadableOptions) => Stream<never, E, A>; | ||
export declare const fromReadable: <E, A = Uint8Array>(evaluate: LazyArg<Readable | NodeJS.ReadableStream>, onError: (error: unknown) => E, { chunkSize }?: FromReadableOptions) => Stream<never, E, A>; | ||
/** | ||
@@ -61,7 +62,6 @@ * @category constructors | ||
*/ | ||
export declare const toString: <E>(options: { | ||
readable: LazyArg<Readable>; | ||
onFailure: (error: unknown) => E; | ||
encoding?: BufferEncoding; | ||
maxBytes?: SizeInput; | ||
export declare const toString: <E>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options: { | ||
readonly onFailure: (error: unknown) => E; | ||
readonly encoding?: BufferEncoding | undefined; | ||
readonly maxBytes?: SizeInput | undefined; | ||
}) => Effect<never, E, string>; | ||
@@ -72,7 +72,6 @@ /** | ||
*/ | ||
export declare const toUint8Array: <E>(options: { | ||
readable: LazyArg<Readable>; | ||
onFailure: (error: unknown) => E; | ||
maxBytes?: SizeInput; | ||
export declare const toUint8Array: <E>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options: { | ||
readonly onFailure: (error: unknown) => E; | ||
readonly maxBytes?: SizeInput | undefined; | ||
}) => Effect<never, E, Uint8Array>; | ||
//# sourceMappingURL=Stream.d.ts.map |
@@ -5,5 +5,5 @@ 'use strict'; | ||
require('../../../dist/formData-00b767b9.cjs.dev.js'); | ||
require('../../../dist/formData-5d873a90.cjs.dev.js'); | ||
var FormData = require('@effect/platform/Http/FormData'); | ||
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('../../../dist/FormData-b905ea51.cjs.dev.js'); | ||
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('../../../dist/FormData-1b197f9f.cjs.dev.js'); | ||
require('@effect/platform/FileSystem'); | ||
@@ -21,3 +21,3 @@ require('@effect/platform/Path'); | ||
require('../../../Stream/dist/effect-platform-node-Stream.cjs.dev.js'); | ||
require('../../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
require('../../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('effect/Channel'); | ||
@@ -24,0 +24,0 @@ require('effect/Either'); |
@@ -5,5 +5,5 @@ 'use strict'; | ||
require('../../../dist/formData-59e5f494.cjs.prod.js'); | ||
require('../../../dist/formData-2d4168a3.cjs.prod.js'); | ||
var FormData = require('@effect/platform/Http/FormData'); | ||
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('../../../dist/FormData-33600671.cjs.prod.js'); | ||
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('../../../dist/FormData-b4b59ecb.cjs.prod.js'); | ||
require('@effect/platform/FileSystem'); | ||
@@ -21,3 +21,3 @@ require('@effect/platform/Path'); | ||
require('../../../Stream/dist/effect-platform-node-Stream.cjs.prod.js'); | ||
require('../../../dist/stream-c01737c4.cjs.prod.js'); | ||
require('../../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('effect/Channel'); | ||
@@ -24,0 +24,0 @@ require('effect/Either'); |
@@ -1,4 +0,4 @@ | ||
import '../../../dist/formData-3a02d09f.esm.js'; | ||
import '../../../dist/formData-b50a3c9f.esm.js'; | ||
export * from '@effect/platform/Http/FormData'; | ||
export { f as formData, s as stream } from '../../../dist/FormData-aba95773.esm.js'; | ||
export { f as formData, s as stream } from '../../../dist/FormData-9c8077af.esm.js'; | ||
import '@effect/platform/FileSystem'; | ||
@@ -16,3 +16,3 @@ import '@effect/platform/Path'; | ||
import '../../../Stream/dist/effect-platform-node-Stream.esm.js'; | ||
import '../../../dist/stream-36ca9d0a.esm.js'; | ||
import '../../../dist/stream-faaffb40.esm.js'; | ||
import 'effect/Channel'; | ||
@@ -19,0 +19,0 @@ import 'effect/Either'; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('../../../dist/NodeClient-86d70074.cjs.dev.js'); | ||
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('../../../dist/NodeClient-433f41ed.cjs.dev.js'); | ||
require('@effect/platform/Http/Client'); | ||
@@ -21,6 +21,7 @@ require('@effect/platform/Http/ClientError'); | ||
require('../../../Sink/dist/effect-platform-node-Sink.cjs.dev.js'); | ||
require('../../../dist/sink-a2069d86.cjs.dev.js'); | ||
require('../../../dist/sink-3a150604.cjs.dev.js'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Sink'); | ||
require('../../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
require('../../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('effect/Chunk'); | ||
@@ -31,3 +32,3 @@ require('effect/Either'); | ||
require('@effect/platform/Error'); | ||
require('../../../dist/incomingMessage-587c8285.cjs.dev.js'); | ||
require('../../../dist/incomingMessage-ac1817d4.cjs.dev.js'); | ||
require('@effect/platform/Http/Headers'); | ||
@@ -34,0 +35,0 @@ require('@effect/platform/Http/IncomingMessage'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('../../../dist/NodeClient-174ebaf2.cjs.prod.js'); | ||
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('../../../dist/NodeClient-8d8ff956.cjs.prod.js'); | ||
require('@effect/platform/Http/Client'); | ||
@@ -21,6 +21,7 @@ require('@effect/platform/Http/ClientError'); | ||
require('../../../Sink/dist/effect-platform-node-Sink.cjs.prod.js'); | ||
require('../../../dist/sink-5526bd6c.cjs.prod.js'); | ||
require('../../../dist/sink-570c8582.cjs.prod.js'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Sink'); | ||
require('../../../dist/stream-c01737c4.cjs.prod.js'); | ||
require('../../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('effect/Chunk'); | ||
@@ -31,3 +32,3 @@ require('effect/Either'); | ||
require('@effect/platform/Error'); | ||
require('../../../dist/incomingMessage-890fef7a.cjs.prod.js'); | ||
require('../../../dist/incomingMessage-4526b216.cjs.prod.js'); | ||
require('@effect/platform/Http/Headers'); | ||
@@ -34,0 +35,0 @@ require('@effect/platform/Http/IncomingMessage'); |
@@ -1,2 +0,2 @@ | ||
export { a as HttpAgent, H as HttpAgentTypeId, b as agentLayer, l as layer, e as layerWithoutAgent, d as make, m as makeAgent, c as makeAgentLayer } from '../../../dist/NodeClient-f1038dc6.esm.js'; | ||
export { a as HttpAgent, H as HttpAgentTypeId, b as agentLayer, l as layer, e as layerWithoutAgent, d as make, m as makeAgent, c as makeAgentLayer } from '../../../dist/NodeClient-1b5f7152.esm.js'; | ||
import '@effect/platform/Http/Client'; | ||
@@ -16,6 +16,7 @@ import '@effect/platform/Http/ClientError'; | ||
import '../../../Sink/dist/effect-platform-node-Sink.esm.js'; | ||
import '../../../dist/sink-f7795af1.esm.js'; | ||
import '../../../dist/sink-5dfcc09e.esm.js'; | ||
import 'effect/Channel'; | ||
import 'effect/Deferred'; | ||
import 'effect/Sink'; | ||
import '../../../dist/stream-36ca9d0a.esm.js'; | ||
import '../../../dist/stream-faaffb40.esm.js'; | ||
import 'effect/Chunk'; | ||
@@ -26,3 +27,3 @@ import 'effect/Either'; | ||
import '@effect/platform/Error'; | ||
import '../../../dist/incomingMessage-6970f455.esm.js'; | ||
import '../../../dist/incomingMessage-a56317f6.esm.js'; | ||
import '@effect/platform/Http/Headers'; | ||
@@ -29,0 +30,0 @@ import '@effect/platform/Http/IncomingMessage'; |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var Http_Server_dist_effectPlatformNodeHttpServer = require('../../../dist/Server-d00836e3.cjs.dev.js'); | ||
var Http_Server_dist_effectPlatformNodeHttpServer = require('../../../dist/Server-66eb964d.cjs.dev.js'); | ||
var Server = require('@effect/platform/Http/Server'); | ||
@@ -24,6 +24,7 @@ require('@effect/platform/FileSystem'); | ||
require('../../../Sink/dist/effect-platform-node-Sink.cjs.dev.js'); | ||
require('../../../dist/sink-a2069d86.cjs.dev.js'); | ||
require('../../../dist/sink-3a150604.cjs.dev.js'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Sink'); | ||
require('../../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
require('../../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('effect/Chunk'); | ||
@@ -35,3 +36,3 @@ require('effect/Either'); | ||
require('@effect/platform/Error'); | ||
require('../../../dist/formData-00b767b9.cjs.dev.js'); | ||
require('../../../dist/formData-5d873a90.cjs.dev.js'); | ||
require('@effect/platform/Http/FormData'); | ||
@@ -43,3 +44,3 @@ require('@effect/platform/Path'); | ||
require('../../../Stream/dist/effect-platform-node-Stream.cjs.dev.js'); | ||
require('../../../dist/incomingMessage-587c8285.cjs.dev.js'); | ||
require('../../../dist/incomingMessage-ac1817d4.cjs.dev.js'); | ||
require('@effect/platform/Http/Headers'); | ||
@@ -46,0 +47,0 @@ require('@effect/platform/Http/UrlParams'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var Http_Server_dist_effectPlatformNodeHttpServer = require('../../../dist/Server-015ebdb2.cjs.prod.js'); | ||
var Http_Server_dist_effectPlatformNodeHttpServer = require('../../../dist/Server-2dd836bc.cjs.prod.js'); | ||
var Server = require('@effect/platform/Http/Server'); | ||
@@ -24,6 +24,7 @@ require('@effect/platform/FileSystem'); | ||
require('../../../Sink/dist/effect-platform-node-Sink.cjs.prod.js'); | ||
require('../../../dist/sink-5526bd6c.cjs.prod.js'); | ||
require('../../../dist/sink-570c8582.cjs.prod.js'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Sink'); | ||
require('../../../dist/stream-c01737c4.cjs.prod.js'); | ||
require('../../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('effect/Chunk'); | ||
@@ -35,3 +36,3 @@ require('effect/Either'); | ||
require('@effect/platform/Error'); | ||
require('../../../dist/formData-59e5f494.cjs.prod.js'); | ||
require('../../../dist/formData-2d4168a3.cjs.prod.js'); | ||
require('@effect/platform/Http/FormData'); | ||
@@ -43,3 +44,3 @@ require('@effect/platform/Path'); | ||
require('../../../Stream/dist/effect-platform-node-Stream.cjs.prod.js'); | ||
require('../../../dist/incomingMessage-890fef7a.cjs.prod.js'); | ||
require('../../../dist/incomingMessage-4526b216.cjs.prod.js'); | ||
require('@effect/platform/Http/Headers'); | ||
@@ -46,0 +47,0 @@ require('@effect/platform/Http/UrlParams'); |
@@ -1,2 +0,2 @@ | ||
export { l as layer, a as layerConfig, m as make } from '../../../dist/Server-07db176b.esm.js'; | ||
export { l as layer, a as layerConfig, m as make } from '../../../dist/Server-913d7080.esm.js'; | ||
export * from '@effect/platform/Http/Server'; | ||
@@ -19,6 +19,7 @@ import '@effect/platform/FileSystem'; | ||
import '../../../Sink/dist/effect-platform-node-Sink.esm.js'; | ||
import '../../../dist/sink-f7795af1.esm.js'; | ||
import '../../../dist/sink-5dfcc09e.esm.js'; | ||
import 'effect/Channel'; | ||
import 'effect/Deferred'; | ||
import 'effect/Sink'; | ||
import '../../../dist/stream-36ca9d0a.esm.js'; | ||
import '../../../dist/stream-faaffb40.esm.js'; | ||
import 'effect/Chunk'; | ||
@@ -30,3 +31,3 @@ import 'effect/Either'; | ||
import '@effect/platform/Error'; | ||
import '../../../dist/formData-3a02d09f.esm.js'; | ||
import '../../../dist/formData-b50a3c9f.esm.js'; | ||
import '@effect/platform/Http/FormData'; | ||
@@ -38,3 +39,3 @@ import '@effect/platform/Path'; | ||
import '../../../Stream/dist/effect-platform-node-Stream.esm.js'; | ||
import '../../../dist/incomingMessage-6970f455.esm.js'; | ||
import '../../../dist/incomingMessage-a56317f6.esm.js'; | ||
import '@effect/platform/Http/Headers'; | ||
@@ -41,0 +42,0 @@ import '@effect/platform/Http/UrlParams'; |
@@ -12,3 +12,3 @@ 'use strict'; | ||
var UrlParams = require('@effect/platform/Http/UrlParams'); | ||
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('../../dist/NodeClient-86d70074.cjs.dev.js'); | ||
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('../../dist/NodeClient-433f41ed.cjs.dev.js'); | ||
require('effect/Context'); | ||
@@ -24,6 +24,7 @@ require('effect/Effect'); | ||
require('../../Sink/dist/effect-platform-node-Sink.cjs.dev.js'); | ||
require('../../dist/sink-a2069d86.cjs.dev.js'); | ||
require('../../dist/sink-3a150604.cjs.dev.js'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Sink'); | ||
require('../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
require('../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('effect/Chunk'); | ||
@@ -34,3 +35,3 @@ require('effect/Either'); | ||
require('@effect/platform/Error'); | ||
require('../../dist/incomingMessage-587c8285.cjs.dev.js'); | ||
require('../../dist/incomingMessage-ac1817d4.cjs.dev.js'); | ||
require('@effect/platform/Http/IncomingMessage'); | ||
@@ -37,0 +38,0 @@ require('effect/FiberRef'); |
@@ -12,3 +12,3 @@ 'use strict'; | ||
var UrlParams = require('@effect/platform/Http/UrlParams'); | ||
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('../../dist/NodeClient-174ebaf2.cjs.prod.js'); | ||
var Http_NodeClient_dist_effectPlatformNodeHttpNodeClient = require('../../dist/NodeClient-8d8ff956.cjs.prod.js'); | ||
require('effect/Context'); | ||
@@ -24,6 +24,7 @@ require('effect/Effect'); | ||
require('../../Sink/dist/effect-platform-node-Sink.cjs.prod.js'); | ||
require('../../dist/sink-5526bd6c.cjs.prod.js'); | ||
require('../../dist/sink-570c8582.cjs.prod.js'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Sink'); | ||
require('../../dist/stream-c01737c4.cjs.prod.js'); | ||
require('../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('effect/Chunk'); | ||
@@ -34,3 +35,3 @@ require('effect/Either'); | ||
require('@effect/platform/Error'); | ||
require('../../dist/incomingMessage-890fef7a.cjs.prod.js'); | ||
require('../../dist/incomingMessage-4526b216.cjs.prod.js'); | ||
require('@effect/platform/Http/IncomingMessage'); | ||
@@ -37,0 +38,0 @@ require('effect/FiberRef'); |
@@ -15,3 +15,3 @@ import * as Body from '@effect/platform/Http/Body'; | ||
export { UrlParams as urlParams }; | ||
export { N as nodeClient } from '../../dist/NodeClient-f1038dc6.esm.js'; | ||
export { N as nodeClient } from '../../dist/NodeClient-1b5f7152.esm.js'; | ||
import 'effect/Context'; | ||
@@ -27,6 +27,7 @@ import 'effect/Effect'; | ||
import '../../Sink/dist/effect-platform-node-Sink.esm.js'; | ||
import '../../dist/sink-f7795af1.esm.js'; | ||
import '../../dist/sink-5dfcc09e.esm.js'; | ||
import 'effect/Channel'; | ||
import 'effect/Deferred'; | ||
import 'effect/Sink'; | ||
import '../../dist/stream-36ca9d0a.esm.js'; | ||
import '../../dist/stream-faaffb40.esm.js'; | ||
import 'effect/Chunk'; | ||
@@ -37,3 +38,3 @@ import 'effect/Either'; | ||
import '@effect/platform/Error'; | ||
import '../../dist/incomingMessage-6970f455.esm.js'; | ||
import '../../dist/incomingMessage-a56317f6.esm.js'; | ||
import '@effect/platform/Http/IncomingMessage'; | ||
@@ -40,0 +41,0 @@ import 'effect/FiberRef'; |
@@ -15,8 +15,8 @@ 'use strict'; | ||
var Http_Etag_dist_effectPlatformNodeHttpEtag = require('../../dist/Etag-b38be81c.cjs.dev.js'); | ||
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('../../dist/FormData-b905ea51.cjs.dev.js'); | ||
var Http_Server_dist_effectPlatformNodeHttpServer = require('../../dist/Server-d00836e3.cjs.dev.js'); | ||
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('../../dist/FormData-1b197f9f.cjs.dev.js'); | ||
var Http_Server_dist_effectPlatformNodeHttpServer = require('../../dist/Server-66eb964d.cjs.dev.js'); | ||
require('@effect/platform/Http/Etag'); | ||
require('effect/Effect'); | ||
require('effect/Layer'); | ||
require('../../dist/formData-00b767b9.cjs.dev.js'); | ||
require('../../dist/formData-5d873a90.cjs.dev.js'); | ||
require('@effect/platform/FileSystem'); | ||
@@ -34,3 +34,3 @@ require('@effect/platform/Http/FormData'); | ||
require('../../Stream/dist/effect-platform-node-Stream.cjs.dev.js'); | ||
require('../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
require('../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('effect/Channel'); | ||
@@ -48,5 +48,6 @@ require('effect/Either'); | ||
require('../../Sink/dist/effect-platform-node-Sink.cjs.dev.js'); | ||
require('../../dist/sink-a2069d86.cjs.dev.js'); | ||
require('../../dist/sink-3a150604.cjs.dev.js'); | ||
require('effect/Deferred'); | ||
require('effect/Sink'); | ||
require('../../dist/incomingMessage-587c8285.cjs.dev.js'); | ||
require('../../dist/incomingMessage-ac1817d4.cjs.dev.js'); | ||
require('../../dist/platform-5b27475e.cjs.dev.js'); | ||
@@ -53,0 +54,0 @@ require('@effect/platform/Http/Platform'); |
@@ -15,8 +15,8 @@ 'use strict'; | ||
var Http_Etag_dist_effectPlatformNodeHttpEtag = require('../../dist/Etag-7a3db878.cjs.prod.js'); | ||
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('../../dist/FormData-33600671.cjs.prod.js'); | ||
var Http_Server_dist_effectPlatformNodeHttpServer = require('../../dist/Server-015ebdb2.cjs.prod.js'); | ||
var Http_FormData_dist_effectPlatformNodeHttpFormData = require('../../dist/FormData-b4b59ecb.cjs.prod.js'); | ||
var Http_Server_dist_effectPlatformNodeHttpServer = require('../../dist/Server-2dd836bc.cjs.prod.js'); | ||
require('@effect/platform/Http/Etag'); | ||
require('effect/Effect'); | ||
require('effect/Layer'); | ||
require('../../dist/formData-59e5f494.cjs.prod.js'); | ||
require('../../dist/formData-2d4168a3.cjs.prod.js'); | ||
require('@effect/platform/FileSystem'); | ||
@@ -34,3 +34,3 @@ require('@effect/platform/Http/FormData'); | ||
require('../../Stream/dist/effect-platform-node-Stream.cjs.prod.js'); | ||
require('../../dist/stream-c01737c4.cjs.prod.js'); | ||
require('../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('effect/Channel'); | ||
@@ -48,5 +48,6 @@ require('effect/Either'); | ||
require('../../Sink/dist/effect-platform-node-Sink.cjs.prod.js'); | ||
require('../../dist/sink-5526bd6c.cjs.prod.js'); | ||
require('../../dist/sink-570c8582.cjs.prod.js'); | ||
require('effect/Deferred'); | ||
require('effect/Sink'); | ||
require('../../dist/incomingMessage-890fef7a.cjs.prod.js'); | ||
require('../../dist/incomingMessage-4526b216.cjs.prod.js'); | ||
require('../../dist/platform-80b90f07.cjs.prod.js'); | ||
@@ -53,0 +54,0 @@ require('@effect/platform/Http/Platform'); |
@@ -20,8 +20,8 @@ import * as App from '@effect/platform/Http/App'; | ||
export { E as etag } from '../../dist/Etag-6f08d5ed.esm.js'; | ||
export { F as formData } from '../../dist/FormData-aba95773.esm.js'; | ||
export { S as server } from '../../dist/Server-07db176b.esm.js'; | ||
export { F as formData } from '../../dist/FormData-9c8077af.esm.js'; | ||
export { S as server } from '../../dist/Server-913d7080.esm.js'; | ||
import '@effect/platform/Http/Etag'; | ||
import 'effect/Effect'; | ||
import 'effect/Layer'; | ||
import '../../dist/formData-3a02d09f.esm.js'; | ||
import '../../dist/formData-b50a3c9f.esm.js'; | ||
import '@effect/platform/FileSystem'; | ||
@@ -39,3 +39,3 @@ import '@effect/platform/Http/FormData'; | ||
import '../../Stream/dist/effect-platform-node-Stream.esm.js'; | ||
import '../../dist/stream-36ca9d0a.esm.js'; | ||
import '../../dist/stream-faaffb40.esm.js'; | ||
import 'effect/Channel'; | ||
@@ -53,5 +53,6 @@ import 'effect/Either'; | ||
import '../../Sink/dist/effect-platform-node-Sink.esm.js'; | ||
import '../../dist/sink-f7795af1.esm.js'; | ||
import '../../dist/sink-5dfcc09e.esm.js'; | ||
import 'effect/Deferred'; | ||
import 'effect/Sink'; | ||
import '../../dist/incomingMessage-6970f455.esm.js'; | ||
import '../../dist/incomingMessage-a56317f6.esm.js'; | ||
import '../../dist/platform-2c00c2c5.esm.js'; | ||
@@ -58,0 +59,0 @@ import '@effect/platform/Http/Platform'; |
@@ -20,5 +20,6 @@ 'use strict'; | ||
require('@effect/platform/Error'); | ||
require('../../dist/sink-a2069d86.cjs.dev.js'); | ||
require('../../dist/sink-3a150604.cjs.dev.js'); | ||
require('effect/Channel'); | ||
require('../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
require('effect/Deferred'); | ||
require('../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('effect/Chunk'); | ||
@@ -25,0 +26,0 @@ require('effect/Either'); |
@@ -20,5 +20,6 @@ 'use strict'; | ||
require('@effect/platform/Error'); | ||
require('../../dist/sink-5526bd6c.cjs.prod.js'); | ||
require('../../dist/sink-570c8582.cjs.prod.js'); | ||
require('effect/Channel'); | ||
require('../../dist/stream-c01737c4.cjs.prod.js'); | ||
require('effect/Deferred'); | ||
require('../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('effect/Chunk'); | ||
@@ -25,0 +26,0 @@ require('effect/Either'); |
@@ -16,5 +16,6 @@ import { pipe } from 'effect/Function'; | ||
import '@effect/platform/Error'; | ||
import '../../dist/sink-f7795af1.esm.js'; | ||
import '../../dist/sink-5dfcc09e.esm.js'; | ||
import 'effect/Channel'; | ||
import '../../dist/stream-36ca9d0a.esm.js'; | ||
import 'effect/Deferred'; | ||
import '../../dist/stream-faaffb40.esm.js'; | ||
import 'effect/Chunk'; | ||
@@ -21,0 +22,0 @@ import 'effect/Either'; |
{ | ||
"name": "@effect/platform-node", | ||
"version": "0.22.1", | ||
"version": "0.23.0", | ||
"description": "Unified interfaces for common platform-specific services", | ||
@@ -39,3 +39,5 @@ "main": "dist/effect-platform-node.cjs.js", | ||
"@types/mime": "^3.0.2", | ||
"effect": "2.0.0-next.48" | ||
"@types/tar": "^6.1.6", | ||
"effect": "2.0.0-next.48", | ||
"tar": "^6.2.0" | ||
}, | ||
@@ -48,3 +50,3 @@ "peerDependencies": { | ||
"mime": "^3.0.0", | ||
"@effect/platform": "^0.21.0" | ||
"@effect/platform": "^0.22.0" | ||
}, | ||
@@ -51,0 +53,0 @@ "files": [ |
@@ -5,7 +5,8 @@ 'use strict'; | ||
var sink = require('../../dist/sink-a2069d86.cjs.dev.js'); | ||
var sink = require('../../dist/sink-3a150604.cjs.dev.js'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Effect'); | ||
require('effect/Sink'); | ||
require('../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
require('../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('effect/Chunk'); | ||
@@ -12,0 +13,0 @@ require('effect/Either'); |
@@ -5,7 +5,8 @@ 'use strict'; | ||
var sink = require('../../dist/sink-5526bd6c.cjs.prod.js'); | ||
var sink = require('../../dist/sink-570c8582.cjs.prod.js'); | ||
require('effect/Channel'); | ||
require('effect/Deferred'); | ||
require('effect/Effect'); | ||
require('effect/Sink'); | ||
require('../../dist/stream-c01737c4.cjs.prod.js'); | ||
require('../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('effect/Chunk'); | ||
@@ -12,0 +13,0 @@ require('effect/Either'); |
@@ -1,6 +0,7 @@ | ||
import { f as fromWritable$1 } from '../../dist/sink-f7795af1.esm.js'; | ||
import { f as fromWritable$1 } from '../../dist/sink-5dfcc09e.esm.js'; | ||
import 'effect/Channel'; | ||
import 'effect/Deferred'; | ||
import 'effect/Effect'; | ||
import 'effect/Sink'; | ||
import '../../dist/stream-36ca9d0a.esm.js'; | ||
import '../../dist/stream-faaffb40.esm.js'; | ||
import 'effect/Chunk'; | ||
@@ -7,0 +8,0 @@ import 'effect/Either'; |
@@ -91,4 +91,3 @@ import * as FileSystem from "@effect/platform/FileSystem" | ||
Effect.map( | ||
NodeStream.toString({ | ||
readable: () => part.source, | ||
NodeStream.toString(() => part.source, { | ||
onFailure: (error) => FormData.FormDataError("InternalError", error) | ||
@@ -95,0 +94,0 @@ }), |
@@ -40,4 +40,3 @@ import * as Headers from "@effect/platform/Http/Headers" | ||
(maxBodySize) => | ||
NodeStream.toString({ | ||
readable: () => this.source, | ||
NodeStream.toString(() => this.source, { | ||
onFailure: this.onError, | ||
@@ -77,4 +76,3 @@ maxBytes: Option.getOrUndefined(maxBodySize) | ||
(maxBodySize) => | ||
NodeStream.toUint8Array({ | ||
readable: () => this.source, | ||
NodeStream.toUint8Array(() => this.source, { | ||
onFailure: this.onError, | ||
@@ -81,0 +79,0 @@ maxBytes: Option.getOrUndefined(maxBodySize) |
@@ -57,3 +57,3 @@ import type * as Body from "@effect/platform/Http/Body" | ||
const fromAgent = (agent: NodeClient.HttpAgent): Client.Client.Default => | ||
Client.make((request) => | ||
Client.makeDefault((request) => | ||
Effect.flatMap( | ||
@@ -60,0 +60,0 @@ UrlParams.makeUrl(request.url, request.urlParams, (_) => |
@@ -82,3 +82,5 @@ import * as FileSystem from "@effect/platform/FileSystem" | ||
serve: (httpApp, middleware) => { | ||
const handledApp = middleware ? middleware(respond(httpApp)) : respond(httpApp) | ||
const handledApp = middleware | ||
? middleware(App.withDefaultMiddleware(respond(httpApp))) | ||
: App.withDefaultMiddleware(respond(httpApp)) | ||
return Effect.flatMap(Effect.all([Effect.runtime(), Effect.fiberId]), ([runtime, fiberId]) => { | ||
@@ -85,0 +87,0 @@ const runFork = Runtime.runFork(runtime) |
import * as Channel from "effect/Channel" | ||
import type * as Chunk from "effect/Chunk" | ||
import * as Deferred from "effect/Deferred" | ||
import * as Effect from "effect/Effect" | ||
@@ -8,7 +9,7 @@ import type { LazyArg } from "effect/Function" | ||
import type { FromWritableOptions } from "../Stream" | ||
import { writeEffect } from "./stream" | ||
import { writeInput } from "./stream" | ||
/** @internal */ | ||
export const fromWritable = <E, A = Uint8Array>( | ||
evaluate: LazyArg<Writable>, | ||
export const fromWritable = <E, A = Uint8Array | string>( | ||
evaluate: LazyArg<Writable | NodeJS.WritableStream>, | ||
onError: (error: unknown) => E, | ||
@@ -20,24 +21,38 @@ options: FromWritableOptions = {} | ||
const writeChannel = <IE, OE, A>( | ||
writable: Writable, | ||
writable: Writable | NodeJS.WritableStream, | ||
onError: (error: unknown) => OE, | ||
{ encoding, endOnDone = true }: FromWritableOptions = {} | ||
): Channel.Channel<never, IE, Chunk.Chunk<A>, unknown, IE | OE, Chunk.Chunk<never>, void> => { | ||
const write = writeEffect(writable, onError, encoding) | ||
const close = endOnDone ? | ||
Effect.async<never, never, void>((resume) => { | ||
if (writable.closed) { | ||
resume(Effect.unit) | ||
} else { | ||
writable.end(() => resume(Effect.unit)) | ||
options: FromWritableOptions = {} | ||
): Channel.Channel<never, IE, Chunk.Chunk<A>, unknown, IE | OE, Chunk.Chunk<never>, void> => | ||
Channel.flatMap( | ||
Deferred.make<IE, void>(), | ||
(deferred) => { | ||
const input = writeInput<IE, A>( | ||
writable, | ||
(_) => Deferred.failCause(deferred, _), | ||
options, | ||
Deferred.complete(deferred, Effect.unit) | ||
) | ||
return Channel.embedInput( | ||
writableOutput(writable, deferred, onError), | ||
input | ||
) | ||
} | ||
) | ||
const writableOutput = <IE, E>( | ||
writable: Writable | NodeJS.WritableStream, | ||
deferred: Deferred.Deferred<IE, void>, | ||
onError: (error: unknown) => E | ||
) => | ||
Effect.raceFirst( | ||
Effect.async<never, E, never>((resume) => { | ||
function handleError(err: unknown) { | ||
resume(Effect.fail(onError(err))) | ||
} | ||
}) : | ||
Channel.unit | ||
const loop: Channel.Channel<never, IE, Chunk.Chunk<A>, unknown, OE | IE, Chunk.Chunk<never>, void> = Channel | ||
.readWithCause({ | ||
onInput: (chunk: Chunk.Chunk<A>) => Channel.flatMap(Channel.fromEffect(write(chunk)), () => loop), | ||
onFailure: (cause) => Channel.zipRight(close, Channel.failCause(cause)), | ||
onDone: (_done) => close | ||
}) | ||
return loop | ||
} | ||
writable.on("error", handleError) | ||
return Effect.sync(() => { | ||
writable.off("error", handleError) | ||
}) | ||
}), | ||
Deferred.await(deferred) | ||
) |
import type { SizeInput } from "@effect/platform/FileSystem" | ||
import type { Cause } from "effect" | ||
import * as Channel from "effect/Channel" | ||
@@ -18,3 +19,3 @@ import type * as AsyncInput from "effect/ChannelSingleProducerAsyncInput" | ||
export const fromReadable = <E, A = Uint8Array>( | ||
evaluate: LazyArg<Readable>, | ||
evaluate: LazyArg<Readable | NodeJS.ReadableStream>, | ||
onError: (error: unknown) => E, | ||
@@ -29,7 +30,7 @@ { chunkSize }: FromReadableOptions = {} | ||
export const toString = <E>( | ||
readable: LazyArg<Readable | NodeJS.ReadableStream>, | ||
options: { | ||
readable: LazyArg<Readable> | ||
onFailure: (error: unknown) => E | ||
encoding?: BufferEncoding | ||
maxBytes?: SizeInput | ||
readonly onFailure: (error: unknown) => E | ||
readonly encoding?: BufferEncoding | ||
readonly maxBytes?: SizeInput | ||
} | ||
@@ -40,3 +41,3 @@ ): Effect.Effect<never, E, string> => { | ||
Effect.sync(() => { | ||
const stream = options.readable() | ||
const stream = readable() | ||
stream.setEncoding(options.encoding ?? "utf8") | ||
@@ -66,3 +67,3 @@ return stream | ||
stream.removeAllListeners() | ||
if (!stream.closed) { | ||
if ("closed" in stream && !stream.closed) { | ||
stream.destroy() | ||
@@ -76,6 +77,6 @@ } | ||
export const toUint8Array = <E>( | ||
readable: LazyArg<Readable | NodeJS.ReadableStream>, | ||
options: { | ||
readable: LazyArg<Readable> | ||
onFailure: (error: unknown) => E | ||
maxBytes?: SizeInput | ||
readonly onFailure: (error: unknown) => E | ||
readonly maxBytes?: SizeInput | ||
} | ||
@@ -85,3 +86,3 @@ ): Effect.Effect<never, E, Uint8Array> => { | ||
return Effect.acquireUseRelease( | ||
Effect.sync(options.readable), | ||
Effect.sync(readable), | ||
(stream) => | ||
@@ -108,3 +109,3 @@ Effect.async((resume) => { | ||
stream.removeAllListeners() | ||
if (!stream.closed) { | ||
if ("closed" in stream && !stream.closed) { | ||
stream.destroy() | ||
@@ -117,3 +118,3 @@ } | ||
/** @internal */ | ||
export const fromDuplex = <IE, E, I = Uint8Array, O = Uint8Array>( | ||
export const fromDuplex = <IE, E, I = Uint8Array | string, O = Uint8Array>( | ||
evaluate: LazyArg<Duplex>, | ||
@@ -134,3 +135,7 @@ onError: (error: unknown) => E, | ||
readableTake(duplex, queue, options.chunkSize ? Number(options.chunkSize) : undefined), | ||
writeInput(duplex, queue, onError, options) | ||
writeInput( | ||
duplex, | ||
(cause) => Queue.offer(queue, Either.left(Exit.failCause(cause))), | ||
options | ||
) | ||
), | ||
@@ -197,3 +202,3 @@ ([duplex, queue]) => | ||
const readChannel = <E, A = Uint8Array>( | ||
evaluate: LazyArg<Readable>, | ||
evaluate: LazyArg<Readable | NodeJS.ReadableStream>, | ||
onError: (error: unknown) => E, | ||
@@ -215,3 +220,3 @@ chunkSize: number | undefined | ||
readable.removeAllListeners() | ||
if (!readable.closed) { | ||
if ("closed" in readable && !readable.closed) { | ||
readable.destroy() | ||
@@ -224,31 +229,25 @@ } | ||
const writeInput = <IE, E, A>( | ||
writable: Writable, | ||
queue: Queue.Queue<Either.Either<Exit.Exit<IE | E, void>, void>>, | ||
onError: (error: unknown) => E, | ||
{ encoding, endOnDone = true }: FromWritableOptions = {} | ||
/** @internal */ | ||
export const writeInput = <IE, A>( | ||
writable: Writable | NodeJS.WritableStream, | ||
onFailure: (cause: Cause.Cause<IE>) => Effect.Effect<never, never, void>, | ||
{ encoding, endOnDone = true }: FromWritableOptions, | ||
onDone = Effect.unit | ||
): AsyncInput.AsyncInputProducer<IE, Chunk.Chunk<A>, unknown> => { | ||
const write = writeEffect(writable, onError, encoding) | ||
const close = endOnDone ? | ||
Effect.async<never, never, void>((resume) => { | ||
if (writable.closed) { | ||
const write = writeEffect(writable, encoding) | ||
const close = endOnDone | ||
? Effect.async<never, never, void>((resume) => { | ||
if ("closed" in writable && writable.closed) { | ||
resume(Effect.unit) | ||
} else { | ||
writable.end(() => resume(Effect.unit)) | ||
writable.once("finish", () => resume(Effect.unit)) | ||
writable.end() | ||
} | ||
}) : | ||
Effect.unit | ||
}) | ||
: Effect.unit | ||
return { | ||
awaitRead: () => Effect.unit, | ||
emit: (chunk) => | ||
Effect.catchAllCause( | ||
write(chunk), | ||
(cause) => Queue.offer(queue, Either.left(Exit.failCause(cause))) | ||
), | ||
error: (cause) => | ||
Effect.zipRight( | ||
close, | ||
Queue.offer(queue, Either.left(Exit.failCause(cause))) | ||
), | ||
done: (_) => close | ||
emit: write, | ||
error: (cause) => Effect.zipRight(close, onFailure(cause)), | ||
done: (_) => Effect.zipRight(close, onDone) | ||
} | ||
@@ -258,23 +257,24 @@ } | ||
/** @internal */ | ||
export const writeEffect = | ||
<E, A>(writable: Writable, onError: (error: unknown) => E, encoding?: BufferEncoding) => (chunk: Chunk.Chunk<A>) => | ||
Effect.async<never, E, void>((resume) => { | ||
export const writeEffect = <A>( | ||
writable: Writable | NodeJS.WritableStream, | ||
encoding?: BufferEncoding | ||
) => | ||
(chunk: Chunk.Chunk<A>) => | ||
chunk.length === 0 ? | ||
Effect.unit : | ||
Effect.async<never, never, void>((resume) => { | ||
const iterator = chunk[Symbol.iterator]() | ||
let next = iterator.next() | ||
function loop() { | ||
const item = iterator.next() | ||
if (item.done) { | ||
const item = next | ||
next = iterator.next() | ||
const success = writable.write(item.value, encoding as any) | ||
if (next.done) { | ||
resume(Effect.unit) | ||
} else if (encoding) { | ||
writable.write(item.value, encoding, onDone) | ||
} else if (success) { | ||
loop() | ||
} else { | ||
writable.write(item.value, onDone) | ||
writable.once("drain", loop) | ||
} | ||
} | ||
function onDone(err: unknown) { | ||
if (err) { | ||
resume(Effect.fail(onError(err))) | ||
} else { | ||
loop() | ||
} | ||
} | ||
loop() | ||
@@ -284,3 +284,3 @@ }) | ||
const readableOffer = <E>( | ||
readable: Readable, | ||
readable: Readable | NodeJS.ReadableStream, | ||
queue: Queue.Queue<Either.Either<Exit.Exit<E, void>, void>>, | ||
@@ -308,3 +308,3 @@ onError: (error: unknown) => E | ||
const readableTake = <E, A>( | ||
readable: Readable, | ||
readable: Readable | NodeJS.ReadableStream, | ||
queue: Queue.Queue<Either.Either<Exit.Exit<E, void>, void>>, | ||
@@ -325,3 +325,3 @@ chunkSize: number | undefined | ||
const readChunkChannel = <A>( | ||
readable: Readable, | ||
readable: Readable | NodeJS.ReadableStream, | ||
chunkSize: number | undefined | ||
@@ -328,0 +328,0 @@ ) => |
@@ -15,6 +15,6 @@ /** | ||
*/ | ||
export const fromWritable: <E, A>( | ||
evaluate: LazyArg<Writable>, | ||
export const fromWritable: <E, A = string | Uint8Array>( | ||
evaluate: LazyArg<Writable | NodeJS.WritableStream>, | ||
onError: (error: unknown) => E, | ||
options?: FromWritableOptions | ||
) => Sink<never, E, A, never, void> = internal.fromWritable |
@@ -37,3 +37,3 @@ /** | ||
export const fromReadable: <E, A = Uint8Array>( | ||
evaluate: LazyArg<Readable>, | ||
evaluate: LazyArg<Readable | NodeJS.ReadableStream>, | ||
onError: (error: unknown) => E, | ||
@@ -85,7 +85,7 @@ { chunkSize }?: FromReadableOptions | ||
export const toString: <E>( | ||
readable: LazyArg<Readable | NodeJS.ReadableStream>, | ||
options: { | ||
readable: LazyArg<Readable> | ||
onFailure: (error: unknown) => E | ||
encoding?: BufferEncoding | ||
maxBytes?: SizeInput | ||
readonly onFailure: (error: unknown) => E | ||
readonly encoding?: BufferEncoding | undefined | ||
readonly maxBytes?: SizeInput | undefined | ||
} | ||
@@ -99,7 +99,4 @@ ) => Effect<never, E, string> = internal.toString | ||
export const toUint8Array: <E>( | ||
options: { | ||
readable: LazyArg<Readable> | ||
onFailure: (error: unknown) => E | ||
maxBytes?: SizeInput | ||
} | ||
readable: LazyArg<Readable | NodeJS.ReadableStream>, | ||
options: { readonly onFailure: (error: unknown) => E; readonly maxBytes?: SizeInput | undefined } | ||
) => Effect<never, E, Uint8Array> = internal.toUint8Array |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var stream = require('../../dist/stream-c0c7bc20.cjs.dev.js'); | ||
var stream = require('../../dist/stream-8bbecb96.cjs.dev.js'); | ||
require('effect/Channel'); | ||
@@ -8,0 +8,0 @@ require('effect/Chunk'); |
@@ -5,3 +5,3 @@ 'use strict'; | ||
var stream = require('../../dist/stream-c01737c4.cjs.prod.js'); | ||
var stream = require('../../dist/stream-1667e8bf.cjs.prod.js'); | ||
require('effect/Channel'); | ||
@@ -8,0 +8,0 @@ require('effect/Chunk'); |
@@ -1,2 +0,2 @@ | ||
import { f as fromReadable$1, a as fromDuplex$1, p as pipeThroughDuplex$1, b as pipeThroughSimple$1, t as toString$1, c as toUint8Array$1 } from '../../dist/stream-36ca9d0a.esm.js'; | ||
import { f as fromReadable$1, a as fromDuplex$1, p as pipeThroughDuplex$1, b as pipeThroughSimple$1, t as toString$1, c as toUint8Array$1 } from '../../dist/stream-faaffb40.esm.js'; | ||
import 'effect/Channel'; | ||
@@ -3,0 +3,0 @@ import 'effect/Chunk'; |
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
435962
11530
6
+ Added@effect/platform@0.22.1(transitive)
- Removed@effect/platform@0.21.0(transitive)
Updated@effect/platform@^0.22.0