@smthrs/platform-node 1.0.0-rc.5 → 1.0.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/bin/win32-x64/smithers-jj-export.exe +0 -0
- package/dist/cjs/EgressHttpClient.d.ts +1 -1
- package/dist/cjs/EgressHttpClient.d.ts.map +1 -1
- package/dist/cjs/EgressHttpClient.js +4 -4
- package/dist/cjs/EgressHttpClient.js.map +2 -2
- package/dist/cjs/NodeHost.d.ts +2 -2
- package/dist/cjs/NodeHost.d.ts.map +1 -1
- package/dist/cjs/NodeHost.js.map +2 -2
- package/dist/cjs/ProcessConfinement.js +1 -1
- package/dist/cjs/ProcessConfinement.js.map +2 -2
- package/dist/cjs/ProcessReaper.d.ts +1 -1
- package/dist/cjs/ProcessReaper.d.ts.map +1 -1
- package/dist/cjs/ProcessReaper.js +1 -1
- package/dist/cjs/ProcessReaper.js.map +1 -1
- package/dist/cjs/ScopedProcess.d.ts +2 -2
- package/dist/cjs/ScopedProcess.d.ts.map +1 -1
- package/dist/cjs/ScopedProcess.js +1 -1
- package/dist/cjs/ScopedProcess.js.map +2 -2
- package/dist/cjs/internal/PipedProcess.d.ts +2 -2
- package/dist/cjs/internal/PipedProcess.d.ts.map +1 -1
- package/dist/cjs/internal/PipedProcess.js +2 -2
- package/dist/cjs/internal/PipedProcess.js.map +2 -2
- package/dist/cjs/internal/ProcessCleanup.d.ts +1 -1
- package/dist/cjs/internal/ProcessCleanup.d.ts.map +1 -1
- package/dist/cjs/internal/ProcessCleanup.js.map +1 -1
- package/dist/cjs/internal/ProcessSupervisor.d.ts +2 -2
- package/dist/cjs/internal/ProcessSupervisor.d.ts.map +1 -1
- package/dist/cjs/internal/ProcessSupervisor.js +2 -2
- package/dist/cjs/internal/ProcessSupervisor.js.map +2 -2
- package/dist/esm/EgressHttpClient.d.ts +1 -1
- package/dist/esm/EgressHttpClient.d.ts.map +1 -1
- package/dist/esm/EgressHttpClient.js +4 -4
- package/dist/esm/EgressHttpClient.js.map +1 -1
- package/dist/esm/NodeHost.d.ts +2 -2
- package/dist/esm/NodeHost.d.ts.map +1 -1
- package/dist/esm/NodeHost.js.map +1 -1
- package/dist/esm/ProcessConfinement.js +1 -1
- package/dist/esm/ProcessConfinement.js.map +1 -1
- package/dist/esm/ProcessReaper.d.ts +1 -1
- package/dist/esm/ProcessReaper.d.ts.map +1 -1
- package/dist/esm/ProcessReaper.js +1 -1
- package/dist/esm/ProcessReaper.js.map +1 -1
- package/dist/esm/ScopedProcess.d.ts +2 -2
- package/dist/esm/ScopedProcess.d.ts.map +1 -1
- package/dist/esm/ScopedProcess.js +1 -1
- package/dist/esm/ScopedProcess.js.map +1 -1
- package/dist/esm/internal/PipedProcess.d.ts +2 -2
- package/dist/esm/internal/PipedProcess.d.ts.map +1 -1
- package/dist/esm/internal/PipedProcess.js +2 -2
- package/dist/esm/internal/PipedProcess.js.map +1 -1
- package/dist/esm/internal/ProcessCleanup.d.ts +1 -1
- package/dist/esm/internal/ProcessCleanup.d.ts.map +1 -1
- package/dist/esm/internal/ProcessCleanup.js.map +1 -1
- package/dist/esm/internal/ProcessSupervisor.d.ts +2 -2
- package/dist/esm/internal/ProcessSupervisor.d.ts.map +1 -1
- package/dist/esm/internal/ProcessSupervisor.js +2 -2
- package/dist/esm/internal/ProcessSupervisor.js.map +1 -1
- package/dist/vendor/adapters.json +622 -382
- package/dist/vendor/{chunk-42QKY6T6.js → chunk-2ZAGBWTH.js} +1 -1
- package/dist/vendor/{chunk-3GR5VZ2M.js → chunk-3SL3HKQA.js} +3 -3
- package/dist/vendor/{chunk-VANKHF46.js → chunk-423HXGL6.js} +55 -23
- package/dist/vendor/{chunk-6ME2W7TF.js → chunk-4WIQ2XN7.js} +2 -2
- package/dist/vendor/{chunk-Y35ZAO5U.js → chunk-6FSJ2PMW.js} +8 -8
- package/dist/vendor/{chunk-5ZMHBXIK.js → chunk-6L2NJEOV.js} +11 -4
- package/dist/vendor/{chunk-TFIKFFSC.js → chunk-7NMJM44J.js} +2 -2
- package/dist/vendor/{chunk-OXNGN5H7.js → chunk-A7UXCEJA.js} +1 -1
- package/dist/vendor/chunk-ADP5LRUF.js +274 -0
- package/dist/vendor/{chunk-DS7GF46S.js → chunk-AWNTTSHL.js} +2 -2
- package/dist/vendor/{chunk-IIJ52ZU6.js → chunk-BUKVIAEM.js} +2 -2
- package/dist/vendor/{chunk-BKTBUBQY.js → chunk-BY3SDXID.js} +71 -7
- package/dist/vendor/{chunk-JJ24ARBQ.js → chunk-C3PGUWW5.js} +53 -33
- package/dist/vendor/{chunk-J7A4CZDO.js → chunk-D2ZL4PLZ.js} +8 -7
- package/dist/vendor/{chunk-XDKNKFBW.js → chunk-D4HEMNGU.js} +2 -2
- package/dist/vendor/{chunk-DVOAHXPG.js → chunk-FFD6R5JZ.js} +3 -3
- package/dist/vendor/{chunk-UFH5UUZK.js → chunk-HDV6VIRM.js} +1 -1
- package/dist/vendor/chunk-IWSDM4CG.js +16 -0
- package/dist/vendor/{chunk-KUUXSID7.js → chunk-KABHKTVG.js} +2 -2
- package/dist/vendor/{chunk-B3FZ67QU.js → chunk-KFDBU6RR.js} +4 -3
- package/dist/vendor/chunk-LNWGIDIG.js +20 -0
- package/dist/vendor/{chunk-TXKLEBBL.js → chunk-MUEED3C3.js} +3 -2
- package/dist/vendor/{chunk-EZWY45HP.js → chunk-N6TK35N5.js} +2 -2
- package/dist/vendor/{chunk-QPLDT6A6.js → chunk-NQO6V4KI.js} +29 -13
- package/dist/vendor/{chunk-AMQKOQNT.js → chunk-NTEWGPPG.js} +9 -9
- package/dist/vendor/chunk-NUJQMLJP.js +325 -0
- package/dist/vendor/{chunk-54RLBMTZ.js → chunk-OF3N2FN4.js} +1 -1
- package/dist/vendor/{chunk-RO2R4MJH.js → chunk-PA32ARKD.js} +17 -17
- package/dist/vendor/{chunk-JG5TTWPT.js → chunk-PECOFLCU.js} +3 -3
- package/dist/vendor/{chunk-VZBDV3TV.js → chunk-PU7QVYND.js} +2 -2
- package/dist/vendor/{chunk-2Y7WC4KU.js → chunk-QHR2RC5M.js} +2 -2
- package/dist/vendor/{chunk-QYBKAIA6.js → chunk-R327POEZ.js} +2 -2
- package/dist/vendor/chunk-RKVXYKHJ.js +29 -0
- package/dist/vendor/{chunk-XH4U3JSV.js → chunk-RQH5DSBA.js} +2 -2
- package/dist/vendor/{chunk-DWSHTSVX.js → chunk-S6QUQLBV.js} +5 -5
- package/dist/vendor/{chunk-KOZMM5PZ.js → chunk-UPIQ52FQ.js} +12 -12
- package/dist/vendor/{chunk-EGBNVEEW.js → chunk-UUQXJRMK.js} +1 -1
- package/dist/vendor/{chunk-LEUPYT3Q.js → chunk-UUYTTEDH.js} +1 -1
- package/dist/vendor/{chunk-NBVRTDTV.js → chunk-V2EB7FHY.js} +2 -2
- package/dist/vendor/{chunk-M32LDTW7.js → chunk-VIWU4EBF.js} +2 -2
- package/dist/vendor/{chunk-SIR62W3Y.js → chunk-VWSWEUN5.js} +51 -31
- package/dist/vendor/{chunk-MBSKBQ5D.js → chunk-WPZDL2D7.js} +1 -1
- package/dist/vendor/chunk-YDY5P7GL.js +20 -0
- package/dist/vendor/{chunk-FNZOJHSV.js → chunk-YFD4QFIL.js} +17 -17
- package/dist/vendor/{chunk-GXCHI7BM.js → chunk-ZVJCBTJG.js} +5 -5
- package/dist/vendor/cjs/node/NodeAddressResolver.d.ts +16 -0
- package/dist/vendor/cjs/node/NodeAddressResolver.js +1 -0
- package/dist/vendor/cjs/node/NodeChildProcessSpawner.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeClusterHttp.d.ts +13 -22
- package/dist/vendor/cjs/node/NodeClusterSocket.d.ts +14 -8
- package/dist/vendor/cjs/node/NodeCrypto.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeDatagramSocket.d.ts +10 -0
- package/dist/vendor/cjs/node/NodeDatagramSocket.js +1 -0
- package/dist/vendor/cjs/node/NodeDns.d.ts +51 -0
- package/dist/vendor/cjs/node/NodeDns.js +1 -0
- package/dist/vendor/cjs/node/NodeFileSystem.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeHttpClient.d.ts +21 -2
- package/dist/vendor/cjs/node/NodeHttpIncomingMessage.d.ts +5 -3
- package/dist/vendor/cjs/node/NodeHttpPlatform.d.ts +8 -6
- package/dist/vendor/cjs/node/NodeHttpServer.d.ts +21 -10
- package/dist/vendor/cjs/node/NodeHttpServerRequest.d.ts +4 -1
- package/dist/vendor/cjs/node/NodeMultipart.d.ts +5 -1
- package/dist/vendor/cjs/node/NodeMultipartParser.d.ts +9 -1
- package/dist/vendor/cjs/node/NodePath.d.ts +3 -0
- package/dist/vendor/cjs/node/NodeRedis.d.ts +5 -1
- package/dist/vendor/cjs/node/NodeRuntime.d.ts +3 -0
- package/dist/vendor/cjs/node/NodeServices.d.ts +4 -1
- package/dist/vendor/cjs/node/NodeSink.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeSocket.d.ts +10 -3
- package/dist/vendor/cjs/node/NodeSocketServer.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeStdio.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeStream.d.ts +1 -0
- package/dist/vendor/cjs/node/NodeTerminal.d.ts +6 -3
- package/dist/vendor/cjs/node/NodeWorker.d.ts +3 -1
- package/dist/vendor/cjs/node/NodeWorkerRunner.d.ts +2 -1
- package/dist/vendor/cjs/node/Undici.d.ts +3 -0
- package/dist/vendor/cjs/node/index.d.ts +40 -0
- package/dist/vendor/cjs/node-shared/NodeAddressResolver.d.ts +13 -0
- package/dist/vendor/cjs/node-shared/NodeAddressResolver.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeChildProcessSpawner.d.ts +12 -3
- package/dist/vendor/cjs/node-shared/NodeClusterSocket.d.ts +17 -4
- package/dist/vendor/cjs/node-shared/NodeCrypto.d.ts +3 -0
- package/dist/vendor/cjs/node-shared/NodeDatagramSocket.d.ts +246 -0
- package/dist/vendor/cjs/node-shared/NodeDatagramSocket.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeDns.d.ts +221 -0
- package/dist/vendor/cjs/node-shared/NodeDns.js +1 -0
- package/dist/vendor/cjs/node-shared/NodeFileSystem.d.ts +1 -0
- package/dist/vendor/cjs/node-shared/NodeHttpCompression.d.ts +5 -1
- package/dist/vendor/cjs/node-shared/NodePath.d.ts +3 -0
- package/dist/vendor/cjs/node-shared/NodeRuntime.d.ts +4 -0
- package/dist/vendor/cjs/node-shared/NodeSink.d.ts +4 -0
- package/dist/vendor/cjs/node-shared/NodeSocket.d.ts +11 -1
- package/dist/vendor/cjs/node-shared/NodeSocketServer.d.ts +8 -1
- package/dist/vendor/cjs/node-shared/NodeStdio.d.ts +1 -0
- package/dist/vendor/cjs/node-shared/NodeStream.d.ts +15 -0
- package/dist/vendor/cjs/node-shared/NodeTerminal.d.ts +6 -4
- package/dist/vendor/cjs/node-shared/index.d.ts +29 -0
- package/dist/vendor/cjs/node-shared/internal/nodeChildProcessSpawner.d.ts +1 -1
- package/dist/vendor/cjs/platform-node-shared.d.ts +29 -0
- package/dist/vendor/cjs/platform-node.d.ts +40 -0
- package/dist/vendor/node/NodeAddressResolver.d.ts +16 -0
- package/dist/vendor/node/NodeAddressResolver.js +8 -0
- package/dist/vendor/node/NodeChildProcessSpawner.d.ts +1 -0
- package/dist/vendor/node/NodeChildProcessSpawner.js +6 -6
- package/dist/vendor/node/NodeClusterHttp.d.ts +13 -22
- package/dist/vendor/node/NodeClusterHttp.js +32 -32
- package/dist/vendor/node/NodeClusterSocket.d.ts +14 -8
- package/dist/vendor/node/NodeClusterSocket.js +15 -15
- package/dist/vendor/node/NodeCrypto.d.ts +1 -0
- package/dist/vendor/node/NodeCrypto.js +2 -2
- package/dist/vendor/node/NodeDatagramSocket.d.ts +10 -0
- package/dist/vendor/node/NodeDatagramSocket.js +12 -0
- package/dist/vendor/node/NodeDns.d.ts +51 -0
- package/dist/vendor/node/NodeDns.js +12 -0
- package/dist/vendor/node/NodeFileSystem.d.ts +1 -0
- package/dist/vendor/node/NodeFileSystem.js +3 -3
- package/dist/vendor/node/NodeHttpClient.d.ts +21 -2
- package/dist/vendor/node/NodeHttpClient.js +6 -6
- package/dist/vendor/node/NodeHttpIncomingMessage.d.ts +5 -3
- package/dist/vendor/node/NodeHttpIncomingMessage.js +4 -4
- package/dist/vendor/node/NodeHttpPlatform.d.ts +8 -6
- package/dist/vendor/node/NodeHttpPlatform.js +8 -8
- package/dist/vendor/node/NodeHttpServer.d.ts +21 -10
- package/dist/vendor/node/NodeHttpServer.js +26 -26
- package/dist/vendor/node/NodeHttpServerRequest.d.ts +4 -1
- package/dist/vendor/node/NodeHttpServerRequest.js +1 -1
- package/dist/vendor/node/NodeMultipart.d.ts +5 -1
- package/dist/vendor/node/NodeMultipart.js +5 -5
- package/dist/vendor/node/NodeMultipartParser.d.ts +9 -1
- package/dist/vendor/node/NodeMultipartParser.js +1 -1
- package/dist/vendor/node/NodePath.d.ts +3 -0
- package/dist/vendor/node/NodePath.js +2 -2
- package/dist/vendor/node/NodeRedis.d.ts +5 -1
- package/dist/vendor/node/NodeRedis.js +1 -1
- package/dist/vendor/node/NodeRuntime.d.ts +3 -0
- package/dist/vendor/node/NodeRuntime.js +2 -2
- package/dist/vendor/node/NodeServices.d.ts +4 -1
- package/dist/vendor/node/NodeServices.js +17 -17
- package/dist/vendor/node/NodeSink.d.ts +1 -0
- package/dist/vendor/node/NodeSink.js +2 -2
- package/dist/vendor/node/NodeSocket.d.ts +10 -3
- package/dist/vendor/node/NodeSocket.js +2 -2
- package/dist/vendor/node/NodeSocketServer.d.ts +1 -0
- package/dist/vendor/node/NodeSocketServer.js +3 -3
- package/dist/vendor/node/NodeStdio.d.ts +1 -0
- package/dist/vendor/node/NodeStdio.js +4 -4
- package/dist/vendor/node/NodeStream.d.ts +1 -0
- package/dist/vendor/node/NodeStream.js +3 -3
- package/dist/vendor/node/NodeTerminal.d.ts +6 -3
- package/dist/vendor/node/NodeTerminal.js +2 -2
- package/dist/vendor/node/NodeWorker.d.ts +3 -1
- package/dist/vendor/node/NodeWorker.js +1 -1
- package/dist/vendor/node/NodeWorkerRunner.d.ts +2 -1
- package/dist/vendor/node/NodeWorkerRunner.js +1 -1
- package/dist/vendor/node/Undici.d.ts +3 -0
- package/dist/vendor/node/Undici.js +1 -1
- package/dist/vendor/node/index.d.ts +40 -0
- package/dist/vendor/node/index.js +70 -55
- package/dist/vendor/node-shared/NodeAddressResolver.d.ts +13 -0
- package/dist/vendor/node-shared/NodeAddressResolver.js +7 -0
- package/dist/vendor/node-shared/NodeChildProcessSpawner.d.ts +12 -3
- package/dist/vendor/node-shared/NodeChildProcessSpawner.js +5 -5
- package/dist/vendor/node-shared/NodeClusterSocket.d.ts +17 -4
- package/dist/vendor/node-shared/NodeClusterSocket.js +3 -3
- package/dist/vendor/node-shared/NodeCrypto.d.ts +3 -0
- package/dist/vendor/node-shared/NodeCrypto.js +1 -1
- package/dist/vendor/node-shared/NodeDatagramSocket.d.ts +246 -0
- package/dist/vendor/node-shared/NodeDatagramSocket.js +11 -0
- package/dist/vendor/node-shared/NodeDns.d.ts +221 -0
- package/dist/vendor/node-shared/NodeDns.js +31 -0
- package/dist/vendor/node-shared/NodeFileSystem.d.ts +1 -0
- package/dist/vendor/node-shared/NodeFileSystem.js +2 -2
- package/dist/vendor/node-shared/NodeHttpCompression.d.ts +5 -1
- package/dist/vendor/node-shared/NodeHttpCompression.js +1 -1
- package/dist/vendor/node-shared/NodePath.d.ts +3 -0
- package/dist/vendor/node-shared/NodePath.js +1 -1
- package/dist/vendor/node-shared/NodeRuntime.d.ts +4 -0
- package/dist/vendor/node-shared/NodeRuntime.js +1 -1
- package/dist/vendor/node-shared/NodeSink.d.ts +4 -0
- package/dist/vendor/node-shared/NodeSink.js +1 -1
- package/dist/vendor/node-shared/NodeSocket.d.ts +11 -1
- package/dist/vendor/node-shared/NodeSocket.js +1 -1
- package/dist/vendor/node-shared/NodeSocketServer.d.ts +8 -1
- package/dist/vendor/node-shared/NodeSocketServer.js +2 -2
- package/dist/vendor/node-shared/NodeStdio.d.ts +1 -0
- package/dist/vendor/node-shared/NodeStdio.js +3 -3
- package/dist/vendor/node-shared/NodeStream.d.ts +15 -0
- package/dist/vendor/node-shared/NodeStream.js +2 -2
- package/dist/vendor/node-shared/NodeTerminal.d.ts +6 -4
- package/dist/vendor/node-shared/NodeTerminal.js +1 -1
- package/dist/vendor/node-shared/index.d.ts +29 -0
- package/dist/vendor/node-shared/index.js +34 -22
- package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.d.ts +1 -1
- package/dist/vendor/node-shared/internal/nodeChildProcessSpawner.js +1 -1
- package/dist/vendor/node-shared/internal/utils.js +1 -1
- package/dist/vendor/platform-node-shared.d.ts +29 -0
- package/dist/vendor/platform-node-shared.js +34 -22
- package/dist/vendor/platform-node.d.ts +40 -0
- package/dist/vendor/platform-node.js +70 -55
- package/docs/README.md +2 -2
- package/docs/api.md +2 -2
- package/docs/concepts/host-bundle.md +2 -2
- package/docs/installation.md +8 -9
- package/docs/quickstart.md +2 -2
- package/package.json +12 -12
- package/src/EgressHttpClient.ts +4 -4
- package/src/NodeHost.ts +2 -2
- package/src/ProcessConfinement.ts +1 -1
- package/src/ProcessReaper.ts +2 -2
- package/src/ScopedProcess.ts +2 -2
- package/src/internal/PipedProcess.ts +2 -2
- package/src/internal/ProcessCleanup.ts +1 -1
- package/src/internal/ProcessSupervisor.ts +2 -2
- /package/dist/vendor/{chunk-M7CLUILA.js → chunk-3WUGYBFU.js} +0 -0
- /package/dist/vendor/{chunk-ZJMRMY57.js → chunk-ASGOJ3XA.js} +0 -0
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
* services and request options, and defines a lower-level `node:http` /
|
|
8
8
|
* `node:https` client with scoped HTTP agent layers.
|
|
9
9
|
*
|
|
10
|
+
* @stability unstable
|
|
10
11
|
* @since 4.0.0
|
|
11
12
|
*/
|
|
12
13
|
import * as Context from "effect/Context";
|
|
13
14
|
import * as Effect from "effect/Effect";
|
|
15
|
+
import * as Client from "effect/http/HttpClient";
|
|
14
16
|
import * as Layer from "effect/Layer";
|
|
15
17
|
import type * as Scope from "effect/Scope";
|
|
16
|
-
import * as Client from "effect/unstable/http/HttpClient";
|
|
17
18
|
import * as Http from "node:http";
|
|
18
19
|
import * as Https from "node:https";
|
|
19
20
|
import type * as Undici from "./Undici.ts";
|
|
@@ -26,6 +27,7 @@ export {
|
|
|
26
27
|
* Use to access or override the fetch implementation used by the Node
|
|
27
28
|
* fetch-based HTTP client.
|
|
28
29
|
*
|
|
30
|
+
* @stability unstable
|
|
29
31
|
* @category services
|
|
30
32
|
* @since 4.0.0
|
|
31
33
|
*/
|
|
@@ -33,6 +35,7 @@ Fetch,
|
|
|
33
35
|
/**
|
|
34
36
|
* Layer that provides the fetch-based HTTP client implementation.
|
|
35
37
|
*
|
|
38
|
+
* @stability unstable
|
|
36
39
|
* @category layers
|
|
37
40
|
* @since 4.0.0
|
|
38
41
|
*/
|
|
@@ -44,15 +47,17 @@ layer as layerFetch,
|
|
|
44
47
|
*
|
|
45
48
|
* Use to provide default fetch request options for Node HTTP requests.
|
|
46
49
|
*
|
|
50
|
+
* @stability unstable
|
|
47
51
|
* @category services
|
|
48
52
|
* @since 4.0.0
|
|
49
53
|
*/
|
|
50
|
-
RequestInit } from "effect/
|
|
54
|
+
RequestInit } from "effect/http/FetchHttpClient";
|
|
51
55
|
declare const Dispatcher_base: Context.ServiceClass<Dispatcher, "@effect/platform-node/NodeHttpClient/Dispatcher", Undici.Dispatcher>;
|
|
52
56
|
/**
|
|
53
57
|
* Service tag for the Undici `Dispatcher` used by the Undici-backed HTTP
|
|
54
58
|
* client.
|
|
55
59
|
*
|
|
60
|
+
* @stability unstable
|
|
56
61
|
* @category services
|
|
57
62
|
* @since 4.0.0
|
|
58
63
|
*/
|
|
@@ -62,6 +67,7 @@ export declare class Dispatcher extends Dispatcher_base {
|
|
|
62
67
|
* Acquires a new Undici `Agent` dispatcher and destroys it when the enclosing
|
|
63
68
|
* scope is finalized.
|
|
64
69
|
*
|
|
70
|
+
* @stability unstable
|
|
65
71
|
* @category resource management
|
|
66
72
|
* @since 4.0.0
|
|
67
73
|
*/
|
|
@@ -69,6 +75,7 @@ export declare const makeDispatcher: Effect.Effect<Undici.Dispatcher, never, Sco
|
|
|
69
75
|
/**
|
|
70
76
|
* Provides the `Dispatcher` service using a scoped Undici `Agent`.
|
|
71
77
|
*
|
|
78
|
+
* @stability unstable
|
|
72
79
|
* @category layers
|
|
73
80
|
* @since 4.0.0
|
|
74
81
|
*/
|
|
@@ -77,6 +84,7 @@ export declare const layerDispatcher: Layer.Layer<Dispatcher>;
|
|
|
77
84
|
* Provides the `Dispatcher` service from Undici's process-global dispatcher,
|
|
78
85
|
* without creating or owning a new agent.
|
|
79
86
|
*
|
|
87
|
+
* @stability unstable
|
|
80
88
|
* @category layers
|
|
81
89
|
* @since 4.0.0
|
|
82
90
|
*/
|
|
@@ -85,6 +93,7 @@ export declare const dispatcherLayerGlobal: Layer.Layer<Dispatcher>;
|
|
|
85
93
|
* Fiber reference containing default Undici request options applied to requests
|
|
86
94
|
* sent by `makeUndici`.
|
|
87
95
|
*
|
|
96
|
+
* @stability unstable
|
|
88
97
|
* @category services
|
|
89
98
|
* @since 4.0.0
|
|
90
99
|
*/
|
|
@@ -94,6 +103,7 @@ export declare const UndiciOptions: Context.Reference<Partial<Undici.Dispatcher.
|
|
|
94
103
|
* `Dispatcher`, converts Effect HTTP bodies to Undici bodies, and maps
|
|
95
104
|
* transport and decode failures to `HttpClientError`.
|
|
96
105
|
*
|
|
106
|
+
* @stability unstable
|
|
97
107
|
* @category constructors
|
|
98
108
|
* @since 4.0.0
|
|
99
109
|
*/
|
|
@@ -102,6 +112,7 @@ export declare const makeUndici: Effect.Effect<Client.HttpClient, never, Dispatc
|
|
|
102
112
|
* Provides an Undici-backed `HttpClient` using the current `Dispatcher`
|
|
103
113
|
* service.
|
|
104
114
|
*
|
|
115
|
+
* @stability unstable
|
|
105
116
|
* @category layers
|
|
106
117
|
* @since 4.0.0
|
|
107
118
|
*/
|
|
@@ -110,6 +121,7 @@ export declare const layerUndiciNoDispatcher: Layer.Layer<Client.HttpClient, nev
|
|
|
110
121
|
* Provides an Undici-backed `HttpClient` together with a scoped default
|
|
111
122
|
* Undici `Agent` dispatcher.
|
|
112
123
|
*
|
|
124
|
+
* @stability unstable
|
|
113
125
|
* @category layers
|
|
114
126
|
* @since 4.0.0
|
|
115
127
|
*/
|
|
@@ -122,6 +134,7 @@ declare const HttpAgent_base: Context.ServiceClass<HttpAgent, "@effect/platform-
|
|
|
122
134
|
* Service tag for the paired Node `http` and `https` agents used by the
|
|
123
135
|
* node:http-backed HTTP client.
|
|
124
136
|
*
|
|
137
|
+
* @stability unstable
|
|
125
138
|
* @category services
|
|
126
139
|
* @since 4.0.0
|
|
127
140
|
*/
|
|
@@ -131,6 +144,7 @@ export declare class HttpAgent extends HttpAgent_base {
|
|
|
131
144
|
* Acquires Node `http` and `https` agents with the supplied options and
|
|
132
145
|
* destroys both agents when the enclosing scope is finalized.
|
|
133
146
|
*
|
|
147
|
+
* @stability unstable
|
|
134
148
|
* @category resource management
|
|
135
149
|
* @since 4.0.0
|
|
136
150
|
*/
|
|
@@ -139,6 +153,7 @@ export declare const makeAgent: (options?: Https.AgentOptions) => Effect.Effect<
|
|
|
139
153
|
* Provides the `HttpAgent` service using scoped Node `http` and `https`
|
|
140
154
|
* agents configured with the supplied options.
|
|
141
155
|
*
|
|
156
|
+
* @stability unstable
|
|
142
157
|
* @category layers
|
|
143
158
|
* @since 4.0.0
|
|
144
159
|
*/
|
|
@@ -147,6 +162,7 @@ export declare const layerAgentOptions: (options?: Https.AgentOptions | undefine
|
|
|
147
162
|
* Provides the `HttpAgent` service using default scoped Node `http` and
|
|
148
163
|
* `https` agents.
|
|
149
164
|
*
|
|
165
|
+
* @stability unstable
|
|
150
166
|
* @category layers
|
|
151
167
|
* @since 4.0.0
|
|
152
168
|
*/
|
|
@@ -156,6 +172,7 @@ export declare const layerAgent: Layer.Layer<HttpAgent>;
|
|
|
156
172
|
* current `HttpAgent`, streaming request bodies, and wrapping Node responses
|
|
157
173
|
* as `HttpClientResponse` values.
|
|
158
174
|
*
|
|
175
|
+
* @stability unstable
|
|
159
176
|
* @category constructors
|
|
160
177
|
* @since 4.0.0
|
|
161
178
|
*/
|
|
@@ -164,6 +181,7 @@ export declare const makeNodeHttp: Effect.Effect<Client.HttpClient, never, HttpA
|
|
|
164
181
|
* Provides a node:http-backed `HttpClient` using the current `HttpAgent`
|
|
165
182
|
* service.
|
|
166
183
|
*
|
|
184
|
+
* @stability unstable
|
|
167
185
|
* @category layers
|
|
168
186
|
* @since 4.0.0
|
|
169
187
|
*/
|
|
@@ -172,6 +190,7 @@ export declare const layerNodeHttpNoAgent: Layer.Layer<Client.HttpClient, never,
|
|
|
172
190
|
* Provides a node:http-backed `HttpClient` together with default scoped Node
|
|
173
191
|
* `http` and `https` agents.
|
|
174
192
|
*
|
|
193
|
+
* @stability unstable
|
|
175
194
|
* @category layers
|
|
176
195
|
* @since 4.0.0
|
|
177
196
|
*/
|
|
@@ -9,16 +9,17 @@
|
|
|
9
9
|
* typed headers, remote address lookup, stream access, and text, JSON,
|
|
10
10
|
* URL-encoded, and array-buffer body readers.
|
|
11
11
|
*
|
|
12
|
+
* @stability unstable
|
|
12
13
|
* @since 4.0.0
|
|
13
14
|
*/
|
|
14
15
|
import * as Effect from "effect/Effect";
|
|
16
|
+
import * as Headers from "effect/http/Headers";
|
|
17
|
+
import * as IncomingMessage from "effect/http/HttpIncomingMessage";
|
|
18
|
+
import * as UrlParams from "effect/http/UrlParams";
|
|
15
19
|
import * as Inspectable from "effect/Inspectable";
|
|
16
20
|
import * as Option from "effect/Option";
|
|
17
21
|
import type * as Schema from "effect/Schema";
|
|
18
22
|
import type * as Stream from "effect/Stream";
|
|
19
|
-
import * as Headers from "effect/unstable/http/Headers";
|
|
20
|
-
import * as IncomingMessage from "effect/unstable/http/HttpIncomingMessage";
|
|
21
|
-
import * as UrlParams from "effect/unstable/http/UrlParams";
|
|
22
23
|
import type * as Http from "node:http";
|
|
23
24
|
/**
|
|
24
25
|
* Adapts a Node `IncomingMessage` to Effect HTTP incoming messages.
|
|
@@ -33,6 +34,7 @@ import type * as Http from "node:http";
|
|
|
33
34
|
* The adapter exposes headers, remote address, stream access, and cached body
|
|
34
35
|
* decoders. Subclasses provide the error mapping for unknown Node errors.
|
|
35
36
|
*
|
|
37
|
+
* @stability unstable
|
|
36
38
|
* @category constructors
|
|
37
39
|
* @since 4.0.0
|
|
38
40
|
*/
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as EtagImpl from "effect/http/Etag";
|
|
3
|
+
import * as HttpBody from "effect/http/HttpBody";
|
|
4
|
+
import * as Platform from "effect/http/HttpPlatform";
|
|
5
|
+
import * as ServerResponse from "effect/http/HttpServerResponse";
|
|
2
6
|
import * as Layer from "effect/Layer";
|
|
3
|
-
import * as EtagImpl from "effect/unstable/http/Etag";
|
|
4
|
-
import * as HttpBody from "effect/unstable/http/HttpBody";
|
|
5
|
-
import * as Platform from "effect/unstable/http/HttpPlatform";
|
|
6
|
-
import * as ServerResponse from "effect/unstable/http/HttpServerResponse";
|
|
7
7
|
/**
|
|
8
8
|
* Creates the Node `HttpPlatform`, serving file responses from Node readable
|
|
9
9
|
* streams and adding MIME type and content-length headers when needed.
|
|
10
10
|
*
|
|
11
|
+
* @stability unstable
|
|
11
12
|
* @category constructors
|
|
12
13
|
* @since 4.0.0
|
|
13
14
|
*/
|
|
14
15
|
export declare const make: Effect.Effect<{
|
|
15
16
|
readonly platform: "deno" | "node" | "bun" | "web";
|
|
16
17
|
readonly compression: Platform.Compression;
|
|
17
|
-
readonly fileResponse: (path: string, options?: ServerResponse.Options.
|
|
18
|
+
readonly fileResponse: (path: string, options?: ServerResponse.Options.WithContentType & {
|
|
18
19
|
readonly bytesToRead?: import("effect/ByteSize").Input | undefined;
|
|
19
20
|
readonly chunkSize?: number | undefined;
|
|
20
21
|
readonly offset?: import("effect/ByteSize").Input | undefined;
|
|
21
22
|
}) => Effect.Effect<ServerResponse.HttpServerResponse, import("effect/PlatformError").PlatformError>;
|
|
22
|
-
readonly fileWebResponse: (file: HttpBody.HttpBody.FileLike, options?: ServerResponse.Options.
|
|
23
|
+
readonly fileWebResponse: (file: HttpBody.HttpBody.FileLike, options?: ServerResponse.Options.WithContentType & {
|
|
23
24
|
readonly bytesToRead?: number | undefined;
|
|
24
25
|
readonly chunkSize?: number | undefined;
|
|
25
26
|
readonly offset?: number | undefined;
|
|
@@ -29,6 +30,7 @@ export declare const make: Effect.Effect<{
|
|
|
29
30
|
* Provides the Node `HttpPlatform` together with the filesystem and ETag
|
|
30
31
|
* services it needs for file responses.
|
|
31
32
|
*
|
|
33
|
+
* @stability unstable
|
|
32
34
|
* @category layers
|
|
33
35
|
* @since 4.0.0
|
|
34
36
|
*/
|
|
@@ -3,18 +3,18 @@ import * as Duration from "effect/Duration";
|
|
|
3
3
|
import * as Effect from "effect/Effect";
|
|
4
4
|
import type * as FileSystem from "effect/FileSystem";
|
|
5
5
|
import { type LazyArg } from "effect/Function";
|
|
6
|
+
import * as Etag from "effect/http/Etag";
|
|
7
|
+
import type { HttpClient } from "effect/http/HttpClient";
|
|
8
|
+
import type * as Middleware from "effect/http/HttpMiddleware";
|
|
9
|
+
import type * as HttpPlatform from "effect/http/HttpPlatform";
|
|
10
|
+
import * as HttpServer from "effect/http/HttpServer";
|
|
11
|
+
import { ServeError } from "effect/http/HttpServerError";
|
|
12
|
+
import { HttpServerRequest } from "effect/http/HttpServerRequest";
|
|
13
|
+
import type { HttpServerResponse } from "effect/http/HttpServerResponse";
|
|
6
14
|
import * as Layer from "effect/Layer";
|
|
15
|
+
import * as NetAddress from "effect/net/NetAddress";
|
|
7
16
|
import type * as Path from "effect/Path";
|
|
8
17
|
import * as Scope from "effect/Scope";
|
|
9
|
-
import * as Etag from "effect/unstable/http/Etag";
|
|
10
|
-
import type { HttpClient } from "effect/unstable/http/HttpClient";
|
|
11
|
-
import type * as Middleware from "effect/unstable/http/HttpMiddleware";
|
|
12
|
-
import type * as HttpPlatform from "effect/unstable/http/HttpPlatform";
|
|
13
|
-
import * as HttpServer from "effect/unstable/http/HttpServer";
|
|
14
|
-
import { ServeError } from "effect/unstable/http/HttpServerError";
|
|
15
|
-
import { HttpServerRequest } from "effect/unstable/http/HttpServerRequest";
|
|
16
|
-
import type { HttpServerResponse } from "effect/unstable/http/HttpServerResponse";
|
|
17
|
-
import * as NetAddress from "effect/unstable/net/NetAddress";
|
|
18
18
|
import * as Http from "node:http";
|
|
19
19
|
import type * as Net from "node:net";
|
|
20
20
|
import type { Duplex } from "node:stream";
|
|
@@ -23,6 +23,7 @@ import { NodeWS } from "./NodeSocket.ts";
|
|
|
23
23
|
/**
|
|
24
24
|
* Options accepted by the Node `HttpServer` constructors and layers.
|
|
25
25
|
*
|
|
26
|
+
* @stability unstable
|
|
26
27
|
* @category options
|
|
27
28
|
* @since 4.0.0
|
|
28
29
|
*/
|
|
@@ -34,6 +35,8 @@ export interface Options extends Net.ListenOptions {
|
|
|
34
35
|
* wiring options the server manages itself. Use this to enable
|
|
35
36
|
* `permessage-deflate` compression or tune payload limits, e.g.
|
|
36
37
|
* `websocket: { perMessageDeflate: true }`.
|
|
38
|
+
*
|
|
39
|
+
* @stability unstable
|
|
37
40
|
*/
|
|
38
41
|
readonly websocket?: Omit<NodeWS.ServerOptions, "noServer" | "server" | "host" | "port" | "path"> | undefined;
|
|
39
42
|
}
|
|
@@ -42,13 +45,14 @@ export interface Options extends Net.ListenOptions {
|
|
|
42
45
|
* with the supplied options, registers request and upgrade handling, and closes
|
|
43
46
|
* the server during scope finalization with optional graceful-shutdown control.
|
|
44
47
|
*
|
|
48
|
+
* @stability unstable
|
|
45
49
|
* @category constructors
|
|
46
50
|
* @since 4.0.0
|
|
47
51
|
*/
|
|
48
52
|
export declare const make: (evaluate: LazyArg<Http.Server<typeof Http.IncomingMessage, typeof Http.ServerResponse>>, options: Options) => Effect.Effect<{
|
|
49
53
|
readonly serve: {
|
|
50
54
|
<E, R>(effect: Effect.Effect<HttpServerResponse, E, R>): Effect.Effect<void, never, Exclude<R, HttpServerRequest> | Scope.Scope>;
|
|
51
|
-
<E, R, App extends Effect.Effect<HttpServerResponse, any, any>>(effect: Effect.Effect<HttpServerResponse, E, R>, middleware: Middleware.HttpMiddleware.Applied<App, E, R>): Effect.Effect<void, never, Exclude<
|
|
55
|
+
<E, R, App extends Effect.Effect<HttpServerResponse, any, any>>(effect: Effect.Effect<HttpServerResponse, E, R>, middleware: Middleware.HttpMiddleware.Applied<App, E, R>): Effect.Effect<void, never, Exclude<Effect.Services<App>, HttpServerRequest> | Scope.Scope>;
|
|
52
56
|
};
|
|
53
57
|
readonly address: NetAddress.SocketAddress;
|
|
54
58
|
}, ServeError, Scope.Scope>;
|
|
@@ -57,6 +61,7 @@ export declare const make: (evaluate: LazyArg<Http.Server<typeof Http.IncomingMe
|
|
|
57
61
|
* injecting a `HttpServerRequest` and interrupting the request fiber if the
|
|
58
62
|
* client closes the response before it finishes.
|
|
59
63
|
*
|
|
64
|
+
* @stability unstable
|
|
60
65
|
* @category handlers
|
|
61
66
|
* @since 4.0.0
|
|
62
67
|
*/
|
|
@@ -69,6 +74,7 @@ export declare const makeHandler: <R, E, App extends Effect.Effect<HttpServerRes
|
|
|
69
74
|
* exposing the upgraded WebSocket as the request's `upgrade` effect and
|
|
70
75
|
* interrupting the request fiber when the socket closes early.
|
|
71
76
|
*
|
|
77
|
+
* @stability unstable
|
|
72
78
|
* @category handlers
|
|
73
79
|
* @since 4.0.0
|
|
74
80
|
*/
|
|
@@ -80,6 +86,7 @@ export declare const makeUpgradeHandler: <R, E, App extends Effect.Effect<HttpSe
|
|
|
80
86
|
* Provides an `HttpServer` by creating and managing a scoped Node
|
|
81
87
|
* `http.Server` with the supplied listen and shutdown options.
|
|
82
88
|
*
|
|
89
|
+
* @stability unstable
|
|
83
90
|
* @category layers
|
|
84
91
|
* @since 4.0.0
|
|
85
92
|
*/
|
|
@@ -88,6 +95,7 @@ export declare const layerServer: (evaluate: LazyArg<Http.Server<typeof Http.Inc
|
|
|
88
95
|
* Provides the Node HTTP support services used by `NodeHttpServer`, including
|
|
89
96
|
* the HTTP platform, ETag generator, and core Node platform services.
|
|
90
97
|
*
|
|
98
|
+
* @stability unstable
|
|
91
99
|
* @category layers
|
|
92
100
|
* @since 4.0.0
|
|
93
101
|
*/
|
|
@@ -96,6 +104,7 @@ export declare const layerHttpServices: Layer.Layer<NodeServices.NodeServices |
|
|
|
96
104
|
* Provides a Node `HttpServer` together with the Node HTTP platform, ETag, and
|
|
97
105
|
* core platform services required to serve requests.
|
|
98
106
|
*
|
|
107
|
+
* @stability unstable
|
|
99
108
|
* @category layers
|
|
100
109
|
* @since 4.0.0
|
|
101
110
|
*/
|
|
@@ -105,6 +114,7 @@ export declare const layer: (evaluate: LazyArg<Http.Server>, options: Options) =
|
|
|
105
114
|
* and core Node platform services, reading the listen and shutdown options from
|
|
106
115
|
* a `Config` value.
|
|
107
116
|
*
|
|
117
|
+
* @stability unstable
|
|
108
118
|
* @category layers
|
|
109
119
|
* @since 4.0.0
|
|
110
120
|
*/
|
|
@@ -113,6 +123,7 @@ export declare const layerConfig: (evaluate: LazyArg<Http.Server>, options: Conf
|
|
|
113
123
|
* Provides a test HTTP server listening on an ephemeral port together with a
|
|
114
124
|
* Fetch-backed `HttpClient` configured for server integration tests.
|
|
115
125
|
*
|
|
126
|
+
* @stability unstable
|
|
116
127
|
* @category testing
|
|
117
128
|
* @since 4.0.0
|
|
118
129
|
*/
|
|
@@ -5,14 +5,16 @@
|
|
|
5
5
|
* `toServerResponse` returns the underlying Node `http.ServerResponse`,
|
|
6
6
|
* evaluating the stored response thunk when the response was created lazily.
|
|
7
7
|
*
|
|
8
|
+
* @stability unstable
|
|
8
9
|
* @since 4.0.0
|
|
9
10
|
*/
|
|
10
|
-
import type { HttpServerRequest } from "effect/
|
|
11
|
+
import type { HttpServerRequest } from "effect/http/HttpServerRequest";
|
|
11
12
|
import type * as Http from "node:http";
|
|
12
13
|
/**
|
|
13
14
|
* Returns the underlying Node `IncomingMessage` for a platform Node
|
|
14
15
|
* `HttpServerRequest`.
|
|
15
16
|
*
|
|
17
|
+
* @stability unstable
|
|
16
18
|
* @category accessors
|
|
17
19
|
* @since 4.0.0
|
|
18
20
|
*/
|
|
@@ -22,6 +24,7 @@ export declare const toIncomingMessage: (self: HttpServerRequest) => Http.Incomi
|
|
|
22
24
|
* `HttpServerRequest`, evaluating the stored response thunk when the response
|
|
23
25
|
* was created lazily.
|
|
24
26
|
*
|
|
27
|
+
* @stability unstable
|
|
25
28
|
* @category accessors
|
|
26
29
|
* @since 4.0.0
|
|
27
30
|
*/
|
|
@@ -8,14 +8,15 @@
|
|
|
8
8
|
* returns the underlying Node readable stream for file parts produced by this
|
|
9
9
|
* parser.
|
|
10
10
|
*
|
|
11
|
+
* @stability unstable
|
|
11
12
|
* @since 4.0.0
|
|
12
13
|
*/
|
|
13
14
|
import * as Effect from "effect/Effect";
|
|
14
15
|
import type * as FileSystem from "effect/FileSystem";
|
|
16
|
+
import * as Multipart from "effect/http/Multipart";
|
|
15
17
|
import type * as Path from "effect/Path";
|
|
16
18
|
import type * as Scope from "effect/Scope";
|
|
17
19
|
import * as Stream from "effect/Stream";
|
|
18
|
-
import * as Multipart from "effect/unstable/http/Multipart";
|
|
19
20
|
import type { IncomingHttpHeaders } from "node:http";
|
|
20
21
|
import type { Readable } from "node:stream";
|
|
21
22
|
/**
|
|
@@ -23,6 +24,7 @@ import type { Readable } from "node:stream";
|
|
|
23
24
|
* stream of `Multipart.Part` values, converting parser failures to
|
|
24
25
|
* `MultipartError`.
|
|
25
26
|
*
|
|
27
|
+
* @stability unstable
|
|
26
28
|
* @category constructors
|
|
27
29
|
* @since 4.0.0
|
|
28
30
|
*/
|
|
@@ -31,6 +33,7 @@ export declare const stream: (source: Readable, headers: IncomingHttpHeaders) =>
|
|
|
31
33
|
* Parses multipart data from a Node readable request body and persists file
|
|
32
34
|
* parts using the current `FileSystem`, `Path`, and `Scope` services.
|
|
33
35
|
*
|
|
36
|
+
* @stability unstable
|
|
34
37
|
* @category constructors
|
|
35
38
|
* @since 4.0.0
|
|
36
39
|
*/
|
|
@@ -39,6 +42,7 @@ export declare const persisted: (source: Readable, headers: IncomingHttpHeaders)
|
|
|
39
42
|
* Returns the underlying Node readable stream for a multipart file produced by
|
|
40
43
|
* the Node multipart parser.
|
|
41
44
|
*
|
|
45
|
+
* @stability unstable
|
|
42
46
|
* @category converting
|
|
43
47
|
* @since 4.0.0
|
|
44
48
|
*/
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Node.js streams adapter for the low-level multipart parser.
|
|
3
3
|
*
|
|
4
|
+
* @stability unstable
|
|
4
5
|
* @since 4.0.0
|
|
5
6
|
*/
|
|
6
|
-
import type { BaseConfig, MultipartError, PartInfo } from "effect/
|
|
7
|
+
import type { BaseConfig, MultipartError, PartInfo } from "effect/http/MultipartParser";
|
|
7
8
|
import type { IncomingHttpHeaders } from "node:http";
|
|
8
9
|
import { Duplex, Readable } from "node:stream";
|
|
9
10
|
/**
|
|
10
11
|
* A part emitted by the Node.js multipart parser.
|
|
11
12
|
*
|
|
13
|
+
* @stability unstable
|
|
12
14
|
* @category models
|
|
13
15
|
* @since 4.0.0
|
|
14
16
|
*/
|
|
@@ -16,6 +18,7 @@ export type Part = Field | FileStream;
|
|
|
16
18
|
/**
|
|
17
19
|
* A parsed multipart field.
|
|
18
20
|
*
|
|
21
|
+
* @stability unstable
|
|
19
22
|
* @category models
|
|
20
23
|
* @since 4.0.0
|
|
21
24
|
*/
|
|
@@ -27,6 +30,7 @@ export interface Field {
|
|
|
27
30
|
/**
|
|
28
31
|
* A Node.js duplex stream that emits parsed multipart parts.
|
|
29
32
|
*
|
|
33
|
+
* @stability unstable
|
|
30
34
|
* @category models
|
|
31
35
|
* @since 4.0.0
|
|
32
36
|
*/
|
|
@@ -51,6 +55,7 @@ export interface MultipartStream extends Duplex {
|
|
|
51
55
|
/**
|
|
52
56
|
* Configuration for the Node.js multipart parser.
|
|
53
57
|
*
|
|
58
|
+
* @stability unstable
|
|
54
59
|
* @category models
|
|
55
60
|
* @since 4.0.0
|
|
56
61
|
*/
|
|
@@ -60,6 +65,7 @@ export type NodeConfig = Omit<BaseConfig, "headers"> & {
|
|
|
60
65
|
/**
|
|
61
66
|
* A Node.js duplex stream that parses multipart input.
|
|
62
67
|
*
|
|
68
|
+
* @stability unstable
|
|
63
69
|
* @category models
|
|
64
70
|
* @since 4.0.0
|
|
65
71
|
*/
|
|
@@ -76,6 +82,7 @@ export declare class MultipartStream extends Duplex {
|
|
|
76
82
|
/**
|
|
77
83
|
* Creates a Node.js multipart parser stream.
|
|
78
84
|
*
|
|
85
|
+
* @stability unstable
|
|
79
86
|
* @category constructors
|
|
80
87
|
* @since 4.0.0
|
|
81
88
|
*/
|
|
@@ -83,6 +90,7 @@ export declare const make: (config: NodeConfig) => MultipartStream;
|
|
|
83
90
|
/**
|
|
84
91
|
* A readable stream containing a parsed multipart file.
|
|
85
92
|
*
|
|
93
|
+
* @stability unstable
|
|
86
94
|
* @category models
|
|
87
95
|
* @since 4.0.0
|
|
88
96
|
*/
|
|
@@ -4,6 +4,7 @@ import type { Path } from "effect/Path";
|
|
|
4
4
|
* Provides the default Node `Path` service using the platform's `node:path`
|
|
5
5
|
* implementation.
|
|
6
6
|
*
|
|
7
|
+
* @stability unstable
|
|
7
8
|
* @category layers
|
|
8
9
|
* @since 4.0.0
|
|
9
10
|
*/
|
|
@@ -12,6 +13,7 @@ export declare const layer: Layer.Layer<Path>;
|
|
|
12
13
|
* Provides the `Path` service using Node's POSIX path implementation,
|
|
13
14
|
* regardless of the host platform.
|
|
14
15
|
*
|
|
16
|
+
* @stability unstable
|
|
15
17
|
* @category layers
|
|
16
18
|
* @since 4.0.0
|
|
17
19
|
*/
|
|
@@ -20,6 +22,7 @@ export declare const layerPosix: Layer.Layer<Path>;
|
|
|
20
22
|
* Provides the `Path` service using Node's Windows path implementation,
|
|
21
23
|
* regardless of the host platform.
|
|
22
24
|
*
|
|
25
|
+
* @stability unstable
|
|
23
26
|
* @category layers
|
|
24
27
|
* @since 4.0.0
|
|
25
28
|
*/
|
|
@@ -8,13 +8,14 @@
|
|
|
8
8
|
* connects explicitly, so layer construction can fail with a `RedisError`.
|
|
9
9
|
* Both layers close the client when the layer scope ends.
|
|
10
10
|
*
|
|
11
|
+
* @stability unstable
|
|
11
12
|
* @since 4.0.0
|
|
12
13
|
*/
|
|
13
14
|
import * as Config from "effect/Config";
|
|
14
15
|
import * as Context from "effect/Context";
|
|
15
16
|
import * as Effect from "effect/Effect";
|
|
16
17
|
import * as Layer from "effect/Layer";
|
|
17
|
-
import * as Redis from "effect/
|
|
18
|
+
import * as Redis from "effect/persistence/Redis";
|
|
18
19
|
import { createClient } from "redis";
|
|
19
20
|
type NodeRedisClient = ReturnType<typeof createClient>;
|
|
20
21
|
type NodeRedisClientOptions = NonNullable<Parameters<typeof createClient>[0]>;
|
|
@@ -27,6 +28,7 @@ declare const NodeRedis_base: Context.ServiceClass<NodeRedis, "@effect/platform-
|
|
|
27
28
|
* `node-redis` client and a `use` helper that maps client failures to
|
|
28
29
|
* `RedisError`.
|
|
29
30
|
*
|
|
31
|
+
* @stability unstable
|
|
30
32
|
* @category services
|
|
31
33
|
* @since 4.0.0
|
|
32
34
|
*/
|
|
@@ -47,6 +49,7 @@ export declare class NodeRedis extends NodeRedis_base {
|
|
|
47
49
|
* Scope finalization calls `close()`, which waits for in-flight commands,
|
|
48
50
|
* including blocking commands, and can therefore delay scope closure.
|
|
49
51
|
*
|
|
52
|
+
* @stability unstable
|
|
50
53
|
* @category layers
|
|
51
54
|
* @since 4.0.0
|
|
52
55
|
*/
|
|
@@ -66,6 +69,7 @@ export declare const layer: (options?: NodeRedisClientOptions | undefined) => La
|
|
|
66
69
|
* Scope finalization calls `close()`, which waits for in-flight commands,
|
|
67
70
|
* including blocking commands, and can therefore delay scope closure.
|
|
68
71
|
*
|
|
72
|
+
* @stability unstable
|
|
69
73
|
* @category layers
|
|
70
74
|
* @since 4.0.0
|
|
71
75
|
*/
|
|
@@ -21,6 +21,7 @@ import type * as Runtime from "effect/Runtime";
|
|
|
21
21
|
* - `disableErrorReporting`: Turn off automatic error logging.
|
|
22
22
|
* - `teardown`: Provide custom finalization logic.
|
|
23
23
|
*
|
|
24
|
+
* @stability unstable
|
|
24
25
|
* @category running
|
|
25
26
|
* @since 4.0.0
|
|
26
27
|
*/
|
|
@@ -46,6 +47,7 @@ export declare const runMain: {
|
|
|
46
47
|
* - `disableErrorReporting`: Turn off automatic error logging.
|
|
47
48
|
* - `teardown`: Provide custom finalization logic.
|
|
48
49
|
*
|
|
50
|
+
* @stability unstable
|
|
49
51
|
* @category running
|
|
50
52
|
* @since 4.0.0
|
|
51
53
|
*/
|
|
@@ -74,6 +76,7 @@ export declare const runMain: {
|
|
|
74
76
|
* - `disableErrorReporting`: Turn off automatic error logging.
|
|
75
77
|
* - `teardown`: Provide custom finalization logic.
|
|
76
78
|
*
|
|
79
|
+
* @stability unstable
|
|
77
80
|
* @category running
|
|
78
81
|
* @since 4.0.0
|
|
79
82
|
*/
|
|
@@ -6,19 +6,21 @@
|
|
|
6
6
|
* and terminal services. Use the layer when a Node program wants the standard
|
|
7
7
|
* platform services from one place.
|
|
8
8
|
*
|
|
9
|
+
* @stability unstable
|
|
9
10
|
* @since 4.0.0
|
|
10
11
|
*/
|
|
11
12
|
import type { Crypto } from "effect/Crypto";
|
|
12
13
|
import type { FileSystem } from "effect/FileSystem";
|
|
13
14
|
import * as Layer from "effect/Layer";
|
|
14
15
|
import type { Path } from "effect/Path";
|
|
16
|
+
import type { ChildProcessSpawner } from "effect/process/ChildProcessSpawner";
|
|
15
17
|
import type { Stdio } from "effect/Stdio";
|
|
16
18
|
import type { Terminal } from "effect/Terminal";
|
|
17
|
-
import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
|
|
18
19
|
/**
|
|
19
20
|
* The union of core services provided by the Node platform layer, including
|
|
20
21
|
* child process spawning, filesystem, path, stdio, and terminal services.
|
|
21
22
|
*
|
|
23
|
+
* @stability unstable
|
|
22
24
|
* @category models
|
|
23
25
|
* @since 4.0.0
|
|
24
26
|
*/
|
|
@@ -27,6 +29,7 @@ export type NodeServices = ChildProcessSpawner | Crypto | FileSystem | Path | St
|
|
|
27
29
|
* Provides the default Node implementations for child process spawning,
|
|
28
30
|
* filesystem, path, stdio, and terminal services.
|
|
29
31
|
*
|
|
32
|
+
* @stability unstable
|
|
30
33
|
* @category layers
|
|
31
34
|
* @since 4.0.0
|
|
32
35
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type * as Duration from "effect/Duration";
|
|
2
2
|
import type * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as Socket from "effect/
|
|
4
|
+
import * as Socket from "effect/socket/Socket";
|
|
5
5
|
/**
|
|
6
6
|
* @since 4.0.0
|
|
7
7
|
*/
|
|
@@ -9,7 +9,10 @@ export * from "../node-shared/NodeSocket.js";
|
|
|
9
9
|
/**
|
|
10
10
|
* Provides a `Socket.WebSocketConstructor`, using `globalThis.WebSocket` when
|
|
11
11
|
* available and falling back to the `ws` package otherwise.
|
|
12
|
+
* Client options objects use `ws` so handshake headers and subprotocols can
|
|
13
|
+
* be supplied together.
|
|
12
14
|
*
|
|
15
|
+
* @stability unstable
|
|
13
16
|
* @category layers
|
|
14
17
|
* @since 4.0.0
|
|
15
18
|
*/
|
|
@@ -17,22 +20,26 @@ export declare const layerWebSocketConstructor: Layer.Layer<Socket.WebSocketCons
|
|
|
17
20
|
/**
|
|
18
21
|
* Provides a `Socket.WebSocketConstructor` backed explicitly by the `ws`
|
|
19
22
|
* package.
|
|
23
|
+
* Supports handshake headers alongside subprotocols in client options objects.
|
|
20
24
|
*
|
|
25
|
+
* @stability unstable
|
|
21
26
|
* @category layers
|
|
22
27
|
* @since 4.0.0
|
|
23
28
|
*/
|
|
24
29
|
export declare const layerWebSocketConstructorWS: Layer.Layer<Socket.WebSocketConstructor>;
|
|
25
30
|
/**
|
|
26
31
|
* Creates a `Socket.Socket` layer for a WebSocket URL using the Node WebSocket
|
|
27
|
-
* constructor layer, honoring protocol, open-timeout, and
|
|
28
|
-
* options.
|
|
32
|
+
* constructor layer, honoring protocol, handshake-header, open-timeout, and
|
|
33
|
+
* high-water-mark options.
|
|
29
34
|
*
|
|
35
|
+
* @stability unstable
|
|
30
36
|
* @category layers
|
|
31
37
|
* @since 4.0.0
|
|
32
38
|
*/
|
|
33
39
|
export declare const layerWebSocket: (url: string | Effect.Effect<string>, options?: {
|
|
34
40
|
readonly openTimeout?: Duration.Input | undefined;
|
|
35
41
|
readonly protocols?: string | Array<string> | undefined;
|
|
42
|
+
readonly headers?: Readonly<Record<string, string>> | undefined;
|
|
36
43
|
readonly highWaterMark?: number | undefined;
|
|
37
44
|
} | undefined) => Layer.Layer<Socket.Socket, never, never>;
|
|
38
45
|
//# sourceMappingURL=NodeSocket.d.ts.map
|