webpack-dev-server 4.13.1 → 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 +40 -12
- package/package.json +1 -1
- package/types/lib/Server.d.ts +535 -407
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 */
|
|
@@ -162,7 +321,6 @@ declare class Server {
|
|
|
162
321
|
* @property {boolean} [magicHtml]
|
|
163
322
|
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
164
323
|
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
165
|
-
* @property {boolean} [setupExitSignals]
|
|
166
324
|
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
167
325
|
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
168
326
|
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
@@ -180,12 +338,39 @@ declare class Server {
|
|
|
180
338
|
* @property {(devServer: Server) => void} [onListening]
|
|
181
339
|
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
182
340
|
*/
|
|
341
|
+
description: string;
|
|
342
|
+
simpleType: string;
|
|
183
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;
|
|
184
354
|
simpleType: string;
|
|
355
|
+
multiple: boolean;
|
|
185
356
|
};
|
|
186
|
-
|
|
357
|
+
client: {
|
|
187
358
|
configs: {
|
|
359
|
+
description: string;
|
|
360
|
+
negatedDescription: string;
|
|
361
|
+
multiple: boolean;
|
|
362
|
+
path: string;
|
|
188
363
|
type: string;
|
|
364
|
+
values: boolean[];
|
|
365
|
+
}[];
|
|
366
|
+
description: string;
|
|
367
|
+
multiple: boolean;
|
|
368
|
+
simpleType: string;
|
|
369
|
+
};
|
|
370
|
+
"client-logging": {
|
|
371
|
+
configs: {
|
|
372
|
+
type: string;
|
|
373
|
+
values: string[];
|
|
189
374
|
multiple: boolean;
|
|
190
375
|
description: string;
|
|
191
376
|
path: string;
|
|
@@ -194,7 +379,7 @@ declare class Server {
|
|
|
194
379
|
simpleType: string;
|
|
195
380
|
multiple: boolean;
|
|
196
381
|
};
|
|
197
|
-
|
|
382
|
+
"client-overlay": {
|
|
198
383
|
configs: {
|
|
199
384
|
type: string;
|
|
200
385
|
multiple: boolean;
|
|
@@ -206,65 +391,21 @@ declare class Server {
|
|
|
206
391
|
simpleType: string;
|
|
207
392
|
multiple: boolean;
|
|
208
393
|
};
|
|
209
|
-
client: {
|
|
394
|
+
"client-overlay-errors": {
|
|
210
395
|
configs: {
|
|
396
|
+
type: string;
|
|
397
|
+
multiple: boolean;
|
|
211
398
|
description: string;
|
|
399
|
+
/**
|
|
400
|
+
* @typedef {Object} ServerConfiguration
|
|
401
|
+
* @property {"http" | "https" | "spdy" | string} [type]
|
|
402
|
+
* @property {ServerOptions} [options]
|
|
403
|
+
*/
|
|
212
404
|
negatedDescription: string;
|
|
213
|
-
multiple: boolean;
|
|
214
405
|
path: string;
|
|
215
|
-
type: string;
|
|
216
|
-
values: boolean[];
|
|
217
406
|
}[];
|
|
218
407
|
description: string;
|
|
219
|
-
multiple: boolean;
|
|
220
408
|
simpleType: string;
|
|
221
|
-
};
|
|
222
|
-
"client-logging": {
|
|
223
|
-
/**
|
|
224
|
-
* @template Request, Response
|
|
225
|
-
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
226
|
-
*/
|
|
227
|
-
/**
|
|
228
|
-
* @template Request, Response
|
|
229
|
-
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
230
|
-
*/
|
|
231
|
-
/**
|
|
232
|
-
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
233
|
-
*/
|
|
234
|
-
/**
|
|
235
|
-
* @typedef {number | string | "auto"} Port
|
|
236
|
-
*/
|
|
237
|
-
/**
|
|
238
|
-
* @typedef {Object} WatchFiles
|
|
239
|
-
* @property {string | string[]} paths
|
|
240
|
-
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
241
|
-
*/
|
|
242
|
-
/**
|
|
243
|
-
* @typedef {Object} Static
|
|
244
|
-
* @property {string} [directory]
|
|
245
|
-
* @property {string | string[]} [publicPath]
|
|
246
|
-
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
247
|
-
* @property {ServeStaticOptions} [staticOptions]
|
|
248
|
-
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
249
|
-
*/
|
|
250
|
-
/**
|
|
251
|
-
* @typedef {Object} NormalizedStatic
|
|
252
|
-
* @property {string} directory
|
|
253
|
-
* @property {string[]} publicPath
|
|
254
|
-
* @property {false | ServeIndexOptions} serveIndex
|
|
255
|
-
* @property {ServeStaticOptions} staticOptions
|
|
256
|
-
* @property {false | WatchOptions} watch
|
|
257
|
-
*/
|
|
258
|
-
/**
|
|
259
|
-
* @typedef {Object} ServerConfiguration
|
|
260
|
-
* @property {"http" | "https" | "spdy" | string} [type]
|
|
261
|
-
* @property {ServerOptions} [options]
|
|
262
|
-
*/
|
|
263
|
-
/**
|
|
264
|
-
* @typedef {Object} WebSocketServerConfiguration
|
|
265
|
-
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
266
|
-
* @property {Record<string, any>} [options]
|
|
267
|
-
*/
|
|
268
409
|
/**
|
|
269
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
|
|
270
411
|
*/
|
|
@@ -340,7 +481,6 @@ declare class Server {
|
|
|
340
481
|
* @property {boolean} [magicHtml]
|
|
341
482
|
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
342
483
|
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
343
|
-
* @property {boolean} [setupExitSignals]
|
|
344
484
|
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
345
485
|
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
346
486
|
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
@@ -358,45 +498,15 @@ declare class Server {
|
|
|
358
498
|
* @property {(devServer: Server) => void} [onListening]
|
|
359
499
|
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
360
500
|
*/
|
|
361
|
-
configs: {
|
|
362
|
-
type: string;
|
|
363
|
-
values: string[];
|
|
364
|
-
multiple: boolean;
|
|
365
|
-
description: string;
|
|
366
|
-
path: string;
|
|
367
|
-
}[];
|
|
368
|
-
description: string;
|
|
369
|
-
simpleType: string;
|
|
370
|
-
multiple: boolean;
|
|
371
|
-
};
|
|
372
|
-
"client-overlay": {
|
|
373
|
-
configs: {
|
|
374
|
-
type: string;
|
|
375
|
-
multiple: boolean;
|
|
376
|
-
description: string;
|
|
377
|
-
negatedDescription: string;
|
|
378
|
-
path: string;
|
|
379
|
-
}[];
|
|
380
|
-
description: string;
|
|
381
|
-
simpleType: string;
|
|
382
|
-
multiple: boolean;
|
|
383
|
-
};
|
|
384
|
-
"client-overlay-errors": {
|
|
385
|
-
configs: {
|
|
386
|
-
type: string;
|
|
387
|
-
multiple: boolean;
|
|
388
|
-
description: string;
|
|
389
|
-
negatedDescription: string;
|
|
390
|
-
path: string;
|
|
391
|
-
}[];
|
|
392
|
-
description: string;
|
|
393
|
-
simpleType: string;
|
|
394
501
|
multiple: boolean;
|
|
395
502
|
};
|
|
396
503
|
"client-overlay-trusted-types-policy-name": {
|
|
397
504
|
configs: {
|
|
398
505
|
description: string;
|
|
399
506
|
multiple: boolean;
|
|
507
|
+
/**
|
|
508
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
509
|
+
*/
|
|
400
510
|
path: string;
|
|
401
511
|
type: string;
|
|
402
512
|
}[];
|
|
@@ -421,70 +531,6 @@ declare class Server {
|
|
|
421
531
|
type: string;
|
|
422
532
|
multiple: boolean;
|
|
423
533
|
description: string;
|
|
424
|
-
/**
|
|
425
|
-
* @typedef {Object} Open
|
|
426
|
-
* @property {string | string[] | OpenApp} [app]
|
|
427
|
-
* @property {string | string[]} [target]
|
|
428
|
-
*/
|
|
429
|
-
/**
|
|
430
|
-
* @typedef {Object} NormalizedOpen
|
|
431
|
-
* @property {string} target
|
|
432
|
-
* @property {import("open").Options} options
|
|
433
|
-
*/
|
|
434
|
-
/**
|
|
435
|
-
* @typedef {Object} WebSocketURL
|
|
436
|
-
* @property {string} [hostname]
|
|
437
|
-
* @property {string} [password]
|
|
438
|
-
* @property {string} [pathname]
|
|
439
|
-
* @property {number | string} [port]
|
|
440
|
-
* @property {string} [protocol]
|
|
441
|
-
* @property {string} [username]
|
|
442
|
-
*/
|
|
443
|
-
/**
|
|
444
|
-
* @typedef {Object} ClientConfiguration
|
|
445
|
-
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
446
|
-
* @property {boolean | { warnings?: boolean, errors?: boolean, runtimeErrors?: boolean }} [overlay]
|
|
447
|
-
* @property {boolean} [progress]
|
|
448
|
-
* @property {boolean | number} [reconnect]
|
|
449
|
-
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
450
|
-
* @property {string | WebSocketURL} [webSocketURL]
|
|
451
|
-
*/
|
|
452
|
-
/**
|
|
453
|
-
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
454
|
-
*/
|
|
455
|
-
/**
|
|
456
|
-
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
457
|
-
*/
|
|
458
|
-
/**
|
|
459
|
-
* @typedef {Object} Configuration
|
|
460
|
-
* @property {boolean | string} [ipc]
|
|
461
|
-
* @property {Host} [host]
|
|
462
|
-
* @property {Port} [port]
|
|
463
|
-
* @property {boolean | "only"} [hot]
|
|
464
|
-
* @property {boolean} [liveReload]
|
|
465
|
-
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
466
|
-
* @property {boolean} [compress]
|
|
467
|
-
* @property {boolean} [magicHtml]
|
|
468
|
-
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
469
|
-
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
470
|
-
* @property {boolean} [setupExitSignals]
|
|
471
|
-
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
472
|
-
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
473
|
-
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
474
|
-
* @property {boolean | ServerOptions} [https]
|
|
475
|
-
* @property {boolean} [http2]
|
|
476
|
-
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
477
|
-
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
478
|
-
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
479
|
-
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
480
|
-
* @property {boolean} [setupExitSignals]
|
|
481
|
-
* @property {boolean | ClientConfiguration} [client]
|
|
482
|
-
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
483
|
-
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
484
|
-
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
485
|
-
* @property {(devServer: Server) => void} [onListening]
|
|
486
|
-
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
487
|
-
*/
|
|
488
534
|
negatedDescription: string;
|
|
489
535
|
path: string;
|
|
490
536
|
}[];
|
|
@@ -504,6 +550,9 @@ declare class Server {
|
|
|
504
550
|
simpleType: string;
|
|
505
551
|
multiple: boolean;
|
|
506
552
|
};
|
|
553
|
+
/**
|
|
554
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
555
|
+
*/
|
|
507
556
|
"client-reconnect": {
|
|
508
557
|
configs: (
|
|
509
558
|
| {
|
|
@@ -561,11 +610,7 @@ declare class Server {
|
|
|
561
610
|
multiple: boolean;
|
|
562
611
|
description: string;
|
|
563
612
|
path: string;
|
|
564
|
-
}[];
|
|
565
|
-
/**
|
|
566
|
-
* @param {Configuration | Compiler | MultiCompiler} options
|
|
567
|
-
* @param {Compiler | MultiCompiler | Configuration} compiler
|
|
568
|
-
*/
|
|
613
|
+
}[];
|
|
569
614
|
description: string;
|
|
570
615
|
simpleType: string;
|
|
571
616
|
multiple: boolean;
|
|
@@ -591,31 +636,32 @@ declare class Server {
|
|
|
591
636
|
description: string;
|
|
592
637
|
simpleType: string;
|
|
593
638
|
multiple: boolean;
|
|
594
|
-
/**
|
|
595
|
-
* @type {FSWatcher[]}
|
|
596
|
-
*/
|
|
597
639
|
};
|
|
598
640
|
"client-web-socket-url-port": {
|
|
599
641
|
configs: {
|
|
600
642
|
type: string;
|
|
601
643
|
multiple: boolean;
|
|
602
644
|
description: string;
|
|
603
|
-
/**
|
|
604
|
-
* @private
|
|
605
|
-
* @type {RequestHandler[]}
|
|
606
|
-
*/
|
|
607
645
|
path: string;
|
|
608
646
|
}[];
|
|
609
647
|
description: string;
|
|
610
648
|
simpleType: string;
|
|
611
649
|
multiple: boolean;
|
|
612
650
|
};
|
|
651
|
+
/**
|
|
652
|
+
* @private
|
|
653
|
+
* @type {RequestHandler[]}
|
|
654
|
+
*/
|
|
613
655
|
"client-web-socket-url-protocol": {
|
|
614
656
|
configs: (
|
|
615
657
|
| {
|
|
616
658
|
description: string;
|
|
617
659
|
multiple: boolean;
|
|
618
660
|
path: string;
|
|
661
|
+
/**
|
|
662
|
+
* @private
|
|
663
|
+
* @type {string | undefined}
|
|
664
|
+
*/
|
|
619
665
|
type: string;
|
|
620
666
|
values: string[];
|
|
621
667
|
}
|
|
@@ -763,16 +809,18 @@ declare class Server {
|
|
|
763
809
|
simpleType: string;
|
|
764
810
|
multiple: boolean;
|
|
765
811
|
};
|
|
812
|
+
/**
|
|
813
|
+
* @type {string[]}
|
|
814
|
+
*/
|
|
766
815
|
"https-cacert-reset": {
|
|
767
816
|
configs: {
|
|
768
817
|
description: string;
|
|
769
818
|
multiple: boolean;
|
|
770
819
|
path: string;
|
|
771
|
-
type: string;
|
|
820
|
+
/** @type {WebSocketURL} */ type: string;
|
|
772
821
|
}[];
|
|
773
822
|
description: string;
|
|
774
823
|
multiple: boolean;
|
|
775
|
-
/** @type {ServerConfiguration} */
|
|
776
824
|
simpleType: string;
|
|
777
825
|
};
|
|
778
826
|
"https-cert": {
|
|
@@ -783,7 +831,7 @@ declare class Server {
|
|
|
783
831
|
path: string;
|
|
784
832
|
}[];
|
|
785
833
|
description: string;
|
|
786
|
-
|
|
834
|
+
simpleType: string;
|
|
787
835
|
multiple: boolean;
|
|
788
836
|
};
|
|
789
837
|
"https-cert-reset": {
|
|
@@ -899,6 +947,12 @@ declare class Server {
|
|
|
899
947
|
values: boolean[];
|
|
900
948
|
multiple: boolean;
|
|
901
949
|
description: string;
|
|
950
|
+
/**
|
|
951
|
+
* prependEntry Method for webpack 4
|
|
952
|
+
* @param {any} originalEntry
|
|
953
|
+
* @param {any} newAdditionalEntries
|
|
954
|
+
* @returns {any}
|
|
955
|
+
*/
|
|
902
956
|
path: string;
|
|
903
957
|
}
|
|
904
958
|
)[];
|
|
@@ -906,7 +960,6 @@ declare class Server {
|
|
|
906
960
|
simpleType: string;
|
|
907
961
|
multiple: boolean;
|
|
908
962
|
};
|
|
909
|
-
/** @type {Object<string,string>} */
|
|
910
963
|
"live-reload": {
|
|
911
964
|
configs: {
|
|
912
965
|
type: string;
|
|
@@ -968,10 +1021,6 @@ declare class Server {
|
|
|
968
1021
|
multiple: boolean;
|
|
969
1022
|
description: string;
|
|
970
1023
|
path: string;
|
|
971
|
-
/**
|
|
972
|
-
* @private
|
|
973
|
-
* @returns {Promise<void>}
|
|
974
|
-
*/
|
|
975
1024
|
}[];
|
|
976
1025
|
description: string;
|
|
977
1026
|
simpleType: string;
|
|
@@ -1204,7 +1253,7 @@ declare class Server {
|
|
|
1204
1253
|
type: string;
|
|
1205
1254
|
values: string[];
|
|
1206
1255
|
}[];
|
|
1207
|
-
description: string;
|
|
1256
|
+
/** @type {ServerConfiguration} */ description: string;
|
|
1208
1257
|
multiple: boolean;
|
|
1209
1258
|
simpleType: string;
|
|
1210
1259
|
};
|
|
@@ -1236,10 +1285,6 @@ declare class Server {
|
|
|
1236
1285
|
path: string;
|
|
1237
1286
|
}[];
|
|
1238
1287
|
description: string;
|
|
1239
|
-
/**
|
|
1240
|
-
* @param {string | Buffer | undefined} item
|
|
1241
|
-
* @returns {string | Buffer | undefined}
|
|
1242
|
-
*/
|
|
1243
1288
|
simpleType: string;
|
|
1244
1289
|
multiple: boolean;
|
|
1245
1290
|
};
|
|
@@ -1248,11 +1293,11 @@ declare class Server {
|
|
|
1248
1293
|
type: string;
|
|
1249
1294
|
multiple: boolean;
|
|
1250
1295
|
description: string;
|
|
1251
|
-
path: string
|
|
1296
|
+
path: string /** @type {any} */;
|
|
1252
1297
|
}[];
|
|
1253
1298
|
description: string;
|
|
1254
1299
|
simpleType: string;
|
|
1255
|
-
multiple: boolean
|
|
1300
|
+
multiple: boolean;
|
|
1256
1301
|
};
|
|
1257
1302
|
"static-public-path-reset": {
|
|
1258
1303
|
configs: {
|
|
@@ -1414,7 +1459,7 @@ declare class Server {
|
|
|
1414
1459
|
enum?: undefined;
|
|
1415
1460
|
}
|
|
1416
1461
|
)[];
|
|
1417
|
-
description: string
|
|
1462
|
+
description: string;
|
|
1418
1463
|
link: string;
|
|
1419
1464
|
};
|
|
1420
1465
|
AllowedHostsItem: {
|
|
@@ -1427,7 +1472,7 @@ declare class Server {
|
|
|
1427
1472
|
type: string;
|
|
1428
1473
|
cli: {
|
|
1429
1474
|
negatedDescription: string;
|
|
1430
|
-
}
|
|
1475
|
+
};
|
|
1431
1476
|
description?: undefined;
|
|
1432
1477
|
link?: undefined;
|
|
1433
1478
|
}
|
|
@@ -1435,11 +1480,11 @@ declare class Server {
|
|
|
1435
1480
|
type: string;
|
|
1436
1481
|
description: string;
|
|
1437
1482
|
link: string;
|
|
1438
|
-
cli?: undefined
|
|
1483
|
+
cli?: undefined;
|
|
1439
1484
|
}
|
|
1440
1485
|
)[];
|
|
1441
1486
|
description: string;
|
|
1442
|
-
link: string
|
|
1487
|
+
link: string /** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */;
|
|
1443
1488
|
};
|
|
1444
1489
|
Client: {
|
|
1445
1490
|
description: string;
|
|
@@ -1461,151 +1506,6 @@ declare class Server {
|
|
|
1461
1506
|
logging: {
|
|
1462
1507
|
$ref: string;
|
|
1463
1508
|
};
|
|
1464
|
-
/** @typedef {import("serve-static").ServeStaticOptions} ServeStaticOptions */
|
|
1465
|
-
/** @typedef {import("ipaddr.js").IPv4} IPv4 */
|
|
1466
|
-
/** @typedef {import("ipaddr.js").IPv6} IPv6 */
|
|
1467
|
-
/** @typedef {import("net").Socket} Socket */
|
|
1468
|
-
/** @typedef {import("http").IncomingMessage} IncomingMessage */
|
|
1469
|
-
/** @typedef {import("open").Options} OpenOptions */
|
|
1470
|
-
/** @typedef {import("https").ServerOptions & { spdy?: { plain?: boolean | undefined, ssl?: boolean | undefined, 'x-forwarded-for'?: string | undefined, protocol?: string | undefined, protocols?: string[] | undefined }}} ServerOptions */
|
|
1471
|
-
/**
|
|
1472
|
-
* @template Request, Response
|
|
1473
|
-
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
1474
|
-
*/
|
|
1475
|
-
/**
|
|
1476
|
-
* @template Request, Response
|
|
1477
|
-
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
1478
|
-
*/
|
|
1479
|
-
/**
|
|
1480
|
-
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
1481
|
-
*/
|
|
1482
|
-
/**
|
|
1483
|
-
* @typedef {number | string | "auto"} Port
|
|
1484
|
-
*/
|
|
1485
|
-
/**
|
|
1486
|
-
* @typedef {Object} WatchFiles
|
|
1487
|
-
* @property {string | string[]} paths
|
|
1488
|
-
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
1489
|
-
*/
|
|
1490
|
-
/**
|
|
1491
|
-
* @typedef {Object} Static
|
|
1492
|
-
* @property {string} [directory]
|
|
1493
|
-
* @property {string | string[]} [publicPath]
|
|
1494
|
-
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
1495
|
-
* @property {ServeStaticOptions} [staticOptions]
|
|
1496
|
-
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
1497
|
-
*/
|
|
1498
|
-
/**
|
|
1499
|
-
* @typedef {Object} NormalizedStatic
|
|
1500
|
-
* @property {string} directory
|
|
1501
|
-
* @property {string[]} publicPath
|
|
1502
|
-
* @property {false | ServeIndexOptions} serveIndex
|
|
1503
|
-
* @property {ServeStaticOptions} staticOptions
|
|
1504
|
-
* @property {false | WatchOptions} watch
|
|
1505
|
-
*/
|
|
1506
|
-
/**
|
|
1507
|
-
* @typedef {Object} ServerConfiguration
|
|
1508
|
-
* @property {"http" | "https" | "spdy" | string} [type]
|
|
1509
|
-
* @property {ServerOptions} [options]
|
|
1510
|
-
*/
|
|
1511
|
-
/**
|
|
1512
|
-
* @typedef {Object} WebSocketServerConfiguration
|
|
1513
|
-
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
1514
|
-
* @property {Record<string, any>} [options]
|
|
1515
|
-
*/
|
|
1516
|
-
/**
|
|
1517
|
-
* @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
|
|
1518
|
-
*/
|
|
1519
|
-
/**
|
|
1520
|
-
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
1521
|
-
*/
|
|
1522
|
-
/**
|
|
1523
|
-
* @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
|
|
1524
|
-
*/
|
|
1525
|
-
/**
|
|
1526
|
-
* @callback ByPass
|
|
1527
|
-
* @param {Request} req
|
|
1528
|
-
* @param {Response} res
|
|
1529
|
-
* @param {ProxyConfigArrayItem} proxyConfig
|
|
1530
|
-
*/
|
|
1531
|
-
/**
|
|
1532
|
-
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
1533
|
-
*/
|
|
1534
|
-
/**
|
|
1535
|
-
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
1536
|
-
*/
|
|
1537
|
-
/**
|
|
1538
|
-
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
1539
|
-
*/
|
|
1540
|
-
/**
|
|
1541
|
-
* @typedef {Object} OpenApp
|
|
1542
|
-
* @property {string} [name]
|
|
1543
|
-
* @property {string[]} [arguments]
|
|
1544
|
-
*/
|
|
1545
|
-
/**
|
|
1546
|
-
* @typedef {Object} Open
|
|
1547
|
-
* @property {string | string[] | OpenApp} [app]
|
|
1548
|
-
* @property {string | string[]} [target]
|
|
1549
|
-
*/
|
|
1550
|
-
/**
|
|
1551
|
-
* @typedef {Object} NormalizedOpen
|
|
1552
|
-
* @property {string} target
|
|
1553
|
-
* @property {import("open").Options} options
|
|
1554
|
-
*/
|
|
1555
|
-
/**
|
|
1556
|
-
* @typedef {Object} WebSocketURL
|
|
1557
|
-
* @property {string} [hostname]
|
|
1558
|
-
* @property {string} [password]
|
|
1559
|
-
* @property {string} [pathname]
|
|
1560
|
-
* @property {number | string} [port]
|
|
1561
|
-
* @property {string} [protocol]
|
|
1562
|
-
* @property {string} [username]
|
|
1563
|
-
*/
|
|
1564
|
-
/**
|
|
1565
|
-
* @typedef {Object} ClientConfiguration
|
|
1566
|
-
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1567
|
-
* @property {boolean | { warnings?: boolean, errors?: boolean, runtimeErrors?: boolean }} [overlay]
|
|
1568
|
-
* @property {boolean} [progress]
|
|
1569
|
-
* @property {boolean | number} [reconnect]
|
|
1570
|
-
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1571
|
-
* @property {string | WebSocketURL} [webSocketURL]
|
|
1572
|
-
*/
|
|
1573
|
-
/**
|
|
1574
|
-
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1575
|
-
*/
|
|
1576
|
-
/**
|
|
1577
|
-
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1578
|
-
*/
|
|
1579
|
-
/**
|
|
1580
|
-
* @typedef {Object} Configuration
|
|
1581
|
-
* @property {boolean | string} [ipc]
|
|
1582
|
-
* @property {Host} [host]
|
|
1583
|
-
* @property {Port} [port]
|
|
1584
|
-
* @property {boolean | "only"} [hot]
|
|
1585
|
-
* @property {boolean} [liveReload]
|
|
1586
|
-
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1587
|
-
* @property {boolean} [compress]
|
|
1588
|
-
* @property {boolean} [magicHtml]
|
|
1589
|
-
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1590
|
-
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1591
|
-
* @property {boolean} [setupExitSignals]
|
|
1592
|
-
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1593
|
-
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1594
|
-
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1595
|
-
* @property {boolean | ServerOptions} [https]
|
|
1596
|
-
* @property {boolean} [http2]
|
|
1597
|
-
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1598
|
-
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1599
|
-
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1600
|
-
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1601
|
-
* @property {boolean} [setupExitSignals]
|
|
1602
|
-
* @property {boolean | ClientConfiguration} [client]
|
|
1603
|
-
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1604
|
-
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1605
|
-
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1606
|
-
* @property {(devServer: Server) => void} [onListening]
|
|
1607
|
-
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1608
|
-
*/
|
|
1609
1509
|
overlay: {
|
|
1610
1510
|
$ref: string;
|
|
1611
1511
|
};
|
|
@@ -1616,6 +1516,144 @@ declare class Server {
|
|
|
1616
1516
|
$ref: string;
|
|
1617
1517
|
};
|
|
1618
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
|
+
*/
|
|
1619
1657
|
$ref: string;
|
|
1620
1658
|
};
|
|
1621
1659
|
webSocketURL: {
|
|
@@ -1623,11 +1661,148 @@ declare class Server {
|
|
|
1623
1661
|
};
|
|
1624
1662
|
};
|
|
1625
1663
|
enum?: undefined;
|
|
1626
|
-
cli?: undefined
|
|
1664
|
+
cli?: undefined;
|
|
1627
1665
|
}
|
|
1628
1666
|
)[];
|
|
1629
1667
|
};
|
|
1630
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
|
+
*/
|
|
1631
1806
|
enum: string[];
|
|
1632
1807
|
description: string;
|
|
1633
1808
|
link: string;
|
|
@@ -1676,7 +1851,7 @@ declare class Server {
|
|
|
1676
1851
|
};
|
|
1677
1852
|
description?: undefined;
|
|
1678
1853
|
link?: undefined;
|
|
1679
|
-
cli?: undefined
|
|
1854
|
+
cli?: undefined;
|
|
1680
1855
|
}
|
|
1681
1856
|
)[];
|
|
1682
1857
|
};
|
|
@@ -1694,11 +1869,6 @@ declare class Server {
|
|
|
1694
1869
|
anyOf: (
|
|
1695
1870
|
| {
|
|
1696
1871
|
type: string;
|
|
1697
|
-
/**
|
|
1698
|
-
* @typedef {Object} OpenApp
|
|
1699
|
-
* @property {string} [name]
|
|
1700
|
-
* @property {string[]} [arguments]
|
|
1701
|
-
*/
|
|
1702
1872
|
/**
|
|
1703
1873
|
* @typedef {Object} Open
|
|
1704
1874
|
* @property {string | string[] | OpenApp} [app]
|
|
@@ -1745,7 +1915,6 @@ declare class Server {
|
|
|
1745
1915
|
* @property {boolean} [magicHtml]
|
|
1746
1916
|
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1747
1917
|
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1748
|
-
* @property {boolean} [setupExitSignals]
|
|
1749
1918
|
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1750
1919
|
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1751
1920
|
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
@@ -1771,7 +1940,7 @@ declare class Server {
|
|
|
1771
1940
|
| {
|
|
1772
1941
|
type: string;
|
|
1773
1942
|
minimum: number;
|
|
1774
|
-
cli?: undefined
|
|
1943
|
+
cli?: undefined;
|
|
1775
1944
|
}
|
|
1776
1945
|
)[];
|
|
1777
1946
|
};
|
|
@@ -1801,36 +1970,6 @@ declare class Server {
|
|
|
1801
1970
|
}
|
|
1802
1971
|
| {
|
|
1803
1972
|
type: string;
|
|
1804
|
-
/**
|
|
1805
|
-
* @typedef {Object} Configuration
|
|
1806
|
-
* @property {boolean | string} [ipc]
|
|
1807
|
-
* @property {Host} [host]
|
|
1808
|
-
* @property {Port} [port]
|
|
1809
|
-
* @property {boolean | "only"} [hot]
|
|
1810
|
-
* @property {boolean} [liveReload]
|
|
1811
|
-
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1812
|
-
* @property {boolean} [compress]
|
|
1813
|
-
* @property {boolean} [magicHtml]
|
|
1814
|
-
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1815
|
-
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1816
|
-
* @property {boolean} [setupExitSignals]
|
|
1817
|
-
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1818
|
-
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1819
|
-
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1820
|
-
* @property {boolean | ServerOptions} [https]
|
|
1821
|
-
* @property {boolean} [http2]
|
|
1822
|
-
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1823
|
-
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1824
|
-
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1825
|
-
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1826
|
-
* @property {boolean} [setupExitSignals]
|
|
1827
|
-
* @property {boolean | ClientConfiguration} [client]
|
|
1828
|
-
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1829
|
-
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1830
|
-
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1831
|
-
* @property {(devServer: Server) => void} [onListening]
|
|
1832
|
-
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1833
|
-
*/
|
|
1834
1973
|
additionalProperties: boolean;
|
|
1835
1974
|
properties: {
|
|
1836
1975
|
hostname: {
|
|
@@ -1929,10 +2068,6 @@ declare class Server {
|
|
|
1929
2068
|
cli: {
|
|
1930
2069
|
negatedDescription: string;
|
|
1931
2070
|
};
|
|
1932
|
-
/**
|
|
1933
|
-
* @private
|
|
1934
|
-
* @type {RequestHandler[]}
|
|
1935
|
-
*/
|
|
1936
2071
|
};
|
|
1937
2072
|
ca: {
|
|
1938
2073
|
anyOf: (
|
|
@@ -2135,7 +2270,7 @@ declare class Server {
|
|
|
2135
2270
|
description: string;
|
|
2136
2271
|
};
|
|
2137
2272
|
};
|
|
2138
|
-
cli?: undefined
|
|
2273
|
+
cli?: undefined;
|
|
2139
2274
|
}
|
|
2140
2275
|
)[];
|
|
2141
2276
|
description: string;
|
|
@@ -2196,9 +2331,9 @@ declare class Server {
|
|
|
2196
2331
|
}
|
|
2197
2332
|
| {
|
|
2198
2333
|
type: string;
|
|
2199
|
-
|
|
2334
|
+
description: string;
|
|
2200
2335
|
link: string;
|
|
2201
|
-
cli?: undefined
|
|
2336
|
+
cli?: undefined;
|
|
2202
2337
|
}
|
|
2203
2338
|
)[];
|
|
2204
2339
|
description: string;
|
|
@@ -2210,7 +2345,7 @@ declare class Server {
|
|
|
2210
2345
|
anyOf: (
|
|
2211
2346
|
| {
|
|
2212
2347
|
enum: string[];
|
|
2213
|
-
|
|
2348
|
+
type?: undefined;
|
|
2214
2349
|
minLength?: undefined;
|
|
2215
2350
|
}
|
|
2216
2351
|
| {
|
|
@@ -2232,7 +2367,7 @@ declare class Server {
|
|
|
2232
2367
|
| {
|
|
2233
2368
|
enum: string[];
|
|
2234
2369
|
type?: undefined;
|
|
2235
|
-
cli?: undefined
|
|
2370
|
+
cli?: undefined;
|
|
2236
2371
|
}
|
|
2237
2372
|
)[];
|
|
2238
2373
|
description: string;
|
|
@@ -2298,7 +2433,7 @@ declare class Server {
|
|
|
2298
2433
|
}
|
|
2299
2434
|
| {
|
|
2300
2435
|
$ref: string;
|
|
2301
|
-
type?: undefined;
|
|
2436
|
+
/** @type {string} */ type?: undefined;
|
|
2302
2437
|
items?: undefined;
|
|
2303
2438
|
}
|
|
2304
2439
|
)[];
|
|
@@ -2364,7 +2499,7 @@ declare class Server {
|
|
|
2364
2499
|
};
|
|
2365
2500
|
minLength?: undefined;
|
|
2366
2501
|
description?: undefined;
|
|
2367
|
-
cli?: undefined
|
|
2502
|
+
cli?: undefined;
|
|
2368
2503
|
}
|
|
2369
2504
|
| {
|
|
2370
2505
|
type: string;
|
|
@@ -2381,12 +2516,6 @@ declare class Server {
|
|
|
2381
2516
|
};
|
|
2382
2517
|
};
|
|
2383
2518
|
};
|
|
2384
|
-
/**
|
|
2385
|
-
* prependEntry Method for webpack 4
|
|
2386
|
-
* @param {any} originalEntry
|
|
2387
|
-
* @param {any} newAdditionalEntries
|
|
2388
|
-
* @returns {any}
|
|
2389
|
-
*/
|
|
2390
2519
|
OpenString: {
|
|
2391
2520
|
type: string;
|
|
2392
2521
|
minLength: number;
|
|
@@ -2441,8 +2570,7 @@ declare class Server {
|
|
|
2441
2570
|
}
|
|
2442
2571
|
)[];
|
|
2443
2572
|
description: string;
|
|
2444
|
-
/** @type {
|
|
2445
|
-
link: string;
|
|
2573
|
+
/** @type {Object<string,string>} */ link: string;
|
|
2446
2574
|
};
|
|
2447
2575
|
Server: {
|
|
2448
2576
|
anyOf: {
|
|
@@ -2720,7 +2848,7 @@ declare class Server {
|
|
|
2720
2848
|
$ref: string;
|
|
2721
2849
|
}[];
|
|
2722
2850
|
};
|
|
2723
|
-
cli?: undefined
|
|
2851
|
+
cli?: undefined;
|
|
2724
2852
|
$ref?: undefined;
|
|
2725
2853
|
}
|
|
2726
2854
|
| {
|
|
@@ -2735,7 +2863,7 @@ declare class Server {
|
|
|
2735
2863
|
$ref: string;
|
|
2736
2864
|
type?: undefined;
|
|
2737
2865
|
items?: undefined;
|
|
2738
|
-
cli?: undefined
|
|
2866
|
+
cli?: undefined;
|
|
2739
2867
|
}
|
|
2740
2868
|
)[];
|
|
2741
2869
|
description: string;
|
|
@@ -2786,7 +2914,7 @@ declare class Server {
|
|
|
2786
2914
|
| {
|
|
2787
2915
|
type: string;
|
|
2788
2916
|
additionalProperties: boolean;
|
|
2789
|
-
cli?: undefined
|
|
2917
|
+
cli?: undefined;
|
|
2790
2918
|
}
|
|
2791
2919
|
)[];
|
|
2792
2920
|
description: string;
|
|
@@ -2806,7 +2934,7 @@ declare class Server {
|
|
|
2806
2934
|
type: string;
|
|
2807
2935
|
description: string;
|
|
2808
2936
|
link: string;
|
|
2809
|
-
cli?: undefined
|
|
2937
|
+
cli?: undefined;
|
|
2810
2938
|
}
|
|
2811
2939
|
)[];
|
|
2812
2940
|
description: string;
|
|
@@ -2897,7 +3025,7 @@ declare class Server {
|
|
|
2897
3025
|
| {
|
|
2898
3026
|
$ref: string;
|
|
2899
3027
|
enum?: undefined;
|
|
2900
|
-
cli?: undefined
|
|
3028
|
+
cli?: undefined;
|
|
2901
3029
|
}
|
|
2902
3030
|
)[];
|
|
2903
3031
|
cli: {
|
|
@@ -2905,7 +3033,7 @@ declare class Server {
|
|
|
2905
3033
|
};
|
|
2906
3034
|
};
|
|
2907
3035
|
WebSocketServerFunction: {
|
|
2908
|
-
instanceof: string
|
|
3036
|
+
instanceof: string;
|
|
2909
3037
|
};
|
|
2910
3038
|
WebSocketServerObject: {
|
|
2911
3039
|
type: string;
|
|
@@ -2931,6 +3059,7 @@ declare class Server {
|
|
|
2931
3059
|
};
|
|
2932
3060
|
};
|
|
2933
3061
|
additionalProperties: boolean;
|
|
3062
|
+
/** @type {ServerOptions} */
|
|
2934
3063
|
properties: {
|
|
2935
3064
|
allowedHosts: {
|
|
2936
3065
|
$ref: string;
|
|
@@ -2974,7 +3103,6 @@ declare class Server {
|
|
|
2974
3103
|
magicHtml: {
|
|
2975
3104
|
$ref: string;
|
|
2976
3105
|
};
|
|
2977
|
-
/** @type {any} */
|
|
2978
3106
|
onAfterSetupMiddleware: {
|
|
2979
3107
|
$ref: string;
|
|
2980
3108
|
};
|
|
@@ -2993,6 +3121,7 @@ declare class Server {
|
|
|
2993
3121
|
proxy: {
|
|
2994
3122
|
$ref: string;
|
|
2995
3123
|
};
|
|
3124
|
+
/** @type {any} */
|
|
2996
3125
|
server: {
|
|
2997
3126
|
$ref: string;
|
|
2998
3127
|
};
|
|
@@ -3165,14 +3294,14 @@ declare class Server {
|
|
|
3165
3294
|
private setupDevMiddleware;
|
|
3166
3295
|
middleware:
|
|
3167
3296
|
| import("webpack-dev-middleware").API<
|
|
3168
|
-
express.Request<
|
|
3297
|
+
import("express").Request<
|
|
3169
3298
|
import("express-serve-static-core").ParamsDictionary,
|
|
3170
3299
|
any,
|
|
3171
3300
|
any,
|
|
3172
3301
|
qs.ParsedQs,
|
|
3173
3302
|
Record<string, any>
|
|
3174
3303
|
>,
|
|
3175
|
-
express.Response<any, Record<string, any>>
|
|
3304
|
+
import("express").Response<any, Record<string, any>>
|
|
3176
3305
|
>
|
|
3177
3306
|
| null
|
|
3178
3307
|
| undefined;
|
|
@@ -3388,14 +3517,14 @@ type Configuration = {
|
|
|
3388
3517
|
liveReload?: boolean | undefined;
|
|
3389
3518
|
devMiddleware?:
|
|
3390
3519
|
| DevMiddlewareOptions<
|
|
3391
|
-
express.Request<
|
|
3520
|
+
import("express").Request<
|
|
3392
3521
|
import("express-serve-static-core").ParamsDictionary,
|
|
3393
3522
|
any,
|
|
3394
3523
|
any,
|
|
3395
3524
|
qs.ParsedQs,
|
|
3396
3525
|
Record<string, any>
|
|
3397
3526
|
>,
|
|
3398
|
-
express.Response<any, Record<string, any>>
|
|
3527
|
+
import("express").Response<any, Record<string, any>>
|
|
3399
3528
|
>
|
|
3400
3529
|
| undefined;
|
|
3401
3530
|
compress?: boolean | undefined;
|
|
@@ -3405,7 +3534,6 @@ type Configuration = {
|
|
|
3405
3534
|
| boolean
|
|
3406
3535
|
| import("connect-history-api-fallback").Options
|
|
3407
3536
|
| undefined;
|
|
3408
|
-
setupExitSignals?: boolean | undefined;
|
|
3409
3537
|
bonjour?:
|
|
3410
3538
|
| boolean
|
|
3411
3539
|
| Record<string, never>
|
|
@@ -3424,6 +3552,7 @@ type Configuration = {
|
|
|
3424
3552
|
webSocketServer?: string | boolean | WebSocketServerConfiguration | undefined;
|
|
3425
3553
|
proxy?: ProxyConfigArrayItem | ProxyConfigMap | ProxyConfigArray | undefined;
|
|
3426
3554
|
open?: string | boolean | Open | (string | Open)[] | undefined;
|
|
3555
|
+
setupExitSignals?: boolean | undefined;
|
|
3427
3556
|
client?: boolean | ClientConfiguration | undefined;
|
|
3428
3557
|
headers?:
|
|
3429
3558
|
| Headers
|
|
@@ -3442,7 +3571,6 @@ type Configuration = {
|
|
|
3442
3571
|
};
|
|
3443
3572
|
type FSWatcher = import("chokidar").FSWatcher;
|
|
3444
3573
|
type Socket = import("net").Socket;
|
|
3445
|
-
import express = require("express");
|
|
3446
3574
|
type WebSocketServerImplementation = {
|
|
3447
3575
|
implementation: WebSocketServer;
|
|
3448
3576
|
clients: ClientConnection[];
|