@effect/platform 0.18.4 → 0.18.6

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 (109) hide show
  1. package/Command/dist/effect-platform-Command.esm.js +12 -200
  2. package/CommandExecutor/dist/effect-platform-CommandExecutor.esm.js +9 -71
  3. package/Effectify/dist/effect-platform-Effectify.esm.js +2 -23
  4. package/Error/dist/effect-platform-Error.esm.js +2 -54
  5. package/FileSystem/dist/effect-platform-FileSystem.esm.js +10 -177
  6. package/Http/Body/dist/effect-platform-Http-Body.esm.js +13 -151
  7. package/Http/Client/dist/effect-platform-Http-Client.cjs.dev.js +2 -2
  8. package/Http/Client/dist/effect-platform-Http-Client.cjs.prod.js +2 -2
  9. package/Http/Client/dist/effect-platform-Http-Client.esm.js +28 -164
  10. package/Http/ClientError/dist/effect-platform-Http-ClientError.esm.js +3 -48
  11. package/Http/ClientRequest/dist/effect-platform-Http-ClientRequest.esm.js +20 -241
  12. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.dev.js +3 -2
  13. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.mjs +2 -1
  14. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.cjs.prod.js +3 -2
  15. package/Http/ClientResponse/dist/effect-platform-Http-ClientResponse.esm.js +22 -35
  16. package/Http/Etag/dist/effect-platform-Http-Etag.esm.js +17 -1
  17. package/Http/FormData/dist/effect-platform-Http-FormData.esm.js +17 -155
  18. package/Http/Headers/dist/effect-platform-Http-Headers.esm.js +4 -74
  19. package/Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js +6 -1
  20. package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.dev.js +3 -3
  21. package/Http/Middleware/dist/effect-platform-Http-Middleware.cjs.prod.js +3 -3
  22. package/Http/Middleware/dist/effect-platform-Http-Middleware.esm.js +30 -52
  23. package/Http/Platform/dist/effect-platform-Http-Platform.esm.js +56 -1
  24. package/Http/Router/dist/effect-platform-Http-Router.esm.js +25 -224
  25. package/Http/Server/dist/effect-platform-Http-Server.esm.js +18 -1
  26. package/Http/ServerError/dist/effect-platform-Http-ServerError.esm.js +2 -70
  27. package/Http/ServerRequest/dist/effect-platform-Http-ServerRequest.esm.js +20 -65
  28. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.dev.js +2 -2
  29. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.cjs.prod.js +2 -2
  30. package/Http/ServerResponse/dist/effect-platform-Http-ServerResponse.esm.js +21 -126
  31. package/Http/UrlParams/dist/effect-platform-Http-UrlParams.esm.js +4 -101
  32. package/HttpClient/dist/effect-platform-HttpClient.cjs.dev.js +3 -3
  33. package/HttpClient/dist/effect-platform-HttpClient.cjs.prod.js +3 -3
  34. package/HttpClient/dist/effect-platform-HttpClient.esm.js +32 -18
  35. package/HttpServer/dist/effect-platform-HttpServer.cjs.dev.js +2 -3
  36. package/HttpServer/dist/effect-platform-HttpServer.cjs.prod.js +2 -3
  37. package/HttpServer/dist/effect-platform-HttpServer.esm.js +35 -24
  38. package/KeyValueStore/dist/effect-platform-KeyValueStore.esm.js +15 -78
  39. package/Path/dist/effect-platform-Path.esm.js +8 -33
  40. package/Runtime/dist/effect-platform-Runtime.esm.js +3 -26
  41. package/dist/App-687366d8.esm.js +5 -0
  42. package/dist/Body-ec1353f9.esm.js +170 -0
  43. package/dist/{Client-15671ed6.cjs.dev.js → Client-440a1019.cjs.dev.js} +1 -1
  44. package/dist/Client-4659bda7.esm.js +346 -0
  45. package/dist/{Client-6b3e3de8.cjs.prod.js → Client-7b851481.cjs.prod.js} +1 -1
  46. package/dist/ClientError-98b5da8c.esm.js +55 -0
  47. package/dist/ClientRequest-fc429335.esm.js +281 -0
  48. package/dist/{ClientResponse-a1d64ab8.cjs.dev.js → ClientResponse-1476704c.cjs.dev.js} +9 -1
  49. package/dist/ClientResponse-4524e99e.esm.js +53 -0
  50. package/dist/{ClientResponse-8f65511e.cjs.prod.js → ClientResponse-fe4e69c8.cjs.prod.js} +9 -1
  51. package/dist/Command-d8ab0c8d.esm.js +403 -0
  52. package/dist/CommandExecutor-5807b66b.esm.js +80 -0
  53. package/dist/Effectify-e5a9d266.esm.js +43 -0
  54. package/dist/Error-3099667c.esm.js +75 -0
  55. package/dist/FileSystem-7e31dccd.esm.js +271 -0
  56. package/dist/FormData-f54de878.esm.js +270 -0
  57. package/dist/Headers-58b56a08.esm.js +85 -0
  58. package/dist/{HttpClient-cefc7da9.cjs.dev.js → HttpClient-4d23b1f5.cjs.dev.js} +2 -2
  59. package/dist/{HttpClient-d3c69877.cjs.prod.js → HttpClient-88775b8e.cjs.prod.js} +2 -2
  60. package/dist/HttpClient-9ca6050c.esm.js +24 -0
  61. package/dist/{HttpServer-5b9d992e.cjs.dev.js → HttpServer-16159c3a.cjs.dev.js} +2 -2
  62. package/dist/HttpServer-50f8df76.esm.js +30 -0
  63. package/dist/{HttpServer-60325fb0.cjs.prod.js → HttpServer-93c0fbb3.cjs.prod.js} +2 -2
  64. package/{internal/keyValueStore.esm.js → dist/KeyValueStore-2f9a70bf.esm.js} +102 -15
  65. package/dist/Middleware-240f91f6.esm.js +105 -0
  66. package/dist/{Middleware-8e7cd600.cjs.dev.js → Middleware-e2edf820.cjs.dev.js} +1 -1
  67. package/dist/{Middleware-d4f1a1cd.cjs.prod.js → Middleware-f9a073d7.cjs.prod.js} +1 -1
  68. package/{internal/path.esm.js → dist/Path-46f84ba7.esm.js} +40 -4
  69. package/dist/Router-bf32317a.esm.js +454 -0
  70. package/dist/Runtime-7265fb98.esm.js +31 -0
  71. package/dist/ServerError-04ad5b57.esm.js +99 -0
  72. package/dist/ServerRequest-03161edc.esm.js +125 -0
  73. package/dist/ServerResponse-93038062.esm.js +259 -0
  74. package/dist/{ServerResponse-7d60c7d1.cjs.dev.js → ServerResponse-b63b7192.cjs.dev.js} +15 -4
  75. package/dist/{ServerResponse-830f1052.cjs.prod.js → ServerResponse-eae85b08.cjs.prod.js} +15 -4
  76. package/dist/UrlParams-1286c728.esm.js +114 -0
  77. package/{internal/http/body.esm.js → dist/body-20d78ec1.esm.js} +2 -2
  78. package/{internal/http/clientError.esm.js → dist/clientError-c4e1466c.esm.js} +1 -1
  79. package/{internal/http/clientRequest.esm.js → dist/clientRequest-1e9e0b0d.esm.js} +4 -4
  80. package/dist/{clientResponse-c58a116c.cjs.dev.js → clientResponse-79c84a64.cjs.dev.js} +10 -0
  81. package/{internal/http/clientResponse.esm.js → dist/clientResponse-8c2ec6a3.esm.js} +14 -5
  82. package/dist/{clientResponse-2c6a83f1.cjs.prod.js → clientResponse-f9c57e83.cjs.prod.js} +10 -0
  83. package/{internal/commandExecutor.esm.js → dist/commandExecutor-d6457489.esm.js} +1 -1
  84. package/dist/declarations/src/Http/ClientResponse.d.ts +8 -0
  85. package/dist/declarations/src/Http/ClientResponse.d.ts.map +1 -1
  86. package/dist/declarations/src/Http/ServerResponse.d.ts +1 -2
  87. package/dist/declarations/src/Http/ServerResponse.d.ts.map +1 -1
  88. package/dist/effect-platform.cjs.dev.js +8 -8
  89. package/dist/effect-platform.cjs.prod.js +8 -8
  90. package/dist/effect-platform.esm.js +58 -20
  91. package/package.json +1 -2
  92. package/src/Http/ClientResponse.ts +10 -0
  93. package/src/Http/ServerResponse.ts +1 -2
  94. package/src/internal/http/clientResponse.ts +16 -0
  95. package/src/internal/http/serverResponse.ts +18 -4
  96. package/internal/command.esm.js +0 -185
  97. package/internal/effectify.esm.js +0 -18
  98. package/internal/error.esm.js +0 -17
  99. package/internal/fileSystem.esm.js +0 -82
  100. package/internal/http/client.esm.js +0 -157
  101. package/internal/http/etag.esm.js +0 -19
  102. package/internal/http/formData.esm.js +0 -95
  103. package/internal/http/middleware.esm.js +0 -46
  104. package/internal/http/platform.esm.js +0 -52
  105. package/internal/http/router.esm.js +0 -199
  106. package/internal/http/server.esm.js +0 -20
  107. package/internal/http/serverError.esm.js +0 -23
  108. package/internal/http/serverRequest.esm.js +0 -50
  109. package/internal/http/serverResponse.esm.js +0 -105
@@ -0,0 +1,53 @@
1
+ import { T as TypeId$1, f as fromWeb$1, s as schemaJson$1, a as schemaNoBody$1 } from './clientResponse-8c2ec6a3.esm.js';
2
+ import { schemaBodyJson, schemaBodyUrlParams, schemaHeaders } from '../Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.esm.js';
3
+
4
+ /**
5
+ * @since 1.0.0
6
+ */
7
+
8
+ /**
9
+ * @since 1.0.0
10
+ * @category type ids
11
+ */
12
+ const TypeId = TypeId$1;
13
+
14
+ /**
15
+ * @since 1.0.0
16
+ * @category type ids
17
+ */
18
+
19
+ /**
20
+ * @since 1.0.0
21
+ * @category models
22
+ */
23
+
24
+ /**
25
+ * @since 1.0.0
26
+ * @category constructors
27
+ */
28
+ const fromWeb = fromWeb$1;
29
+
30
+ /**
31
+ * @since 1.0.0
32
+ * @category schema
33
+ */
34
+ const schemaJson = schemaJson$1;
35
+
36
+ /**
37
+ * @since 1.0.0
38
+ * @category schema
39
+ */
40
+ const schemaNoBody = schemaNoBody$1;
41
+
42
+ var ClientResponse = /*#__PURE__*/Object.freeze({
43
+ __proto__: null,
44
+ TypeId: TypeId,
45
+ fromWeb: fromWeb,
46
+ schemaJson: schemaJson,
47
+ schemaNoBody: schemaNoBody,
48
+ schemaBodyJson: schemaBodyJson,
49
+ schemaBodyUrlParams: schemaBodyUrlParams,
50
+ schemaHeaders: schemaHeaders
51
+ });
52
+
53
+ export { ClientResponse as C, TypeId as T, schemaNoBody as a, fromWeb as f, schemaJson as s };
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var clientResponse = require('./clientResponse-2c6a83f1.cjs.prod.js');
3
+ var clientResponse = require('./clientResponse-f9c57e83.cjs.prod.js');
4
4
  var Http_IncomingMessage_dist_effectPlatformHttpIncomingMessage = require('../Http/IncomingMessage/dist/effect-platform-Http-IncomingMessage.cjs.prod.js');
5
5
 
6
6
  /**
@@ -35,11 +35,18 @@ const fromWeb = clientResponse.fromWeb;
35
35
  */
36
36
  const schemaJson = clientResponse.schemaJson;
37
37
 
38
+ /**
39
+ * @since 1.0.0
40
+ * @category schema
41
+ */
42
+ const schemaNoBody = clientResponse.schemaNoBody;
43
+
38
44
  var ClientResponse = /*#__PURE__*/Object.freeze({
39
45
  __proto__: null,
40
46
  TypeId: TypeId,
41
47
  fromWeb: fromWeb,
42
48
  schemaJson: schemaJson,
49
+ schemaNoBody: schemaNoBody,
43
50
  schemaBodyJson: Http_IncomingMessage_dist_effectPlatformHttpIncomingMessage.schemaBodyJson,
44
51
  schemaBodyUrlParams: Http_IncomingMessage_dist_effectPlatformHttpIncomingMessage.schemaBodyUrlParams,
45
52
  schemaHeaders: Http_IncomingMessage_dist_effectPlatformHttpIncomingMessage.schemaHeaders
@@ -49,3 +56,4 @@ exports.ClientResponse = ClientResponse;
49
56
  exports.TypeId = TypeId;
50
57
  exports.fromWeb = fromWeb;
51
58
  exports.schemaJson = schemaJson;
59
+ exports.schemaNoBody = schemaNoBody;
@@ -0,0 +1,403 @@
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 './commandExecutor-d6457489.esm.js';
9
+
10
+ /** @internal */
11
+ const CommandTypeId$1 = /*#__PURE__*/Symbol.for("@effect/platform/Command");
12
+
13
+ /** @internal */
14
+ const isCommand$1 = u => typeof u === "object" && u != null && CommandTypeId$1 in u;
15
+
16
+ /** @internal */
17
+ const env$1 = /*#__PURE__*/dual(2, (self, environment) => {
18
+ switch (self._tag) {
19
+ case "StandardCommand":
20
+ {
21
+ return {
22
+ ...self,
23
+ env: HashMap.union(self.env, HashMap.fromIterable(Object.entries(environment)))
24
+ };
25
+ }
26
+ case "PipedCommand":
27
+ {
28
+ return pipeTo$1(env$1(self.left, environment), env$1(self.right, environment));
29
+ }
30
+ }
31
+ });
32
+
33
+ /** @internal */
34
+ const exitCode$1 = self => Effect.flatMap(CommandExecutor, executor => executor.exitCode(self));
35
+
36
+ /** @internal */
37
+ const feed$1 = /*#__PURE__*/dual(2, (self, input) => stdin$1(self, Stream.fromChunk(Chunk.of(new TextEncoder().encode(input)))));
38
+
39
+ /** @internal */
40
+ const flatten$1 = self => Array.from(flattenLoop(self));
41
+
42
+ /** @internal */
43
+ const flattenLoop = self => {
44
+ switch (self._tag) {
45
+ case "StandardCommand":
46
+ {
47
+ return Chunk.of(self);
48
+ }
49
+ case "PipedCommand":
50
+ {
51
+ return Chunk.appendAll(flattenLoop(self.left), flattenLoop(self.right));
52
+ }
53
+ }
54
+ };
55
+
56
+ /** @internal */
57
+ const lines$1 = (command, encoding = "utf-8") => Effect.flatMap(CommandExecutor, executor => executor.lines(command, encoding));
58
+
59
+ /** @internal */
60
+ const make$1 = (command, ...args) => ({
61
+ [CommandTypeId$1]: CommandTypeId$1,
62
+ _tag: "StandardCommand",
63
+ command,
64
+ args,
65
+ env: HashMap.empty(),
66
+ cwd: Option.none(),
67
+ // The initial process input here does not matter, we just want the child
68
+ // process to default to `"pipe"` for the stdin stream.
69
+ stdin: Option.some(Stream.empty),
70
+ stdout: "pipe",
71
+ stderr: "pipe",
72
+ gid: Option.none(),
73
+ uid: Option.none(),
74
+ pipe() {
75
+ return pipeArguments(this, arguments);
76
+ }
77
+ });
78
+
79
+ /** @internal */
80
+ const pipeTo$1 = /*#__PURE__*/dual(2, (self, into) => ({
81
+ [CommandTypeId$1]: CommandTypeId$1,
82
+ _tag: "PipedCommand",
83
+ left: self,
84
+ right: into,
85
+ pipe() {
86
+ return pipeArguments(this, arguments);
87
+ }
88
+ }));
89
+
90
+ /** @internal */
91
+ const stderr$1 = /*#__PURE__*/dual(2, (self, output) => {
92
+ switch (self._tag) {
93
+ case "StandardCommand":
94
+ {
95
+ return {
96
+ ...self,
97
+ stderr: output
98
+ };
99
+ }
100
+ // For piped commands it only makes sense to provide `stderr` for the
101
+ // right-most command as the rest will be piped in.
102
+ case "PipedCommand":
103
+ {
104
+ return {
105
+ ...self,
106
+ right: stderr$1(self.right, output)
107
+ };
108
+ }
109
+ }
110
+ });
111
+
112
+ /** @internal */
113
+ const stdin$1 = /*#__PURE__*/dual(2, (self, input) => {
114
+ switch (self._tag) {
115
+ case "StandardCommand":
116
+ {
117
+ return {
118
+ ...self,
119
+ stdin: Option.some(input)
120
+ };
121
+ }
122
+ // For piped commands it only makes sense to provide `stdin` for the
123
+ // left-most command as the rest will be piped in.
124
+ case "PipedCommand":
125
+ {
126
+ return {
127
+ ...self,
128
+ left: stdin$1(self.left, input)
129
+ };
130
+ }
131
+ }
132
+ });
133
+
134
+ /** @internal */
135
+ const stdout$1 = /*#__PURE__*/dual(2, (self, output) => {
136
+ switch (self._tag) {
137
+ case "StandardCommand":
138
+ {
139
+ return {
140
+ ...self,
141
+ stdout: output
142
+ };
143
+ }
144
+ // For piped commands it only makes sense to provide `stderr` for the
145
+ // right-most command as the rest will be piped in.
146
+ case "PipedCommand":
147
+ {
148
+ return {
149
+ ...self,
150
+ right: stdout$1(self.right, output)
151
+ };
152
+ }
153
+ }
154
+ });
155
+
156
+ /** @internal */
157
+ const start$1 = command => Effect.flatMap(CommandExecutor, executor => executor.start(command));
158
+
159
+ /** @internal */
160
+ const stream$1 = command => Stream.flatMap(CommandExecutor, process => process.stream(command));
161
+
162
+ /** @internal */
163
+ const streamLines$1 = command => Stream.flatMap(CommandExecutor, process => process.streamLines(command));
164
+
165
+ /** @internal */
166
+ const string$1 = /*#__PURE__*/dual(args => isCommand$1(args[0]), (command, encoding) => Effect.flatMap(CommandExecutor, executor => executor.string(command, encoding)));
167
+
168
+ /** @internal */
169
+ const workingDirectory$1 = /*#__PURE__*/dual(2, (self, cwd) => {
170
+ switch (self._tag) {
171
+ case "StandardCommand":
172
+ {
173
+ return {
174
+ ...self,
175
+ cwd: Option.some(cwd)
176
+ };
177
+ }
178
+ case "PipedCommand":
179
+ {
180
+ return pipeTo$1(workingDirectory$1(self.left, cwd), workingDirectory$1(self.right, cwd));
181
+ }
182
+ }
183
+ });
184
+
185
+ /**
186
+ * @since 1.0.0
187
+ */
188
+
189
+ /**
190
+ * @since 1.0.0
191
+ */
192
+ const CommandTypeId = CommandTypeId$1;
193
+
194
+ /**
195
+ * @since 1.0.0
196
+ */
197
+
198
+ /**
199
+ * @since 1.0.0
200
+ * @category models
201
+ */
202
+
203
+ /**
204
+ * @since 1.0.0
205
+ */
206
+
207
+ /**
208
+ * Configures the pipe that is established between the parent and child
209
+ * processes' `stdin` stream.
210
+ *
211
+ * @since 1.0.0
212
+ * @category models
213
+ */
214
+
215
+ /**
216
+ * Configures the pipes that are established between the parent and child
217
+ * processes `stderr` and `stdout` streams.
218
+ *
219
+ * @since 1.0.0
220
+ * @category models
221
+ */
222
+
223
+ /**
224
+ * @since 1.0.0
225
+ * @category models
226
+ */
227
+
228
+ /**
229
+ * @since 1.0.0
230
+ * @category models
231
+ */
232
+
233
+ /**
234
+ * Returns `true` if the specified value is a `Command`, otherwise returns
235
+ * `false`.
236
+ *
237
+ * @since 1.0.0
238
+ * @category refinements
239
+ */
240
+ const isCommand = isCommand$1;
241
+
242
+ /**
243
+ * Specify the environment variables that will be used when running this command.
244
+ *
245
+ * @since 1.0.0
246
+ * @category combinators
247
+ */
248
+ const env = env$1;
249
+
250
+ /**
251
+ * Returns the exit code of the command after the process has completed
252
+ * execution.
253
+ *
254
+ * @since 1.0.0
255
+ * @category execution
256
+ */
257
+ const exitCode = exitCode$1;
258
+
259
+ /**
260
+ * Feed a string to standard input (default encoding of UTF-8).
261
+ *
262
+ * @since 1.0.0
263
+ * @category combinators
264
+ */
265
+ const feed = feed$1;
266
+
267
+ /**
268
+ * Flatten this command to a non-empty array of standard commands.
269
+ *
270
+ * * For a `StandardCommand`, this simply returns a `1` element array
271
+ * * For a `PipedCommand`, all commands in the pipe will be extracted out into
272
+ * a array from left to right
273
+ *
274
+ * @since 1.0.0
275
+ * @category combinators
276
+ */
277
+ const flatten = flatten$1;
278
+
279
+ /**
280
+ * Runs the command returning the output as an array of lines with the specified
281
+ * encoding.
282
+ *
283
+ * @since 1.0.0
284
+ * @category execution
285
+ */
286
+ const lines = lines$1;
287
+
288
+ /**
289
+ * Create a command with the specified process name and an optional list of
290
+ * arguments.
291
+ *
292
+ * @since 1.0.0
293
+ * @category constructors
294
+ */
295
+ const make = make$1;
296
+
297
+ /**
298
+ * Pipe one command to another command from left to right.
299
+ *
300
+ * Conceptually, the equivalent of piping one shell command to another:
301
+ *
302
+ * ```sh
303
+ * command1 | command2
304
+ * ```
305
+ *
306
+ * @since 1.0.0
307
+ * @category combinators
308
+ */
309
+ const pipeTo = pipeTo$1;
310
+
311
+ /**
312
+ * Start running the command and return a handle to the running process.
313
+ *
314
+ * @since 1.0.0
315
+ * @category execution
316
+ */
317
+ const start = start$1;
318
+
319
+ /**
320
+ * Start running the command and return the output as a `Stream`.
321
+ *
322
+ * @since 1.0.0
323
+ * @category execution
324
+ */
325
+ const stream = stream$1;
326
+
327
+ /**
328
+ * Runs the command returning the output as an stream of lines with the
329
+ * specified encoding.
330
+ *
331
+ * @since 1.0.0
332
+ * @category execution
333
+ */
334
+ const streamLines = streamLines$1;
335
+
336
+ /**
337
+ * Runs the command returning the entire output as a string with the
338
+ * specified encoding.
339
+ *
340
+ * If an encoding is not specified, the encoding will default to `utf-8`.
341
+ *
342
+ * @since 1.0.0
343
+ * @category execution
344
+ */
345
+ const string = string$1;
346
+
347
+ /**
348
+ * Specify the standard error stream for a command.
349
+ *
350
+ * @since 1.0.0
351
+ * @category combinators
352
+ */
353
+ const stderr = stderr$1;
354
+
355
+ /**
356
+ * Specify the standard input stream for a command.
357
+ *
358
+ * @since 1.0.0
359
+ * @category combinators
360
+ */
361
+ const stdin = stdin$1;
362
+
363
+ /**
364
+ * Specify the standard output stream for a command.
365
+ *
366
+ * @since 1.0.0
367
+ * @category combinators
368
+ */
369
+ const stdout = stdout$1;
370
+
371
+ /**
372
+ * Set the working directory that will be used when this command will be run.
373
+ *
374
+ * For piped commands, the working directory of each command will be set to the
375
+ * specified working directory.
376
+ *
377
+ * @since 1.0.0
378
+ * @category combinators
379
+ */
380
+ const workingDirectory = workingDirectory$1;
381
+
382
+ var Command = /*#__PURE__*/Object.freeze({
383
+ __proto__: null,
384
+ CommandTypeId: CommandTypeId,
385
+ isCommand: isCommand,
386
+ env: env,
387
+ exitCode: exitCode,
388
+ feed: feed,
389
+ flatten: flatten,
390
+ lines: lines,
391
+ make: make,
392
+ pipeTo: pipeTo,
393
+ start: start,
394
+ stream: stream,
395
+ streamLines: streamLines,
396
+ string: string,
397
+ stderr: stderr,
398
+ stdin: stdin,
399
+ stdout: stdout,
400
+ workingDirectory: workingDirectory
401
+ });
402
+
403
+ export { Command as C, CommandTypeId as a, exitCode as b, flatten as c, stream as d, env as e, feed as f, streamLines as g, string as h, isCommand as i, stderr as j, stdin as k, lines as l, make as m, stdout as n, pipeTo as p, start as s, workingDirectory as w };
@@ -0,0 +1,80 @@
1
+ import { C as CommandExecutor$2, P as ProcessTypeId$1, E as ExitCode$1, a as ProcessId$1, m as makeExecutor$1 } from './commandExecutor-d6457489.esm.js';
2
+
3
+ /**
4
+ * @since 1.0.0
5
+ */
6
+
7
+ /**
8
+ * @since 1.0.0
9
+ * @category models
10
+ */
11
+
12
+ /**
13
+ * @since 1.0.0
14
+ * @category tags
15
+ */
16
+ const CommandExecutor = CommandExecutor$2;
17
+
18
+ /**
19
+ * @since 1.0.0
20
+ * @category symbols
21
+ */
22
+ const ProcessTypeId = ProcessTypeId$1;
23
+
24
+ /**
25
+ * @since 1.0.0
26
+ * @category symbols
27
+ */
28
+
29
+ /**
30
+ * @since 1.0.0
31
+ * @category models
32
+ */
33
+
34
+ /**
35
+ * @since 1.0.0
36
+ * @category models
37
+ */
38
+
39
+ /**
40
+ * @since 1.0.0
41
+ */
42
+
43
+ /**
44
+ * @since 1.0.0
45
+ * @category models
46
+ */
47
+
48
+ /**
49
+ * @since 1.0.0
50
+ * @category models
51
+ */
52
+
53
+ /**
54
+ * @since 1.0.0
55
+ * @category constructors
56
+ */
57
+ const ExitCode = ExitCode$1;
58
+
59
+ /**
60
+ * @since 1.0.0
61
+ * @category constructors
62
+ */
63
+ const ProcessId = ProcessId$1;
64
+
65
+ /**
66
+ * @since 1.0.0
67
+ * @category constructors
68
+ */
69
+ const makeExecutor = makeExecutor$1;
70
+
71
+ var CommandExecutor$1 = /*#__PURE__*/Object.freeze({
72
+ __proto__: null,
73
+ CommandExecutor: CommandExecutor,
74
+ ProcessTypeId: ProcessTypeId,
75
+ ExitCode: ExitCode,
76
+ ProcessId: ProcessId,
77
+ makeExecutor: makeExecutor
78
+ });
79
+
80
+ export { CommandExecutor$1 as C, ExitCode as E, ProcessTypeId as P, CommandExecutor as a, ProcessId as b, makeExecutor as m };
@@ -0,0 +1,43 @@
1
+ import * as Effect from 'effect/Effect';
2
+
3
+ /** @internal */
4
+ const effectify$1 = (fn, onError, onSyncError) => (...args) => Effect.async(resume => {
5
+ try {
6
+ fn(...args, (err, result) => {
7
+ if (err) {
8
+ resume(Effect.fail(onError ? onError(err, args) : err));
9
+ } else {
10
+ resume(Effect.succeed(result));
11
+ }
12
+ });
13
+ } catch (err) {
14
+ resume(onSyncError ? Effect.fail(onSyncError(err, args)) : Effect.die(err));
15
+ }
16
+ });
17
+
18
+ /**
19
+ * @since 1.0.0
20
+ */
21
+
22
+ /**
23
+ * Converts a callback-based function to a function that returns an `Effect`.
24
+ *
25
+ * @since 1.0.0
26
+ */
27
+
28
+ /**
29
+ * @category util
30
+ * @since 1.0.0
31
+ */
32
+
33
+ /**
34
+ * @since 1.0.0
35
+ */
36
+ const effectify = effectify$1;
37
+
38
+ var Effectify = /*#__PURE__*/Object.freeze({
39
+ __proto__: null,
40
+ effectify: effectify
41
+ });
42
+
43
+ export { Effectify as E, effectify as e };
@@ -0,0 +1,75 @@
1
+ import * as Data from 'effect/Data';
2
+
3
+ /** @internal */
4
+ const PlatformErrorTypeId$1 = /*#__PURE__*/Symbol.for("@effect/platform/Error/PlatformErrorTypeId");
5
+ const make = tag => props => Data.struct({
6
+ [PlatformErrorTypeId$1]: PlatformErrorTypeId$1,
7
+ _tag: tag,
8
+ ...props
9
+ });
10
+
11
+ /** @internal */
12
+ const badArgument = /*#__PURE__*/make("BadArgument");
13
+
14
+ /** @internal */
15
+ const systemError = /*#__PURE__*/make("SystemError");
16
+
17
+ /**
18
+ * @since 1.0.0
19
+ */
20
+
21
+ /**
22
+ * @since 1.0.0
23
+ * @category type id
24
+ */
25
+ const PlatformErrorTypeId = PlatformErrorTypeId$1;
26
+
27
+ /**
28
+ * @since 1.0.0
29
+ * @category type id
30
+ */
31
+
32
+ /**
33
+ * @since 1.0.0
34
+ * @category error
35
+ */
36
+
37
+ /**
38
+ * @since 1.0.0
39
+ */
40
+
41
+ /**
42
+ * @since 1.0.0
43
+ * @category error
44
+ */
45
+
46
+ /**
47
+ * @since 1.0.0
48
+ * @category error
49
+ */
50
+ const BadArgument = badArgument;
51
+
52
+ /**
53
+ * @since 1.0.0
54
+ * @category model
55
+ */
56
+
57
+ /**
58
+ * @since 1.0.0
59
+ * @category models
60
+ */
61
+
62
+ /**
63
+ * @since 1.0.0
64
+ * @category error
65
+ */
66
+ const SystemError = systemError;
67
+
68
+ var Error = /*#__PURE__*/Object.freeze({
69
+ __proto__: null,
70
+ PlatformErrorTypeId: PlatformErrorTypeId,
71
+ BadArgument: BadArgument,
72
+ SystemError: SystemError
73
+ });
74
+
75
+ export { BadArgument as B, Error as E, PlatformErrorTypeId as P, SystemError as S };