@effect/platform 0.0.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 +251 -0
- package/Command.d.ts.map +1 -0
- package/Command.js +164 -0
- package/Command.js.map +1 -0
- package/CommandExecutor.d.ts +140 -0
- package/CommandExecutor.d.ts.map +1 -0
- package/CommandExecutor.js +40 -0
- package/CommandExecutor.js.map +1 -0
- package/Console.d.ts +114 -12
- package/Console.d.ts.map +1 -1
- package/Console.js +109 -1
- package/Console.js.map +1 -1
- package/Error.d.ts +1 -1
- package/Error.d.ts.map +1 -1
- package/FileSystem.d.ts +246 -47
- package/FileSystem.d.ts.map +1 -1
- package/FileSystem.js +24 -1
- package/FileSystem.js.map +1 -1
- package/Path.d.ts +59 -0
- package/Path.d.ts.map +1 -0
- package/{FileSystem/File.js → Path.js} +14 -24
- package/Path.js.map +1 -0
- package/internal/command.d.ts +2 -0
- package/internal/command.d.ts.map +1 -0
- package/internal/command.js +184 -0
- package/internal/command.js.map +1 -0
- package/internal/commandExecutor.d.ts +2 -0
- package/internal/commandExecutor.d.ts.map +1 -0
- package/internal/commandExecutor.js +55 -0
- package/internal/commandExecutor.js.map +1 -0
- package/internal/console.js +63 -3
- package/internal/console.js.map +1 -1
- package/internal/fileSystem.js +3 -3
- package/internal/fileSystem.js.map +1 -1
- package/internal/path.d.ts +2 -0
- package/internal/path.d.ts.map +1 -0
- package/internal/path.js +97 -0
- package/internal/path.js.map +1 -0
- package/mjs/Command.mjs +139 -0
- package/mjs/Command.mjs.map +1 -0
- package/mjs/CommandExecutor.mjs +27 -0
- package/mjs/CommandExecutor.mjs.map +1 -0
- package/mjs/Console.mjs +90 -0
- package/mjs/Console.mjs.map +1 -1
- package/mjs/FileSystem.mjs +19 -0
- package/mjs/FileSystem.mjs.map +1 -1
- package/mjs/Path.mjs +20 -0
- package/mjs/Path.mjs.map +1 -0
- package/mjs/internal/command.mjs +159 -0
- package/mjs/internal/command.mjs.map +1 -0
- package/mjs/internal/commandExecutor.mjs +42 -0
- package/mjs/internal/commandExecutor.mjs.map +1 -0
- package/mjs/internal/console.mjs +44 -2
- package/mjs/internal/console.mjs.map +1 -1
- package/mjs/internal/fileSystem.mjs +3 -3
- package/mjs/internal/fileSystem.mjs.map +1 -1
- package/mjs/internal/path.mjs +87 -0
- package/mjs/internal/path.mjs.map +1 -0
- package/package.json +5 -4
- package/src/Command.ts +278 -0
- package/src/CommandExecutor.ts +191 -0
- package/src/Console.ts +132 -12
- package/src/Error.ts +1 -1
- package/src/FileSystem.ts +356 -119
- package/src/Path.ts +64 -0
- package/src/internal/command.ts +211 -0
- package/src/internal/commandExecutor.ts +69 -0
- package/src/internal/console.ts +92 -14
- package/src/internal/fileSystem.ts +4 -5
- package/src/internal/path.ts +101 -0
- package/FileSystem/File.d.ts +0 -91
- package/FileSystem/File.d.ts.map +0 -1
- package/FileSystem/File.js.map +0 -1
- package/mjs/FileSystem/File.mjs +0 -28
- package/mjs/FileSystem/File.mjs.map +0 -1
- package/src/FileSystem/File.ts +0 -125
package/mjs/Command.mjs
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as internal from "@effect/platform/internal/command";
|
|
2
|
+
/**
|
|
3
|
+
* @since 1.0.0
|
|
4
|
+
*/
|
|
5
|
+
export const CommandTypeId = internal.CommandTypeId;
|
|
6
|
+
/**
|
|
7
|
+
* Returns `true` if the specified value is a `Command`, otherwise returns
|
|
8
|
+
* `false`.
|
|
9
|
+
*
|
|
10
|
+
* @since 1.0.0
|
|
11
|
+
* @category refinements
|
|
12
|
+
*/
|
|
13
|
+
export const isCommand = internal.isCommand;
|
|
14
|
+
/**
|
|
15
|
+
* Specify the environment variables that will be used when running this command.
|
|
16
|
+
*
|
|
17
|
+
* @since 1.0.0
|
|
18
|
+
* @category combinators
|
|
19
|
+
*/
|
|
20
|
+
export const env = internal.env;
|
|
21
|
+
/**
|
|
22
|
+
* Returns the exit code of the command after the process has completed
|
|
23
|
+
* execution.
|
|
24
|
+
*
|
|
25
|
+
* @since 1.0.0
|
|
26
|
+
* @category execution
|
|
27
|
+
*/
|
|
28
|
+
export const exitCode = internal.exitCode;
|
|
29
|
+
/**
|
|
30
|
+
* Feed a string to standard input (default encoding of UTF-8).
|
|
31
|
+
*
|
|
32
|
+
* @since 1.0.0
|
|
33
|
+
* @category combinators
|
|
34
|
+
*/
|
|
35
|
+
export const feed = internal.feed;
|
|
36
|
+
/**
|
|
37
|
+
* Flatten this command to a non-empty array of standard commands.
|
|
38
|
+
*
|
|
39
|
+
* * For a `StandardCommand`, this simply returns a `1` element array
|
|
40
|
+
* * For a `PipedCommand`, all commands in the pipe will be extracted out into
|
|
41
|
+
* a array from left to right
|
|
42
|
+
*
|
|
43
|
+
* @since 1.0.0
|
|
44
|
+
* @category combinators
|
|
45
|
+
*/
|
|
46
|
+
export const flatten = internal.flatten;
|
|
47
|
+
/**
|
|
48
|
+
* Runs the command returning the output as an array of lines with the specified
|
|
49
|
+
* encoding.
|
|
50
|
+
*
|
|
51
|
+
* @since 1.0.0
|
|
52
|
+
* @category execution
|
|
53
|
+
*/
|
|
54
|
+
export const lines = internal.lines;
|
|
55
|
+
/**
|
|
56
|
+
* Create a command with the specified process name and an optional list of
|
|
57
|
+
* arguments.
|
|
58
|
+
*
|
|
59
|
+
* @since 1.0.0
|
|
60
|
+
* @category constructors
|
|
61
|
+
*/
|
|
62
|
+
export const make = internal.make;
|
|
63
|
+
/**
|
|
64
|
+
* Pipe one command to another command from left to right.
|
|
65
|
+
*
|
|
66
|
+
* Conceptually, the equivalent of piping one shell command to another:
|
|
67
|
+
*
|
|
68
|
+
* ```sh
|
|
69
|
+
* command1 | command2
|
|
70
|
+
* ```
|
|
71
|
+
*
|
|
72
|
+
* @since 1.0.0
|
|
73
|
+
* @category combinators
|
|
74
|
+
*/
|
|
75
|
+
export const pipeTo = internal.pipeTo;
|
|
76
|
+
/**
|
|
77
|
+
* Start running the command and return a handle to the running process.
|
|
78
|
+
*
|
|
79
|
+
* @since 1.0.0
|
|
80
|
+
* @category execution
|
|
81
|
+
*/
|
|
82
|
+
export const start = internal.start;
|
|
83
|
+
/**
|
|
84
|
+
* Start running the command and return the output as a `Stream`.
|
|
85
|
+
*
|
|
86
|
+
* @since 1.0.0
|
|
87
|
+
* @category execution
|
|
88
|
+
*/
|
|
89
|
+
export const stream = internal.stream;
|
|
90
|
+
/**
|
|
91
|
+
* Runs the command returning the output as an stream of lines with the
|
|
92
|
+
* specified encoding.
|
|
93
|
+
*
|
|
94
|
+
* @since 1.0.0
|
|
95
|
+
* @category execution
|
|
96
|
+
*/
|
|
97
|
+
export const streamLines = internal.streamLines;
|
|
98
|
+
/**
|
|
99
|
+
* Runs the command returning the entire output as a string with the
|
|
100
|
+
* specified encoding.
|
|
101
|
+
*
|
|
102
|
+
* If an encoding is not specified, the encoding will default to `utf-8`.
|
|
103
|
+
*
|
|
104
|
+
* @since 1.0.0
|
|
105
|
+
* @category execution
|
|
106
|
+
*/
|
|
107
|
+
export const string = internal.string;
|
|
108
|
+
/**
|
|
109
|
+
* Specify the standard error stream for a command.
|
|
110
|
+
*
|
|
111
|
+
* @since 1.0.0
|
|
112
|
+
* @category combinators
|
|
113
|
+
*/
|
|
114
|
+
export const stderr = internal.stderr;
|
|
115
|
+
/**
|
|
116
|
+
* Specify the standard input stream for a command.
|
|
117
|
+
*
|
|
118
|
+
* @since 1.0.0
|
|
119
|
+
* @category combinators
|
|
120
|
+
*/
|
|
121
|
+
export const stdin = internal.stdin;
|
|
122
|
+
/**
|
|
123
|
+
* Specify the standard output stream for a command.
|
|
124
|
+
*
|
|
125
|
+
* @since 1.0.0
|
|
126
|
+
* @category combinators
|
|
127
|
+
*/
|
|
128
|
+
export const stdout = internal.stdout;
|
|
129
|
+
/**
|
|
130
|
+
* Set the working directory that will be used when this command will be run.
|
|
131
|
+
*
|
|
132
|
+
* For piped commands, the working directory of each command will be set to the
|
|
133
|
+
* specified working directory.
|
|
134
|
+
*
|
|
135
|
+
* @since 1.0.0
|
|
136
|
+
* @category combinators
|
|
137
|
+
*/
|
|
138
|
+
export const workingDirectory = internal.workingDirectory;
|
|
139
|
+
//# sourceMappingURL=Command.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Command.mjs","names":["internal","CommandTypeId","isCommand","env","exitCode","feed","flatten","lines","make","pipeTo","start","stream","streamLines","string","stderr","stdin","stdout","workingDirectory"],"sources":["../src/Command.ts"],"sourcesContent":[null],"mappings":"AASA,OAAO,KAAKA,QAAQ,MAAM,mCAAmC;AAI7D;;;AAGA,OAAO,MAAMC,aAAa,GAAkBD,QAAQ,CAACC,aAAa;AAuFlE;;;;;;;AAOA,OAAO,MAAMC,SAAS,GAAiCF,QAAQ,CAACE,SAAS;AAEzE;;;;;;AAMA,OAAO,MAAMC,GAAG,GAGZH,QAAQ,CAACG,GAAG;AAEhB;;;;;;;AAOA,OAAO,MAAMC,QAAQ,GAAwEJ,QAAQ,CAACI,QAAQ;AAE9G;;;;;;AAMA,OAAO,MAAMC,IAAI,GAGbL,QAAQ,CAACK,IAAI;AAEjB;;;;;;;;;;AAUA,OAAO,MAAMC,OAAO,GAA8DN,QAAQ,CAACM,OAAO;AAElG;;;;;;;AAOA,OAAO,MAAMC,KAAK,GAGmDP,QAAQ,CAACO,KAAK;AAEnF;;;;;;;AAOA,OAAO,MAAMC,IAAI,GAAyDR,QAAQ,CAACQ,IAAI;AAEvF;;;;;;;;;;;;AAYA,OAAO,MAAMC,MAAM,GAGfT,QAAQ,CAACS,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAA0EV,QAAQ,CAACU,KAAK;AAE1G;;;;;;AAMA,OAAO,MAAMC,MAAM,GAA6EX,QAAQ,CAACW,MAAM;AAE/G;;;;;;;AAOA,OAAO,MAAMC,WAAW,GAAyEZ,QAAQ,CAACY,WAAW;AAErH;;;;;;;;;AASA,OAAO,MAAMC,MAAM,GAGfb,QAAQ,CAACa,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,MAAM,GAGfd,QAAQ,CAACc,MAAM;AAEnB;;;;;;AAMA,OAAO,MAAMC,KAAK,GAGdf,QAAQ,CAACe,KAAK;AAElB;;;;;;AAMA,OAAO,MAAMC,MAAM,GAGfhB,QAAQ,CAACgB,MAAM;AAEnB;;;;;;;;;AASA,OAAO,MAAMC,gBAAgB,GAGzBjB,QAAQ,CAACiB,gBAAgB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as internal from "@effect/platform/internal/commandExecutor";
|
|
2
|
+
/**
|
|
3
|
+
* @since 1.0.0
|
|
4
|
+
* @category tags
|
|
5
|
+
*/
|
|
6
|
+
export const CommandExecutor = internal.CommandExecutor;
|
|
7
|
+
/**
|
|
8
|
+
* @since 1.0.0
|
|
9
|
+
* @category symbols
|
|
10
|
+
*/
|
|
11
|
+
export const ProcessTypeId = internal.ProcessTypeId;
|
|
12
|
+
/**
|
|
13
|
+
* @since 1.0.0
|
|
14
|
+
* @category constructors
|
|
15
|
+
*/
|
|
16
|
+
export const ExitCode = internal.ExitCode;
|
|
17
|
+
/**
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
* @category constructors
|
|
20
|
+
*/
|
|
21
|
+
export const ProcessId = internal.ProcessId;
|
|
22
|
+
/**
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
* @category constructors
|
|
25
|
+
*/
|
|
26
|
+
export const makeExecutor = internal.makeExecutor;
|
|
27
|
+
//# sourceMappingURL=CommandExecutor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommandExecutor.mjs","names":["internal","CommandExecutor","ProcessTypeId","ExitCode","ProcessId","makeExecutor"],"sources":["../src/CommandExecutor.ts"],"sourcesContent":[null],"mappings":"AAQA,OAAO,KAAKA,QAAQ,MAAM,2CAA2C;AAyCrE;;;;AAIA,OAAO,MAAMC,eAAe,GAA0CD,QAAQ,CAACC,eAAe;AAE9F;;;;AAIA,OAAO,MAAMC,aAAa,GAAkBF,QAAQ,CAACE,aAAa;AAiHlE;;;;AAIA,OAAO,MAAMC,QAAQ,GAAsCH,QAAQ,CAACG,QAAQ;AAE5E;;;;AAIA,OAAO,MAAMC,SAAS,GAAwCJ,QAAQ,CAACI,SAAS;AAEhF;;;;AAIA,OAAO,MAAMC,YAAY,GAEFL,QAAQ,CAACK,YAAY"}
|
package/mjs/Console.mjs
CHANGED
|
@@ -9,4 +9,94 @@ export const Console = internal.Console;
|
|
|
9
9
|
* @category layer
|
|
10
10
|
*/
|
|
11
11
|
export const layer = internal.layer;
|
|
12
|
+
/**
|
|
13
|
+
* @since 1.0.0
|
|
14
|
+
* @category accessor
|
|
15
|
+
*/
|
|
16
|
+
export const assert = internal.assert;
|
|
17
|
+
/**
|
|
18
|
+
* @since 1.0.0
|
|
19
|
+
* @category accessor
|
|
20
|
+
*/
|
|
21
|
+
export const clear = internal.clear;
|
|
22
|
+
/**
|
|
23
|
+
* @since 1.0.0
|
|
24
|
+
* @category accessor
|
|
25
|
+
*/
|
|
26
|
+
export const count = internal.count;
|
|
27
|
+
/**
|
|
28
|
+
* @since 1.0.0
|
|
29
|
+
* @category accessor
|
|
30
|
+
*/
|
|
31
|
+
export const countReset = internal.countReset;
|
|
32
|
+
/**
|
|
33
|
+
* @since 1.0.0
|
|
34
|
+
* @category accessor
|
|
35
|
+
*/
|
|
36
|
+
export const debug = internal.debug;
|
|
37
|
+
/**
|
|
38
|
+
* @since 1.0.0
|
|
39
|
+
* @category accessor
|
|
40
|
+
*/
|
|
41
|
+
export const dir = internal.dir;
|
|
42
|
+
/**
|
|
43
|
+
* @since 1.0.0
|
|
44
|
+
* @category accessor
|
|
45
|
+
*/
|
|
46
|
+
export const dirxml = internal.dirxml;
|
|
47
|
+
/**
|
|
48
|
+
* @since 1.0.0
|
|
49
|
+
* @category accessor
|
|
50
|
+
*/
|
|
51
|
+
export const error = internal.error;
|
|
52
|
+
/**
|
|
53
|
+
* @since 1.0.0
|
|
54
|
+
* @category accessor
|
|
55
|
+
*/
|
|
56
|
+
export const group = internal.group;
|
|
57
|
+
/**
|
|
58
|
+
* @since 1.0.0
|
|
59
|
+
* @category accessor
|
|
60
|
+
*/
|
|
61
|
+
export const info = internal.info;
|
|
62
|
+
/**
|
|
63
|
+
* @since 1.0.0
|
|
64
|
+
* @category accessor
|
|
65
|
+
*/
|
|
66
|
+
export const log = internal.log;
|
|
67
|
+
/**
|
|
68
|
+
* @since 1.0.0
|
|
69
|
+
* @category accessor
|
|
70
|
+
*/
|
|
71
|
+
export const table = internal.table;
|
|
72
|
+
/**
|
|
73
|
+
* @since 1.0.0
|
|
74
|
+
* @category accessor
|
|
75
|
+
*/
|
|
76
|
+
export const time = internal.time;
|
|
77
|
+
/**
|
|
78
|
+
* @since 1.0.0
|
|
79
|
+
* @category accessor
|
|
80
|
+
*/
|
|
81
|
+
export const timeLog = internal.timeLog;
|
|
82
|
+
/**
|
|
83
|
+
* @since 1.0.0
|
|
84
|
+
* @category accessor
|
|
85
|
+
*/
|
|
86
|
+
export const trace = internal.trace;
|
|
87
|
+
/**
|
|
88
|
+
* @since 1.0.0
|
|
89
|
+
* @category accessor
|
|
90
|
+
*/
|
|
91
|
+
export const warn = internal.warn;
|
|
92
|
+
/**
|
|
93
|
+
* @since 1.0.0
|
|
94
|
+
* @category accessor
|
|
95
|
+
*/
|
|
96
|
+
export const withGroup = internal.withGroup;
|
|
97
|
+
/**
|
|
98
|
+
* @since 1.0.0
|
|
99
|
+
* @category accessor
|
|
100
|
+
*/
|
|
101
|
+
export const withTime = internal.withTime;
|
|
12
102
|
//# sourceMappingURL=Console.mjs.map
|
package/mjs/Console.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Console.mjs","names":["internal","Console","layer"],"sources":["../src/Console.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"file":"Console.mjs","names":["internal","Console","layer","assert","clear","count","countReset","debug","dir","dirxml","error","group","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I,GAAkElB,QAAQ,CAACkB,IAAI;AAEhG;;;;AAIA,OAAO,MAAMC,SAAS,GAE+CnB,QAAQ,CAACmB,SAAS;AAEvF;;;;AAIA,OAAO,MAAMC,QAAQ,GACnBpB,QAAQ,CAACoB,QAAQ"}
|
package/mjs/FileSystem.mjs
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import * as Brand from "@effect/data/Brand";
|
|
1
5
|
import * as internal from "@effect/platform/internal/fileSystem";
|
|
2
6
|
/**
|
|
3
7
|
* @since 1.0.0
|
|
@@ -14,4 +18,19 @@ export const FileSystem = internal.tag;
|
|
|
14
18
|
* @category constructor
|
|
15
19
|
*/
|
|
16
20
|
export const make = internal.make;
|
|
21
|
+
/**
|
|
22
|
+
* @since 1.0.0
|
|
23
|
+
* @category type id
|
|
24
|
+
*/
|
|
25
|
+
export const FileTypeId = /*#__PURE__*/Symbol.for("@effect/platform/FileSystem/File");
|
|
26
|
+
/**
|
|
27
|
+
* @since 1.0.0
|
|
28
|
+
* @category guard
|
|
29
|
+
*/
|
|
30
|
+
export const isFile = u => typeof u === "object" && u !== null && FileTypeId in u;
|
|
31
|
+
/**
|
|
32
|
+
* @since 1.0.0
|
|
33
|
+
* @category constructor
|
|
34
|
+
*/
|
|
35
|
+
export const FileDescriptor = /*#__PURE__*/Brand.nominal();
|
|
17
36
|
//# sourceMappingURL=FileSystem.mjs.map
|
package/mjs/FileSystem.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystem.mjs","names":["internal","Size","FileSystem","tag","make"],"sources":["../src/FileSystem.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileSystem.mjs","names":["Brand","internal","Size","FileSystem","tag","make","FileTypeId","Symbol","for","isFile","u","FileDescriptor","nominal"],"sources":["../src/FileSystem.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAGA,OAAO,KAAKA,KAAK,MAAM,oBAAoB;AAM3C,OAAO,KAAKC,QAAQ,MAAM,sCAAsC;AAmOhE;;;;AAIA,OAAO,MAAMC,IAAI,GAAqCD,QAAQ,CAACC,IAAI;AAmHnE;;;;AAIA,OAAO,MAAMC,UAAU,GAAgCF,QAAQ,CAACG,GAAG;AAEnE;;;;AAIA,OAAO,MAAMC,IAAI,GAA8DJ,QAAQ,CAACI,IAAI;AAE5F;;;;AAIA,OAAO,MAAMC,UAAU,gBAAkBC,MAAM,CAACC,GAAG,CACjD,kCAAkC,CACnC;AAQD;;;;AAIA,OAAO,MAAMC,MAAM,GAAIC,CAAU,IAAgB,OAAOA,CAAC,KAAK,QAAQ,IAAIA,CAAC,KAAK,IAAI,IAAIJ,UAAU,IAAII,CAAC;AA2EvG;;;;AAIA,OAAO,MAAMC,cAAc,gBAAGX,KAAK,CAACY,OAAO,EAAmB"}
|
package/mjs/Path.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @since 1.0.0
|
|
3
|
+
*/
|
|
4
|
+
import * as internal from "@effect/platform/internal/path";
|
|
5
|
+
/**
|
|
6
|
+
* @since 1.0.0
|
|
7
|
+
* @category tag
|
|
8
|
+
*/
|
|
9
|
+
export const Path = internal.Path;
|
|
10
|
+
/**
|
|
11
|
+
* An implementation of the Path interface that can be used in all environments
|
|
12
|
+
* (including browsers).
|
|
13
|
+
*
|
|
14
|
+
* It uses the POSIX standard for paths.
|
|
15
|
+
*
|
|
16
|
+
* @since 1.0.0
|
|
17
|
+
* @category layer
|
|
18
|
+
*/
|
|
19
|
+
export const layer = internal.layer;
|
|
20
|
+
//# sourceMappingURL=Path.mjs.map
|
package/mjs/Path.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Path.mjs","names":["internal","Path","layer"],"sources":["../src/Path.ts"],"sourcesContent":[null],"mappings":"AAAA;;;AAQA,OAAO,KAAKA,QAAQ,MAAM,gCAAgC;AAwC1D;;;;AAIA,OAAO,MAAMC,IAAI,GAAoBD,QAAQ,CAACC,IAAI;AAElD;;;;;;;;;AASA,OAAO,MAAMC,KAAK,GAA8BF,QAAQ,CAACE,KAAK"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import * as Chunk from "@effect/data/Chunk";
|
|
2
|
+
import { dual } from "@effect/data/Function";
|
|
3
|
+
import * as HashMap from "@effect/data/HashMap";
|
|
4
|
+
import * as Option from "@effect/data/Option";
|
|
5
|
+
import * as Effect from "@effect/io/Effect";
|
|
6
|
+
import * as commandExecutor from "@effect/platform/internal/commandExecutor";
|
|
7
|
+
import * as Stream from "@effect/stream/Stream";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const CommandTypeId = /*#__PURE__*/Symbol.for("@effect/platform/Command");
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const isCommand = u => typeof u === "object" && u != null && CommandTypeId in u;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const env = /*#__PURE__*/dual(2, (self, environment) => {
|
|
14
|
+
switch (self._tag) {
|
|
15
|
+
case "StandardCommand":
|
|
16
|
+
{
|
|
17
|
+
return {
|
|
18
|
+
...self,
|
|
19
|
+
env: HashMap.union(self.env, HashMap.fromIterable(Object.entries(environment)))
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
case "PipedCommand":
|
|
23
|
+
{
|
|
24
|
+
return pipeTo(env(self.left, environment), env(self.right, environment));
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const exitCode = self => Effect.flatMap(commandExecutor.CommandExecutor, executor => executor.exitCode(self));
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const feed = /*#__PURE__*/dual(2, (self, input) => stdin(self, Stream.fromChunk(Chunk.of(new TextEncoder().encode(input)))));
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const flatten = self => Array.from(flattenLoop(self));
|
|
34
|
+
/** @internal */
|
|
35
|
+
const flattenLoop = self => {
|
|
36
|
+
switch (self._tag) {
|
|
37
|
+
case "StandardCommand":
|
|
38
|
+
{
|
|
39
|
+
return Chunk.of(self);
|
|
40
|
+
}
|
|
41
|
+
case "PipedCommand":
|
|
42
|
+
{
|
|
43
|
+
return Chunk.appendAll(flattenLoop(self.left), flattenLoop(self.right));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const lines = (command, encoding = "utf-8") => Effect.flatMap(commandExecutor.CommandExecutor, executor => executor.lines(command, encoding));
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const make = (command, ...args) => ({
|
|
51
|
+
[CommandTypeId]: CommandTypeId,
|
|
52
|
+
_tag: "StandardCommand",
|
|
53
|
+
command,
|
|
54
|
+
args,
|
|
55
|
+
env: HashMap.empty(),
|
|
56
|
+
cwd: Option.none(),
|
|
57
|
+
// The initial process input here does not matter, we just want the child
|
|
58
|
+
// process to default to `"pipe"` for the stdin stream.
|
|
59
|
+
stdin: Option.some(Stream.empty),
|
|
60
|
+
stdout: "pipe",
|
|
61
|
+
stderr: "pipe",
|
|
62
|
+
gid: Option.none(),
|
|
63
|
+
uid: Option.none()
|
|
64
|
+
});
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const pipeTo = /*#__PURE__*/dual(2, (self, into) => ({
|
|
67
|
+
[CommandTypeId]: CommandTypeId,
|
|
68
|
+
_tag: "PipedCommand",
|
|
69
|
+
left: self,
|
|
70
|
+
right: into
|
|
71
|
+
}));
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const stderr = /*#__PURE__*/dual(2, (self, output) => {
|
|
74
|
+
switch (self._tag) {
|
|
75
|
+
case "StandardCommand":
|
|
76
|
+
{
|
|
77
|
+
return {
|
|
78
|
+
...self,
|
|
79
|
+
stderr: output
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
// For piped commands it only makes sense to provide `stderr` for the
|
|
83
|
+
// right-most command as the rest will be piped in.
|
|
84
|
+
case "PipedCommand":
|
|
85
|
+
{
|
|
86
|
+
return {
|
|
87
|
+
...self,
|
|
88
|
+
right: stderr(self.right, output)
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const stdin = /*#__PURE__*/dual(2, (self, input) => {
|
|
95
|
+
switch (self._tag) {
|
|
96
|
+
case "StandardCommand":
|
|
97
|
+
{
|
|
98
|
+
return {
|
|
99
|
+
...self,
|
|
100
|
+
stdin: Option.some(input)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
// For piped commands it only makes sense to provide `stdin` for the
|
|
104
|
+
// left-most command as the rest will be piped in.
|
|
105
|
+
case "PipedCommand":
|
|
106
|
+
{
|
|
107
|
+
return {
|
|
108
|
+
...self,
|
|
109
|
+
left: stdin(self.left, input)
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const stdout = /*#__PURE__*/dual(2, (self, output) => {
|
|
116
|
+
switch (self._tag) {
|
|
117
|
+
case "StandardCommand":
|
|
118
|
+
{
|
|
119
|
+
return {
|
|
120
|
+
...self,
|
|
121
|
+
stdout: output
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
// For piped commands it only makes sense to provide `stderr` for the
|
|
125
|
+
// right-most command as the rest will be piped in.
|
|
126
|
+
case "PipedCommand":
|
|
127
|
+
{
|
|
128
|
+
return {
|
|
129
|
+
...self,
|
|
130
|
+
right: stdout(self.right, output)
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
/** @internal */
|
|
136
|
+
export const start = command => Effect.flatMap(commandExecutor.CommandExecutor, executor => executor.start(command));
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const stream = command => Stream.flatMap(commandExecutor.CommandExecutor, process => process.stream(command));
|
|
139
|
+
/** @internal */
|
|
140
|
+
export const streamLines = command => Stream.flatMap(commandExecutor.CommandExecutor, process => process.streamLines(command));
|
|
141
|
+
/** @internal */
|
|
142
|
+
export const string = /*#__PURE__*/dual(args => isCommand(args[0]), (command, encoding) => Effect.flatMap(commandExecutor.CommandExecutor, executor => executor.string(command, encoding)));
|
|
143
|
+
/** @internal */
|
|
144
|
+
export const workingDirectory = /*#__PURE__*/dual(2, (self, cwd) => {
|
|
145
|
+
switch (self._tag) {
|
|
146
|
+
case "StandardCommand":
|
|
147
|
+
{
|
|
148
|
+
return {
|
|
149
|
+
...self,
|
|
150
|
+
cwd: Option.some(cwd)
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
case "PipedCommand":
|
|
154
|
+
{
|
|
155
|
+
return pipeTo(workingDirectory(self.left, cwd), workingDirectory(self.right, cwd));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
//# sourceMappingURL=command.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command.mjs","names":["Chunk","dual","HashMap","Option","Effect","commandExecutor","Stream","CommandTypeId","Symbol","for","isCommand","u","env","self","environment","_tag","union","fromIterable","Object","entries","pipeTo","left","right","exitCode","flatMap","CommandExecutor","executor","feed","input","stdin","fromChunk","of","TextEncoder","encode","flatten","Array","from","flattenLoop","appendAll","lines","command","encoding","make","args","empty","cwd","none","some","stdout","stderr","gid","uid","into","output","start","stream","process","streamLines","string","workingDirectory"],"sources":["../../src/internal/command.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,oBAAoB;AAC3C,SAASC,IAAI,QAAQ,uBAAuB;AAC5C,OAAO,KAAKC,OAAO,MAAM,sBAAsB;AAC/C,OAAO,KAAKC,MAAM,MAAM,qBAAqB;AAE7C,OAAO,KAAKC,MAAM,MAAM,mBAAmB;AAI3C,OAAO,KAAKC,eAAe,MAAM,2CAA2C;AAC5E,OAAO,KAAKC,MAAM,MAAM,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AAG,CAAC,CAAC;;;AAGxF,CAAC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as Brand from "@effect/data/Brand";
|
|
2
|
+
import * as Chunk from "@effect/data/Chunk";
|
|
3
|
+
import { Tag } from "@effect/data/Context";
|
|
4
|
+
import * as Effect from "@effect/io/Effect";
|
|
5
|
+
import * as Sink from "@effect/stream/Sink";
|
|
6
|
+
import * as Stream from "@effect/stream/Stream";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const ProcessTypeId = /*#__PURE__*/Symbol.for("@effect/platform/Process");
|
|
9
|
+
/** @internal */
|
|
10
|
+
export const ExitCode = /*#__PURE__*/Brand.nominal();
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const ProcessId = /*#__PURE__*/Brand.nominal();
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const CommandExecutor = /*#__PURE__*/Tag();
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const makeExecutor = start => {
|
|
17
|
+
const stream = command => Stream.flatMap(process => process.stdout)(Stream.fromEffect(start(command)));
|
|
18
|
+
const streamLines = (command, encoding) => {
|
|
19
|
+
const decoder = new TextDecoder(encoding);
|
|
20
|
+
return Stream.splitLines(Stream.mapChunks(stream(command), Chunk.map(bytes => decoder.decode(bytes))));
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
start,
|
|
24
|
+
exitCode: command => Effect.flatMap(start(command), process => process.exitCode),
|
|
25
|
+
stream,
|
|
26
|
+
string: (command, encoding = "utf-8") => {
|
|
27
|
+
const decoder = new TextDecoder(encoding);
|
|
28
|
+
return Effect.map(bytes => decoder.decode(bytes))(Effect.flatMap(process => Stream.run(process.stdout, collectUint8Array))(start(command)));
|
|
29
|
+
},
|
|
30
|
+
lines: (command, encoding = "utf-8") => {
|
|
31
|
+
return Effect.map(Chunk.toReadonlyArray)(Stream.runCollect(streamLines(command, encoding)));
|
|
32
|
+
},
|
|
33
|
+
streamLines
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
const collectUint8Array = /*#__PURE__*/Sink.foldLeftChunks( /*#__PURE__*/new Uint8Array(), (bytes, chunk) => Chunk.reduce(chunk, bytes, (acc, curr) => {
|
|
37
|
+
const newArray = new Uint8Array(acc.length + curr.length);
|
|
38
|
+
newArray.set(acc);
|
|
39
|
+
newArray.set(curr, acc.length);
|
|
40
|
+
return newArray;
|
|
41
|
+
}));
|
|
42
|
+
//# sourceMappingURL=commandExecutor.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commandExecutor.mjs","names":["Brand","Chunk","Tag","Effect","Sink","Stream","ProcessTypeId","Symbol","for","ExitCode","nominal","ProcessId","CommandExecutor","makeExecutor","start","stream","command","flatMap","process","stdout","fromEffect","streamLines","encoding","decoder","TextDecoder","splitLines","mapChunks","map","bytes","decode","exitCode","string","run","collectUint8Array","lines","toReadonlyArray","runCollect","foldLeftChunks","Uint8Array","chunk","reduce","acc","curr","newArray","length","set"],"sources":["../../src/internal/commandExecutor.ts"],"sourcesContent":[null],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,oBAAoB;AAC3C,OAAO,KAAKC,KAAK,MAAM,oBAAoB;AAC3C,SAASC,GAAG,QAAQ,sBAAsB;AAE1C,OAAO,KAAKC,MAAM,MAAM,mBAAmB;AAE3C,OAAO,KAAKC,IAAI,MAAM,qBAAqB;AAC3C,OAAO,KAAKC,MAAM,MAAM,uBAAuB;AAE/C;AACA,OAAO,MAAMC,aAAa,gBAAmCC,MAAM,CAACC,GAAG,CACrE,0BAA0B,CACO;AAEnC;AACA,OAAO,MAAMC,QAAQ,gBAAGT,KAAK,CAACU,OAAO,EAA6B;AAElE;AACA,OAAO,MAAMC,SAAS,gBAAGX,KAAK,CAACU,OAAO,EAA+B;AAErE;AACA,OAAO,MAAME,eAAe,gBAAGV,GAAG,EAAoC;AAEtE;AACA,OAAO,MAAMW,YAAY,GAAIC,KAAgD,IAAsC;EACjH,MAAMC,MAAM,GAAgD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AIlC,CAAC;IACDD;GACD;AACH,CAAC;AAED,MAAMY,iBAAiB,gBAA2D7B,IAAI,CAACiC,cAAc,eACnG,IAAIC,UAAU,EAAE,EAChB,CAACV,KAAK,EAAEW,KAA8B,KACpCtC,KAAK,CAACuC,MAAM,CAACD,KAAK,EAAEX,KAAK,EAAE,CAACa,GAAG,EAAEC,IAAI,KAAI;EACvC,MAAMC,QAAQ,GAAG,IAAIL,UAAU,CAACG,GAAG,CAACG,MAAM,GAAGF,IAAI,CAACE,MAAM,CAAC;EACzDD,QAAQ,CAACE,GAAG,CAACJ,GAAG,CAAC;EACjBE,QAAQ,CAACE,GAAG,CAACH,IAAI,EAAED,GAAG,CAACG,MAAM,CAAC;EAC9B,OAAOD,QAAQ;AACjB,CAAC,CAAC,CACL"}
|
package/mjs/internal/console.mjs
CHANGED
|
@@ -49,7 +49,7 @@ const consoleImpl = /*#__PURE__*/Console.of({
|
|
|
49
49
|
});
|
|
50
50
|
},
|
|
51
51
|
group(options) {
|
|
52
|
-
return
|
|
52
|
+
return Effect.acquireRelease(options?.collapsed ? Effect.sync(() => console.groupCollapsed(options?.label)) : Effect.sync(() => console.group(options?.label)), () => Effect.sync(() => console.groupEnd()));
|
|
53
53
|
},
|
|
54
54
|
info(...args) {
|
|
55
55
|
return Effect.sync(() => {
|
|
@@ -67,7 +67,7 @@ const consoleImpl = /*#__PURE__*/Console.of({
|
|
|
67
67
|
});
|
|
68
68
|
},
|
|
69
69
|
time(label) {
|
|
70
|
-
return
|
|
70
|
+
return Effect.acquireRelease(Effect.sync(() => console.time(label)), () => Effect.sync(() => console.timeEnd(label)));
|
|
71
71
|
},
|
|
72
72
|
timeLog(label, ...args) {
|
|
73
73
|
return Effect.sync(() => {
|
|
@@ -83,8 +83,50 @@ const consoleImpl = /*#__PURE__*/Console.of({
|
|
|
83
83
|
return Effect.sync(() => {
|
|
84
84
|
console.warn(...args);
|
|
85
85
|
});
|
|
86
|
+
},
|
|
87
|
+
withGroup(options) {
|
|
88
|
+
return self => Effect.acquireUseRelease(options?.collapsed ? Effect.sync(() => console.groupCollapsed(options?.label)) : Effect.sync(() => console.group(options?.label)), () => self, () => Effect.sync(() => console.groupEnd()));
|
|
89
|
+
},
|
|
90
|
+
withTime(label) {
|
|
91
|
+
return self => Effect.acquireUseRelease(Effect.sync(() => console.time(label)), () => self, () => Effect.sync(() => console.timeEnd(label)));
|
|
86
92
|
}
|
|
87
93
|
});
|
|
88
94
|
/** @internal */
|
|
89
95
|
export const layer = /*#__PURE__*/Layer.succeed(Console, consoleImpl);
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const assert = (condition, ...args) => Effect.flatMap(Console, _ => _.assert(condition, ...args));
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const clear = () => Effect.flatMap(Console, _ => _.clear());
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const count = label => Effect.flatMap(Console, _ => _.count(label));
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const countReset = label => Effect.flatMap(Console, _ => _.countReset(label));
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const debug = (...args) => Effect.flatMap(Console, _ => _.debug(...args));
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const dir = (...args) => Effect.flatMap(Console, _ => _.dir(...args));
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const dirxml = (...args) => Effect.flatMap(Console, _ => _.dirxml(...args));
|
|
110
|
+
/** @internal */
|
|
111
|
+
export const error = (...args) => Effect.flatMap(Console, _ => _.error(...args));
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const group = options => Effect.flatMap(Console, _ => _.group(options));
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const info = (...args) => Effect.flatMap(Console, _ => _.info(...args));
|
|
116
|
+
/** @internal */
|
|
117
|
+
export const log = (...args) => Effect.flatMap(Console, _ => _.log(...args));
|
|
118
|
+
/** @internal */
|
|
119
|
+
export const table = (tabularData, properties) => Effect.flatMap(Console, _ => _.table(tabularData, properties));
|
|
120
|
+
/** @internal */
|
|
121
|
+
export const time = label => Effect.flatMap(Console, _ => _.time(label));
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const timeLog = (label, ...args) => Effect.flatMap(Console, _ => _.timeLog(label, ...args));
|
|
124
|
+
/** @internal */
|
|
125
|
+
export const trace = (...args) => Effect.flatMap(Console, _ => _.trace(...args));
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const warn = (...args) => Effect.flatMap(Console, _ => _.warn(...args));
|
|
128
|
+
/** @internal */
|
|
129
|
+
export const withGroup = options => self => Effect.flatMap(Console, _ => _.withGroup(options)(self));
|
|
130
|
+
/** @internal */
|
|
131
|
+
export const withTime = label => self => Effect.flatMap(Console, _ => _.withTime(label)(self));
|
|
90
132
|
//# sourceMappingURL=console.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.mjs","names":["Tag","Effect","Layer","Console","consoleImpl","of","assert","condition","args","sync","console","clear","count","label","countReset","debug","dir","dirxml","error","group","options","
|
|
1
|
+
{"version":3,"file":"console.mjs","names":["Tag","Effect","Layer","Console","consoleImpl","of","assert","condition","args","sync","console","clear","count","label","countReset","debug","dir","dirxml","error","group","options","acquireRelease","collapsed","groupCollapsed","groupEnd","info","log","table","tabularData","properties","time","timeEnd","timeLog","trace","warn","withGroup","self","acquireUseRelease","withTime","layer","succeed","flatMap","_"],"sources":["../../src/internal/console.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,GAAG,QAAQ,sBAAsB;AAC1C,OAAO,KAAKC,MAAM,MAAM,mBAAmB;AAC3C,OAAO,KAAKC,KAAK,MAAM,kBAAkB;AAGzC;;;;AAIA,OAAO,MAAMC,OAAO,gBAAGH,GAAG,EAAY;AAEtC;AACA,MAAMI,WAAW,gBAAGD,OAAO,CAACE,EAAE,CAAC;EAC7BC,MAAMA,CAACC,SAAS,EAAE,GAAGC,IAAI;IACvB,OAAOP,MAAM,CAACQ,IAAI,CAAC,MAAK;MACtBC,OAAO,CAACJ,MAAM,CAACC,S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