@effect/platform-node 4.0.0-beta.7 → 4.0.0-beta.70
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 +3 -3
- package/dist/Mime.js +3 -3
- package/dist/NodeChildProcessSpawner.d.ts +1 -1
- package/dist/NodeChildProcessSpawner.js +1 -1
- package/dist/NodeClusterHttp.d.ts +49 -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 +57 -11
- package/dist/NodeClusterSocket.d.ts.map +1 -1
- package/dist/NodeClusterSocket.js +57 -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 +14 -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 +22 -3
- package/dist/NodeFileSystem.js.map +1 -1
- package/dist/NodeHttpClient.d.ts +102 -24
- package/dist/NodeHttpClient.d.ts.map +1 -1
- package/dist/NodeHttpClient.js +124 -28
- package/dist/NodeHttpClient.js.map +1 -1
- package/dist/NodeHttpIncomingMessage.d.ts +30 -9
- package/dist/NodeHttpIncomingMessage.d.ts.map +1 -1
- package/dist/NodeHttpIncomingMessage.js +34 -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 +34 -7
- package/dist/NodeHttpPlatform.js.map +1 -1
- package/dist/NodeHttpServer.d.ts +56 -16
- package/dist/NodeHttpServer.d.ts.map +1 -1
- package/dist/NodeHttpServer.js +117 -49
- package/dist/NodeHttpServer.js.map +1 -1
- package/dist/NodeHttpServerRequest.d.ts +29 -3
- package/dist/NodeHttpServerRequest.d.ts.map +1 -1
- package/dist/NodeHttpServerRequest.js +9 -2
- package/dist/NodeHttpServerRequest.js.map +1 -1
- package/dist/NodeMultipart.d.ts +32 -4
- package/dist/NodeMultipart.d.ts.map +1 -1
- package/dist/NodeMultipart.js +32 -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 +30 -7
- package/dist/NodePath.js.map +1 -1
- package/dist/NodeRedis.d.ts +38 -9
- package/dist/NodeRedis.d.ts.map +1 -1
- package/dist/NodeRedis.js +41 -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 +24 -13
- package/dist/NodeRuntime.js.map +1 -1
- package/dist/NodeServices.d.ts +29 -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 +36 -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 +22 -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 +19 -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 +31 -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 +27 -5
- package/dist/NodeWorkerRunner.js.map +1 -1
- package/dist/Undici.d.ts +3 -3
- package/dist/Undici.js +3 -3
- package/dist/index.d.ts +376 -24
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +376 -24
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/Mime.ts +3 -3
- package/src/NodeChildProcessSpawner.ts +1 -1
- package/src/NodeClusterHttp.ts +54 -11
- package/src/NodeClusterSocket.ts +57 -11
- package/src/NodeCrypto.ts +16 -0
- package/src/NodeFileSystem.ts +22 -3
- package/src/NodeHttpClient.ts +132 -33
- package/src/NodeHttpIncomingMessage.ts +42 -12
- package/src/NodeHttpPlatform.ts +35 -6
- package/src/NodeHttpServer.ts +139 -53
- package/src/NodeHttpServerRequest.ts +29 -3
- package/src/NodeMultipart.ts +32 -4
- package/src/NodePath.ts +30 -7
- package/src/NodeRedis.ts +43 -14
- package/src/NodeRuntime.ts +42 -37
- package/src/NodeServices.ts +31 -5
- package/src/NodeSink.ts +2 -2
- package/src/NodeSocket.ts +41 -4
- package/src/NodeSocketServer.ts +2 -2
- package/src/NodeStdio.ts +22 -3
- package/src/NodeStream.ts +2 -2
- package/src/NodeTerminal.ts +19 -3
- package/src/NodeWorker.ts +31 -6
- package/src/NodeWorkerRunner.ts +27 -5
- package/src/Undici.ts +3 -3
- package/src/index.ts +377 -24
package/dist/NodeRuntime.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ import type * as Runtime from "effect/Runtime";
|
|
|
3
3
|
/**
|
|
4
4
|
* Helps you run a main effect with built-in error handling, logging, and signal management.
|
|
5
5
|
*
|
|
6
|
+
* **When to use**
|
|
7
|
+
*
|
|
8
|
+
* Use this function to run an Effect as your application's main program, especially
|
|
9
|
+
* when you need structured error handling, log management, interrupt support,
|
|
10
|
+
* or advanced teardown capabilities.
|
|
11
|
+
*
|
|
6
12
|
* **Details**
|
|
7
13
|
*
|
|
8
14
|
* This function launches an Effect as the main entry point, setting exit codes
|
|
@@ -11,26 +17,23 @@ import type * as Runtime from "effect/Runtime";
|
|
|
11
17
|
* behaviors can be turned off. You can also provide custom teardown logic to
|
|
12
18
|
* finalize resources or produce different exit codes.
|
|
13
19
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* An optional object that can include:
|
|
20
|
+
* The optional configuration object can include:
|
|
17
21
|
* - `disableErrorReporting`: Turn off automatic error logging.
|
|
18
|
-
* - `disablePrettyLogger`: Avoid adding the pretty logger.
|
|
19
22
|
* - `teardown`: Provide custom finalization logic.
|
|
20
23
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* Use this function to run an Effect as your application’s main program, especially
|
|
24
|
-
* when you need structured error handling, log management, interrupt support,
|
|
25
|
-
* or advanced teardown capabilities.
|
|
26
|
-
*
|
|
27
|
-
* @since 1.0.0
|
|
28
|
-
* @category Run main
|
|
24
|
+
* @category running
|
|
25
|
+
* @since 4.0.0
|
|
29
26
|
*/
|
|
30
27
|
export declare const runMain: {
|
|
31
28
|
/**
|
|
32
29
|
* Helps you run a main effect with built-in error handling, logging, and signal management.
|
|
33
30
|
*
|
|
31
|
+
* **When to use**
|
|
32
|
+
*
|
|
33
|
+
* Use this function to run an Effect as your application's main program, especially
|
|
34
|
+
* when you need structured error handling, log management, interrupt support,
|
|
35
|
+
* or advanced teardown capabilities.
|
|
36
|
+
*
|
|
34
37
|
* **Details**
|
|
35
38
|
*
|
|
36
39
|
* This function launches an Effect as the main entry point, setting exit codes
|
|
@@ -39,21 +42,12 @@ export declare const runMain: {
|
|
|
39
42
|
* behaviors can be turned off. You can also provide custom teardown logic to
|
|
40
43
|
* finalize resources or produce different exit codes.
|
|
41
44
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* An optional object that can include:
|
|
45
|
+
* The optional configuration object can include:
|
|
45
46
|
* - `disableErrorReporting`: Turn off automatic error logging.
|
|
46
|
-
* - `disablePrettyLogger`: Avoid adding the pretty logger.
|
|
47
47
|
* - `teardown`: Provide custom finalization logic.
|
|
48
48
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* Use this function to run an Effect as your application’s main program, especially
|
|
52
|
-
* when you need structured error handling, log management, interrupt support,
|
|
53
|
-
* or advanced teardown capabilities.
|
|
54
|
-
*
|
|
55
|
-
* @since 1.0.0
|
|
56
|
-
* @category Run main
|
|
49
|
+
* @category running
|
|
50
|
+
* @since 4.0.0
|
|
57
51
|
*/
|
|
58
52
|
(options?: {
|
|
59
53
|
readonly disableErrorReporting?: boolean | undefined;
|
|
@@ -62,6 +56,12 @@ export declare const runMain: {
|
|
|
62
56
|
/**
|
|
63
57
|
* Helps you run a main effect with built-in error handling, logging, and signal management.
|
|
64
58
|
*
|
|
59
|
+
* **When to use**
|
|
60
|
+
*
|
|
61
|
+
* Use this function to run an Effect as your application's main program, especially
|
|
62
|
+
* when you need structured error handling, log management, interrupt support,
|
|
63
|
+
* or advanced teardown capabilities.
|
|
64
|
+
*
|
|
65
65
|
* **Details**
|
|
66
66
|
*
|
|
67
67
|
* This function launches an Effect as the main entry point, setting exit codes
|
|
@@ -70,21 +70,12 @@ export declare const runMain: {
|
|
|
70
70
|
* behaviors can be turned off. You can also provide custom teardown logic to
|
|
71
71
|
* finalize resources or produce different exit codes.
|
|
72
72
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* An optional object that can include:
|
|
73
|
+
* The optional configuration object can include:
|
|
76
74
|
* - `disableErrorReporting`: Turn off automatic error logging.
|
|
77
|
-
* - `disablePrettyLogger`: Avoid adding the pretty logger.
|
|
78
75
|
* - `teardown`: Provide custom finalization logic.
|
|
79
76
|
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
* Use this function to run an Effect as your application’s main program, especially
|
|
83
|
-
* when you need structured error handling, log management, interrupt support,
|
|
84
|
-
* or advanced teardown capabilities.
|
|
85
|
-
*
|
|
86
|
-
* @since 1.0.0
|
|
87
|
-
* @category Run main
|
|
77
|
+
* @category running
|
|
78
|
+
* @since 4.0.0
|
|
88
79
|
*/
|
|
89
80
|
<E, A>(effect: Effect<A, E>, options?: {
|
|
90
81
|
readonly disableErrorReporting?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeRuntime.d.ts","sourceRoot":"","sources":["../src/NodeRuntime.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeRuntime.d.ts","sourceRoot":"","sources":["../src/NodeRuntime.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,KAAK,OAAO,MAAM,gBAAgB,CAAA;AAE9C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,CACE,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAA;KACjD,GACA,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,IAAI,CAAA;IACvC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,CAAC,CAAC,EAAE,CAAC,EACH,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EACpB,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,qBAAqB,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;QACpD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAA;KACjD,GACA,IAAI,CAAA;CACc,CAAA"}
|
package/dist/NodeRuntime.js
CHANGED
|
@@ -1,10 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js entry-point helpers for running Effect programs.
|
|
3
|
+
*
|
|
4
|
+
* This module exposes `runMain`, the Node runtime launcher used at the edge of
|
|
5
|
+
* CLI tools, scripts, servers, and worker processes. It runs an already
|
|
6
|
+
* self-contained Effect as the process main program, with built-in error
|
|
7
|
+
* reporting and Node signal handling.
|
|
8
|
+
*
|
|
9
|
+
* `NodeRuntime` does not provide application services by itself. Provide any
|
|
10
|
+
* required layers, such as `NodeServices.layer` or narrower service-specific
|
|
11
|
+
* layers, before passing the effect to `runMain`. On `SIGINT` or `SIGTERM`,
|
|
12
|
+
* the main fiber is interrupted so scoped resources and finalizers can shut
|
|
13
|
+
* down; keep long-running work attached to that scope and avoid finalizers that
|
|
14
|
+
* never complete, otherwise process shutdown can be delayed.
|
|
15
|
+
*
|
|
16
|
+
* @since 4.0.0
|
|
3
17
|
*/
|
|
4
18
|
import * as NodeRuntime from "@effect/platform-node-shared/NodeRuntime";
|
|
5
19
|
/**
|
|
6
20
|
* Helps you run a main effect with built-in error handling, logging, and signal management.
|
|
7
21
|
*
|
|
22
|
+
* **When to use**
|
|
23
|
+
*
|
|
24
|
+
* Use this function to run an Effect as your application's main program, especially
|
|
25
|
+
* when you need structured error handling, log management, interrupt support,
|
|
26
|
+
* or advanced teardown capabilities.
|
|
27
|
+
*
|
|
8
28
|
* **Details**
|
|
9
29
|
*
|
|
10
30
|
* This function launches an Effect as the main entry point, setting exit codes
|
|
@@ -13,21 +33,12 @@ import * as NodeRuntime from "@effect/platform-node-shared/NodeRuntime";
|
|
|
13
33
|
* behaviors can be turned off. You can also provide custom teardown logic to
|
|
14
34
|
* finalize resources or produce different exit codes.
|
|
15
35
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* An optional object that can include:
|
|
36
|
+
* The optional configuration object can include:
|
|
19
37
|
* - `disableErrorReporting`: Turn off automatic error logging.
|
|
20
|
-
* - `disablePrettyLogger`: Avoid adding the pretty logger.
|
|
21
38
|
* - `teardown`: Provide custom finalization logic.
|
|
22
39
|
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* Use this function to run an Effect as your application’s main program, especially
|
|
26
|
-
* when you need structured error handling, log management, interrupt support,
|
|
27
|
-
* or advanced teardown capabilities.
|
|
28
|
-
*
|
|
29
|
-
* @since 1.0.0
|
|
30
|
-
* @category Run main
|
|
40
|
+
* @category running
|
|
41
|
+
* @since 4.0.0
|
|
31
42
|
*/
|
|
32
43
|
export const runMain = NodeRuntime.runMain;
|
|
33
44
|
//# sourceMappingURL=NodeRuntime.js.map
|
package/dist/NodeRuntime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeRuntime.js","names":["NodeRuntime","runMain"],"sources":["../src/NodeRuntime.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"NodeRuntime.js","names":["NodeRuntime","runMain"],"sources":["../src/NodeRuntime.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;AAiBA,OAAO,KAAKA,WAAW,MAAM,0CAA0C;AAIvE;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,OAAO,MAAMC,OAAO,GA8DhBD,WAAW,CAACC,OAAO","ignoreList":[]}
|
package/dist/NodeServices.d.ts
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provides the aggregate Node platform services layer for applications that run
|
|
3
|
+
* on the Node.js runtime.
|
|
4
|
+
*
|
|
5
|
+
* This module is useful when an application needs the standard Node-backed
|
|
6
|
+
* implementations of filesystem access, path operations, stdio, terminal
|
|
7
|
+
* interaction, and child process spawning from a single layer. Provide
|
|
8
|
+
* `NodeServices.layer` near the edge of a program to satisfy effects that read
|
|
9
|
+
* or write files, resolve paths, interact with stdin/stdout/stderr or a
|
|
10
|
+
* terminal, or launch subprocesses.
|
|
11
|
+
*
|
|
12
|
+
* The layer only supplies the runtime services listed by `NodeServices`; it does
|
|
13
|
+
* not provide unrelated platform services such as HTTP clients or servers.
|
|
14
|
+
* Libraries should continue to depend on the individual service tags they use,
|
|
15
|
+
* while applications, CLIs, and tests can choose this layer or narrower
|
|
16
|
+
* service-specific layers depending on how much of the Node runtime they want to
|
|
17
|
+
* expose.
|
|
18
|
+
*
|
|
19
|
+
* @since 4.0.0
|
|
3
20
|
*/
|
|
21
|
+
import type { Crypto } from "effect/Crypto";
|
|
4
22
|
import type { FileSystem } from "effect/FileSystem";
|
|
5
23
|
import * as Layer from "effect/Layer";
|
|
6
24
|
import type { Path } from "effect/Path";
|
|
@@ -8,13 +26,19 @@ import type { Stdio } from "effect/Stdio";
|
|
|
8
26
|
import type { Terminal } from "effect/Terminal";
|
|
9
27
|
import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
|
|
10
28
|
/**
|
|
11
|
-
*
|
|
29
|
+
* The union of core services provided by the Node platform layer, including
|
|
30
|
+
* child process spawning, filesystem, path, stdio, and terminal services.
|
|
31
|
+
*
|
|
12
32
|
* @category models
|
|
33
|
+
* @since 4.0.0
|
|
13
34
|
*/
|
|
14
|
-
export type NodeServices = ChildProcessSpawner | FileSystem | Path | Stdio | Terminal;
|
|
35
|
+
export type NodeServices = ChildProcessSpawner | Crypto | FileSystem | Path | Stdio | Terminal;
|
|
15
36
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
37
|
+
* Provides the default Node implementations for child process spawning,
|
|
38
|
+
* filesystem, path, stdio, and terminal services.
|
|
39
|
+
*
|
|
40
|
+
* @category layers
|
|
41
|
+
* @since 4.0.0
|
|
18
42
|
*/
|
|
19
43
|
export declare const layer: Layer.Layer<NodeServices>;
|
|
20
44
|
//# sourceMappingURL=NodeServices.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeServices.d.ts","sourceRoot":"","sources":["../src/NodeServices.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"NodeServices.d.ts","sourceRoot":"","sources":["../src/NodeServices.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6CAA6C,CAAA;AAQtF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,MAAM,GAAG,UAAU,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAA;AAE9F;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAS3C,CAAA"}
|
package/dist/NodeServices.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import * as Layer from "effect/Layer";
|
|
2
2
|
import * as NodeChildProcessSpawner from "./NodeChildProcessSpawner.js";
|
|
3
|
+
import * as NodeCrypto from "./NodeCrypto.js";
|
|
3
4
|
import * as NodeFileSystem from "./NodeFileSystem.js";
|
|
4
5
|
import * as NodePath from "./NodePath.js";
|
|
5
6
|
import * as NodeStdio from "./NodeStdio.js";
|
|
6
7
|
import * as NodeTerminal from "./NodeTerminal.js";
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
9
|
+
* Provides the default Node implementations for child process spawning,
|
|
10
|
+
* filesystem, path, stdio, and terminal services.
|
|
11
|
+
*
|
|
12
|
+
* @category layers
|
|
13
|
+
* @since 4.0.0
|
|
10
14
|
*/
|
|
11
|
-
export const layer = /*#__PURE__*/Layer.provideMerge(NodeChildProcessSpawner.layer, /*#__PURE__*/Layer.mergeAll(NodeFileSystem.layer, NodePath.layer, NodeStdio.layer, NodeTerminal.layer));
|
|
15
|
+
export const layer = /*#__PURE__*/Layer.provideMerge(NodeChildProcessSpawner.layer, /*#__PURE__*/Layer.mergeAll(NodeFileSystem.layer, NodeCrypto.layer, NodePath.layer, NodeStdio.layer, NodeTerminal.layer));
|
|
12
16
|
//# sourceMappingURL=NodeServices.js.map
|
package/dist/NodeServices.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeServices.js","names":["Layer","NodeChildProcessSpawner","NodeFileSystem","NodePath","NodeStdio","NodeTerminal","layer","provideMerge","mergeAll"],"sources":["../src/NodeServices.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeServices.js","names":["Layer","NodeChildProcessSpawner","NodeCrypto","NodeFileSystem","NodePath","NodeStdio","NodeTerminal","layer","provideMerge","mergeAll"],"sources":["../src/NodeServices.ts"],"sourcesContent":[null],"mappings":"AAsBA,OAAO,KAAKA,KAAK,MAAM,cAAc;AAKrC,OAAO,KAAKC,uBAAuB,MAAM,8BAA8B;AACvE,OAAO,KAAKC,UAAU,MAAM,iBAAiB;AAC7C,OAAO,KAAKC,cAAc,MAAM,qBAAqB;AACrD,OAAO,KAAKC,QAAQ,MAAM,eAAe;AACzC,OAAO,KAAKC,SAAS,MAAM,gBAAgB;AAC3C,OAAO,KAAKC,YAAY,MAAM,mBAAmB;AAWjD;;;;;;;AAOA,OAAO,MAAMC,KAAK,gBAA8BP,KAAK,CAACQ,YAAY,CAChEP,uBAAuB,CAACM,KAAK,eAC7BP,KAAK,CAACS,QAAQ,CACZN,cAAc,CAACI,KAAK,EACpBL,UAAU,CAACK,KAAK,EAChBH,QAAQ,CAACG,KAAK,EACdF,SAAS,CAACE,KAAK,EACfD,YAAY,CAACC,KAAK,CACnB,CACF","ignoreList":[]}
|
package/dist/NodeSink.d.ts
CHANGED
package/dist/NodeSink.js
CHANGED
package/dist/NodeSocket.d.ts
CHANGED
|
@@ -3,17 +3,32 @@ import type * as Effect from "effect/Effect";
|
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
import * as Socket from "effect/unstable/socket/Socket";
|
|
5
5
|
/**
|
|
6
|
-
* @since
|
|
6
|
+
* @since 4.0.0
|
|
7
7
|
*/
|
|
8
8
|
export * from "@effect/platform-node-shared/NodeSocket";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Provides a `Socket.WebSocketConstructor`, using `globalThis.WebSocket` when
|
|
11
|
+
* available and falling back to the `ws` package otherwise.
|
|
12
|
+
*
|
|
11
13
|
* @category layers
|
|
14
|
+
* @since 4.0.0
|
|
12
15
|
*/
|
|
13
16
|
export declare const layerWebSocketConstructor: Layer.Layer<Socket.WebSocketConstructor>;
|
|
14
17
|
/**
|
|
15
|
-
*
|
|
18
|
+
* Provides a `Socket.WebSocketConstructor` backed explicitly by the `ws`
|
|
19
|
+
* package.
|
|
20
|
+
*
|
|
16
21
|
* @category layers
|
|
22
|
+
* @since 4.0.0
|
|
23
|
+
*/
|
|
24
|
+
export declare const layerWebSocketConstructorWS: Layer.Layer<Socket.WebSocketConstructor>;
|
|
25
|
+
/**
|
|
26
|
+
* Creates a `Socket.Socket` layer for a WebSocket URL using the Node WebSocket
|
|
27
|
+
* constructor layer, honoring protocol, open-timeout, and close-code error
|
|
28
|
+
* options.
|
|
29
|
+
*
|
|
30
|
+
* @category layers
|
|
31
|
+
* @since 4.0.0
|
|
17
32
|
*/
|
|
18
33
|
export declare const layerWebSocket: (url: string | Effect.Effect<string>, options?: {
|
|
19
34
|
readonly closeCodeIsError?: ((code: number) => boolean) | undefined;
|
package/dist/NodeSocket.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeSocket.d.ts","sourceRoot":"","sources":["../src/NodeSocket.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeSocket.d.ts","sourceRoot":"","sources":["../src/NodeSocket.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,QAAQ,MAAM,iBAAiB,CAAA;AAChD,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAA;AAE5C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,KAAK,MAAM,MAAM,+BAA+B,CAAA;AAEvD;;GAEG;AACH,cAAc,yCAAyC,CAAA;AAEvD;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,KAAK,CACjD,MAAM,CAAC,oBAAoB,CAM3B,CAAA;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,KAAK,CACnD,MAAM,CAAC,oBAAoB,CAG5B,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,CAC3B,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EACnC,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,GAAG,SAAS,CAAA;IACnE,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,KAAK,GAAG,SAAS,CAAA;IACjD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;CACxD,GAAG,SAAS,KACV,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,KAAK,CAI3C,CAAA"}
|
package/dist/NodeSocket.js
CHANGED
|
@@ -1,17 +1,37 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node platform socket entry point for Effect sockets backed by Node streams
|
|
3
|
+
* and WebSocket implementations.
|
|
4
|
+
*
|
|
5
|
+
* This module re-exports the shared Node socket constructors for TCP clients,
|
|
6
|
+
* Unix domain socket clients, and adapters from existing Node `Duplex` streams,
|
|
7
|
+
* then adds Node-specific WebSocket constructor layers. Use it when connecting
|
|
8
|
+
* to raw socket protocols, wiring RPC transports over TCP or Unix sockets, or
|
|
9
|
+
* opening WebSocket clients in Node.
|
|
10
|
+
*
|
|
11
|
+
* TCP and Unix socket behavior comes from the shared Node layer: Unix sockets
|
|
12
|
+
* are selected with `NetConnectOpts.path`, scoped sockets close or destroy the
|
|
13
|
+
* underlying stream on finalization, and Node open, read, write, and close
|
|
14
|
+
* events are translated into `SocketError` values. For WebSockets,
|
|
15
|
+
* `layerWebSocketConstructor` prefers `globalThis.WebSocket` when available
|
|
16
|
+
* and falls back to `ws`; use `layerWebSocketConstructorWS` when you need the
|
|
17
|
+
* `ws` implementation consistently across Node versions.
|
|
18
|
+
*
|
|
19
|
+
* @since 4.0.0
|
|
3
20
|
*/
|
|
4
21
|
import { NodeWS as WS } from "@effect/platform-node-shared/NodeSocket";
|
|
5
22
|
import { flow } from "effect/Function";
|
|
6
23
|
import * as Layer from "effect/Layer";
|
|
7
24
|
import * as Socket from "effect/unstable/socket/Socket";
|
|
8
25
|
/**
|
|
9
|
-
* @since
|
|
26
|
+
* @since 4.0.0
|
|
10
27
|
*/
|
|
11
28
|
export * from "@effect/platform-node-shared/NodeSocket";
|
|
12
29
|
/**
|
|
13
|
-
*
|
|
30
|
+
* Provides a `Socket.WebSocketConstructor`, using `globalThis.WebSocket` when
|
|
31
|
+
* available and falling back to the `ws` package otherwise.
|
|
32
|
+
*
|
|
14
33
|
* @category layers
|
|
34
|
+
* @since 4.0.0
|
|
15
35
|
*/
|
|
16
36
|
export const layerWebSocketConstructor = /*#__PURE__*/Layer.sync(Socket.WebSocketConstructor)(() => {
|
|
17
37
|
if ("WebSocket" in globalThis) {
|
|
@@ -20,8 +40,20 @@ export const layerWebSocketConstructor = /*#__PURE__*/Layer.sync(Socket.WebSocke
|
|
|
20
40
|
return (url, protocols) => new WS.WebSocket(url, protocols);
|
|
21
41
|
});
|
|
22
42
|
/**
|
|
23
|
-
*
|
|
43
|
+
* Provides a `Socket.WebSocketConstructor` backed explicitly by the `ws`
|
|
44
|
+
* package.
|
|
45
|
+
*
|
|
24
46
|
* @category layers
|
|
47
|
+
* @since 4.0.0
|
|
48
|
+
*/
|
|
49
|
+
export const layerWebSocketConstructorWS = /*#__PURE__*/Layer.succeed(Socket.WebSocketConstructor)((url, protocols) => new WS.WebSocket(url, protocols));
|
|
50
|
+
/**
|
|
51
|
+
* Creates a `Socket.Socket` layer for a WebSocket URL using the Node WebSocket
|
|
52
|
+
* constructor layer, honoring protocol, open-timeout, and close-code error
|
|
53
|
+
* options.
|
|
54
|
+
*
|
|
55
|
+
* @category layers
|
|
56
|
+
* @since 4.0.0
|
|
25
57
|
*/
|
|
26
58
|
export const layerWebSocket = /*#__PURE__*/flow(Socket.makeWebSocket, /*#__PURE__*/Layer.effect(Socket.Socket), /*#__PURE__*/Layer.provide(layerWebSocketConstructor));
|
|
27
59
|
//# sourceMappingURL=NodeSocket.js.map
|
package/dist/NodeSocket.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeSocket.js","names":["NodeWS","WS","flow","Layer","Socket","layerWebSocketConstructor","sync","WebSocketConstructor","globalThis","url","protocols","WebSocket","layerWebSocket","makeWebSocket","effect","provide"],"sources":["../src/NodeSocket.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"NodeSocket.js","names":["NodeWS","WS","flow","Layer","Socket","layerWebSocketConstructor","sync","WebSocketConstructor","globalThis","url","protocols","WebSocket","layerWebSocketConstructorWS","succeed","layerWebSocket","makeWebSocket","effect","provide"],"sources":["../src/NodeSocket.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;AAoBA,SAASA,MAAM,IAAIC,EAAE,QAAQ,yCAAyC;AAGtE,SAASC,IAAI,QAAQ,iBAAiB;AACtC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,MAAM,MAAM,+BAA+B;AAEvD;;;AAGA,cAAc,yCAAyC;AAEvD;;;;;;;AAOA,OAAO,MAAMC,yBAAyB,gBAElCF,KAAK,CAACG,IAAI,CAACF,MAAM,CAACG,oBAAoB,CAAC,CAAC,MAAK;EAC/C,IAAI,WAAW,IAAIC,UAAU,EAAE;IAC7B,OAAO,CAACC,GAAG,EAAEC,SAAS,KAAK,IAAIF,UAAU,CAACG,SAAS,CAACF,GAAG,EAAEC,SAAS,CAAC;EACrE;EACA,OAAO,CAACD,GAAG,EAAEC,SAAS,KAAK,IAAIT,EAAE,CAACU,SAAS,CAACF,GAAG,EAAEC,SAAS,CAAoC;AAChG,CAAC,CAAC;AAEF;;;;;;;AAOA,OAAO,MAAME,2BAA2B,gBAEpCT,KAAK,CAACU,OAAO,CAACT,MAAM,CAACG,oBAAoB,CAAC,CAC5C,CAACE,GAAG,EAAEC,SAAS,KAAK,IAAIT,EAAE,CAACU,SAAS,CAACF,GAAG,EAAEC,SAAS,CAAoC,CACxF;AAED;;;;;;;;AAQA,OAAO,MAAMI,cAAc,gBAOqBZ,IAAI,CAClDE,MAAM,CAACW,aAAa,eACpBZ,KAAK,CAACa,MAAM,CAACZ,MAAM,CAACA,MAAM,CAAC,eAC3BD,KAAK,CAACc,OAAO,CAACZ,yBAAyB,CAAC,CACzC","ignoreList":[]}
|
package/dist/NodeSocketServer.js
CHANGED
package/dist/NodeStdio.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type * as Layer from "effect/Layer";
|
|
2
2
|
import type { Stdio } from "effect/Stdio";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Provides the `Stdio` service backed by the current process arguments,
|
|
5
|
+
* stdin, stdout, and stderr streams.
|
|
6
|
+
*
|
|
7
|
+
* @category layers
|
|
8
|
+
* @since 4.0.0
|
|
6
9
|
*/
|
|
7
10
|
export declare const layer: Layer.Layer<Stdio>;
|
|
8
11
|
//# sourceMappingURL=NodeStdio.d.ts.map
|
package/dist/NodeStdio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeStdio.d.ts","sourceRoot":"","sources":["../src/NodeStdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeStdio.d.ts","sourceRoot":"","sources":["../src/NodeStdio.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEzC;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAmB,CAAA"}
|
package/dist/NodeStdio.js
CHANGED
|
@@ -1,10 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js implementation of the Effect `Stdio` service.
|
|
3
|
+
*
|
|
4
|
+
* This module exposes a layer that connects `Stdio` to the current process:
|
|
5
|
+
* command-line arguments come from `process.argv`, input is read from
|
|
6
|
+
* `process.stdin`, and output and error output write to `process.stdout` and
|
|
7
|
+
* `process.stderr`. It is intended for CLIs, scripts, command runners, and
|
|
8
|
+
* other process-oriented programs that need standard input and output through
|
|
9
|
+
* Effect services.
|
|
10
|
+
*
|
|
11
|
+
* The underlying streams are owned by the Node process. The layer keeps stdin
|
|
12
|
+
* open and does not end stdout or stderr when a stream finishes, which avoids
|
|
13
|
+
* closing global process handles that other code may still use. Be mindful that
|
|
14
|
+
* stdio may be a pipe, file, or TTY, so terminal-specific behavior such as raw
|
|
15
|
+
* mode, echo, colors, and cursor control should be handled with the terminal
|
|
16
|
+
* APIs instead of assuming an interactive console.
|
|
17
|
+
*
|
|
18
|
+
* @since 4.0.0
|
|
3
19
|
*/
|
|
4
20
|
import * as NodeStdio from "@effect/platform-node-shared/NodeStdio";
|
|
5
21
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
22
|
+
* Provides the `Stdio` service backed by the current process arguments,
|
|
23
|
+
* stdin, stdout, and stderr streams.
|
|
24
|
+
*
|
|
25
|
+
* @category layers
|
|
26
|
+
* @since 4.0.0
|
|
8
27
|
*/
|
|
9
28
|
export const layer = NodeStdio.layer;
|
|
10
29
|
//# sourceMappingURL=NodeStdio.js.map
|
package/dist/NodeStdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeStdio.js","names":["NodeStdio","layer"],"sources":["../src/NodeStdio.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"NodeStdio.js","names":["NodeStdio","layer"],"sources":["../src/NodeStdio.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;AAmBA,OAAO,KAAKA,SAAS,MAAM,wCAAwC;AAInE;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAAuBD,SAAS,CAACC,KAAK","ignoreList":[]}
|
package/dist/NodeStream.d.ts
CHANGED
package/dist/NodeStream.js
CHANGED
package/dist/NodeTerminal.d.ts
CHANGED
|
@@ -3,13 +3,19 @@ import type { Layer } from "effect/Layer";
|
|
|
3
3
|
import type { Scope } from "effect/Scope";
|
|
4
4
|
import type { Terminal, UserInput } from "effect/Terminal";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Creates a scoped `Terminal` service backed by process stdin/stdout, using the
|
|
7
|
+
* optional predicate to decide when key input should end the input stream.
|
|
8
|
+
*
|
|
7
9
|
* @category constructors
|
|
10
|
+
* @since 4.0.0
|
|
8
11
|
*/
|
|
9
12
|
export declare const make: (shouldQuit?: (input: UserInput) => boolean) => Effect<Terminal, never, Scope>;
|
|
10
13
|
/**
|
|
11
|
-
*
|
|
14
|
+
* Provides the default process-backed `Terminal` service, ending key input on
|
|
15
|
+
* the default quit keys.
|
|
16
|
+
*
|
|
12
17
|
* @category layers
|
|
18
|
+
* @since 4.0.0
|
|
13
19
|
*/
|
|
14
20
|
export declare const layer: Layer<Terminal>;
|
|
15
21
|
//# sourceMappingURL=NodeTerminal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeTerminal.d.ts","sourceRoot":"","sources":["../src/NodeTerminal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeTerminal.d.ts","sourceRoot":"","sources":["../src/NodeTerminal.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAqB,CAAA;AAErH;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAsB,CAAA"}
|
package/dist/NodeTerminal.js
CHANGED
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Provides the Node.js `Terminal` service for interactive command-line
|
|
3
|
+
* programs, prompts, and tools that need to read lines, react to key presses,
|
|
4
|
+
* write to stdout, or inspect terminal dimensions.
|
|
5
|
+
*
|
|
6
|
+
* The implementation is backed by the current process' stdin and stdout. When
|
|
7
|
+
* stdin is a TTY, key input temporarily enables raw mode for the scope of the
|
|
8
|
+
* service, so callers should acquire it with a scope or use the provided layer
|
|
9
|
+
* to ensure terminal state is restored. In non-TTY environments, terminal
|
|
10
|
+
* dimensions may be reported as zero and raw-mode key handling is unavailable.
|
|
11
|
+
*
|
|
12
|
+
* @since 4.0.0
|
|
3
13
|
*/
|
|
4
14
|
import * as NodeTerminal from "@effect/platform-node-shared/NodeTerminal";
|
|
5
15
|
/**
|
|
6
|
-
*
|
|
16
|
+
* Creates a scoped `Terminal` service backed by process stdin/stdout, using the
|
|
17
|
+
* optional predicate to decide when key input should end the input stream.
|
|
18
|
+
*
|
|
7
19
|
* @category constructors
|
|
20
|
+
* @since 4.0.0
|
|
8
21
|
*/
|
|
9
22
|
export const make = NodeTerminal.make;
|
|
10
23
|
/**
|
|
11
|
-
*
|
|
24
|
+
* Provides the default process-backed `Terminal` service, ending key input on
|
|
25
|
+
* the default quit keys.
|
|
26
|
+
*
|
|
12
27
|
* @category layers
|
|
28
|
+
* @since 4.0.0
|
|
13
29
|
*/
|
|
14
30
|
export const layer = NodeTerminal.layer;
|
|
15
31
|
//# sourceMappingURL=NodeTerminal.js.map
|
package/dist/NodeTerminal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeTerminal.js","names":["NodeTerminal","make","layer"],"sources":["../src/NodeTerminal.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"NodeTerminal.js","names":["NodeTerminal","make","layer"],"sources":["../src/NodeTerminal.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;AAaA,OAAO,KAAKA,YAAY,MAAM,2CAA2C;AAMzE;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAAmFD,YAAY,CAACC,IAAI;AAErH;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAAoBF,YAAY,CAACE,KAAK","ignoreList":[]}
|
package/dist/NodeWorker.d.ts
CHANGED
|
@@ -3,13 +3,20 @@ import * as Worker from "effect/unstable/workers/Worker";
|
|
|
3
3
|
import type * as ChildProcess from "node:child_process";
|
|
4
4
|
import type * as WorkerThreads from "node:worker_threads";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Provides the Node `WorkerPlatform` for `worker_threads` workers and child
|
|
7
|
+
* process workers, wiring messages, errors, and exits into Effect workers and
|
|
8
|
+
* terminating the worker if graceful shutdown times out.
|
|
9
|
+
*
|
|
7
10
|
* @category layers
|
|
11
|
+
* @since 4.0.0
|
|
8
12
|
*/
|
|
9
13
|
export declare const layerPlatform: Layer.Layer<Worker.WorkerPlatform>;
|
|
10
14
|
/**
|
|
11
|
-
*
|
|
15
|
+
* Provides the Node `WorkerPlatform` together with a `Worker.Spawner` created
|
|
16
|
+
* from the supplied worker or child-process spawning function.
|
|
17
|
+
*
|
|
12
18
|
* @category layers
|
|
19
|
+
* @since 4.0.0
|
|
13
20
|
*/
|
|
14
21
|
export declare const layer: (spawn: (id: number) => WorkerThreads.Worker | ChildProcess.ChildProcess) => Layer.Layer<Worker.WorkerPlatform | Worker.Spawner>;
|
|
15
22
|
//# sourceMappingURL=NodeWorker.d.ts.map
|
package/dist/NodeWorker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeWorker.d.ts","sourceRoot":"","sources":["../src/NodeWorker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodeWorker.d.ts","sourceRoot":"","sources":["../src/NodeWorker.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAA;AAExD,OAAO,KAAK,KAAK,YAAY,MAAM,oBAAoB,CAAA;AACvD,OAAO,KAAK,KAAK,aAAa,MAAM,qBAAqB,CAAA;AAEzD;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CA2E5D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAChB,OAAO,CAAC,EAAE,EAAE,MAAM,KAAK,aAAa,CAAC,MAAM,GAAG,YAAY,CAAC,YAAY,KACtE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,OAAO,CAIlD,CAAA"}
|