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,331 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
Represents a position in a file.
|
|
4
|
+
*/
|
|
5
|
+
export type Position = {
|
|
6
|
+
/**
|
|
7
|
+
Reference to the filename.
|
|
8
|
+
*/
|
|
9
|
+
file: string,
|
|
10
|
+
/**
|
|
11
|
+
Position of the last character.
|
|
12
|
+
*/
|
|
13
|
+
max: number,
|
|
14
|
+
/**
|
|
15
|
+
Position of the first character.
|
|
16
|
+
*/
|
|
17
|
+
min: number
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
Represents a node in the AST.
|
|
22
|
+
@see https://haxe.org/manual/macro-reification-expression.html
|
|
23
|
+
*/
|
|
24
|
+
export type Expr = {
|
|
25
|
+
/**
|
|
26
|
+
The expression kind.
|
|
27
|
+
*/
|
|
28
|
+
expr: ExprDef,
|
|
29
|
+
/**
|
|
30
|
+
The position of the expression.
|
|
31
|
+
*/
|
|
32
|
+
pos: Position
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
Represents a AST node identical to `Expr`, but it allows constraining the
|
|
37
|
+
type of accepted expressions.
|
|
38
|
+
@see https://haxe.org/manual/macro-ExprOf.html
|
|
39
|
+
*/
|
|
40
|
+
export type ExprOf<T> = Expr
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
Represents a switch case.
|
|
44
|
+
@see https://haxe.org/manual/expression-switch.html
|
|
45
|
+
*/
|
|
46
|
+
export type Case = {
|
|
47
|
+
/**
|
|
48
|
+
The expression of the case, if available.
|
|
49
|
+
*/
|
|
50
|
+
expr?: any,
|
|
51
|
+
/**
|
|
52
|
+
The optional guard expressions of the case, if available.
|
|
53
|
+
*/
|
|
54
|
+
guard?: any,
|
|
55
|
+
/**
|
|
56
|
+
The value expressions of the case.
|
|
57
|
+
*/
|
|
58
|
+
values: Expr[]
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
Represents a variable in the AST.
|
|
63
|
+
@see https://haxe.org/manual/expression-var.html
|
|
64
|
+
*/
|
|
65
|
+
export type Var = {
|
|
66
|
+
/**
|
|
67
|
+
The expression of the variable, if available.
|
|
68
|
+
*/
|
|
69
|
+
expr?: any,
|
|
70
|
+
/**
|
|
71
|
+
Whether or not the variable can be assigned to.
|
|
72
|
+
*/
|
|
73
|
+
isFinal?: null | boolean,
|
|
74
|
+
/**
|
|
75
|
+
Metadata associatied with the variable, if available.
|
|
76
|
+
*/
|
|
77
|
+
meta?: null | MetadataEntry[],
|
|
78
|
+
/**
|
|
79
|
+
The name of the variable.
|
|
80
|
+
*/
|
|
81
|
+
name: string,
|
|
82
|
+
/**
|
|
83
|
+
The type-hint of the variable, if available.
|
|
84
|
+
*/
|
|
85
|
+
type?: null | ComplexType
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
Represents a catch in the AST.
|
|
90
|
+
@see https://haxe.org/manual/expression-try-catch.html
|
|
91
|
+
*/
|
|
92
|
+
export type Catch = {
|
|
93
|
+
/**
|
|
94
|
+
The expression of the catch.
|
|
95
|
+
*/
|
|
96
|
+
expr: Expr,
|
|
97
|
+
/**
|
|
98
|
+
The name of the catch variable.
|
|
99
|
+
*/
|
|
100
|
+
name: string,
|
|
101
|
+
/**
|
|
102
|
+
The type of the catch.
|
|
103
|
+
*/
|
|
104
|
+
type?: null | ComplexType
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
Represents the field of an object declaration.
|
|
109
|
+
*/
|
|
110
|
+
export type ObjectField = {
|
|
111
|
+
/**
|
|
112
|
+
The field expression.
|
|
113
|
+
*/
|
|
114
|
+
expr: Expr,
|
|
115
|
+
/**
|
|
116
|
+
The name of the field.
|
|
117
|
+
*/
|
|
118
|
+
field: string,
|
|
119
|
+
/**
|
|
120
|
+
How the field name is quoted.
|
|
121
|
+
*/
|
|
122
|
+
quotes?: null | QuoteStatus
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
Represents a type path in the AST.
|
|
127
|
+
*/
|
|
128
|
+
export type TypePath = {
|
|
129
|
+
/**
|
|
130
|
+
The name of the type path.
|
|
131
|
+
*/
|
|
132
|
+
name: string,
|
|
133
|
+
/**
|
|
134
|
+
Represents the package of the type path.
|
|
135
|
+
*/
|
|
136
|
+
pack: string[],
|
|
137
|
+
/**
|
|
138
|
+
Optional parameters of the type path.
|
|
139
|
+
*/
|
|
140
|
+
params?: null | TypeParam[],
|
|
141
|
+
/**
|
|
142
|
+
Sub is set on module sub-type access:
|
|
143
|
+
`pack.Module.Type` has `name = "Module"`, `sub = "Type"`, if available.
|
|
144
|
+
*/
|
|
145
|
+
sub?: null | string
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
Represents a type parameter declaration in the AST.
|
|
150
|
+
*/
|
|
151
|
+
export type TypeParamDecl = {
|
|
152
|
+
/**
|
|
153
|
+
The optional constraints of the type parameter.
|
|
154
|
+
*/
|
|
155
|
+
constraints?: null | ComplexType[],
|
|
156
|
+
/**
|
|
157
|
+
The metadata of the type parameter.
|
|
158
|
+
*/
|
|
159
|
+
meta?: null | MetadataEntry[],
|
|
160
|
+
/**
|
|
161
|
+
The name of the type parameter.
|
|
162
|
+
*/
|
|
163
|
+
name: string,
|
|
164
|
+
/**
|
|
165
|
+
The optional parameters of the type parameter.
|
|
166
|
+
*/
|
|
167
|
+
params?: null | TypeParamDecl[]
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
Represents a function in the AST.
|
|
172
|
+
*/
|
|
173
|
+
export type Function = {
|
|
174
|
+
/**
|
|
175
|
+
A list of function arguments.
|
|
176
|
+
*/
|
|
177
|
+
args: FunctionArg[],
|
|
178
|
+
/**
|
|
179
|
+
The expression of the function body, if available.
|
|
180
|
+
*/
|
|
181
|
+
expr?: any,
|
|
182
|
+
/**
|
|
183
|
+
An optional list of function parameter type declarations.
|
|
184
|
+
*/
|
|
185
|
+
params?: null | TypeParamDecl[],
|
|
186
|
+
/**
|
|
187
|
+
The return type-hint of the function, if available.
|
|
188
|
+
*/
|
|
189
|
+
ret?: null | ComplexType
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
Represents a function argument in the AST.
|
|
194
|
+
*/
|
|
195
|
+
export type FunctionArg = {
|
|
196
|
+
/**
|
|
197
|
+
The metadata of the function argument.
|
|
198
|
+
*/
|
|
199
|
+
meta?: null | MetadataEntry[],
|
|
200
|
+
/**
|
|
201
|
+
The name of the function argument.
|
|
202
|
+
*/
|
|
203
|
+
name: string,
|
|
204
|
+
/**
|
|
205
|
+
Whether or not the function argument is optional.
|
|
206
|
+
*/
|
|
207
|
+
opt?: null | boolean,
|
|
208
|
+
/**
|
|
209
|
+
The type-hint of the function argument, if available.
|
|
210
|
+
*/
|
|
211
|
+
type?: null | ComplexType,
|
|
212
|
+
/**
|
|
213
|
+
The optional value of the function argument, if available.
|
|
214
|
+
*/
|
|
215
|
+
value?: any
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
Represents a metadata entry in the AST.
|
|
220
|
+
*/
|
|
221
|
+
export type MetadataEntry = {
|
|
222
|
+
/**
|
|
223
|
+
The name of the metadata entry.
|
|
224
|
+
*/
|
|
225
|
+
name: string,
|
|
226
|
+
/**
|
|
227
|
+
The optional parameters of the metadata entry.
|
|
228
|
+
*/
|
|
229
|
+
params?: null | Expr[],
|
|
230
|
+
/**
|
|
231
|
+
The position of the metadata entry.
|
|
232
|
+
*/
|
|
233
|
+
pos: Position
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
Represents metadata in the AST.
|
|
238
|
+
*/
|
|
239
|
+
export type Metadata = MetadataEntry[]
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
Represents a field in the AST.
|
|
243
|
+
*/
|
|
244
|
+
export type Field = {
|
|
245
|
+
/**
|
|
246
|
+
The access modifiers of the field. By default fields have private access.
|
|
247
|
+
@see https://haxe.org/manual/class-field-access-modifier.html
|
|
248
|
+
*/
|
|
249
|
+
access?: null | Access[],
|
|
250
|
+
/**
|
|
251
|
+
The documentation of the field, if available. If the field has no
|
|
252
|
+
documentation, the value is `null`.
|
|
253
|
+
*/
|
|
254
|
+
doc?: null | string,
|
|
255
|
+
/**
|
|
256
|
+
The kind of the field.
|
|
257
|
+
*/
|
|
258
|
+
kind: FieldType,
|
|
259
|
+
/**
|
|
260
|
+
The optional metadata of the field.
|
|
261
|
+
*/
|
|
262
|
+
meta?: any,
|
|
263
|
+
/**
|
|
264
|
+
The name of the field.
|
|
265
|
+
*/
|
|
266
|
+
name: string,
|
|
267
|
+
/**
|
|
268
|
+
The position of the field.
|
|
269
|
+
*/
|
|
270
|
+
pos: Position
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
Represents a type definition.
|
|
275
|
+
*/
|
|
276
|
+
export type TypeDefinition = {
|
|
277
|
+
/**
|
|
278
|
+
The documentation of the type, if available. If the type has no
|
|
279
|
+
documentation, the value is `null`.
|
|
280
|
+
*/
|
|
281
|
+
doc?: null | string,
|
|
282
|
+
/**
|
|
283
|
+
The fields of the type definition.
|
|
284
|
+
*/
|
|
285
|
+
fields: Field[],
|
|
286
|
+
/**
|
|
287
|
+
Whether or not the type is extern.
|
|
288
|
+
*/
|
|
289
|
+
isExtern?: null | boolean,
|
|
290
|
+
/**
|
|
291
|
+
The kind of the type definition.
|
|
292
|
+
*/
|
|
293
|
+
kind: TypeDefKind,
|
|
294
|
+
/**
|
|
295
|
+
The optional metadata of the type definition.
|
|
296
|
+
*/
|
|
297
|
+
meta?: any,
|
|
298
|
+
/**
|
|
299
|
+
The name of the type definition.
|
|
300
|
+
*/
|
|
301
|
+
name: string,
|
|
302
|
+
/**
|
|
303
|
+
The package of the type definition.
|
|
304
|
+
*/
|
|
305
|
+
pack: string[],
|
|
306
|
+
/**
|
|
307
|
+
The parameter type declarations of the type definition.
|
|
308
|
+
*/
|
|
309
|
+
params?: null | TypeParamDecl[],
|
|
310
|
+
/**
|
|
311
|
+
The position to the type definition.
|
|
312
|
+
*/
|
|
313
|
+
pos: Position
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
Represents the import expression.
|
|
318
|
+
*/
|
|
319
|
+
export type ImportExpr = {
|
|
320
|
+
/**
|
|
321
|
+
The mode of the import expression.
|
|
322
|
+
*/
|
|
323
|
+
mode: ImportMode,
|
|
324
|
+
/**
|
|
325
|
+
The path to the import expression.
|
|
326
|
+
*/
|
|
327
|
+
path: {
|
|
328
|
+
name: string,
|
|
329
|
+
pos: Position
|
|
330
|
+
}[]
|
|
331
|
+
}
|