whet 0.0.1
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/LICENSE +21 -0
- package/README.md +47 -0
- package/bin/HxOverrides.d.ts +8 -0
- package/bin/HxOverrides.js +54 -0
- package/bin/Lambda.d.ts +86 -0
- package/bin/Lambda.js +141 -0
- package/bin/Map.d.ts +5 -0
- package/bin/Reflect.d.ts +19 -0
- package/bin/Reflect.js +41 -0
- package/bin/Std.d.ts +49 -0
- package/bin/Std.js +96 -0
- package/bin/StdTypes.d.ts +57 -0
- package/bin/StringTools.d.ts +23 -0
- package/bin/StringTools.js +36 -0
- package/bin/commander/AddHelpTextContext.d.ts +6 -0
- package/bin/commander/AddHelpTextPosition.d.ts +2 -0
- package/bin/commander/CommandOptions.d.ts +6 -0
- package/bin/commander/ErrorOptions.d.ts +11 -0
- package/bin/commander/ExecutableCommandOptions.d.ts +7 -0
- package/bin/commander/HelpContext.d.ts +4 -0
- package/bin/commander/HookEvent.d.ts +2 -0
- package/bin/commander/OptionValueSource.d.ts +2 -0
- package/bin/commander/OutputConfiguration.d.ts +8 -0
- package/bin/commander/ParseOptions.d.ts +4 -0
- package/bin/commander/ParseOptionsResult.d.ts +5 -0
- package/bin/genes/Register.d.ts +15 -0
- package/bin/genes/Register.js +107 -0
- package/bin/genes/util/EsMap.d.ts +12 -0
- package/bin/genes/util/EsMap.js +51 -0
- package/bin/haxe/Constraints.d.ts +8 -0
- package/bin/haxe/Constraints.js +5 -0
- package/bin/haxe/Exception.d.ts +66 -0
- package/bin/haxe/Exception.js +88 -0
- package/bin/haxe/NativeStackTrace.d.ts +7 -0
- package/bin/haxe/PosInfos.d.ts +19 -0
- package/bin/haxe/Rest.d.ts +2 -0
- package/bin/haxe/ValueException.d.ts +24 -0
- package/bin/haxe/ValueException.js +36 -0
- package/bin/haxe/crypto/Crc32.d.ts +12 -0
- package/bin/haxe/crypto/Crc32.js +40 -0
- package/bin/haxe/ds/List.d.ts +31 -0
- package/bin/haxe/ds/List.js +55 -0
- package/bin/haxe/ds/ObjectMap.d.ts +7 -0
- package/bin/haxe/ds/ObjectMap.js +25 -0
- package/bin/haxe/ds/StringMap.d.ts +6 -0
- package/bin/haxe/ds/StringMap.js +25 -0
- package/bin/haxe/exceptions/NotImplementedException.d.ts +10 -0
- package/bin/haxe/exceptions/NotImplementedException.js +27 -0
- package/bin/haxe/exceptions/PosException.d.ts +19 -0
- package/bin/haxe/exceptions/PosException.js +36 -0
- package/bin/haxe/extern/Rest.d.ts +11 -0
- package/bin/haxe/io/ArrayBufferView.d.ts +2 -0
- package/bin/haxe/io/Bytes.d.ts +19 -0
- package/bin/haxe/io/Bytes.js +78 -0
- package/bin/haxe/io/BytesBuffer.d.ts +19 -0
- package/bin/haxe/io/BytesBuffer.js +67 -0
- package/bin/haxe/io/BytesData.d.ts +2 -0
- package/bin/haxe/io/BytesOutput.d.ts +18 -0
- package/bin/haxe/io/BytesOutput.js +39 -0
- package/bin/haxe/io/Encoding.d.ts +20 -0
- package/bin/haxe/io/Encoding.js +20 -0
- package/bin/haxe/io/Error.d.ts +35 -0
- package/bin/haxe/io/Error.js +31 -0
- package/bin/haxe/io/Output.d.ts +63 -0
- package/bin/haxe/io/Output.js +126 -0
- package/bin/haxe/io/Path.d.ts +109 -0
- package/bin/haxe/io/Path.js +217 -0
- package/bin/haxe/io/UInt8Array.d.ts +2 -0
- package/bin/haxe/iterators/ArrayIterator.d.ts +19 -0
- package/bin/haxe/iterators/ArrayIterator.js +35 -0
- package/bin/haxe/macro/Expr.d.ts +331 -0
- package/bin/haxe/macro/Type.d.ts +609 -0
- package/bin/haxe/zip/Compress.d.ts +5 -0
- package/bin/haxe/zip/Compress.js +21 -0
- package/bin/haxe/zip/Entry.d.ts +27 -0
- package/bin/haxe/zip/Entry.js +15 -0
- package/bin/haxe/zip/Tools.d.ts +5 -0
- package/bin/haxe/zip/Tools.js +24 -0
- package/bin/haxe/zip/Writer.d.ts +22 -0
- package/bin/haxe/zip/Writer.js +149 -0
- package/bin/js/Boot.d.ts +18 -0
- package/bin/js/Boot.js +225 -0
- package/bin/js/Node.d.ts +6 -0
- package/bin/js/lib/ArrayBuffer.d.ts +4 -0
- package/bin/js/lib/ArrayBuffer.js +24 -0
- package/bin/js/lib/Iterator.d.ts +23 -0
- package/bin/js/lib/Map.d.ts +2 -0
- package/bin/js/lib/Object.d.ts +82 -0
- package/bin/js/lib/Promise.d.ts +10 -0
- package/bin/js/lib/intl/NumberFormat.d.ts +114 -0
- package/bin/js/node/Buffer.d.ts +3 -0
- package/bin/js/node/ChildProcess.d.ts +424 -0
- package/bin/js/node/Crypto.d.ts +21 -0
- package/bin/js/node/Dns.d.ts +57 -0
- package/bin/js/node/Fs.d.ts +308 -0
- package/bin/js/node/Http.d.ts +114 -0
- package/bin/js/node/Https.d.ts +330 -0
- package/bin/js/node/Iterator.d.ts +5 -0
- package/bin/js/node/Path.d.ts +44 -0
- package/bin/js/node/Process.d.ts +6 -0
- package/bin/js/node/Tls.d.ts +304 -0
- package/bin/js/node/Url.d.ts +126 -0
- package/bin/js/node/Util.d.ts +115 -0
- package/bin/js/node/Zlib.d.ts +29 -0
- package/bin/js/node/buffer/Buffer.d.ts +23 -0
- package/bin/js/node/buffer/Buffer.js +24 -0
- package/bin/js/node/child_process/ChildProcess.d.ts +11 -0
- package/bin/js/node/console/Console.d.ts +26 -0
- package/bin/js/node/http/Agent.d.ts +40 -0
- package/bin/js/node/http/ClientRequest.d.ts +10 -0
- package/bin/js/node/https/Agent.d.ts +50 -0
- package/bin/js/node/net/Server.d.ts +22 -0
- package/bin/js/node/net/Socket.d.ts +101 -0
- package/bin/js/node/stream/Duplex.d.ts +86 -0
- package/bin/js/node/stream/Readable.d.ts +41 -0
- package/bin/js/node/stream/Transform.d.ts +92 -0
- package/bin/js/node/stream/Writable.d.ts +57 -0
- package/bin/js/node/tls/SecureContext.d.ts +74 -0
- package/bin/js/node/tls/TLSSocket.d.ts +47 -0
- package/bin/ts/Undefined.d.ts +5 -0
- package/bin/whet/Log.d.ts +16 -0
- package/bin/whet/Log.js +106 -0
- package/bin/whet/Project.d.ts +33 -0
- package/bin/whet/Project.js +71 -0
- package/bin/whet/Source.d.ts +51 -0
- package/bin/whet/Source.js +136 -0
- package/bin/whet/SourceHash.d.ts +15 -0
- package/bin/whet/SourceHash.js +68 -0
- package/bin/whet/SourceId.d.ts +10 -0
- package/bin/whet/SourceId.js +74 -0
- package/bin/whet/Stone.d.ts +88 -0
- package/bin/whet/Stone.js +157 -0
- package/bin/whet/Utils.d.ts +16 -0
- package/bin/whet/Utils.js +72 -0
- package/bin/whet/Whet.d.ts +4 -0
- package/bin/whet/Whet.js +117 -0
- package/bin/whet/cache/BaseCache.d.ts +27 -0
- package/bin/whet/cache/BaseCache.js +210 -0
- package/bin/whet/cache/Cache.d.ts +72 -0
- package/bin/whet/cache/Cache.js +57 -0
- package/bin/whet/cache/CacheManager.d.ts +23 -0
- package/bin/whet/cache/CacheManager.js +103 -0
- package/bin/whet/cache/FileCache.d.ts +35 -0
- package/bin/whet/cache/FileCache.js +295 -0
- package/bin/whet/cache/MemoryCache.d.ts +12 -0
- package/bin/whet/cache/MemoryCache.js +58 -0
- package/bin/whet/magic/MaybeArray.d.ts +4 -0
- package/bin/whet/magic/MaybeArray.js +25 -0
- package/bin/whet/magic/RoutePathType.d.ts +9 -0
- package/bin/whet/magic/RoutePathType.js +48 -0
- package/bin/whet/magic/RouteType.d.ts +12 -0
- package/bin/whet/magic/RouteType.js +70 -0
- package/bin/whet/magic/StoneId.d.ts +5 -0
- package/bin/whet/magic/StoneId.js +32 -0
- package/bin/whet/route/Route.d.ts +15 -0
- package/bin/whet/route/Route.js +81 -0
- package/bin/whet/route/RouteResult.d.ts +22 -0
- package/bin/whet/route/RouteResult.js +25 -0
- package/bin/whet/route/Router.d.ts +33 -0
- package/bin/whet/route/Router.js +224 -0
- package/bin/whet/stones/Files.d.ts +28 -0
- package/bin/whet/stones/Files.js +86 -0
- package/bin/whet/stones/JsonStone.d.ts +33 -0
- package/bin/whet/stones/JsonStone.js +117 -0
- package/bin/whet/stones/RemoteFile.d.ts +28 -0
- package/bin/whet/stones/RemoteFile.js +71 -0
- package/bin/whet/stones/Server.d.ts +42 -0
- package/bin/whet/stones/Server.js +113 -0
- package/bin/whet/stones/Zip.d.ts +30 -0
- package/bin/whet/stones/Zip.js +111 -0
- package/bin/whet/stones/haxe/HaxeBuild.d.ts +34 -0
- package/bin/whet/stones/haxe/HaxeBuild.js +89 -0
- package/bin/whet/stones/haxe/Hxml.d.ts +102 -0
- package/bin/whet/stones/haxe/Hxml.js +348 -0
- package/bin/whet.d.ts +20 -0
- package/bin/whet.js +18 -0
- package/package.json +32 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import {Buffer} from "buffer"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
Common options for all `ChildProcess` methods.
|
|
5
|
+
*/
|
|
6
|
+
export type ChildProcessCommonOptions = {
|
|
7
|
+
/**
|
|
8
|
+
Current working directory of the child process.
|
|
9
|
+
*/
|
|
10
|
+
cwd?: null | string,
|
|
11
|
+
/**
|
|
12
|
+
Environment key-value pairs
|
|
13
|
+
*/
|
|
14
|
+
env?: null | {[key: string]: string},
|
|
15
|
+
/**
|
|
16
|
+
Sets the group identity of the process. See setgid(2).
|
|
17
|
+
*/
|
|
18
|
+
gid?: null | number,
|
|
19
|
+
/**
|
|
20
|
+
Shell to execute the command with.
|
|
21
|
+
Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows.
|
|
22
|
+
|
|
23
|
+
The shell should understand the -c switch on UNIX or /s /c on Windows.
|
|
24
|
+
On Windows, command line parsing should be compatible with cmd.exe.
|
|
25
|
+
*/
|
|
26
|
+
shell?: null | boolean | string,
|
|
27
|
+
/**
|
|
28
|
+
Sets the user identity of the process. See setuid(2).
|
|
29
|
+
*/
|
|
30
|
+
uid?: null | number
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
Common options for `spawn` and `spawnSync` methods.
|
|
35
|
+
*/
|
|
36
|
+
export type ChildProcessSpawnOptionsBase = {
|
|
37
|
+
/**
|
|
38
|
+
Current working directory of the child process.
|
|
39
|
+
*/
|
|
40
|
+
cwd?: null | string,
|
|
41
|
+
/**
|
|
42
|
+
Environment key-value pairs
|
|
43
|
+
*/
|
|
44
|
+
env?: null | {[key: string]: string},
|
|
45
|
+
/**
|
|
46
|
+
Sets the group identity of the process. See setgid(2).
|
|
47
|
+
*/
|
|
48
|
+
gid?: null | number,
|
|
49
|
+
/**
|
|
50
|
+
Shell to execute the command with.
|
|
51
|
+
Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows.
|
|
52
|
+
|
|
53
|
+
The shell should understand the -c switch on UNIX or /s /c on Windows.
|
|
54
|
+
On Windows, command line parsing should be compatible with cmd.exe.
|
|
55
|
+
*/
|
|
56
|
+
shell?: null | boolean | string,
|
|
57
|
+
/**
|
|
58
|
+
Child's stdio configuration.
|
|
59
|
+
*/
|
|
60
|
+
stdio?: null | ChildProcessSpawnOptionsStdio,
|
|
61
|
+
/**
|
|
62
|
+
Sets the user identity of the process. See setuid(2).
|
|
63
|
+
*/
|
|
64
|
+
uid?: null | number
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
Options for the `spawn` method.
|
|
69
|
+
*/
|
|
70
|
+
export type ChildProcessSpawnOptions = {
|
|
71
|
+
/**
|
|
72
|
+
Current working directory of the child process.
|
|
73
|
+
*/
|
|
74
|
+
cwd?: null | string,
|
|
75
|
+
/**
|
|
76
|
+
The child will be a process group leader.
|
|
77
|
+
*/
|
|
78
|
+
detached?: null | boolean,
|
|
79
|
+
/**
|
|
80
|
+
Environment key-value pairs
|
|
81
|
+
*/
|
|
82
|
+
env?: null | {[key: string]: string},
|
|
83
|
+
/**
|
|
84
|
+
Sets the group identity of the process. See setgid(2).
|
|
85
|
+
*/
|
|
86
|
+
gid?: null | number,
|
|
87
|
+
/**
|
|
88
|
+
Shell to execute the command with.
|
|
89
|
+
Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows.
|
|
90
|
+
|
|
91
|
+
The shell should understand the -c switch on UNIX or /s /c on Windows.
|
|
92
|
+
On Windows, command line parsing should be compatible with cmd.exe.
|
|
93
|
+
*/
|
|
94
|
+
shell?: null | boolean | string,
|
|
95
|
+
/**
|
|
96
|
+
Child's stdio configuration.
|
|
97
|
+
*/
|
|
98
|
+
stdio?: null | ChildProcessSpawnOptionsStdio,
|
|
99
|
+
/**
|
|
100
|
+
Sets the user identity of the process. See setuid(2).
|
|
101
|
+
*/
|
|
102
|
+
uid?: null | number
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
Options for the `spawnSync` method.
|
|
107
|
+
*/
|
|
108
|
+
export type ChildProcessSpawnSyncOptions = {
|
|
109
|
+
/**
|
|
110
|
+
Current working directory of the child process.
|
|
111
|
+
*/
|
|
112
|
+
cwd?: null | string,
|
|
113
|
+
/**
|
|
114
|
+
Default: 'utf8'
|
|
115
|
+
*/
|
|
116
|
+
encoding?: null | string,
|
|
117
|
+
/**
|
|
118
|
+
Environment key-value pairs
|
|
119
|
+
*/
|
|
120
|
+
env?: null | {[key: string]: string},
|
|
121
|
+
/**
|
|
122
|
+
Sets the group identity of the process. See setgid(2).
|
|
123
|
+
*/
|
|
124
|
+
gid?: null | number,
|
|
125
|
+
input?: null | string | Buffer,
|
|
126
|
+
/**
|
|
127
|
+
The child process is killed with `killSignal` (default: 'SIGTERM').
|
|
128
|
+
*/
|
|
129
|
+
killSignal?: null | string,
|
|
130
|
+
/**
|
|
131
|
+
The largest amount of data allowed on stdout or stderr.
|
|
132
|
+
If this value is exceeded then the child process is killed.
|
|
133
|
+
Default: 200*1024
|
|
134
|
+
*/
|
|
135
|
+
maxBuffer?: null | number,
|
|
136
|
+
/**
|
|
137
|
+
Shell to execute the command with.
|
|
138
|
+
Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows.
|
|
139
|
+
|
|
140
|
+
The shell should understand the -c switch on UNIX or /s /c on Windows.
|
|
141
|
+
On Windows, command line parsing should be compatible with cmd.exe.
|
|
142
|
+
*/
|
|
143
|
+
shell?: null | boolean | string,
|
|
144
|
+
/**
|
|
145
|
+
Child's stdio configuration.
|
|
146
|
+
*/
|
|
147
|
+
stdio?: null | ChildProcessSpawnOptionsStdio,
|
|
148
|
+
/**
|
|
149
|
+
If greater than 0, then it will kill the child process if it runs longer than timeout milliseconds.
|
|
150
|
+
*/
|
|
151
|
+
timeout?: null | number,
|
|
152
|
+
/**
|
|
153
|
+
Sets the user identity of the process. See setuid(2).
|
|
154
|
+
*/
|
|
155
|
+
uid?: null | number
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
The `stdio` option is an array where each index corresponds to a fd in the child.
|
|
160
|
+
The value is one of the following:
|
|
161
|
+
|
|
162
|
+
* 'pipe' - Create a pipe between the child process and the parent process.
|
|
163
|
+
The parent end of the pipe is exposed to the parent as a property on the child_process object as ChildProcess.stdio[fd].
|
|
164
|
+
Pipes created for fds 0 - 2 are also available as ChildProcess.stdin, ChildProcess.stdout and ChildProcess.stderr, respectively.
|
|
165
|
+
|
|
166
|
+
* 'ipc' - Create an IPC channel for passing messages/file descriptors between parent and child.
|
|
167
|
+
A ChildProcess may have at most one IPC stdio file descriptor. Setting this option enables the ChildProcess.send() method.
|
|
168
|
+
If the child writes JSON messages to this file descriptor, then this will trigger ChildProcess.on('message').
|
|
169
|
+
If the child is a Node.js program, then the presence of an IPC channel will enable process.send() and process.on('message').
|
|
170
|
+
|
|
171
|
+
* 'ignore' - Do not set this file descriptor in the child. Note that Node will always open fd 0 - 2 for the processes it spawns.
|
|
172
|
+
When any of these is ignored node will open /dev/null and attach it to the child's fd.
|
|
173
|
+
|
|
174
|
+
* Stream object - Share a readable or writable stream that refers to a tty, file, socket, or a pipe with the child process.
|
|
175
|
+
The stream's underlying file descriptor is duplicated in the child process to the fd that corresponds to the index
|
|
176
|
+
in the stdio array. Note that the stream must have an underlying descriptor (file streams do not until the 'open'
|
|
177
|
+
event has occurred).
|
|
178
|
+
|
|
179
|
+
* Positive integer - The integer value is interpreted as a file descriptor that is is currently open in the parent process.
|
|
180
|
+
It is shared with the child process, similar to how Stream objects can be shared.
|
|
181
|
+
|
|
182
|
+
* null - Use default value. For stdio fds 0, 1 and 2 (in other words, stdin, stdout, and stderr) a pipe is created.
|
|
183
|
+
For fd 3 and up, the default is 'ignore'.
|
|
184
|
+
|
|
185
|
+
As a shorthand, the stdio argument may also be one of the following strings, rather than an array:
|
|
186
|
+
ignore - ['ignore', 'ignore', 'ignore']
|
|
187
|
+
pipe - ['pipe', 'pipe', 'pipe']
|
|
188
|
+
inherit - [process.stdin, process.stdout, process.stderr] or [0,1,2]
|
|
189
|
+
*/
|
|
190
|
+
export type ChildProcessSpawnOptionsStdio = string | any[]
|
|
191
|
+
|
|
192
|
+
export type ChildProcessSpawnOptionsStdioFull = any[]
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
Common options for `exec` and `execFile` methods.
|
|
196
|
+
*/
|
|
197
|
+
export type ChildProcessExecOptionsBase = {
|
|
198
|
+
/**
|
|
199
|
+
Current working directory of the child process.
|
|
200
|
+
*/
|
|
201
|
+
cwd?: null | string,
|
|
202
|
+
/**
|
|
203
|
+
Default: 'utf8'
|
|
204
|
+
*/
|
|
205
|
+
encoding?: null | string,
|
|
206
|
+
/**
|
|
207
|
+
Environment key-value pairs
|
|
208
|
+
*/
|
|
209
|
+
env?: null | {[key: string]: string},
|
|
210
|
+
/**
|
|
211
|
+
Sets the group identity of the process. See setgid(2).
|
|
212
|
+
*/
|
|
213
|
+
gid?: null | number,
|
|
214
|
+
/**
|
|
215
|
+
The child process is killed with `killSignal` (default: 'SIGTERM').
|
|
216
|
+
*/
|
|
217
|
+
killSignal?: null | string,
|
|
218
|
+
/**
|
|
219
|
+
The largest amount of data allowed on stdout or stderr.
|
|
220
|
+
If this value is exceeded then the child process is killed.
|
|
221
|
+
Default: 200*1024
|
|
222
|
+
*/
|
|
223
|
+
maxBuffer?: null | number,
|
|
224
|
+
/**
|
|
225
|
+
Shell to execute the command with.
|
|
226
|
+
Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows.
|
|
227
|
+
|
|
228
|
+
The shell should understand the -c switch on UNIX or /s /c on Windows.
|
|
229
|
+
On Windows, command line parsing should be compatible with cmd.exe.
|
|
230
|
+
*/
|
|
231
|
+
shell?: null | boolean | string,
|
|
232
|
+
/**
|
|
233
|
+
If greater than 0, then it will kill the child process if it runs longer than timeout milliseconds.
|
|
234
|
+
*/
|
|
235
|
+
timeout?: null | number,
|
|
236
|
+
/**
|
|
237
|
+
Sets the user identity of the process. See setuid(2).
|
|
238
|
+
*/
|
|
239
|
+
uid?: null | number
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
Options for the `exec` method.
|
|
244
|
+
*/
|
|
245
|
+
export type ChildProcessExecOptions = {
|
|
246
|
+
/**
|
|
247
|
+
Current working directory of the child process.
|
|
248
|
+
*/
|
|
249
|
+
cwd?: null | string,
|
|
250
|
+
/**
|
|
251
|
+
Default: 'utf8'
|
|
252
|
+
*/
|
|
253
|
+
encoding?: null | string,
|
|
254
|
+
/**
|
|
255
|
+
Environment key-value pairs
|
|
256
|
+
*/
|
|
257
|
+
env?: null | {[key: string]: string},
|
|
258
|
+
/**
|
|
259
|
+
Sets the group identity of the process. See setgid(2).
|
|
260
|
+
*/
|
|
261
|
+
gid?: null | number,
|
|
262
|
+
/**
|
|
263
|
+
The child process is killed with `killSignal` (default: 'SIGTERM').
|
|
264
|
+
*/
|
|
265
|
+
killSignal?: null | string,
|
|
266
|
+
/**
|
|
267
|
+
The largest amount of data allowed on stdout or stderr.
|
|
268
|
+
If this value is exceeded then the child process is killed.
|
|
269
|
+
Default: 200*1024
|
|
270
|
+
*/
|
|
271
|
+
maxBuffer?: null | number,
|
|
272
|
+
/**
|
|
273
|
+
Shell to execute the command with.
|
|
274
|
+
Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows.
|
|
275
|
+
|
|
276
|
+
The shell should understand the -c switch on UNIX or /s /c on Windows.
|
|
277
|
+
On Windows, command line parsing should be compatible with cmd.exe.
|
|
278
|
+
*/
|
|
279
|
+
shell?: null | boolean | string,
|
|
280
|
+
/**
|
|
281
|
+
If greater than 0, then it will kill the child process if it runs longer than timeout milliseconds.
|
|
282
|
+
*/
|
|
283
|
+
timeout?: null | number,
|
|
284
|
+
/**
|
|
285
|
+
Sets the user identity of the process. See setuid(2).
|
|
286
|
+
*/
|
|
287
|
+
uid?: null | number
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
Options for the `execFile` method.
|
|
292
|
+
*/
|
|
293
|
+
export type ChildProcessExecFileOptions = {
|
|
294
|
+
/**
|
|
295
|
+
Current working directory of the child process.
|
|
296
|
+
*/
|
|
297
|
+
cwd?: null | string,
|
|
298
|
+
/**
|
|
299
|
+
Default: 'utf8'
|
|
300
|
+
*/
|
|
301
|
+
encoding?: null | string,
|
|
302
|
+
/**
|
|
303
|
+
Environment key-value pairs
|
|
304
|
+
*/
|
|
305
|
+
env?: null | {[key: string]: string},
|
|
306
|
+
/**
|
|
307
|
+
Sets the group identity of the process. See setgid(2).
|
|
308
|
+
*/
|
|
309
|
+
gid?: null | number,
|
|
310
|
+
/**
|
|
311
|
+
The child process is killed with `killSignal` (default: 'SIGTERM').
|
|
312
|
+
*/
|
|
313
|
+
killSignal?: null | string,
|
|
314
|
+
/**
|
|
315
|
+
The largest amount of data allowed on stdout or stderr.
|
|
316
|
+
If this value is exceeded then the child process is killed.
|
|
317
|
+
Default: 200*1024
|
|
318
|
+
*/
|
|
319
|
+
maxBuffer?: null | number,
|
|
320
|
+
/**
|
|
321
|
+
Shell to execute the command with.
|
|
322
|
+
Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows.
|
|
323
|
+
|
|
324
|
+
The shell should understand the -c switch on UNIX or /s /c on Windows.
|
|
325
|
+
On Windows, command line parsing should be compatible with cmd.exe.
|
|
326
|
+
*/
|
|
327
|
+
shell?: null | boolean | string,
|
|
328
|
+
/**
|
|
329
|
+
If greater than 0, then it will kill the child process if it runs longer than timeout milliseconds.
|
|
330
|
+
*/
|
|
331
|
+
timeout?: null | number,
|
|
332
|
+
/**
|
|
333
|
+
Sets the user identity of the process. See setuid(2).
|
|
334
|
+
*/
|
|
335
|
+
uid?: null | number
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/**
|
|
339
|
+
Options for the `fork` method.
|
|
340
|
+
*/
|
|
341
|
+
export type ChildProcessForkOptions = {
|
|
342
|
+
/**
|
|
343
|
+
Current working directory of the child process.
|
|
344
|
+
*/
|
|
345
|
+
cwd?: null | string,
|
|
346
|
+
/**
|
|
347
|
+
Environment key-value pairs
|
|
348
|
+
*/
|
|
349
|
+
env?: null | {[key: string]: string},
|
|
350
|
+
/**
|
|
351
|
+
List of string arguments passed to the executable (Default: process.execArgv)
|
|
352
|
+
*/
|
|
353
|
+
execArgv?: null | string[],
|
|
354
|
+
/**
|
|
355
|
+
Executable used to create the child process
|
|
356
|
+
*/
|
|
357
|
+
execPath?: null | string,
|
|
358
|
+
/**
|
|
359
|
+
Sets the group identity of the process. See setgid(2).
|
|
360
|
+
*/
|
|
361
|
+
gid?: null | number,
|
|
362
|
+
/**
|
|
363
|
+
Shell to execute the command with.
|
|
364
|
+
Default: '/bin/sh' on UNIX, 'cmd.exe' on Windows.
|
|
365
|
+
|
|
366
|
+
The shell should understand the -c switch on UNIX or /s /c on Windows.
|
|
367
|
+
On Windows, command line parsing should be compatible with cmd.exe.
|
|
368
|
+
*/
|
|
369
|
+
shell?: null | boolean | string,
|
|
370
|
+
/**
|
|
371
|
+
If `true`, stdin, stdout, and stderr of the child will be piped to the parent,
|
|
372
|
+
otherwise they will be inherited from the parent, see the "pipe" and "inherit"
|
|
373
|
+
options for `ChildProcessSpawnOptions.stdio` for more details (default is `false`)
|
|
374
|
+
*/
|
|
375
|
+
silent?: null | boolean,
|
|
376
|
+
/**
|
|
377
|
+
Sets the user identity of the process. See setuid(2).
|
|
378
|
+
*/
|
|
379
|
+
uid?: null | number
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
A callback type for `ChildProcess.exec`.
|
|
384
|
+
It receives three arguments: `error`, `stdout`, `stderr`.
|
|
385
|
+
|
|
386
|
+
On success, error will be `null`. On error, `error` will be an instance of `Error`
|
|
387
|
+
and `error.code` will be the exit code of the child process, and `error.signal` will be set
|
|
388
|
+
to the signal that terminated the process (see `ChildProcessExecError`).
|
|
389
|
+
*/
|
|
390
|
+
export type ChildProcessExecCallback = ((error: null | Error, stdout: Buffer | string, stderr: Buffer | string) => void)
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
Object returned from the `spawnSync` method.
|
|
394
|
+
*/
|
|
395
|
+
export type ChildProcessSpawnSyncResult = {
|
|
396
|
+
/**
|
|
397
|
+
The error object if the child process failed or timed out
|
|
398
|
+
*/
|
|
399
|
+
error: Error,
|
|
400
|
+
/**
|
|
401
|
+
Array of results from stdio output
|
|
402
|
+
*/
|
|
403
|
+
output: Buffer | string[],
|
|
404
|
+
/**
|
|
405
|
+
Pid of the child process
|
|
406
|
+
*/
|
|
407
|
+
pid: number,
|
|
408
|
+
/**
|
|
409
|
+
The signal used to kill the child process
|
|
410
|
+
*/
|
|
411
|
+
signal: string,
|
|
412
|
+
/**
|
|
413
|
+
The exit code of the child process
|
|
414
|
+
*/
|
|
415
|
+
status: number,
|
|
416
|
+
/**
|
|
417
|
+
The contents of output[2]
|
|
418
|
+
*/
|
|
419
|
+
stderr: Buffer | string,
|
|
420
|
+
/**
|
|
421
|
+
The contents of output[1]
|
|
422
|
+
*/
|
|
423
|
+
stdout: Buffer | string
|
|
424
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
An options type for `privateEncrypt`, `privateDecrypt`, `publicEncrypt`, `publicDecrypt` methods of `Crypto`.
|
|
4
|
+
*/
|
|
5
|
+
export type CryptoKeyOptions = {
|
|
6
|
+
/**
|
|
7
|
+
PEM encoded public key
|
|
8
|
+
*/
|
|
9
|
+
key: string,
|
|
10
|
+
/**
|
|
11
|
+
Padding value, one of the following:
|
|
12
|
+
* `Constants.RSA_NO_PADDING`
|
|
13
|
+
* `Constants.RSA_PKCS1_PADDING`
|
|
14
|
+
* `Constants.RSA_PKCS1_OAEP_PADDING`
|
|
15
|
+
*/
|
|
16
|
+
padding?: null | number,
|
|
17
|
+
/**
|
|
18
|
+
Passphrase for the private key
|
|
19
|
+
*/
|
|
20
|
+
passphrase?: null | string
|
|
21
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
Type of the `options` argument for `Dns.lookup`.
|
|
4
|
+
*/
|
|
5
|
+
export type DnsLookupOptions = {
|
|
6
|
+
/**
|
|
7
|
+
When true, the callback returns all resolved addresses in an array, otherwise returns a single address.
|
|
8
|
+
Defaults to false.
|
|
9
|
+
*/
|
|
10
|
+
all?: null | boolean,
|
|
11
|
+
/**
|
|
12
|
+
The record family. If not provided, both IP v4 and v6 addresses are accepted.
|
|
13
|
+
*/
|
|
14
|
+
family?: null | number,
|
|
15
|
+
/**
|
|
16
|
+
If present, it should be one or more of the supported `getaddrinfo` flags.
|
|
17
|
+
If hints is not provided, then no flags are passed to `getaddrinfo`.
|
|
18
|
+
Multiple flags can be passed through hints by logically ORing their values.
|
|
19
|
+
*/
|
|
20
|
+
hints?: null | number
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
Types of address data returned by `resolve` functions.
|
|
25
|
+
*/
|
|
26
|
+
export type DnsResolvedAddressMX = {
|
|
27
|
+
exchange: string,
|
|
28
|
+
priority: number
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type DnsResolvedAddressSRV = {
|
|
32
|
+
name: string,
|
|
33
|
+
port: number,
|
|
34
|
+
priority: number,
|
|
35
|
+
weight: number
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export type DnsResolvedAddressSOA = {
|
|
39
|
+
expire: number,
|
|
40
|
+
hostmaster: string,
|
|
41
|
+
minttl: number,
|
|
42
|
+
nsname: string,
|
|
43
|
+
refresh: number,
|
|
44
|
+
retry: number,
|
|
45
|
+
serial: number
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type DnsResolvedAddress = string | DnsResolvedAddressMX | DnsResolvedAddressSOA | DnsResolvedAddressSRV
|
|
49
|
+
|
|
50
|
+
export type DnsLookupCallbackSingle = ((err: DnsError, address: string, family: number) => void)
|
|
51
|
+
|
|
52
|
+
export type DnsLookupCallbackAll = ((err: DnsError, addresses: DnsLookupCallbackAllEntry[]) => void)
|
|
53
|
+
|
|
54
|
+
export type DnsLookupCallbackAllEntry = {
|
|
55
|
+
address: string,
|
|
56
|
+
family: number
|
|
57
|
+
}
|