@effect/platform 0.1.0 → 0.2.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.
package/Command.d.ts ADDED
@@ -0,0 +1,251 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type { HashMap } from "@effect/data/HashMap";
5
+ import type { Option } from "@effect/data/Option";
6
+ import type { NonEmptyReadonlyArray } from "@effect/data/ReadonlyArray";
7
+ import type { Effect } from "@effect/io/Effect";
8
+ import type { CommandExecutor, ExitCode, Process } from "@effect/platform/CommandExecutor";
9
+ import type { PlatformError } from "@effect/platform/Error";
10
+ import type { Sink } from "@effect/stream/Sink";
11
+ import type { Stream } from "@effect/stream/Stream";
12
+ /**
13
+ * @since 1.0.0
14
+ */
15
+ export declare const CommandTypeId: unique symbol;
16
+ /**
17
+ * @since 1.0.0
18
+ */
19
+ export type CommandTypeId = typeof CommandTypeId;
20
+ /**
21
+ * @since 1.0.0
22
+ * @category models
23
+ */
24
+ export type Command = StandardCommand | PipedCommand;
25
+ /**
26
+ * @since 1.0.0
27
+ */
28
+ export declare namespace Command {
29
+ /**
30
+ * @since 1.0.0
31
+ * @category models
32
+ */
33
+ interface Proto {
34
+ readonly [CommandTypeId]: CommandTypeId;
35
+ }
36
+ /**
37
+ * Configures the pipe that is established between the parent and child
38
+ * processes' `stdin` stream.
39
+ *
40
+ * @since 1.0.0
41
+ * @category models
42
+ */
43
+ type Input = CommandInput;
44
+ /**
45
+ * Configures the pipes that are established between the parent and child
46
+ * processes `stderr` and `stdout` streams.
47
+ *
48
+ * @since 1.0.0
49
+ * @category models
50
+ */
51
+ type Output = CommandOutput;
52
+ }
53
+ /**
54
+ * Configures the pipe that is established between the parent and child
55
+ * processes' `stdin` stream.
56
+ *
57
+ * @since 1.0.0
58
+ * @category models
59
+ */
60
+ export type CommandInput = Stream<never, PlatformError, Uint8Array>;
61
+ /**
62
+ * Configures the pipes that are established between the parent and child
63
+ * processes `stderr` and `stdout` streams.
64
+ *
65
+ * @since 1.0.0
66
+ * @category models
67
+ */
68
+ export type CommandOutput = "inherit" | "pipe" | Sink<never, never, Uint8Array, never, Uint8Array>;
69
+ /**
70
+ * @since 1.0.0
71
+ * @category models
72
+ */
73
+ export interface StandardCommand extends Command.Proto {
74
+ readonly _tag: "StandardCommand";
75
+ readonly command: string;
76
+ readonly args: ReadonlyArray<string>;
77
+ readonly env: HashMap<string, string>;
78
+ readonly cwd: Option<string>;
79
+ readonly stdin: Option<Command.Input>;
80
+ readonly stdout: Command.Output;
81
+ readonly stderr: Command.Output;
82
+ readonly gid: Option<number>;
83
+ readonly uid: Option<number>;
84
+ }
85
+ /**
86
+ * @since 1.0.0
87
+ * @category models
88
+ */
89
+ export interface PipedCommand extends Command.Proto {
90
+ readonly _tag: "PipedCommand";
91
+ readonly left: Command;
92
+ readonly right: Command;
93
+ }
94
+ /**
95
+ * Returns `true` if the specified value is a `Command`, otherwise returns
96
+ * `false`.
97
+ *
98
+ * @since 1.0.0
99
+ * @category refinements
100
+ */
101
+ export declare const isCommand: (u: unknown) => u is Command;
102
+ /**
103
+ * Specify the environment variables that will be used when running this command.
104
+ *
105
+ * @since 1.0.0
106
+ * @category combinators
107
+ */
108
+ export declare const env: {
109
+ (environment: Record<string, string>): (self: Command) => Command;
110
+ (self: Command, environment: Record<string, string>): Command;
111
+ };
112
+ /**
113
+ * Returns the exit code of the command after the process has completed
114
+ * execution.
115
+ *
116
+ * @since 1.0.0
117
+ * @category execution
118
+ */
119
+ export declare const exitCode: (self: Command) => Effect<CommandExecutor, PlatformError, ExitCode>;
120
+ /**
121
+ * Feed a string to standard input (default encoding of UTF-8).
122
+ *
123
+ * @since 1.0.0
124
+ * @category combinators
125
+ */
126
+ export declare const feed: {
127
+ (input: string): (self: Command) => Command;
128
+ (self: Command, input: string): Command;
129
+ };
130
+ /**
131
+ * Flatten this command to a non-empty array of standard commands.
132
+ *
133
+ * * For a `StandardCommand`, this simply returns a `1` element array
134
+ * * For a `PipedCommand`, all commands in the pipe will be extracted out into
135
+ * a array from left to right
136
+ *
137
+ * @since 1.0.0
138
+ * @category combinators
139
+ */
140
+ export declare const flatten: (self: Command) => NonEmptyReadonlyArray<StandardCommand>;
141
+ /**
142
+ * Runs the command returning the output as an array of lines with the specified
143
+ * encoding.
144
+ *
145
+ * @since 1.0.0
146
+ * @category execution
147
+ */
148
+ export declare const lines: (command: Command, encoding?: string) => Effect<CommandExecutor, PlatformError, ReadonlyArray<string>>;
149
+ /**
150
+ * Create a command with the specified process name and an optional list of
151
+ * arguments.
152
+ *
153
+ * @since 1.0.0
154
+ * @category constructors
155
+ */
156
+ export declare const make: (command: string, ...args: Array<string>) => Command;
157
+ /**
158
+ * Pipe one command to another command from left to right.
159
+ *
160
+ * Conceptually, the equivalent of piping one shell command to another:
161
+ *
162
+ * ```sh
163
+ * command1 | command2
164
+ * ```
165
+ *
166
+ * @since 1.0.0
167
+ * @category combinators
168
+ */
169
+ export declare const pipeTo: {
170
+ (into: Command): (self: Command) => Command;
171
+ (self: Command, into: Command): Command;
172
+ };
173
+ /**
174
+ * Start running the command and return a handle to the running process.
175
+ *
176
+ * @since 1.0.0
177
+ * @category execution
178
+ */
179
+ export declare const start: (command: Command) => Effect<CommandExecutor, PlatformError, Process>;
180
+ /**
181
+ * Start running the command and return the output as a `Stream`.
182
+ *
183
+ * @since 1.0.0
184
+ * @category execution
185
+ */
186
+ export declare const stream: (command: Command) => Stream<CommandExecutor, PlatformError, Uint8Array>;
187
+ /**
188
+ * Runs the command returning the output as an stream of lines with the
189
+ * specified encoding.
190
+ *
191
+ * @since 1.0.0
192
+ * @category execution
193
+ */
194
+ export declare const streamLines: (command: Command) => Stream<CommandExecutor, PlatformError, string>;
195
+ /**
196
+ * Runs the command returning the entire output as a string with the
197
+ * specified encoding.
198
+ *
199
+ * If an encoding is not specified, the encoding will default to `utf-8`.
200
+ *
201
+ * @since 1.0.0
202
+ * @category execution
203
+ */
204
+ export declare const string: {
205
+ (encoding?: string): (command: Command) => Effect<CommandExecutor, PlatformError, string>;
206
+ (command: Command, encoding?: string): Effect<CommandExecutor, PlatformError, string>;
207
+ };
208
+ /**
209
+ * Specify the standard error stream for a command.
210
+ *
211
+ * @since 1.0.0
212
+ * @category combinators
213
+ */
214
+ export declare const stderr: {
215
+ (stderr: Command.Output): (self: Command) => Command;
216
+ (self: Command, stderr: Command.Output): Command;
217
+ };
218
+ /**
219
+ * Specify the standard input stream for a command.
220
+ *
221
+ * @since 1.0.0
222
+ * @category combinators
223
+ */
224
+ export declare const stdin: {
225
+ (stdin: Command.Input): (self: Command) => Command;
226
+ (self: Command, stdin: Command.Input): Command;
227
+ };
228
+ /**
229
+ * Specify the standard output stream for a command.
230
+ *
231
+ * @since 1.0.0
232
+ * @category combinators
233
+ */
234
+ export declare const stdout: {
235
+ (stdout: Command.Output): (self: Command) => Command;
236
+ (self: Command, stdout: Command.Output): Command;
237
+ };
238
+ /**
239
+ * Set the working directory that will be used when this command will be run.
240
+ *
241
+ * For piped commands, the working directory of each command will be set to the
242
+ * specified working directory.
243
+ *
244
+ * @since 1.0.0
245
+ * @category combinators
246
+ */
247
+ export declare const workingDirectory: {
248
+ (cwd: string): (self: Command) => Command;
249
+ (self: Command, cwd: string): Command;
250
+ };
251
+ //# sourceMappingURL=Command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Command.d.ts","sourceRoot":"","sources":["./src/Command.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAA;AAC1F,OAAO,KAAK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AO,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,eAAe,EAAE,aAAa,EAAE,MAAM,CAAC,CAAA;CACpE,CAAA;AAEnB;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAAE;IACnB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IACpD,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAA;CAC/B,CAAA;AAEnB;;;;;GAKG;AACH,eAAO,MAAM,KAAK,EAAE;IAClB,CAAC,KAAK,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IAClD,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,GAAG,OAAO,CAAA;CAC9B,CAAA;AAElB;;;;;GAKG;AACH,eAAO,MAAM,MAAM,EAAE;IACnB,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IACpD,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,GAAG,OAAO,CAAA;CAC/B,CAAA;AAEnB;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAA;IACzC,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CACV,CAAA"}
package/Command.js ADDED
@@ -0,0 +1,164 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.workingDirectory = exports.string = exports.streamLines = exports.stream = exports.stdout = exports.stdin = exports.stderr = exports.start = exports.pipeTo = exports.make = exports.lines = exports.isCommand = exports.flatten = exports.feed = exports.exitCode = exports.env = exports.CommandTypeId = void 0;
7
+ var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/internal/command"));
8
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
+ /**
11
+ * @since 1.0.0
12
+ */
13
+ const CommandTypeId = internal.CommandTypeId;
14
+ /**
15
+ * Returns `true` if the specified value is a `Command`, otherwise returns
16
+ * `false`.
17
+ *
18
+ * @since 1.0.0
19
+ * @category refinements
20
+ */
21
+ exports.CommandTypeId = CommandTypeId;
22
+ const isCommand = internal.isCommand;
23
+ /**
24
+ * Specify the environment variables that will be used when running this command.
25
+ *
26
+ * @since 1.0.0
27
+ * @category combinators
28
+ */
29
+ exports.isCommand = isCommand;
30
+ const env = internal.env;
31
+ /**
32
+ * Returns the exit code of the command after the process has completed
33
+ * execution.
34
+ *
35
+ * @since 1.0.0
36
+ * @category execution
37
+ */
38
+ exports.env = env;
39
+ const exitCode = internal.exitCode;
40
+ /**
41
+ * Feed a string to standard input (default encoding of UTF-8).
42
+ *
43
+ * @since 1.0.0
44
+ * @category combinators
45
+ */
46
+ exports.exitCode = exitCode;
47
+ const feed = internal.feed;
48
+ /**
49
+ * Flatten this command to a non-empty array of standard commands.
50
+ *
51
+ * * For a `StandardCommand`, this simply returns a `1` element array
52
+ * * For a `PipedCommand`, all commands in the pipe will be extracted out into
53
+ * a array from left to right
54
+ *
55
+ * @since 1.0.0
56
+ * @category combinators
57
+ */
58
+ exports.feed = feed;
59
+ const flatten = internal.flatten;
60
+ /**
61
+ * Runs the command returning the output as an array of lines with the specified
62
+ * encoding.
63
+ *
64
+ * @since 1.0.0
65
+ * @category execution
66
+ */
67
+ exports.flatten = flatten;
68
+ const lines = internal.lines;
69
+ /**
70
+ * Create a command with the specified process name and an optional list of
71
+ * arguments.
72
+ *
73
+ * @since 1.0.0
74
+ * @category constructors
75
+ */
76
+ exports.lines = lines;
77
+ const make = internal.make;
78
+ /**
79
+ * Pipe one command to another command from left to right.
80
+ *
81
+ * Conceptually, the equivalent of piping one shell command to another:
82
+ *
83
+ * ```sh
84
+ * command1 | command2
85
+ * ```
86
+ *
87
+ * @since 1.0.0
88
+ * @category combinators
89
+ */
90
+ exports.make = make;
91
+ const pipeTo = internal.pipeTo;
92
+ /**
93
+ * Start running the command and return a handle to the running process.
94
+ *
95
+ * @since 1.0.0
96
+ * @category execution
97
+ */
98
+ exports.pipeTo = pipeTo;
99
+ const start = internal.start;
100
+ /**
101
+ * Start running the command and return the output as a `Stream`.
102
+ *
103
+ * @since 1.0.0
104
+ * @category execution
105
+ */
106
+ exports.start = start;
107
+ const stream = internal.stream;
108
+ /**
109
+ * Runs the command returning the output as an stream of lines with the
110
+ * specified encoding.
111
+ *
112
+ * @since 1.0.0
113
+ * @category execution
114
+ */
115
+ exports.stream = stream;
116
+ const streamLines = internal.streamLines;
117
+ /**
118
+ * Runs the command returning the entire output as a string with the
119
+ * specified encoding.
120
+ *
121
+ * If an encoding is not specified, the encoding will default to `utf-8`.
122
+ *
123
+ * @since 1.0.0
124
+ * @category execution
125
+ */
126
+ exports.streamLines = streamLines;
127
+ const string = internal.string;
128
+ /**
129
+ * Specify the standard error stream for a command.
130
+ *
131
+ * @since 1.0.0
132
+ * @category combinators
133
+ */
134
+ exports.string = string;
135
+ const stderr = internal.stderr;
136
+ /**
137
+ * Specify the standard input stream for a command.
138
+ *
139
+ * @since 1.0.0
140
+ * @category combinators
141
+ */
142
+ exports.stderr = stderr;
143
+ const stdin = internal.stdin;
144
+ /**
145
+ * Specify the standard output stream for a command.
146
+ *
147
+ * @since 1.0.0
148
+ * @category combinators
149
+ */
150
+ exports.stdin = stdin;
151
+ const stdout = internal.stdout;
152
+ /**
153
+ * Set the working directory that will be used when this command will be run.
154
+ *
155
+ * For piped commands, the working directory of each command will be set to the
156
+ * specified working directory.
157
+ *
158
+ * @since 1.0.0
159
+ * @category combinators
160
+ */
161
+ exports.stdout = stdout;
162
+ const workingDirectory = internal.workingDirectory;
163
+ exports.workingDirectory = workingDirectory;
164
+ //# sourceMappingURL=Command.js.map
package/Command.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Command.js","names":["internal","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","CommandTypeId","exports","isCommand","env","exitCode","feed","flatten","lines","make","pipeTo","start","stream","streamLines","string","stderr","stdin","stdout","workingDirectory"],"sources":["./src/Command.ts"],"sourcesContent":[null],"mappings":";;;;;;AASA,IAAAA,QAAA,gBAAAC,uBAAA,eAAAC,OAAA;AAA6D,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,w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,MAAM,GAGfzC,QAAQ,CAACyC,MAAM;AAEnB;;;;;;;;;AAAAf,OAAA,CAAAe,MAAA,GAAAA,MAAA;AASO,MAAMC,gBAAgB,GAGzB1C,QAAQ,CAAC0C,gBAAgB;AAAAhB,OAAA,CAAAgB,gBAAA,GAAAA,gBAAA"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * @since 1.0.0
3
+ */
4
+ import type * as Brand from "@effect/data/Brand";
5
+ import type { Tag } from "@effect/data/Context";
6
+ import type { Effect } from "@effect/io/Effect";
7
+ import type { Command } from "@effect/platform/Command";
8
+ import type { PlatformError } from "@effect/platform/Error";
9
+ import type { Sink } from "@effect/stream/Sink";
10
+ import type { Stream } from "@effect/stream/Stream";
11
+ /**
12
+ * @since 1.0.0
13
+ * @category models
14
+ */
15
+ export interface CommandExecutor {
16
+ /**
17
+ * Returns the exit code of the command after the process has completed
18
+ * execution.
19
+ */
20
+ readonly exitCode: (command: Command) => Effect<never, PlatformError, ExitCode>;
21
+ /**
22
+ * Start running the command and return a handle to the running process.
23
+ */
24
+ readonly start: (command: Command) => Effect<never, PlatformError, Process>;
25
+ /**
26
+ * Runs the command returning the entire output as a string with the
27
+ * specified encoding.
28
+ *
29
+ * If an encoding is not specified, the encoding will default to `utf-8`.
30
+ */
31
+ readonly string: (command: Command, encoding?: string) => Effect<never, PlatformError, string>;
32
+ /**
33
+ * Runs the command returning the entire output as an array of lines.
34
+ *
35
+ * If an encoding is not specified, the encoding will default to `utf-8`.
36
+ */
37
+ readonly lines: (command: Command, encoding?: string) => Effect<never, PlatformError, ReadonlyArray<string>>;
38
+ /**
39
+ * Runs the command returning the output as a `Stream`.
40
+ */
41
+ readonly stream: (command: Command) => Stream<never, PlatformError, Uint8Array>;
42
+ /**
43
+ * Runs the command returning the output as a `Stream` of lines.
44
+ */
45
+ readonly streamLines: (command: Command, encoding?: string) => Stream<never, PlatformError, string>;
46
+ }
47
+ /**
48
+ * @since 1.0.0
49
+ * @category tags
50
+ */
51
+ export declare const CommandExecutor: Tag<CommandExecutor, CommandExecutor>;
52
+ /**
53
+ * @since 1.0.0
54
+ * @category symbols
55
+ */
56
+ export declare const ProcessTypeId: unique symbol;
57
+ /**
58
+ * @since 1.0.0
59
+ * @category symbols
60
+ */
61
+ export type ProcessTypeId = typeof ProcessTypeId;
62
+ /**
63
+ * @since 1.0.0
64
+ * @category models
65
+ */
66
+ export interface Process {
67
+ readonly [ProcessTypeId]: ProcessTypeId;
68
+ /**
69
+ * The process identifier.
70
+ */
71
+ readonly pid: ProcessId;
72
+ /**
73
+ * Waits for the process to exit and returns the `ExitCode` of the command
74
+ * that was run.
75
+ */
76
+ readonly exitCode: Effect<never, PlatformError, ExitCode>;
77
+ /**
78
+ * Returns `true` if the process is still running, otherwise returns `false`.
79
+ */
80
+ readonly isRunning: Effect<never, PlatformError, boolean>;
81
+ /**
82
+ * Kills the running process with the provided signal.
83
+ *
84
+ * If no signal is provided, the signal will defaults to `SIGTERM`.
85
+ */
86
+ readonly kill: (signal?: Signal) => Effect<never, PlatformError, void>;
87
+ /**
88
+ * The standard error stream of the process.
89
+ */
90
+ readonly stderr: Stream<never, PlatformError, Uint8Array>;
91
+ /**
92
+ * The standard input sink of the process.
93
+ */
94
+ readonly stdin: Sink<never, PlatformError, Uint8Array, never, void>;
95
+ /**
96
+ * The standard output stream of the process.
97
+ */
98
+ readonly stdout: Stream<never, PlatformError, Uint8Array>;
99
+ }
100
+ /**
101
+ * @since 1.0.0
102
+ * @category models
103
+ */
104
+ export type ProcessId = Brand.Branded<number, "ProcessId">;
105
+ /**
106
+ * @since 1.0.0
107
+ */
108
+ export declare namespace Process {
109
+ /**
110
+ * @since 1.0.0
111
+ * @category models
112
+ */
113
+ type Id = ProcessId;
114
+ }
115
+ /**
116
+ * @since 1.0.0
117
+ * @category models
118
+ */
119
+ export type Signal = "SIGABRT" | "SIGALRM" | "SIGBUS" | "SIGCHLD" | "SIGCONT" | "SIGFPE" | "SIGHUP" | "SIGILL" | "SIGINT" | "SIGIO" | "SIGIOT" | "SIGKILL" | "SIGPIPE" | "SIGPOLL" | "SIGPROF" | "SIGPWR" | "SIGQUIT" | "SIGSEGV" | "SIGSTKFLT" | "SIGSTOP" | "SIGSYS" | "SIGTERM" | "SIGTRAP" | "SIGTSTP" | "SIGTTIN" | "SIGTTOU" | "SIGUNUSED" | "SIGURG" | "SIGUSR1" | "SIGUSR2" | "SIGVTALRM" | "SIGWINCH" | "SIGXCPU" | "SIGXFSZ" | "SIGBREAK" | "SIGLOST" | "SIGINFO";
120
+ /**
121
+ * @since 1.0.0
122
+ * @category models
123
+ */
124
+ export type ExitCode = Brand.Branded<number, "ExitCode">;
125
+ /**
126
+ * @since 1.0.0
127
+ * @category constructors
128
+ */
129
+ export declare const ExitCode: Brand.Brand.Constructor<ExitCode>;
130
+ /**
131
+ * @since 1.0.0
132
+ * @category constructors
133
+ */
134
+ export declare const ProcessId: Brand.Brand.Constructor<Process.Id>;
135
+ /**
136
+ * @since 1.0.0
137
+ * @category constructors
138
+ */
139
+ export declare const makeExecutor: (start: (command: Command) => Effect<never, PlatformError, Process>) => CommandExecutor;
140
+ //# sourceMappingURL=CommandExecutor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandExecutor.d.ts","sourceRoot":"","sources":["./src/CommandExecutor.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,KAAK,MAAM,oBAAoB,CAAA;AAChD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC/C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAE3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AA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ACT,SAAS,GACT,WAAW,GACX,QAAQ,GACR,SAAS,GACT,SAAS,GACT,WAAW,GACX,UAAU,GACV,SAAS,GACT,SAAS,GACT,UAAU,GACV,SAAS,GACT,SAAS,CAAA;AAEb;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,UAAU,CAAC,CAAA;AAExD;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAqB,CAAA;AAE5E;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,CAAsB,CAAA;AAEhF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,CACzB,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC,KAAK,EAAE,aAAa,EAAE,OAAO,CAAC,KAC/D,eAAuC,CAAA"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.makeExecutor = exports.ProcessTypeId = exports.ProcessId = exports.ExitCode = exports.CommandExecutor = void 0;
7
+ var internal = /*#__PURE__*/_interopRequireWildcard( /*#__PURE__*/require("@effect/platform/internal/commandExecutor"));
8
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
9
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
10
+ /**
11
+ * @since 1.0.0
12
+ * @category tags
13
+ */
14
+ const CommandExecutor = internal.CommandExecutor;
15
+ /**
16
+ * @since 1.0.0
17
+ * @category symbols
18
+ */
19
+ exports.CommandExecutor = CommandExecutor;
20
+ const ProcessTypeId = internal.ProcessTypeId;
21
+ /**
22
+ * @since 1.0.0
23
+ * @category constructors
24
+ */
25
+ exports.ProcessTypeId = ProcessTypeId;
26
+ const ExitCode = internal.ExitCode;
27
+ /**
28
+ * @since 1.0.0
29
+ * @category constructors
30
+ */
31
+ exports.ExitCode = ExitCode;
32
+ const ProcessId = internal.ProcessId;
33
+ /**
34
+ * @since 1.0.0
35
+ * @category constructors
36
+ */
37
+ exports.ProcessId = ProcessId;
38
+ const makeExecutor = internal.makeExecutor;
39
+ exports.makeExecutor = makeExecutor;
40
+ //# sourceMappingURL=CommandExecutor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandExecutor.js","names":["internal","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","CommandExecutor","exports","ProcessTypeId","ExitCode","ProcessId","makeExecutor"],"sources":["./src/CommandExecutor.ts"],"sourcesContent":[null],"mappings":";;;;;;AAQA,IAAAA,QAAA,gBAAAC,uBAAA,eAAAC,OAAA;AAAqE,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAA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,QAAQ;AAE5E;;;;AAAAF,OAAA,CAAAE,QAAA,GAAAA,QAAA;AAIO,MAAMC,SAAS,GAAwC7B,QAAQ,CAAC6B,SAAS;AAEhF;;;;AAAAH,OAAA,CAAAG,SAAA,GAAAA,SAAA;AAIO,MAAMC,YAAY,GAEF9B,QAAQ,CAAC8B,YAAY;AAAAJ,OAAA,CAAAI,YAAA,GAAAA,YAAA"}
package/Error.d.ts CHANGED
@@ -28,7 +28,7 @@ export declare namespace PlatformError {
28
28
  interface Base extends Data.Case {
29
29
  readonly [PlatformErrorTypeId]: typeof PlatformErrorTypeId;
30
30
  readonly _tag: string;
31
- readonly module: "FileSystem" | "Path";
31
+ readonly module: "Command" | "FileSystem" | "Path";
32
32
  readonly method: string;
33
33
  readonly message: string;
34
34
  }
package/Error.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Error.d.ts","sourceRoot":"","sources":["./src/Error.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,KAAK,IAAI,MAAM,mBAAmB,CAAA;AAG9C;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,OAAO,MAAqC,CAAA;AAE9E;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA;AAE5D;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,WAAW,CAAA;AAErD;;GAEG;AACH,yBAAiB,aAAa,CAAC;IAC7B;;;OAGG;IACH,UAAiB,IAAK,SAAQ,IAAI,CAAC,IAAI;QACrC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,OAAO,mBAAmB,CAAA;QAC1D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAAA;QACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;QACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;KACzB;IAED;;OAEG;IACH,KAAY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AAC,KAAK,WAAkC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=command.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../src/internal/command.ts"],"names":[],"mappings":""}