webpack-dev-server 4.13.2 → 4.13.3
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/lib/Server.js +35 -10
- package/package.json +1 -1
- package/types/lib/Server.d.ts +538 -393
package/types/lib/Server.d.ts
CHANGED
|
@@ -20,13 +20,172 @@ declare class Server {
|
|
|
20
20
|
}
|
|
21
21
|
)[];
|
|
22
22
|
description: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
multiple: boolean;
|
|
24
|
+
simpleType: string;
|
|
25
|
+
};
|
|
26
|
+
"allowed-hosts-reset": {
|
|
27
|
+
configs: {
|
|
28
|
+
type: string;
|
|
29
|
+
multiple: boolean;
|
|
30
|
+
/** @typedef {import("express").NextFunction} NextFunction */
|
|
31
|
+
/** @typedef {import("express").RequestHandler} ExpressRequestHandler */
|
|
32
|
+
/** @typedef {import("express").ErrorRequestHandler} ExpressErrorRequestHandler */
|
|
33
|
+
/** @typedef {import("chokidar").WatchOptions} WatchOptions */
|
|
34
|
+
/** @typedef {import("chokidar").FSWatcher} FSWatcher */
|
|
35
|
+
/** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */
|
|
36
|
+
/** @typedef {import("bonjour-service").Bonjour} Bonjour */
|
|
37
|
+
/** @typedef {import("bonjour-service").Service} BonjourOptions */
|
|
38
|
+
/** @typedef {import("http-proxy-middleware").RequestHandler} RequestHandler */
|
|
39
|
+
/** @typedef {import("http-proxy-middleware").Options} HttpProxyMiddlewareOptions */
|
|
40
|
+
/** @typedef {import("http-proxy-middleware").Filter} HttpProxyMiddlewareOptionsFilter */
|
|
41
|
+
/** @typedef {import("serve-index").Options} ServeIndexOptions */
|
|
42
|
+
/** @typedef {import("serve-static").ServeStaticOptions} ServeStaticOptions */
|
|
43
|
+
/** @typedef {import("ipaddr.js").IPv4} IPv4 */
|
|
44
|
+
/** @typedef {import("ipaddr.js").IPv6} IPv6 */
|
|
45
|
+
/** @typedef {import("net").Socket} Socket */
|
|
46
|
+
/** @typedef {import("http").IncomingMessage} IncomingMessage */
|
|
47
|
+
/** @typedef {import("open").Options} OpenOptions */
|
|
48
|
+
/** @typedef {import("https").ServerOptions & { spdy?: { plain?: boolean | undefined, ssl?: boolean | undefined, 'x-forwarded-for'?: string | undefined, protocol?: string | undefined, protocols?: string[] | undefined }}} ServerOptions */
|
|
49
|
+
/**
|
|
50
|
+
* @template Request, Response
|
|
51
|
+
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* @template Request, Response
|
|
55
|
+
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
59
|
+
*/
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {number | string | "auto"} Port
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* @typedef {Object} WatchFiles
|
|
65
|
+
* @property {string | string[]} paths
|
|
66
|
+
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
67
|
+
*/
|
|
68
|
+
/**
|
|
69
|
+
* @typedef {Object} Static
|
|
70
|
+
* @property {string} [directory]
|
|
71
|
+
* @property {string | string[]} [publicPath]
|
|
72
|
+
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
73
|
+
* @property {ServeStaticOptions} [staticOptions]
|
|
74
|
+
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
75
|
+
*/
|
|
76
|
+
/**
|
|
77
|
+
* @typedef {Object} NormalizedStatic
|
|
78
|
+
* @property {string} directory
|
|
79
|
+
* @property {string[]} publicPath
|
|
80
|
+
* @property {false | ServeIndexOptions} serveIndex
|
|
81
|
+
* @property {ServeStaticOptions} staticOptions
|
|
82
|
+
* @property {false | WatchOptions} watch
|
|
83
|
+
*/
|
|
84
|
+
/**
|
|
85
|
+
* @typedef {Object} ServerConfiguration
|
|
86
|
+
* @property {"http" | "https" | "spdy" | string} [type]
|
|
87
|
+
* @property {ServerOptions} [options]
|
|
88
|
+
*/
|
|
89
|
+
/**
|
|
90
|
+
* @typedef {Object} WebSocketServerConfiguration
|
|
91
|
+
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
92
|
+
* @property {Record<string, any>} [options]
|
|
93
|
+
*/
|
|
94
|
+
/**
|
|
95
|
+
* @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
99
|
+
*/
|
|
100
|
+
/**
|
|
101
|
+
* @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
|
|
102
|
+
*/
|
|
103
|
+
/**
|
|
104
|
+
* @callback ByPass
|
|
105
|
+
* @param {Request} req
|
|
106
|
+
* @param {Response} res
|
|
107
|
+
* @param {ProxyConfigArrayItem} proxyConfig
|
|
108
|
+
*/
|
|
109
|
+
/**
|
|
110
|
+
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
111
|
+
*/
|
|
112
|
+
/**
|
|
113
|
+
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
114
|
+
*/
|
|
115
|
+
/**
|
|
116
|
+
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
117
|
+
*/
|
|
118
|
+
/**
|
|
119
|
+
* @typedef {Object} OpenApp
|
|
120
|
+
* @property {string} [name]
|
|
121
|
+
* @property {string[]} [arguments]
|
|
122
|
+
*/
|
|
123
|
+
/**
|
|
124
|
+
* @typedef {Object} Open
|
|
125
|
+
* @property {string | string[] | OpenApp} [app]
|
|
126
|
+
* @property {string | string[]} [target]
|
|
127
|
+
*/
|
|
128
|
+
/**
|
|
129
|
+
* @typedef {Object} NormalizedOpen
|
|
130
|
+
* @property {string} target
|
|
131
|
+
* @property {import("open").Options} options
|
|
132
|
+
*/
|
|
133
|
+
/**
|
|
134
|
+
* @typedef {Object} WebSocketURL
|
|
135
|
+
* @property {string} [hostname]
|
|
136
|
+
* @property {string} [password]
|
|
137
|
+
* @property {string} [pathname]
|
|
138
|
+
* @property {number | string} [port]
|
|
139
|
+
* @property {string} [protocol]
|
|
140
|
+
* @property {string} [username]
|
|
141
|
+
*/
|
|
142
|
+
/**
|
|
143
|
+
* @typedef {Object} ClientConfiguration
|
|
144
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
145
|
+
* @property {boolean | { warnings?: boolean, errors?: boolean, runtimeErrors?: boolean }} [overlay]
|
|
146
|
+
* @property {boolean} [progress]
|
|
147
|
+
* @property {boolean | number} [reconnect]
|
|
148
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
149
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
150
|
+
*/
|
|
151
|
+
/**
|
|
152
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
153
|
+
*/
|
|
154
|
+
/**
|
|
155
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
156
|
+
*/
|
|
157
|
+
/**
|
|
158
|
+
* @typedef {Object} Configuration
|
|
159
|
+
* @property {boolean | string} [ipc]
|
|
160
|
+
* @property {Host} [host]
|
|
161
|
+
* @property {Port} [port]
|
|
162
|
+
* @property {boolean | "only"} [hot]
|
|
163
|
+
* @property {boolean} [liveReload]
|
|
164
|
+
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
165
|
+
* @property {boolean} [compress]
|
|
166
|
+
* @property {boolean} [magicHtml]
|
|
167
|
+
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
168
|
+
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
169
|
+
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
170
|
+
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
171
|
+
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
172
|
+
* @property {boolean | ServerOptions} [https]
|
|
173
|
+
* @property {boolean} [http2]
|
|
174
|
+
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
175
|
+
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
176
|
+
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
177
|
+
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
178
|
+
* @property {boolean} [setupExitSignals]
|
|
179
|
+
* @property {boolean | ClientConfiguration} [client]
|
|
180
|
+
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
181
|
+
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
182
|
+
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
183
|
+
* @property {(devServer: Server) => void} [onListening]
|
|
184
|
+
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
185
|
+
*/
|
|
186
|
+
description: string;
|
|
187
|
+
path: string;
|
|
188
|
+
}[];
|
|
30
189
|
/** @typedef {import("chokidar").FSWatcher} FSWatcher */
|
|
31
190
|
/** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */
|
|
32
191
|
/** @typedef {import("bonjour-service").Bonjour} Bonjour */
|
|
@@ -179,12 +338,39 @@ declare class Server {
|
|
|
179
338
|
* @property {(devServer: Server) => void} [onListening]
|
|
180
339
|
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
181
340
|
*/
|
|
341
|
+
description: string;
|
|
342
|
+
simpleType: string;
|
|
182
343
|
multiple: boolean;
|
|
344
|
+
};
|
|
345
|
+
bonjour: {
|
|
346
|
+
configs: {
|
|
347
|
+
type: string;
|
|
348
|
+
multiple: boolean;
|
|
349
|
+
description: string;
|
|
350
|
+
negatedDescription: string;
|
|
351
|
+
path: string;
|
|
352
|
+
}[];
|
|
353
|
+
description: string;
|
|
183
354
|
simpleType: string;
|
|
355
|
+
multiple: boolean;
|
|
184
356
|
};
|
|
185
|
-
|
|
357
|
+
client: {
|
|
358
|
+
configs: {
|
|
359
|
+
description: string;
|
|
360
|
+
negatedDescription: string;
|
|
361
|
+
multiple: boolean;
|
|
362
|
+
path: string;
|
|
363
|
+
type: string;
|
|
364
|
+
values: boolean[];
|
|
365
|
+
}[];
|
|
366
|
+
description: string;
|
|
367
|
+
multiple: boolean;
|
|
368
|
+
simpleType: string;
|
|
369
|
+
};
|
|
370
|
+
"client-logging": {
|
|
186
371
|
configs: {
|
|
187
372
|
type: string;
|
|
373
|
+
values: string[];
|
|
188
374
|
multiple: boolean;
|
|
189
375
|
description: string;
|
|
190
376
|
path: string;
|
|
@@ -193,7 +379,7 @@ declare class Server {
|
|
|
193
379
|
simpleType: string;
|
|
194
380
|
multiple: boolean;
|
|
195
381
|
};
|
|
196
|
-
|
|
382
|
+
"client-overlay": {
|
|
197
383
|
configs: {
|
|
198
384
|
type: string;
|
|
199
385
|
multiple: boolean;
|
|
@@ -205,65 +391,21 @@ declare class Server {
|
|
|
205
391
|
simpleType: string;
|
|
206
392
|
multiple: boolean;
|
|
207
393
|
};
|
|
208
|
-
client: {
|
|
394
|
+
"client-overlay-errors": {
|
|
209
395
|
configs: {
|
|
396
|
+
type: string;
|
|
397
|
+
multiple: boolean;
|
|
210
398
|
description: string;
|
|
399
|
+
/**
|
|
400
|
+
* @typedef {Object} ServerConfiguration
|
|
401
|
+
* @property {"http" | "https" | "spdy" | string} [type]
|
|
402
|
+
* @property {ServerOptions} [options]
|
|
403
|
+
*/
|
|
211
404
|
negatedDescription: string;
|
|
212
|
-
multiple: boolean;
|
|
213
405
|
path: string;
|
|
214
|
-
type: string;
|
|
215
|
-
values: boolean[];
|
|
216
406
|
}[];
|
|
217
407
|
description: string;
|
|
218
|
-
multiple: boolean;
|
|
219
408
|
simpleType: string;
|
|
220
|
-
};
|
|
221
|
-
"client-logging": {
|
|
222
|
-
/**
|
|
223
|
-
* @template Request, Response
|
|
224
|
-
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
225
|
-
*/
|
|
226
|
-
/**
|
|
227
|
-
* @template Request, Response
|
|
228
|
-
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
229
|
-
*/
|
|
230
|
-
/**
|
|
231
|
-
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
232
|
-
*/
|
|
233
|
-
/**
|
|
234
|
-
* @typedef {number | string | "auto"} Port
|
|
235
|
-
*/
|
|
236
|
-
/**
|
|
237
|
-
* @typedef {Object} WatchFiles
|
|
238
|
-
* @property {string | string[]} paths
|
|
239
|
-
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
240
|
-
*/
|
|
241
|
-
/**
|
|
242
|
-
* @typedef {Object} Static
|
|
243
|
-
* @property {string} [directory]
|
|
244
|
-
* @property {string | string[]} [publicPath]
|
|
245
|
-
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
246
|
-
* @property {ServeStaticOptions} [staticOptions]
|
|
247
|
-
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
248
|
-
*/
|
|
249
|
-
/**
|
|
250
|
-
* @typedef {Object} NormalizedStatic
|
|
251
|
-
* @property {string} directory
|
|
252
|
-
* @property {string[]} publicPath
|
|
253
|
-
* @property {false | ServeIndexOptions} serveIndex
|
|
254
|
-
* @property {ServeStaticOptions} staticOptions
|
|
255
|
-
* @property {false | WatchOptions} watch
|
|
256
|
-
*/
|
|
257
|
-
/**
|
|
258
|
-
* @typedef {Object} ServerConfiguration
|
|
259
|
-
* @property {"http" | "https" | "spdy" | string} [type]
|
|
260
|
-
* @property {ServerOptions} [options]
|
|
261
|
-
*/
|
|
262
|
-
/**
|
|
263
|
-
* @typedef {Object} WebSocketServerConfiguration
|
|
264
|
-
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
265
|
-
* @property {Record<string, any>} [options]
|
|
266
|
-
*/
|
|
267
409
|
/**
|
|
268
410
|
* @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
|
|
269
411
|
*/
|
|
@@ -356,45 +498,15 @@ declare class Server {
|
|
|
356
498
|
* @property {(devServer: Server) => void} [onListening]
|
|
357
499
|
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
358
500
|
*/
|
|
359
|
-
configs: {
|
|
360
|
-
type: string;
|
|
361
|
-
values: string[];
|
|
362
|
-
multiple: boolean;
|
|
363
|
-
description: string;
|
|
364
|
-
path: string;
|
|
365
|
-
}[];
|
|
366
|
-
description: string;
|
|
367
|
-
simpleType: string;
|
|
368
|
-
multiple: boolean;
|
|
369
|
-
};
|
|
370
|
-
"client-overlay": {
|
|
371
|
-
configs: {
|
|
372
|
-
type: string;
|
|
373
|
-
multiple: boolean;
|
|
374
|
-
description: string;
|
|
375
|
-
negatedDescription: string;
|
|
376
|
-
path: string;
|
|
377
|
-
}[];
|
|
378
|
-
description: string;
|
|
379
|
-
simpleType: string;
|
|
380
|
-
multiple: boolean;
|
|
381
|
-
};
|
|
382
|
-
"client-overlay-errors": {
|
|
383
|
-
configs: {
|
|
384
|
-
type: string;
|
|
385
|
-
multiple: boolean;
|
|
386
|
-
description: string;
|
|
387
|
-
negatedDescription: string;
|
|
388
|
-
path: string;
|
|
389
|
-
}[];
|
|
390
|
-
description: string;
|
|
391
|
-
simpleType: string;
|
|
392
501
|
multiple: boolean;
|
|
393
502
|
};
|
|
394
503
|
"client-overlay-trusted-types-policy-name": {
|
|
395
504
|
configs: {
|
|
396
505
|
description: string;
|
|
397
506
|
multiple: boolean;
|
|
507
|
+
/**
|
|
508
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
509
|
+
*/
|
|
398
510
|
path: string;
|
|
399
511
|
type: string;
|
|
400
512
|
}[];
|
|
@@ -419,69 +531,6 @@ declare class Server {
|
|
|
419
531
|
type: string;
|
|
420
532
|
multiple: boolean;
|
|
421
533
|
description: string;
|
|
422
|
-
/**
|
|
423
|
-
* @typedef {Object} Open
|
|
424
|
-
* @property {string | string[] | OpenApp} [app]
|
|
425
|
-
* @property {string | string[]} [target]
|
|
426
|
-
*/
|
|
427
|
-
/**
|
|
428
|
-
* @typedef {Object} NormalizedOpen
|
|
429
|
-
* @property {string} target
|
|
430
|
-
* @property {import("open").Options} options
|
|
431
|
-
*/
|
|
432
|
-
/**
|
|
433
|
-
* @typedef {Object} WebSocketURL
|
|
434
|
-
* @property {string} [hostname]
|
|
435
|
-
* @property {string} [password]
|
|
436
|
-
* @property {string} [pathname]
|
|
437
|
-
* @property {number | string} [port]
|
|
438
|
-
* @property {string} [protocol]
|
|
439
|
-
* @property {string} [username]
|
|
440
|
-
*/
|
|
441
|
-
/**
|
|
442
|
-
* @typedef {Object} ClientConfiguration
|
|
443
|
-
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
444
|
-
* @property {boolean | { warnings?: boolean, errors?: boolean, runtimeErrors?: boolean }} [overlay]
|
|
445
|
-
* @property {boolean} [progress]
|
|
446
|
-
* @property {boolean | number} [reconnect]
|
|
447
|
-
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
448
|
-
* @property {string | WebSocketURL} [webSocketURL]
|
|
449
|
-
*/
|
|
450
|
-
/**
|
|
451
|
-
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
452
|
-
*/
|
|
453
|
-
/**
|
|
454
|
-
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
455
|
-
*/
|
|
456
|
-
/**
|
|
457
|
-
* @typedef {Object} Configuration
|
|
458
|
-
* @property {boolean | string} [ipc]
|
|
459
|
-
* @property {Host} [host]
|
|
460
|
-
* @property {Port} [port]
|
|
461
|
-
* @property {boolean | "only"} [hot]
|
|
462
|
-
* @property {boolean} [liveReload]
|
|
463
|
-
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
464
|
-
* @property {boolean} [compress]
|
|
465
|
-
* @property {boolean} [magicHtml]
|
|
466
|
-
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
467
|
-
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
468
|
-
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
469
|
-
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
470
|
-
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
471
|
-
* @property {boolean | ServerOptions} [https]
|
|
472
|
-
* @property {boolean} [http2]
|
|
473
|
-
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
474
|
-
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
475
|
-
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
476
|
-
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
477
|
-
* @property {boolean} [setupExitSignals]
|
|
478
|
-
* @property {boolean | ClientConfiguration} [client]
|
|
479
|
-
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
480
|
-
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
481
|
-
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
482
|
-
* @property {(devServer: Server) => void} [onListening]
|
|
483
|
-
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
484
|
-
*/
|
|
485
534
|
negatedDescription: string;
|
|
486
535
|
path: string;
|
|
487
536
|
}[];
|
|
@@ -501,6 +550,9 @@ declare class Server {
|
|
|
501
550
|
simpleType: string;
|
|
502
551
|
multiple: boolean;
|
|
503
552
|
};
|
|
553
|
+
/**
|
|
554
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
555
|
+
*/
|
|
504
556
|
"client-reconnect": {
|
|
505
557
|
configs: (
|
|
506
558
|
| {
|
|
@@ -596,12 +648,20 @@ declare class Server {
|
|
|
596
648
|
simpleType: string;
|
|
597
649
|
multiple: boolean;
|
|
598
650
|
};
|
|
651
|
+
/**
|
|
652
|
+
* @private
|
|
653
|
+
* @type {RequestHandler[]}
|
|
654
|
+
*/
|
|
599
655
|
"client-web-socket-url-protocol": {
|
|
600
656
|
configs: (
|
|
601
657
|
| {
|
|
602
658
|
description: string;
|
|
603
659
|
multiple: boolean;
|
|
604
660
|
path: string;
|
|
661
|
+
/**
|
|
662
|
+
* @private
|
|
663
|
+
* @type {string | undefined}
|
|
664
|
+
*/
|
|
605
665
|
type: string;
|
|
606
666
|
values: string[];
|
|
607
667
|
}
|
|
@@ -749,13 +809,15 @@ declare class Server {
|
|
|
749
809
|
simpleType: string;
|
|
750
810
|
multiple: boolean;
|
|
751
811
|
};
|
|
812
|
+
/**
|
|
813
|
+
* @type {string[]}
|
|
814
|
+
*/
|
|
752
815
|
"https-cacert-reset": {
|
|
753
816
|
configs: {
|
|
754
817
|
description: string;
|
|
755
|
-
/** @type {string} */
|
|
756
818
|
multiple: boolean;
|
|
757
819
|
path: string;
|
|
758
|
-
type: string;
|
|
820
|
+
/** @type {WebSocketURL} */ type: string;
|
|
759
821
|
}[];
|
|
760
822
|
description: string;
|
|
761
823
|
multiple: boolean;
|
|
@@ -867,12 +929,6 @@ declare class Server {
|
|
|
867
929
|
description: string;
|
|
868
930
|
negatedDescription: string;
|
|
869
931
|
path: string;
|
|
870
|
-
/**
|
|
871
|
-
* prependEntry Method for webpack 4
|
|
872
|
-
* @param {any} originalEntry
|
|
873
|
-
* @param {any} newAdditionalEntries
|
|
874
|
-
* @returns {any}
|
|
875
|
-
*/
|
|
876
932
|
}[];
|
|
877
933
|
description: string;
|
|
878
934
|
simpleType: string;
|
|
@@ -891,6 +947,12 @@ declare class Server {
|
|
|
891
947
|
values: boolean[];
|
|
892
948
|
multiple: boolean;
|
|
893
949
|
description: string;
|
|
950
|
+
/**
|
|
951
|
+
* prependEntry Method for webpack 4
|
|
952
|
+
* @param {any} originalEntry
|
|
953
|
+
* @param {any} newAdditionalEntries
|
|
954
|
+
* @returns {any}
|
|
955
|
+
*/
|
|
894
956
|
path: string;
|
|
895
957
|
}
|
|
896
958
|
)[];
|
|
@@ -906,7 +968,6 @@ declare class Server {
|
|
|
906
968
|
negatedDescription: string;
|
|
907
969
|
path: string;
|
|
908
970
|
}[];
|
|
909
|
-
/** @type {any} */
|
|
910
971
|
description: string;
|
|
911
972
|
simpleType: string;
|
|
912
973
|
multiple: boolean;
|
|
@@ -928,7 +989,7 @@ declare class Server {
|
|
|
928
989
|
| {
|
|
929
990
|
type: string;
|
|
930
991
|
multiple: boolean;
|
|
931
|
-
|
|
992
|
+
description: string;
|
|
932
993
|
path: string;
|
|
933
994
|
}
|
|
934
995
|
| {
|
|
@@ -964,10 +1025,6 @@ declare class Server {
|
|
|
964
1025
|
description: string;
|
|
965
1026
|
simpleType: string;
|
|
966
1027
|
multiple: boolean;
|
|
967
|
-
/**
|
|
968
|
-
* @param {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} watchOptions
|
|
969
|
-
* @returns {WatchOptions}
|
|
970
|
-
*/
|
|
971
1028
|
};
|
|
972
1029
|
"open-app-name-reset": {
|
|
973
1030
|
configs: {
|
|
@@ -1196,9 +1253,9 @@ declare class Server {
|
|
|
1196
1253
|
type: string;
|
|
1197
1254
|
values: string[];
|
|
1198
1255
|
}[];
|
|
1199
|
-
description: string;
|
|
1256
|
+
/** @type {ServerConfiguration} */ description: string;
|
|
1200
1257
|
multiple: boolean;
|
|
1201
|
-
simpleType: string
|
|
1258
|
+
simpleType: string;
|
|
1202
1259
|
};
|
|
1203
1260
|
static: {
|
|
1204
1261
|
configs: (
|
|
@@ -1211,7 +1268,7 @@ declare class Server {
|
|
|
1211
1268
|
| {
|
|
1212
1269
|
type: string;
|
|
1213
1270
|
multiple: boolean;
|
|
1214
|
-
|
|
1271
|
+
description: string;
|
|
1215
1272
|
negatedDescription: string;
|
|
1216
1273
|
path: string;
|
|
1217
1274
|
}
|
|
@@ -1223,7 +1280,7 @@ declare class Server {
|
|
|
1223
1280
|
"static-directory": {
|
|
1224
1281
|
configs: {
|
|
1225
1282
|
type: string;
|
|
1226
|
-
|
|
1283
|
+
multiple: boolean;
|
|
1227
1284
|
description: string;
|
|
1228
1285
|
path: string;
|
|
1229
1286
|
}[];
|
|
@@ -1236,10 +1293,10 @@ declare class Server {
|
|
|
1236
1293
|
type: string;
|
|
1237
1294
|
multiple: boolean;
|
|
1238
1295
|
description: string;
|
|
1239
|
-
path: string
|
|
1296
|
+
path: string /** @type {any} */;
|
|
1240
1297
|
}[];
|
|
1241
1298
|
description: string;
|
|
1242
|
-
|
|
1299
|
+
simpleType: string;
|
|
1243
1300
|
multiple: boolean;
|
|
1244
1301
|
};
|
|
1245
1302
|
"static-public-path-reset": {
|
|
@@ -1357,7 +1414,7 @@ declare class Server {
|
|
|
1357
1414
|
description: string;
|
|
1358
1415
|
simpleType: string;
|
|
1359
1416
|
multiple: boolean;
|
|
1360
|
-
}
|
|
1417
|
+
};
|
|
1361
1418
|
};
|
|
1362
1419
|
readonly processArguments: (
|
|
1363
1420
|
args: Record<string, import("../bin/process-arguments").Argument>,
|
|
@@ -1402,7 +1459,7 @@ declare class Server {
|
|
|
1402
1459
|
enum?: undefined;
|
|
1403
1460
|
}
|
|
1404
1461
|
)[];
|
|
1405
|
-
description: string
|
|
1462
|
+
description: string;
|
|
1406
1463
|
link: string;
|
|
1407
1464
|
};
|
|
1408
1465
|
AllowedHostsItem: {
|
|
@@ -1415,7 +1472,7 @@ declare class Server {
|
|
|
1415
1472
|
type: string;
|
|
1416
1473
|
cli: {
|
|
1417
1474
|
negatedDescription: string;
|
|
1418
|
-
}
|
|
1475
|
+
};
|
|
1419
1476
|
description?: undefined;
|
|
1420
1477
|
link?: undefined;
|
|
1421
1478
|
}
|
|
@@ -1423,11 +1480,11 @@ declare class Server {
|
|
|
1423
1480
|
type: string;
|
|
1424
1481
|
description: string;
|
|
1425
1482
|
link: string;
|
|
1426
|
-
cli?: undefined
|
|
1483
|
+
cli?: undefined;
|
|
1427
1484
|
}
|
|
1428
1485
|
)[];
|
|
1429
1486
|
description: string;
|
|
1430
|
-
link: string
|
|
1487
|
+
link: string /** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */;
|
|
1431
1488
|
};
|
|
1432
1489
|
Client: {
|
|
1433
1490
|
description: string;
|
|
@@ -1449,150 +1506,6 @@ declare class Server {
|
|
|
1449
1506
|
logging: {
|
|
1450
1507
|
$ref: string;
|
|
1451
1508
|
};
|
|
1452
|
-
/** @typedef {import("serve-static").ServeStaticOptions} ServeStaticOptions */
|
|
1453
|
-
/** @typedef {import("ipaddr.js").IPv4} IPv4 */
|
|
1454
|
-
/** @typedef {import("ipaddr.js").IPv6} IPv6 */
|
|
1455
|
-
/** @typedef {import("net").Socket} Socket */
|
|
1456
|
-
/** @typedef {import("http").IncomingMessage} IncomingMessage */
|
|
1457
|
-
/** @typedef {import("open").Options} OpenOptions */
|
|
1458
|
-
/** @typedef {import("https").ServerOptions & { spdy?: { plain?: boolean | undefined, ssl?: boolean | undefined, 'x-forwarded-for'?: string | undefined, protocol?: string | undefined, protocols?: string[] | undefined }}} ServerOptions */
|
|
1459
|
-
/**
|
|
1460
|
-
* @template Request, Response
|
|
1461
|
-
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
1462
|
-
*/
|
|
1463
|
-
/**
|
|
1464
|
-
* @template Request, Response
|
|
1465
|
-
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
1466
|
-
*/
|
|
1467
|
-
/**
|
|
1468
|
-
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
1469
|
-
*/
|
|
1470
|
-
/**
|
|
1471
|
-
* @typedef {number | string | "auto"} Port
|
|
1472
|
-
*/
|
|
1473
|
-
/**
|
|
1474
|
-
* @typedef {Object} WatchFiles
|
|
1475
|
-
* @property {string | string[]} paths
|
|
1476
|
-
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
1477
|
-
*/
|
|
1478
|
-
/**
|
|
1479
|
-
* @typedef {Object} Static
|
|
1480
|
-
* @property {string} [directory]
|
|
1481
|
-
* @property {string | string[]} [publicPath]
|
|
1482
|
-
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
1483
|
-
* @property {ServeStaticOptions} [staticOptions]
|
|
1484
|
-
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
1485
|
-
*/
|
|
1486
|
-
/**
|
|
1487
|
-
* @typedef {Object} NormalizedStatic
|
|
1488
|
-
* @property {string} directory
|
|
1489
|
-
* @property {string[]} publicPath
|
|
1490
|
-
* @property {false | ServeIndexOptions} serveIndex
|
|
1491
|
-
* @property {ServeStaticOptions} staticOptions
|
|
1492
|
-
* @property {false | WatchOptions} watch
|
|
1493
|
-
*/
|
|
1494
|
-
/**
|
|
1495
|
-
* @typedef {Object} ServerConfiguration
|
|
1496
|
-
* @property {"http" | "https" | "spdy" | string} [type]
|
|
1497
|
-
* @property {ServerOptions} [options]
|
|
1498
|
-
*/
|
|
1499
|
-
/**
|
|
1500
|
-
* @typedef {Object} WebSocketServerConfiguration
|
|
1501
|
-
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
1502
|
-
* @property {Record<string, any>} [options]
|
|
1503
|
-
*/
|
|
1504
|
-
/**
|
|
1505
|
-
* @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
|
|
1506
|
-
*/
|
|
1507
|
-
/**
|
|
1508
|
-
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
1509
|
-
*/
|
|
1510
|
-
/**
|
|
1511
|
-
* @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
|
|
1512
|
-
*/
|
|
1513
|
-
/**
|
|
1514
|
-
* @callback ByPass
|
|
1515
|
-
* @param {Request} req
|
|
1516
|
-
* @param {Response} res
|
|
1517
|
-
* @param {ProxyConfigArrayItem} proxyConfig
|
|
1518
|
-
*/
|
|
1519
|
-
/**
|
|
1520
|
-
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
1521
|
-
*/
|
|
1522
|
-
/**
|
|
1523
|
-
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
1524
|
-
*/
|
|
1525
|
-
/**
|
|
1526
|
-
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
1527
|
-
*/
|
|
1528
|
-
/**
|
|
1529
|
-
* @typedef {Object} OpenApp
|
|
1530
|
-
* @property {string} [name]
|
|
1531
|
-
* @property {string[]} [arguments]
|
|
1532
|
-
*/
|
|
1533
|
-
/**
|
|
1534
|
-
* @typedef {Object} Open
|
|
1535
|
-
* @property {string | string[] | OpenApp} [app]
|
|
1536
|
-
* @property {string | string[]} [target]
|
|
1537
|
-
*/
|
|
1538
|
-
/**
|
|
1539
|
-
* @typedef {Object} NormalizedOpen
|
|
1540
|
-
* @property {string} target
|
|
1541
|
-
* @property {import("open").Options} options
|
|
1542
|
-
*/
|
|
1543
|
-
/**
|
|
1544
|
-
* @typedef {Object} WebSocketURL
|
|
1545
|
-
* @property {string} [hostname]
|
|
1546
|
-
* @property {string} [password]
|
|
1547
|
-
* @property {string} [pathname]
|
|
1548
|
-
* @property {number | string} [port]
|
|
1549
|
-
* @property {string} [protocol]
|
|
1550
|
-
* @property {string} [username]
|
|
1551
|
-
*/
|
|
1552
|
-
/**
|
|
1553
|
-
* @typedef {Object} ClientConfiguration
|
|
1554
|
-
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1555
|
-
* @property {boolean | { warnings?: boolean, errors?: boolean, runtimeErrors?: boolean }} [overlay]
|
|
1556
|
-
* @property {boolean} [progress]
|
|
1557
|
-
* @property {boolean | number} [reconnect]
|
|
1558
|
-
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1559
|
-
* @property {string | WebSocketURL} [webSocketURL]
|
|
1560
|
-
*/
|
|
1561
|
-
/**
|
|
1562
|
-
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1563
|
-
*/
|
|
1564
|
-
/**
|
|
1565
|
-
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1566
|
-
*/
|
|
1567
|
-
/**
|
|
1568
|
-
* @typedef {Object} Configuration
|
|
1569
|
-
* @property {boolean | string} [ipc]
|
|
1570
|
-
* @property {Host} [host]
|
|
1571
|
-
* @property {Port} [port]
|
|
1572
|
-
* @property {boolean | "only"} [hot]
|
|
1573
|
-
* @property {boolean} [liveReload]
|
|
1574
|
-
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1575
|
-
* @property {boolean} [compress]
|
|
1576
|
-
* @property {boolean} [magicHtml]
|
|
1577
|
-
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1578
|
-
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1579
|
-
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1580
|
-
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1581
|
-
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1582
|
-
* @property {boolean | ServerOptions} [https]
|
|
1583
|
-
* @property {boolean} [http2]
|
|
1584
|
-
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1585
|
-
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1586
|
-
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1587
|
-
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1588
|
-
* @property {boolean} [setupExitSignals]
|
|
1589
|
-
* @property {boolean | ClientConfiguration} [client]
|
|
1590
|
-
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1591
|
-
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1592
|
-
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1593
|
-
* @property {(devServer: Server) => void} [onListening]
|
|
1594
|
-
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1595
|
-
*/
|
|
1596
1509
|
overlay: {
|
|
1597
1510
|
$ref: string;
|
|
1598
1511
|
};
|
|
@@ -1603,6 +1516,144 @@ declare class Server {
|
|
|
1603
1516
|
$ref: string;
|
|
1604
1517
|
};
|
|
1605
1518
|
webSocketTransport: {
|
|
1519
|
+
/** @typedef {import("https").ServerOptions & { spdy?: { plain?: boolean | undefined, ssl?: boolean | undefined, 'x-forwarded-for'?: string | undefined, protocol?: string | undefined, protocols?: string[] | undefined }}} ServerOptions */
|
|
1520
|
+
/**
|
|
1521
|
+
* @template Request, Response
|
|
1522
|
+
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
1523
|
+
*/
|
|
1524
|
+
/**
|
|
1525
|
+
* @template Request, Response
|
|
1526
|
+
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
1527
|
+
*/
|
|
1528
|
+
/**
|
|
1529
|
+
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
1530
|
+
*/
|
|
1531
|
+
/**
|
|
1532
|
+
* @typedef {number | string | "auto"} Port
|
|
1533
|
+
*/
|
|
1534
|
+
/**
|
|
1535
|
+
* @typedef {Object} WatchFiles
|
|
1536
|
+
* @property {string | string[]} paths
|
|
1537
|
+
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
1538
|
+
*/
|
|
1539
|
+
/**
|
|
1540
|
+
* @typedef {Object} Static
|
|
1541
|
+
* @property {string} [directory]
|
|
1542
|
+
* @property {string | string[]} [publicPath]
|
|
1543
|
+
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
1544
|
+
* @property {ServeStaticOptions} [staticOptions]
|
|
1545
|
+
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
1546
|
+
*/
|
|
1547
|
+
/**
|
|
1548
|
+
* @typedef {Object} NormalizedStatic
|
|
1549
|
+
* @property {string} directory
|
|
1550
|
+
* @property {string[]} publicPath
|
|
1551
|
+
* @property {false | ServeIndexOptions} serveIndex
|
|
1552
|
+
* @property {ServeStaticOptions} staticOptions
|
|
1553
|
+
* @property {false | WatchOptions} watch
|
|
1554
|
+
*/
|
|
1555
|
+
/**
|
|
1556
|
+
* @typedef {Object} ServerConfiguration
|
|
1557
|
+
* @property {"http" | "https" | "spdy" | string} [type]
|
|
1558
|
+
* @property {ServerOptions} [options]
|
|
1559
|
+
*/
|
|
1560
|
+
/**
|
|
1561
|
+
* @typedef {Object} WebSocketServerConfiguration
|
|
1562
|
+
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
1563
|
+
* @property {Record<string, any>} [options]
|
|
1564
|
+
*/
|
|
1565
|
+
/**
|
|
1566
|
+
* @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
|
|
1567
|
+
*/
|
|
1568
|
+
/**
|
|
1569
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
1570
|
+
*/
|
|
1571
|
+
/**
|
|
1572
|
+
* @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
|
|
1573
|
+
*/
|
|
1574
|
+
/**
|
|
1575
|
+
* @callback ByPass
|
|
1576
|
+
* @param {Request} req
|
|
1577
|
+
* @param {Response} res
|
|
1578
|
+
* @param {ProxyConfigArrayItem} proxyConfig
|
|
1579
|
+
*/
|
|
1580
|
+
/**
|
|
1581
|
+
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
1582
|
+
*/
|
|
1583
|
+
/**
|
|
1584
|
+
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
1585
|
+
*/
|
|
1586
|
+
/**
|
|
1587
|
+
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
1588
|
+
*/
|
|
1589
|
+
/**
|
|
1590
|
+
* @typedef {Object} OpenApp
|
|
1591
|
+
* @property {string} [name]
|
|
1592
|
+
* @property {string[]} [arguments]
|
|
1593
|
+
*/
|
|
1594
|
+
/**
|
|
1595
|
+
* @typedef {Object} Open
|
|
1596
|
+
* @property {string | string[] | OpenApp} [app]
|
|
1597
|
+
* @property {string | string[]} [target]
|
|
1598
|
+
*/
|
|
1599
|
+
/**
|
|
1600
|
+
* @typedef {Object} NormalizedOpen
|
|
1601
|
+
* @property {string} target
|
|
1602
|
+
* @property {import("open").Options} options
|
|
1603
|
+
*/
|
|
1604
|
+
/**
|
|
1605
|
+
* @typedef {Object} WebSocketURL
|
|
1606
|
+
* @property {string} [hostname]
|
|
1607
|
+
* @property {string} [password]
|
|
1608
|
+
* @property {string} [pathname]
|
|
1609
|
+
* @property {number | string} [port]
|
|
1610
|
+
* @property {string} [protocol]
|
|
1611
|
+
* @property {string} [username]
|
|
1612
|
+
*/
|
|
1613
|
+
/**
|
|
1614
|
+
* @typedef {Object} ClientConfiguration
|
|
1615
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1616
|
+
* @property {boolean | { warnings?: boolean, errors?: boolean, runtimeErrors?: boolean }} [overlay]
|
|
1617
|
+
* @property {boolean} [progress]
|
|
1618
|
+
* @property {boolean | number} [reconnect]
|
|
1619
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1620
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
1621
|
+
*/
|
|
1622
|
+
/**
|
|
1623
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1624
|
+
*/
|
|
1625
|
+
/**
|
|
1626
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1627
|
+
*/
|
|
1628
|
+
/**
|
|
1629
|
+
* @typedef {Object} Configuration
|
|
1630
|
+
* @property {boolean | string} [ipc]
|
|
1631
|
+
* @property {Host} [host]
|
|
1632
|
+
* @property {Port} [port]
|
|
1633
|
+
* @property {boolean | "only"} [hot]
|
|
1634
|
+
* @property {boolean} [liveReload]
|
|
1635
|
+
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1636
|
+
* @property {boolean} [compress]
|
|
1637
|
+
* @property {boolean} [magicHtml]
|
|
1638
|
+
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1639
|
+
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1640
|
+
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1641
|
+
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1642
|
+
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1643
|
+
* @property {boolean | ServerOptions} [https]
|
|
1644
|
+
* @property {boolean} [http2]
|
|
1645
|
+
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1646
|
+
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1647
|
+
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1648
|
+
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1649
|
+
* @property {boolean} [setupExitSignals]
|
|
1650
|
+
* @property {boolean | ClientConfiguration} [client]
|
|
1651
|
+
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1652
|
+
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1653
|
+
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1654
|
+
* @property {(devServer: Server) => void} [onListening]
|
|
1655
|
+
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1656
|
+
*/
|
|
1606
1657
|
$ref: string;
|
|
1607
1658
|
};
|
|
1608
1659
|
webSocketURL: {
|
|
@@ -1610,11 +1661,148 @@ declare class Server {
|
|
|
1610
1661
|
};
|
|
1611
1662
|
};
|
|
1612
1663
|
enum?: undefined;
|
|
1613
|
-
cli?: undefined
|
|
1664
|
+
cli?: undefined;
|
|
1614
1665
|
}
|
|
1615
1666
|
)[];
|
|
1616
1667
|
};
|
|
1617
1668
|
ClientLogging: {
|
|
1669
|
+
/**
|
|
1670
|
+
* @template Request, Response
|
|
1671
|
+
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
1672
|
+
*/
|
|
1673
|
+
/**
|
|
1674
|
+
* @template Request, Response
|
|
1675
|
+
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
1676
|
+
*/
|
|
1677
|
+
/**
|
|
1678
|
+
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
1679
|
+
*/
|
|
1680
|
+
/**
|
|
1681
|
+
* @typedef {number | string | "auto"} Port
|
|
1682
|
+
*/
|
|
1683
|
+
/**
|
|
1684
|
+
* @typedef {Object} WatchFiles
|
|
1685
|
+
* @property {string | string[]} paths
|
|
1686
|
+
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
1687
|
+
*/
|
|
1688
|
+
/**
|
|
1689
|
+
* @typedef {Object} Static
|
|
1690
|
+
* @property {string} [directory]
|
|
1691
|
+
* @property {string | string[]} [publicPath]
|
|
1692
|
+
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
1693
|
+
* @property {ServeStaticOptions} [staticOptions]
|
|
1694
|
+
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
1695
|
+
*/
|
|
1696
|
+
/**
|
|
1697
|
+
* @typedef {Object} NormalizedStatic
|
|
1698
|
+
* @property {string} directory
|
|
1699
|
+
* @property {string[]} publicPath
|
|
1700
|
+
* @property {false | ServeIndexOptions} serveIndex
|
|
1701
|
+
* @property {ServeStaticOptions} staticOptions
|
|
1702
|
+
* @property {false | WatchOptions} watch
|
|
1703
|
+
*/
|
|
1704
|
+
/**
|
|
1705
|
+
* @typedef {Object} ServerConfiguration
|
|
1706
|
+
* @property {"http" | "https" | "spdy" | string} [type]
|
|
1707
|
+
* @property {ServerOptions} [options]
|
|
1708
|
+
*/
|
|
1709
|
+
/**
|
|
1710
|
+
* @typedef {Object} WebSocketServerConfiguration
|
|
1711
|
+
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
1712
|
+
* @property {Record<string, any>} [options]
|
|
1713
|
+
*/
|
|
1714
|
+
/**
|
|
1715
|
+
* @typedef {(import("ws").WebSocket | import("sockjs").Connection & { send: import("ws").WebSocket["send"], terminate: import("ws").WebSocket["terminate"], ping: import("ws").WebSocket["ping"] }) & { isAlive?: boolean }} ClientConnection
|
|
1716
|
+
*/
|
|
1717
|
+
/**
|
|
1718
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
1719
|
+
*/
|
|
1720
|
+
/**
|
|
1721
|
+
* @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
|
|
1722
|
+
*/
|
|
1723
|
+
/**
|
|
1724
|
+
* @callback ByPass
|
|
1725
|
+
* @param {Request} req
|
|
1726
|
+
* @param {Response} res
|
|
1727
|
+
* @param {ProxyConfigArrayItem} proxyConfig
|
|
1728
|
+
*/
|
|
1729
|
+
/**
|
|
1730
|
+
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
1731
|
+
*/
|
|
1732
|
+
/**
|
|
1733
|
+
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
1734
|
+
*/
|
|
1735
|
+
/**
|
|
1736
|
+
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
1737
|
+
*/
|
|
1738
|
+
/**
|
|
1739
|
+
* @typedef {Object} OpenApp
|
|
1740
|
+
* @property {string} [name]
|
|
1741
|
+
* @property {string[]} [arguments]
|
|
1742
|
+
*/
|
|
1743
|
+
/**
|
|
1744
|
+
* @typedef {Object} Open
|
|
1745
|
+
* @property {string | string[] | OpenApp} [app]
|
|
1746
|
+
* @property {string | string[]} [target]
|
|
1747
|
+
*/
|
|
1748
|
+
/**
|
|
1749
|
+
* @typedef {Object} NormalizedOpen
|
|
1750
|
+
* @property {string} target
|
|
1751
|
+
* @property {import("open").Options} options
|
|
1752
|
+
*/
|
|
1753
|
+
/**
|
|
1754
|
+
* @typedef {Object} WebSocketURL
|
|
1755
|
+
* @property {string} [hostname]
|
|
1756
|
+
* @property {string} [password]
|
|
1757
|
+
* @property {string} [pathname]
|
|
1758
|
+
* @property {number | string} [port]
|
|
1759
|
+
* @property {string} [protocol]
|
|
1760
|
+
* @property {string} [username]
|
|
1761
|
+
*/
|
|
1762
|
+
/**
|
|
1763
|
+
* @typedef {Object} ClientConfiguration
|
|
1764
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1765
|
+
* @property {boolean | { warnings?: boolean, errors?: boolean, runtimeErrors?: boolean }} [overlay]
|
|
1766
|
+
* @property {boolean} [progress]
|
|
1767
|
+
* @property {boolean | number} [reconnect]
|
|
1768
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1769
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
1770
|
+
*/
|
|
1771
|
+
/**
|
|
1772
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1773
|
+
*/
|
|
1774
|
+
/**
|
|
1775
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1776
|
+
*/
|
|
1777
|
+
/**
|
|
1778
|
+
* @typedef {Object} Configuration
|
|
1779
|
+
* @property {boolean | string} [ipc]
|
|
1780
|
+
* @property {Host} [host]
|
|
1781
|
+
* @property {Port} [port]
|
|
1782
|
+
* @property {boolean | "only"} [hot]
|
|
1783
|
+
* @property {boolean} [liveReload]
|
|
1784
|
+
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1785
|
+
* @property {boolean} [compress]
|
|
1786
|
+
* @property {boolean} [magicHtml]
|
|
1787
|
+
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1788
|
+
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1789
|
+
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1790
|
+
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1791
|
+
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1792
|
+
* @property {boolean | ServerOptions} [https]
|
|
1793
|
+
* @property {boolean} [http2]
|
|
1794
|
+
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1795
|
+
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1796
|
+
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1797
|
+
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1798
|
+
* @property {boolean} [setupExitSignals]
|
|
1799
|
+
* @property {boolean | ClientConfiguration} [client]
|
|
1800
|
+
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1801
|
+
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1802
|
+
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1803
|
+
* @property {(devServer: Server) => void} [onListening]
|
|
1804
|
+
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1805
|
+
*/
|
|
1618
1806
|
enum: string[];
|
|
1619
1807
|
description: string;
|
|
1620
1808
|
link: string;
|
|
@@ -1663,7 +1851,7 @@ declare class Server {
|
|
|
1663
1851
|
};
|
|
1664
1852
|
description?: undefined;
|
|
1665
1853
|
link?: undefined;
|
|
1666
|
-
cli?: undefined
|
|
1854
|
+
cli?: undefined;
|
|
1667
1855
|
}
|
|
1668
1856
|
)[];
|
|
1669
1857
|
};
|
|
@@ -1681,11 +1869,6 @@ declare class Server {
|
|
|
1681
1869
|
anyOf: (
|
|
1682
1870
|
| {
|
|
1683
1871
|
type: string;
|
|
1684
|
-
/**
|
|
1685
|
-
* @typedef {Object} OpenApp
|
|
1686
|
-
* @property {string} [name]
|
|
1687
|
-
* @property {string[]} [arguments]
|
|
1688
|
-
*/
|
|
1689
1872
|
/**
|
|
1690
1873
|
* @typedef {Object} Open
|
|
1691
1874
|
* @property {string | string[] | OpenApp} [app]
|
|
@@ -1757,7 +1940,7 @@ declare class Server {
|
|
|
1757
1940
|
| {
|
|
1758
1941
|
type: string;
|
|
1759
1942
|
minimum: number;
|
|
1760
|
-
cli?: undefined
|
|
1943
|
+
cli?: undefined;
|
|
1761
1944
|
}
|
|
1762
1945
|
)[];
|
|
1763
1946
|
};
|
|
@@ -1787,35 +1970,6 @@ declare class Server {
|
|
|
1787
1970
|
}
|
|
1788
1971
|
| {
|
|
1789
1972
|
type: string;
|
|
1790
|
-
/**
|
|
1791
|
-
* @typedef {Object} Configuration
|
|
1792
|
-
* @property {boolean | string} [ipc]
|
|
1793
|
-
* @property {Host} [host]
|
|
1794
|
-
* @property {Port} [port]
|
|
1795
|
-
* @property {boolean | "only"} [hot]
|
|
1796
|
-
* @property {boolean} [liveReload]
|
|
1797
|
-
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1798
|
-
* @property {boolean} [compress]
|
|
1799
|
-
* @property {boolean} [magicHtml]
|
|
1800
|
-
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1801
|
-
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1802
|
-
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1803
|
-
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1804
|
-
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1805
|
-
* @property {boolean | ServerOptions} [https]
|
|
1806
|
-
* @property {boolean} [http2]
|
|
1807
|
-
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1808
|
-
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1809
|
-
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1810
|
-
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1811
|
-
* @property {boolean} [setupExitSignals]
|
|
1812
|
-
* @property {boolean | ClientConfiguration} [client]
|
|
1813
|
-
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1814
|
-
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1815
|
-
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1816
|
-
* @property {(devServer: Server) => void} [onListening]
|
|
1817
|
-
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1818
|
-
*/
|
|
1819
1973
|
additionalProperties: boolean;
|
|
1820
1974
|
properties: {
|
|
1821
1975
|
hostname: {
|
|
@@ -2116,7 +2270,7 @@ declare class Server {
|
|
|
2116
2270
|
description: string;
|
|
2117
2271
|
};
|
|
2118
2272
|
};
|
|
2119
|
-
cli?: undefined
|
|
2273
|
+
cli?: undefined;
|
|
2120
2274
|
}
|
|
2121
2275
|
)[];
|
|
2122
2276
|
description: string;
|
|
@@ -2172,16 +2326,14 @@ declare class Server {
|
|
|
2172
2326
|
cli: {
|
|
2173
2327
|
negatedDescription: string;
|
|
2174
2328
|
};
|
|
2175
|
-
|
|
2329
|
+
description?: undefined;
|
|
2176
2330
|
link?: undefined;
|
|
2177
2331
|
}
|
|
2178
2332
|
| {
|
|
2179
2333
|
type: string;
|
|
2180
|
-
/** @type {ClientConfiguration} */
|
|
2181
2334
|
description: string;
|
|
2182
2335
|
link: string;
|
|
2183
|
-
|
|
2184
|
-
cli?: undefined /** @typedef {import("express").Request} Request */;
|
|
2336
|
+
cli?: undefined;
|
|
2185
2337
|
}
|
|
2186
2338
|
)[];
|
|
2187
2339
|
description: string;
|
|
@@ -2215,7 +2367,7 @@ declare class Server {
|
|
|
2215
2367
|
| {
|
|
2216
2368
|
enum: string[];
|
|
2217
2369
|
type?: undefined;
|
|
2218
|
-
cli?: undefined
|
|
2370
|
+
cli?: undefined;
|
|
2219
2371
|
}
|
|
2220
2372
|
)[];
|
|
2221
2373
|
description: string;
|
|
@@ -2266,7 +2418,7 @@ declare class Server {
|
|
|
2266
2418
|
OnListening: {
|
|
2267
2419
|
instanceof: string;
|
|
2268
2420
|
description: string;
|
|
2269
|
-
|
|
2421
|
+
link: string;
|
|
2270
2422
|
};
|
|
2271
2423
|
Open: {
|
|
2272
2424
|
anyOf: (
|
|
@@ -2281,7 +2433,7 @@ declare class Server {
|
|
|
2281
2433
|
}
|
|
2282
2434
|
| {
|
|
2283
2435
|
$ref: string;
|
|
2284
|
-
type?: undefined;
|
|
2436
|
+
/** @type {string} */ type?: undefined;
|
|
2285
2437
|
items?: undefined;
|
|
2286
2438
|
}
|
|
2287
2439
|
)[];
|
|
@@ -2347,7 +2499,7 @@ declare class Server {
|
|
|
2347
2499
|
};
|
|
2348
2500
|
minLength?: undefined;
|
|
2349
2501
|
description?: undefined;
|
|
2350
|
-
cli?: undefined
|
|
2502
|
+
cli?: undefined;
|
|
2351
2503
|
}
|
|
2352
2504
|
| {
|
|
2353
2505
|
type: string;
|
|
@@ -2418,7 +2570,7 @@ declare class Server {
|
|
|
2418
2570
|
}
|
|
2419
2571
|
)[];
|
|
2420
2572
|
description: string;
|
|
2421
|
-
link: string;
|
|
2573
|
+
/** @type {Object<string,string>} */ link: string;
|
|
2422
2574
|
};
|
|
2423
2575
|
Server: {
|
|
2424
2576
|
anyOf: {
|
|
@@ -2596,10 +2748,6 @@ declare class Server {
|
|
|
2596
2748
|
)[];
|
|
2597
2749
|
description: string;
|
|
2598
2750
|
};
|
|
2599
|
-
/**
|
|
2600
|
-
* @param {string | Static | undefined} [optionsForStatic]
|
|
2601
|
-
* @returns {NormalizedStatic}
|
|
2602
|
-
*/
|
|
2603
2751
|
key: {
|
|
2604
2752
|
anyOf: (
|
|
2605
2753
|
| {
|
|
@@ -2621,7 +2769,7 @@ declare class Server {
|
|
|
2621
2769
|
additionalProperties: boolean;
|
|
2622
2770
|
instanceof?: undefined;
|
|
2623
2771
|
}
|
|
2624
|
-
)[]
|
|
2772
|
+
)[];
|
|
2625
2773
|
};
|
|
2626
2774
|
instanceof?: undefined;
|
|
2627
2775
|
}
|
|
@@ -2700,7 +2848,7 @@ declare class Server {
|
|
|
2700
2848
|
$ref: string;
|
|
2701
2849
|
}[];
|
|
2702
2850
|
};
|
|
2703
|
-
cli?: undefined
|
|
2851
|
+
cli?: undefined;
|
|
2704
2852
|
$ref?: undefined;
|
|
2705
2853
|
}
|
|
2706
2854
|
| {
|
|
@@ -2715,7 +2863,7 @@ declare class Server {
|
|
|
2715
2863
|
$ref: string;
|
|
2716
2864
|
type?: undefined;
|
|
2717
2865
|
items?: undefined;
|
|
2718
|
-
cli?: undefined
|
|
2866
|
+
cli?: undefined;
|
|
2719
2867
|
}
|
|
2720
2868
|
)[];
|
|
2721
2869
|
description: string;
|
|
@@ -2766,7 +2914,7 @@ declare class Server {
|
|
|
2766
2914
|
| {
|
|
2767
2915
|
type: string;
|
|
2768
2916
|
additionalProperties: boolean;
|
|
2769
|
-
cli?: undefined
|
|
2917
|
+
cli?: undefined;
|
|
2770
2918
|
}
|
|
2771
2919
|
)[];
|
|
2772
2920
|
description: string;
|
|
@@ -2786,7 +2934,7 @@ declare class Server {
|
|
|
2786
2934
|
type: string;
|
|
2787
2935
|
description: string;
|
|
2788
2936
|
link: string;
|
|
2789
|
-
cli?: undefined
|
|
2937
|
+
cli?: undefined;
|
|
2790
2938
|
}
|
|
2791
2939
|
)[];
|
|
2792
2940
|
description: string;
|
|
@@ -2877,7 +3025,7 @@ declare class Server {
|
|
|
2877
3025
|
| {
|
|
2878
3026
|
$ref: string;
|
|
2879
3027
|
enum?: undefined;
|
|
2880
|
-
cli?: undefined
|
|
3028
|
+
cli?: undefined;
|
|
2881
3029
|
}
|
|
2882
3030
|
)[];
|
|
2883
3031
|
cli: {
|
|
@@ -2911,6 +3059,7 @@ declare class Server {
|
|
|
2911
3059
|
};
|
|
2912
3060
|
};
|
|
2913
3061
|
additionalProperties: boolean;
|
|
3062
|
+
/** @type {ServerOptions} */
|
|
2914
3063
|
properties: {
|
|
2915
3064
|
allowedHosts: {
|
|
2916
3065
|
$ref: string;
|
|
@@ -2920,10 +3069,6 @@ declare class Server {
|
|
|
2920
3069
|
};
|
|
2921
3070
|
client: {
|
|
2922
3071
|
$ref: string;
|
|
2923
|
-
/**
|
|
2924
|
-
* @param {string | Buffer | undefined} item
|
|
2925
|
-
* @returns {string | Buffer | undefined}
|
|
2926
|
-
*/
|
|
2927
3072
|
};
|
|
2928
3073
|
compress: {
|
|
2929
3074
|
$ref: string;
|
|
@@ -2965,7 +3110,7 @@ declare class Server {
|
|
|
2965
3110
|
$ref: string;
|
|
2966
3111
|
};
|
|
2967
3112
|
onListening: {
|
|
2968
|
-
$ref: string
|
|
3113
|
+
$ref: string;
|
|
2969
3114
|
};
|
|
2970
3115
|
open: {
|
|
2971
3116
|
$ref: string;
|
|
@@ -2976,6 +3121,7 @@ declare class Server {
|
|
|
2976
3121
|
proxy: {
|
|
2977
3122
|
$ref: string;
|
|
2978
3123
|
};
|
|
3124
|
+
/** @type {any} */
|
|
2979
3125
|
server: {
|
|
2980
3126
|
$ref: string;
|
|
2981
3127
|
};
|
|
@@ -3148,14 +3294,14 @@ declare class Server {
|
|
|
3148
3294
|
private setupDevMiddleware;
|
|
3149
3295
|
middleware:
|
|
3150
3296
|
| import("webpack-dev-middleware").API<
|
|
3151
|
-
express.Request<
|
|
3297
|
+
import("express").Request<
|
|
3152
3298
|
import("express-serve-static-core").ParamsDictionary,
|
|
3153
3299
|
any,
|
|
3154
3300
|
any,
|
|
3155
3301
|
qs.ParsedQs,
|
|
3156
3302
|
Record<string, any>
|
|
3157
3303
|
>,
|
|
3158
|
-
express.Response<any, Record<string, any>>
|
|
3304
|
+
import("express").Response<any, Record<string, any>>
|
|
3159
3305
|
>
|
|
3160
3306
|
| null
|
|
3161
3307
|
| undefined;
|
|
@@ -3371,14 +3517,14 @@ type Configuration = {
|
|
|
3371
3517
|
liveReload?: boolean | undefined;
|
|
3372
3518
|
devMiddleware?:
|
|
3373
3519
|
| DevMiddlewareOptions<
|
|
3374
|
-
express.Request<
|
|
3520
|
+
import("express").Request<
|
|
3375
3521
|
import("express-serve-static-core").ParamsDictionary,
|
|
3376
3522
|
any,
|
|
3377
3523
|
any,
|
|
3378
3524
|
qs.ParsedQs,
|
|
3379
3525
|
Record<string, any>
|
|
3380
3526
|
>,
|
|
3381
|
-
express.Response<any, Record<string, any>>
|
|
3527
|
+
import("express").Response<any, Record<string, any>>
|
|
3382
3528
|
>
|
|
3383
3529
|
| undefined;
|
|
3384
3530
|
compress?: boolean | undefined;
|
|
@@ -3425,7 +3571,6 @@ type Configuration = {
|
|
|
3425
3571
|
};
|
|
3426
3572
|
type FSWatcher = import("chokidar").FSWatcher;
|
|
3427
3573
|
type Socket = import("net").Socket;
|
|
3428
|
-
import express = require("express");
|
|
3429
3574
|
type WebSocketServerImplementation = {
|
|
3430
3575
|
implementation: WebSocketServer;
|
|
3431
3576
|
clients: ClientConnection[];
|