@effect/platform 0.18.6 → 0.19.0

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 (156) hide show
  1. package/Command/dist/effect-platform-Command.cjs.dev.js +419 -26
  2. package/Command/dist/effect-platform-Command.cjs.prod.js +419 -26
  3. package/Command/dist/effect-platform-Command.esm.js +382 -9
  4. package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.dev.js +72 -7
  5. package/CommandExecutor/dist/effect-platform-CommandExecutor.cjs.prod.js +72 -7
  6. package/CommandExecutor/dist/effect-platform-CommandExecutor.esm.js +71 -2
  7. package/Effectify/dist/effect-platform-Effectify.cjs.dev.js +55 -3
  8. package/Effectify/dist/effect-platform-Effectify.cjs.prod.js +55 -3
  9. package/Effectify/dist/effect-platform-Effectify.esm.js +38 -2
  10. package/Error/dist/effect-platform-Error.cjs.dev.js +87 -5
  11. package/Error/dist/effect-platform-Error.cjs.prod.js +87 -5
  12. package/Error/dist/effect-platform-Error.esm.js +68 -2
  13. package/FileSystem/dist/effect-platform-FileSystem.cjs.dev.js +287 -20
  14. package/FileSystem/dist/effect-platform-FileSystem.cjs.prod.js +287 -20
  15. package/FileSystem/dist/effect-platform-FileSystem.esm.js +256 -9
  16. package/Http/App/dist/effect-platform-Http-App.cjs.dev.js +15 -0
  17. package/Http/App/dist/effect-platform-Http-App.cjs.mjs +6 -1
  18. package/Http/App/dist/effect-platform-Http-App.cjs.prod.js +15 -0
  19. package/Http/App/dist/effect-platform-Http-App.esm.js +6 -1
  20. package/Http/Body/dist/effect-platform-Http-Body.cjs.dev.js +4 -4
  21. package/Http/Body/dist/effect-platform-Http-Body.cjs.prod.js +4 -4
  22. package/Http/Body/dist/effect-platform-Http-Body.esm.js +4 -4
  23. package/Http/Client/dist/effect-platform-Http-Client.cjs.dev.js +6 -6
  24. package/Http/Client/dist/effect-platform-Http-Client.cjs.prod.js +6 -6
  25. package/Http/Client/dist/effect-platform-Http-Client.esm.js +6 -6
  26. package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.dev.js +5 -5
  27. package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.cjs.prod.js +5 -5
  28. package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.esm.js +5 -5
  29. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.dev.js +4 -4
  30. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.prod.js +4 -4
  31. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.esm.js +4 -4
  32. package/Http/FormData/dist/effect-platform-Http-FormData.cjs.dev.js +3 -3
  33. package/Http/FormData/dist/effect-platform-Http-FormData.cjs.prod.js +3 -3
  34. package/Http/FormData/dist/effect-platform-Http-FormData.esm.js +3 -3
  35. package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.dev.js +2 -2
  36. package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.prod.js +2 -2
  37. package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js +2 -2
  38. package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.dev.js +11 -11
  39. package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.mjs +0 -1
  40. package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.prod.js +11 -11
  41. package/Http/Middleware/dist/effect-platform-Http-Middleware.esm.js +11 -10
  42. package/Http/Platform/dist/effect-platform-Http-Platform.cjs.dev.js +3 -3
  43. package/Http/Platform/dist/effect-platform-Http-Platform.cjs.prod.js +3 -3
  44. package/Http/Platform/dist/effect-platform-Http-Platform.esm.js +2 -2
  45. package/Http/Router/dist/effect-platform-Http-Router.cjs.dev.js +5 -5
  46. package/Http/Router/dist/effect-platform-Http-Router.cjs.prod.js +5 -5
  47. package/Http/Router/dist/effect-platform-Http-Router.esm.js +5 -5
  48. package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.dev.js +4 -4
  49. package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.cjs.prod.js +4 -4
  50. package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.esm.js +4 -4
  51. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.dev.js +4 -4
  52. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.prod.js +4 -4
  53. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.esm.js +4 -4
  54. package/HttpClient/dist/effect-platform-HttpClient.cjs.dev.js +9 -9
  55. package/HttpClient/dist/effect-platform-HttpClient.cjs.prod.js +9 -9
  56. package/HttpClient/dist/effect-platform-HttpClient.esm.js +9 -9
  57. package/HttpServer/dist/effect-platform-HttpServer.cjs.dev.js +15 -15
  58. package/HttpServer/dist/effect-platform-HttpServer.cjs.prod.js +15 -15
  59. package/HttpServer/dist/effect-platform-HttpServer.esm.js +15 -15
  60. package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.dev.js +227 -18
  61. package/KeyValueStore/dist/effect-platform-KeyValueStore.cjs.prod.js +227 -18
  62. package/KeyValueStore/dist/effect-platform-KeyValueStore.esm.js +199 -10
  63. package/Path/dist/effect-platform-Path.cjs.dev.js +142 -9
  64. package/Path/dist/effect-platform-Path.cjs.prod.js +142 -9
  65. package/Path/dist/effect-platform-Path.esm.js +122 -7
  66. package/Runtime/dist/effect-platform-Runtime.cjs.dev.js +44 -4
  67. package/Runtime/dist/effect-platform-Runtime.cjs.prod.js +44 -4
  68. package/Runtime/dist/effect-platform-Runtime.esm.js +26 -3
  69. package/dist/App-18152f12.cjs.dev.js +93 -0
  70. package/dist/App-1ca51fa7.esm.js +65 -0
  71. package/dist/App-d8b904fa.cjs.prod.js +93 -0
  72. package/dist/{Body-ec1353f9.esm.js → Body-40ced606.esm.js} +1 -1
  73. package/dist/{Body-86ef2922.cjs.dev.js → Body-4a7ad057.cjs.dev.js} +1 -1
  74. package/dist/{Body-b77eac75.cjs.prod.js → Body-c26fa93f.cjs.prod.js} +1 -1
  75. package/dist/{Client-7b851481.cjs.prod.js → Client-03fea3d9.cjs.prod.js} +3 -3
  76. package/dist/{Client-4659bda7.esm.js → Client-55ef15d5.esm.js} +3 -3
  77. package/dist/{Client-440a1019.cjs.dev.js → Client-c05eadcd.cjs.dev.js} +3 -3
  78. package/dist/{ClientRequest-fc429335.esm.js → ClientRequest-490c76cd.esm.js} +1 -1
  79. package/dist/{ClientRequest-750d8d59.cjs.prod.js → ClientRequest-a729f345.cjs.prod.js} +1 -1
  80. package/dist/{ClientRequest-00e89da8.cjs.dev.js → ClientRequest-c5336a28.cjs.dev.js} +1 -1
  81. package/dist/{ClientResponse-4524e99e.esm.js → ClientResponse-6e84da40.esm.js} +1 -1
  82. package/dist/{ClientResponse-fe4e69c8.cjs.prod.js → ClientResponse-c19fd519.cjs.prod.js} +1 -1
  83. package/dist/{ClientResponse-1476704c.cjs.dev.js → ClientResponse-df62564e.cjs.dev.js} +1 -1
  84. package/dist/{FormData-ee0b1cf2.cjs.dev.js → FormData-6d030595.cjs.prod.js} +1 -1
  85. package/dist/{FormData-902afd18.cjs.prod.js → FormData-7ea13198.cjs.dev.js} +1 -1
  86. package/dist/{FormData-f54de878.esm.js → FormData-bd727d2f.esm.js} +1 -1
  87. package/dist/{Middleware-f9a073d7.cjs.prod.js → Middleware-6de1c21d.cjs.prod.js} +14 -20
  88. package/dist/{Middleware-e2edf820.cjs.dev.js → Middleware-b1d126b4.cjs.dev.js} +14 -20
  89. package/dist/{Middleware-240f91f6.esm.js → Middleware-d38ef616.esm.js} +15 -20
  90. package/dist/{Router-bf32317a.esm.js → Router-2ee665b4.esm.js} +2 -2
  91. package/dist/{Router-bd2b3014.cjs.dev.js → Router-43e62bd9.cjs.dev.js} +2 -2
  92. package/dist/{Router-6c80a4c9.cjs.prod.js → Router-53ec1aea.cjs.prod.js} +2 -2
  93. package/dist/{ServerRequest-03161edc.esm.js → ServerRequest-a641c507.esm.js} +1 -1
  94. package/dist/{ServerRequest-8d9c2c6b.cjs.dev.js → ServerRequest-cb289dae.cjs.dev.js} +1 -1
  95. package/dist/{ServerRequest-938f3ed0.cjs.prod.js → ServerRequest-ec4da01b.cjs.prod.js} +1 -1
  96. package/dist/{ServerResponse-93038062.esm.js → ServerResponse-03c252ea.esm.js} +2 -2
  97. package/dist/{ServerResponse-b63b7192.cjs.dev.js → ServerResponse-9af42ecb.cjs.dev.js} +2 -2
  98. package/dist/{ServerResponse-eae85b08.cjs.prod.js → ServerResponse-db87bde2.cjs.prod.js} +2 -2
  99. package/dist/{body-33521da5.cjs.prod.js → body-95276637.cjs.prod.js} +3 -3
  100. package/dist/{body-c7d7a944.cjs.dev.js → body-cea7c1c9.cjs.dev.js} +3 -3
  101. package/dist/{body-20d78ec1.esm.js → body-db8cfb3d.esm.js} +1 -1
  102. package/dist/{clientRequest-3e72ec54.cjs.prod.js → clientRequest-539df396.cjs.prod.js} +1 -1
  103. package/dist/{clientRequest-1e9e0b0d.esm.js → clientRequest-6121a7f6.esm.js} +1 -1
  104. package/dist/{clientRequest-423fd562.cjs.dev.js → clientRequest-dae0c34e.cjs.dev.js} +1 -1
  105. package/dist/{clientResponse-8c2ec6a3.esm.js → clientResponse-0ace0007.esm.js} +2 -2
  106. package/dist/{clientResponse-79c84a64.cjs.dev.js → clientResponse-43bb73b9.cjs.dev.js} +2 -2
  107. package/dist/{clientResponse-f9c57e83.cjs.prod.js → clientResponse-82dae5d8.cjs.prod.js} +2 -2
  108. package/dist/declarations/src/Http/App.d.ts +28 -1
  109. package/dist/declarations/src/Http/App.d.ts.map +1 -1
  110. package/dist/declarations/src/Http/Middleware.d.ts +0 -5
  111. package/dist/declarations/src/Http/Middleware.d.ts.map +1 -1
  112. package/dist/declarations/src/index.d.ts.map +1 -1
  113. package/dist/effect-platform.cjs.dev.js +49 -68
  114. package/dist/effect-platform.cjs.prod.js +49 -68
  115. package/dist/effect-platform.esm.js +20 -58
  116. package/package.json +8 -5
  117. package/src/Http/App.ts +76 -3
  118. package/src/Http/Middleware.ts +0 -6
  119. package/src/index.ts +10 -10
  120. package/src/internal/http/clientResponse.ts +2 -2
  121. package/src/internal/http/middleware.ts +21 -19
  122. package/src/internal/http/router.ts +1 -1
  123. package/src/internal/http/serverResponse.ts +1 -1
  124. package/dist/App-0916639a.cjs.prod.js +0 -7
  125. package/dist/App-44aa3275.cjs.dev.js +0 -7
  126. package/dist/App-687366d8.esm.js +0 -5
  127. package/dist/Command-032c414c.cjs.dev.js +0 -446
  128. package/dist/Command-25ef5e94.cjs.prod.js +0 -446
  129. package/dist/Command-d8ab0c8d.esm.js +0 -403
  130. package/dist/CommandExecutor-158ea1d3.cjs.dev.js +0 -87
  131. package/dist/CommandExecutor-5807b66b.esm.js +0 -80
  132. package/dist/CommandExecutor-7fcae408.cjs.prod.js +0 -87
  133. package/dist/Effectify-2d8c3af9.cjs.dev.js +0 -66
  134. package/dist/Effectify-38757ba5.cjs.prod.js +0 -66
  135. package/dist/Effectify-e5a9d266.esm.js +0 -43
  136. package/dist/Error-09496a70.cjs.dev.js +0 -100
  137. package/dist/Error-2c4e6ce2.cjs.prod.js +0 -100
  138. package/dist/Error-3099667c.esm.js +0 -75
  139. package/dist/FileSystem-3d439a05.cjs.prod.js +0 -308
  140. package/dist/FileSystem-4c7daaf0.cjs.dev.js +0 -308
  141. package/dist/FileSystem-7e31dccd.esm.js +0 -271
  142. package/dist/HttpClient-4d23b1f5.cjs.dev.js +0 -26
  143. package/dist/HttpClient-88775b8e.cjs.prod.js +0 -26
  144. package/dist/HttpClient-9ca6050c.esm.js +0 -24
  145. package/dist/HttpServer-16159c3a.cjs.dev.js +0 -32
  146. package/dist/HttpServer-50f8df76.esm.js +0 -30
  147. package/dist/HttpServer-93c0fbb3.cjs.prod.js +0 -32
  148. package/dist/KeyValueStore-2f9a70bf.esm.js +0 -210
  149. package/dist/KeyValueStore-f6c5b981.cjs.prod.js +0 -244
  150. package/dist/KeyValueStore-f9c93610.cjs.dev.js +0 -244
  151. package/dist/Path-3574641f.cjs.prod.js +0 -154
  152. package/dist/Path-46f84ba7.esm.js +0 -128
  153. package/dist/Path-7ba7e370.cjs.dev.js +0 -154
  154. package/dist/Runtime-1edd577a.cjs.dev.js +0 -55
  155. package/dist/Runtime-515efccf.cjs.prod.js +0 -55
  156. package/dist/Runtime-7265fb98.esm.js +0 -31
@@ -1,12 +1,385 @@
1
- export { a as CommandTypeId, e as env, b as exitCode, f as feed, c as flatten, i as isCommand, l as lines, m as make, p as pipeTo, s as start, j as stderr, k as stdin, n as stdout, d as stream, g as streamLines, h as string, w as workingDirectory } from '../../dist/Command-d8ab0c8d.esm.js';
2
- import 'effect/Chunk';
3
- import 'effect/Effect';
4
- import 'effect/Function';
5
- import 'effect/HashMap';
6
- import 'effect/Option';
7
- import 'effect/Pipeable';
8
- import 'effect/Stream';
9
- import '../../dist/commandExecutor-d6457489.esm.js';
1
+ import * as Chunk from 'effect/Chunk';
2
+ import * as Effect from 'effect/Effect';
3
+ import { dual } from 'effect/Function';
4
+ import * as HashMap from 'effect/HashMap';
5
+ import * as Option from 'effect/Option';
6
+ import { pipeArguments } from 'effect/Pipeable';
7
+ import * as Stream from 'effect/Stream';
8
+ import { C as CommandExecutor } from '../../dist/commandExecutor-d6457489.esm.js';
10
9
  import 'effect/Brand';
11
10
  import 'effect/Context';
12
11
  import 'effect/Sink';
12
+
13
+ /** @internal */
14
+ const CommandTypeId$1 = /*#__PURE__*/Symbol.for("@effect/platform/Command");
15
+
16
+ /** @internal */
17
+ const isCommand$1 = u => typeof u === "object" && u != null && CommandTypeId$1 in u;
18
+
19
+ /** @internal */
20
+ const env$1 = /*#__PURE__*/dual(2, (self, environment) => {
21
+ switch (self._tag) {
22
+ case "StandardCommand":
23
+ {
24
+ return {
25
+ ...self,
26
+ env: HashMap.union(self.env, HashMap.fromIterable(Object.entries(environment)))
27
+ };
28
+ }
29
+ case "PipedCommand":
30
+ {
31
+ return pipeTo$1(env$1(self.left, environment), env$1(self.right, environment));
32
+ }
33
+ }
34
+ });
35
+
36
+ /** @internal */
37
+ const exitCode$1 = self => Effect.flatMap(CommandExecutor, executor => executor.exitCode(self));
38
+
39
+ /** @internal */
40
+ const feed$1 = /*#__PURE__*/dual(2, (self, input) => stdin$1(self, Stream.fromChunk(Chunk.of(new TextEncoder().encode(input)))));
41
+
42
+ /** @internal */
43
+ const flatten$1 = self => Array.from(flattenLoop(self));
44
+
45
+ /** @internal */
46
+ const flattenLoop = self => {
47
+ switch (self._tag) {
48
+ case "StandardCommand":
49
+ {
50
+ return Chunk.of(self);
51
+ }
52
+ case "PipedCommand":
53
+ {
54
+ return Chunk.appendAll(flattenLoop(self.left), flattenLoop(self.right));
55
+ }
56
+ }
57
+ };
58
+
59
+ /** @internal */
60
+ const lines$1 = (command, encoding = "utf-8") => Effect.flatMap(CommandExecutor, executor => executor.lines(command, encoding));
61
+
62
+ /** @internal */
63
+ const make$1 = (command, ...args) => ({
64
+ [CommandTypeId$1]: CommandTypeId$1,
65
+ _tag: "StandardCommand",
66
+ command,
67
+ args,
68
+ env: HashMap.empty(),
69
+ cwd: Option.none(),
70
+ // The initial process input here does not matter, we just want the child
71
+ // process to default to `"pipe"` for the stdin stream.
72
+ stdin: Option.some(Stream.empty),
73
+ stdout: "pipe",
74
+ stderr: "pipe",
75
+ gid: Option.none(),
76
+ uid: Option.none(),
77
+ pipe() {
78
+ return pipeArguments(this, arguments);
79
+ }
80
+ });
81
+
82
+ /** @internal */
83
+ const pipeTo$1 = /*#__PURE__*/dual(2, (self, into) => ({
84
+ [CommandTypeId$1]: CommandTypeId$1,
85
+ _tag: "PipedCommand",
86
+ left: self,
87
+ right: into,
88
+ pipe() {
89
+ return pipeArguments(this, arguments);
90
+ }
91
+ }));
92
+
93
+ /** @internal */
94
+ const stderr$1 = /*#__PURE__*/dual(2, (self, output) => {
95
+ switch (self._tag) {
96
+ case "StandardCommand":
97
+ {
98
+ return {
99
+ ...self,
100
+ stderr: output
101
+ };
102
+ }
103
+ // For piped commands it only makes sense to provide `stderr` for the
104
+ // right-most command as the rest will be piped in.
105
+ case "PipedCommand":
106
+ {
107
+ return {
108
+ ...self,
109
+ right: stderr$1(self.right, output)
110
+ };
111
+ }
112
+ }
113
+ });
114
+
115
+ /** @internal */
116
+ const stdin$1 = /*#__PURE__*/dual(2, (self, input) => {
117
+ switch (self._tag) {
118
+ case "StandardCommand":
119
+ {
120
+ return {
121
+ ...self,
122
+ stdin: Option.some(input)
123
+ };
124
+ }
125
+ // For piped commands it only makes sense to provide `stdin` for the
126
+ // left-most command as the rest will be piped in.
127
+ case "PipedCommand":
128
+ {
129
+ return {
130
+ ...self,
131
+ left: stdin$1(self.left, input)
132
+ };
133
+ }
134
+ }
135
+ });
136
+
137
+ /** @internal */
138
+ const stdout$1 = /*#__PURE__*/dual(2, (self, output) => {
139
+ switch (self._tag) {
140
+ case "StandardCommand":
141
+ {
142
+ return {
143
+ ...self,
144
+ stdout: output
145
+ };
146
+ }
147
+ // For piped commands it only makes sense to provide `stderr` for the
148
+ // right-most command as the rest will be piped in.
149
+ case "PipedCommand":
150
+ {
151
+ return {
152
+ ...self,
153
+ right: stdout$1(self.right, output)
154
+ };
155
+ }
156
+ }
157
+ });
158
+
159
+ /** @internal */
160
+ const start$1 = command => Effect.flatMap(CommandExecutor, executor => executor.start(command));
161
+
162
+ /** @internal */
163
+ const stream$1 = command => Stream.flatMap(CommandExecutor, process => process.stream(command));
164
+
165
+ /** @internal */
166
+ const streamLines$1 = command => Stream.flatMap(CommandExecutor, process => process.streamLines(command));
167
+
168
+ /** @internal */
169
+ const string$1 = /*#__PURE__*/dual(args => isCommand$1(args[0]), (command, encoding) => Effect.flatMap(CommandExecutor, executor => executor.string(command, encoding)));
170
+
171
+ /** @internal */
172
+ const workingDirectory$1 = /*#__PURE__*/dual(2, (self, cwd) => {
173
+ switch (self._tag) {
174
+ case "StandardCommand":
175
+ {
176
+ return {
177
+ ...self,
178
+ cwd: Option.some(cwd)
179
+ };
180
+ }
181
+ case "PipedCommand":
182
+ {
183
+ return pipeTo$1(workingDirectory$1(self.left, cwd), workingDirectory$1(self.right, cwd));
184
+ }
185
+ }
186
+ });
187
+
188
+ /**
189
+ * @since 1.0.0
190
+ */
191
+
192
+ /**
193
+ * @since 1.0.0
194
+ */
195
+ const CommandTypeId = CommandTypeId$1;
196
+
197
+ /**
198
+ * @since 1.0.0
199
+ */
200
+
201
+ /**
202
+ * @since 1.0.0
203
+ * @category models
204
+ */
205
+
206
+ /**
207
+ * @since 1.0.0
208
+ */
209
+
210
+ /**
211
+ * Configures the pipe that is established between the parent and child
212
+ * processes' `stdin` stream.
213
+ *
214
+ * @since 1.0.0
215
+ * @category models
216
+ */
217
+
218
+ /**
219
+ * Configures the pipes that are established between the parent and child
220
+ * processes `stderr` and `stdout` streams.
221
+ *
222
+ * @since 1.0.0
223
+ * @category models
224
+ */
225
+
226
+ /**
227
+ * @since 1.0.0
228
+ * @category models
229
+ */
230
+
231
+ /**
232
+ * @since 1.0.0
233
+ * @category models
234
+ */
235
+
236
+ /**
237
+ * Returns `true` if the specified value is a `Command`, otherwise returns
238
+ * `false`.
239
+ *
240
+ * @since 1.0.0
241
+ * @category refinements
242
+ */
243
+ const isCommand = isCommand$1;
244
+
245
+ /**
246
+ * Specify the environment variables that will be used when running this command.
247
+ *
248
+ * @since 1.0.0
249
+ * @category combinators
250
+ */
251
+ const env = env$1;
252
+
253
+ /**
254
+ * Returns the exit code of the command after the process has completed
255
+ * execution.
256
+ *
257
+ * @since 1.0.0
258
+ * @category execution
259
+ */
260
+ const exitCode = exitCode$1;
261
+
262
+ /**
263
+ * Feed a string to standard input (default encoding of UTF-8).
264
+ *
265
+ * @since 1.0.0
266
+ * @category combinators
267
+ */
268
+ const feed = feed$1;
269
+
270
+ /**
271
+ * Flatten this command to a non-empty array of standard commands.
272
+ *
273
+ * * For a `StandardCommand`, this simply returns a `1` element array
274
+ * * For a `PipedCommand`, all commands in the pipe will be extracted out into
275
+ * a array from left to right
276
+ *
277
+ * @since 1.0.0
278
+ * @category combinators
279
+ */
280
+ const flatten = flatten$1;
281
+
282
+ /**
283
+ * Runs the command returning the output as an array of lines with the specified
284
+ * encoding.
285
+ *
286
+ * @since 1.0.0
287
+ * @category execution
288
+ */
289
+ const lines = lines$1;
290
+
291
+ /**
292
+ * Create a command with the specified process name and an optional list of
293
+ * arguments.
294
+ *
295
+ * @since 1.0.0
296
+ * @category constructors
297
+ */
298
+ const make = make$1;
299
+
300
+ /**
301
+ * Pipe one command to another command from left to right.
302
+ *
303
+ * Conceptually, the equivalent of piping one shell command to another:
304
+ *
305
+ * ```sh
306
+ * command1 | command2
307
+ * ```
308
+ *
309
+ * @since 1.0.0
310
+ * @category combinators
311
+ */
312
+ const pipeTo = pipeTo$1;
313
+
314
+ /**
315
+ * Start running the command and return a handle to the running process.
316
+ *
317
+ * @since 1.0.0
318
+ * @category execution
319
+ */
320
+ const start = start$1;
321
+
322
+ /**
323
+ * Start running the command and return the output as a `Stream`.
324
+ *
325
+ * @since 1.0.0
326
+ * @category execution
327
+ */
328
+ const stream = stream$1;
329
+
330
+ /**
331
+ * Runs the command returning the output as an stream of lines with the
332
+ * specified encoding.
333
+ *
334
+ * @since 1.0.0
335
+ * @category execution
336
+ */
337
+ const streamLines = streamLines$1;
338
+
339
+ /**
340
+ * Runs the command returning the entire output as a string with the
341
+ * specified encoding.
342
+ *
343
+ * If an encoding is not specified, the encoding will default to `utf-8`.
344
+ *
345
+ * @since 1.0.0
346
+ * @category execution
347
+ */
348
+ const string = string$1;
349
+
350
+ /**
351
+ * Specify the standard error stream for a command.
352
+ *
353
+ * @since 1.0.0
354
+ * @category combinators
355
+ */
356
+ const stderr = stderr$1;
357
+
358
+ /**
359
+ * Specify the standard input stream for a command.
360
+ *
361
+ * @since 1.0.0
362
+ * @category combinators
363
+ */
364
+ const stdin = stdin$1;
365
+
366
+ /**
367
+ * Specify the standard output stream for a command.
368
+ *
369
+ * @since 1.0.0
370
+ * @category combinators
371
+ */
372
+ const stdout = stdout$1;
373
+
374
+ /**
375
+ * Set the working directory that will be used when this command will be run.
376
+ *
377
+ * For piped commands, the working directory of each command will be set to the
378
+ * specified working directory.
379
+ *
380
+ * @since 1.0.0
381
+ * @category combinators
382
+ */
383
+ const workingDirectory = workingDirectory$1;
384
+
385
+ export { CommandTypeId, env, exitCode, feed, flatten, isCommand, lines, make, pipeTo, start, stderr, stdin, stdout, stream, streamLines, string, workingDirectory };
@@ -2,8 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../dist/commandExecutor-fc92de95.cjs.dev.js');
6
- var CommandExecutor_dist_effectPlatformCommandExecutor = require('../../dist/CommandExecutor-158ea1d3.cjs.dev.js');
5
+ var commandExecutor = require('../../dist/commandExecutor-fc92de95.cjs.dev.js');
7
6
  require('effect/Brand');
8
7
  require('effect/Chunk');
9
8
  require('effect/Context');
@@ -12,10 +11,76 @@ require('effect/Function');
12
11
  require('effect/Sink');
13
12
  require('effect/Stream');
14
13
 
14
+ /**
15
+ * @since 1.0.0
16
+ */
15
17
 
18
+ /**
19
+ * @since 1.0.0
20
+ * @category models
21
+ */
16
22
 
17
- exports.CommandExecutor = CommandExecutor_dist_effectPlatformCommandExecutor.CommandExecutor$1;
18
- exports.ExitCode = CommandExecutor_dist_effectPlatformCommandExecutor.ExitCode;
19
- exports.ProcessId = CommandExecutor_dist_effectPlatformCommandExecutor.ProcessId;
20
- exports.ProcessTypeId = CommandExecutor_dist_effectPlatformCommandExecutor.ProcessTypeId;
21
- exports.makeExecutor = CommandExecutor_dist_effectPlatformCommandExecutor.makeExecutor;
23
+ /**
24
+ * @since 1.0.0
25
+ * @category tags
26
+ */
27
+ const CommandExecutor = commandExecutor.CommandExecutor;
28
+
29
+ /**
30
+ * @since 1.0.0
31
+ * @category symbols
32
+ */
33
+ const ProcessTypeId = commandExecutor.ProcessTypeId;
34
+
35
+ /**
36
+ * @since 1.0.0
37
+ * @category symbols
38
+ */
39
+
40
+ /**
41
+ * @since 1.0.0
42
+ * @category models
43
+ */
44
+
45
+ /**
46
+ * @since 1.0.0
47
+ * @category models
48
+ */
49
+
50
+ /**
51
+ * @since 1.0.0
52
+ */
53
+
54
+ /**
55
+ * @since 1.0.0
56
+ * @category models
57
+ */
58
+
59
+ /**
60
+ * @since 1.0.0
61
+ * @category models
62
+ */
63
+
64
+ /**
65
+ * @since 1.0.0
66
+ * @category constructors
67
+ */
68
+ const ExitCode = commandExecutor.ExitCode;
69
+
70
+ /**
71
+ * @since 1.0.0
72
+ * @category constructors
73
+ */
74
+ const ProcessId = commandExecutor.ProcessId;
75
+
76
+ /**
77
+ * @since 1.0.0
78
+ * @category constructors
79
+ */
80
+ const makeExecutor = commandExecutor.makeExecutor;
81
+
82
+ exports.CommandExecutor = CommandExecutor;
83
+ exports.ExitCode = ExitCode;
84
+ exports.ProcessId = ProcessId;
85
+ exports.ProcessTypeId = ProcessTypeId;
86
+ exports.makeExecutor = makeExecutor;
@@ -2,8 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- require('../../dist/commandExecutor-17a55a1c.cjs.prod.js');
6
- var CommandExecutor_dist_effectPlatformCommandExecutor = require('../../dist/CommandExecutor-7fcae408.cjs.prod.js');
5
+ var commandExecutor = require('../../dist/commandExecutor-17a55a1c.cjs.prod.js');
7
6
  require('effect/Brand');
8
7
  require('effect/Chunk');
9
8
  require('effect/Context');
@@ -12,10 +11,76 @@ require('effect/Function');
12
11
  require('effect/Sink');
13
12
  require('effect/Stream');
14
13
 
14
+ /**
15
+ * @since 1.0.0
16
+ */
15
17
 
18
+ /**
19
+ * @since 1.0.0
20
+ * @category models
21
+ */
16
22
 
17
- exports.CommandExecutor = CommandExecutor_dist_effectPlatformCommandExecutor.CommandExecutor$1;
18
- exports.ExitCode = CommandExecutor_dist_effectPlatformCommandExecutor.ExitCode;
19
- exports.ProcessId = CommandExecutor_dist_effectPlatformCommandExecutor.ProcessId;
20
- exports.ProcessTypeId = CommandExecutor_dist_effectPlatformCommandExecutor.ProcessTypeId;
21
- exports.makeExecutor = CommandExecutor_dist_effectPlatformCommandExecutor.makeExecutor;
23
+ /**
24
+ * @since 1.0.0
25
+ * @category tags
26
+ */
27
+ const CommandExecutor = commandExecutor.CommandExecutor;
28
+
29
+ /**
30
+ * @since 1.0.0
31
+ * @category symbols
32
+ */
33
+ const ProcessTypeId = commandExecutor.ProcessTypeId;
34
+
35
+ /**
36
+ * @since 1.0.0
37
+ * @category symbols
38
+ */
39
+
40
+ /**
41
+ * @since 1.0.0
42
+ * @category models
43
+ */
44
+
45
+ /**
46
+ * @since 1.0.0
47
+ * @category models
48
+ */
49
+
50
+ /**
51
+ * @since 1.0.0
52
+ */
53
+
54
+ /**
55
+ * @since 1.0.0
56
+ * @category models
57
+ */
58
+
59
+ /**
60
+ * @since 1.0.0
61
+ * @category models
62
+ */
63
+
64
+ /**
65
+ * @since 1.0.0
66
+ * @category constructors
67
+ */
68
+ const ExitCode = commandExecutor.ExitCode;
69
+
70
+ /**
71
+ * @since 1.0.0
72
+ * @category constructors
73
+ */
74
+ const ProcessId = commandExecutor.ProcessId;
75
+
76
+ /**
77
+ * @since 1.0.0
78
+ * @category constructors
79
+ */
80
+ const makeExecutor = commandExecutor.makeExecutor;
81
+
82
+ exports.CommandExecutor = CommandExecutor;
83
+ exports.ExitCode = ExitCode;
84
+ exports.ProcessId = ProcessId;
85
+ exports.ProcessTypeId = ProcessTypeId;
86
+ exports.makeExecutor = makeExecutor;
@@ -1,5 +1,4 @@
1
- import '../../dist/commandExecutor-d6457489.esm.js';
2
- export { a as CommandExecutor, E as ExitCode, b as ProcessId, P as ProcessTypeId, m as makeExecutor } from '../../dist/CommandExecutor-5807b66b.esm.js';
1
+ import { C as CommandExecutor$1, P as ProcessTypeId$1, E as ExitCode$1, a as ProcessId$1, m as makeExecutor$1 } from '../../dist/commandExecutor-d6457489.esm.js';
3
2
  import 'effect/Brand';
4
3
  import 'effect/Chunk';
5
4
  import 'effect/Context';
@@ -7,3 +6,73 @@ import 'effect/Effect';
7
6
  import 'effect/Function';
8
7
  import 'effect/Sink';
9
8
  import 'effect/Stream';
9
+
10
+ /**
11
+ * @since 1.0.0
12
+ */
13
+
14
+ /**
15
+ * @since 1.0.0
16
+ * @category models
17
+ */
18
+
19
+ /**
20
+ * @since 1.0.0
21
+ * @category tags
22
+ */
23
+ const CommandExecutor = CommandExecutor$1;
24
+
25
+ /**
26
+ * @since 1.0.0
27
+ * @category symbols
28
+ */
29
+ const ProcessTypeId = ProcessTypeId$1;
30
+
31
+ /**
32
+ * @since 1.0.0
33
+ * @category symbols
34
+ */
35
+
36
+ /**
37
+ * @since 1.0.0
38
+ * @category models
39
+ */
40
+
41
+ /**
42
+ * @since 1.0.0
43
+ * @category models
44
+ */
45
+
46
+ /**
47
+ * @since 1.0.0
48
+ */
49
+
50
+ /**
51
+ * @since 1.0.0
52
+ * @category models
53
+ */
54
+
55
+ /**
56
+ * @since 1.0.0
57
+ * @category models
58
+ */
59
+
60
+ /**
61
+ * @since 1.0.0
62
+ * @category constructors
63
+ */
64
+ const ExitCode = ExitCode$1;
65
+
66
+ /**
67
+ * @since 1.0.0
68
+ * @category constructors
69
+ */
70
+ const ProcessId = ProcessId$1;
71
+
72
+ /**
73
+ * @since 1.0.0
74
+ * @category constructors
75
+ */
76
+ const makeExecutor = makeExecutor$1;
77
+
78
+ export { CommandExecutor, ExitCode, ProcessId, ProcessTypeId, makeExecutor };
@@ -2,9 +2,61 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Effectify_dist_effectPlatformEffectify = require('../../dist/Effectify-2d8c3af9.cjs.dev.js');
6
- require('effect/Effect');
5
+ var Effect = require('effect/Effect');
7
6
 
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
8
24
 
25
+ var Effect__namespace = /*#__PURE__*/_interopNamespace(Effect);
9
26
 
10
- exports.effectify = Effectify_dist_effectPlatformEffectify.effectify;
27
+ /** @internal */
28
+ const effectify$1 = (fn, onError, onSyncError) => (...args) => Effect__namespace.async(resume => {
29
+ try {
30
+ fn(...args, (err, result) => {
31
+ if (err) {
32
+ resume(Effect__namespace.fail(onError ? onError(err, args) : err));
33
+ } else {
34
+ resume(Effect__namespace.succeed(result));
35
+ }
36
+ });
37
+ } catch (err) {
38
+ resume(onSyncError ? Effect__namespace.fail(onSyncError(err, args)) : Effect__namespace.die(err));
39
+ }
40
+ });
41
+
42
+ /**
43
+ * @since 1.0.0
44
+ */
45
+
46
+ /**
47
+ * Converts a callback-based function to a function that returns an `Effect`.
48
+ *
49
+ * @since 1.0.0
50
+ */
51
+
52
+ /**
53
+ * @category util
54
+ * @since 1.0.0
55
+ */
56
+
57
+ /**
58
+ * @since 1.0.0
59
+ */
60
+ const effectify = effectify$1;
61
+
62
+ exports.effectify = effectify;