@effect/platform-node 4.0.0-beta.8 → 4.0.0-beta.80
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/dist/Mime.d.ts +9 -3
- package/dist/Mime.d.ts.map +1 -1
- package/dist/Mime.js +9 -3
- package/dist/Mime.js.map +1 -1
- package/dist/NodeChildProcessSpawner.d.ts +1 -1
- package/dist/NodeChildProcessSpawner.js +1 -1
- package/dist/NodeClusterHttp.d.ts +25 -7
- package/dist/NodeClusterHttp.d.ts.map +1 -1
- package/dist/NodeClusterHttp.js +20 -10
- package/dist/NodeClusterHttp.js.map +1 -1
- package/dist/NodeClusterSocket.d.ts +37 -11
- package/dist/NodeClusterSocket.d.ts.map +1 -1
- package/dist/NodeClusterSocket.js +37 -11
- package/dist/NodeClusterSocket.js.map +1 -1
- package/dist/NodeCrypto.d.ts +10 -0
- package/dist/NodeCrypto.d.ts.map +1 -0
- package/dist/NodeCrypto.js +22 -0
- package/dist/NodeCrypto.js.map +1 -0
- package/dist/NodeFileSystem.d.ts +4 -2
- package/dist/NodeFileSystem.d.ts.map +1 -1
- package/dist/NodeFileSystem.js +12 -3
- package/dist/NodeFileSystem.js.map +1 -1
- package/dist/NodeHttpClient.d.ts +98 -29
- package/dist/NodeHttpClient.d.ts.map +1 -1
- package/dist/NodeHttpClient.js +120 -33
- package/dist/NodeHttpClient.js.map +1 -1
- package/dist/NodeHttpIncomingMessage.d.ts +36 -9
- package/dist/NodeHttpIncomingMessage.d.ts.map +1 -1
- package/dist/NodeHttpIncomingMessage.js +40 -8
- package/dist/NodeHttpIncomingMessage.js.map +1 -1
- package/dist/NodeHttpPlatform.d.ts +10 -4
- package/dist/NodeHttpPlatform.d.ts.map +1 -1
- package/dist/NodeHttpPlatform.js +20 -7
- package/dist/NodeHttpPlatform.js.map +1 -1
- package/dist/NodeHttpServer.d.ts +59 -19
- package/dist/NodeHttpServer.d.ts.map +1 -1
- package/dist/NodeHttpServer.js +102 -52
- package/dist/NodeHttpServer.js.map +1 -1
- package/dist/NodeHttpServerRequest.d.ts +18 -5
- package/dist/NodeHttpServerRequest.d.ts.map +1 -1
- package/dist/NodeHttpServerRequest.js +11 -4
- package/dist/NodeHttpServerRequest.js.map +1 -1
- package/dist/NodeMultipart.d.ts +24 -4
- package/dist/NodeMultipart.d.ts.map +1 -1
- package/dist/NodeMultipart.js +24 -4
- package/dist/NodeMultipart.js.map +1 -1
- package/dist/NodePath.d.ts +15 -6
- package/dist/NodePath.d.ts.map +1 -1
- package/dist/NodePath.js +23 -7
- package/dist/NodePath.js.map +1 -1
- package/dist/NodeRedis.d.ts +27 -9
- package/dist/NodeRedis.d.ts.map +1 -1
- package/dist/NodeRedis.js +30 -12
- package/dist/NodeRedis.js.map +1 -1
- package/dist/NodeRuntime.d.ts +27 -36
- package/dist/NodeRuntime.d.ts.map +1 -1
- package/dist/NodeRuntime.js +17 -13
- package/dist/NodeRuntime.js.map +1 -1
- package/dist/NodeServices.d.ts +19 -5
- package/dist/NodeServices.d.ts.map +1 -1
- package/dist/NodeServices.js +7 -3
- package/dist/NodeServices.js.map +1 -1
- package/dist/NodeSink.d.ts +2 -2
- package/dist/NodeSink.js +2 -2
- package/dist/NodeSocket.d.ts +18 -3
- package/dist/NodeSocket.d.ts.map +1 -1
- package/dist/NodeSocket.js +27 -4
- package/dist/NodeSocket.js.map +1 -1
- package/dist/NodeSocketServer.d.ts +2 -2
- package/dist/NodeSocketServer.js +2 -2
- package/dist/NodeStdio.d.ts +5 -2
- package/dist/NodeStdio.d.ts.map +1 -1
- package/dist/NodeStdio.js +13 -3
- package/dist/NodeStdio.js.map +1 -1
- package/dist/NodeStream.d.ts +2 -2
- package/dist/NodeStream.js +2 -2
- package/dist/NodeTerminal.d.ts +8 -2
- package/dist/NodeTerminal.d.ts.map +1 -1
- package/dist/NodeTerminal.js +15 -3
- package/dist/NodeTerminal.js.map +1 -1
- package/dist/NodeWorker.d.ts +9 -2
- package/dist/NodeWorker.d.ts.map +1 -1
- package/dist/NodeWorker.js +22 -6
- package/dist/NodeWorker.js.map +1 -1
- package/dist/NodeWorkerRunner.d.ts +5 -1
- package/dist/NodeWorkerRunner.d.ts.map +1 -1
- package/dist/NodeWorkerRunner.js +18 -5
- package/dist/NodeWorkerRunner.js.map +1 -1
- package/dist/Undici.d.ts +18 -5
- package/dist/Undici.d.ts.map +1 -1
- package/dist/Undici.js +18 -5
- package/dist/Undici.js.map +1 -1
- package/dist/index.d.ts +28 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +28 -26
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/Mime.ts +10 -3
- package/src/NodeChildProcessSpawner.ts +1 -1
- package/src/NodeClusterHttp.ts +30 -11
- package/src/NodeClusterSocket.ts +37 -11
- package/src/NodeCrypto.ts +24 -0
- package/src/NodeFileSystem.ts +12 -3
- package/src/NodeHttpClient.ts +128 -38
- package/src/NodeHttpIncomingMessage.ts +48 -12
- package/src/NodeHttpPlatform.ts +21 -6
- package/src/NodeHttpServer.ts +124 -56
- package/src/NodeHttpServerRequest.ts +18 -5
- package/src/NodeMultipart.ts +24 -4
- package/src/NodePath.ts +23 -7
- package/src/NodeRedis.ts +32 -14
- package/src/NodeRuntime.ts +35 -37
- package/src/NodeServices.ts +21 -5
- package/src/NodeSink.ts +2 -2
- package/src/NodeSocket.ts +32 -4
- package/src/NodeSocketServer.ts +2 -2
- package/src/NodeStdio.ts +13 -3
- package/src/NodeStream.ts +2 -2
- package/src/NodeTerminal.ts +15 -3
- package/src/NodeWorker.ts +22 -6
- package/src/NodeWorkerRunner.ts +18 -5
- package/src/Undici.ts +18 -5
- package/src/index.ts +29 -26
package/src/NodeServices.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Aggregate Node.js platform services layer.
|
|
3
|
+
*
|
|
4
|
+
* This module defines the `NodeServices` union and a single `layer` that
|
|
5
|
+
* provides Node-backed child process spawning, crypto, filesystem, path, stdio,
|
|
6
|
+
* and terminal services. Use the layer when a Node program wants the standard
|
|
7
|
+
* platform services from one place.
|
|
8
|
+
*
|
|
9
|
+
* @since 4.0.0
|
|
3
10
|
*/
|
|
11
|
+
import type { Crypto } from "effect/Crypto"
|
|
4
12
|
import type { FileSystem } from "effect/FileSystem"
|
|
5
13
|
import * as Layer from "effect/Layer"
|
|
6
14
|
import type { Path } from "effect/Path"
|
|
@@ -8,25 +16,33 @@ import type { Stdio } from "effect/Stdio"
|
|
|
8
16
|
import type { Terminal } from "effect/Terminal"
|
|
9
17
|
import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner"
|
|
10
18
|
import * as NodeChildProcessSpawner from "./NodeChildProcessSpawner.ts"
|
|
19
|
+
import * as NodeCrypto from "./NodeCrypto.ts"
|
|
11
20
|
import * as NodeFileSystem from "./NodeFileSystem.ts"
|
|
12
21
|
import * as NodePath from "./NodePath.ts"
|
|
13
22
|
import * as NodeStdio from "./NodeStdio.ts"
|
|
14
23
|
import * as NodeTerminal from "./NodeTerminal.ts"
|
|
15
24
|
|
|
16
25
|
/**
|
|
17
|
-
*
|
|
26
|
+
* The union of core services provided by the Node platform layer, including
|
|
27
|
+
* child process spawning, filesystem, path, stdio, and terminal services.
|
|
28
|
+
*
|
|
18
29
|
* @category models
|
|
30
|
+
* @since 4.0.0
|
|
19
31
|
*/
|
|
20
|
-
export type NodeServices = ChildProcessSpawner | FileSystem | Path | Stdio | Terminal
|
|
32
|
+
export type NodeServices = ChildProcessSpawner | Crypto | FileSystem | Path | Stdio | Terminal
|
|
21
33
|
|
|
22
34
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
35
|
+
* Provides the default Node implementations for child process spawning,
|
|
36
|
+
* filesystem, path, stdio, and terminal services.
|
|
37
|
+
*
|
|
38
|
+
* @category layers
|
|
39
|
+
* @since 4.0.0
|
|
25
40
|
*/
|
|
26
41
|
export const layer: Layer.Layer<NodeServices> = Layer.provideMerge(
|
|
27
42
|
NodeChildProcessSpawner.layer,
|
|
28
43
|
Layer.mergeAll(
|
|
29
44
|
NodeFileSystem.layer,
|
|
45
|
+
NodeCrypto.layer,
|
|
30
46
|
NodePath.layer,
|
|
31
47
|
NodeStdio.layer,
|
|
32
48
|
NodeTerminal.layer
|
package/src/NodeSink.ts
CHANGED
package/src/NodeSocket.ts
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js socket constructors and layers for Effect sockets.
|
|
3
|
+
*
|
|
4
|
+
* This module re-exports the shared Node socket support for TCP connections,
|
|
5
|
+
* Unix domain socket connections, and Node `Duplex` streams. It also provides
|
|
6
|
+
* WebSocket constructor layers: one that uses `globalThis.WebSocket` when
|
|
7
|
+
* present and falls back to `ws`, one that always uses `ws`, and one that
|
|
8
|
+
* creates a `Socket.Socket` layer for a WebSocket URL.
|
|
9
|
+
*
|
|
10
|
+
* @since 4.0.0
|
|
3
11
|
*/
|
|
4
12
|
import { NodeWS as WS } from "@effect/platform-node-shared/NodeSocket"
|
|
5
13
|
import type * as Duration from "effect/Duration"
|
|
@@ -9,13 +17,16 @@ import * as Layer from "effect/Layer"
|
|
|
9
17
|
import * as Socket from "effect/unstable/socket/Socket"
|
|
10
18
|
|
|
11
19
|
/**
|
|
12
|
-
* @since
|
|
20
|
+
* @since 4.0.0
|
|
13
21
|
*/
|
|
14
22
|
export * from "@effect/platform-node-shared/NodeSocket"
|
|
15
23
|
|
|
16
24
|
/**
|
|
17
|
-
*
|
|
25
|
+
* Provides a `Socket.WebSocketConstructor`, using `globalThis.WebSocket` when
|
|
26
|
+
* available and falling back to the `ws` package otherwise.
|
|
27
|
+
*
|
|
18
28
|
* @category layers
|
|
29
|
+
* @since 4.0.0
|
|
19
30
|
*/
|
|
20
31
|
export const layerWebSocketConstructor: Layer.Layer<
|
|
21
32
|
Socket.WebSocketConstructor
|
|
@@ -27,8 +38,25 @@ export const layerWebSocketConstructor: Layer.Layer<
|
|
|
27
38
|
})
|
|
28
39
|
|
|
29
40
|
/**
|
|
30
|
-
*
|
|
41
|
+
* Provides a `Socket.WebSocketConstructor` backed explicitly by the `ws`
|
|
42
|
+
* package.
|
|
43
|
+
*
|
|
31
44
|
* @category layers
|
|
45
|
+
* @since 4.0.0
|
|
46
|
+
*/
|
|
47
|
+
export const layerWebSocketConstructorWS: Layer.Layer<
|
|
48
|
+
Socket.WebSocketConstructor
|
|
49
|
+
> = Layer.succeed(Socket.WebSocketConstructor)(
|
|
50
|
+
(url, protocols) => new WS.WebSocket(url, protocols) as unknown as globalThis.WebSocket
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Creates a `Socket.Socket` layer for a WebSocket URL using the Node WebSocket
|
|
55
|
+
* constructor layer, honoring protocol, open-timeout, and close-code error
|
|
56
|
+
* options.
|
|
57
|
+
*
|
|
58
|
+
* @category layers
|
|
59
|
+
* @since 4.0.0
|
|
32
60
|
*/
|
|
33
61
|
export const layerWebSocket: (
|
|
34
62
|
url: string | Effect.Effect<string>,
|
package/src/NodeSocketServer.ts
CHANGED
package/src/NodeStdio.ts
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js `Stdio` layer for the current process.
|
|
3
|
+
*
|
|
4
|
+
* The exported layer reuses the shared Node stdio implementation. It satisfies
|
|
5
|
+
* the platform-independent `Stdio` service by reading command-line arguments
|
|
6
|
+
* from `process.argv`, consuming input from `process.stdin`, and writing output
|
|
7
|
+
* streams to `process.stdout` and `process.stderr`.
|
|
8
|
+
*
|
|
9
|
+
* @since 4.0.0
|
|
3
10
|
*/
|
|
4
11
|
import * as NodeStdio from "@effect/platform-node-shared/NodeStdio"
|
|
5
12
|
import type * as Layer from "effect/Layer"
|
|
6
13
|
import type { Stdio } from "effect/Stdio"
|
|
7
14
|
|
|
8
15
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
16
|
+
* Provides the `Stdio` service backed by the current process arguments,
|
|
17
|
+
* stdin, stdout, and stderr streams.
|
|
18
|
+
*
|
|
19
|
+
* @category layers
|
|
20
|
+
* @since 4.0.0
|
|
11
21
|
*/
|
|
12
22
|
export const layer: Layer.Layer<Stdio> = NodeStdio.layer
|
package/src/NodeStream.ts
CHANGED
package/src/NodeTerminal.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js implementation of the Effect `Terminal` service.
|
|
3
|
+
*
|
|
4
|
+
* This module reuses the shared Node terminal implementation. `make` creates a
|
|
5
|
+
* scoped process-backed `Terminal` service, and `layer` provides the default
|
|
6
|
+
* service with the standard quit behavior for key input.
|
|
7
|
+
*
|
|
8
|
+
* @since 4.0.0
|
|
3
9
|
*/
|
|
4
10
|
import * as NodeTerminal from "@effect/platform-node-shared/NodeTerminal"
|
|
5
11
|
import type { Effect } from "effect/Effect"
|
|
@@ -8,13 +14,19 @@ import type { Scope } from "effect/Scope"
|
|
|
8
14
|
import type { Terminal, UserInput } from "effect/Terminal"
|
|
9
15
|
|
|
10
16
|
/**
|
|
11
|
-
*
|
|
17
|
+
* Creates a scoped `Terminal` service backed by process stdin/stdout, using the
|
|
18
|
+
* optional predicate to decide when key input should end the input stream.
|
|
19
|
+
*
|
|
12
20
|
* @category constructors
|
|
21
|
+
* @since 4.0.0
|
|
13
22
|
*/
|
|
14
23
|
export const make: (shouldQuit?: (input: UserInput) => boolean) => Effect<Terminal, never, Scope> = NodeTerminal.make
|
|
15
24
|
|
|
16
25
|
/**
|
|
17
|
-
*
|
|
26
|
+
* Provides the default process-backed `Terminal` service, ending key input on
|
|
27
|
+
* the default quit keys.
|
|
28
|
+
*
|
|
18
29
|
* @category layers
|
|
30
|
+
* @since 4.0.0
|
|
19
31
|
*/
|
|
20
32
|
export const layer: Layer<Terminal> = NodeTerminal.layer
|
package/src/NodeWorker.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Parent-side Node.js support for Effect workers.
|
|
3
|
+
*
|
|
4
|
+
* `layerPlatform` installs the `WorkerPlatform` used by a Node program that
|
|
5
|
+
* owns workers. It supports both `node:worker_threads` workers and IPC-enabled
|
|
6
|
+
* child processes, routing messages through Effect's worker protocol. `layer`
|
|
7
|
+
* combines that platform with a `Spawner` callback, and the platform asks
|
|
8
|
+
* workers to close on scope finalization before forcefully terminating them on
|
|
9
|
+
* timeout.
|
|
10
|
+
*
|
|
11
|
+
* @since 4.0.0
|
|
3
12
|
*/
|
|
4
13
|
import * as Deferred from "effect/Deferred"
|
|
5
14
|
import * as Effect from "effect/Effect"
|
|
@@ -12,8 +21,12 @@ import type * as ChildProcess from "node:child_process"
|
|
|
12
21
|
import type * as WorkerThreads from "node:worker_threads"
|
|
13
22
|
|
|
14
23
|
/**
|
|
15
|
-
*
|
|
24
|
+
* Provides the Node `WorkerPlatform` for `worker_threads` workers and child
|
|
25
|
+
* process workers, wiring messages, errors, and exits into Effect workers and
|
|
26
|
+
* terminating the worker if graceful shutdown times out.
|
|
27
|
+
*
|
|
16
28
|
* @category layers
|
|
29
|
+
* @since 4.0.0
|
|
17
30
|
*/
|
|
18
31
|
export const layerPlatform: Layer.Layer<Worker.WorkerPlatform> = Layer.succeed(Worker.WorkerPlatform)(
|
|
19
32
|
Worker.makePlatform<WorkerThreads.Worker | ChildProcess.ChildProcess>()({
|
|
@@ -63,7 +76,7 @@ export const layerPlatform: Layer.Layer<Worker.WorkerPlatform> = Layer.succeed(W
|
|
|
63
76
|
message: "An messageerror event was emitted",
|
|
64
77
|
cause
|
|
65
78
|
})
|
|
66
|
-
})
|
|
79
|
+
})
|
|
67
80
|
)
|
|
68
81
|
})
|
|
69
82
|
port.worker.on("error", (cause) => {
|
|
@@ -74,7 +87,7 @@ export const layerPlatform: Layer.Layer<Worker.WorkerPlatform> = Layer.succeed(W
|
|
|
74
87
|
message: "An error event was emitted",
|
|
75
88
|
cause
|
|
76
89
|
})
|
|
77
|
-
})
|
|
90
|
+
})
|
|
78
91
|
)
|
|
79
92
|
})
|
|
80
93
|
port.worker.on("exit", (code) => {
|
|
@@ -84,7 +97,7 @@ export const layerPlatform: Layer.Layer<Worker.WorkerPlatform> = Layer.succeed(W
|
|
|
84
97
|
reason: new WorkerReceiveError({
|
|
85
98
|
message: "The worker has exited with code: " + code
|
|
86
99
|
})
|
|
87
|
-
})
|
|
100
|
+
})
|
|
88
101
|
)
|
|
89
102
|
})
|
|
90
103
|
return Effect.void
|
|
@@ -93,8 +106,11 @@ export const layerPlatform: Layer.Layer<Worker.WorkerPlatform> = Layer.succeed(W
|
|
|
93
106
|
)
|
|
94
107
|
|
|
95
108
|
/**
|
|
96
|
-
*
|
|
109
|
+
* Provides the Node `WorkerPlatform` together with a `Worker.Spawner` created
|
|
110
|
+
* from the supplied worker or child-process spawning function.
|
|
111
|
+
*
|
|
97
112
|
* @category layers
|
|
113
|
+
* @since 4.0.0
|
|
98
114
|
*/
|
|
99
115
|
export const layer = (
|
|
100
116
|
spawn: (id: number) => WorkerThreads.Worker | ChildProcess.ChildProcess
|
package/src/NodeWorkerRunner.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js runtime support for workers that serve Effect worker requests.
|
|
3
|
+
*
|
|
4
|
+
* `NodeWorkerRunner` supplies the Node implementation of the Effect worker
|
|
5
|
+
* runner platform. The exported `layer` runs inside a `node:worker_threads`
|
|
6
|
+
* worker through `parentPort`, or inside a child process through
|
|
7
|
+
* `process.send`. It listens for parent messages, runs handlers registered with
|
|
8
|
+
* `WorkerRunner`, sends replies over the same channel, and closes when the
|
|
9
|
+
* parent sends the close message.
|
|
10
|
+
*
|
|
11
|
+
* @since 4.0.0
|
|
3
12
|
*/
|
|
4
13
|
import * as Cause from "effect/Cause"
|
|
5
14
|
import * as Deferred from "effect/Deferred"
|
|
@@ -12,8 +21,12 @@ import * as WorkerRunner from "effect/unstable/workers/WorkerRunner"
|
|
|
12
21
|
import * as WorkerThreads from "node:worker_threads"
|
|
13
22
|
|
|
14
23
|
/**
|
|
15
|
-
*
|
|
24
|
+
* Provides the `WorkerRunnerPlatform` for code running inside a Node worker
|
|
25
|
+
* thread or child process, routing parent messages to the registered handler
|
|
26
|
+
* and sending responses back through the parent channel.
|
|
27
|
+
*
|
|
16
28
|
* @category layers
|
|
29
|
+
* @since 4.0.0
|
|
17
30
|
*/
|
|
18
31
|
export const layer: Layer.Layer<WorkerRunner.WorkerRunnerPlatform> = Layer.succeed(WorkerRunner.WorkerRunnerPlatform)({
|
|
19
32
|
start<O = unknown, I = unknown>() {
|
|
@@ -36,7 +49,7 @@ export const layer: Layer.Layer<WorkerRunner.WorkerRunnerPlatform> = Layer.succe
|
|
|
36
49
|
Effect.scopedWith(Effect.fnUntraced(function*(scope) {
|
|
37
50
|
const closeLatch = Deferred.makeUnsafe<void, WorkerError>()
|
|
38
51
|
const trackFiber = Fiber.runIn(scope)
|
|
39
|
-
const services = yield* Effect.
|
|
52
|
+
const services = yield* Effect.context<R>()
|
|
40
53
|
const runFork = Effect.runForkWith(services)
|
|
41
54
|
const onExit = (exit: Exit.Exit<any, E>) => {
|
|
42
55
|
if (exit._tag === "Failure" && !Cause.hasInterruptsOnly(exit.cause)) {
|
|
@@ -70,7 +83,7 @@ export const layer: Layer.Layer<WorkerRunner.WorkerRunnerPlatform> = Layer.succe
|
|
|
70
83
|
message: "received messageerror event",
|
|
71
84
|
cause
|
|
72
85
|
})
|
|
73
|
-
})
|
|
86
|
+
})
|
|
74
87
|
)
|
|
75
88
|
})
|
|
76
89
|
WorkerThreads.parentPort.on("error", (cause) => {
|
|
@@ -81,7 +94,7 @@ export const layer: Layer.Layer<WorkerRunner.WorkerRunnerPlatform> = Layer.succe
|
|
|
81
94
|
message: "received messageerror event",
|
|
82
95
|
cause
|
|
83
96
|
})
|
|
84
|
-
})
|
|
97
|
+
})
|
|
85
98
|
)
|
|
86
99
|
})
|
|
87
100
|
}
|
package/src/Undici.ts
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Re-export of the Undici HTTP client package used by the Node platform.
|
|
3
|
+
*
|
|
4
|
+
* This module gives Effect applications a package-local import for Undici
|
|
5
|
+
* primitives while working with `@effect/platform-node`. Import named Undici
|
|
6
|
+
* APIs from here when configuring Node HTTP client dispatchers, creating agents
|
|
7
|
+
* or mock agents, setting the process-global dispatcher, or sharing the same
|
|
8
|
+
* Undici types with integrations that use the platform HTTP client.
|
|
9
|
+
*
|
|
10
|
+
* The module does not wrap or reinterpret Undici behavior. It forwards the
|
|
11
|
+
* installed `undici` named exports and default export, so connection pooling,
|
|
12
|
+
* dispatcher lifetimes, mocking, aborts, and request options follow Undici's
|
|
13
|
+
* own semantics.
|
|
14
|
+
*
|
|
15
|
+
* @since 4.0.0
|
|
3
16
|
*/
|
|
4
17
|
import Undici from "undici"
|
|
5
18
|
|
|
6
19
|
/**
|
|
7
|
-
* @
|
|
8
|
-
* @
|
|
20
|
+
* @category Undici
|
|
21
|
+
* @since 4.0.0
|
|
9
22
|
*/
|
|
10
23
|
export * from "undici"
|
|
11
24
|
|
|
12
25
|
/**
|
|
13
|
-
* @
|
|
14
|
-
* @
|
|
26
|
+
* @category Undici
|
|
27
|
+
* @since 4.0.0
|
|
15
28
|
*/
|
|
16
29
|
export default Undici
|
package/src/index.ts
CHANGED
|
@@ -1,127 +1,130 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @since
|
|
2
|
+
* @since 4.0.0
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
// @barrel: Auto-generated exports. Do not edit manually.
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @since
|
|
8
|
+
* @since 4.0.0
|
|
9
9
|
*/
|
|
10
10
|
export * as Mime from "./Mime.ts"
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* @since 1.0.0
|
|
13
|
+
* @since 4.0.0
|
|
16
14
|
*/
|
|
17
15
|
export * as NodeChildProcessSpawner from "./NodeChildProcessSpawner.ts"
|
|
18
16
|
|
|
19
17
|
/**
|
|
20
|
-
* @since
|
|
18
|
+
* @since 4.0.0
|
|
21
19
|
*/
|
|
22
20
|
export * as NodeClusterHttp from "./NodeClusterHttp.ts"
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
|
-
* @since
|
|
23
|
+
* @since 4.0.0
|
|
26
24
|
*/
|
|
27
25
|
export * as NodeClusterSocket from "./NodeClusterSocket.ts"
|
|
28
26
|
|
|
29
27
|
/**
|
|
30
28
|
* @since 1.0.0
|
|
31
29
|
*/
|
|
30
|
+
export * as NodeCrypto from "./NodeCrypto.ts"
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* @since 4.0.0
|
|
34
|
+
*/
|
|
32
35
|
export * as NodeFileSystem from "./NodeFileSystem.ts"
|
|
33
36
|
|
|
34
37
|
/**
|
|
35
|
-
* @since
|
|
38
|
+
* @since 4.0.0
|
|
36
39
|
*/
|
|
37
40
|
export * as NodeHttpClient from "./NodeHttpClient.ts"
|
|
38
41
|
|
|
39
42
|
/**
|
|
40
|
-
* @since
|
|
43
|
+
* @since 4.0.0
|
|
41
44
|
*/
|
|
42
45
|
export * as NodeHttpIncomingMessage from "./NodeHttpIncomingMessage.ts"
|
|
43
46
|
|
|
44
47
|
/**
|
|
45
|
-
* @since
|
|
48
|
+
* @since 4.0.0
|
|
46
49
|
*/
|
|
47
50
|
export * as NodeHttpPlatform from "./NodeHttpPlatform.ts"
|
|
48
51
|
|
|
49
52
|
/**
|
|
50
|
-
* @since
|
|
53
|
+
* @since 4.0.0
|
|
51
54
|
*/
|
|
52
55
|
export * as NodeHttpServer from "./NodeHttpServer.ts"
|
|
53
56
|
|
|
54
57
|
/**
|
|
55
|
-
* @since
|
|
58
|
+
* @since 4.0.0
|
|
56
59
|
*/
|
|
57
60
|
export * as NodeHttpServerRequest from "./NodeHttpServerRequest.ts"
|
|
58
61
|
|
|
59
62
|
/**
|
|
60
|
-
* @since
|
|
63
|
+
* @since 4.0.0
|
|
61
64
|
*/
|
|
62
65
|
export * as NodeMultipart from "./NodeMultipart.ts"
|
|
63
66
|
|
|
64
67
|
/**
|
|
65
|
-
* @since
|
|
68
|
+
* @since 4.0.0
|
|
66
69
|
*/
|
|
67
70
|
export * as NodePath from "./NodePath.ts"
|
|
68
71
|
|
|
69
72
|
/**
|
|
70
|
-
* @since
|
|
73
|
+
* @since 4.0.0
|
|
71
74
|
*/
|
|
72
75
|
export * as NodeRedis from "./NodeRedis.ts"
|
|
73
76
|
|
|
74
77
|
/**
|
|
75
|
-
* @since
|
|
78
|
+
* @since 4.0.0
|
|
76
79
|
*/
|
|
77
80
|
export * as NodeRuntime from "./NodeRuntime.ts"
|
|
78
81
|
|
|
79
82
|
/**
|
|
80
|
-
* @since
|
|
83
|
+
* @since 4.0.0
|
|
81
84
|
*/
|
|
82
85
|
export * as NodeServices from "./NodeServices.ts"
|
|
83
86
|
|
|
84
87
|
/**
|
|
85
|
-
* @since
|
|
88
|
+
* @since 4.0.0
|
|
86
89
|
*/
|
|
87
90
|
export * as NodeSink from "./NodeSink.ts"
|
|
88
91
|
|
|
89
92
|
/**
|
|
90
|
-
* @since
|
|
93
|
+
* @since 4.0.0
|
|
91
94
|
*/
|
|
92
95
|
export * as NodeSocket from "./NodeSocket.ts"
|
|
93
96
|
|
|
94
97
|
/**
|
|
95
|
-
* @since
|
|
98
|
+
* @since 4.0.0
|
|
96
99
|
*/
|
|
97
100
|
export * as NodeSocketServer from "./NodeSocketServer.ts"
|
|
98
101
|
|
|
99
102
|
/**
|
|
100
|
-
* @since
|
|
103
|
+
* @since 4.0.0
|
|
101
104
|
*/
|
|
102
105
|
export * as NodeStdio from "./NodeStdio.ts"
|
|
103
106
|
|
|
104
107
|
/**
|
|
105
|
-
* @since
|
|
108
|
+
* @since 4.0.0
|
|
106
109
|
*/
|
|
107
110
|
export * as NodeStream from "./NodeStream.ts"
|
|
108
111
|
|
|
109
112
|
/**
|
|
110
|
-
* @since
|
|
113
|
+
* @since 4.0.0
|
|
111
114
|
*/
|
|
112
115
|
export * as NodeTerminal from "./NodeTerminal.ts"
|
|
113
116
|
|
|
114
117
|
/**
|
|
115
|
-
* @since
|
|
118
|
+
* @since 4.0.0
|
|
116
119
|
*/
|
|
117
120
|
export * as NodeWorker from "./NodeWorker.ts"
|
|
118
121
|
|
|
119
122
|
/**
|
|
120
|
-
* @since
|
|
123
|
+
* @since 4.0.0
|
|
121
124
|
*/
|
|
122
125
|
export * as NodeWorkerRunner from "./NodeWorkerRunner.ts"
|
|
123
126
|
|
|
124
127
|
/**
|
|
125
|
-
* @since
|
|
128
|
+
* @since 4.0.0
|
|
126
129
|
*/
|
|
127
130
|
export * as Undici from "./Undici.ts"
|