@effect/platform-node 4.0.0-beta.70 → 4.0.0-beta.72

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.
Files changed (81) hide show
  1. package/dist/Mime.d.ts +6 -0
  2. package/dist/Mime.d.ts.map +1 -1
  3. package/dist/Mime.js +6 -0
  4. package/dist/Mime.js.map +1 -1
  5. package/dist/NodeCrypto.d.ts +1 -1
  6. package/dist/NodeCrypto.d.ts.map +1 -1
  7. package/dist/NodeCrypto.js +10 -2
  8. package/dist/NodeCrypto.js.map +1 -1
  9. package/dist/NodeFileSystem.d.ts.map +1 -1
  10. package/dist/NodeFileSystem.js +22 -14
  11. package/dist/NodeFileSystem.js.map +1 -1
  12. package/dist/NodeHttpClient.d.ts +44 -26
  13. package/dist/NodeHttpClient.d.ts.map +1 -1
  14. package/dist/NodeHttpClient.js +42 -24
  15. package/dist/NodeHttpClient.js.map +1 -1
  16. package/dist/NodeHttpIncomingMessage.d.ts +35 -14
  17. package/dist/NodeHttpIncomingMessage.d.ts.map +1 -1
  18. package/dist/NodeHttpIncomingMessage.js +34 -13
  19. package/dist/NodeHttpIncomingMessage.js.map +1 -1
  20. package/dist/NodeHttpServerRequest.d.ts +2 -2
  21. package/dist/NodeHttpServerRequest.js +2 -2
  22. package/dist/NodeMultipart.d.ts +31 -16
  23. package/dist/NodeMultipart.d.ts.map +1 -1
  24. package/dist/NodeMultipart.js +29 -14
  25. package/dist/NodeMultipart.js.map +1 -1
  26. package/dist/NodePath.d.ts.map +1 -1
  27. package/dist/NodePath.js +24 -11
  28. package/dist/NodePath.js.map +1 -1
  29. package/dist/NodeRedis.d.ts +34 -16
  30. package/dist/NodeRedis.d.ts.map +1 -1
  31. package/dist/NodeRedis.js +33 -15
  32. package/dist/NodeRedis.js.map +1 -1
  33. package/dist/NodeRuntime.d.ts +3 -3
  34. package/dist/NodeRuntime.d.ts.map +1 -1
  35. package/dist/NodeRuntime.js +26 -12
  36. package/dist/NodeRuntime.js.map +1 -1
  37. package/dist/NodeServices.d.ts +31 -16
  38. package/dist/NodeServices.d.ts.map +1 -1
  39. package/dist/NodeServices.js.map +1 -1
  40. package/dist/NodeSocket.d.ts.map +1 -1
  41. package/dist/NodeSocket.js +31 -16
  42. package/dist/NodeSocket.js.map +1 -1
  43. package/dist/NodeStdio.d.ts.map +1 -1
  44. package/dist/NodeStdio.js +21 -13
  45. package/dist/NodeStdio.js.map +1 -1
  46. package/dist/NodeTerminal.d.ts.map +1 -1
  47. package/dist/NodeTerminal.js +18 -8
  48. package/dist/NodeTerminal.js.map +1 -1
  49. package/dist/NodeWorker.d.ts.map +1 -1
  50. package/dist/NodeWorker.js +28 -14
  51. package/dist/NodeWorker.js.map +1 -1
  52. package/dist/NodeWorkerRunner.d.ts.map +1 -1
  53. package/dist/NodeWorkerRunner.js +35 -15
  54. package/dist/NodeWorkerRunner.js.map +1 -1
  55. package/dist/Undici.d.ts +13 -0
  56. package/dist/Undici.d.ts.map +1 -1
  57. package/dist/Undici.js +13 -0
  58. package/dist/Undici.js.map +1 -1
  59. package/dist/index.d.ts +0 -350
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +0 -350
  62. package/dist/index.js.map +1 -1
  63. package/package.json +4 -4
  64. package/src/Mime.ts +7 -0
  65. package/src/NodeCrypto.ts +10 -2
  66. package/src/NodeFileSystem.ts +22 -14
  67. package/src/NodeHttpClient.ts +42 -24
  68. package/src/NodeHttpIncomingMessage.ts +34 -13
  69. package/src/NodeHttpServerRequest.ts +2 -2
  70. package/src/NodeMultipart.ts +29 -14
  71. package/src/NodePath.ts +24 -11
  72. package/src/NodeRedis.ts +33 -15
  73. package/src/NodeRuntime.ts +28 -14
  74. package/src/NodeServices.ts +31 -16
  75. package/src/NodeSocket.ts +29 -14
  76. package/src/NodeStdio.ts +21 -13
  77. package/src/NodeTerminal.ts +18 -8
  78. package/src/NodeWorker.ts +28 -14
  79. package/src/NodeWorkerRunner.ts +35 -15
  80. package/src/Undici.ts +13 -0
  81. package/src/index.ts +0 -350
package/dist/NodeStdio.js CHANGED
@@ -1,19 +1,27 @@
1
1
  /**
2
- * Node.js implementation of the Effect `Stdio` service.
2
+ * Node.js `Stdio` layer for the current process.
3
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.
4
+ * The exported layer satisfies the platform-independent `Stdio` service by
5
+ * reading command-line arguments from `process.argv`, consuming input from
6
+ * `process.stdin`, and writing output streams to `process.stdout` and
7
+ * `process.stderr`. It is the stdio bridge used by CLIs, scripts, command
8
+ * runners, and tests that intentionally communicate through the host process.
10
9
  *
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.
10
+ * **Mental model**
11
+ *
12
+ * Effects should depend on `Stdio`; this module decides that the backing
13
+ * streams are the global Node process handles. Provide `NodeStdio.layer` when a
14
+ * program only needs standard input and output, or `NodeServices.layer` when the
15
+ * same entrypoint also needs the other default Node services.
16
+ *
17
+ * **Gotchas**
18
+ *
19
+ * The process stdio streams are shared resources. The layer leaves stdin open
20
+ * and does not end stdout or stderr by default, avoiding accidental closure of
21
+ * handles that other code in the same process may still use. Stdio might be a
22
+ * pipe, file, or TTY; terminal-specific behavior such as raw mode, echo, color
23
+ * detection, and cursor movement belongs with terminal APIs rather than this
24
+ * service.
17
25
  *
18
26
  * @since 4.0.0
19
27
  */
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"file":"NodeStdio.js","names":["NodeStdio","layer"],"sources":["../src/NodeStdio.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,OAAO,KAAKA,SAAS,MAAM,wCAAwC;AAInE;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAAuBD,SAAS,CAACC,KAAK","ignoreList":[]}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"NodeTerminal.d.ts","sourceRoot":"","sources":["../src/NodeTerminal.ts"],"names":[],"mappings":"AAwBA,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"}
@@ -1,13 +1,23 @@
1
1
  /**
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
2
+ * Node.js implementation of the Effect `Terminal` service.
3
+ *
4
+ * `NodeTerminal` connects `Terminal` to the current process' stdin and stdout
5
+ * so Node programs can read lines, stream key presses, write display output,
6
+ * and inspect terminal dimensions through the Effect service environment.
7
+ *
8
+ * **Mental model**
9
+ *
10
+ * `make` acquires a scoped terminal backed by process streams, and `layer`
11
+ * provides that service with the default key sequence for quitting input. When
12
+ * stdin is a TTY, low-level key input temporarily enables raw mode for the
13
+ * lifetime of the scope; finalization restores the previous terminal state.
14
+ *
15
+ * **Gotchas**
16
+ *
17
+ * In non-TTY environments such as CI, pipes, or redirected input, terminal
10
18
  * dimensions may be reported as zero and raw-mode key handling is unavailable.
19
+ * For plain stdin/stdout byte streams, use the standard I/O service instead of
20
+ * the interactive terminal service.
11
21
  *
12
22
  * @since 4.0.0
13
23
  */
@@ -1 +1 @@
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":[]}
1
+ {"version":3,"file":"NodeTerminal.js","names":["NodeTerminal","make","layer"],"sources":["../src/NodeTerminal.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;AAuBA,OAAO,KAAKA,YAAY,MAAM,2CAA2C;AAMzE;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAAmFD,YAAY,CAACC,IAAI;AAErH;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAAoBF,YAAY,CAACE,KAAK","ignoreList":[]}
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"NodeWorker.d.ts","sourceRoot":"","sources":["../src/NodeWorker.ts"],"names":[],"mappings":"AAsCA,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"}
@@ -1,21 +1,35 @@
1
1
  /**
2
2
  * Parent-side Node.js support for Effect workers.
3
3
  *
4
- * This module provides the `WorkerPlatform` used by Node programs that spawn
5
- * and communicate with `node:worker_threads` workers or IPC-enabled child
6
- * processes through Effect's worker protocol. Pair it with `NodeWorkerRunner`
7
- * in the worker entrypoint when building worker-backed RPC clients, offloading
8
- * CPU-bound work, isolating Node resources, or hosting services that should
9
- * exchange typed messages with the parent process.
4
+ * This module installs the `WorkerPlatform` used by a Node program that owns
5
+ * workers. It supports both `node:worker_threads` workers and IPC-enabled child
6
+ * processes, routing messages through Effect's worker protocol so higher-level
7
+ * worker clients can treat either runtime as the same parent-side transport.
10
8
  *
11
- * Worker-thread spawners can use `postMessage` transfer lists for values such
12
- * as `ArrayBuffer` and `MessagePort`, but transferring moves ownership and
13
- * invalid transfer lists surface as worker send or receive failures.
14
- * Child-process spawners must provide an IPC channel, for example via
15
- * `child_process.fork` or `stdio: "ipc"`; their messages use Node IPC
16
- * serialization and this module does not forward transfer lists to
17
- * `ChildProcess.send`. Scope finalization sends the worker close signal and
18
- * waits for exit before falling back to `terminate()` or `SIGKILL`.
9
+ * **Mental model**
10
+ *
11
+ * `NodeWorker` runs in the parent process. The worker entrypoint should install
12
+ * `NodeWorkerRunner`, which receives parent messages, runs the registered
13
+ * Effect handler, and sends replies back over the same channel. Use `layer`
14
+ * when you want this module to provide both the platform and a `Worker.Spawner`;
15
+ * use `layerPlatform` when the spawner is provided elsewhere.
16
+ *
17
+ * **Common tasks**
18
+ *
19
+ * - Spawn CPU-bound or resource-isolated work in `worker_threads`.
20
+ * - Spawn a child process that was created with an IPC channel.
21
+ * - Share one parent-side worker implementation across both Node transports.
22
+ *
23
+ * **Gotchas**
24
+ *
25
+ * Worker-thread spawners can use `postMessage` transfer lists for values such as
26
+ * `ArrayBuffer` and `MessagePort`; transferring moves ownership, and invalid
27
+ * transfer lists surface as send or receive failures. Child-process spawners
28
+ * must provide an IPC channel, for example via `child_process.fork` or
29
+ * `stdio: "ipc"`; their messages use Node IPC serialization and transfer lists
30
+ * are not forwarded to `ChildProcess.send`. Scope finalization sends the worker
31
+ * close signal and waits for exit before falling back to `terminate()` or
32
+ * `SIGKILL`.
19
33
  *
20
34
  * @since 4.0.0
21
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"NodeWorker.js","names":["Deferred","Effect","Exit","Layer","Scope","Worker","WorkerError","WorkerReceiveError","layerPlatform","succeed","WorkerPlatform","makePlatform","setup","scope","worker","exitDeferred","makeUnsafe","thing","postMessage","msg","t","kill","terminate","_","send","on","doneUnsafe","void","as","addFinalizer","suspend","await","pipe","timeout","catchCause","sync","listen","deferred","emit","port","message","cause","reason","code","layer","spawn","merge","layerSpawner"],"sources":["../src/NodeWorker.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,KAAKA,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,MAAM,MAAM,gCAAgC;AACxD,SAASC,WAAW,EAAEC,kBAAkB,QAAQ,qCAAqC;AAIrF;;;;;;;;AAQA,OAAO,MAAM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AMA,CAAC;IAAEC,QAAQ;IAAEC,IAAI;IAAEC;EAAI,CAAE;IAC7BA,IAAI,CAACzB,MAAM,CAACW,EAAE,CAAC,SAAS,EAAGe,OAAO,IAAI;MACpCF,IAAI,CAACE,OAAO,CAAC;IACf,CAAC,CAAC;IACFD,IAAI,CAACzB,MAAM,CAACW,EAAE,CAAC,cAAc,EAAGgB,KAAK,IAAI;MACvCzC,QAAQ,CAAC0B,UAAU,CACjBW,QAAQ,EACR,IAAI/B,WAAW,CAAC;QACdoC,MAAM,EAAE,IAAInC,kBAAkB,CAAC;UAC7BiC,OAAO,EAAE,mCAAmC;UAC5CC;SACD;OACF,CAAC,CACH;IACH,CAAC,CAAC;IACFF,IAAI,CAACzB,MAAM,CAACW,EAAE,CAAC,OAAO,EAAGgB,KAAK,IAAI;MAChCzC,QAAQ,CAAC0B,UAAU,CACjBW,QAAQ,EACR,IAAI/B,WAAW,CAAC;QACdoC,MAAM,EAAE,IAAInC,kBAAkB,CAAC;UAC7BiC,OAAO,EAAE,4BAA4B;UACrCC;SACD;OACF,CAAC,CACH;IACH,CAAC,CAAC;IACFF,IAAI,CAACzB,MAAM,CAACW,EAAE,CAAC,MAAM,EAAGkB,IAAI,IAAI;MAC9B3C,QAAQ,CAAC0B,UAAU,CACjBW,QAAQ,EACR,IAAI/B,WAAW,CAAC;QACdoC,MAAM,EAAE,IAAInC,kBAAkB,CAAC;UAC7BiC,OAAO,EAAE,mCAAmC,GAAGG;SAChD;OACF,CAAC,CACH;IACH,CAAC,CAAC;IACF,OAAO1C,MAAM,CAAC0B,IAAI;EACpB;CACD,CAAC,CACH;AAED;;;;;;;AAOA,OAAO,MAAMiB,KAAK,GAChBC,KAAuE,IAEvE1C,KAAK,CAAC2C,KAAK,CACTzC,MAAM,CAAC0C,YAAY,CAACF,KAAK,CAAC,EAC1BrC,aAAa,CACd","ignoreList":[]}
1
+ {"version":3,"file":"NodeWorker.js","names":["Deferred","Effect","Exit","Layer","Scope","Worker","WorkerError","WorkerReceiveError","layerPlatform","succeed","WorkerPlatform","makePlatform","setup","scope","worker","exitDeferred","makeUnsafe","thing","postMessage","msg","t","kill","terminate","_","send","on","doneUnsafe","void","as","addFinalizer","suspend","await","pipe","timeout","catchCause","sync","listen","deferred","emit","port","message","cause","reason","code","layer","spawn","merge","layerSpawner"],"sources":["../src/NodeWorker.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,OAAO,KAAKA,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,MAAM,MAAM,gCAAgC;AACxD,SAASC,WAAW,EAAEC,kBAAkB,QAAQ,qCAAqC;AAIrF;;;;;;;;AAQA,OAAO,MAAMC,aAAa,gBAAuCL,KAAK,CAACM,OAAO,CAACJ,MAAM,CAACK,cAAc,CAAC,cACnGL,MAAM,CAACM,YAAY,EAAoD,CAAC;EACtEC,KAAKA,CAAC;IAAEC,KAAK;IAAEC;EAAM,CAAE;IACrB,MAAMC,YAAY,GAAGf,QAAQ,CAACgB,UAAU,EAAqB;IAC7D,MAAMC,KAAK,GAAG,aAAa,IAAIH,MAAM,GACnC;MACEI,WAAWA,CAACC,GAAQ,EAAEC,CAAO;QAC3BN,MAAM,CAACI,WAAW,CAACC,GAAG,EAAEC,CAAC,CAAC;MAC5B,CAAC;MACDC,IAAI,EAAEA,CAAA,KAAMP,MAAM,CAACQ,SAAS,EAAE;MAC9BR;KACD,GACD;MACEI,WAAWA,CAACC,GAAQ,EAAEI,CAAO;QAC3BT,MAAM,CAACU,IAAI,CAACL,GAAG,CAAC;MAClB,CAAC;MACDE,IAAI,EAAEA,CAAA,KAAMP,MAAM,CAACO,IAAI,CAAC,SAAS,CAAC;MAClCP;KACD;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,EAAE,4BAA4B;UACrCC;SACD;OACF,CAAC,CACH;IACH,CAAC,CAAC;IACFF,IAAI,CAACzB,MAAM,CAACW,EAAE,CAAC,MAAM,EAAGkB,IAAI,IAAI;MAC9B3C,QAAQ,CAAC0B,UAAU,CACjBW,QAAQ,EACR,IAAI/B,WAAW,CAAC;QACdoC,MAAM,EAAE,IAAInC,kBAAkB,CAAC;UAC7BiC,OAAO,EAAE,mCAAmC,GAAGG;SAChD;OACF,CAAC,CACH;IACH,CAAC,CAAC;IACF,OAAO1C,MAAM,CAAC0B,IAAI;EACpB;CACD,CAAC,CACH;AAED;;;;;;;AAOA,OAAO,MAAMiB,KAAK,GAChBC,KAAuE,IAEvE1C,KAAK,CAAC2C,KAAK,CACTzC,MAAM,CAAC0C,YAAY,CAACF,KAAK,CAAC,EAC1BrC,aAAa,CACd","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"NodeWorkerRunner.d.ts","sourceRoot":"","sources":["../src/NodeWorkerRunner.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,YAAY,MAAM,sCAAsC,CAAA;AAGpE;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,oBAAoB,CA+E/D,CAAA"}
1
+ {"version":3,"file":"NodeWorkerRunner.d.ts","sourceRoot":"","sources":["../src/NodeWorkerRunner.ts"],"names":[],"mappings":"AA8CA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,KAAK,YAAY,MAAM,sCAAsC,CAAA;AAGpE;;;;;;;GAOG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,oBAAoB,CA+E/D,CAAA"}
@@ -1,21 +1,41 @@
1
1
  /**
2
- * Runtime support for Effect workers that are executed by Node.js.
2
+ * Node.js runtime support for workers that serve Effect worker requests.
3
3
  *
4
- * This module is intended to be installed in the program running inside a
5
- * `node:worker_threads` worker or an IPC-enabled child process. It provides the
6
- * `WorkerRunnerPlatform` used by `WorkerRunner` to receive request messages
7
- * from the parent, run the registered Effect handler, and send responses back
8
- * over the parent channel.
4
+ * `NodeWorkerRunner` supplies the Node implementation of the Effect worker
5
+ * runner platform. Install {@link layer} inside code that is already running in
6
+ * a `node:worker_threads` worker or in a child process with an IPC channel. The
7
+ * layer listens for parent messages, runs handlers registered through
8
+ * `WorkerRunner`, and replies over the same parent channel.
9
9
  *
10
- * Use it when the parent side is created with `NodeWorker` and the worker code
11
- * needs to perform CPU-bound work, isolate Node resources, or host services that
12
- * should communicate through the Effect worker protocol. The runner must be
13
- * started from an actual worker context: `parentPort` is required for worker
14
- * threads, while child processes must be spawned with an IPC channel so
15
- * `process.send` is available. Transfer lists only apply to worker-thread
16
- * `postMessage`; child-process messages go through Node IPC serialization.
17
- * Shutdown is coordinated by the parent message protocol, so long-running
18
- * handlers should remain interruptible and keep resource cleanup in scopes.
10
+ * **Mental model**
11
+ *
12
+ * - The parent process creates a worker with the Node worker APIs.
13
+ * - The worker process provides this module's {@link layer} to its runner program.
14
+ * - Startup sends a ready message to the parent, then request messages are
15
+ * dispatched to the registered Effect handler.
16
+ * - Responses are sent with Node `postMessage` for worker threads or
17
+ * `process.send` for child processes.
18
+ * - Shutdown is initiated by the parent protocol and closes or unreferences the
19
+ * parent channel.
20
+ *
21
+ * **Common tasks**
22
+ *
23
+ * - Provide {@link layer} in the worker entrypoint before running `WorkerRunner`.
24
+ * - Host CPU-bound work or isolated Node resources behind the Effect worker protocol.
25
+ * - Return transferable values when using `worker_threads`.
26
+ *
27
+ * **Gotchas**
28
+ *
29
+ * - The runner must start inside an actual worker context; otherwise the layer
30
+ * fails because neither `parentPort` nor `process.send` is available.
31
+ * - Transfer lists only apply to `worker_threads`; child-process IPC uses Node
32
+ * serialization.
33
+ * - Long-running handlers should remain interruptible and keep cleanup in
34
+ * scopes so parent-driven shutdown can release resources.
35
+ *
36
+ * **See also**
37
+ *
38
+ * - {@link layer} for the Node worker runner platform.
19
39
  *
20
40
  * @since 4.0.0
21
41
  */
@@ -1 +1 @@
1
- {"version":3,"file":"NodeWorkerRunner.js","names":["Cause","Deferred","Effect","Exit","Fiber","Layer","WorkerError","WorkerReceiveError","WorkerSpawnError","WorkerRunner","WorkerThreads","layer","succeed","WorkerRunnerPlatform","start","gen","parentPort","process","send","reason","message","sendUnsafe","_portId","transfers","postMessage","_transfers","sync","run","handler","scopedWith","fnUntraced","scope","closeLatch","makeUnsafe","trackFiber","runIn","services","context","runFork","runForkWith","onExit","exit","_tag","hasInterruptsOnly","cause","logError","on","result","isEffect","fiber","addObserver","close","channel","unref","doneUnsafe","void","await"],"sources":["../src/NodeWorkerRunner.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;AAqBA,OAAO,KAAKA,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,SAASC,WAAW,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,qCAAqC;AACvG,OAAO,KAAKC,YAAY,MAAM,sCAAsC;AACpE,OAAO,KAAKC,aAAa,MAAM,qBAAqB;AAEpD;;;;;;;;AAQA,OAAO,MAAMC,KAAK,gBAAmDN,KAAK,CAACO,OAAO,CAACH,YAAY,CAACI,oBAAoB,CAAC,CAAC;EACpHC,KAAKA,CAAA;IACH,OAAOZ,MAAM,CAACa,GAAG,CAAC,aAAS;MACzB,IAAI,CAACL,aAAa,CAACM,UAAU,IAAI,CAACC,OAAO,CAACC,IAAI,EAAE;QAC9C,OAAO,OAAO,IAAIZ,WAAW,CAAC;UAC5Ba,MAAM,EAAE,IAAIX,gBAAgB,CAAC;YAAEY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AK,CAACxB,UAAU,CAAC;MAC1C,CAAC,CAAC,CAAC;MAEL,OAAO;QAAEL,GAAG;QAAET,IAAI;QAAEG;MAAU,CAAE;IAClC,CAAC,CAAC;EACJ;CACD,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"NodeWorkerRunner.js","names":["Cause","Deferred","Effect","Exit","Fiber","Layer","WorkerError","WorkerReceiveError","WorkerSpawnError","WorkerRunner","WorkerThreads","layer","succeed","WorkerRunnerPlatform","start","gen","parentPort","process","send","reason","message","sendUnsafe","_portId","transfers","postMessage","_transfers","sync","run","handler","scopedWith","fnUntraced","scope","closeLatch","makeUnsafe","trackFiber","runIn","services","context","runFork","runForkWith","onExit","exit","_tag","hasInterruptsOnly","cause","logError","on","result","isEffect","fiber","addObserver","close","channel","unref","doneUnsafe","void","await"],"sources":["../src/NodeWorkerRunner.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,OAAO,KAAKA,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,QAAQ,MAAM,iBAAiB;AAC3C,OAAO,KAAKC,MAAM,MAAM,eAAe;AACvC,OAAO,KAAKC,IAAI,MAAM,aAAa;AACnC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,OAAO,KAAKC,KAAK,MAAM,cAAc;AACrC,SAASC,WAAW,EAAEC,kBAAkB,EAAEC,gBAAgB,QAAQ,qCAAqC;AACvG,OAAO,KAAKC,YAAY,MAAM,sCAAsC;AACpE,OAAO,KAAKC,aAAa,MAAM,qBAAqB;AAEpD;;;;;;;;AAQA,OAAO,MAAMC,KAAK,gBAAmDN,KAAK,CAACO,OAAO,CAACH,YAAY,CAACI,oBAAoB,CAAC,CAAC;EACpHC,KAAKA,CAAA;IACH,OAAOZ,MAAM,CAACa,GAAG,CAAC,aAAS;MACzB,IAAI,CAACL,aAAa,CAACM,UAAU,IAAI,CAACC,OAAO,CAACC,IAAI,EAAE;QAC9C,OA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CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAElB,OAAO,OAAOpB,QAAQ,CAACuD,KAAK,CAACxB,UAAU,CAAC;MAC1C,CAAC,CAAC,CAAC;MAEL,OAAO;QAAEL,GAAG;QAAET,IAAI;QAAEG;MAAU,CAAE;IAClC,CAAC,CAAC;EACJ;CACD,CAAC","ignoreList":[]}
package/dist/Undici.d.ts CHANGED
@@ -1,4 +1,17 @@
1
1
  /**
2
+ * Re-export of the Undici HTTP client package used by the Node platform.
3
+ *
4
+ * This module gives Effect applications a package-local import for Undici
5
+ * primitives while working with `@effect/platform-node`. Import named Undici
6
+ * APIs from here when configuring Node HTTP client dispatchers, creating agents
7
+ * or mock agents, setting the process-global dispatcher, or sharing the same
8
+ * Undici types with integrations that use the platform HTTP client.
9
+ *
10
+ * The module does not wrap or reinterpret Undici behavior. It forwards the
11
+ * installed `undici` named exports and default export, so connection pooling,
12
+ * dispatcher lifetimes, mocking, aborts, and request options follow Undici's
13
+ * own semantics.
14
+ *
2
15
  * @since 4.0.0
3
16
  */
4
17
  import Undici from "undici";
@@ -1 +1 @@
1
- {"version":3,"file":"Undici.d.ts","sourceRoot":"","sources":["../src/Undici.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B;;;GAGG;AACH,cAAc,QAAQ,CAAA;AAEtB;;;GAGG;AACH,eAAe,MAAM,CAAA"}
1
+ {"version":3,"file":"Undici.d.ts","sourceRoot":"","sources":["../src/Undici.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,MAAM,MAAM,QAAQ,CAAA;AAE3B;;;GAGG;AACH,cAAc,QAAQ,CAAA;AAEtB;;;GAGG;AACH,eAAe,MAAM,CAAA"}
package/dist/Undici.js CHANGED
@@ -1,4 +1,17 @@
1
1
  /**
2
+ * Re-export of the Undici HTTP client package used by the Node platform.
3
+ *
4
+ * This module gives Effect applications a package-local import for Undici
5
+ * primitives while working with `@effect/platform-node`. Import named Undici
6
+ * APIs from here when configuring Node HTTP client dispatchers, creating agents
7
+ * or mock agents, setting the process-global dispatcher, or sharing the same
8
+ * Undici types with integrations that use the platform HTTP client.
9
+ *
10
+ * The module does not wrap or reinterpret Undici behavior. It forwards the
11
+ * installed `undici` named exports and default export, so connection pooling,
12
+ * dispatcher lifetimes, mocking, aborts, and request options follow Undici's
13
+ * own semantics.
14
+ *
2
15
  * @since 4.0.0
3
16
  */
4
17
  import Undici from "undici";
@@ -1 +1 @@
1
- {"version":3,"file":"Undici.js","names":["Undici"],"sources":["../src/Undici.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAOA,MAAM,MAAM,QAAQ;AAE3B;;;;AAIA,cAAc,QAAQ;AAEtB;;;;AAIA,eAAeA,MAAM","ignoreList":[]}
1
+ {"version":3,"file":"Undici.js","names":["Undici"],"sources":["../src/Undici.ts"],"sourcesContent":[null],"mappings":"AAAA;;;;;;;;;;;;;;;;AAgBA,OAAOA,MAAM,MAAM,QAAQ;AAE3B;;;;AAIA,cAAc,QAAQ;AAEtB;;;;AAIA,eAAeA,MAAM","ignoreList":[]}