@effect/platform-node 4.0.0-beta.65 → 4.0.0-beta.67
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 +44 -4
- package/dist/NodeClusterHttp.d.ts.map +1 -1
- package/dist/NodeClusterHttp.js +10 -3
- package/dist/NodeClusterHttp.js.map +1 -1
- package/dist/NodeClusterSocket.d.ts +46 -6
- package/dist/NodeClusterSocket.d.ts.map +1 -1
- package/dist/NodeClusterSocket.js +46 -6
- package/dist/NodeClusterSocket.js.map +1 -1
- package/dist/NodeFileSystem.d.ts +3 -1
- package/dist/NodeFileSystem.d.ts.map +1 -1
- package/dist/NodeFileSystem.js +21 -2
- package/dist/NodeFileSystem.js.map +1 -1
- package/dist/NodeHttpClient.d.ts +91 -19
- package/dist/NodeHttpClient.d.ts.map +1 -1
- package/dist/NodeHttpClient.js +91 -19
- package/dist/NodeHttpClient.js.map +1 -1
- package/dist/NodeHttpIncomingMessage.d.ts +21 -3
- package/dist/NodeHttpIncomingMessage.d.ts.map +1 -1
- package/dist/NodeHttpIncomingMessage.js +22 -4
- package/dist/NodeHttpIncomingMessage.js.map +1 -1
- package/dist/NodeHttpPlatform.d.ts +8 -2
- package/dist/NodeHttpPlatform.d.ts.map +1 -1
- package/dist/NodeHttpPlatform.js +30 -3
- package/dist/NodeHttpPlatform.js.map +1 -1
- package/dist/NodeHttpServer.d.ts +35 -8
- package/dist/NodeHttpServer.d.ts.map +1 -1
- package/dist/NodeHttpServer.js +66 -10
- 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 +31 -4
- package/dist/NodeMultipart.d.ts.map +1 -1
- package/dist/NodeMultipart.js +31 -4
- package/dist/NodeMultipart.js.map +1 -1
- package/dist/NodePath.d.ts +12 -3
- package/dist/NodePath.d.ts.map +1 -1
- package/dist/NodePath.js +27 -4
- package/dist/NodePath.js.map +1 -1
- package/dist/NodeRedis.d.ts +33 -4
- package/dist/NodeRedis.d.ts.map +1 -1
- package/dist/NodeRedis.js +34 -5
- package/dist/NodeRedis.js.map +1 -1
- package/dist/NodeRuntime.d.ts +3 -3
- package/dist/NodeRuntime.d.ts.map +1 -1
- package/dist/NodeRuntime.js +16 -2
- package/dist/NodeRuntime.js.map +1 -1
- package/dist/NodeServices.d.ts +26 -3
- package/dist/NodeServices.d.ts.map +1 -1
- package/dist/NodeServices.js +4 -1
- 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 +14 -4
- package/dist/NodeSocket.d.ts.map +1 -1
- package/dist/NodeSocket.js +32 -5
- 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 +4 -1
- package/dist/NodeStdio.d.ts.map +1 -1
- package/dist/NodeStdio.js +21 -2
- 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 +26 -4
- 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 +25 -25
- package/dist/index.js +25 -25
- package/package.json +6 -6
- package/src/Mime.ts +3 -3
- package/src/NodeChildProcessSpawner.ts +1 -1
- package/src/NodeClusterHttp.ts +44 -4
- package/src/NodeClusterSocket.ts +46 -6
- package/src/NodeFileSystem.ts +21 -2
- package/src/NodeHttpClient.ts +91 -19
- package/src/NodeHttpIncomingMessage.ts +22 -4
- package/src/NodeHttpPlatform.ts +30 -3
- package/src/NodeHttpServer.ts +66 -10
- package/src/NodeHttpServerRequest.ts +29 -3
- package/src/NodeMultipart.ts +31 -4
- package/src/NodePath.ts +27 -4
- package/src/NodeRedis.ts +34 -5
- package/src/NodeRuntime.ts +18 -4
- package/src/NodeServices.ts +26 -3
- package/src/NodeSink.ts +2 -2
- package/src/NodeSocket.ts +32 -5
- package/src/NodeSocketServer.ts +2 -2
- package/src/NodeStdio.ts +21 -2
- package/src/NodeStream.ts +2 -2
- package/src/NodeTerminal.ts +19 -3
- package/src/NodeWorker.ts +31 -6
- package/src/NodeWorkerRunner.ts +26 -4
- package/src/Undici.ts +3 -3
- package/src/index.ts +25 -25
package/dist/NodePath.d.ts
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
import type * as Layer from "effect/Layer";
|
|
2
2
|
import type { Path } from "effect/Path";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Provides the default Node `Path` service using the platform's `node:path`
|
|
5
|
+
* implementation.
|
|
6
|
+
*
|
|
5
7
|
* @category layer
|
|
8
|
+
* @since 4.0.0
|
|
6
9
|
*/
|
|
7
10
|
export declare const layer: Layer.Layer<Path>;
|
|
8
11
|
/**
|
|
9
|
-
*
|
|
12
|
+
* Provides the `Path` service using Node's POSIX path implementation,
|
|
13
|
+
* regardless of the host platform.
|
|
14
|
+
*
|
|
10
15
|
* @category layer
|
|
16
|
+
* @since 4.0.0
|
|
11
17
|
*/
|
|
12
18
|
export declare const layerPosix: Layer.Layer<Path>;
|
|
13
19
|
/**
|
|
14
|
-
*
|
|
20
|
+
* Provides the `Path` service using Node's Windows path implementation,
|
|
21
|
+
* regardless of the host platform.
|
|
22
|
+
*
|
|
15
23
|
* @category layer
|
|
24
|
+
* @since 4.0.0
|
|
16
25
|
*/
|
|
17
26
|
export declare const layerWin32: Layer.Layer<Path>;
|
|
18
27
|
//# sourceMappingURL=NodePath.d.ts.map
|
package/dist/NodePath.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodePath.d.ts","sourceRoot":"","sources":["../src/NodePath.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NodePath.d.ts","sourceRoot":"","sources":["../src/NodePath.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAA;AAC1C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAkB,CAAA;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAA;AAEhE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAuB,CAAA"}
|
package/dist/NodePath.js
CHANGED
|
@@ -1,20 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js layers for Effect's `Path` service.
|
|
3
|
+
*
|
|
4
|
+
* Use this module when an Effect program running on Node needs path operations
|
|
5
|
+
* from the `Path` service, such as joining and normalizing filesystem
|
|
6
|
+
* locations, resolving configuration or static asset paths, working with CLI
|
|
7
|
+
* path arguments, or converting between file paths and `file:` URLs.
|
|
8
|
+
*
|
|
9
|
+
* `layer` follows the host platform's `node:path` semantics. Use `layerPosix`
|
|
10
|
+
* or `layerWin32` when code needs stable POSIX or Windows behavior regardless
|
|
11
|
+
* of the operating system. These layers provide only path manipulation; they do
|
|
12
|
+
* not read the filesystem or validate that paths exist. `NodeServices.layer`
|
|
13
|
+
* already includes the default Node path layer, so provide this module directly
|
|
14
|
+
* when you want the narrower service or one of the platform-specific variants.
|
|
15
|
+
*
|
|
16
|
+
* @since 4.0.0
|
|
3
17
|
*/
|
|
4
18
|
import * as NodePath from "@effect/platform-node-shared/NodePath";
|
|
5
19
|
/**
|
|
6
|
-
*
|
|
20
|
+
* Provides the default Node `Path` service using the platform's `node:path`
|
|
21
|
+
* implementation.
|
|
22
|
+
*
|
|
7
23
|
* @category layer
|
|
24
|
+
* @since 4.0.0
|
|
8
25
|
*/
|
|
9
26
|
export const layer = NodePath.layer;
|
|
10
27
|
/**
|
|
11
|
-
*
|
|
28
|
+
* Provides the `Path` service using Node's POSIX path implementation,
|
|
29
|
+
* regardless of the host platform.
|
|
30
|
+
*
|
|
12
31
|
* @category layer
|
|
32
|
+
* @since 4.0.0
|
|
13
33
|
*/
|
|
14
34
|
export const layerPosix = NodePath.layerPosix;
|
|
15
35
|
/**
|
|
16
|
-
*
|
|
36
|
+
* Provides the `Path` service using Node's Windows path implementation,
|
|
37
|
+
* regardless of the host platform.
|
|
38
|
+
*
|
|
17
39
|
* @category layer
|
|
40
|
+
* @since 4.0.0
|
|
18
41
|
*/
|
|
19
42
|
export const layerWin32 = NodePath.layerWin32;
|
|
20
43
|
//# sourceMappingURL=NodePath.js.map
|
package/dist/NodePath.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodePath.js","names":["NodePath","layer","layerPosix","layerWin32"],"sources":["../src/NodePath.ts"],"sourcesContent":[null],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"NodePath.js","names":["NodePath","layer","layerPosix","layerWin32"],"sources":["../src/NodePath.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;AAiBA,OAAO,KAAKA,QAAQ,MAAM,uCAAuC;AAIjE;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAAsBD,QAAQ,CAACC,KAAK;AAEtD;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAAsBF,QAAQ,CAACE,UAAU;AAEhE;;;;;;;AAOA,OAAO,MAAMC,UAAU,GAAsBH,QAAQ,CAACG,UAAU","ignoreList":[]}
|
package/dist/NodeRedis.d.ts
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js Redis integration backed by `ioredis`.
|
|
3
|
+
*
|
|
4
|
+
* This module provides scoped layers that create an `ioredis` client and expose
|
|
5
|
+
* both the low-level `Redis` service used by Effect persistence modules and the
|
|
6
|
+
* `NodeRedis` service for direct access to the underlying client. It is useful
|
|
7
|
+
* for Node applications that want Redis-backed persistence, persisted queues,
|
|
8
|
+
* distributed rate limiting, or custom Redis commands alongside the Effect
|
|
9
|
+
* services that build on Redis.
|
|
10
|
+
*
|
|
11
|
+
* The client is acquired when the layer is built and closed with `quit` when
|
|
12
|
+
* the layer scope ends, so install the layer at the lifetime you want for the
|
|
13
|
+
* connection and pass `ioredis` options, or `layerConfig`, for connection,
|
|
14
|
+
* TLS, database, retry, and reconnect settings. Persistence and rate limiter
|
|
15
|
+
* stores build their own keys and Lua scripts on top of this service; choose
|
|
16
|
+
* stable prefixes and store ids to avoid collisions, account for persisted
|
|
17
|
+
* values that may fail to decode after schema changes, and avoid unbounded
|
|
18
|
+
* high-cardinality rate-limit keys unless you have a cleanup or bounding
|
|
19
|
+
* strategy.
|
|
20
|
+
*
|
|
21
|
+
* @since 4.0.0
|
|
3
22
|
*/
|
|
4
23
|
import * as Config from "effect/Config";
|
|
5
24
|
import * as Context from "effect/Context";
|
|
@@ -12,19 +31,29 @@ declare const NodeRedis_base: Context.ServiceClass<NodeRedis, "@effect/platform-
|
|
|
12
31
|
readonly use: <A>(f: (client: IoRedis.Redis) => Promise<A>) => Effect.Effect<A, Redis.RedisError>;
|
|
13
32
|
}>;
|
|
14
33
|
/**
|
|
15
|
-
*
|
|
34
|
+
* Service tag for the Node Redis integration, exposing the underlying
|
|
35
|
+
* `ioredis` client and a `use` helper that maps client failures to
|
|
36
|
+
* `RedisError`.
|
|
37
|
+
*
|
|
16
38
|
* @category Service
|
|
39
|
+
* @since 4.0.0
|
|
17
40
|
*/
|
|
18
41
|
export declare class NodeRedis extends NodeRedis_base {
|
|
19
42
|
}
|
|
20
43
|
/**
|
|
21
|
-
*
|
|
44
|
+
* Provides `Redis` and `NodeRedis` services backed by an `ioredis` client
|
|
45
|
+
* created with the supplied options and closed when the layer scope ends.
|
|
46
|
+
*
|
|
22
47
|
* @category Layers
|
|
48
|
+
* @since 4.0.0
|
|
23
49
|
*/
|
|
24
50
|
export declare const layer: (options?: IoRedis.RedisOptions | undefined) => Layer.Layer<Redis.Redis | NodeRedis>;
|
|
25
51
|
/**
|
|
26
|
-
*
|
|
52
|
+
* Provides `Redis` and `NodeRedis` services from `Config`-backed ioredis
|
|
53
|
+
* options, closing the client when the layer scope ends.
|
|
54
|
+
*
|
|
27
55
|
* @category Layers
|
|
56
|
+
* @since 4.0.0
|
|
28
57
|
*/
|
|
29
58
|
export declare const layerConfig: (options: Config.Wrap<IoRedis.RedisOptions>) => Layer.Layer<Redis.Redis | NodeRedis, Config.ConfigError>;
|
|
30
59
|
export {};
|
package/dist/NodeRedis.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeRedis.d.ts","sourceRoot":"","sources":["../src/NodeRedis.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"NodeRedis.d.ts","sourceRoot":"","sources":["../src/NodeRedis.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,KAAK,MAAM,mCAAmC,CAAA;AAC1D,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;;qBAWf,OAAO,CAAC,KAAK;kBAChB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;;AAVnG;;;;;;;GAOG;AACH,qBAAa,SAAU,SAAQ,cAGQ;CAAG;AAiC1C;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAChB,UAAU,OAAO,CAAC,YAAY,GAAG,SAAS,KACzC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,CAAuC,CAAA;AAE7E;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,EAAE,CACxB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,KACvC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,SAAS,EAAE,MAAM,CAAC,WAAW,CAOzD,CAAA"}
|
package/dist/NodeRedis.js
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Node.js Redis integration backed by `ioredis`.
|
|
3
|
+
*
|
|
4
|
+
* This module provides scoped layers that create an `ioredis` client and expose
|
|
5
|
+
* both the low-level `Redis` service used by Effect persistence modules and the
|
|
6
|
+
* `NodeRedis` service for direct access to the underlying client. It is useful
|
|
7
|
+
* for Node applications that want Redis-backed persistence, persisted queues,
|
|
8
|
+
* distributed rate limiting, or custom Redis commands alongside the Effect
|
|
9
|
+
* services that build on Redis.
|
|
10
|
+
*
|
|
11
|
+
* The client is acquired when the layer is built and closed with `quit` when
|
|
12
|
+
* the layer scope ends, so install the layer at the lifetime you want for the
|
|
13
|
+
* connection and pass `ioredis` options, or `layerConfig`, for connection,
|
|
14
|
+
* TLS, database, retry, and reconnect settings. Persistence and rate limiter
|
|
15
|
+
* stores build their own keys and Lua scripts on top of this service; choose
|
|
16
|
+
* stable prefixes and store ids to avoid collisions, account for persisted
|
|
17
|
+
* values that may fail to decode after schema changes, and avoid unbounded
|
|
18
|
+
* high-cardinality rate-limit keys unless you have a cleanup or bounding
|
|
19
|
+
* strategy.
|
|
20
|
+
*
|
|
21
|
+
* @since 4.0.0
|
|
3
22
|
*/
|
|
4
23
|
import * as Config from "effect/Config";
|
|
5
24
|
import * as Context from "effect/Context";
|
|
@@ -10,8 +29,12 @@ import * as Scope from "effect/Scope";
|
|
|
10
29
|
import * as Redis from "effect/unstable/persistence/Redis";
|
|
11
30
|
import * as IoRedis from "ioredis";
|
|
12
31
|
/**
|
|
13
|
-
*
|
|
32
|
+
* Service tag for the Node Redis integration, exposing the underlying
|
|
33
|
+
* `ioredis` client and a `use` helper that maps client failures to
|
|
34
|
+
* `RedisError`.
|
|
35
|
+
*
|
|
14
36
|
* @category Service
|
|
37
|
+
* @since 4.0.0
|
|
15
38
|
*/
|
|
16
39
|
export class NodeRedis extends /*#__PURE__*/Context.Service()("@effect/platform-node/NodeRedis") {}
|
|
17
40
|
const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
|
|
@@ -39,13 +62,19 @@ const make = /*#__PURE__*/Effect.fnUntraced(function* (options) {
|
|
|
39
62
|
return Context.make(NodeRedis, nodeRedis).pipe(Context.add(Redis.Redis, redis));
|
|
40
63
|
});
|
|
41
64
|
/**
|
|
42
|
-
*
|
|
65
|
+
* Provides `Redis` and `NodeRedis` services backed by an `ioredis` client
|
|
66
|
+
* created with the supplied options and closed when the layer scope ends.
|
|
67
|
+
*
|
|
43
68
|
* @category Layers
|
|
69
|
+
* @since 4.0.0
|
|
44
70
|
*/
|
|
45
71
|
export const layer = options => Layer.effectContext(make(options));
|
|
46
72
|
/**
|
|
47
|
-
*
|
|
73
|
+
* Provides `Redis` and `NodeRedis` services from `Config`-backed ioredis
|
|
74
|
+
* options, closing the client when the layer scope ends.
|
|
75
|
+
*
|
|
48
76
|
* @category Layers
|
|
77
|
+
* @since 4.0.0
|
|
49
78
|
*/
|
|
50
|
-
export const layerConfig = options => Layer.effectContext(Config.unwrap(options).
|
|
79
|
+
export const layerConfig = options => Layer.effectContext(Config.unwrap(options).pipe(Effect.flatMap(make)));
|
|
51
80
|
//# sourceMappingURL=NodeRedis.js.map
|
package/dist/NodeRedis.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NodeRedis.js","names":["Config","Context","Effect","Fn","Layer","Scope","Redis","IoRedis","NodeRedis","Service","make","fnUntraced","options","scope","addFinalizer","promise","client","quit","use","f","tryPromise","try","catch","cause","RedisError","redis","send","command","args","call","nodeRedis","identity","pipe","add","layer","effectContext","layerConfig","unwrap","
|
|
1
|
+
{"version":3,"file":"NodeRedis.js","names":["Config","Context","Effect","Fn","Layer","Scope","Redis","IoRedis","NodeRedis","Service","make","fnUntraced","options","scope","addFinalizer","promise","client","quit","use","f","tryPromise","try","catch","cause","RedisError","redis","send","command","args","call","nodeRedis","identity","pipe","add","layer","effectContext","layerConfig","unwrap","flatMap"],"sources":["../src/NodeRedis.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBA,OAAO,KAAKA,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,EAAE,MAAM,iBAAiB;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,mCAAmC;AAC1D,OAAO,KAAKC,OAAO,MAAM,SAAS;AAElC;;;;;;;;AAQA,OAAM,MAAOC,SAAU,sBAAQP,OAAO,CAACQ,OAAO,EAG1C,CAAC,iCAAiC,CAAC;AAEvC,MAAMC,IAAI,gBAAGR,MAAM,CAACS,UAAU,CAAC,WAC7BC,OAA8B;EAE9B,MAAMC,KAAK,GAAG,OAAOX,MAAM,CAACW,KAAK;EACjC,OAAOR,KAAK,CAACS,YAAY,CAACD,KAAK,EAAEX,MAAM,CAACa,OAAO,CAAC,MAAMC,MAAM,CAACC,IAAI,EAAE,CAAC,CAAC;EACrE,MAAMD,MAAM,GAAG,IAAIT,OAAO,CAACD,KAAK,CAACM,OAAO,IAAI,EAAE,CAAC;EAE/C,MAAMM,GAAG,GAAOC,CAAwC,IACtDjB,MAAM,CAACkB,UAAU,CAAC;IAChBC,GAAG,EAAEA,CAAA,KAAMF,CAAC,CAACH,MAAM,CAAC;IACpBM,KAAK,EAAGC,KAAK,IAAK,IAAIjB,KAAK,CAACkB,UAAU,CAAC;MAAED;IAAK,CAAE;GACjD,CAAC;EAEJ,MAAME,KAAK,GAAG,OAAOnB,KAAK,CAACI,IAAI,CAAC;IAC9BgB,IAAI,EAAEA,CAAcC,OAAe,EAAE,GAAGC,IAA2B,KACjE1B,MAAM,CAACkB,UAAU,CAAC;MAChBC,GAAG,EAAEA,CAAA,KAAML,MAAM,CAACa,IAAI,CAACF,OAAO,EAAE,GAAGC,IAAI,CAAe;MACtDN,KAAK,EAAGC,KAAK,IAAK,IAAIjB,KAAK,CAACkB,UAAU,CAAC;QAAED;MAAK,CAAE;KACjD;GACJ,CAAC;EAEF,MAAMO,SAAS,GAAG3B,EAAE,CAAC4B,QAAQ,CAAuB;IAClDf,MAAM;IACNE;GACD,CAAC;EAEF,OAAOjB,OAAO,CAACS,IAAI,CAACF,SAAS,EAAEsB,SAAS,CAAC,CAACE,IAAI,CAC5C/B,OAAO,CAACgC,GAAG,CAAC3B,KAAK,CAACA,KAAK,EAAEmB,KAAK,CAAC,CAChC;AACH,CAAC,CAAC;AAEF;;;;;;;AAOA,OAAO,MAAMS,KAAK,GAChBtB,OAA0C,IACDR,KAAK,CAAC+B,aAAa,CAACzB,IAAI,CAACE,OAAO,CAAC,CAAC;AAE7E;;;;;;;AAOA,OAAO,MAAMwB,WAAW,GAGtBxB,OAA0C,IAE1CR,KAAK,CAAC+B,aAAa,CACjBnC,MAAM,CAACqC,MAAM,CAACzB,OAAO,CAAC,CAACoB,IAAI,CACzB9B,MAAM,CAACoC,OAAO,CAAC5B,IAAI,CAAC,CACrB,CACF","ignoreList":[]}
|
package/dist/NodeRuntime.d.ts
CHANGED
|
@@ -23,8 +23,8 @@ import type * as Runtime from "effect/Runtime";
|
|
|
23
23
|
* when you need structured error handling, log management, interrupt support,
|
|
24
24
|
* or advanced teardown capabilities.
|
|
25
25
|
*
|
|
26
|
-
* @since 1.0.0
|
|
27
26
|
* @category Run main
|
|
27
|
+
* @since 4.0.0
|
|
28
28
|
*/
|
|
29
29
|
export declare const runMain: {
|
|
30
30
|
/**
|
|
@@ -50,8 +50,8 @@ export declare const runMain: {
|
|
|
50
50
|
* when you need structured error handling, log management, interrupt support,
|
|
51
51
|
* or advanced teardown capabilities.
|
|
52
52
|
*
|
|
53
|
-
* @since 1.0.0
|
|
54
53
|
* @category Run main
|
|
54
|
+
* @since 4.0.0
|
|
55
55
|
*/
|
|
56
56
|
(options?: {
|
|
57
57
|
readonly disableErrorReporting?: boolean | undefined;
|
|
@@ -80,8 +80,8 @@ export declare const runMain: {
|
|
|
80
80
|
* when you need structured error handling, log management, interrupt support,
|
|
81
81
|
* or advanced teardown capabilities.
|
|
82
82
|
*
|
|
83
|
-
* @since 1.0.0
|
|
84
83
|
* @category Run main
|
|
84
|
+
* @since 4.0.0
|
|
85
85
|
*/
|
|
86
86
|
<E, A>(effect: Effect<A, E>, options?: {
|
|
87
87
|
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;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,OAAO,EAAE;IACpB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;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;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;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,5 +1,19 @@
|
|
|
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
|
/**
|
|
@@ -25,8 +39,8 @@ import * as NodeRuntime from "@effect/platform-node-shared/NodeRuntime";
|
|
|
25
39
|
* when you need structured error handling, log management, interrupt support,
|
|
26
40
|
* or advanced teardown capabilities.
|
|
27
41
|
*
|
|
28
|
-
* @since 1.0.0
|
|
29
42
|
* @category Run main
|
|
43
|
+
* @since 4.0.0
|
|
30
44
|
*/
|
|
31
45
|
export const runMain = NodeRuntime.runMain;
|
|
32
46
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,OAAO,MAAMC,OAAO,GAkEhBD,WAAW,CAACC,OAAO","ignoreList":[]}
|
package/dist/NodeServices.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
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
|
*/
|
|
4
21
|
import type { FileSystem } from "effect/FileSystem";
|
|
5
22
|
import * as Layer from "effect/Layer";
|
|
@@ -8,13 +25,19 @@ import type { Stdio } from "effect/Stdio";
|
|
|
8
25
|
import type { Terminal } from "effect/Terminal";
|
|
9
26
|
import type { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
|
|
10
27
|
/**
|
|
11
|
-
*
|
|
28
|
+
* The union of core services provided by the Node platform layer, including
|
|
29
|
+
* child process spawning, filesystem, path, stdio, and terminal services.
|
|
30
|
+
*
|
|
12
31
|
* @category models
|
|
32
|
+
* @since 4.0.0
|
|
13
33
|
*/
|
|
14
34
|
export type NodeServices = ChildProcessSpawner | FileSystem | Path | Stdio | Terminal;
|
|
15
35
|
/**
|
|
16
|
-
*
|
|
36
|
+
* Provides the default Node implementations for child process spawning,
|
|
37
|
+
* filesystem, path, stdio, and terminal services.
|
|
38
|
+
*
|
|
17
39
|
* @category layer
|
|
40
|
+
* @since 4.0.0
|
|
18
41
|
*/
|
|
19
42
|
export declare const layer: Layer.Layer<NodeServices>;
|
|
20
43
|
//# 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,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;AAOtF;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,UAAU,GAAG,IAAI,GAAG,KAAK,GAAG,QAAQ,CAAA;AAErF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAQ3C,CAAA"}
|
package/dist/NodeServices.js
CHANGED
|
@@ -5,8 +5,11 @@ import * as NodePath from "./NodePath.js";
|
|
|
5
5
|
import * as NodeStdio from "./NodeStdio.js";
|
|
6
6
|
import * as NodeTerminal from "./NodeTerminal.js";
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Provides the default Node implementations for child process spawning,
|
|
9
|
+
* filesystem, path, stdio, and terminal services.
|
|
10
|
+
*
|
|
9
11
|
* @category layer
|
|
12
|
+
* @since 4.0.0
|
|
10
13
|
*/
|
|
11
14
|
export const layer = /*#__PURE__*/Layer.provideMerge(NodeChildProcessSpawner.layer, /*#__PURE__*/Layer.mergeAll(NodeFileSystem.layer, NodePath.layer, NodeStdio.layer, NodeTerminal.layer));
|
|
12
15
|
//# 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","NodeFileSystem","NodePath","NodeStdio","NodeTerminal","layer","provideMerge","mergeAll"],"sources":["../src/NodeServices.ts"],"sourcesContent":[null],"mappings":"AAqBA,OAAO,KAAKA,KAAK,MAAM,cAAc;AAKrC,OAAO,KAAKC,uBAAuB,MAAM,8BAA8B;AACvE,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,gBAA8BN,KAAK,CAACO,YAAY,CAChEN,uBAAuB,CAACK,KAAK,eAC7BN,KAAK,CAACQ,QAAQ,CACZN,cAAc,CAACI,KAAK,EACpBH,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,22 +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
|
|
17
23
|
*/
|
|
18
24
|
export declare const layerWebSocketConstructorWS: Layer.Layer<Socket.WebSocketConstructor>;
|
|
19
25
|
/**
|
|
20
|
-
*
|
|
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
|
+
*
|
|
21
30
|
* @category layers
|
|
31
|
+
* @since 4.0.0
|
|
22
32
|
*/
|
|
23
33
|
export declare const layerWebSocket: (url: string | Effect.Effect<string>, options?: {
|
|
24
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,13 +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
|
|
25
48
|
*/
|
|
26
49
|
export const layerWebSocketConstructorWS = /*#__PURE__*/Layer.succeed(Socket.WebSocketConstructor)((url, protocols) => new WS.WebSocket(url, protocols));
|
|
27
50
|
/**
|
|
28
|
-
*
|
|
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
|
+
*
|
|
29
55
|
* @category layers
|
|
56
|
+
* @since 4.0.0
|
|
30
57
|
*/
|
|
31
58
|
export const layerWebSocket = /*#__PURE__*/flow(Socket.makeWebSocket, /*#__PURE__*/Layer.effect(Socket.Socket), /*#__PURE__*/Layer.provide(layerWebSocketConstructor));
|
|
32
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","layerWebSocketConstructorWS","succeed","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
|
-
*
|
|
4
|
+
* Provides the `Stdio` service backed by the current process arguments,
|
|
5
|
+
* stdin, stdout, and stderr streams.
|
|
6
|
+
*
|
|
5
7
|
* @category layer
|
|
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
|
-
*
|
|
22
|
+
* Provides the `Stdio` service backed by the current process arguments,
|
|
23
|
+
* stdin, stdout, and stderr streams.
|
|
24
|
+
*
|
|
7
25
|
* @category layer
|
|
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