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,126 @@
|
|
|
1
|
+
|
|
2
|
+
export type UrlFormatOptions = {
|
|
3
|
+
/**
|
|
4
|
+
`true` if the serialized URL string should include the username and password, `false` otherwise.
|
|
5
|
+
|
|
6
|
+
Default: `true`.
|
|
7
|
+
*/
|
|
8
|
+
auth?: null | boolean,
|
|
9
|
+
/**
|
|
10
|
+
`true` if the serialized URL string should include the fragment, `false` otherwise.
|
|
11
|
+
|
|
12
|
+
Default: `true`.
|
|
13
|
+
*/
|
|
14
|
+
fragment?: null | boolean,
|
|
15
|
+
/**
|
|
16
|
+
`true` if the serialized URL string should include the search query, `false` otherwise.
|
|
17
|
+
|
|
18
|
+
Default: `true`.
|
|
19
|
+
*/
|
|
20
|
+
search?: null | boolean,
|
|
21
|
+
/**
|
|
22
|
+
`true` if Unicode characters appearing in the host component of the URL string should be encoded directly as opposed to being Punycode encoded.
|
|
23
|
+
|
|
24
|
+
Default: `false`.
|
|
25
|
+
*/
|
|
26
|
+
unicode?: null | boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
Parsed URL objects have some or all of the following fields, depending on whether or not they exist in the URL string.
|
|
31
|
+
Any parts that are not in the URL string will not be in the parsed object.
|
|
32
|
+
*/
|
|
33
|
+
export type UrlObject = {
|
|
34
|
+
/**
|
|
35
|
+
The username and password portion of the URL, also referred to as "userinfo".
|
|
36
|
+
This string subset follows the `protocol` and double slashes (if present) and precedes the `host` component,
|
|
37
|
+
delimited by an ASCII "at sign" (`@`).
|
|
38
|
+
|
|
39
|
+
The format of the string is `{username}[:{password}]`, with the `[:{password}]` portion being optional.
|
|
40
|
+
|
|
41
|
+
For example: 'user:pass'
|
|
42
|
+
*/
|
|
43
|
+
auth?: null | string,
|
|
44
|
+
/**
|
|
45
|
+
The "fragment" portion of the URL including the leading ASCII hash (`#`) character.
|
|
46
|
+
|
|
47
|
+
For example: '#hash'
|
|
48
|
+
*/
|
|
49
|
+
hash?: null | string,
|
|
50
|
+
/**
|
|
51
|
+
The full lower-cased host portion of the URL, including the `port` if specified.
|
|
52
|
+
|
|
53
|
+
For example: 'host.com:8080'
|
|
54
|
+
*/
|
|
55
|
+
host?: null | string,
|
|
56
|
+
/**
|
|
57
|
+
The lower-cased host name portion of the `host` component without the `port` included.
|
|
58
|
+
|
|
59
|
+
For example: 'host.com'
|
|
60
|
+
*/
|
|
61
|
+
hostname?: null | string,
|
|
62
|
+
/**
|
|
63
|
+
The full URL string that was parsed with both the `protocol` and `host` components converted to lower-case.
|
|
64
|
+
|
|
65
|
+
For example: 'http://user:pass@host.com:8080/p/a/t/h?query=string#hash'
|
|
66
|
+
*/
|
|
67
|
+
href?: null | string,
|
|
68
|
+
/**
|
|
69
|
+
Concatenation of the `pathname` and `search` components.
|
|
70
|
+
|
|
71
|
+
For example: '/p/a/t/h?query=string'
|
|
72
|
+
|
|
73
|
+
No decoding of the path is performed.
|
|
74
|
+
*/
|
|
75
|
+
path?: null | string,
|
|
76
|
+
/**
|
|
77
|
+
The entire path section of the URL. This is everything following the `host` (including the `port`) and
|
|
78
|
+
before the start of the `query` or `hash` components, delimited by either the ASCII question mark (`?`) or
|
|
79
|
+
hash (`#`) characters.
|
|
80
|
+
|
|
81
|
+
For example '/p/a/t/h'
|
|
82
|
+
|
|
83
|
+
No decoding of the path string is performed.
|
|
84
|
+
*/
|
|
85
|
+
pathname?: null | string,
|
|
86
|
+
/**
|
|
87
|
+
The numeric port portion of the `host` component.
|
|
88
|
+
|
|
89
|
+
For example: '8080'
|
|
90
|
+
*/
|
|
91
|
+
port?: null | string,
|
|
92
|
+
/**
|
|
93
|
+
The URL's lower-cased protocol scheme.
|
|
94
|
+
|
|
95
|
+
For example: 'http:'
|
|
96
|
+
*/
|
|
97
|
+
protocol?: null | string,
|
|
98
|
+
/**
|
|
99
|
+
Either the query string without the leading ASCII question mark (`?`),
|
|
100
|
+
or an object returned by the `Querystring.parse` method.
|
|
101
|
+
|
|
102
|
+
Whether the `query` property is a string or object is determined by the `parseQueryString` argument passed to `Url.parse`.
|
|
103
|
+
|
|
104
|
+
For example: 'query=string' or {'query': 'string'}
|
|
105
|
+
|
|
106
|
+
If returned as a string, no decoding of the query string is performed.
|
|
107
|
+
If returned as an object, both keys and values are decoded.
|
|
108
|
+
|
|
109
|
+
The type of this field can be implicitly converted to `String` or `DynamicAccess<String>`,
|
|
110
|
+
where either one is expected, so if you know the actual type, just assign it
|
|
111
|
+
to properly typed variable (e.g. var s:String = url.query)
|
|
112
|
+
*/
|
|
113
|
+
query?: null | string | {[key: string]: string},
|
|
114
|
+
/**
|
|
115
|
+
The entire "query string" portion of the URL, including the leading ASCII question mark (`?`) character.
|
|
116
|
+
|
|
117
|
+
For example: '?query=string'
|
|
118
|
+
|
|
119
|
+
No decoding of the query string is performed.
|
|
120
|
+
*/
|
|
121
|
+
search?: null | string,
|
|
122
|
+
/**
|
|
123
|
+
True if two ASCII forward-slash characters (`/`) are required following the colon in the `protocol`.
|
|
124
|
+
*/
|
|
125
|
+
slashes?: null | boolean
|
|
126
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
Options object used by `Console.dir`.
|
|
4
|
+
*/
|
|
5
|
+
export type InspectOptionsBase = {
|
|
6
|
+
/**
|
|
7
|
+
If `true`, the output is styled with ANSI color codes.
|
|
8
|
+
Colors are customizable.
|
|
9
|
+
See Customizing `util.inspect` colors.
|
|
10
|
+
|
|
11
|
+
Default: `false`.
|
|
12
|
+
*/
|
|
13
|
+
colors?: null | boolean,
|
|
14
|
+
/**
|
|
15
|
+
Specifies the number of times to recurse while formatting `object`.
|
|
16
|
+
This is useful for inspecting large objects. To recurse up to the maximum call stack size pass `Infinity` or
|
|
17
|
+
`null`.
|
|
18
|
+
|
|
19
|
+
Default: `2`.
|
|
20
|
+
*/
|
|
21
|
+
depth?: null | number,
|
|
22
|
+
/**
|
|
23
|
+
If `true`, `object`'s non-enumerable symbols and properties are included in the formatted result.
|
|
24
|
+
`WeakMap` and `WeakSet` entries are also included.
|
|
25
|
+
|
|
26
|
+
Default: `false`.
|
|
27
|
+
*/
|
|
28
|
+
showHidden?: null | boolean
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
Options object used by `Util.inspect`.
|
|
33
|
+
*/
|
|
34
|
+
export type InspectOptions = {
|
|
35
|
+
/**
|
|
36
|
+
The length at which input values are split across multiple lines.
|
|
37
|
+
Set to `Infinity` to format the input as a single line (in combination with `compact` set to `true` or any
|
|
38
|
+
number >= `1`).
|
|
39
|
+
|
|
40
|
+
Default: `80`.
|
|
41
|
+
*/
|
|
42
|
+
breakLength?: null | number,
|
|
43
|
+
/**
|
|
44
|
+
If `true`, the output is styled with ANSI color codes.
|
|
45
|
+
Colors are customizable.
|
|
46
|
+
See Customizing `util.inspect` colors.
|
|
47
|
+
|
|
48
|
+
Default: `false`.
|
|
49
|
+
*/
|
|
50
|
+
colors?: null | boolean,
|
|
51
|
+
/**
|
|
52
|
+
Setting this to `false` causes each object key to be displayed on a new line.
|
|
53
|
+
It will also add new lines to text that is longer than `breakLength`.
|
|
54
|
+
If set to a number, the most `n` inner elements are united on a single line as long as all properties fit into
|
|
55
|
+
`breakLength`.
|
|
56
|
+
Short array elements are also grouped together.
|
|
57
|
+
No text will be reduced below 16 characters, no matter the `breakLength` size.
|
|
58
|
+
For more information, see the example below.
|
|
59
|
+
|
|
60
|
+
Default: `3`.
|
|
61
|
+
*/
|
|
62
|
+
compact?: null | boolean | number,
|
|
63
|
+
/**
|
|
64
|
+
If `false`, `[util.inspect.custom](depth, opts)` functions are not invoked.
|
|
65
|
+
|
|
66
|
+
Default: `true`.
|
|
67
|
+
*/
|
|
68
|
+
customInspect?: null | boolean,
|
|
69
|
+
/**
|
|
70
|
+
Specifies the number of times to recurse while formatting `object`.
|
|
71
|
+
This is useful for inspecting large objects. To recurse up to the maximum call stack size pass `Infinity` or
|
|
72
|
+
`null`.
|
|
73
|
+
|
|
74
|
+
Default: `2`.
|
|
75
|
+
*/
|
|
76
|
+
depth?: null | number,
|
|
77
|
+
/**
|
|
78
|
+
If set to `true`, getters are inspected.
|
|
79
|
+
If set to `'get'`, only getters without a corresponding setter are inspected.
|
|
80
|
+
If set to `'set'`, only getters with a corresponding setter are inspected.
|
|
81
|
+
This might cause side effects depending on the getter function.
|
|
82
|
+
|
|
83
|
+
Default: `false`.
|
|
84
|
+
*/
|
|
85
|
+
getters?: null | boolean | string,
|
|
86
|
+
/**
|
|
87
|
+
Specifies the maximum number of `Array`, `TypedArray`, `WeakMap` and `WeakSet` elements to include when
|
|
88
|
+
formatting.
|
|
89
|
+
Set to `null` or `Infinity` to show all elements.
|
|
90
|
+
Set to `0` or negative to show no elements.
|
|
91
|
+
|
|
92
|
+
Default: `100`.
|
|
93
|
+
*/
|
|
94
|
+
maxArrayLength?: null | number,
|
|
95
|
+
/**
|
|
96
|
+
If `true`, `object`'s non-enumerable symbols and properties are included in the formatted result.
|
|
97
|
+
`WeakMap` and `WeakSet` entries are also included.
|
|
98
|
+
|
|
99
|
+
Default: `false`.
|
|
100
|
+
*/
|
|
101
|
+
showHidden?: null | boolean,
|
|
102
|
+
/**
|
|
103
|
+
If `true`, `Proxy` inspection includes the `target` and `handler` objects.
|
|
104
|
+
|
|
105
|
+
Default: `false`.
|
|
106
|
+
*/
|
|
107
|
+
showProxy?: null | boolean,
|
|
108
|
+
/**
|
|
109
|
+
If set to `true` or a function, all properties of an object, and `Set` and `Map` entries are sorted in the
|
|
110
|
+
resulting string.
|
|
111
|
+
If set to `true` the default sort is used.
|
|
112
|
+
If set to a function, it is used as a compare function.
|
|
113
|
+
*/
|
|
114
|
+
sorted?: null | boolean | ((arg0: any, arg1: any) => number)
|
|
115
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {Buffer} from "buffer"
|
|
2
|
+
|
|
3
|
+
export type ZlibOptions = {
|
|
4
|
+
/**
|
|
5
|
+
default: 16*1024
|
|
6
|
+
*/
|
|
7
|
+
chunkSize?: null | number,
|
|
8
|
+
/**
|
|
9
|
+
deflate/inflate only, empty dictionary by default
|
|
10
|
+
*/
|
|
11
|
+
dictionary?: null | Buffer,
|
|
12
|
+
/**
|
|
13
|
+
default: `Zlib.Z_NO_FLUSH`
|
|
14
|
+
*/
|
|
15
|
+
flush?: null | number,
|
|
16
|
+
/**
|
|
17
|
+
compression only
|
|
18
|
+
*/
|
|
19
|
+
level?: null | number,
|
|
20
|
+
/**
|
|
21
|
+
compression only
|
|
22
|
+
*/
|
|
23
|
+
memLevel?: null | number,
|
|
24
|
+
/**
|
|
25
|
+
compression only
|
|
26
|
+
*/
|
|
27
|
+
strategy?: null | number,
|
|
28
|
+
windowBits?: null | number
|
|
29
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {Bytes} from "../../../haxe/io/Bytes"
|
|
2
|
+
import {Buffer} from "buffer"
|
|
3
|
+
|
|
4
|
+
export declare class Helper {
|
|
5
|
+
static bytesOfBuffer(b: Buffer): Bytes
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type BufferConstants = {
|
|
9
|
+
/**
|
|
10
|
+
On 32-bit architectures, this value is `(2^30)-1` (`~1GB`).
|
|
11
|
+
On 64-bit architectures, this value is `(2^31)-1` (`~2GB`).
|
|
12
|
+
|
|
13
|
+
@see https://nodejs.org/api/buffer.html#buffer_buffer_constants_max_length
|
|
14
|
+
*/
|
|
15
|
+
MAX_LENGTH: number,
|
|
16
|
+
/**
|
|
17
|
+
Represents the largest `length` that a `string` primitive can have, counted
|
|
18
|
+
in UTF-16 code units.
|
|
19
|
+
|
|
20
|
+
@see https://nodejs.org/api/buffer.html#buffer_buffer_constants_max_string_length
|
|
21
|
+
*/
|
|
22
|
+
MAX_STRING_LENGTH: number
|
|
23
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {Bytes} from "../../../haxe/io/Bytes.js"
|
|
2
|
+
import {Register} from "../../../genes/Register.js"
|
|
3
|
+
|
|
4
|
+
const $global = Register.$global
|
|
5
|
+
|
|
6
|
+
export const Helper = Register.global("$hxClasses")["js.node.buffer._Buffer.Helper"] =
|
|
7
|
+
class Helper {
|
|
8
|
+
static bytesOfBuffer(b) {
|
|
9
|
+
var o = Object.create(Bytes.prototype);
|
|
10
|
+
o.length = b.byteLength;
|
|
11
|
+
o.b = b;
|
|
12
|
+
b.bufferValue = b;
|
|
13
|
+
b.hxBytes = o;
|
|
14
|
+
b.bytes = b;
|
|
15
|
+
return o;
|
|
16
|
+
}
|
|
17
|
+
static get __name__() {
|
|
18
|
+
return "js.node.buffer._Buffer.Helper"
|
|
19
|
+
}
|
|
20
|
+
get __class__() {
|
|
21
|
+
return Helper
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {InspectOptions} from "../Util"
|
|
2
|
+
|
|
3
|
+
export type ConsoleOptions = {
|
|
4
|
+
/**
|
|
5
|
+
Set color support for this `Console` instance. Setting to `true` enables coloring while inspecting values,
|
|
6
|
+
setting to `'auto'` will make color support depend on the value of the `isTTY` property and the value returned by `getColorDepth()` on the respective stream.
|
|
7
|
+
This option can not be used, if `inspectOptions.colors` is set as well. Default: `'auto'`.
|
|
8
|
+
*/
|
|
9
|
+
colorMode: boolean | string,
|
|
10
|
+
/**
|
|
11
|
+
Ignore errors when writing to the underlying streams. Default: `true`.
|
|
12
|
+
*/
|
|
13
|
+
ignoreErrors: boolean,
|
|
14
|
+
/**
|
|
15
|
+
Specifies options that are passed along to util.inspect().
|
|
16
|
+
*/
|
|
17
|
+
inspectOptions: InspectOptions,
|
|
18
|
+
/**
|
|
19
|
+
`stderr` is used for warning or error output. If stderr is not provided, stdout is used for stderr.
|
|
20
|
+
*/
|
|
21
|
+
stderr: IWritable,
|
|
22
|
+
/**
|
|
23
|
+
`stdout` is a writable stream to print log or info output.
|
|
24
|
+
*/
|
|
25
|
+
stdout: IWritable
|
|
26
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
Options for `Agent` constructor.
|
|
4
|
+
*/
|
|
5
|
+
export type HttpAgentOptions = {
|
|
6
|
+
/**
|
|
7
|
+
Keep sockets around even when there are no outstanding requests, so they can be used for future requests
|
|
8
|
+
without having to reestablish a TCP connection.
|
|
9
|
+
Not to be confused with the `keep-alive` value of the `Connection` header.
|
|
10
|
+
The `Connection: keep-alive` header is always sent when using an agent except when the `Connection` header
|
|
11
|
+
is explicitly specified or when the `keepAlive` and `maxSockets` options are respectively set to `false` and `Infinity`,
|
|
12
|
+
in which case `Connection: close` will be used.
|
|
13
|
+
|
|
14
|
+
Default: `false`
|
|
15
|
+
*/
|
|
16
|
+
keepAlive?: null | boolean,
|
|
17
|
+
/**
|
|
18
|
+
When using the `keepAlive` option, specifies the [initial delay](https://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay) for TCP Keep-Alive packets.
|
|
19
|
+
Ignored when the `keepAlive` option is `false` or `undefined`.
|
|
20
|
+
|
|
21
|
+
Default: `1000`.
|
|
22
|
+
*/
|
|
23
|
+
keepAliveMsecs?: null | number,
|
|
24
|
+
/**
|
|
25
|
+
Maximum number of sockets to leave open in a free state. Only relevant if `keepAlive` is set to `true`.
|
|
26
|
+
|
|
27
|
+
Default: `256`.
|
|
28
|
+
*/
|
|
29
|
+
maxFreeSockets?: null | number,
|
|
30
|
+
/**
|
|
31
|
+
Maximum number of sockets to allow per host. Each request will use a new socket until the maximum is reached.
|
|
32
|
+
|
|
33
|
+
Default: `Infinity`.
|
|
34
|
+
*/
|
|
35
|
+
maxSockets?: null | number,
|
|
36
|
+
/**
|
|
37
|
+
Socket timeout in milliseconds. This will set the timeout when the socket is created.
|
|
38
|
+
*/
|
|
39
|
+
timeout?: null | number
|
|
40
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
export type HttpsAgentOptions = {
|
|
3
|
+
/**
|
|
4
|
+
Keep sockets around even when there are no outstanding requests, so they can be used for future requests
|
|
5
|
+
without having to reestablish a TCP connection.
|
|
6
|
+
Not to be confused with the `keep-alive` value of the `Connection` header.
|
|
7
|
+
The `Connection: keep-alive` header is always sent when using an agent except when the `Connection` header
|
|
8
|
+
is explicitly specified or when the `keepAlive` and `maxSockets` options are respectively set to `false` and `Infinity`,
|
|
9
|
+
in which case `Connection: close` will be used.
|
|
10
|
+
|
|
11
|
+
Default: `false`
|
|
12
|
+
*/
|
|
13
|
+
keepAlive?: null | boolean,
|
|
14
|
+
/**
|
|
15
|
+
When using the `keepAlive` option, specifies the [initial delay](https://nodejs.org/api/net.html#net_socket_setkeepalive_enable_initialdelay) for TCP Keep-Alive packets.
|
|
16
|
+
Ignored when the `keepAlive` option is `false` or `undefined`.
|
|
17
|
+
|
|
18
|
+
Default: `1000`.
|
|
19
|
+
*/
|
|
20
|
+
keepAliveMsecs?: null | number,
|
|
21
|
+
/**
|
|
22
|
+
maximum number of TLS cached sessions. Use `0` to disable TLS session caching.
|
|
23
|
+
|
|
24
|
+
Default: `100`.
|
|
25
|
+
*/
|
|
26
|
+
maxCachedSessions?: null | number,
|
|
27
|
+
/**
|
|
28
|
+
Maximum number of sockets to leave open in a free state. Only relevant if `keepAlive` is set to `true`.
|
|
29
|
+
|
|
30
|
+
Default: `256`.
|
|
31
|
+
*/
|
|
32
|
+
maxFreeSockets?: null | number,
|
|
33
|
+
/**
|
|
34
|
+
Maximum number of sockets to allow per host. Each request will use a new socket until the maximum is reached.
|
|
35
|
+
|
|
36
|
+
Default: `Infinity`.
|
|
37
|
+
*/
|
|
38
|
+
maxSockets?: null | number,
|
|
39
|
+
/**
|
|
40
|
+
the value of [Server Name Indication extension](https://en.wikipedia.org/wiki/Server_Name_Indication) to be sent to the server.
|
|
41
|
+
Use empty string `''` to disable sending the extension.
|
|
42
|
+
|
|
43
|
+
Default: hostname of the target server, unless the target server is specified using an IP address, in which case the default is `''` (no extension).
|
|
44
|
+
*/
|
|
45
|
+
servername?: null | string,
|
|
46
|
+
/**
|
|
47
|
+
Socket timeout in milliseconds. This will set the timeout when the socket is created.
|
|
48
|
+
*/
|
|
49
|
+
timeout?: null | number
|
|
50
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
export type ServerListenOptionsBase = {
|
|
3
|
+
exclusive?: null | boolean
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
Options for the `Server.listen` method (TCP version).
|
|
8
|
+
*/
|
|
9
|
+
export type ServerListenOptionsTcp = {
|
|
10
|
+
backlog?: null | number,
|
|
11
|
+
exclusive?: null | boolean,
|
|
12
|
+
host?: null | string,
|
|
13
|
+
port?: null | number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
Options for the `Server.listen` method (UNIX version).
|
|
18
|
+
*/
|
|
19
|
+
export type ServerListenOptionsUnix = {
|
|
20
|
+
exclusive?: null | boolean,
|
|
21
|
+
path?: null | string
|
|
22
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import {DnsLookupOptions, DnsLookupCallbackSingle} from "../Dns"
|
|
2
|
+
|
|
3
|
+
export type SocketOptionsBase = {
|
|
4
|
+
/**
|
|
5
|
+
If true, then the socket won't automatically send a FIN packet
|
|
6
|
+
when the other end of the socket sends a FIN packet.
|
|
7
|
+
|
|
8
|
+
The socket becomes non-readable, but still writable. You should call the `end` method explicitly.
|
|
9
|
+
See `end` event for more information.
|
|
10
|
+
|
|
11
|
+
Default: false
|
|
12
|
+
*/
|
|
13
|
+
allowHalfOpen?: null | boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
Options for creating new `Socket` object.
|
|
18
|
+
*/
|
|
19
|
+
export type SocketOptions = {
|
|
20
|
+
/**
|
|
21
|
+
If true, then the socket won't automatically send a FIN packet
|
|
22
|
+
when the other end of the socket sends a FIN packet.
|
|
23
|
+
|
|
24
|
+
The socket becomes non-readable, but still writable. You should call the `end` method explicitly.
|
|
25
|
+
See `end` event for more information.
|
|
26
|
+
|
|
27
|
+
Default: false
|
|
28
|
+
*/
|
|
29
|
+
allowHalfOpen?: null | boolean,
|
|
30
|
+
/**
|
|
31
|
+
allows you to specify the existing file descriptor of socket.
|
|
32
|
+
*/
|
|
33
|
+
fd?: null | number,
|
|
34
|
+
/**
|
|
35
|
+
allow reads on this socket (NOTE: Works only when `fd` is passed)
|
|
36
|
+
*/
|
|
37
|
+
readable?: null | boolean,
|
|
38
|
+
/**
|
|
39
|
+
allow writes on this socket (NOTE: Works only when `fd` is passed)
|
|
40
|
+
*/
|
|
41
|
+
writable?: null | boolean
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
Options for the `Socket.connect` method (TCP version).
|
|
46
|
+
*/
|
|
47
|
+
export type SocketConnectOptionsTcp = {
|
|
48
|
+
/**
|
|
49
|
+
Version of IP stack. Defaults to 4.
|
|
50
|
+
*/
|
|
51
|
+
family?: null | number,
|
|
52
|
+
/**
|
|
53
|
+
Host the client should connect to.
|
|
54
|
+
Defaults to 'localhost'.
|
|
55
|
+
*/
|
|
56
|
+
host?: null | string,
|
|
57
|
+
/**
|
|
58
|
+
Local interface to bind to for network connections.
|
|
59
|
+
*/
|
|
60
|
+
localAddress?: null | string,
|
|
61
|
+
/**
|
|
62
|
+
Local port to bind to for network connections.
|
|
63
|
+
*/
|
|
64
|
+
localPort?: null | number,
|
|
65
|
+
/**
|
|
66
|
+
Custom lookup function. Defaults to `Dns.lookup`.
|
|
67
|
+
*/
|
|
68
|
+
lookup?: null | ((arg0: string, arg1: DnsLookupOptions, arg2: DnsLookupCallbackSingle) => void),
|
|
69
|
+
/**
|
|
70
|
+
Port the client should connect to
|
|
71
|
+
*/
|
|
72
|
+
port: number
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
Options for the `Socket.connect` method (Local domain socket version).
|
|
77
|
+
*/
|
|
78
|
+
export type SocketConnectOptionsUnix = {
|
|
79
|
+
/**
|
|
80
|
+
Path the client should connect to
|
|
81
|
+
*/
|
|
82
|
+
path: string
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
Bound address, the address family name and port of the socket as reported by the operating system.
|
|
87
|
+
*/
|
|
88
|
+
export type SocketAdress = {
|
|
89
|
+
/**
|
|
90
|
+
IP Address.
|
|
91
|
+
*/
|
|
92
|
+
address: string,
|
|
93
|
+
/**
|
|
94
|
+
IP Family.
|
|
95
|
+
*/
|
|
96
|
+
family: string,
|
|
97
|
+
/**
|
|
98
|
+
Connection port.
|
|
99
|
+
*/
|
|
100
|
+
port: number
|
|
101
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {Chunk} from "./Writable"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
Passed to both `Writable` and `Readable` constructors. Also has the following fields:
|
|
5
|
+
|
|
6
|
+
@see https://nodejs.org/api/stream.html#stream_new_stream_duplex_options
|
|
7
|
+
*/
|
|
8
|
+
export type DuplexNewOptions = {
|
|
9
|
+
/**
|
|
10
|
+
If set to `false`, then the stream will automatically end the writable side when the readable side ends. Default: `true`.
|
|
11
|
+
*/
|
|
12
|
+
allowHalfOpen?: null | boolean,
|
|
13
|
+
/**
|
|
14
|
+
Whether this stream should automatically call `.destroy()` on itself after ending.
|
|
15
|
+
Default: `false`.
|
|
16
|
+
*/
|
|
17
|
+
autoDestroy?: null | boolean,
|
|
18
|
+
/**
|
|
19
|
+
`decodeStrings` <boolean> Whether to encode `string`s passed to stream.write() to `Buffer`s (with the encoding specified in the stream.write() call) before passing them to stream._write().
|
|
20
|
+
Other types of data are not converted (i.e. `Buffer`s are not decoded into `string`s). Setting to false will prevent strings from being converted.
|
|
21
|
+
Default: `true`.
|
|
22
|
+
*/
|
|
23
|
+
decodeStrings?: null | boolean,
|
|
24
|
+
/**
|
|
25
|
+
`defaultEncoding` <string> The default encoding that is used when no encoding is specified as an argument to stream.write().
|
|
26
|
+
Default: `'utf8'`.
|
|
27
|
+
*/
|
|
28
|
+
defaultEncoding?: null | string,
|
|
29
|
+
/**
|
|
30
|
+
Implementation for the `stream._destroy()` method.
|
|
31
|
+
*/
|
|
32
|
+
destroy?: null | ((err: null | Error, callback: ((arg0: null | Error) => void)) => void),
|
|
33
|
+
/**
|
|
34
|
+
Whether or not the stream should emit `'close'` after it has been destroyed.
|
|
35
|
+
Default: `true`.
|
|
36
|
+
*/
|
|
37
|
+
emitClose?: null | boolean,
|
|
38
|
+
/**
|
|
39
|
+
If specified, then buffers will be decoded to strings using the specified encoding.
|
|
40
|
+
Default: `null`.
|
|
41
|
+
*/
|
|
42
|
+
encoding?: null | string,
|
|
43
|
+
/**
|
|
44
|
+
`final` <Function> Implementation for the stream._final() method.
|
|
45
|
+
*/
|
|
46
|
+
final_?: null | ((error: null | Error) => void),
|
|
47
|
+
/**
|
|
48
|
+
The maximum number of bytes to store in the internal buffer before ceasing to read from the underlying resource.
|
|
49
|
+
Default: `16384` (16kb), or `16` for `objectMode` streams.
|
|
50
|
+
*/
|
|
51
|
+
highWaterMark?: null | number,
|
|
52
|
+
/**
|
|
53
|
+
Whether this stream should behave as a stream of objects.
|
|
54
|
+
Meaning that `stream.read(n)` returns a single value instead of a `Buffer` of size `n`.
|
|
55
|
+
Default: `false`.
|
|
56
|
+
*/
|
|
57
|
+
objectMode?: null | boolean,
|
|
58
|
+
/**
|
|
59
|
+
Implementation for the `stream._read()` method.
|
|
60
|
+
*/
|
|
61
|
+
read?: null | ((size: number) => void),
|
|
62
|
+
/**
|
|
63
|
+
Sets `highWaterMark` for the readable side of the stream. Has no effect if `highWaterMark` is provided.
|
|
64
|
+
*/
|
|
65
|
+
readableHighWaterMark?: null | number,
|
|
66
|
+
/**
|
|
67
|
+
Sets `objectMode` for readable side of the stream. Has no effect if `objectMode` is `true`. Default: `false`.
|
|
68
|
+
*/
|
|
69
|
+
readableObjectMode?: null | boolean,
|
|
70
|
+
/**
|
|
71
|
+
Sets `highWaterMark` for the writable side of the stream. Has no effect if `highWaterMark` is provided.
|
|
72
|
+
*/
|
|
73
|
+
writableHighWaterMark?: null | number,
|
|
74
|
+
/**
|
|
75
|
+
Sets `objectMode` for writable side of the stream. Has no effect if `objectMode` is `true`. Default: `false`.
|
|
76
|
+
*/
|
|
77
|
+
writableObjectMode?: null | boolean,
|
|
78
|
+
/**
|
|
79
|
+
`write` <Function> Implementation for the stream._write() method.
|
|
80
|
+
*/
|
|
81
|
+
write?: null | ((chunk: any, encoding: string, callback: ((arg0: null | Error) => void)) => void),
|
|
82
|
+
/**
|
|
83
|
+
`writev` <Function> Implementation for the stream._writev() method.
|
|
84
|
+
*/
|
|
85
|
+
writev?: null | ((chunks: Chunk[], callback: ((arg0: null | Error) => void)) => void)
|
|
86
|
+
}
|