the-moby-effect 1.45.0-alpha.11 → 1.45.0-alpha.13

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 (243) hide show
  1. package/Endpoints/package.json +6 -0
  2. package/Engines/package.json +6 -0
  3. package/dist/cjs/Connection.js +0 -1
  4. package/dist/cjs/Connection.js.map +1 -1
  5. package/dist/cjs/Demux.js +11 -0
  6. package/dist/cjs/Demux.js.map +1 -1
  7. package/dist/cjs/Endpoints.js +201 -0
  8. package/dist/cjs/Endpoints.js.map +1 -0
  9. package/dist/cjs/Engines.js +17 -0
  10. package/dist/cjs/Engines.js.map +1 -0
  11. package/dist/cjs/Platforms.js +1 -1
  12. package/dist/cjs/archive/Tar.js +1 -1
  13. package/dist/cjs/archive/Tar.js.map +1 -1
  14. package/dist/cjs/blobs/Http.js +1 -1
  15. package/dist/cjs/blobs/Http.js.map +1 -1
  16. package/dist/cjs/blobs/Https.js +1 -1
  17. package/dist/cjs/blobs/Https.js.map +1 -1
  18. package/dist/cjs/blobs/Socket.js +1 -1
  19. package/dist/cjs/blobs/Socket.js.map +1 -1
  20. package/dist/cjs/blobs/Ssh.js +1 -1
  21. package/dist/cjs/blobs/Ssh.js.map +1 -1
  22. package/dist/cjs/demux/Compressed.js.map +1 -1
  23. package/dist/cjs/demux/Demux.js +79 -60
  24. package/dist/cjs/demux/Demux.js.map +1 -1
  25. package/dist/cjs/demux/Hijack.js +20 -29
  26. package/dist/cjs/demux/Hijack.js.map +1 -1
  27. package/dist/cjs/demux/Multiplexed.js +2 -3
  28. package/dist/cjs/demux/Multiplexed.js.map +1 -1
  29. package/dist/cjs/demux/Raw.js +27 -80
  30. package/dist/cjs/demux/Raw.js.map +1 -1
  31. package/dist/cjs/demux/Stdio.js +20 -18
  32. package/dist/cjs/demux/Stdio.js.map +1 -1
  33. package/dist/cjs/endpoints/Common.js +0 -2
  34. package/dist/cjs/endpoints/Common.js.map +1 -1
  35. package/dist/cjs/endpoints/Containers.js +4 -4
  36. package/dist/cjs/endpoints/Containers.js.map +1 -1
  37. package/dist/cjs/endpoints/Distribution.js +2 -0
  38. package/dist/cjs/endpoints/Distribution.js.map +1 -1
  39. package/dist/cjs/endpoints/Execs.js +2 -0
  40. package/dist/cjs/endpoints/Execs.js.map +1 -1
  41. package/dist/cjs/endpoints/Images.js +4 -4
  42. package/dist/cjs/endpoints/Images.js.map +1 -1
  43. package/dist/cjs/endpoints/Networks.js +2 -0
  44. package/dist/cjs/endpoints/Networks.js.map +1 -1
  45. package/dist/cjs/endpoints/Nodes.js +2 -0
  46. package/dist/cjs/endpoints/Nodes.js.map +1 -1
  47. package/dist/cjs/endpoints/Plugins.js +2 -0
  48. package/dist/cjs/endpoints/Plugins.js.map +1 -1
  49. package/dist/cjs/endpoints/Secrets.js +2 -0
  50. package/dist/cjs/endpoints/Secrets.js.map +1 -1
  51. package/dist/cjs/endpoints/Services.js +2 -0
  52. package/dist/cjs/endpoints/Services.js.map +1 -1
  53. package/dist/cjs/endpoints/Session.js +15 -3
  54. package/dist/cjs/endpoints/Session.js.map +1 -1
  55. package/dist/cjs/endpoints/Swarm.js +2 -0
  56. package/dist/cjs/endpoints/Swarm.js.map +1 -1
  57. package/dist/cjs/endpoints/System.js +2 -0
  58. package/dist/cjs/endpoints/System.js.map +1 -1
  59. package/dist/cjs/endpoints/Tasks.js +2 -0
  60. package/dist/cjs/endpoints/Tasks.js.map +1 -1
  61. package/dist/cjs/endpoints/Volumes.js +2 -0
  62. package/dist/cjs/endpoints/Volumes.js.map +1 -1
  63. package/dist/cjs/engines/Docker.js +61 -12
  64. package/dist/cjs/engines/Docker.js.map +1 -1
  65. package/dist/cjs/engines/Moby.js +1 -1
  66. package/dist/cjs/generated/ImagePruneResponse.generated.js +3 -1
  67. package/dist/cjs/generated/ImagePruneResponse.generated.js.map +1 -1
  68. package/dist/cjs/index.js +5 -3
  69. package/dist/dts/Connection.d.ts.map +1 -1
  70. package/dist/dts/Demux.d.ts +9 -0
  71. package/dist/dts/Demux.d.ts.map +1 -1
  72. package/dist/dts/DockerEngine.d.ts +1 -1
  73. package/dist/dts/Endpoints.d.ts +171 -0
  74. package/dist/dts/Endpoints.d.ts.map +1 -0
  75. package/dist/dts/Engines.d.ts +30 -0
  76. package/dist/dts/Engines.d.ts.map +1 -0
  77. package/dist/dts/Platforms.d.ts +1 -1
  78. package/dist/dts/demux/Compressed.d.ts +7 -0
  79. package/dist/dts/demux/Compressed.d.ts.map +1 -1
  80. package/dist/dts/demux/Demux.d.ts +145 -239
  81. package/dist/dts/demux/Demux.d.ts.map +1 -1
  82. package/dist/dts/demux/Hijack.d.ts +3 -19
  83. package/dist/dts/demux/Hijack.d.ts.map +1 -1
  84. package/dist/dts/demux/Multiplexed.d.ts +2 -3
  85. package/dist/dts/demux/Multiplexed.d.ts.map +1 -1
  86. package/dist/dts/demux/Raw.d.ts +25 -186
  87. package/dist/dts/demux/Raw.d.ts.map +1 -1
  88. package/dist/dts/demux/Stdio.d.ts +23 -35
  89. package/dist/dts/demux/Stdio.d.ts.map +1 -1
  90. package/dist/dts/endpoints/Containers.d.ts +5 -3
  91. package/dist/dts/endpoints/Containers.d.ts.map +1 -1
  92. package/dist/dts/endpoints/Distribution.d.ts +2 -0
  93. package/dist/dts/endpoints/Distribution.d.ts.map +1 -1
  94. package/dist/dts/endpoints/Execs.d.ts +7 -5
  95. package/dist/dts/endpoints/Execs.d.ts.map +1 -1
  96. package/dist/dts/endpoints/Images.d.ts +170 -592
  97. package/dist/dts/endpoints/Images.d.ts.map +1 -1
  98. package/dist/dts/endpoints/Networks.d.ts +24 -151
  99. package/dist/dts/endpoints/Networks.d.ts.map +1 -1
  100. package/dist/dts/endpoints/Nodes.d.ts +24 -80
  101. package/dist/dts/endpoints/Nodes.d.ts.map +1 -1
  102. package/dist/dts/endpoints/Plugins.d.ts +49 -296
  103. package/dist/dts/endpoints/Plugins.d.ts.map +1 -1
  104. package/dist/dts/endpoints/Secrets.d.ts +16 -109
  105. package/dist/dts/endpoints/Secrets.d.ts.map +1 -1
  106. package/dist/dts/endpoints/Services.d.ts +57 -205
  107. package/dist/dts/endpoints/Services.d.ts.map +1 -1
  108. package/dist/dts/endpoints/Session.d.ts +2 -17
  109. package/dist/dts/endpoints/Session.d.ts.map +1 -1
  110. package/dist/dts/endpoints/Swarm.d.ts +16 -69
  111. package/dist/dts/endpoints/Swarm.d.ts.map +1 -1
  112. package/dist/dts/endpoints/System.d.ts +25 -106
  113. package/dist/dts/endpoints/System.d.ts.map +1 -1
  114. package/dist/dts/endpoints/Tasks.d.ts +25 -105
  115. package/dist/dts/endpoints/Tasks.d.ts.map +1 -1
  116. package/dist/dts/endpoints/Volumes.d.ts +28 -137
  117. package/dist/dts/endpoints/Volumes.d.ts.map +1 -1
  118. package/dist/dts/engines/Docker.d.ts +21 -4
  119. package/dist/dts/engines/Docker.d.ts.map +1 -1
  120. package/dist/dts/engines/DockerCompose.d.ts +2 -0
  121. package/dist/dts/engines/DockerCompose.d.ts.map +1 -1
  122. package/dist/dts/engines/Moby.d.ts +1 -1
  123. package/dist/dts/generated/ClusterVolumeSpec.generated.d.ts +1 -1
  124. package/dist/dts/generated/ImagePruneResponse.generated.d.ts +7 -3
  125. package/dist/dts/generated/ImagePruneResponse.generated.d.ts.map +1 -1
  126. package/dist/dts/generated/SwarmInitRequest.generated.d.ts +1 -1
  127. package/dist/dts/generated/SwarmJoinRequest.generated.d.ts +1 -1
  128. package/dist/dts/index.d.ts +11 -5
  129. package/dist/dts/index.d.ts.map +1 -1
  130. package/dist/esm/Connection.js +0 -1
  131. package/dist/esm/Connection.js.map +1 -1
  132. package/dist/esm/Demux.js +9 -0
  133. package/dist/esm/Demux.js.map +1 -1
  134. package/dist/esm/DockerEngine.js +1 -1
  135. package/dist/esm/Endpoints.js +171 -0
  136. package/dist/esm/Endpoints.js.map +1 -0
  137. package/dist/esm/Engines.js +30 -0
  138. package/dist/esm/Engines.js.map +1 -0
  139. package/dist/esm/Platforms.js +1 -1
  140. package/dist/esm/archive/Tar.js +1 -1
  141. package/dist/esm/archive/Tar.js.map +1 -1
  142. package/dist/esm/blobs/Http.js +1 -1
  143. package/dist/esm/blobs/Http.js.map +1 -1
  144. package/dist/esm/blobs/Https.js +1 -1
  145. package/dist/esm/blobs/Https.js.map +1 -1
  146. package/dist/esm/blobs/Socket.js +1 -1
  147. package/dist/esm/blobs/Socket.js.map +1 -1
  148. package/dist/esm/blobs/Ssh.js +1 -1
  149. package/dist/esm/blobs/Ssh.js.map +1 -1
  150. package/dist/esm/demux/Compressed.js.map +1 -1
  151. package/dist/esm/demux/Demux.js +79 -60
  152. package/dist/esm/demux/Demux.js.map +1 -1
  153. package/dist/esm/demux/Hijack.js +19 -30
  154. package/dist/esm/demux/Hijack.js.map +1 -1
  155. package/dist/esm/demux/Multiplexed.js +2 -3
  156. package/dist/esm/demux/Multiplexed.js.map +1 -1
  157. package/dist/esm/demux/Raw.js +24 -73
  158. package/dist/esm/demux/Raw.js.map +1 -1
  159. package/dist/esm/demux/Stdio.js +20 -18
  160. package/dist/esm/demux/Stdio.js.map +1 -1
  161. package/dist/esm/endpoints/Common.js +0 -2
  162. package/dist/esm/endpoints/Common.js.map +1 -1
  163. package/dist/esm/endpoints/Containers.js +5 -5
  164. package/dist/esm/endpoints/Containers.js.map +1 -1
  165. package/dist/esm/endpoints/Distribution.js +2 -0
  166. package/dist/esm/endpoints/Distribution.js.map +1 -1
  167. package/dist/esm/endpoints/Execs.js +2 -0
  168. package/dist/esm/endpoints/Execs.js.map +1 -1
  169. package/dist/esm/endpoints/Images.js +4 -4
  170. package/dist/esm/endpoints/Images.js.map +1 -1
  171. package/dist/esm/endpoints/Networks.js +2 -0
  172. package/dist/esm/endpoints/Networks.js.map +1 -1
  173. package/dist/esm/endpoints/Nodes.js +2 -0
  174. package/dist/esm/endpoints/Nodes.js.map +1 -1
  175. package/dist/esm/endpoints/Plugins.js +2 -0
  176. package/dist/esm/endpoints/Plugins.js.map +1 -1
  177. package/dist/esm/endpoints/Secrets.js +2 -0
  178. package/dist/esm/endpoints/Secrets.js.map +1 -1
  179. package/dist/esm/endpoints/Services.js +2 -0
  180. package/dist/esm/endpoints/Services.js.map +1 -1
  181. package/dist/esm/endpoints/Session.js +15 -3
  182. package/dist/esm/endpoints/Session.js.map +1 -1
  183. package/dist/esm/endpoints/Swarm.js +2 -0
  184. package/dist/esm/endpoints/Swarm.js.map +1 -1
  185. package/dist/esm/endpoints/System.js +2 -0
  186. package/dist/esm/endpoints/System.js.map +1 -1
  187. package/dist/esm/endpoints/Tasks.js +2 -0
  188. package/dist/esm/endpoints/Tasks.js.map +1 -1
  189. package/dist/esm/endpoints/Volumes.js +2 -0
  190. package/dist/esm/endpoints/Volumes.js.map +1 -1
  191. package/dist/esm/engines/Docker.js +57 -10
  192. package/dist/esm/engines/Docker.js.map +1 -1
  193. package/dist/esm/engines/Moby.js +1 -1
  194. package/dist/esm/generated/ImagePruneResponse.generated.js +3 -1
  195. package/dist/esm/generated/ImagePruneResponse.generated.js.map +1 -1
  196. package/dist/esm/index.js +11 -5
  197. package/dist/esm/index.js.map +1 -1
  198. package/package.json +22 -14
  199. package/src/Connection.ts +0 -1
  200. package/src/Demux.ts +10 -0
  201. package/src/DockerEngine.ts +1 -1
  202. package/src/Endpoints.ts +200 -0
  203. package/src/Engines.ts +33 -0
  204. package/src/Platforms.ts +1 -1
  205. package/src/archive/Tar.ts +1 -1
  206. package/src/blobs/Http.ts +1 -1
  207. package/src/blobs/Https.ts +1 -1
  208. package/src/blobs/Socket.ts +1 -1
  209. package/src/blobs/Ssh.ts +1 -1
  210. package/src/demux/Compressed.ts +19 -0
  211. package/src/demux/Demux.ts +191 -288
  212. package/src/demux/Hijack.ts +33 -189
  213. package/src/demux/Multiplexed.ts +2 -3
  214. package/src/demux/Raw.ts +69 -247
  215. package/src/demux/Stdio.ts +31 -86
  216. package/src/endpoints/Common.ts +0 -2
  217. package/src/endpoints/Containers.ts +8 -9
  218. package/src/endpoints/Distribution.ts +3 -0
  219. package/src/endpoints/Execs.ts +11 -6
  220. package/src/endpoints/Images.ts +179 -638
  221. package/src/endpoints/Networks.ts +19 -166
  222. package/src/endpoints/Nodes.ts +25 -90
  223. package/src/endpoints/Plugins.ts +43 -321
  224. package/src/endpoints/Secrets.ts +13 -122
  225. package/src/endpoints/Services.ts +53 -229
  226. package/src/endpoints/Session.ts +16 -20
  227. package/src/endpoints/Swarm.ts +17 -78
  228. package/src/endpoints/System.ts +30 -116
  229. package/src/endpoints/Tasks.ts +26 -113
  230. package/src/endpoints/Volumes.ts +33 -145
  231. package/src/engines/Docker.ts +72 -13
  232. package/src/engines/DockerCompose.ts +2 -0
  233. package/src/engines/Moby.ts +1 -1
  234. package/src/generated/ImagePruneResponse.generated.ts +1 -1
  235. package/src/index.ts +12 -5
  236. package/PodmanEngine/package.json +0 -6
  237. package/dist/cjs/PodmanEngine.js +0 -17
  238. package/dist/cjs/PodmanEngine.js.map +0 -1
  239. package/dist/dts/PodmanEngine.d.ts +0 -7
  240. package/dist/dts/PodmanEngine.d.ts.map +0 -1
  241. package/dist/esm/PodmanEngine.js +0 -7
  242. package/dist/esm/PodmanEngine.js.map +0 -1
  243. package/src/PodmanEngine.ts +0 -7
@@ -9,17 +9,58 @@ import * as Effect from "effect/Effect";
9
9
  import * as Scope from "effect/Scope";
10
10
  import * as Sink from "effect/Sink";
11
11
  import * as Stream from "effect/Stream";
12
- import { CompressedDemuxOutput } from "./Compressed.js";
12
+ import { CompressedDemuxOutput, CompressedStdinStdoutStderrOutput } from "./Compressed.js";
13
13
  import { MultiplexedStreamSocket } from "./Multiplexed.js";
14
- import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./Raw.js";
14
+ import { RawStreamSocket } from "./Raw.js";
15
+ /** @since 1.0.0 */
16
+ export declare namespace Demux {
17
+ /**
18
+ * @since 1.0.0
19
+ * @category Types
20
+ */
21
+ type StdinStdoutStderrSocketOptions = {
22
+ stdin: RawStreamSocket;
23
+ stdout?: never;
24
+ stderr?: never;
25
+ } | {
26
+ stdin?: never;
27
+ stdout: RawStreamSocket;
28
+ stderr?: never;
29
+ } | {
30
+ stdin?: never;
31
+ stdout?: never;
32
+ stderr: RawStreamSocket;
33
+ } | {
34
+ stdin: RawStreamSocket;
35
+ stdout: RawStreamSocket;
36
+ stderr?: never;
37
+ } | {
38
+ stdin: RawStreamSocket;
39
+ stdout?: never;
40
+ stderr: RawStreamSocket;
41
+ } | {
42
+ stdin?: never;
43
+ stdout: RawStreamSocket;
44
+ stderr: RawStreamSocket;
45
+ } | {
46
+ stdin: RawStreamSocket;
47
+ stdout: RawStreamSocket;
48
+ stderr: RawStreamSocket;
49
+ };
50
+ /**
51
+ * @since 1.0.0
52
+ * @category Types
53
+ */
54
+ type AnySocketOptions = RawStreamSocket | MultiplexedStreamSocket | StdinStdoutStderrSocketOptions;
55
+ }
15
56
  /**
16
- * Demux either a bidirectional raw socket, multiplexed socket, or
17
- * unidirectional raw socket(s) to a single sink.
57
+ * Demux either a raw socket, multiplexed socket, or multiple raw socket(s) to a
58
+ * single sink.
18
59
  *
19
60
  * @since 1.0.0
20
61
  * @category Demux
21
62
  * @example
22
- * // Demux a bidirectional raw socket to one sink
63
+ * // Demux a single raw socket to one sink
23
64
  * import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
24
65
  * import * as Chunk from "effect/Chunk";
25
66
  * import * as Effect from "effect/Effect";
@@ -63,7 +104,7 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
63
104
  * // Since the container was started with "tty: true",
64
105
  * // we should get a raw socket here
65
106
  * const socket:
66
- * | DemuxRaw.BidirectionalRawStreamSocket
107
+ * | DemuxRaw.RawStreamSocket
67
108
  * | DemuxMultiplexed.MultiplexedStreamSocket =
68
109
  * yield* containers.attach({
69
110
  * stdin: true,
@@ -73,8 +114,8 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
73
114
  * id: containerId,
74
115
  * });
75
116
  * assert.ok(
76
- * DemuxRaw.isBidirectionalRawStreamSocket(socket),
77
- * "Expected a bidirectional raw socket"
117
+ * DemuxRaw.isRawStreamSocket(socket),
118
+ * "Expected a raw socket"
78
119
  * );
79
120
  *
80
121
  * // Demux to a single sink
@@ -97,7 +138,7 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
97
138
  * .pipe(NodeRuntime.runMain);
98
139
  *
99
140
  * @example
100
- * // Demux a bidirectional multiplexed socket to one sink
141
+ * // Demux a multiplexed socket to one sink
101
142
  * import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
102
143
  * import * as Chunk from "effect/Chunk";
103
144
  * import * as Effect from "effect/Effect";
@@ -141,7 +182,7 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
141
182
  * // Since the container was started with "tty: false",
142
183
  * // we should get a multiplexed socket here
143
184
  * const socket:
144
- * | DemuxRaw.BidirectionalRawStreamSocket
185
+ * | DemuxRaw.RawStreamSocket
145
186
  * | DemuxMultiplexed.MultiplexedStreamSocket =
146
187
  * yield* containers.attach({
147
188
  * stdin: true,
@@ -175,7 +216,7 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
175
216
  * .pipe(NodeRuntime.runMain);
176
217
  *
177
218
  * @example
178
- * // Demux unidirectional sockets to one sink
219
+ * // Demux multiple raw sockets to one sink
179
220
  * import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
180
221
  * import * as NodeSocket from "@effect/platform-node/NodeSocket";
181
222
  * import * as Chunk from "effect/Chunk";
@@ -217,36 +258,36 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
217
258
  * });
218
259
  *
219
260
  * // It doesn't matter what tty option we start the container
220
- * // with here, we will only get a unidirectional socket
221
- * const stdinSocket: DemuxRaw.UnidirectionalRawStreamSocket =
261
+ * // with here, we will only get a raw socket
262
+ * const stdinSocket: DemuxRaw.RawStreamSocket =
222
263
  * yield* containers.attachWebsocket({
223
264
  * stdin: true,
224
265
  * stream: true,
225
266
  * id: containerId,
226
267
  * });
227
- * const stdoutSocket: DemuxRaw.UnidirectionalRawStreamSocket =
268
+ * const stdoutSocket: DemuxRaw.RawStreamSocket =
228
269
  * yield* containers.attachWebsocket({
229
270
  * stdout: true,
230
271
  * stream: true,
231
272
  * id: containerId,
232
273
  * });
233
- * const stderrSocket: DemuxRaw.UnidirectionalRawStreamSocket =
274
+ * const stderrSocket: DemuxRaw.RawStreamSocket =
234
275
  * yield* containers.attachWebsocket({
235
276
  * stderr: true,
236
277
  * stream: true,
237
278
  * id: containerId,
238
279
  * });
239
280
  * assert.ok(
240
- * DemuxRaw.isUnidirectionalRawStreamSocket(stdinSocket),
241
- * "Expected a unidirectional raw socket"
281
+ * DemuxRaw.isRawStreamSocket(stdinSocket),
282
+ * "Expected a raw socket"
242
283
  * );
243
284
  * assert.ok(
244
- * DemuxRaw.isUnidirectionalRawStreamSocket(stdoutSocket),
245
- * "Expected a unidirectional raw socket"
285
+ * DemuxRaw.isRawStreamSocket(stdoutSocket),
286
+ * "Expected a raw socket"
246
287
  * );
247
288
  * assert.ok(
248
- * DemuxRaw.isUnidirectionalRawStreamSocket(stderrSocket),
249
- * "Expected a unidirectional raw socket"
289
+ * DemuxRaw.isRawStreamSocket(stderrSocket),
290
+ * "Expected a raw socket"
250
291
  * );
251
292
  *
252
293
  * // Demux to a single sink
@@ -280,7 +321,7 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
280
321
  * .pipe(NodeRuntime.runMain);
281
322
  *
282
323
  * @example
283
- * // Demux unidirectional socket to one sink
324
+ * // Demux a single raw socket to one sink
284
325
  * import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
285
326
  * import * as NodeSocket from "@effect/platform-node/NodeSocket";
286
327
  * import * as Chunk from "effect/Chunk";
@@ -326,16 +367,16 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
326
367
  * });
327
368
  *
328
369
  * // It doesn't matter what tty option we start the container
329
- * // with here, we will only get a unidirectional socket
330
- * const stdoutSocket: DemuxRaw.UnidirectionalRawStreamSocket =
370
+ * // with here, we will only get a raw socket
371
+ * const stdoutSocket: DemuxRaw.RawStreamSocket =
331
372
  * yield* containers.attachWebsocket({
332
373
  * stdout: true,
333
374
  * stream: true,
334
375
  * id: containerId,
335
376
  * });
336
377
  * assert.ok(
337
- * DemuxRaw.isUnidirectionalRawStreamSocket(stdoutSocket),
338
- * "Expected a unidirectional raw socket"
378
+ * DemuxRaw.isRawStreamSocket(stdoutSocket),
379
+ * "Expected a raw socket"
339
380
  * );
340
381
  *
341
382
  * // Demux to a single sink
@@ -355,12 +396,12 @@ import { BidirectionalRawStreamSocket, UnidirectionalRawStreamSocket } from "./R
355
396
  * .pipe(NodeRuntime.runMain);
356
397
  */
357
398
  export declare const demuxToSingleSink: {
358
- <A1, E1, E2, R1, R2>(socket: BidirectionalRawStreamSocket, source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
399
+ <A1, E1, E2, R1, R2>(socket: RawStreamSocket, source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
359
400
  encoding?: string | undefined;
360
- } | undefined): Effect.Effect<A1, E1 | E2 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
401
+ } | undefined): Effect.Effect<A1, E1 | E2 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
361
402
  <A1, E1, E2, R1, R2>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
362
403
  encoding?: string | undefined;
363
- } | undefined): (socket: BidirectionalRawStreamSocket) => Effect.Effect<A1, E1 | E2 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
404
+ } | undefined): (socket: RawStreamSocket) => Effect.Effect<A1, E1 | E2 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
364
405
  <A1, E1, E2, R1, R2>(socket: MultiplexedStreamSocket, source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
365
406
  bufferSize?: number | undefined;
366
407
  encoding?: string | undefined;
@@ -369,78 +410,38 @@ export declare const demuxToSingleSink: {
369
410
  bufferSize?: number | undefined;
370
411
  encoding?: string | undefined;
371
412
  } | undefined): (socket: MultiplexedStreamSocket) => Effect.Effect<A1, E1 | E2 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
372
- <A1, E1, E2, R1, R2>(sockets: {
373
- stdin: UnidirectionalRawStreamSocket;
374
- stdout?: never;
375
- stderr?: never;
376
- } | {
377
- stdin?: never;
378
- stdout: UnidirectionalRawStreamSocket;
379
- stderr?: never;
380
- } | {
381
- stdin?: never;
382
- stdout?: never;
383
- stderr: UnidirectionalRawStreamSocket;
384
- } | {
385
- stdin: UnidirectionalRawStreamSocket;
386
- stdout: UnidirectionalRawStreamSocket;
387
- stderr?: never;
388
- } | {
389
- stdin: UnidirectionalRawStreamSocket;
390
- stdout?: never;
391
- stderr: UnidirectionalRawStreamSocket;
392
- } | {
393
- stdin?: never;
394
- stdout: UnidirectionalRawStreamSocket;
395
- stderr: UnidirectionalRawStreamSocket;
396
- } | {
397
- stdin: UnidirectionalRawStreamSocket;
398
- stdout: UnidirectionalRawStreamSocket;
399
- stderr: UnidirectionalRawStreamSocket;
400
- }, source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
413
+ <A1, E1, E2, R1, R2>(sockets: Demux.StdinStdoutStderrSocketOptions, source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
401
414
  encoding?: string | undefined;
402
- } | undefined): Effect.Effect<A1, E1 | E2 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
415
+ } | undefined): Effect.Effect<A1, E1 | E2 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
403
416
  <A1, E1, E2, R1, R2>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
404
417
  encoding?: string | undefined;
405
- } | undefined): (sockets: {
406
- stdin: UnidirectionalRawStreamSocket;
407
- stdout?: never;
408
- stderr?: never;
409
- } | {
410
- stdin?: never;
411
- stdout: UnidirectionalRawStreamSocket;
412
- stderr?: never;
413
- } | {
414
- stdin?: never;
415
- stdout?: never;
416
- stderr: UnidirectionalRawStreamSocket;
417
- } | {
418
- stdin: UnidirectionalRawStreamSocket;
419
- stdout: UnidirectionalRawStreamSocket;
420
- stderr?: never;
421
- } | {
422
- stdin: UnidirectionalRawStreamSocket;
423
- stdout?: never;
424
- stderr: UnidirectionalRawStreamSocket;
425
- } | {
426
- stdin?: never;
427
- stdout: UnidirectionalRawStreamSocket;
428
- stderr: UnidirectionalRawStreamSocket;
429
- } | {
430
- stdin: UnidirectionalRawStreamSocket;
431
- stdout: UnidirectionalRawStreamSocket;
432
- stderr: UnidirectionalRawStreamSocket;
433
- }) => Effect.Effect<A1, E1 | E2 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
418
+ } | undefined): (sockets: Demux.StdinStdoutStderrSocketOptions) => Effect.Effect<A1, E1 | E2 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
434
419
  };
435
420
  /**
436
- * Demux either a multiplexed socket or unidirectional socket(s) to separate
437
- * sinks. If you need to also demux a bidirectional raw socket, then use
421
+ * Like {@link demuxToSingleSink}, but with unknown input socket.
422
+ *
423
+ * @since 1.0.0
424
+ * @category Demux
425
+ */
426
+ export declare const demuxUnknownToSingleSink: {
427
+ <A1, E1, E2, R1, R2>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
428
+ bufferSize?: number | undefined;
429
+ encoding?: string | undefined;
430
+ } | undefined): (socket: Demux.AnySocketOptions) => Effect.Effect<A1, E1 | E2 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
431
+ <A1, E1, E2, R1, R2>(socket: Demux.AnySocketOptions, source: Stream.Stream<string | Uint8Array, E1, R1>, sink: Sink.Sink<A1, string, string, E2, R2>, options?: {
432
+ bufferSize?: number | undefined;
433
+ encoding?: string | undefined;
434
+ } | undefined): Effect.Effect<A1, E1 | E2 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope>>;
435
+ };
436
+ /**
437
+ * Demux either a multiplexed socket or multiple raw socket to separate sinks.
438
+ * If you need to also demux a single raw socket, then use
438
439
  * {@link demuxUnknownToSeparateSinks} instead.
439
440
  *
440
441
  * @since 1.0.0
441
442
  * @category Demux
442
443
  * @example
443
- * // Demux a bidirectional multiplexed socket to two sinks
444
+ * // Demux a multiplexed socket to two sinks
444
445
  * import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
445
446
  * import * as Chunk from "effect/Chunk";
446
447
  * import * as Effect from "effect/Effect";
@@ -484,7 +485,7 @@ export declare const demuxToSingleSink: {
484
485
  * // Since the container was started with "tty: false",
485
486
  * // we should get a multiplexed socket here
486
487
  * const socket:
487
- * | DemuxRaw.BidirectionalRawStreamSocket
488
+ * | DemuxRaw.RawStreamSocket
488
489
  * | DemuxMultiplexed.MultiplexedStreamSocket =
489
490
  * yield* containers.attach({
490
491
  * stdin: true,
@@ -519,7 +520,7 @@ export declare const demuxToSingleSink: {
519
520
  * .pipe(NodeRuntime.runMain);
520
521
  *
521
522
  * @example
522
- * // Demux unidirectional sockets to two sinks
523
+ * // Demux multiple raw sockets to two sinks
523
524
  * import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
524
525
  * import * as NodeSocket from "@effect/platform-node/NodeSocket";
525
526
  * import * as Chunk from "effect/Chunk";
@@ -561,36 +562,36 @@ export declare const demuxToSingleSink: {
561
562
  * });
562
563
  *
563
564
  * // It doesn't matter what tty option we start the container
564
- * // with here, we will only get a unidirectional socket
565
- * const stdinSocket: DemuxRaw.UnidirectionalRawStreamSocket =
565
+ * // with here, we will only get a raw socket
566
+ * const stdinSocket: DemuxRaw.RawStreamSocket =
566
567
  * yield* containers.attachWebsocket({
567
568
  * stdin: true,
568
569
  * stream: true,
569
570
  * id: containerId,
570
571
  * });
571
- * const stdoutSocket: DemuxRaw.UnidirectionalRawStreamSocket =
572
+ * const stdoutSocket: DemuxRaw.RawStreamSocket =
572
573
  * yield* containers.attachWebsocket({
573
574
  * stdout: true,
574
575
  * stream: true,
575
576
  * id: containerId,
576
577
  * });
577
- * const stderrSocket: DemuxRaw.UnidirectionalRawStreamSocket =
578
+ * const stderrSocket: DemuxRaw.RawStreamSocket =
578
579
  * yield* containers.attachWebsocket({
579
580
  * stderr: true,
580
581
  * stream: true,
581
582
  * id: containerId,
582
583
  * });
583
584
  * assert.ok(
584
- * DemuxRaw.isUnidirectionalRawStreamSocket(stdinSocket),
585
- * "Expected a unidirectional raw socket"
585
+ * DemuxRaw.isRawStreamSocket(stdinSocket),
586
+ * "Expected a raw socket"
586
587
  * );
587
588
  * assert.ok(
588
- * DemuxRaw.isUnidirectionalRawStreamSocket(stdoutSocket),
589
- * "Expected a unidirectional raw socket"
589
+ * DemuxRaw.isRawStreamSocket(stdoutSocket),
590
+ * "Expected a raw socket"
590
591
  * );
591
592
  * assert.ok(
592
- * DemuxRaw.isUnidirectionalRawStreamSocket(stderrSocket),
593
- * "Expected a unidirectional raw socket"
593
+ * DemuxRaw.isRawStreamSocket(stderrSocket),
594
+ * "Expected a raw socket"
594
595
  * );
595
596
  *
596
597
  * // Demux to a single sink
@@ -619,7 +620,7 @@ export declare const demuxToSingleSink: {
619
620
  * .pipe(NodeRuntime.runMain);
620
621
  *
621
622
  * @example
622
- * // Demux unidirectional socket to two sinks
623
+ * // Demux single raw socket to two sinks
623
624
  * import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
624
625
  * import * as NodeSocket from "@effect/platform-node/NodeSocket";
625
626
  * import * as Chunk from "effect/Chunk";
@@ -665,16 +666,16 @@ export declare const demuxToSingleSink: {
665
666
  * });
666
667
  *
667
668
  * // It doesn't matter what tty option we start the container
668
- * // with here, we will only get a unidirectional socket
669
- * const stdoutSocket: DemuxRaw.UnidirectionalRawStreamSocket =
669
+ * // with here, we will only get a raw socket
670
+ * const stdoutSocket: DemuxRaw.RawStreamSocket =
670
671
  * yield* containers.attachWebsocket({
671
672
  * stdout: true,
672
673
  * stream: true,
673
674
  * id: containerId,
674
675
  * });
675
676
  * assert.ok(
676
- * DemuxRaw.isUnidirectionalRawStreamSocket(stdoutSocket),
677
- * "Expected a unidirectional raw socket"
677
+ * DemuxRaw.isRawStreamSocket(stdoutSocket),
678
+ * "Expected a raw socket"
678
679
  * );
679
680
  *
680
681
  * // Demux to a single sink
@@ -704,89 +705,33 @@ export declare const demuxToSeparateSinks: {
704
705
  bufferSize?: number | undefined;
705
706
  encoding?: string | undefined;
706
707
  } | undefined): (socket: MultiplexedStreamSocket) => Effect.Effect<CompressedDemuxOutput<A1, A2>, E1 | E2 | E3 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
707
- <A1, A2, E1, E2, E3, R1, R2, R3, SocketOptions extends {
708
- stdin: UnidirectionalRawStreamSocket;
709
- stdout?: never;
710
- stderr?: never;
711
- } | {
712
- stdin?: never;
713
- stdout: UnidirectionalRawStreamSocket;
714
- stderr?: never;
715
- } | {
716
- stdin?: never;
717
- stdout?: never;
718
- stderr: UnidirectionalRawStreamSocket;
719
- } | {
720
- stdin: UnidirectionalRawStreamSocket;
721
- stdout: UnidirectionalRawStreamSocket;
722
- stderr?: never;
723
- } | {
724
- stdin: UnidirectionalRawStreamSocket;
725
- stdout?: never;
726
- stderr: UnidirectionalRawStreamSocket;
727
- } | {
728
- stdin?: never;
729
- stdout: UnidirectionalRawStreamSocket;
730
- stderr: UnidirectionalRawStreamSocket;
731
- } | {
732
- stdin: UnidirectionalRawStreamSocket;
733
- stdout: UnidirectionalRawStreamSocket;
734
- stderr: UnidirectionalRawStreamSocket;
735
- }>(sockets: SocketOptions, source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
708
+ <A1, A2, E1, E2, E3, R1, R2, R3, SocketOptions extends Demux.StdinStdoutStderrSocketOptions>(sockets: SocketOptions, source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
736
709
  encoding?: string | undefined;
737
- } | undefined): Effect.Effect<SocketOptions["stdout"] extends UnidirectionalRawStreamSocket ? SocketOptions["stderr"] extends UnidirectionalRawStreamSocket ? CompressedDemuxOutput<A1, A2> : CompressedDemuxOutput<A1, void> : SocketOptions["stderr"] extends UnidirectionalRawStreamSocket ? CompressedDemuxOutput<void, A2> : CompressedDemuxOutput<void, void>, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
738
- <A1, A2, E1, E2, E3, R1, R2, R3, SocketOptions extends {
739
- stdin: UnidirectionalRawStreamSocket;
740
- stdout?: never;
741
- stderr?: never;
742
- } | {
743
- stdin?: never;
744
- stdout: UnidirectionalRawStreamSocket;
745
- stderr?: never;
746
- } | {
747
- stdin?: never;
748
- stdout?: never;
749
- stderr: UnidirectionalRawStreamSocket;
750
- } | {
751
- stdin: UnidirectionalRawStreamSocket;
752
- stdout: UnidirectionalRawStreamSocket;
753
- stderr?: never;
754
- } | {
755
- stdin: UnidirectionalRawStreamSocket;
756
- stdout?: never;
757
- stderr: UnidirectionalRawStreamSocket;
758
- } | {
759
- stdin?: never;
760
- stdout: UnidirectionalRawStreamSocket;
761
- stderr: UnidirectionalRawStreamSocket;
762
- } | {
763
- stdin: UnidirectionalRawStreamSocket;
764
- stdout: UnidirectionalRawStreamSocket;
765
- stderr: UnidirectionalRawStreamSocket;
766
- }>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
710
+ } | undefined): Effect.Effect<CompressedStdinStdoutStderrOutput<SocketOptions, A1, A2>, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
711
+ <A1, A2, E1, E2, E3, R1, R2, R3, SocketOptions extends Demux.StdinStdoutStderrSocketOptions>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
767
712
  encoding?: string | undefined;
768
- } | undefined): (sockets: SocketOptions) => Effect.Effect<SocketOptions["stdout"] extends UnidirectionalRawStreamSocket ? SocketOptions["stderr"] extends UnidirectionalRawStreamSocket ? CompressedDemuxOutput<A1, A2> : CompressedDemuxOutput<A1, void> : SocketOptions["stderr"] extends UnidirectionalRawStreamSocket ? CompressedDemuxOutput<void, A2> : CompressedDemuxOutput<void, void>, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
713
+ } | undefined): (sockets: SocketOptions) => Effect.Effect<CompressedStdinStdoutStderrOutput<SocketOptions, A1, A2>, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
769
714
  };
770
715
  /**
771
- * Demux a bidirectional raw socket, multiplexed socket, or unidirectional raw
772
- * sockets to two sinks. If given a bidirectional raw stream socket, then stdout
773
- * and stderr will be combined on the same sink. If given a multiplexed stream
774
- * socket, then stdout and stderr will be forwarded to different sinks. If given
775
- * a unidirectional raw stream sockets, then you are only required to provide
776
- * one for stdout but can also provide sockets for stdin and stderr as well. The
777
- * return type will depend on the type of socket provided, so this isn't
778
- * suitable for all use cases.
716
+ * Demux a single raw socket, multiplexed socket, or multiple raw sockets to two
717
+ * sinks. If given a single raw stream socket, then stdout and stderr will be
718
+ * combined on the same sink. If given a multiplexed stream socket, then stdout
719
+ * and stderr will be forwarded to different sinks. If given multiple raw stream
720
+ * sockets, then you can choose which ones to provide. The return type will
721
+ * depend on the type of socket provided, so this isn't suitable for all use
722
+ * cases. If you need a unified signature, you should use
723
+ * {@link demuxUnknownToSeparateSinks}.
779
724
  *
780
725
  * @since 1.0.0
781
726
  * @category Demux
782
727
  */
783
- export declare const demuxUnknownToSeparateSinks: {
784
- <A1, A2, E1, E2, E3, R1, R2, R3>(socket: BidirectionalRawStreamSocket, source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
728
+ export declare const demuxAnyToSeparateSinks: {
729
+ <A1, A2, E1, E2, E3, R1, R2, R3>(socket: RawStreamSocket, source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
785
730
  encoding?: string | undefined;
786
731
  } | undefined): Effect.Effect<A1, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
787
732
  <A1, A2, E1, E2, E3, R1, R2, R3>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
788
733
  encoding?: string | undefined;
789
- } | undefined): (socket: BidirectionalRawStreamSocket) => Effect.Effect<A1, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
734
+ } | undefined): (socket: RawStreamSocket) => Effect.Effect<A1, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
790
735
  <A1, A2, E1, E2, E3, R1, R2, R3>(socket: MultiplexedStreamSocket, source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
791
736
  bufferSize?: number | undefined;
792
737
  encoding?: string | undefined;
@@ -795,67 +740,28 @@ export declare const demuxUnknownToSeparateSinks: {
795
740
  bufferSize?: number | undefined;
796
741
  encoding?: string | undefined;
797
742
  } | undefined): (socket: MultiplexedStreamSocket) => Effect.Effect<CompressedDemuxOutput<A1, A2>, E1 | E2 | E3 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
798
- <A1, A2, E1, E2, E3, R1, R2, R3, SocketOptions extends {
799
- stdin: UnidirectionalRawStreamSocket;
800
- stdout?: never;
801
- stderr?: never;
802
- } | {
803
- stdin?: never;
804
- stdout: UnidirectionalRawStreamSocket;
805
- stderr?: never;
806
- } | {
807
- stdin?: never;
808
- stdout?: never;
809
- stderr: UnidirectionalRawStreamSocket;
810
- } | {
811
- stdin: UnidirectionalRawStreamSocket;
812
- stdout: UnidirectionalRawStreamSocket;
813
- stderr?: never;
814
- } | {
815
- stdin: UnidirectionalRawStreamSocket;
816
- stdout?: never;
817
- stderr: UnidirectionalRawStreamSocket;
818
- } | {
819
- stdin?: never;
820
- stdout: UnidirectionalRawStreamSocket;
821
- stderr: UnidirectionalRawStreamSocket;
822
- } | {
823
- stdin: UnidirectionalRawStreamSocket;
824
- stdout: UnidirectionalRawStreamSocket;
825
- stderr: UnidirectionalRawStreamSocket;
826
- }>(sockets: SocketOptions, source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
743
+ <A1, A2, E1, E2, E3, R1, R2, R3, SocketOptions extends Demux.StdinStdoutStderrSocketOptions>(sockets: SocketOptions, source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
827
744
  encoding?: string | undefined;
828
- } | undefined): Effect.Effect<SocketOptions["stdout"] extends UnidirectionalRawStreamSocket ? SocketOptions["stderr"] extends UnidirectionalRawStreamSocket ? CompressedDemuxOutput<A1, A2> : CompressedDemuxOutput<A1, void> : SocketOptions["stderr"] extends UnidirectionalRawStreamSocket ? CompressedDemuxOutput<void, A2> : CompressedDemuxOutput<void, void>, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
829
- <A1, A2, E1, E2, E3, R1, R2, R3, SocketOptions extends {
830
- stdin: UnidirectionalRawStreamSocket;
831
- stdout?: never;
832
- stderr?: never;
833
- } | {
834
- stdin?: never;
835
- stdout: UnidirectionalRawStreamSocket;
836
- stderr?: never;
837
- } | {
838
- stdin?: never;
839
- stdout?: never;
840
- stderr: UnidirectionalRawStreamSocket;
841
- } | {
842
- stdin: UnidirectionalRawStreamSocket;
843
- stdout: UnidirectionalRawStreamSocket;
844
- stderr?: never;
845
- } | {
846
- stdin: UnidirectionalRawStreamSocket;
847
- stdout?: never;
848
- stderr: UnidirectionalRawStreamSocket;
849
- } | {
850
- stdin?: never;
851
- stdout: UnidirectionalRawStreamSocket;
852
- stderr: UnidirectionalRawStreamSocket;
853
- } | {
854
- stdin: UnidirectionalRawStreamSocket;
855
- stdout: UnidirectionalRawStreamSocket;
856
- stderr: UnidirectionalRawStreamSocket;
857
- }>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
745
+ } | undefined): Effect.Effect<CompressedStdinStdoutStderrOutput<SocketOptions, A1, A2>, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
746
+ <A1, A2, E1, E2, E3, R1, R2, R3, SocketOptions extends Demux.StdinStdoutStderrSocketOptions>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
747
+ encoding?: string | undefined;
748
+ } | undefined): (sockets: SocketOptions) => Effect.Effect<CompressedStdinStdoutStderrOutput<SocketOptions, A1, A2>, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
749
+ };
750
+ /**
751
+ * Like {@link demuxAnyToSeparateSinks}, but with unknown sockets and a unified
752
+ * signature.
753
+ *
754
+ * @since 1.0.0
755
+ * @category Demux
756
+ */
757
+ export declare const demuxUnknownToSeparateSinks: {
758
+ <A1, A2, E1, E2, E3, R1, R2, R3>(source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
759
+ bufferSize?: number | undefined;
760
+ encoding?: string | undefined;
761
+ } | undefined): (socket: Demux.AnySocketOptions) => Effect.Effect<void, E1 | E2 | E3 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
762
+ <A1, A2, E1, E2, E3, R1, R2, R3>(socket: Demux.AnySocketOptions, source: Stream.Stream<string | Uint8Array, E1, R1>, sink1: Sink.Sink<A1, string, string, E2, R2>, sink2: Sink.Sink<A2, string, string, E3, R3>, options?: {
763
+ bufferSize?: number | undefined;
858
764
  encoding?: string | undefined;
859
- } | undefined): (sockets: SocketOptions) => Effect.Effect<SocketOptions["stdout"] extends UnidirectionalRawStreamSocket ? SocketOptions["stderr"] extends UnidirectionalRawStreamSocket ? CompressedDemuxOutput<A1, A2> : CompressedDemuxOutput<A1, void> : SocketOptions["stderr"] extends UnidirectionalRawStreamSocket ? CompressedDemuxOutput<void, A2> : CompressedDemuxOutput<void, void>, E1 | E2 | E3 | Socket.SocketError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
765
+ } | undefined): Effect.Effect<void, E1 | E2 | E3 | Socket.SocketError | ParseResult.ParseError, Exclude<R1, Scope.Scope> | Exclude<R2, Scope.Scope> | Exclude<R3, Scope.Scope>>;
860
766
  };
861
767
  //# sourceMappingURL=Demux.d.ts.map