@effect/platform-node-shared 4.0.0-beta.67 → 4.0.0-beta.68

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.
@@ -12,14 +12,14 @@ import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner
12
12
  /**
13
13
  * Layer providing the `NodeChildProcessSpawner` implementation.
14
14
  *
15
- * @category Layers
15
+ * @category layers
16
16
  * @since 4.0.0
17
17
  */
18
18
  export declare const layer: Layer.Layer<ChildProcessSpawner, never, FileSystem.FileSystem | Path.Path>;
19
19
  /**
20
20
  * Result of flattening a pipeline of commands.
21
21
  *
22
- * @category Models
22
+ * @category models
23
23
  * @since 4.0.0
24
24
  */
25
25
  export interface FlattenedPipeline {
@@ -30,7 +30,7 @@ export interface FlattenedPipeline {
30
30
  * Flattens a `Command` into an array of `StandardCommand`s along with pipe
31
31
  * options for each connection.
32
32
  *
33
- * @category Utilities
33
+ * @category utils
34
34
  * @since 4.0.0
35
35
  */
36
36
  export declare const flattenCommand: (command: ChildProcess.Command) => FlattenedPipeline;
@@ -492,7 +492,7 @@ const make = /*#__PURE__*/Effect.gen(function* () {
492
492
  /**
493
493
  * Layer providing the `NodeChildProcessSpawner` implementation.
494
494
  *
495
- * @category Layers
495
+ * @category layers
496
496
  * @since 4.0.0
497
497
  */
498
498
  export const layer = /*#__PURE__*/Layer.effect(ChildProcessSpawner, make);
@@ -500,7 +500,7 @@ export const layer = /*#__PURE__*/Layer.effect(ChildProcessSpawner, make);
500
500
  * Flattens a `Command` into an array of `StandardCommand`s along with pipe
501
501
  * options for each connection.
502
502
  *
503
- * @category Utilities
503
+ * @category utils
504
504
  * @since 4.0.0
505
505
  */
506
506
  export const flattenCommand = command => {
@@ -7,7 +7,7 @@ import type * as SocketServer from "effect/unstable/socket/SocketServer";
7
7
  * Provides the cluster `RpcClientProtocol` by opening TCP sockets to runner
8
8
  * addresses and using the current RPC serialization service.
9
9
  *
10
- * @category Layers
10
+ * @category layers
11
11
  * @since 4.0.0
12
12
  */
13
13
  export declare const layerClientProtocol: Layer.Layer<Runners.RpcClientProtocol, never, RpcSerialization.RpcSerialization>;
@@ -15,7 +15,7 @@ export declare const layerClientProtocol: Layer.Layer<Runners.RpcClientProtocol,
15
15
  * Provides the socket server used by cluster runners, listening on
16
16
  * `ShardingConfig.runnerListenAddress` or `runnerAddress`.
17
17
  *
18
- * @category Layers
18
+ * @category layers
19
19
  * @since 4.0.0
20
20
  */
21
21
  export declare const layerSocketServer: Layer.Layer<SocketServer.SocketServer, SocketServer.SocketServerError, ShardingConfig.ShardingConfig>;
@@ -33,7 +33,7 @@ import * as NodeSocketServer from "./NodeSocketServer.js";
33
33
  * Provides the cluster `RpcClientProtocol` by opening TCP sockets to runner
34
34
  * addresses and using the current RPC serialization service.
35
35
  *
36
- * @category Layers
36
+ * @category layers
37
37
  * @since 4.0.0
38
38
  */
39
39
  export const layerClientProtocol = /*#__PURE__*/Layer.effect(Runners.RpcClientProtocol)(/*#__PURE__*/Effect.gen(function* () {
@@ -52,7 +52,7 @@ export const layerClientProtocol = /*#__PURE__*/Layer.effect(Runners.RpcClientPr
52
52
  * Provides the socket server used by cluster runners, listening on
53
53
  * `ShardingConfig.runnerListenAddress` or `runnerAddress`.
54
54
  *
55
- * @category Layers
55
+ * @category layers
56
56
  * @since 4.0.0
57
57
  */
58
58
  export const layerSocketServer = /*#__PURE__*/Effect.gen(function* () {
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Node.js implementation of the Crypto service.
3
+ *
4
+ * @since 1.0.0
5
+ */
6
+ import * as EffectCrypto from "effect/Crypto";
7
+ import * as Layer from "effect/Layer";
8
+ /**
9
+ * The default Node.js Crypto service implementation.
10
+ *
11
+ * @category constructors
12
+ * @since 1.0.0
13
+ */
14
+ export declare const make: EffectCrypto.Crypto;
15
+ /**
16
+ * A layer that provides the Node.js Crypto service implementation.
17
+ *
18
+ * @category layers
19
+ * @since 1.0.0
20
+ */
21
+ export declare const layer: Layer.Layer<EffectCrypto.Crypto>;
22
+ //# sourceMappingURL=NodeCrypto.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeCrypto.d.ts","sourceRoot":"","sources":["../src/NodeCrypto.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,YAAY,MAAM,eAAe,CAAA;AAE7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AA8BrC;;;;;GAKG;AACH,eAAO,MAAM,IAAI,EAAE,YAAY,CAAC,MAG9B,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAA4C,CAAA"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Node.js implementation of the Crypto service.
3
+ *
4
+ * @since 1.0.0
5
+ */
6
+ import * as EffectCrypto from "effect/Crypto";
7
+ import * as Effect from "effect/Effect";
8
+ import * as Layer from "effect/Layer";
9
+ import * as PlatformError from "effect/PlatformError";
10
+ import * as NodeCrypto from "node:crypto";
11
+ const toHashAlgorithm = algorithm => {
12
+ switch (algorithm) {
13
+ case "SHA-1":
14
+ return "sha1";
15
+ case "SHA-256":
16
+ return "sha256";
17
+ case "SHA-384":
18
+ return "sha384";
19
+ case "SHA-512":
20
+ return "sha512";
21
+ }
22
+ };
23
+ const digest = (algorithm, data) => Effect.try({
24
+ try: () => Uint8Array.from(NodeCrypto.createHash(toHashAlgorithm(algorithm)).update(data).digest()),
25
+ catch: cause => PlatformError.systemError({
26
+ module: "Crypto",
27
+ method: "digest",
28
+ _tag: "Unknown",
29
+ description: "Could not compute digest",
30
+ cause
31
+ })
32
+ });
33
+ /**
34
+ * The default Node.js Crypto service implementation.
35
+ *
36
+ * @category constructors
37
+ * @since 1.0.0
38
+ */
39
+ export const make = /*#__PURE__*/EffectCrypto.make({
40
+ randomBytes: NodeCrypto.randomBytes,
41
+ digest
42
+ });
43
+ /**
44
+ * A layer that provides the Node.js Crypto service implementation.
45
+ *
46
+ * @category layers
47
+ * @since 1.0.0
48
+ */
49
+ export const layer = /*#__PURE__*/Layer.succeed(EffectCrypto.Crypto, make);
50
+ //# sourceMappingURL=NodeCrypto.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NodeCrypto.js","names":["EffectCrypto","Effect","Layer","PlatformError","NodeCrypto","toHashAlgorithm","algorithm","digest","data","try","Uint8Array","from","createHash","update","catch","cause","systemError","module","method","_tag","description","make","randomBytes","layer","succeed","Crypto"],"sources":["../src/NodeCrypto.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;AAKA,OAAO,KAAKA,YAAY,MAAM,eAAe;AAC7C,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,aAAa,MAAM,sBAAsB;AACrD,OAAO,KAAKC,UAAU,MAAM,aAAa;AAEzC,MAAMC,eAAe,GAAIC,SAAuC,IAAY;EAC1E,QAAQA,SAAS;IACf,KAAK,OAAO;MACV,OAAO,MAAM;IACf,KAAK,SAAS;MACZ,OAAO,QAAQ;IACjB,KAAK,SAAS;MACZ,OAAO,QAAQ;IACjB,KAAK,SAAS;MACZ,OAAO,QAAQ;EACnB;AACF,CAAC;AAED,MAAMC,MAAM,GAAkCA,CAACD,SAAS,EAAEE,IAAI,KAC5DP,MAAM,CAACQ,GAAG,CAAC;EACTA,GAAG,EAAEA,CAAA,KAAMC,UAAU,CAACC,IAAI,CAACP,UAAU,CAACQ,UAAU,CAACP,eAAe,CAACC,SAAS,CAAC,CAAC,CAACO,MAAM,CAACL,IAAI,CAAC,CAACD,MAAM,EAAE,CAAC;EACnGO,KAAK,EAAGC,KAAK,IACXZ,aAAa,CAACa,WAAW,CAAC;IACxBC,MAAM,EAAE,QAAQ;IAChBC,MAAM,EAAE,QAAQ;IAChBC,IAAI,EAAE,SAAS;IACfC,WAAW,EAAE,0BAA0B;IACvCL;GACD;CACJ,CAAC;AAEJ;;;;;;AAMA,OAAO,MAAMM,IAAI,gBAAwBrB,YAAY,CAACqB,IAAI,CAAC;EACzDC,WAAW,EAAElB,UAAU,CAACkB,WAAW;EACnCf;CACD,CAAC;AAEF;;;;;;AAMA,OAAO,MAAMgB,KAAK,gBAAqCrB,KAAK,CAACsB,OAAO,CAACxB,YAAY,CAACyB,MAAM,EAAEJ,IAAI,CAAC","ignoreList":[]}
@@ -4,7 +4,7 @@ import * as Layer from "effect/Layer";
4
4
  * Provides the `FileSystem` service backed by Node filesystem APIs, including
5
5
  * file operations, directory operations, links, metadata, and file watching.
6
6
  *
7
- * @category Layers
7
+ * @category layers
8
8
  * @since 4.0.0
9
9
  */
10
10
  export declare const layer: Layer.Layer<FileSystem.FileSystem>;
@@ -432,7 +432,7 @@ const makeFileSystem = /*#__PURE__*/Effect.map(/*#__PURE__*/Effect.serviceOption
432
432
  * Provides the `FileSystem` service backed by Node filesystem APIs, including
433
433
  * file operations, directory operations, links, metadata, and file watching.
434
434
  *
435
- * @category Layers
435
+ * @category layers
436
436
  * @since 4.0.0
437
437
  */
438
438
  export const layer = /*#__PURE__*/Layer.effect(FileSystem.FileSystem)(makeFileSystem);
@@ -4,7 +4,7 @@ import { Path } from "effect/Path";
4
4
  * Provides the `Path` service using Node's POSIX path implementation plus
5
5
  * file URL conversion helpers.
6
6
  *
7
- * @category Layers
7
+ * @category layers
8
8
  * @since 4.0.0
9
9
  */
10
10
  export declare const layerPosix: Layer.Layer<Path>;
@@ -12,7 +12,7 @@ export declare const layerPosix: Layer.Layer<Path>;
12
12
  * Provides the `Path` service using Node's Windows path implementation plus
13
13
  * file URL conversion helpers.
14
14
  *
15
- * @category Layers
15
+ * @category layers
16
16
  * @since 4.0.0
17
17
  */
18
18
  export declare const layerWin32: Layer.Layer<Path>;
@@ -20,7 +20,7 @@ export declare const layerWin32: Layer.Layer<Path>;
20
20
  * Provides the default `Path` service using the host platform's Node path
21
21
  * implementation plus file URL conversion helpers.
22
22
  *
23
- * @category Layers
23
+ * @category layers
24
24
  * @since 4.0.0
25
25
  */
26
26
  export declare const layer: Layer.Layer<Path>;
package/dist/NodePath.js CHANGED
@@ -41,7 +41,7 @@ const toFileUrl = path => Effect.try({
41
41
  * Provides the `Path` service using Node's POSIX path implementation plus
42
42
  * file URL conversion helpers.
43
43
  *
44
- * @category Layers
44
+ * @category layers
45
45
  * @since 4.0.0
46
46
  */
47
47
  export const layerPosix = /*#__PURE__*/Layer.succeed(Path)({
@@ -54,7 +54,7 @@ export const layerPosix = /*#__PURE__*/Layer.succeed(Path)({
54
54
  * Provides the `Path` service using Node's Windows path implementation plus
55
55
  * file URL conversion helpers.
56
56
  *
57
- * @category Layers
57
+ * @category layers
58
58
  * @since 4.0.0
59
59
  */
60
60
  export const layerWin32 = /*#__PURE__*/Layer.succeed(Path)({
@@ -67,7 +67,7 @@ export const layerWin32 = /*#__PURE__*/Layer.succeed(Path)({
67
67
  * Provides the default `Path` service using the host platform's Node path
68
68
  * implementation plus file URL conversion helpers.
69
69
  *
70
- * @category Layers
70
+ * @category layers
71
71
  * @since 4.0.0
72
72
  */
73
73
  export const layer = /*#__PURE__*/Layer.succeed(Path)({
@@ -25,7 +25,7 @@ import * as Runtime from "effect/Runtime";
25
25
  * `SIGINT` or `SIGTERM` and invoking the configured teardown to determine the
26
26
  * process exit code.
27
27
  *
28
- * @category Run main
28
+ * @category running
29
29
  * @since 4.0.0
30
30
  */
31
31
  export declare const runMain: {
@@ -34,7 +34,7 @@ export declare const runMain: {
34
34
  * `SIGINT` or `SIGTERM` and invoking the configured teardown to determine the
35
35
  * process exit code.
36
36
  *
37
- * @category Run main
37
+ * @category running
38
38
  * @since 4.0.0
39
39
  */
40
40
  (options?: {
@@ -46,7 +46,7 @@ export declare const runMain: {
46
46
  * `SIGINT` or `SIGTERM` and invoking the configured teardown to determine the
47
47
  * process exit code.
48
48
  *
49
- * @category Run main
49
+ * @category running
50
50
  * @since 4.0.0
51
51
  */
52
52
  <E, A>(effect: Effect<A, E>, options?: {
@@ -4,7 +4,7 @@ import * as Runtime from "effect/Runtime";
4
4
  * `SIGINT` or `SIGTERM` and invoking the configured teardown to determine the
5
5
  * process exit code.
6
6
  *
7
- * @category Run main
7
+ * @category running
8
8
  * @since 4.0.0
9
9
  */
10
10
  export const runMain = /*#__PURE__*/Runtime.makeRunMain(({
@@ -57,6 +57,7 @@ export declare const fromWritableChannel: <IE, E, A = Uint8Array | string>(optio
57
57
  * waiting for `drain` when needed, failing on writable errors, and ending the
58
58
  * writable on upstream completion unless disabled.
59
59
  *
60
+ * @category converting
60
61
  * @since 4.0.0
61
62
  */
62
63
  export declare const pullIntoWritable: <A, IE, E>(options: {
@@ -1 +1 @@
1
- {"version":3,"file":"NodeSink.d.ts","sourceRoot":"","sources":["../src/NodeSink.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAEzD,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AAEzC,OAAO,EAAY,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAA;AACnC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,CAAC,GAAG,UAAU,GAAG,MAAM,EACrD,SAAS;IACP,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,cAAc,CAAC,CAAA;IAC5D,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;CAC/C,KACA,IAAI,CAAC,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AO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,qBAAqB,CAAC,CAAC,CAAC,EAAE,EAAE,CAIhE,CAAA;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS;IAClD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;IAC/D,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,CAAC,CAAA;IACvC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;IACxC,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,GAAG,SAAS,CAAA;CAC/C,KAAG,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,EAAE,OAAO,CAkCjC,CAAA"}
package/dist/NodeSink.js CHANGED
@@ -34,6 +34,7 @@ export const fromWritableChannel = options => Channel.fromTransform(pull => {
34
34
  * waiting for `drain` when needed, failing on writable errors, and ending the
35
35
  * writable on upstream completion unless disabled.
36
36
  *
37
+ * @category converting
37
38
  * @since 4.0.0
38
39
  */
39
40
  export const pullIntoWritable = options => options.pull.pipe(Effect.flatMap(chunk => {
@@ -1 +1 @@
1
- {"version":3,"file":"NodeSink.js","names":["Cause","Channel","Effect","identity","Pull","Sink","fromWritable","options","fromChannel","mapDone","fromWritableChannel","_","fromTransform","pull","writable","evaluate","succeed","pullIntoWritable","pipe","flatMap","chunk","i","callback","loop","resume","length","success","write","encoding","once","void","forever","disableYield","raceFirst","onError","error","fail","sync","off","endOnDone","catchDone","closed","done","end"],"sources":["../src/NodeSink.ts"],"sourcesContent":[null],"mappings":"AAqBA,OAAO,KAAKA,KAAK,MAAM,cAA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AM,CAACtB,MAAM,CAAC4B,IAAI,CAAC;EACrB,CAAC,CAAC;AACJ,CAAC,CAAC,EACF5B,MAAM,CAAC6B,OAAO,CAAC;EAAEC,YAAY,EAAE;AAAI,CAAE,CAAC,EACtC9B,MAAM,CAAC+B,SAAS,CAAC/B,MAAM,CAACoB,QAAQ,CAAYE,MAAM,IAAI;EACpD,MAAMU,OAAO,GAAIC,KAAc,IAAKX,MAAM,CAACtB,MAAM,CAACkC,IAAI,CAAC7B,OAAO,CAAC2B,OAAO,CAACC,KAAK,CAAC,CAAC,CAAC;EAC/E5B,OAAO,CAACO,QAAQ,CAACe,IAAI,CAAC,OAAO,EAAEK,OAAO,CAAC;EACvC,OAAOhC,MAAM,CAACmC,IAAI,CAAC,MAAK;IACtB9B,OAAO,CAACO,QAAQ,CAACwB,GAAG,CAAC,OAAO,EAAEJ,OAAO,CAAC;EACxC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC,EACH3B,OAAO,CAACgC,SAAS,KAAK,KAAK,GACzBnC,IAAI,CAACoC,SAAS,CAAE7B,CAAC,IAAI;EACnB,IAAI,QAAQ,IAAIJ,OAAO,CAACO,QAAQ,IAAIP,OAAO,CAACO,QAAQ,CAAC2B,MAAM,EAAE;IAC3D,OAAOzC,KAAK,CAAC0C,IAAI,CAAC/B,CAAC,CAAC;EACtB;EACA,OAAOT,MAAM,CAACoB,QAAQ,CAAkCE,MAAM,IAAI;IAChEjB,OAAO,CAACO,QAAQ,CAACe,IAAI,CAAC,QAAQ,EAAE,MAAML,MAAM,CAACxB,KAAK,CAAC0C,IAAI,CAAC/B,CAAC,CAAC,CAAC,CAAC;IAC5DJ,OAAO,CAACO,QAAQ,CAAC6B,GAAG,EAAE;EACxB,CAAC,CAAC;AACJ,CAAC,CAAC,GACFxC,QAAQ,CACX","ignoreList":[]}
1
+ {"version":3,"file":"NodeSink.js","names":["Cause","Channel","Effect","identity","Pull","Sink","fromWritable","options","fromChannel","mapDone","fromWritableChannel","_","fromTransform","pull","writable","evaluate","succeed","pullIntoWritable","pipe","flatMap","chunk","i","callback","loop","resume","length","success","write","encoding","once","void","forever","disableYield","raceFirst","onError","error","fail","sync","off","endOnDone","catchDone","closed","done","end"],"sources":["../src/NodeSink.ts"],"sourcesContent":[null],"mappings":"AAqBA,OAAO,KAAKA,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,OAAO,MAAM,gBAAgB;AACzC,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,SAASC,QAAQ,QAAsB,iBAAiB;AACxD,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,IAAI,MAAM,aAAa;AAGnC;;;;;;;;AAQA,OAAO,MAAMC,YAAY,GACvBC,OAKC,IAEDF,IAAI,CAACG,WAAW,CAACP,OAAO,CAACQ,OAAO,CAACC,mBAAmB,CAAcH,OAAO,CAAC,EAAGI,CAAC,IAAK,CAACA,CAAC,CAAC,CAAC,CAAC;AAE1F;;;;;;;;AAQA,OAAO,MAAMD,mBAAmB,GAC9BH,OAKC,IAEDN,OAAO,CAACW,aAAa,CAAEC,IAAsD,IAAI;EAC/E,MAAMC,QAAQ,GAAGP,OAAO,CAACQ,QAAQ,EAAc;EAC/C,OAAOb,MAAM,CAACc,OAAO,CAACC,gBAAgB,CAAC;IAAE,GAAGV,OAAO;IAAEO,QAAQ;IAAED;EAAI,CAAE,CAAC,CAAC;AACzE,CAAC,CAAC;AAEJ;;;;;;;;AAQA,OAAO,MAAMI,gBAAgB,GAAcV,OAM1C,IACCA,OAAO,CAACM,IAAI,CAACK,IAAI,CACfhB,MAAM,CAACiB,OAAO,CAAEC,KAAK,IAAI;EACvB,IAAIC,CAAC,GAAG,CAAC;EACT,OAAOnB,MAAM,CAACoB,QAAQ,CAAU,SAASC,IAAIA,CAACC,MAAM;IAClD,OAAOH,CAAC,GAAGD,KAAK,CAACK,MAAM,GAAG;MACxB,MAAMC,OAAO,GAAGnB,OAAO,CAACO,QAAQ,CAACa,KAAK,CAACP,KAA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AAO,CAACO,QAAQ,CAAC6B,GAAG,EAAE;EACxB,CAAC,CAAC;AACJ,CAAC,CAAC,GACFxC,QAAQ,CACX","ignoreList":[]}
@@ -5,7 +5,7 @@ import * as Stdio from "effect/Stdio";
5
5
  * and `process.stderr`; stdin remains open and stdout/stderr are not ended by
6
6
  * default.
7
7
  *
8
- * @category Layers
8
+ * @category layers
9
9
  * @since 4.0.0
10
10
  */
11
11
  export declare const layer: Layer.Layer<Stdio.Stdio>;
package/dist/NodeStdio.js CHANGED
@@ -28,7 +28,7 @@ import { fromReadable } from "./NodeStream.js";
28
28
  * and `process.stderr`; stdin remains open and stdout/stderr are not ended by
29
29
  * default.
30
30
  *
31
- * @category Layers
31
+ * @category layers
32
32
  * @since 4.0.0
33
33
  */
34
34
  export const layer = /*#__PURE__*/Layer.succeed(Stdio.Stdio, /*#__PURE__*/Stdio.make({
@@ -140,7 +140,7 @@ export declare const pipeThroughSimple: {
140
140
  * Effect context to run the stream and destroying the readable if the stream
141
141
  * fails.
142
142
  *
143
- * @category conversions
143
+ * @category converting
144
144
  * @since 4.0.0
145
145
  */
146
146
  export declare const toReadable: <E, R>(stream: Stream.Stream<string | Uint8Array, E, R>) => Effect.Effect<Readable, never, R>;
@@ -148,7 +148,7 @@ export declare const toReadable: <E, R>(stream: Stream.Stream<string | Uint8Arra
148
148
  * Converts a service-free Effect `Stream` into a Node `Readable` using an
149
149
  * empty Effect context.
150
150
  *
151
- * @category conversions
151
+ * @category converting
152
152
  * @since 4.0.0
153
153
  */
154
154
  export declare const toReadableNever: <E>(stream: Stream.Stream<string | Uint8Array, E, never>) => Readable;
@@ -157,7 +157,7 @@ export declare const toReadableNever: <E>(stream: Stream.Stream<string | Uint8Ar
157
157
  * failing through `onError` on stream errors or when `maxBytes` is exceeded
158
158
  * and destroying the stream on interruption or failure.
159
159
  *
160
- * @category conversions
160
+ * @category converting
161
161
  * @since 4.0.0
162
162
  */
163
163
  export declare const toString: <E = Cause.UnknownError>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options?: {
@@ -170,7 +170,7 @@ export declare const toString: <E = Cause.UnknownError>(readable: LazyArg<Readab
170
170
  * `onError` on stream errors or when `maxBytes` is exceeded and destroying the
171
171
  * stream on interruption or failure.
172
172
  *
173
- * @category conversions
173
+ * @category converting
174
174
  * @since 4.0.0
175
175
  */
176
176
  export declare const toArrayBuffer: <E = Cause.UnknownError>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options?: {
@@ -181,7 +181,7 @@ export declare const toArrayBuffer: <E = Cause.UnknownError>(readable: LazyArg<R
181
181
  * Consumes a Node readable stream into a `Uint8Array`, using the same error
182
182
  * mapping and `maxBytes` handling as `toArrayBuffer`.
183
183
  *
184
- * @category conversions
184
+ * @category converting
185
185
  * @since 4.0.0
186
186
  */
187
187
  export declare const toUint8Array: <E = Cause.UnknownError>(readable: LazyArg<Readable | NodeJS.ReadableStream>, options?: {
@@ -108,7 +108,7 @@ export const pipeThroughSimple = /*#__PURE__*/dual(2, (self, duplex) => pipeThro
108
108
  * Effect context to run the stream and destroying the readable if the stream
109
109
  * fails.
110
110
  *
111
- * @category conversions
111
+ * @category converting
112
112
  * @since 4.0.0
113
113
  */
114
114
  export const toReadable = stream => Effect.map(Effect.context(), context => new StreamAdapter(context, stream));
@@ -116,7 +116,7 @@ export const toReadable = stream => Effect.map(Effect.context(), context => new
116
116
  * Converts a service-free Effect `Stream` into a Node `Readable` using an
117
117
  * empty Effect context.
118
118
  *
119
- * @category conversions
119
+ * @category converting
120
120
  * @since 4.0.0
121
121
  */
122
122
  export const toReadableNever = stream => new StreamAdapter(Context.empty(), stream);
@@ -125,7 +125,7 @@ export const toReadableNever = stream => new StreamAdapter(Context.empty(), stre
125
125
  * failing through `onError` on stream errors or when `maxBytes` is exceeded
126
126
  * and destroying the stream on interruption or failure.
127
127
  *
128
- * @category conversions
128
+ * @category converting
129
129
  * @since 4.0.0
130
130
  */
131
131
  export const toString = (readable, options) => {
@@ -168,7 +168,7 @@ export const toString = (readable, options) => {
168
168
  * `onError` on stream errors or when `maxBytes` is exceeded and destroying the
169
169
  * stream on interruption or failure.
170
170
  *
171
- * @category conversions
171
+ * @category converting
172
172
  * @since 4.0.0
173
173
  */
174
174
  export const toArrayBuffer = (readable, options) => {
@@ -209,7 +209,7 @@ export const toArrayBuffer = (readable, options) => {
209
209
  * Consumes a Node readable stream into a `Uint8Array`, using the same error
210
210
  * mapping and `maxBytes` handling as `toArrayBuffer`.
211
211
  *
212
- * @category conversions
212
+ * @category converting
213
213
  * @since 4.0.0
214
214
  */
215
215
  export const toUint8Array = (readable, options) => Effect.map(toArrayBuffer(readable, options), buffer => new Uint8Array(buffer));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@effect/platform-node-shared",
3
3
  "type": "module",
4
- "version": "4.0.0-beta.67",
4
+ "version": "4.0.0-beta.68",
5
5
  "license": "MIT",
6
6
  "description": "Unified interfaces for common platform-specific services",
7
7
  "homepage": "https://effect.website",
@@ -46,12 +46,12 @@
46
46
  "provenance": true
47
47
  },
48
48
  "peerDependencies": {
49
- "effect": "^4.0.0-beta.67"
49
+ "effect": "^4.0.0-beta.68"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^25.7.0",
53
53
  "tar": "^7.5.15",
54
- "effect": "^4.0.0-beta.67"
54
+ "effect": "^4.0.0-beta.68"
55
55
  },
56
56
  "dependencies": {
57
57
  "@types/ws": "^8.18.1",
@@ -627,7 +627,7 @@ const make = Effect.gen(function*() {
627
627
  /**
628
628
  * Layer providing the `NodeChildProcessSpawner` implementation.
629
629
  *
630
- * @category Layers
630
+ * @category layers
631
631
  * @since 4.0.0
632
632
  */
633
633
  export const layer: Layer.Layer<
@@ -643,7 +643,7 @@ export const layer: Layer.Layer<
643
643
  /**
644
644
  * Result of flattening a pipeline of commands.
645
645
  *
646
- * @category Models
646
+ * @category models
647
647
  * @since 4.0.0
648
648
  */
649
649
  export interface FlattenedPipeline {
@@ -655,7 +655,7 @@ export interface FlattenedPipeline {
655
655
  * Flattens a `Command` into an array of `StandardCommand`s along with pipe
656
656
  * options for each connection.
657
657
  *
658
- * @category Utilities
658
+ * @category utils
659
659
  * @since 4.0.0
660
660
  */
661
661
  export const flattenCommand = (
@@ -35,7 +35,7 @@ import * as NodeSocketServer from "./NodeSocketServer.ts"
35
35
  * Provides the cluster `RpcClientProtocol` by opening TCP sockets to runner
36
36
  * addresses and using the current RPC serialization service.
37
37
  *
38
- * @category Layers
38
+ * @category layers
39
39
  * @since 4.0.0
40
40
  */
41
41
  export const layerClientProtocol: Layer.Layer<
@@ -64,7 +64,7 @@ export const layerClientProtocol: Layer.Layer<
64
64
  * Provides the socket server used by cluster runners, listening on
65
65
  * `ShardingConfig.runnerListenAddress` or `runnerAddress`.
66
66
  *
67
- * @category Layers
67
+ * @category layers
68
68
  * @since 4.0.0
69
69
  */
70
70
  export const layerSocketServer: Layer.Layer<
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Node.js implementation of the Crypto service.
3
+ *
4
+ * @since 1.0.0
5
+ */
6
+ import * as EffectCrypto from "effect/Crypto"
7
+ import * as Effect from "effect/Effect"
8
+ import * as Layer from "effect/Layer"
9
+ import * as PlatformError from "effect/PlatformError"
10
+ import * as NodeCrypto from "node:crypto"
11
+
12
+ const toHashAlgorithm = (algorithm: EffectCrypto.DigestAlgorithm): string => {
13
+ switch (algorithm) {
14
+ case "SHA-1":
15
+ return "sha1"
16
+ case "SHA-256":
17
+ return "sha256"
18
+ case "SHA-384":
19
+ return "sha384"
20
+ case "SHA-512":
21
+ return "sha512"
22
+ }
23
+ }
24
+
25
+ const digest: EffectCrypto.Crypto["digest"] = (algorithm, data) =>
26
+ Effect.try({
27
+ try: () => Uint8Array.from(NodeCrypto.createHash(toHashAlgorithm(algorithm)).update(data).digest()),
28
+ catch: (cause) =>
29
+ PlatformError.systemError({
30
+ module: "Crypto",
31
+ method: "digest",
32
+ _tag: "Unknown",
33
+ description: "Could not compute digest",
34
+ cause
35
+ })
36
+ })
37
+
38
+ /**
39
+ * The default Node.js Crypto service implementation.
40
+ *
41
+ * @category constructors
42
+ * @since 1.0.0
43
+ */
44
+ export const make: EffectCrypto.Crypto = EffectCrypto.make({
45
+ randomBytes: NodeCrypto.randomBytes,
46
+ digest
47
+ })
48
+
49
+ /**
50
+ * A layer that provides the Node.js Crypto service implementation.
51
+ *
52
+ * @category layers
53
+ * @since 1.0.0
54
+ */
55
+ export const layer: Layer.Layer<EffectCrypto.Crypto> = Layer.succeed(EffectCrypto.Crypto, make)
@@ -656,7 +656,7 @@ const makeFileSystem = Effect.map(Effect.serviceOption(FileSystem.WatchBackend),
656
656
  * Provides the `FileSystem` service backed by Node filesystem APIs, including
657
657
  * file operations, directory operations, links, metadata, and file watching.
658
658
  *
659
- * @category Layers
659
+ * @category layers
660
660
  * @since 4.0.0
661
661
  */
662
662
  export const layer: Layer.Layer<FileSystem.FileSystem> = Layer.effect(FileSystem.FileSystem)(makeFileSystem)
package/src/NodePath.ts CHANGED
@@ -48,7 +48,7 @@ const toFileUrl = (path: string): Effect.Effect<URL, BadArgument> =>
48
48
  * Provides the `Path` service using Node's POSIX path implementation plus
49
49
  * file URL conversion helpers.
50
50
  *
51
- * @category Layers
51
+ * @category layers
52
52
  * @since 4.0.0
53
53
  */
54
54
  export const layerPosix: Layer.Layer<Path> = Layer.succeed(Path)({
@@ -62,7 +62,7 @@ export const layerPosix: Layer.Layer<Path> = Layer.succeed(Path)({
62
62
  * Provides the `Path` service using Node's Windows path implementation plus
63
63
  * file URL conversion helpers.
64
64
  *
65
- * @category Layers
65
+ * @category layers
66
66
  * @since 4.0.0
67
67
  */
68
68
  export const layerWin32: Layer.Layer<Path> = Layer.succeed(Path)({
@@ -76,7 +76,7 @@ export const layerWin32: Layer.Layer<Path> = Layer.succeed(Path)({
76
76
  * Provides the default `Path` service using the host platform's Node path
77
77
  * implementation plus file URL conversion helpers.
78
78
  *
79
- * @category Layers
79
+ * @category layers
80
80
  * @since 4.0.0
81
81
  */
82
82
  export const layer: Layer.Layer<Path> = Layer.succeed(Path)({
@@ -26,7 +26,7 @@ import * as Runtime from "effect/Runtime"
26
26
  * `SIGINT` or `SIGTERM` and invoking the configured teardown to determine the
27
27
  * process exit code.
28
28
  *
29
- * @category Run main
29
+ * @category running
30
30
  * @since 4.0.0
31
31
  */
32
32
  export const runMain: {
@@ -35,7 +35,7 @@ export const runMain: {
35
35
  * `SIGINT` or `SIGTERM` and invoking the configured teardown to determine the
36
36
  * process exit code.
37
37
  *
38
- * @category Run main
38
+ * @category running
39
39
  * @since 4.0.0
40
40
  */
41
41
  (
@@ -49,7 +49,7 @@ export const runMain: {
49
49
  * `SIGINT` or `SIGTERM` and invoking the configured teardown to determine the
50
50
  * process exit code.
51
51
  *
52
- * @category Run main
52
+ * @category running
53
53
  * @since 4.0.0
54
54
  */
55
55
  <E, A>(
package/src/NodeSink.ts CHANGED
@@ -71,6 +71,7 @@ export const fromWritableChannel = <IE, E, A = Uint8Array | string>(
71
71
  * waiting for `drain` when needed, failing on writable errors, and ending the
72
72
  * writable on upstream completion unless disabled.
73
73
  *
74
+ * @category converting
74
75
  * @since 4.0.0
75
76
  */
76
77
  export const pullIntoWritable = <A, IE, E>(options: {
package/src/NodeStdio.ts CHANGED
@@ -29,7 +29,7 @@ import { fromReadable } from "./NodeStream.ts"
29
29
  * and `process.stderr`; stdin remains open and stdout/stderr are not ended by
30
30
  * default.
31
31
  *
32
- * @category Layers
32
+ * @category layers
33
33
  * @since 4.0.0
34
34
  */
35
35
  export const layer: Layer.Layer<Stdio.Stdio> = Layer.succeed(
package/src/NodeStream.ts CHANGED
@@ -215,7 +215,7 @@ export const pipeThroughSimple: {
215
215
  * Effect context to run the stream and destroying the readable if the stream
216
216
  * fails.
217
217
  *
218
- * @category conversions
218
+ * @category converting
219
219
  * @since 4.0.0
220
220
  */
221
221
  export const toReadable = <E, R>(stream: Stream.Stream<string | Uint8Array, E, R>): Effect.Effect<Readable, never, R> =>
@@ -228,7 +228,7 @@ export const toReadable = <E, R>(stream: Stream.Stream<string | Uint8Array, E, R
228
228
  * Converts a service-free Effect `Stream` into a Node `Readable` using an
229
229
  * empty Effect context.
230
230
  *
231
- * @category conversions
231
+ * @category converting
232
232
  * @since 4.0.0
233
233
  */
234
234
  export const toReadableNever = <E>(stream: Stream.Stream<string | Uint8Array, E, never>): Readable =>
@@ -242,7 +242,7 @@ export const toReadableNever = <E>(stream: Stream.Stream<string | Uint8Array, E,
242
242
  * failing through `onError` on stream errors or when `maxBytes` is exceeded
243
243
  * and destroying the stream on interruption or failure.
244
244
  *
245
- * @category conversions
245
+ * @category converting
246
246
  * @since 4.0.0
247
247
  */
248
248
  export const toString = <E = Cause.UnknownError>(
@@ -295,7 +295,7 @@ export const toString = <E = Cause.UnknownError>(
295
295
  * `onError` on stream errors or when `maxBytes` is exceeded and destroying the
296
296
  * stream on interruption or failure.
297
297
  *
298
- * @category conversions
298
+ * @category converting
299
299
  * @since 4.0.0
300
300
  */
301
301
  export const toArrayBuffer = <E = Cause.UnknownError>(
@@ -345,7 +345,7 @@ export const toArrayBuffer = <E = Cause.UnknownError>(
345
345
  * Consumes a Node readable stream into a `Uint8Array`, using the same error
346
346
  * mapping and `maxBytes` handling as `toArrayBuffer`.
347
347
  *
348
- * @category conversions
348
+ * @category converting
349
349
  * @since 4.0.0
350
350
  */
351
351
  export const toUint8Array = <E = Cause.UnknownError>(