@everyonesoftware/common 11.0.0 → 13.0.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/outputs/{characterWriteStream-Bhad6oGq.d.cts → characterWriteStream-DGlmRcFl.d.cts} +56 -1
- package/outputs/{characterWriteStream-Bhad6oGq.d.ts → characterWriteStream-DGlmRcFl.d.ts} +56 -1
- package/outputs/{chunk-R3D7NRFL.js → chunk-P4KLLRFY.js} +2 -2
- package/outputs/{chunk-U7O7WS5F.js → chunk-TUBXFCG4.js} +1950 -1909
- package/outputs/chunk-TUBXFCG4.js.map +1 -0
- package/outputs/sourceIndex.cjs +1950 -1905
- package/outputs/sourceIndex.cjs.map +1 -1
- package/outputs/sourceIndex.d.cts +212 -186
- package/outputs/sourceIndex.d.ts +212 -186
- package/outputs/sourceIndex.js +9 -1
- package/outputs/testIndex.cjs +763 -564
- package/outputs/testIndex.cjs.map +1 -1
- package/outputs/testIndex.d.cts +17 -2
- package/outputs/testIndex.d.ts +17 -2
- package/outputs/testIndex.js +31 -2
- package/outputs/testIndex.js.map +1 -1
- package/outputs/tests.cjs +2583 -2520
- package/outputs/tests.cjs.map +1 -1
- package/outputs/tests.js +2285 -2255
- package/outputs/tests.js.map +1 -1
- package/package.json +1 -1
- package/outputs/chunk-U7O7WS5F.js.map +0 -1
- /package/outputs/{chunk-R3D7NRFL.js.map → chunk-P4KLLRFY.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as Iterable,
|
|
2
|
-
export { J as JavascriptArray,
|
|
1
|
+
import { I as Iterable, g as JavascriptIterable, S as SyncResult, d as Iterator, E as EqualFunctions, T as ToStringFunctions, l as Type, h as JavascriptIterator, C as CharacterWriteStream, A as AsyncResult, a as Clock, D as DateTime, f as JavascriptAsyncIterator, P as PromiseAsyncResult, b as Comparable, i as JavascriptIteratorResult, c as Comparison, e as JavascriptAsyncIterable } from './characterWriteStream-DGlmRcFl.cjs';
|
|
2
|
+
export { J as JavascriptArray, j as JavascriptMap, k as JavascriptSet, m as as, n as asArray, o as asBoolean, p as asFunction, q as asFunctionWithParameterCount, r as asNull, s as asNumber, t as asObject, u as asObjectOrArrayOrNull, v as asString, w as getName, x as getParameterCount, y as getPropertyNames, z as hasFunction, B as hasProperty, F as instanceOf, G as instanceOfType, H as isArray, K as isAsyncIterable, L as isBoolean, M as isFunction, N as isFunctionWithParameterCount, O as isIterable, Q as isIterator, R as isJavascriptAsyncIterable, U as isJavascriptAsyncIterator, V as isJavascriptIterable, W as isJavascriptIterator, X as isNull, Y as isNumber, Z as isObject, _ as isObjectOrArrayOrNull, $ as isPromise, a0 as isPromiseLike, a1 as isString, a2 as isUndefined, a3 as isUndefinedOrNull } from './characterWriteStream-DGlmRcFl.cjs';
|
|
3
3
|
import * as http from 'http';
|
|
4
4
|
|
|
5
5
|
declare class ANSIStyles {
|
|
@@ -65,6 +65,13 @@ declare class CharacterTable {
|
|
|
65
65
|
getRows(): Indexable<Indexable<string>>;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
declare class FetchError extends Error {
|
|
69
|
+
private readonly innerError;
|
|
70
|
+
constructor(innerError: Error);
|
|
71
|
+
get code(): string | undefined;
|
|
72
|
+
get hostname(): string | undefined;
|
|
73
|
+
}
|
|
74
|
+
|
|
68
75
|
declare class IndentedCharacterWriteStream extends CharacterWriteStream {
|
|
69
76
|
private readonly innerStream;
|
|
70
77
|
private currentIndentationList;
|
|
@@ -127,6 +134,180 @@ declare abstract class MutableIndexable<T> implements Indexable<T> {
|
|
|
127
134
|
static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
128
135
|
}
|
|
129
136
|
|
|
137
|
+
declare class HttpHeader {
|
|
138
|
+
private readonly name;
|
|
139
|
+
private readonly value;
|
|
140
|
+
private constructor();
|
|
141
|
+
static create(name: string, value: string): HttpHeader;
|
|
142
|
+
getName(): string;
|
|
143
|
+
getValue(): string;
|
|
144
|
+
toString(): string;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
declare class MutableHttpHeaders implements HttpHeaders {
|
|
148
|
+
private readonly headers;
|
|
149
|
+
private constructor();
|
|
150
|
+
static create(headers?: JavascriptIterable<HttpHeader>): MutableHttpHeaders;
|
|
151
|
+
iterate(): Iterator<HttpHeader>;
|
|
152
|
+
get(headerName: string): SyncResult<HttpHeader>;
|
|
153
|
+
getValue(headerName: string): SyncResult<string>;
|
|
154
|
+
/**
|
|
155
|
+
* Set a {@link HttpHeader} value in this collection. This will overwrite any existing
|
|
156
|
+
* {@link HttpHeader} with the same name.
|
|
157
|
+
* @param headerName The name of the header to set.
|
|
158
|
+
* @param headerValue The value of the header to set.
|
|
159
|
+
*/
|
|
160
|
+
set(headerName: string, headerValue: string): this;
|
|
161
|
+
set(header: HttpHeader): this;
|
|
162
|
+
setAll(headers: JavascriptIterable<HttpHeader>): this;
|
|
163
|
+
setContentType(contentType: string): this;
|
|
164
|
+
getContentType(): SyncResult<HttpHeader>;
|
|
165
|
+
getContentTypeValue(): SyncResult<string>;
|
|
166
|
+
getCount(): SyncResult<number>;
|
|
167
|
+
toArray(): SyncResult<HttpHeader[]>;
|
|
168
|
+
any(): SyncResult<boolean>;
|
|
169
|
+
equals(right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
170
|
+
toString(toStringFunctions?: ToStringFunctions): string;
|
|
171
|
+
concatenate(...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
|
|
172
|
+
map<TOutput>(mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
|
|
173
|
+
flatMap<TOutput>(mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
|
|
174
|
+
where(condition: (value: HttpHeader) => (boolean | SyncResult<boolean>)): Iterable<HttpHeader>;
|
|
175
|
+
instanceOf<TOutput extends HttpHeader>(typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
|
|
176
|
+
first(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
177
|
+
last(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
178
|
+
[Symbol.iterator](): JavascriptIterator<HttpHeader>;
|
|
179
|
+
contains(value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* A collection of {@link HttpHeader}s.
|
|
184
|
+
*/
|
|
185
|
+
declare abstract class HttpHeaders implements Iterable<HttpHeader> {
|
|
186
|
+
static readonly contentTypeHeaderName: string;
|
|
187
|
+
static create(headers?: JavascriptIterable<HttpHeader>): MutableHttpHeaders;
|
|
188
|
+
/**
|
|
189
|
+
* Get the header with the provided name.
|
|
190
|
+
* @param headerName The name of the header.
|
|
191
|
+
*/
|
|
192
|
+
abstract get(headerName: string): SyncResult<HttpHeader>;
|
|
193
|
+
/**
|
|
194
|
+
* Get the value of the header with the provided name.
|
|
195
|
+
* @param headerName The name of the header.
|
|
196
|
+
*/
|
|
197
|
+
abstract getValue(headerName: string): SyncResult<string>;
|
|
198
|
+
getContentType(): AsyncResult<HttpHeader>;
|
|
199
|
+
static getContentType(headers: HttpHeaders): AsyncResult<HttpHeader>;
|
|
200
|
+
getContentTypeValue(): AsyncResult<string>;
|
|
201
|
+
static getContentTypeValue(headers: HttpHeaders): AsyncResult<string>;
|
|
202
|
+
/**
|
|
203
|
+
* Get an {@link Iterator} that can be used to iterate through the {@link HttpHeader}s in this
|
|
204
|
+
* collection.
|
|
205
|
+
*/
|
|
206
|
+
abstract iterate(): Iterator<HttpHeader>;
|
|
207
|
+
/**
|
|
208
|
+
* Get the {@link HttpHeader}s in this {@link HttpHeaders} object as an array.
|
|
209
|
+
*/
|
|
210
|
+
toArray(): SyncResult<HttpHeader[]>;
|
|
211
|
+
static toArray(headers: HttpHeaders): SyncResult<HttpHeader[]>;
|
|
212
|
+
any(): SyncResult<boolean>;
|
|
213
|
+
static any(headers: HttpHeaders): SyncResult<boolean>;
|
|
214
|
+
getCount(): SyncResult<number>;
|
|
215
|
+
static getCount(headers: HttpHeaders): SyncResult<number>;
|
|
216
|
+
equals(right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
217
|
+
static equals(headers: HttpHeaders, right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
218
|
+
toString(toStringFunctions?: ToStringFunctions): string;
|
|
219
|
+
static toString(headers: HttpHeaders, toStringFunctions?: ToStringFunctions): string;
|
|
220
|
+
concatenate(...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
|
|
221
|
+
static concatenate(headers: HttpHeaders, ...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
|
|
222
|
+
map<TOutput>(mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
|
|
223
|
+
static map<TOutput>(headers: HttpHeaders, mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
|
|
224
|
+
flatMap<TOutput>(mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
|
|
225
|
+
static flatMap<TOutput>(headers: HttpHeaders, mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
|
|
226
|
+
where(condition: (value: HttpHeader) => boolean): Iterable<HttpHeader>;
|
|
227
|
+
static where(headers: HttpHeaders, condition: (value: HttpHeader) => (boolean | SyncResult<boolean>)): Iterable<HttpHeader>;
|
|
228
|
+
instanceOf<TOutput extends HttpHeader>(typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
|
|
229
|
+
static instanceOf<TOutput extends HttpHeader>(headers: HttpHeaders, typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
|
|
230
|
+
first(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
231
|
+
static first(headers: HttpHeaders, condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
232
|
+
last(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
233
|
+
static last(headers: HttpHeaders, condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
234
|
+
[Symbol.iterator](): JavascriptIterator<HttpHeader>;
|
|
235
|
+
static [Symbol.iterator](headers: HttpHeaders): JavascriptIterator<HttpHeader>;
|
|
236
|
+
contains(value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
237
|
+
static contains(headers: HttpHeaders, value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* A HTTP response sent by a HTTP server.
|
|
242
|
+
*/
|
|
243
|
+
declare abstract class HttpOutgoingResponse {
|
|
244
|
+
/**
|
|
245
|
+
* Set the status code of this {@link HttpOutgoingResponse}.
|
|
246
|
+
* @param statusCode The status code to set.
|
|
247
|
+
*/
|
|
248
|
+
abstract setStatusCode(statusCode: number): this;
|
|
249
|
+
/**
|
|
250
|
+
* Get the status code.
|
|
251
|
+
*/
|
|
252
|
+
abstract getStatusCode(): AsyncResult<number>;
|
|
253
|
+
/**
|
|
254
|
+
* Get the {@link HttpHeaders} of this {@link HttpOutgoingResponse}.
|
|
255
|
+
*/
|
|
256
|
+
abstract getHeaders(): HttpHeaders;
|
|
257
|
+
/**
|
|
258
|
+
* Get the {@link HttpHeader} with the provided name in this {@link HttpOutgoingResponse}. If no
|
|
259
|
+
* header exists with the provided name, then a {@link NotFoundError} will be returned.
|
|
260
|
+
* @param headerName The name of the header to get.
|
|
261
|
+
*/
|
|
262
|
+
abstract getHeader(headerName: string): AsyncResult<HttpHeader>;
|
|
263
|
+
/**
|
|
264
|
+
* Get the value of the {@link HttpHeader} with the provided name in this
|
|
265
|
+
* {@link HttpOutgoingResponse}. If no header exists with the provided name, then a
|
|
266
|
+
* {@link NotFoundError} will be returned.
|
|
267
|
+
* @param headerName The name of the header value to get.
|
|
268
|
+
*/
|
|
269
|
+
abstract getHeaderValue(headerName: string): AsyncResult<string>;
|
|
270
|
+
abstract setHeader(headerName: string, headerValue: string): this;
|
|
271
|
+
/**
|
|
272
|
+
* Set the body of this {@link HttpOutgoingResponse} to be the provided string value.
|
|
273
|
+
* @param body The string body to set.
|
|
274
|
+
*/
|
|
275
|
+
abstract setBodyString(body: string): this;
|
|
276
|
+
/**
|
|
277
|
+
* Set the body of this {@link HttpOutgoingResponse} to be the provided JSON value.
|
|
278
|
+
* @param body The JSON body to set.
|
|
279
|
+
*/
|
|
280
|
+
abstract setBodyJSON(body: unknown): this;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
declare class NodeJSHttpOutgoingResponse implements HttpOutgoingResponse {
|
|
284
|
+
private readonly innerResponse;
|
|
285
|
+
private bodyString;
|
|
286
|
+
private constructor();
|
|
287
|
+
static create(innerResponse: http.ServerResponse<http.IncomingMessage> & {
|
|
288
|
+
req: http.IncomingMessage;
|
|
289
|
+
}): NodeJSHttpOutgoingResponse;
|
|
290
|
+
setStatusCode(statusCode: number): this;
|
|
291
|
+
getStatusCode(): SyncResult<number>;
|
|
292
|
+
private static headerValueToString;
|
|
293
|
+
getHeaders(): HttpHeaders;
|
|
294
|
+
getHeader(headerName: string): SyncResult<HttpHeader>;
|
|
295
|
+
getHeaderValue(headerName: string): SyncResult<string>;
|
|
296
|
+
setHeader(headerName: string, headerValue: string): this;
|
|
297
|
+
setBodyString(body: string): this;
|
|
298
|
+
setBodyJSON(body: unknown): this;
|
|
299
|
+
end(): AsyncResult<void>;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* A {@link Clock} implementation that returns the actual current {@link DateTime}.
|
|
304
|
+
*/
|
|
305
|
+
declare class RealClock implements Clock {
|
|
306
|
+
private constructor();
|
|
307
|
+
static create(): RealClock;
|
|
308
|
+
now(): DateTime;
|
|
309
|
+
}
|
|
310
|
+
|
|
130
311
|
declare class TokenType {
|
|
131
312
|
private readonly name;
|
|
132
313
|
private constructor();
|
|
@@ -1235,109 +1416,6 @@ declare abstract class Condition {
|
|
|
1235
1416
|
}): void;
|
|
1236
1417
|
}
|
|
1237
1418
|
|
|
1238
|
-
declare class HttpHeader {
|
|
1239
|
-
private readonly name;
|
|
1240
|
-
private readonly value;
|
|
1241
|
-
private constructor();
|
|
1242
|
-
static create(name: string, value: string): HttpHeader;
|
|
1243
|
-
getName(): string;
|
|
1244
|
-
getValue(): string;
|
|
1245
|
-
toString(): string;
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
declare class MutableHttpHeaders implements HttpHeaders {
|
|
1249
|
-
private readonly headers;
|
|
1250
|
-
private constructor();
|
|
1251
|
-
static create(headers?: JavascriptIterable<HttpHeader>): MutableHttpHeaders;
|
|
1252
|
-
iterate(): Iterator<HttpHeader>;
|
|
1253
|
-
get(headerName: string): SyncResult<HttpHeader>;
|
|
1254
|
-
getValue(headerName: string): SyncResult<string>;
|
|
1255
|
-
/**
|
|
1256
|
-
* Set a {@link HttpHeader} value in this collection. This will overwrite any existing
|
|
1257
|
-
* {@link HttpHeader} with the same name.
|
|
1258
|
-
* @param headerName The name of the header to set.
|
|
1259
|
-
* @param headerValue The value of the header to set.
|
|
1260
|
-
*/
|
|
1261
|
-
set(headerName: string, headerValue: string): this;
|
|
1262
|
-
set(header: HttpHeader): this;
|
|
1263
|
-
setAll(headers: JavascriptIterable<HttpHeader>): this;
|
|
1264
|
-
setContentType(contentType: string): this;
|
|
1265
|
-
getContentType(): SyncResult<HttpHeader>;
|
|
1266
|
-
getContentTypeValue(): SyncResult<string>;
|
|
1267
|
-
getCount(): SyncResult<number>;
|
|
1268
|
-
toArray(): SyncResult<HttpHeader[]>;
|
|
1269
|
-
any(): SyncResult<boolean>;
|
|
1270
|
-
equals(right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
1271
|
-
toString(toStringFunctions?: ToStringFunctions): string;
|
|
1272
|
-
concatenate(...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
|
|
1273
|
-
map<TOutput>(mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
|
|
1274
|
-
flatMap<TOutput>(mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
|
|
1275
|
-
where(condition: (value: HttpHeader) => (boolean | SyncResult<boolean>)): Iterable<HttpHeader>;
|
|
1276
|
-
instanceOf<TOutput extends HttpHeader>(typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
|
|
1277
|
-
first(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
1278
|
-
last(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
1279
|
-
[Symbol.iterator](): JavascriptIterator<HttpHeader>;
|
|
1280
|
-
contains(value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
/**
|
|
1284
|
-
* A collection of {@link HttpHeader}s.
|
|
1285
|
-
*/
|
|
1286
|
-
declare abstract class HttpHeaders implements Iterable<HttpHeader> {
|
|
1287
|
-
static readonly contentTypeHeaderName: string;
|
|
1288
|
-
static create(headers?: JavascriptIterable<HttpHeader>): MutableHttpHeaders;
|
|
1289
|
-
/**
|
|
1290
|
-
* Get the header with the provided name.
|
|
1291
|
-
* @param headerName The name of the header.
|
|
1292
|
-
*/
|
|
1293
|
-
abstract get(headerName: string): SyncResult<HttpHeader>;
|
|
1294
|
-
/**
|
|
1295
|
-
* Get the value of the header with the provided name.
|
|
1296
|
-
* @param headerName The name of the header.
|
|
1297
|
-
*/
|
|
1298
|
-
abstract getValue(headerName: string): SyncResult<string>;
|
|
1299
|
-
getContentType(): AsyncResult<HttpHeader>;
|
|
1300
|
-
static getContentType(headers: HttpHeaders): AsyncResult<HttpHeader>;
|
|
1301
|
-
getContentTypeValue(): AsyncResult<string>;
|
|
1302
|
-
static getContentTypeValue(headers: HttpHeaders): AsyncResult<string>;
|
|
1303
|
-
/**
|
|
1304
|
-
* Get an {@link Iterator} that can be used to iterate through the {@link HttpHeader}s in this
|
|
1305
|
-
* collection.
|
|
1306
|
-
*/
|
|
1307
|
-
abstract iterate(): Iterator<HttpHeader>;
|
|
1308
|
-
/**
|
|
1309
|
-
* Get the {@link HttpHeader}s in this {@link HttpHeaders} object as an array.
|
|
1310
|
-
*/
|
|
1311
|
-
toArray(): SyncResult<HttpHeader[]>;
|
|
1312
|
-
static toArray(headers: HttpHeaders): SyncResult<HttpHeader[]>;
|
|
1313
|
-
any(): SyncResult<boolean>;
|
|
1314
|
-
static any(headers: HttpHeaders): SyncResult<boolean>;
|
|
1315
|
-
getCount(): SyncResult<number>;
|
|
1316
|
-
static getCount(headers: HttpHeaders): SyncResult<number>;
|
|
1317
|
-
equals(right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
1318
|
-
static equals(headers: HttpHeaders, right: JavascriptIterable<HttpHeader>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
1319
|
-
toString(toStringFunctions?: ToStringFunctions): string;
|
|
1320
|
-
static toString(headers: HttpHeaders, toStringFunctions?: ToStringFunctions): string;
|
|
1321
|
-
concatenate(...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
|
|
1322
|
-
static concatenate(headers: HttpHeaders, ...toConcatenate: JavascriptIterable<HttpHeader>[]): Iterable<HttpHeader>;
|
|
1323
|
-
map<TOutput>(mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
|
|
1324
|
-
static map<TOutput>(headers: HttpHeaders, mapping: (value: HttpHeader) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
|
|
1325
|
-
flatMap<TOutput>(mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
|
|
1326
|
-
static flatMap<TOutput>(headers: HttpHeaders, mapping: (value: HttpHeader) => JavascriptIterable<TOutput>): Iterable<TOutput>;
|
|
1327
|
-
where(condition: (value: HttpHeader) => boolean): Iterable<HttpHeader>;
|
|
1328
|
-
static where(headers: HttpHeaders, condition: (value: HttpHeader) => (boolean | SyncResult<boolean>)): Iterable<HttpHeader>;
|
|
1329
|
-
instanceOf<TOutput extends HttpHeader>(typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
|
|
1330
|
-
static instanceOf<TOutput extends HttpHeader>(headers: HttpHeaders, typeOrTypeCheck: Type<TOutput> | ((value: HttpHeader) => value is TOutput)): Iterable<TOutput>;
|
|
1331
|
-
first(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
1332
|
-
static first(headers: HttpHeaders, condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
1333
|
-
last(condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
1334
|
-
static last(headers: HttpHeaders, condition?: (value: HttpHeader) => (boolean | SyncResult<boolean>)): SyncResult<HttpHeader>;
|
|
1335
|
-
[Symbol.iterator](): JavascriptIterator<HttpHeader>;
|
|
1336
|
-
static [Symbol.iterator](headers: HttpHeaders): JavascriptIterator<HttpHeader>;
|
|
1337
|
-
contains(value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
1338
|
-
static contains(headers: HttpHeaders, value: HttpHeader, equalFunctions?: EqualFunctions): SyncResult<boolean>;
|
|
1339
|
-
}
|
|
1340
|
-
|
|
1341
1419
|
declare enum HttpMethod {
|
|
1342
1420
|
/**
|
|
1343
1421
|
* The GET method requests a representation of the specified resource. Requests using GET should
|
|
@@ -1450,8 +1528,22 @@ declare class HttpOutgoingRequest {
|
|
|
1450
1528
|
*/
|
|
1451
1529
|
declare abstract class HttpIncomingResponse {
|
|
1452
1530
|
abstract getStatusCode(): number;
|
|
1531
|
+
/**
|
|
1532
|
+
* Get the {@link HttpHeaders} of this {@link HttpIncomingResponse}.
|
|
1533
|
+
*/
|
|
1453
1534
|
abstract getHeaders(): AsyncResult<HttpHeaders>;
|
|
1535
|
+
/**
|
|
1536
|
+
* Get the {@link HttpHeader} with the provided name in this {@link HttpIncomingResponse}. If no
|
|
1537
|
+
* header exists with the provided name, then a {@link NotFoundError} will be returned.
|
|
1538
|
+
* @param headerName The name of the header to get.
|
|
1539
|
+
*/
|
|
1454
1540
|
abstract getHeader(headerName: string): AsyncResult<HttpHeader>;
|
|
1541
|
+
/**
|
|
1542
|
+
* Get the value of the {@link HttpHeader} with the provided name in this
|
|
1543
|
+
* {@link HttpIncomingResponse}. If no header exists with the provided name, then a
|
|
1544
|
+
* {@link NotFoundError} will be returned.
|
|
1545
|
+
* @param headerName The name of the header value to get.
|
|
1546
|
+
*/
|
|
1455
1547
|
abstract getHeaderValue(headerName: string): AsyncResult<string>;
|
|
1456
1548
|
abstract getBody(): AsyncResult<string>;
|
|
1457
1549
|
}
|
|
@@ -1487,59 +1579,27 @@ declare abstract class HttpIncomingRequest {
|
|
|
1487
1579
|
* Get the path component of the requested URL.
|
|
1488
1580
|
*/
|
|
1489
1581
|
abstract getURLPath(): string;
|
|
1490
|
-
abstract getHeaders(): AsyncResult<HttpHeaders>;
|
|
1491
|
-
abstract getHeader(headerName: string): AsyncResult<HttpHeader>;
|
|
1492
|
-
abstract getHeaderValue(headerName: string): AsyncResult<string>;
|
|
1493
|
-
abstract getBody(): AsyncResult<string>;
|
|
1494
|
-
}
|
|
1495
|
-
|
|
1496
|
-
/**
|
|
1497
|
-
* A HTTP response that is sent out by an {@link HttpServer}.
|
|
1498
|
-
*/
|
|
1499
|
-
declare class HttpOutgoingResponse {
|
|
1500
|
-
private statusCode;
|
|
1501
|
-
private readonly headers;
|
|
1502
|
-
private body;
|
|
1503
|
-
private constructor();
|
|
1504
|
-
static create(): HttpOutgoingResponse;
|
|
1505
|
-
/**
|
|
1506
|
-
* Get the status code of this {@link HttpOutgoingResponse}.
|
|
1507
|
-
*/
|
|
1508
|
-
getStatusCode(): number;
|
|
1509
1582
|
/**
|
|
1510
|
-
*
|
|
1511
|
-
* @param statusCode The status code of this {@link HttpOutgoingResponse}.
|
|
1583
|
+
* Get the {@link HttpHeaders} of this {@link HttpIncomingRequest}.
|
|
1512
1584
|
*/
|
|
1513
|
-
|
|
1514
|
-
getHeaders(): HttpHeaders;
|
|
1585
|
+
abstract getHeaders(): AsyncResult<HttpHeaders>;
|
|
1515
1586
|
/**
|
|
1516
|
-
* Get the
|
|
1517
|
-
*
|
|
1587
|
+
* Get the {@link HttpHeader} with the provided name in this {@link HttpIncomingRequest}. If no
|
|
1588
|
+
* header exists with the provided name, then a {@link NotFoundError} will be returned.
|
|
1518
1589
|
* @param headerName The name of the header to get.
|
|
1519
1590
|
*/
|
|
1520
|
-
getHeader(headerName: string):
|
|
1591
|
+
abstract getHeader(headerName: string): AsyncResult<HttpHeader>;
|
|
1521
1592
|
/**
|
|
1522
|
-
* Get the value of the
|
|
1523
|
-
* header
|
|
1593
|
+
* Get the value of the {@link HttpHeader} with the provided name in this
|
|
1594
|
+
* {@link HttpIncomingRequest}. If no header exists with the provided name, then a
|
|
1595
|
+
* {@link NotFoundError} will be returned.
|
|
1524
1596
|
* @param headerName The name of the header value to get.
|
|
1525
1597
|
*/
|
|
1526
|
-
getHeaderValue(headerName: string):
|
|
1527
|
-
/**
|
|
1528
|
-
* Set the HTTP header in this {@link HttpOutgoingResponse}.
|
|
1529
|
-
* @param headerName The name of the HTTP header.
|
|
1530
|
-
* @param headerValue The value of the HTTP header.
|
|
1531
|
-
*/
|
|
1532
|
-
setHeader(headerName: string, headerValue: string): this;
|
|
1533
|
-
setContentTypeHeader(contentType: string): this;
|
|
1534
|
-
/**
|
|
1535
|
-
* Get the body of this {@link HttpOutgoingResponse}.
|
|
1536
|
-
*/
|
|
1537
|
-
getBody(): string;
|
|
1598
|
+
abstract getHeaderValue(headerName: string): AsyncResult<string>;
|
|
1538
1599
|
/**
|
|
1539
|
-
*
|
|
1540
|
-
* @param body The body for this {@link HttpOutgoingResponse}.
|
|
1600
|
+
* Get the body of this {@link HttpIncomingRequest}.
|
|
1541
1601
|
*/
|
|
1542
|
-
|
|
1602
|
+
abstract getBody(): AsyncResult<string>;
|
|
1543
1603
|
}
|
|
1544
1604
|
|
|
1545
1605
|
declare abstract class HttpServer implements Disposable {
|
|
@@ -1621,41 +1681,6 @@ declare class CurrentProcess {
|
|
|
1621
1681
|
setNetwork(network: Network): this;
|
|
1622
1682
|
}
|
|
1623
1683
|
|
|
1624
|
-
declare abstract class DateTime {
|
|
1625
|
-
static parse(text: string): DateTime;
|
|
1626
|
-
static now(): DateTime;
|
|
1627
|
-
abstract getYear(): number;
|
|
1628
|
-
abstract getMonth(): number;
|
|
1629
|
-
abstract getDay(): number;
|
|
1630
|
-
abstract getHour(): number;
|
|
1631
|
-
abstract getMinute(): number;
|
|
1632
|
-
abstract getSecond(): number;
|
|
1633
|
-
abstract addDays(days: number): DateTime;
|
|
1634
|
-
/**
|
|
1635
|
-
* Compare this {@link DateTime} to the provided {@link DateTime}. If this {@link DateTime} is
|
|
1636
|
-
* less than the provided {@link DateTime}, then a negative number will be returned, 0 if
|
|
1637
|
-
* they're equal, or a positive number if this {@link DateTime} is greater than the provided
|
|
1638
|
-
* {@link DateTime}.
|
|
1639
|
-
* @param dateTime The {@link DateTime} to compare to this {@link DateTime}.
|
|
1640
|
-
*/
|
|
1641
|
-
compareTo(dateTime: DateTime, compareTimes: boolean): number;
|
|
1642
|
-
static compareTo(left: DateTime, right: DateTime, compareTimes: boolean): number;
|
|
1643
|
-
lessThan(dateTime: DateTime, compareTimes: boolean): boolean;
|
|
1644
|
-
static lessThan(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
|
|
1645
|
-
lessThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
|
|
1646
|
-
static lessThanOrEqualTo(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
|
|
1647
|
-
equals(dateTime: DateTime, compareTimes: boolean): boolean;
|
|
1648
|
-
static equals(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
|
|
1649
|
-
greaterThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
|
|
1650
|
-
static greaterThanOrEqualTo(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
|
|
1651
|
-
greaterThan(dateTime: DateTime, compareTimes: boolean): boolean;
|
|
1652
|
-
static greaterThan(left: DateTime, right: DateTime, compareTimes: boolean): boolean;
|
|
1653
|
-
get debug(): string;
|
|
1654
|
-
static debug(dateTime: DateTime): string;
|
|
1655
|
-
abstract toString(): string;
|
|
1656
|
-
abstract toDateString(): string;
|
|
1657
|
-
}
|
|
1658
|
-
|
|
1659
1684
|
/**
|
|
1660
1685
|
* An object that can be used to implement a search algorithm.
|
|
1661
1686
|
*/
|
|
@@ -1727,8 +1752,8 @@ declare class FetchHttpIncomingResponse extends HttpIncomingResponse {
|
|
|
1727
1752
|
declare class FetchHttpClient implements HttpClient {
|
|
1728
1753
|
protected constructor();
|
|
1729
1754
|
static create(): FetchHttpClient;
|
|
1730
|
-
sendRequest(request: HttpOutgoingRequest):
|
|
1731
|
-
sendGetRequest(url: string):
|
|
1755
|
+
sendRequest(request: HttpOutgoingRequest): AsyncResult<FetchHttpIncomingResponse>;
|
|
1756
|
+
sendGetRequest(url: string): AsyncResult<FetchHttpIncomingResponse>;
|
|
1732
1757
|
static convertMethod(method: HttpMethod): string;
|
|
1733
1758
|
}
|
|
1734
1759
|
|
|
@@ -2374,6 +2399,7 @@ declare class LuxonDateTime implements DateTime {
|
|
|
2374
2399
|
addDays(days: number): LuxonDateTime;
|
|
2375
2400
|
toString(): string;
|
|
2376
2401
|
toDateString(): string;
|
|
2402
|
+
toShortDateString(): string;
|
|
2377
2403
|
compareTo(dateTime: DateTime, compareTimes: boolean): number;
|
|
2378
2404
|
lessThan(dateTime: DateTime, compareTimes: boolean): boolean;
|
|
2379
2405
|
lessThanOrEqualTo(dateTime: DateTime, compareTimes: boolean): boolean;
|
|
@@ -3504,4 +3530,4 @@ declare class WonderlandTrailClient implements HttpClient {
|
|
|
3504
3530
|
}): PromiseAsyncResult<Iterable<WonderlandTrailItinerary>>;
|
|
3505
3531
|
}
|
|
3506
3532
|
|
|
3507
|
-
export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Token, TokenType, Tokenizer, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
|
|
3533
|
+
export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, Clock, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchError, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpOutgoingResponse, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealClock, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Token, TokenType, Tokenizer, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
|