@tsonic/express 10.0.35 → 10.0.39
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/README.md +7 -1
- package/docs/deviations.md +3 -0
- package/docs/generation.md +12 -2
- package/docs/release.md +21 -5
- package/families.json +7 -0
- package/index/bindings.json +255 -267
- package/index/internal/index.d.ts +137 -245
- package/index.d.ts +0 -7
- package/package.json +15 -4
- package/tsonic.bindings.json +1 -1
- package/docs/snippets/10/body-parsing.ts +0 -5
- package/docs/snippets/10/cookies.ts +0 -8
- package/docs/snippets/10/cors.ts +0 -2
- package/docs/snippets/10/create-app-router.ts +0 -8
- package/docs/snippets/10/error-middleware.ts +0 -3
- package/docs/snippets/10/hello-world-app.ts +0 -11
- package/docs/snippets/10/listen-close.ts +0 -3
- package/docs/snippets/10/middleware.ts +0 -4
- package/docs/snippets/10/multipart.ts +0 -8
- package/docs/snippets/10/quick-start-app.ts +0 -11
- package/docs/snippets/10/routing.ts +0 -18
- package/docs/snippets/10/static-files.ts +0 -2
|
@@ -2,22 +2,12 @@
|
|
|
2
2
|
// Namespace: express
|
|
3
3
|
// Assembly: express
|
|
4
4
|
|
|
5
|
-
// Primitive type aliases from @tsonic/core
|
|
6
|
-
import type { sbyte, byte, short, ushort, int, uint, long, ulong, int128, uint128, half, float, double, decimal, nint, nuint, char } from '@tsonic/core/types.js';
|
|
7
|
-
|
|
8
5
|
// Import types from other namespaces
|
|
9
|
-
import type { Dictionary_2, IEnumerable_1, List_1 } from "@tsonic/dotnet/System.Collections.Generic/internal/index.js";
|
|
10
|
-
import type { Stream } from "@tsonic/dotnet/System.IO/internal/index.js";
|
|
11
|
-
import * as System_Runtime_Serialization_Internal from "@tsonic/dotnet/System.Runtime.Serialization/internal/index.js";
|
|
12
|
-
import type { ISerializable } from "@tsonic/dotnet/System.Runtime.Serialization/internal/index.js";
|
|
13
|
-
import type { Task } from "@tsonic/dotnet/System.Threading.Tasks/internal/index.js";
|
|
14
|
-
import * as System_Internal from "@tsonic/dotnet/System/internal/index.js";
|
|
15
|
-
import type { Action, Action_1, Action_2, AsyncCallback, Boolean as ClrBoolean, Byte, DateTime, Exception, IAsyncResult, ICloneable, Int32, Int64, IntPtr, MulticastDelegate, Nullable_1, Object as ClrObject, String as ClrString, Void } from "@tsonic/dotnet/System/internal/index.js";
|
|
16
6
|
|
|
17
7
|
export type CookieEncoder = (value: string) => string;
|
|
18
8
|
|
|
19
9
|
|
|
20
|
-
export type ErrorRequestHandler = (err:
|
|
10
|
+
export type ErrorRequestHandler = (err: Error, req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
21
11
|
|
|
22
12
|
|
|
23
13
|
export type MediaTypeMatcher = (req: Request) => boolean;
|
|
@@ -38,20 +28,20 @@ export type RequestHandler = (req: Request, res: Response, next: NextFunction) =
|
|
|
38
28
|
export type SetHeadersHandler = (res: Response, path: string, stat: FileStat) => void;
|
|
39
29
|
|
|
40
30
|
|
|
41
|
-
export type TemplateEngine = (path: string, options:
|
|
31
|
+
export type TemplateEngine = (path: string, options: Record<string, unknown>, callback: (err: Error | undefined, html: string | undefined) => void) => void;
|
|
42
32
|
|
|
43
33
|
|
|
44
34
|
export type TrustProxyEvaluator = (ip: string) => boolean;
|
|
45
35
|
|
|
46
36
|
|
|
47
|
-
export type VerifyBodyHandler = (req: Request, res: Response, buffer:
|
|
37
|
+
export type VerifyBodyHandler = (req: Request, res: Response, buffer: Uint8Array, encoding: string) => void;
|
|
48
38
|
|
|
49
39
|
|
|
50
40
|
export interface Application$instance extends Router {
|
|
51
41
|
readonly __tsonic_type_express_Application: never;
|
|
52
42
|
|
|
53
|
-
readonly locals:
|
|
54
|
-
mountpath:
|
|
43
|
+
readonly locals: Record<string, unknown | undefined>;
|
|
44
|
+
mountpath: string | string[];
|
|
55
45
|
readonly router: Router;
|
|
56
46
|
disable(name: string): Application;
|
|
57
47
|
disabled(name: string): boolean;
|
|
@@ -60,15 +50,15 @@ export interface Application$instance extends Router {
|
|
|
60
50
|
engine(ext: string, callback: TemplateEngine): Application;
|
|
61
51
|
get(name: string): unknown | undefined;
|
|
62
52
|
get(path: string, callback: RequestHandler, ...callbacks: RequestHandler[]): Router;
|
|
63
|
-
listen(path: string, callback?:
|
|
64
|
-
listen(port:
|
|
65
|
-
listen(port:
|
|
66
|
-
listen(port:
|
|
53
|
+
listen(path: string, callback?: () => void): AppServer;
|
|
54
|
+
listen(port: number, callback?: () => void): AppServer;
|
|
55
|
+
listen(port: number, host: string, callback?: () => void): AppServer;
|
|
56
|
+
listen(port: number, host: string, backlog: number, callback?: () => void): AppServer;
|
|
67
57
|
param(names: string[], callback: ParamHandler): Application;
|
|
68
58
|
param(name: string, callback: ParamHandler): Router;
|
|
69
59
|
path(): string;
|
|
70
|
-
render(view: string, callback:
|
|
71
|
-
render(view: string, viewLocals:
|
|
60
|
+
render(view: string, callback: (err: Error | undefined, html: string | undefined) => void): void;
|
|
61
|
+
render(view: string, viewLocals: Record<string, unknown>, callback: (err: Error | undefined, html: string | undefined) => void): void;
|
|
72
62
|
set(name: string, value: unknown): Application;
|
|
73
63
|
}
|
|
74
64
|
|
|
@@ -86,13 +76,12 @@ export interface AppServer$instance {
|
|
|
86
76
|
readonly host: string | undefined;
|
|
87
77
|
listening: boolean;
|
|
88
78
|
readonly path: string | undefined;
|
|
89
|
-
readonly port:
|
|
90
|
-
close(callback?:
|
|
79
|
+
readonly port: number | undefined;
|
|
80
|
+
close(callback?: (err: Error | undefined) => void): void;
|
|
91
81
|
}
|
|
92
82
|
|
|
93
83
|
|
|
94
84
|
export const AppServer: {
|
|
95
|
-
new(port: Nullable_1<System_Internal.Int32>, host: string, path: string, closeAction: Action): AppServer;
|
|
96
85
|
};
|
|
97
86
|
|
|
98
87
|
|
|
@@ -101,8 +90,8 @@ export type AppServer = AppServer$instance;
|
|
|
101
90
|
export interface ByteRange$instance {
|
|
102
91
|
readonly __tsonic_type_express_ByteRange: never;
|
|
103
92
|
|
|
104
|
-
end:
|
|
105
|
-
start:
|
|
93
|
+
end: number;
|
|
94
|
+
start: number;
|
|
106
95
|
}
|
|
107
96
|
|
|
108
97
|
|
|
@@ -113,26 +102,18 @@ export const ByteRange: {
|
|
|
113
102
|
|
|
114
103
|
export type ByteRange = ByteRange$instance;
|
|
115
104
|
|
|
116
|
-
export interface CookieOptions
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
partitioned: boolean;
|
|
129
|
-
path: string;
|
|
130
|
-
get priority(): string | undefined;
|
|
131
|
-
set priority(value: string | undefined);
|
|
132
|
-
get sameSite(): unknown | undefined;
|
|
133
|
-
set sameSite(value: unknown | undefined);
|
|
134
|
-
secure: boolean;
|
|
135
|
-
signed: boolean;
|
|
105
|
+
export interface CookieOptions {
|
|
106
|
+
domain?: string;
|
|
107
|
+
encode?: CookieEncoder;
|
|
108
|
+
expires?: Date;
|
|
109
|
+
httpOnly?: boolean;
|
|
110
|
+
maxAge?: number;
|
|
111
|
+
partitioned?: boolean;
|
|
112
|
+
path?: string;
|
|
113
|
+
priority?: string;
|
|
114
|
+
sameSite?: string | boolean;
|
|
115
|
+
secure?: boolean;
|
|
116
|
+
signed?: boolean;
|
|
136
117
|
}
|
|
137
118
|
|
|
138
119
|
|
|
@@ -140,9 +121,6 @@ export const CookieOptions: {
|
|
|
140
121
|
new(): CookieOptions;
|
|
141
122
|
};
|
|
142
123
|
|
|
143
|
-
|
|
144
|
-
export type CookieOptions = CookieOptions$instance;
|
|
145
|
-
|
|
146
124
|
export interface Cookies$instance {
|
|
147
125
|
readonly __tsonic_type_express_Cookies: never;
|
|
148
126
|
|
|
@@ -156,22 +134,15 @@ export const Cookies: {
|
|
|
156
134
|
|
|
157
135
|
export type Cookies = Cookies$instance & { readonly [key: string]: string | undefined; };
|
|
158
136
|
|
|
159
|
-
export interface CorsOptions
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
set maxAgeSeconds(value: Nullable_1<System_Internal.Int32> | int);
|
|
169
|
-
get methods(): string[] | undefined;
|
|
170
|
-
set methods(value: string[] | undefined);
|
|
171
|
-
optionsSuccessStatus: int;
|
|
172
|
-
get origins(): string[] | undefined;
|
|
173
|
-
set origins(value: string[] | undefined);
|
|
174
|
-
preflightContinue: boolean;
|
|
137
|
+
export interface CorsOptions {
|
|
138
|
+
allowedHeaders?: string[];
|
|
139
|
+
credentials?: boolean;
|
|
140
|
+
exposedHeaders?: string[];
|
|
141
|
+
maxAgeSeconds?: number;
|
|
142
|
+
methods?: string[];
|
|
143
|
+
optionsSuccessStatus?: number;
|
|
144
|
+
origins?: string[];
|
|
145
|
+
preflightContinue?: boolean;
|
|
175
146
|
}
|
|
176
147
|
|
|
177
148
|
|
|
@@ -179,21 +150,15 @@ export const CorsOptions: {
|
|
|
179
150
|
new(): CorsOptions;
|
|
180
151
|
};
|
|
181
152
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
headers: Dictionary_2<System_Internal.String, System_Internal.String>;
|
|
192
|
-
immutable: boolean;
|
|
193
|
-
lastModified: boolean;
|
|
194
|
-
maxAge: unknown;
|
|
195
|
-
get root(): string | undefined;
|
|
196
|
-
set root(value: string | undefined);
|
|
153
|
+
export interface DownloadOptions {
|
|
154
|
+
acceptRanges?: boolean;
|
|
155
|
+
cacheControl?: boolean;
|
|
156
|
+
dotfiles?: string;
|
|
157
|
+
headers?: Record<string, string>;
|
|
158
|
+
immutable?: boolean;
|
|
159
|
+
lastModified?: boolean;
|
|
160
|
+
maxAge?: string | number;
|
|
161
|
+
root?: string;
|
|
197
162
|
}
|
|
198
163
|
|
|
199
164
|
|
|
@@ -201,9 +166,6 @@ export const DownloadOptions: {
|
|
|
201
166
|
new(): DownloadOptions;
|
|
202
167
|
};
|
|
203
168
|
|
|
204
|
-
|
|
205
|
-
export type DownloadOptions = DownloadOptions$instance;
|
|
206
|
-
|
|
207
169
|
export interface Files$instance {
|
|
208
170
|
readonly __tsonic_type_express_Files: never;
|
|
209
171
|
|
|
@@ -220,8 +182,8 @@ export type Files = Files$instance & { readonly [field: string]: UploadedFile[]
|
|
|
220
182
|
export interface FileStat$instance {
|
|
221
183
|
readonly __tsonic_type_express_FileStat: never;
|
|
222
184
|
|
|
223
|
-
modifiedAt:
|
|
224
|
-
size:
|
|
185
|
+
modifiedAt: Date;
|
|
186
|
+
size: number;
|
|
225
187
|
}
|
|
226
188
|
|
|
227
189
|
|
|
@@ -232,19 +194,13 @@ export const FileStat: {
|
|
|
232
194
|
|
|
233
195
|
export type FileStat = FileStat$instance;
|
|
234
196
|
|
|
235
|
-
export interface JsonOptions
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
set reviver(value: unknown | undefined);
|
|
243
|
-
strict: boolean;
|
|
244
|
-
get type(): unknown | undefined;
|
|
245
|
-
set type(value: unknown | undefined);
|
|
246
|
-
get verify(): VerifyBodyHandler | undefined;
|
|
247
|
-
set verify(value: VerifyBodyHandler | undefined);
|
|
197
|
+
export interface JsonOptions {
|
|
198
|
+
inflate?: boolean;
|
|
199
|
+
limit?: string | number;
|
|
200
|
+
reviver?: unknown;
|
|
201
|
+
strict?: boolean;
|
|
202
|
+
type?: string | string[] | MediaTypeMatcher;
|
|
203
|
+
verify?: VerifyBodyHandler;
|
|
248
204
|
}
|
|
249
205
|
|
|
250
206
|
|
|
@@ -252,14 +208,11 @@ export const JsonOptions: {
|
|
|
252
208
|
new(): JsonOptions;
|
|
253
209
|
};
|
|
254
210
|
|
|
255
|
-
|
|
256
|
-
export type JsonOptions = JsonOptions$instance;
|
|
257
|
-
|
|
258
211
|
export interface Multipart$instance {
|
|
259
212
|
readonly __tsonic_type_express_Multipart: never;
|
|
260
213
|
|
|
261
214
|
any(): RequestHandler;
|
|
262
|
-
array(name: string, maxCount?:
|
|
215
|
+
array(name: string, maxCount?: number | undefined): RequestHandler;
|
|
263
216
|
fields(fields: MultipartField[]): RequestHandler;
|
|
264
217
|
none(): RequestHandler;
|
|
265
218
|
single(name: string): RequestHandler;
|
|
@@ -273,11 +226,8 @@ export const Multipart: {
|
|
|
273
226
|
|
|
274
227
|
export type Multipart = Multipart$instance;
|
|
275
228
|
|
|
276
|
-
export interface MultipartField
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
get maxCount(): Nullable_1<System_Internal.Int32>;
|
|
280
|
-
set maxCount(value: Nullable_1<System_Internal.Int32> | int);
|
|
229
|
+
export interface MultipartField {
|
|
230
|
+
maxCount?: number;
|
|
281
231
|
name: string;
|
|
282
232
|
}
|
|
283
233
|
|
|
@@ -286,17 +236,10 @@ export const MultipartField: {
|
|
|
286
236
|
new(): MultipartField;
|
|
287
237
|
};
|
|
288
238
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
readonly __tsonic_type_express_MultipartOptions: never;
|
|
294
|
-
|
|
295
|
-
get maxFileCount(): Nullable_1<System_Internal.Int32>;
|
|
296
|
-
set maxFileCount(value: Nullable_1<System_Internal.Int32> | int);
|
|
297
|
-
get maxFileSizeBytes(): Nullable_1<System_Internal.Int64>;
|
|
298
|
-
set maxFileSizeBytes(value: Nullable_1<System_Internal.Int64> | long);
|
|
299
|
-
type: string;
|
|
239
|
+
export interface MultipartOptions {
|
|
240
|
+
maxFileCount?: number;
|
|
241
|
+
maxFileSizeBytes?: number;
|
|
242
|
+
type?: string;
|
|
300
243
|
}
|
|
301
244
|
|
|
302
245
|
|
|
@@ -304,9 +247,6 @@ export const MultipartOptions: {
|
|
|
304
247
|
new(): MultipartOptions;
|
|
305
248
|
};
|
|
306
249
|
|
|
307
|
-
|
|
308
|
-
export type MultipartOptions = MultipartOptions$instance;
|
|
309
|
-
|
|
310
250
|
export interface Params$instance {
|
|
311
251
|
readonly __tsonic_type_express_Params: never;
|
|
312
252
|
|
|
@@ -320,10 +260,8 @@ export const Params: {
|
|
|
320
260
|
|
|
321
261
|
export type Params = Params$instance & { readonly [key: string]: string | undefined; };
|
|
322
262
|
|
|
323
|
-
export interface RangeOptions
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
combine: boolean;
|
|
263
|
+
export interface RangeOptions {
|
|
264
|
+
combine?: boolean;
|
|
327
265
|
}
|
|
328
266
|
|
|
329
267
|
|
|
@@ -331,13 +269,10 @@ export const RangeOptions: {
|
|
|
331
269
|
new(): RangeOptions;
|
|
332
270
|
};
|
|
333
271
|
|
|
334
|
-
|
|
335
|
-
export type RangeOptions = RangeOptions$instance;
|
|
336
|
-
|
|
337
272
|
export interface RangeResult$instance {
|
|
338
273
|
readonly __tsonic_type_express_RangeResult: never;
|
|
339
274
|
|
|
340
|
-
|
|
275
|
+
ranges: ByteRange[];
|
|
341
276
|
type: string;
|
|
342
277
|
}
|
|
343
278
|
|
|
@@ -349,16 +284,11 @@ export const RangeResult: {
|
|
|
349
284
|
|
|
350
285
|
export type RangeResult = RangeResult$instance;
|
|
351
286
|
|
|
352
|
-
export interface RawOptions
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
set limit(value: unknown | undefined);
|
|
358
|
-
get type(): unknown | undefined;
|
|
359
|
-
set type(value: unknown | undefined);
|
|
360
|
-
get verify(): VerifyBodyHandler | undefined;
|
|
361
|
-
set verify(value: VerifyBodyHandler | undefined);
|
|
287
|
+
export interface RawOptions {
|
|
288
|
+
inflate?: boolean;
|
|
289
|
+
limit?: string | number;
|
|
290
|
+
type?: string | string[] | MediaTypeMatcher;
|
|
291
|
+
verify?: VerifyBodyHandler;
|
|
362
292
|
}
|
|
363
293
|
|
|
364
294
|
|
|
@@ -366,9 +296,6 @@ export const RawOptions: {
|
|
|
366
296
|
new(): RawOptions;
|
|
367
297
|
};
|
|
368
298
|
|
|
369
|
-
|
|
370
|
-
export type RawOptions = RawOptions$instance;
|
|
371
|
-
|
|
372
299
|
export interface Request$instance {
|
|
373
300
|
readonly __tsonic_type_express_Request: never;
|
|
374
301
|
|
|
@@ -385,13 +312,13 @@ export interface Request$instance {
|
|
|
385
312
|
host: string;
|
|
386
313
|
hostname: string;
|
|
387
314
|
ip: string;
|
|
388
|
-
ips:
|
|
315
|
+
ips: string[];
|
|
389
316
|
method: string;
|
|
390
317
|
originalUrl: string;
|
|
391
318
|
readonly params: Params;
|
|
392
319
|
path: string;
|
|
393
320
|
protocol: string;
|
|
394
|
-
query:
|
|
321
|
+
query: Record<string, unknown | undefined>;
|
|
395
322
|
get res(): Response | undefined;
|
|
396
323
|
set res(value: Response | undefined);
|
|
397
324
|
get route(): Route | undefined;
|
|
@@ -400,17 +327,17 @@ export interface Request$instance {
|
|
|
400
327
|
signed: boolean;
|
|
401
328
|
readonly signedCookies: Cookies;
|
|
402
329
|
readonly stale: boolean;
|
|
403
|
-
subdomains:
|
|
330
|
+
subdomains: string[];
|
|
404
331
|
xhr: boolean;
|
|
405
|
-
accepts(...types: string[]):
|
|
406
|
-
acceptsCharsets(...charsets: string[]):
|
|
407
|
-
acceptsEncodings(...encodings: string[]):
|
|
408
|
-
acceptsLanguages(...languages: string[]):
|
|
332
|
+
accepts(...types: string[]): string | false;
|
|
333
|
+
acceptsCharsets(...charsets: string[]): string | false;
|
|
334
|
+
acceptsEncodings(...encodings: string[]): string | false;
|
|
335
|
+
acceptsLanguages(...languages: string[]): string | string[] | false;
|
|
409
336
|
get(field: string): string | undefined;
|
|
410
337
|
header(field: string): string | undefined;
|
|
411
|
-
is(...types: string[]):
|
|
338
|
+
is(...types: string[]): string | false | undefined;
|
|
412
339
|
param(name: string): string | undefined;
|
|
413
|
-
range(size:
|
|
340
|
+
range(size: number, options?: RangeOptions): RangeResult | -1;
|
|
414
341
|
setHeader(name: string, value: string): void;
|
|
415
342
|
}
|
|
416
343
|
|
|
@@ -427,37 +354,37 @@ export interface Response$instance {
|
|
|
427
354
|
|
|
428
355
|
readonly app: Application | undefined;
|
|
429
356
|
headersSent: boolean;
|
|
430
|
-
readonly locals:
|
|
357
|
+
readonly locals: Record<string, unknown | undefined>;
|
|
431
358
|
get req(): Request | undefined;
|
|
432
359
|
set req(value: Request | undefined);
|
|
433
|
-
statusCode:
|
|
360
|
+
statusCode: number;
|
|
434
361
|
append(field: string, value: string): Response;
|
|
435
|
-
append(field: string, values:
|
|
362
|
+
append(field: string, values: readonly string[]): Response;
|
|
436
363
|
attachment(filename?: string): Response;
|
|
437
364
|
clearCookie(name: string, options?: CookieOptions): Response;
|
|
438
365
|
contentType(type: string): Response;
|
|
439
366
|
cookie(name: string, value: unknown, options?: CookieOptions): Response;
|
|
440
|
-
download(path: string, filename?: string, options?: DownloadOptions, fn?:
|
|
441
|
-
end(data?: unknown, encoding?: string, callback?:
|
|
442
|
-
format(handlers:
|
|
367
|
+
download(path: string, filename?: string, options?: DownloadOptions, fn?: (err: Error | undefined) => void): Response;
|
|
368
|
+
end(data?: unknown, encoding?: string, callback?: () => void): Response;
|
|
369
|
+
format(handlers: Record<string, () => void>): Response;
|
|
443
370
|
get(field: string): string | undefined;
|
|
444
371
|
header(field: string, value: unknown): Response;
|
|
445
372
|
json(body?: unknown): Response;
|
|
446
373
|
jsonp(body?: unknown): Response;
|
|
447
|
-
links(links:
|
|
374
|
+
links(links: Record<string, string>): Response;
|
|
448
375
|
location(path: string): Response;
|
|
449
376
|
redirect(path: string): Response;
|
|
450
|
-
redirect(status:
|
|
377
|
+
redirect(status: number, path: string): Response;
|
|
451
378
|
render(view: string): Response;
|
|
452
|
-
render(view: string, viewLocals:
|
|
453
|
-
render(view: string, callback:
|
|
454
|
-
render(view: string, viewLocals:
|
|
379
|
+
render(view: string, viewLocals: Record<string, unknown>): Response;
|
|
380
|
+
render(view: string, callback: (err: Error | undefined, html: string | undefined) => void): Response;
|
|
381
|
+
render(view: string, viewLocals: Record<string, unknown>, callback: (err: Error | undefined, html: string | undefined) => void): Response;
|
|
455
382
|
send(body?: unknown): Response;
|
|
456
|
-
sendFile(path: string, options?: SendFileOptions, fn?:
|
|
457
|
-
sendStatus(code:
|
|
383
|
+
sendFile(path: string, options?: SendFileOptions, fn?: (err: Error | undefined) => void): Response;
|
|
384
|
+
sendStatus(code: number): Response;
|
|
458
385
|
set(field: string, value: unknown): Response;
|
|
459
|
-
set(fields:
|
|
460
|
-
status(code:
|
|
386
|
+
set(fields: Record<string, string>): Response;
|
|
387
|
+
status(code: number): Response;
|
|
461
388
|
type(type: string): Response;
|
|
462
389
|
vary(field: string): Response;
|
|
463
390
|
}
|
|
@@ -515,12 +442,10 @@ export const Router: {
|
|
|
515
442
|
|
|
516
443
|
export type Router = Router$instance;
|
|
517
444
|
|
|
518
|
-
export interface RouterOptions
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
mergeParams: boolean;
|
|
523
|
-
strict: boolean;
|
|
445
|
+
export interface RouterOptions {
|
|
446
|
+
caseSensitive?: boolean;
|
|
447
|
+
mergeParams?: boolean;
|
|
448
|
+
strict?: boolean;
|
|
524
449
|
}
|
|
525
450
|
|
|
526
451
|
|
|
@@ -528,9 +453,6 @@ export const RouterOptions: {
|
|
|
528
453
|
new(): RouterOptions;
|
|
529
454
|
};
|
|
530
455
|
|
|
531
|
-
|
|
532
|
-
export type RouterOptions = RouterOptions$instance;
|
|
533
|
-
|
|
534
456
|
export interface RoutingHost_1$instance<TSelf extends RoutingHost_1<TSelf>> {
|
|
535
457
|
readonly __tsonic_type_express_RoutingHost_1: never;
|
|
536
458
|
|
|
@@ -574,18 +496,15 @@ export const RoutingHost_1: (abstract new<TSelf extends RoutingHost_1<TSelf>>()
|
|
|
574
496
|
|
|
575
497
|
export type RoutingHost_1<TSelf extends RoutingHost_1<TSelf>> = RoutingHost_1$instance<TSelf>;
|
|
576
498
|
|
|
577
|
-
export interface SendFileOptions
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
maxAge: unknown;
|
|
587
|
-
get root(): string | undefined;
|
|
588
|
-
set root(value: string | undefined);
|
|
499
|
+
export interface SendFileOptions {
|
|
500
|
+
acceptRanges?: boolean;
|
|
501
|
+
cacheControl?: boolean;
|
|
502
|
+
dotfiles?: string;
|
|
503
|
+
headers?: Record<string, string>;
|
|
504
|
+
immutable?: boolean;
|
|
505
|
+
lastModified?: boolean;
|
|
506
|
+
maxAge?: string | number;
|
|
507
|
+
root?: string;
|
|
589
508
|
}
|
|
590
509
|
|
|
591
510
|
|
|
@@ -593,27 +512,19 @@ export const SendFileOptions: {
|
|
|
593
512
|
new(): SendFileOptions;
|
|
594
513
|
};
|
|
595
514
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
immutable: boolean;
|
|
610
|
-
get index(): unknown | undefined;
|
|
611
|
-
set index(value: unknown | undefined);
|
|
612
|
-
lastModified: boolean;
|
|
613
|
-
maxAge: unknown;
|
|
614
|
-
redirect: boolean;
|
|
615
|
-
get setHeaders(): SetHeadersHandler | undefined;
|
|
616
|
-
set setHeaders(value: SetHeadersHandler | undefined);
|
|
515
|
+
export interface StaticOptions {
|
|
516
|
+
acceptRanges?: boolean;
|
|
517
|
+
cacheControl?: boolean;
|
|
518
|
+
dotfiles?: string;
|
|
519
|
+
etag?: boolean;
|
|
520
|
+
extensions?: string[] | false;
|
|
521
|
+
fallthrough?: boolean;
|
|
522
|
+
immutable?: boolean;
|
|
523
|
+
index?: string | string[] | false;
|
|
524
|
+
lastModified?: boolean;
|
|
525
|
+
maxAge?: string | number;
|
|
526
|
+
redirect?: boolean;
|
|
527
|
+
setHeaders?: SetHeadersHandler;
|
|
617
528
|
}
|
|
618
529
|
|
|
619
530
|
|
|
@@ -621,20 +532,12 @@ export const StaticOptions: {
|
|
|
621
532
|
new(): StaticOptions;
|
|
622
533
|
};
|
|
623
534
|
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
defaultCharset: string;
|
|
631
|
-
inflate: boolean;
|
|
632
|
-
get limit(): unknown | undefined;
|
|
633
|
-
set limit(value: unknown | undefined);
|
|
634
|
-
get type(): unknown | undefined;
|
|
635
|
-
set type(value: unknown | undefined);
|
|
636
|
-
get verify(): VerifyBodyHandler | undefined;
|
|
637
|
-
set verify(value: VerifyBodyHandler | undefined);
|
|
535
|
+
export interface TextOptions {
|
|
536
|
+
defaultCharset?: string;
|
|
537
|
+
inflate?: boolean;
|
|
538
|
+
limit?: string | number;
|
|
539
|
+
type?: string | string[] | MediaTypeMatcher;
|
|
540
|
+
verify?: VerifyBodyHandler;
|
|
638
541
|
}
|
|
639
542
|
|
|
640
543
|
|
|
@@ -642,19 +545,16 @@ export const TextOptions: {
|
|
|
642
545
|
new(): TextOptions;
|
|
643
546
|
};
|
|
644
547
|
|
|
645
|
-
|
|
646
|
-
export type TextOptions = TextOptions$instance;
|
|
647
|
-
|
|
648
548
|
export interface UploadedFile$instance {
|
|
649
549
|
readonly __tsonic_type_express_UploadedFile: never;
|
|
650
550
|
|
|
651
551
|
readonly fieldname: string;
|
|
652
552
|
readonly mimetype: string;
|
|
653
553
|
readonly originalname: string;
|
|
654
|
-
readonly size:
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
554
|
+
readonly size: number;
|
|
555
|
+
bytes(): Promise<Uint8Array>;
|
|
556
|
+
save(path: string): Promise<void>;
|
|
557
|
+
text(): Promise<string>;
|
|
658
558
|
}
|
|
659
559
|
|
|
660
560
|
|
|
@@ -664,19 +564,14 @@ export const UploadedFile: {
|
|
|
664
564
|
|
|
665
565
|
export type UploadedFile = UploadedFile$instance;
|
|
666
566
|
|
|
667
|
-
export interface UrlEncodedOptions
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
parameterLimit: int;
|
|
676
|
-
get type(): unknown | undefined;
|
|
677
|
-
set type(value: unknown | undefined);
|
|
678
|
-
get verify(): VerifyBodyHandler | undefined;
|
|
679
|
-
set verify(value: VerifyBodyHandler | undefined);
|
|
567
|
+
export interface UrlEncodedOptions {
|
|
568
|
+
depth?: number;
|
|
569
|
+
extended?: boolean;
|
|
570
|
+
inflate?: boolean;
|
|
571
|
+
limit?: string | number;
|
|
572
|
+
parameterLimit?: number;
|
|
573
|
+
type?: string | string[] | MediaTypeMatcher;
|
|
574
|
+
verify?: VerifyBodyHandler;
|
|
680
575
|
}
|
|
681
576
|
|
|
682
577
|
|
|
@@ -684,9 +579,6 @@ export const UrlEncodedOptions: {
|
|
|
684
579
|
new(): UrlEncodedOptions;
|
|
685
580
|
};
|
|
686
581
|
|
|
687
|
-
|
|
688
|
-
export type UrlEncodedOptions = UrlEncodedOptions$instance;
|
|
689
|
-
|
|
690
582
|
export abstract class express$instance {
|
|
691
583
|
static app(): Application;
|
|
692
584
|
static application(): Application;
|
package/index.d.ts
CHANGED
|
@@ -5,13 +5,6 @@
|
|
|
5
5
|
// Import internal declarations
|
|
6
6
|
import * as Internal from './index/internal/index.js';
|
|
7
7
|
|
|
8
|
-
// Cross-namespace type imports for constraints
|
|
9
|
-
import type { Dictionary, IEnumerable, List } from '@tsonic/dotnet/System.Collections.Generic.js';
|
|
10
|
-
import type { Stream } from '@tsonic/dotnet/System.IO.js';
|
|
11
|
-
import type { Action, AsyncCallback, Boolean as ClrBoolean, Byte, DateTime, Exception, IAsyncResult, ICloneable, Int32, Int64, IntPtr, MulticastDelegate, Nullable, Object as ClrObject, String as ClrString, Void } from '@tsonic/dotnet/System.js';
|
|
12
|
-
import type { ISerializable } from '@tsonic/dotnet/System.Runtime.Serialization.js';
|
|
13
|
-
import type { Task } from '@tsonic/dotnet/System.Threading.Tasks.js';
|
|
14
|
-
|
|
15
8
|
// Public API exports (curated - no internal $instance/$views leakage)
|
|
16
9
|
export { Application as Application } from './index/internal/index.js';
|
|
17
10
|
export { AppServer as AppServer } from './index/internal/index.js';
|