webpack-dev-server 4.13.2 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/webpack-dev-server.js +12 -2
- package/client/index.js +48 -15
- package/client/overlay/state-machine.js +9 -4
- package/client/overlay.js +20 -12
- package/lib/Server.js +79 -17
- package/lib/options.json +39 -15
- package/package.json +2 -2
- package/types/lib/Server.d.ts +749 -515
package/types/lib/Server.d.ts
CHANGED
|
@@ -20,13 +20,175 @@ 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 {boolean | ((error: Error) => void)} OverlayMessageOptions
|
|
144
|
+
*/
|
|
145
|
+
/**
|
|
146
|
+
* @typedef {Object} ClientConfiguration
|
|
147
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
148
|
+
* @property {boolean | { warnings?: OverlayMessageOptions, errors?: OverlayMessageOptions, runtimeErrors?: OverlayMessageOptions }} [overlay]
|
|
149
|
+
* @property {boolean} [progress]
|
|
150
|
+
* @property {boolean | number} [reconnect]
|
|
151
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
152
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
153
|
+
*/
|
|
154
|
+
/**
|
|
155
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
156
|
+
*/
|
|
157
|
+
/**
|
|
158
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
159
|
+
*/
|
|
160
|
+
/**
|
|
161
|
+
* @typedef {Object} Configuration
|
|
162
|
+
* @property {boolean | string} [ipc]
|
|
163
|
+
* @property {Host} [host]
|
|
164
|
+
* @property {Port} [port]
|
|
165
|
+
* @property {boolean | "only"} [hot]
|
|
166
|
+
* @property {boolean} [liveReload]
|
|
167
|
+
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
168
|
+
* @property {boolean} [compress]
|
|
169
|
+
* @property {boolean} [magicHtml]
|
|
170
|
+
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
171
|
+
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
172
|
+
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
173
|
+
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
174
|
+
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
175
|
+
* @property {boolean | ServerOptions} [https]
|
|
176
|
+
* @property {boolean} [http2]
|
|
177
|
+
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
178
|
+
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
179
|
+
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
180
|
+
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
181
|
+
* @property {boolean} [setupExitSignals]
|
|
182
|
+
* @property {boolean | ClientConfiguration} [client]
|
|
183
|
+
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
184
|
+
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
185
|
+
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
186
|
+
* @property {(devServer: Server) => void} [onListening]
|
|
187
|
+
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
188
|
+
*/
|
|
189
|
+
description: string;
|
|
190
|
+
path: string;
|
|
191
|
+
}[];
|
|
30
192
|
/** @typedef {import("chokidar").FSWatcher} FSWatcher */
|
|
31
193
|
/** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */
|
|
32
194
|
/** @typedef {import("bonjour-service").Bonjour} Bonjour */
|
|
@@ -135,10 +297,13 @@ declare class Server {
|
|
|
135
297
|
* @property {string} [protocol]
|
|
136
298
|
* @property {string} [username]
|
|
137
299
|
*/
|
|
300
|
+
/**
|
|
301
|
+
* @typedef {boolean | ((error: Error) => void)} OverlayMessageOptions
|
|
302
|
+
*/
|
|
138
303
|
/**
|
|
139
304
|
* @typedef {Object} ClientConfiguration
|
|
140
305
|
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
141
|
-
* @property {boolean | { warnings?:
|
|
306
|
+
* @property {boolean | { warnings?: OverlayMessageOptions, errors?: OverlayMessageOptions, runtimeErrors?: OverlayMessageOptions }} [overlay]
|
|
142
307
|
* @property {boolean} [progress]
|
|
143
308
|
* @property {boolean | number} [reconnect]
|
|
144
309
|
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
@@ -179,12 +344,39 @@ declare class Server {
|
|
|
179
344
|
* @property {(devServer: Server) => void} [onListening]
|
|
180
345
|
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
181
346
|
*/
|
|
347
|
+
description: string;
|
|
348
|
+
simpleType: string;
|
|
182
349
|
multiple: boolean;
|
|
350
|
+
};
|
|
351
|
+
bonjour: {
|
|
352
|
+
configs: {
|
|
353
|
+
type: string;
|
|
354
|
+
multiple: boolean;
|
|
355
|
+
description: string;
|
|
356
|
+
negatedDescription: string;
|
|
357
|
+
path: string;
|
|
358
|
+
}[];
|
|
359
|
+
description: string;
|
|
183
360
|
simpleType: string;
|
|
361
|
+
multiple: boolean;
|
|
184
362
|
};
|
|
185
|
-
|
|
363
|
+
client: {
|
|
186
364
|
configs: {
|
|
365
|
+
description: string;
|
|
366
|
+
negatedDescription: string;
|
|
367
|
+
multiple: boolean;
|
|
368
|
+
path: string;
|
|
187
369
|
type: string;
|
|
370
|
+
values: boolean[];
|
|
371
|
+
}[];
|
|
372
|
+
description: string;
|
|
373
|
+
multiple: boolean;
|
|
374
|
+
simpleType: string;
|
|
375
|
+
};
|
|
376
|
+
"client-logging": {
|
|
377
|
+
configs: {
|
|
378
|
+
type: string;
|
|
379
|
+
values: string[];
|
|
188
380
|
multiple: boolean;
|
|
189
381
|
description: string;
|
|
190
382
|
path: string;
|
|
@@ -193,7 +385,7 @@ declare class Server {
|
|
|
193
385
|
simpleType: string;
|
|
194
386
|
multiple: boolean;
|
|
195
387
|
};
|
|
196
|
-
|
|
388
|
+
"client-overlay": {
|
|
197
389
|
configs: {
|
|
198
390
|
type: string;
|
|
199
391
|
multiple: boolean;
|
|
@@ -205,65 +397,21 @@ declare class Server {
|
|
|
205
397
|
simpleType: string;
|
|
206
398
|
multiple: boolean;
|
|
207
399
|
};
|
|
208
|
-
client: {
|
|
400
|
+
"client-overlay-errors": {
|
|
209
401
|
configs: {
|
|
402
|
+
type: string;
|
|
403
|
+
multiple: boolean;
|
|
210
404
|
description: string;
|
|
405
|
+
/**
|
|
406
|
+
* @typedef {Object} ServerConfiguration
|
|
407
|
+
* @property {"http" | "https" | "spdy" | string} [type]
|
|
408
|
+
* @property {ServerOptions} [options]
|
|
409
|
+
*/
|
|
211
410
|
negatedDescription: string;
|
|
212
|
-
multiple: boolean;
|
|
213
411
|
path: string;
|
|
214
|
-
type: string;
|
|
215
|
-
values: boolean[];
|
|
216
412
|
}[];
|
|
217
413
|
description: string;
|
|
218
|
-
multiple: boolean;
|
|
219
414
|
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
415
|
/**
|
|
268
416
|
* @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
417
|
*/
|
|
@@ -312,10 +460,13 @@ declare class Server {
|
|
|
312
460
|
* @property {string} [protocol]
|
|
313
461
|
* @property {string} [username]
|
|
314
462
|
*/
|
|
463
|
+
/**
|
|
464
|
+
* @typedef {boolean | ((error: Error) => void)} OverlayMessageOptions
|
|
465
|
+
*/
|
|
315
466
|
/**
|
|
316
467
|
* @typedef {Object} ClientConfiguration
|
|
317
468
|
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
318
|
-
* @property {boolean | { warnings?:
|
|
469
|
+
* @property {boolean | { warnings?: OverlayMessageOptions, errors?: OverlayMessageOptions, runtimeErrors?: OverlayMessageOptions }} [overlay]
|
|
319
470
|
* @property {boolean} [progress]
|
|
320
471
|
* @property {boolean | number} [reconnect]
|
|
321
472
|
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
@@ -356,45 +507,15 @@ declare class Server {
|
|
|
356
507
|
* @property {(devServer: Server) => void} [onListening]
|
|
357
508
|
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
358
509
|
*/
|
|
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
510
|
multiple: boolean;
|
|
393
511
|
};
|
|
394
512
|
"client-overlay-trusted-types-policy-name": {
|
|
395
513
|
configs: {
|
|
396
514
|
description: string;
|
|
397
515
|
multiple: boolean;
|
|
516
|
+
/**
|
|
517
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
518
|
+
*/
|
|
398
519
|
path: string;
|
|
399
520
|
type: string;
|
|
400
521
|
}[];
|
|
@@ -419,69 +540,6 @@ declare class Server {
|
|
|
419
540
|
type: string;
|
|
420
541
|
multiple: boolean;
|
|
421
542
|
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
543
|
negatedDescription: string;
|
|
486
544
|
path: string;
|
|
487
545
|
}[];
|
|
@@ -561,7 +619,7 @@ declare class Server {
|
|
|
561
619
|
}[];
|
|
562
620
|
description: string;
|
|
563
621
|
simpleType: string;
|
|
564
|
-
multiple: boolean;
|
|
622
|
+
/** @type {T} */ multiple: boolean;
|
|
565
623
|
};
|
|
566
624
|
"client-web-socket-url-password": {
|
|
567
625
|
configs: {
|
|
@@ -607,9 +665,16 @@ declare class Server {
|
|
|
607
665
|
}
|
|
608
666
|
| {
|
|
609
667
|
description: string;
|
|
668
|
+
/**
|
|
669
|
+
* @private
|
|
670
|
+
* @type {RequestHandler[]}
|
|
671
|
+
*/
|
|
610
672
|
multiple: boolean;
|
|
611
673
|
path: string;
|
|
612
674
|
type: string;
|
|
675
|
+
/**
|
|
676
|
+
* @type {Socket[]}
|
|
677
|
+
*/
|
|
613
678
|
}
|
|
614
679
|
)[];
|
|
615
680
|
description: string;
|
|
@@ -716,6 +781,9 @@ declare class Server {
|
|
|
716
781
|
simpleType: string;
|
|
717
782
|
multiple: boolean;
|
|
718
783
|
};
|
|
784
|
+
/**
|
|
785
|
+
* @type {string | undefined}
|
|
786
|
+
*/
|
|
719
787
|
"https-ca": {
|
|
720
788
|
configs: {
|
|
721
789
|
type: string;
|
|
@@ -752,7 +820,6 @@ declare class Server {
|
|
|
752
820
|
"https-cacert-reset": {
|
|
753
821
|
configs: {
|
|
754
822
|
description: string;
|
|
755
|
-
/** @type {string} */
|
|
756
823
|
multiple: boolean;
|
|
757
824
|
path: string;
|
|
758
825
|
type: string;
|
|
@@ -765,7 +832,7 @@ declare class Server {
|
|
|
765
832
|
configs: {
|
|
766
833
|
type: string;
|
|
767
834
|
multiple: boolean;
|
|
768
|
-
description: string;
|
|
835
|
+
/** @type {ClientConfiguration} */ description: string;
|
|
769
836
|
path: string;
|
|
770
837
|
}[];
|
|
771
838
|
description: string;
|
|
@@ -825,7 +892,7 @@ declare class Server {
|
|
|
825
892
|
}[];
|
|
826
893
|
description: string;
|
|
827
894
|
multiple: boolean;
|
|
828
|
-
simpleType: string;
|
|
895
|
+
/** @type {string} */ simpleType: string;
|
|
829
896
|
};
|
|
830
897
|
"https-passphrase": {
|
|
831
898
|
configs: {
|
|
@@ -867,12 +934,6 @@ declare class Server {
|
|
|
867
934
|
description: string;
|
|
868
935
|
negatedDescription: string;
|
|
869
936
|
path: string;
|
|
870
|
-
/**
|
|
871
|
-
* prependEntry Method for webpack 4
|
|
872
|
-
* @param {any} originalEntry
|
|
873
|
-
* @param {any} newAdditionalEntries
|
|
874
|
-
* @returns {any}
|
|
875
|
-
*/
|
|
876
937
|
}[];
|
|
877
938
|
description: string;
|
|
878
939
|
simpleType: string;
|
|
@@ -906,9 +967,14 @@ declare class Server {
|
|
|
906
967
|
negatedDescription: string;
|
|
907
968
|
path: string;
|
|
908
969
|
}[];
|
|
909
|
-
/** @type {any} */
|
|
910
970
|
description: string;
|
|
911
971
|
simpleType: string;
|
|
972
|
+
/**
|
|
973
|
+
* prependEntry Method for webpack 4
|
|
974
|
+
* @param {any} originalEntry
|
|
975
|
+
* @param {any} newAdditionalEntries
|
|
976
|
+
* @returns {any}
|
|
977
|
+
*/
|
|
912
978
|
multiple: boolean;
|
|
913
979
|
};
|
|
914
980
|
"magic-html": {
|
|
@@ -928,13 +994,14 @@ declare class Server {
|
|
|
928
994
|
| {
|
|
929
995
|
type: string;
|
|
930
996
|
multiple: boolean;
|
|
931
|
-
|
|
997
|
+
description: string;
|
|
932
998
|
path: string;
|
|
933
999
|
}
|
|
934
1000
|
| {
|
|
1001
|
+
/** @type {any} */
|
|
935
1002
|
type: string;
|
|
936
1003
|
multiple: boolean;
|
|
937
|
-
description: string;
|
|
1004
|
+
/** @type {any} */ description: string;
|
|
938
1005
|
negatedDescription: string;
|
|
939
1006
|
path: string;
|
|
940
1007
|
}
|
|
@@ -964,10 +1031,6 @@ declare class Server {
|
|
|
964
1031
|
description: string;
|
|
965
1032
|
simpleType: string;
|
|
966
1033
|
multiple: boolean;
|
|
967
|
-
/**
|
|
968
|
-
* @param {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} watchOptions
|
|
969
|
-
* @returns {WatchOptions}
|
|
970
|
-
*/
|
|
971
1034
|
};
|
|
972
1035
|
"open-app-name-reset": {
|
|
973
1036
|
configs: {
|
|
@@ -1198,7 +1261,7 @@ declare class Server {
|
|
|
1198
1261
|
}[];
|
|
1199
1262
|
description: string;
|
|
1200
1263
|
multiple: boolean;
|
|
1201
|
-
simpleType: string
|
|
1264
|
+
simpleType: string;
|
|
1202
1265
|
};
|
|
1203
1266
|
static: {
|
|
1204
1267
|
configs: (
|
|
@@ -1211,7 +1274,7 @@ declare class Server {
|
|
|
1211
1274
|
| {
|
|
1212
1275
|
type: string;
|
|
1213
1276
|
multiple: boolean;
|
|
1214
|
-
|
|
1277
|
+
description: string;
|
|
1215
1278
|
negatedDescription: string;
|
|
1216
1279
|
path: string;
|
|
1217
1280
|
}
|
|
@@ -1223,7 +1286,7 @@ declare class Server {
|
|
|
1223
1286
|
"static-directory": {
|
|
1224
1287
|
configs: {
|
|
1225
1288
|
type: string;
|
|
1226
|
-
|
|
1289
|
+
multiple: boolean;
|
|
1227
1290
|
description: string;
|
|
1228
1291
|
path: string;
|
|
1229
1292
|
}[];
|
|
@@ -1239,7 +1302,7 @@ declare class Server {
|
|
|
1239
1302
|
path: string;
|
|
1240
1303
|
}[];
|
|
1241
1304
|
description: string;
|
|
1242
|
-
|
|
1305
|
+
simpleType: string;
|
|
1243
1306
|
multiple: boolean;
|
|
1244
1307
|
};
|
|
1245
1308
|
"static-public-path-reset": {
|
|
@@ -1262,8 +1325,9 @@ declare class Server {
|
|
|
1262
1325
|
}[];
|
|
1263
1326
|
description: string;
|
|
1264
1327
|
simpleType: string;
|
|
1265
|
-
multiple: boolean
|
|
1328
|
+
multiple: boolean /** @type {any} */;
|
|
1266
1329
|
};
|
|
1330
|
+
/** @type {any} */
|
|
1267
1331
|
"static-serve-index": {
|
|
1268
1332
|
configs: {
|
|
1269
1333
|
type: string;
|
|
@@ -1357,7 +1421,7 @@ declare class Server {
|
|
|
1357
1421
|
description: string;
|
|
1358
1422
|
simpleType: string;
|
|
1359
1423
|
multiple: boolean;
|
|
1360
|
-
}
|
|
1424
|
+
};
|
|
1361
1425
|
};
|
|
1362
1426
|
readonly processArguments: (
|
|
1363
1427
|
args: Record<string, import("../bin/process-arguments").Argument>,
|
|
@@ -1402,197 +1466,53 @@ declare class Server {
|
|
|
1402
1466
|
enum?: undefined;
|
|
1403
1467
|
}
|
|
1404
1468
|
)[];
|
|
1405
|
-
description: string
|
|
1469
|
+
description: string;
|
|
1406
1470
|
link: string;
|
|
1407
1471
|
};
|
|
1408
1472
|
AllowedHostsItem: {
|
|
1409
1473
|
type: string;
|
|
1410
1474
|
minLength: number;
|
|
1411
1475
|
};
|
|
1412
|
-
Bonjour: {
|
|
1413
|
-
anyOf: (
|
|
1414
|
-
| {
|
|
1415
|
-
type: string;
|
|
1416
|
-
cli: {
|
|
1417
|
-
negatedDescription: string;
|
|
1418
|
-
}
|
|
1419
|
-
description?: undefined;
|
|
1420
|
-
link?: undefined;
|
|
1421
|
-
}
|
|
1422
|
-
| {
|
|
1423
|
-
type: string;
|
|
1424
|
-
description: string;
|
|
1425
|
-
link: string;
|
|
1426
|
-
cli?: undefined
|
|
1427
|
-
}
|
|
1428
|
-
)[];
|
|
1429
|
-
description: string;
|
|
1430
|
-
link: string
|
|
1431
|
-
};
|
|
1432
|
-
Client: {
|
|
1433
|
-
description: string;
|
|
1434
|
-
link: string;
|
|
1435
|
-
anyOf: (
|
|
1436
|
-
| {
|
|
1437
|
-
enum: boolean[];
|
|
1438
|
-
cli: {
|
|
1439
|
-
negatedDescription: string;
|
|
1440
|
-
};
|
|
1441
|
-
type?: undefined;
|
|
1442
|
-
additionalProperties?: undefined;
|
|
1443
|
-
properties?: undefined;
|
|
1444
|
-
}
|
|
1445
|
-
| {
|
|
1446
|
-
type: string;
|
|
1447
|
-
additionalProperties: boolean;
|
|
1448
|
-
properties: {
|
|
1449
|
-
logging: {
|
|
1450
|
-
$ref: string;
|
|
1451
|
-
};
|
|
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
|
-
*/
|
|
1476
|
+
Bonjour: {
|
|
1477
|
+
anyOf: (
|
|
1478
|
+
| {
|
|
1479
|
+
type: string;
|
|
1480
|
+
cli: {
|
|
1481
|
+
negatedDescription: string;
|
|
1482
|
+
};
|
|
1483
|
+
description?: undefined;
|
|
1484
|
+
link?: undefined;
|
|
1485
|
+
}
|
|
1486
|
+
| {
|
|
1487
|
+
type: string;
|
|
1488
|
+
description: string;
|
|
1489
|
+
link: string;
|
|
1490
|
+
cli?: undefined;
|
|
1491
|
+
}
|
|
1492
|
+
)[];
|
|
1493
|
+
description: string;
|
|
1494
|
+
link: string /** @typedef {import("connect-history-api-fallback").Options} ConnectHistoryApiFallbackOptions */;
|
|
1495
|
+
};
|
|
1496
|
+
Client: {
|
|
1497
|
+
description: string;
|
|
1498
|
+
link: string;
|
|
1499
|
+
anyOf: (
|
|
1500
|
+
| {
|
|
1501
|
+
enum: boolean[];
|
|
1502
|
+
cli: {
|
|
1503
|
+
negatedDescription: string;
|
|
1504
|
+
};
|
|
1505
|
+
type?: undefined;
|
|
1506
|
+
additionalProperties?: undefined;
|
|
1507
|
+
properties?: undefined;
|
|
1508
|
+
}
|
|
1509
|
+
| {
|
|
1510
|
+
type: string;
|
|
1511
|
+
additionalProperties: boolean;
|
|
1512
|
+
properties: {
|
|
1513
|
+
logging: {
|
|
1514
|
+
$ref: string;
|
|
1515
|
+
};
|
|
1596
1516
|
overlay: {
|
|
1597
1517
|
$ref: string;
|
|
1598
1518
|
};
|
|
@@ -1603,6 +1523,147 @@ declare class Server {
|
|
|
1603
1523
|
$ref: string;
|
|
1604
1524
|
};
|
|
1605
1525
|
webSocketTransport: {
|
|
1526
|
+
/** @typedef {import("https").ServerOptions & { spdy?: { plain?: boolean | undefined, ssl?: boolean | undefined, 'x-forwarded-for'?: string | undefined, protocol?: string | undefined, protocols?: string[] | undefined }}} ServerOptions */
|
|
1527
|
+
/**
|
|
1528
|
+
* @template Request, Response
|
|
1529
|
+
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
1530
|
+
*/
|
|
1531
|
+
/**
|
|
1532
|
+
* @template Request, Response
|
|
1533
|
+
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
1534
|
+
*/
|
|
1535
|
+
/**
|
|
1536
|
+
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
1537
|
+
*/
|
|
1538
|
+
/**
|
|
1539
|
+
* @typedef {number | string | "auto"} Port
|
|
1540
|
+
*/
|
|
1541
|
+
/**
|
|
1542
|
+
* @typedef {Object} WatchFiles
|
|
1543
|
+
* @property {string | string[]} paths
|
|
1544
|
+
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
1545
|
+
*/
|
|
1546
|
+
/**
|
|
1547
|
+
* @typedef {Object} Static
|
|
1548
|
+
* @property {string} [directory]
|
|
1549
|
+
* @property {string | string[]} [publicPath]
|
|
1550
|
+
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
1551
|
+
* @property {ServeStaticOptions} [staticOptions]
|
|
1552
|
+
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
1553
|
+
*/
|
|
1554
|
+
/**
|
|
1555
|
+
* @typedef {Object} NormalizedStatic
|
|
1556
|
+
* @property {string} directory
|
|
1557
|
+
* @property {string[]} publicPath
|
|
1558
|
+
* @property {false | ServeIndexOptions} serveIndex
|
|
1559
|
+
* @property {ServeStaticOptions} staticOptions
|
|
1560
|
+
* @property {false | WatchOptions} watch
|
|
1561
|
+
*/
|
|
1562
|
+
/**
|
|
1563
|
+
* @typedef {Object} ServerConfiguration
|
|
1564
|
+
* @property {"http" | "https" | "spdy" | string} [type]
|
|
1565
|
+
* @property {ServerOptions} [options]
|
|
1566
|
+
*/
|
|
1567
|
+
/**
|
|
1568
|
+
* @typedef {Object} WebSocketServerConfiguration
|
|
1569
|
+
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
1570
|
+
* @property {Record<string, any>} [options]
|
|
1571
|
+
*/
|
|
1572
|
+
/**
|
|
1573
|
+
* @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
|
|
1574
|
+
*/
|
|
1575
|
+
/**
|
|
1576
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
1577
|
+
*/
|
|
1578
|
+
/**
|
|
1579
|
+
* @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
|
|
1580
|
+
*/
|
|
1581
|
+
/**
|
|
1582
|
+
* @callback ByPass
|
|
1583
|
+
* @param {Request} req
|
|
1584
|
+
* @param {Response} res
|
|
1585
|
+
* @param {ProxyConfigArrayItem} proxyConfig
|
|
1586
|
+
*/
|
|
1587
|
+
/**
|
|
1588
|
+
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
1589
|
+
*/
|
|
1590
|
+
/**
|
|
1591
|
+
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
1592
|
+
*/
|
|
1593
|
+
/**
|
|
1594
|
+
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
1595
|
+
*/
|
|
1596
|
+
/**
|
|
1597
|
+
* @typedef {Object} OpenApp
|
|
1598
|
+
* @property {string} [name]
|
|
1599
|
+
* @property {string[]} [arguments]
|
|
1600
|
+
*/
|
|
1601
|
+
/**
|
|
1602
|
+
* @typedef {Object} Open
|
|
1603
|
+
* @property {string | string[] | OpenApp} [app]
|
|
1604
|
+
* @property {string | string[]} [target]
|
|
1605
|
+
*/
|
|
1606
|
+
/**
|
|
1607
|
+
* @typedef {Object} NormalizedOpen
|
|
1608
|
+
* @property {string} target
|
|
1609
|
+
* @property {import("open").Options} options
|
|
1610
|
+
*/
|
|
1611
|
+
/**
|
|
1612
|
+
* @typedef {Object} WebSocketURL
|
|
1613
|
+
* @property {string} [hostname]
|
|
1614
|
+
* @property {string} [password]
|
|
1615
|
+
* @property {string} [pathname]
|
|
1616
|
+
* @property {number | string} [port]
|
|
1617
|
+
* @property {string} [protocol]
|
|
1618
|
+
* @property {string} [username]
|
|
1619
|
+
*/
|
|
1620
|
+
/**
|
|
1621
|
+
* @typedef {boolean | ((error: Error) => void)} OverlayMessageOptions
|
|
1622
|
+
*/
|
|
1623
|
+
/**
|
|
1624
|
+
* @typedef {Object} ClientConfiguration
|
|
1625
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1626
|
+
* @property {boolean | { warnings?: OverlayMessageOptions, errors?: OverlayMessageOptions, runtimeErrors?: OverlayMessageOptions }} [overlay]
|
|
1627
|
+
* @property {boolean} [progress]
|
|
1628
|
+
* @property {boolean | number} [reconnect]
|
|
1629
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1630
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
1631
|
+
*/
|
|
1632
|
+
/**
|
|
1633
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1634
|
+
*/
|
|
1635
|
+
/**
|
|
1636
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1637
|
+
*/
|
|
1638
|
+
/**
|
|
1639
|
+
* @typedef {Object} Configuration
|
|
1640
|
+
* @property {boolean | string} [ipc]
|
|
1641
|
+
* @property {Host} [host]
|
|
1642
|
+
* @property {Port} [port]
|
|
1643
|
+
* @property {boolean | "only"} [hot]
|
|
1644
|
+
* @property {boolean} [liveReload]
|
|
1645
|
+
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1646
|
+
* @property {boolean} [compress]
|
|
1647
|
+
* @property {boolean} [magicHtml]
|
|
1648
|
+
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1649
|
+
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1650
|
+
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1651
|
+
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1652
|
+
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1653
|
+
* @property {boolean | ServerOptions} [https]
|
|
1654
|
+
* @property {boolean} [http2]
|
|
1655
|
+
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1656
|
+
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1657
|
+
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1658
|
+
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1659
|
+
* @property {boolean} [setupExitSignals]
|
|
1660
|
+
* @property {boolean | ClientConfiguration} [client]
|
|
1661
|
+
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1662
|
+
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1663
|
+
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1664
|
+
* @property {(devServer: Server) => void} [onListening]
|
|
1665
|
+
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1666
|
+
*/
|
|
1606
1667
|
$ref: string;
|
|
1607
1668
|
};
|
|
1608
1669
|
webSocketURL: {
|
|
@@ -1610,11 +1671,151 @@ declare class Server {
|
|
|
1610
1671
|
};
|
|
1611
1672
|
};
|
|
1612
1673
|
enum?: undefined;
|
|
1613
|
-
cli?: undefined
|
|
1674
|
+
cli?: undefined;
|
|
1614
1675
|
}
|
|
1615
1676
|
)[];
|
|
1616
1677
|
};
|
|
1617
1678
|
ClientLogging: {
|
|
1679
|
+
/**
|
|
1680
|
+
* @template Request, Response
|
|
1681
|
+
* @typedef {import("webpack-dev-middleware").Options<Request, Response>} DevMiddlewareOptions
|
|
1682
|
+
*/
|
|
1683
|
+
/**
|
|
1684
|
+
* @template Request, Response
|
|
1685
|
+
* @typedef {import("webpack-dev-middleware").Context<Request, Response>} DevMiddlewareContext
|
|
1686
|
+
*/
|
|
1687
|
+
/**
|
|
1688
|
+
* @typedef {"local-ip" | "local-ipv4" | "local-ipv6" | string} Host
|
|
1689
|
+
*/
|
|
1690
|
+
/**
|
|
1691
|
+
* @typedef {number | string | "auto"} Port
|
|
1692
|
+
*/
|
|
1693
|
+
/**
|
|
1694
|
+
* @typedef {Object} WatchFiles
|
|
1695
|
+
* @property {string | string[]} paths
|
|
1696
|
+
* @property {WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [options]
|
|
1697
|
+
*/
|
|
1698
|
+
/**
|
|
1699
|
+
* @typedef {Object} Static
|
|
1700
|
+
* @property {string} [directory]
|
|
1701
|
+
* @property {string | string[]} [publicPath]
|
|
1702
|
+
* @property {boolean | ServeIndexOptions} [serveIndex]
|
|
1703
|
+
* @property {ServeStaticOptions} [staticOptions]
|
|
1704
|
+
* @property {boolean | WatchOptions & { aggregateTimeout?: number, ignored?: WatchOptions["ignored"], poll?: number | boolean }} [watch]
|
|
1705
|
+
*/
|
|
1706
|
+
/**
|
|
1707
|
+
* @typedef {Object} NormalizedStatic
|
|
1708
|
+
* @property {string} directory
|
|
1709
|
+
* @property {string[]} publicPath
|
|
1710
|
+
* @property {false | ServeIndexOptions} serveIndex
|
|
1711
|
+
* @property {ServeStaticOptions} staticOptions
|
|
1712
|
+
* @property {false | WatchOptions} watch
|
|
1713
|
+
*/
|
|
1714
|
+
/**
|
|
1715
|
+
* @typedef {Object} ServerConfiguration
|
|
1716
|
+
* @property {"http" | "https" | "spdy" | string} [type]
|
|
1717
|
+
* @property {ServerOptions} [options]
|
|
1718
|
+
*/
|
|
1719
|
+
/**
|
|
1720
|
+
* @typedef {Object} WebSocketServerConfiguration
|
|
1721
|
+
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
1722
|
+
* @property {Record<string, any>} [options]
|
|
1723
|
+
*/
|
|
1724
|
+
/**
|
|
1725
|
+
* @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
|
|
1726
|
+
*/
|
|
1727
|
+
/**
|
|
1728
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
1729
|
+
*/
|
|
1730
|
+
/**
|
|
1731
|
+
* @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
|
|
1732
|
+
*/
|
|
1733
|
+
/**
|
|
1734
|
+
* @callback ByPass
|
|
1735
|
+
* @param {Request} req
|
|
1736
|
+
* @param {Response} res
|
|
1737
|
+
* @param {ProxyConfigArrayItem} proxyConfig
|
|
1738
|
+
*/
|
|
1739
|
+
/**
|
|
1740
|
+
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
1741
|
+
*/
|
|
1742
|
+
/**
|
|
1743
|
+
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
1744
|
+
*/
|
|
1745
|
+
/**
|
|
1746
|
+
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
1747
|
+
*/
|
|
1748
|
+
/**
|
|
1749
|
+
* @typedef {Object} OpenApp
|
|
1750
|
+
* @property {string} [name]
|
|
1751
|
+
* @property {string[]} [arguments]
|
|
1752
|
+
*/
|
|
1753
|
+
/**
|
|
1754
|
+
* @typedef {Object} Open
|
|
1755
|
+
* @property {string | string[] | OpenApp} [app]
|
|
1756
|
+
* @property {string | string[]} [target]
|
|
1757
|
+
*/
|
|
1758
|
+
/**
|
|
1759
|
+
* @typedef {Object} NormalizedOpen
|
|
1760
|
+
* @property {string} target
|
|
1761
|
+
* @property {import("open").Options} options
|
|
1762
|
+
*/
|
|
1763
|
+
/**
|
|
1764
|
+
* @typedef {Object} WebSocketURL
|
|
1765
|
+
* @property {string} [hostname]
|
|
1766
|
+
* @property {string} [password]
|
|
1767
|
+
* @property {string} [pathname]
|
|
1768
|
+
* @property {number | string} [port]
|
|
1769
|
+
* @property {string} [protocol]
|
|
1770
|
+
* @property {string} [username]
|
|
1771
|
+
*/
|
|
1772
|
+
/**
|
|
1773
|
+
* @typedef {boolean | ((error: Error) => void)} OverlayMessageOptions
|
|
1774
|
+
*/
|
|
1775
|
+
/**
|
|
1776
|
+
* @typedef {Object} ClientConfiguration
|
|
1777
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1778
|
+
* @property {boolean | { warnings?: OverlayMessageOptions, errors?: OverlayMessageOptions, runtimeErrors?: OverlayMessageOptions }} [overlay]
|
|
1779
|
+
* @property {boolean} [progress]
|
|
1780
|
+
* @property {boolean | number} [reconnect]
|
|
1781
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1782
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
1783
|
+
*/
|
|
1784
|
+
/**
|
|
1785
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1786
|
+
*/
|
|
1787
|
+
/**
|
|
1788
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1789
|
+
*/
|
|
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
|
+
*/
|
|
1618
1819
|
enum: string[];
|
|
1619
1820
|
description: string;
|
|
1620
1821
|
link: string;
|
|
@@ -1636,25 +1837,158 @@ declare class Server {
|
|
|
1636
1837
|
additionalProperties: boolean;
|
|
1637
1838
|
properties: {
|
|
1638
1839
|
errors: {
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1840
|
+
anyOf: (
|
|
1841
|
+
| {
|
|
1842
|
+
description: string;
|
|
1843
|
+
type: string;
|
|
1844
|
+
cli: {
|
|
1845
|
+
negatedDescription: string;
|
|
1846
|
+
};
|
|
1847
|
+
instanceof?: undefined;
|
|
1848
|
+
}
|
|
1849
|
+
| {
|
|
1850
|
+
instanceof: string;
|
|
1851
|
+
/**
|
|
1852
|
+
* @typedef {Object} WebSocketServerConfiguration
|
|
1853
|
+
* @property {"sockjs" | "ws" | string | Function} [type]
|
|
1854
|
+
* @property {Record<string, any>} [options]
|
|
1855
|
+
*/
|
|
1856
|
+
/**
|
|
1857
|
+
* @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
|
|
1858
|
+
*/
|
|
1859
|
+
/**
|
|
1860
|
+
* @typedef {import("ws").WebSocketServer | import("sockjs").Server & { close: import("ws").WebSocketServer["close"] }} WebSocketServer
|
|
1861
|
+
*/
|
|
1862
|
+
/**
|
|
1863
|
+
* @typedef {{ implementation: WebSocketServer, clients: ClientConnection[] }} WebSocketServerImplementation
|
|
1864
|
+
*/
|
|
1865
|
+
/**
|
|
1866
|
+
* @callback ByPass
|
|
1867
|
+
* @param {Request} req
|
|
1868
|
+
* @param {Response} res
|
|
1869
|
+
* @param {ProxyConfigArrayItem} proxyConfig
|
|
1870
|
+
*/
|
|
1871
|
+
/**
|
|
1872
|
+
* @typedef {{ path?: HttpProxyMiddlewareOptionsFilter | undefined, context?: HttpProxyMiddlewareOptionsFilter | undefined } & { bypass?: ByPass } & HttpProxyMiddlewareOptions } ProxyConfigArrayItem
|
|
1873
|
+
*/
|
|
1874
|
+
/**
|
|
1875
|
+
* @typedef {(ProxyConfigArrayItem | ((req?: Request | undefined, res?: Response | undefined, next?: NextFunction | undefined) => ProxyConfigArrayItem))[]} ProxyConfigArray
|
|
1876
|
+
*/
|
|
1877
|
+
/**
|
|
1878
|
+
* @typedef {{ [url: string]: string | ProxyConfigArrayItem }} ProxyConfigMap
|
|
1879
|
+
*/
|
|
1880
|
+
/**
|
|
1881
|
+
* @typedef {Object} OpenApp
|
|
1882
|
+
* @property {string} [name]
|
|
1883
|
+
* @property {string[]} [arguments]
|
|
1884
|
+
*/
|
|
1885
|
+
/**
|
|
1886
|
+
* @typedef {Object} Open
|
|
1887
|
+
* @property {string | string[] | OpenApp} [app]
|
|
1888
|
+
* @property {string | string[]} [target]
|
|
1889
|
+
*/
|
|
1890
|
+
/**
|
|
1891
|
+
* @typedef {Object} NormalizedOpen
|
|
1892
|
+
* @property {string} target
|
|
1893
|
+
* @property {import("open").Options} options
|
|
1894
|
+
*/
|
|
1895
|
+
/**
|
|
1896
|
+
* @typedef {Object} WebSocketURL
|
|
1897
|
+
* @property {string} [hostname]
|
|
1898
|
+
* @property {string} [password]
|
|
1899
|
+
* @property {string} [pathname]
|
|
1900
|
+
* @property {number | string} [port]
|
|
1901
|
+
* @property {string} [protocol]
|
|
1902
|
+
* @property {string} [username]
|
|
1903
|
+
*/
|
|
1904
|
+
/**
|
|
1905
|
+
* @typedef {boolean | ((error: Error) => void)} OverlayMessageOptions
|
|
1906
|
+
*/
|
|
1907
|
+
/**
|
|
1908
|
+
* @typedef {Object} ClientConfiguration
|
|
1909
|
+
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1910
|
+
* @property {boolean | { warnings?: OverlayMessageOptions, errors?: OverlayMessageOptions, runtimeErrors?: OverlayMessageOptions }} [overlay]
|
|
1911
|
+
* @property {boolean} [progress]
|
|
1912
|
+
* @property {boolean | number} [reconnect]
|
|
1913
|
+
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1914
|
+
* @property {string | WebSocketURL} [webSocketURL]
|
|
1915
|
+
*/
|
|
1916
|
+
/**
|
|
1917
|
+
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1918
|
+
*/
|
|
1919
|
+
/**
|
|
1920
|
+
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1921
|
+
*/
|
|
1922
|
+
/**
|
|
1923
|
+
* @typedef {Object} Configuration
|
|
1924
|
+
* @property {boolean | string} [ipc]
|
|
1925
|
+
* @property {Host} [host]
|
|
1926
|
+
* @property {Port} [port]
|
|
1927
|
+
* @property {boolean | "only"} [hot]
|
|
1928
|
+
* @property {boolean} [liveReload]
|
|
1929
|
+
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1930
|
+
* @property {boolean} [compress]
|
|
1931
|
+
* @property {boolean} [magicHtml]
|
|
1932
|
+
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1933
|
+
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1934
|
+
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1935
|
+
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1936
|
+
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1937
|
+
* @property {boolean | ServerOptions} [https]
|
|
1938
|
+
* @property {boolean} [http2]
|
|
1939
|
+
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1940
|
+
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1941
|
+
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1942
|
+
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1943
|
+
* @property {boolean} [setupExitSignals]
|
|
1944
|
+
* @property {boolean | ClientConfiguration} [client]
|
|
1945
|
+
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1946
|
+
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1947
|
+
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1948
|
+
* @property {(devServer: Server) => void} [onListening]
|
|
1949
|
+
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1950
|
+
*/
|
|
1951
|
+
description: string;
|
|
1952
|
+
type?: undefined;
|
|
1953
|
+
cli?: undefined;
|
|
1954
|
+
}
|
|
1955
|
+
)[];
|
|
1644
1956
|
};
|
|
1645
1957
|
warnings: {
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1958
|
+
anyOf: (
|
|
1959
|
+
| {
|
|
1960
|
+
description: string;
|
|
1961
|
+
type: string;
|
|
1962
|
+
cli: {
|
|
1963
|
+
negatedDescription: string;
|
|
1964
|
+
};
|
|
1965
|
+
instanceof?: undefined;
|
|
1966
|
+
}
|
|
1967
|
+
| {
|
|
1968
|
+
instanceof: string;
|
|
1969
|
+
description: string;
|
|
1970
|
+
type?: undefined;
|
|
1971
|
+
cli?: undefined;
|
|
1972
|
+
}
|
|
1973
|
+
)[];
|
|
1651
1974
|
};
|
|
1652
1975
|
runtimeErrors: {
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1976
|
+
anyOf: (
|
|
1977
|
+
| {
|
|
1978
|
+
description: string;
|
|
1979
|
+
type: string;
|
|
1980
|
+
cli: {
|
|
1981
|
+
negatedDescription: string;
|
|
1982
|
+
};
|
|
1983
|
+
instanceof?: undefined;
|
|
1984
|
+
}
|
|
1985
|
+
| {
|
|
1986
|
+
instanceof: string;
|
|
1987
|
+
description: string;
|
|
1988
|
+
type?: undefined;
|
|
1989
|
+
cli?: undefined;
|
|
1990
|
+
}
|
|
1991
|
+
)[];
|
|
1658
1992
|
};
|
|
1659
1993
|
trustedTypesPolicyName: {
|
|
1660
1994
|
description: string;
|
|
@@ -1663,7 +1997,7 @@ declare class Server {
|
|
|
1663
1997
|
};
|
|
1664
1998
|
description?: undefined;
|
|
1665
1999
|
link?: undefined;
|
|
1666
|
-
cli?: undefined
|
|
2000
|
+
cli?: undefined;
|
|
1667
2001
|
}
|
|
1668
2002
|
)[];
|
|
1669
2003
|
};
|
|
@@ -1681,74 +2015,6 @@ declare class Server {
|
|
|
1681
2015
|
anyOf: (
|
|
1682
2016
|
| {
|
|
1683
2017
|
type: string;
|
|
1684
|
-
/**
|
|
1685
|
-
* @typedef {Object} OpenApp
|
|
1686
|
-
* @property {string} [name]
|
|
1687
|
-
* @property {string[]} [arguments]
|
|
1688
|
-
*/
|
|
1689
|
-
/**
|
|
1690
|
-
* @typedef {Object} Open
|
|
1691
|
-
* @property {string | string[] | OpenApp} [app]
|
|
1692
|
-
* @property {string | string[]} [target]
|
|
1693
|
-
*/
|
|
1694
|
-
/**
|
|
1695
|
-
* @typedef {Object} NormalizedOpen
|
|
1696
|
-
* @property {string} target
|
|
1697
|
-
* @property {import("open").Options} options
|
|
1698
|
-
*/
|
|
1699
|
-
/**
|
|
1700
|
-
* @typedef {Object} WebSocketURL
|
|
1701
|
-
* @property {string} [hostname]
|
|
1702
|
-
* @property {string} [password]
|
|
1703
|
-
* @property {string} [pathname]
|
|
1704
|
-
* @property {number | string} [port]
|
|
1705
|
-
* @property {string} [protocol]
|
|
1706
|
-
* @property {string} [username]
|
|
1707
|
-
*/
|
|
1708
|
-
/**
|
|
1709
|
-
* @typedef {Object} ClientConfiguration
|
|
1710
|
-
* @property {"log" | "info" | "warn" | "error" | "none" | "verbose"} [logging]
|
|
1711
|
-
* @property {boolean | { warnings?: boolean, errors?: boolean, runtimeErrors?: boolean }} [overlay]
|
|
1712
|
-
* @property {boolean} [progress]
|
|
1713
|
-
* @property {boolean | number} [reconnect]
|
|
1714
|
-
* @property {"ws" | "sockjs" | string} [webSocketTransport]
|
|
1715
|
-
* @property {string | WebSocketURL} [webSocketURL]
|
|
1716
|
-
*/
|
|
1717
|
-
/**
|
|
1718
|
-
* @typedef {Array<{ key: string; value: string }> | Record<string, string | string[]>} Headers
|
|
1719
|
-
*/
|
|
1720
|
-
/**
|
|
1721
|
-
* @typedef {{ name?: string, path?: string, middleware: ExpressRequestHandler | ExpressErrorRequestHandler } | ExpressRequestHandler | ExpressErrorRequestHandler} Middleware
|
|
1722
|
-
*/
|
|
1723
|
-
/**
|
|
1724
|
-
* @typedef {Object} Configuration
|
|
1725
|
-
* @property {boolean | string} [ipc]
|
|
1726
|
-
* @property {Host} [host]
|
|
1727
|
-
* @property {Port} [port]
|
|
1728
|
-
* @property {boolean | "only"} [hot]
|
|
1729
|
-
* @property {boolean} [liveReload]
|
|
1730
|
-
* @property {DevMiddlewareOptions<Request, Response>} [devMiddleware]
|
|
1731
|
-
* @property {boolean} [compress]
|
|
1732
|
-
* @property {boolean} [magicHtml]
|
|
1733
|
-
* @property {"auto" | "all" | string | string[]} [allowedHosts]
|
|
1734
|
-
* @property {boolean | ConnectHistoryApiFallbackOptions} [historyApiFallback]
|
|
1735
|
-
* @property {boolean | Record<string, never> | BonjourOptions} [bonjour]
|
|
1736
|
-
* @property {string | string[] | WatchFiles | Array<string | WatchFiles>} [watchFiles]
|
|
1737
|
-
* @property {boolean | string | Static | Array<string | Static>} [static]
|
|
1738
|
-
* @property {boolean | ServerOptions} [https]
|
|
1739
|
-
* @property {boolean} [http2]
|
|
1740
|
-
* @property {"http" | "https" | "spdy" | string | ServerConfiguration} [server]
|
|
1741
|
-
* @property {boolean | "sockjs" | "ws" | string | WebSocketServerConfiguration} [webSocketServer]
|
|
1742
|
-
* @property {ProxyConfigMap | ProxyConfigArrayItem | ProxyConfigArray} [proxy]
|
|
1743
|
-
* @property {boolean | string | Open | Array<string | Open>} [open]
|
|
1744
|
-
* @property {boolean} [setupExitSignals]
|
|
1745
|
-
* @property {boolean | ClientConfiguration} [client]
|
|
1746
|
-
* @property {Headers | ((req: Request, res: Response, context: DevMiddlewareContext<Request, Response>) => Headers)} [headers]
|
|
1747
|
-
* @property {(devServer: Server) => void} [onAfterSetupMiddleware]
|
|
1748
|
-
* @property {(devServer: Server) => void} [onBeforeSetupMiddleware]
|
|
1749
|
-
* @property {(devServer: Server) => void} [onListening]
|
|
1750
|
-
* @property {(middlewares: Middleware[], devServer: Server) => Middleware[]} [setupMiddlewares]
|
|
1751
|
-
*/
|
|
1752
2018
|
cli: {
|
|
1753
2019
|
negatedDescription: string;
|
|
1754
2020
|
};
|
|
@@ -1757,7 +2023,7 @@ declare class Server {
|
|
|
1757
2023
|
| {
|
|
1758
2024
|
type: string;
|
|
1759
2025
|
minimum: number;
|
|
1760
|
-
cli?: undefined
|
|
2026
|
+
cli?: undefined;
|
|
1761
2027
|
}
|
|
1762
2028
|
)[];
|
|
1763
2029
|
};
|
|
@@ -1787,35 +2053,6 @@ declare class Server {
|
|
|
1787
2053
|
}
|
|
1788
2054
|
| {
|
|
1789
2055
|
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
2056
|
additionalProperties: boolean;
|
|
1820
2057
|
properties: {
|
|
1821
2058
|
hostname: {
|
|
@@ -1915,6 +2152,10 @@ declare class Server {
|
|
|
1915
2152
|
negatedDescription: string;
|
|
1916
2153
|
};
|
|
1917
2154
|
};
|
|
2155
|
+
/**
|
|
2156
|
+
* @private
|
|
2157
|
+
* @type {string | undefined}
|
|
2158
|
+
*/
|
|
1918
2159
|
ca: {
|
|
1919
2160
|
anyOf: (
|
|
1920
2161
|
| {
|
|
@@ -2116,7 +2357,7 @@ declare class Server {
|
|
|
2116
2357
|
description: string;
|
|
2117
2358
|
};
|
|
2118
2359
|
};
|
|
2119
|
-
cli?: undefined
|
|
2360
|
+
cli?: undefined;
|
|
2120
2361
|
}
|
|
2121
2362
|
)[];
|
|
2122
2363
|
description: string;
|
|
@@ -2172,16 +2413,15 @@ declare class Server {
|
|
|
2172
2413
|
cli: {
|
|
2173
2414
|
negatedDescription: string;
|
|
2174
2415
|
};
|
|
2175
|
-
|
|
2416
|
+
description?: undefined;
|
|
2176
2417
|
link?: undefined;
|
|
2177
2418
|
}
|
|
2178
2419
|
| {
|
|
2179
2420
|
type: string;
|
|
2180
|
-
/** @type {ClientConfiguration} */
|
|
2181
2421
|
description: string;
|
|
2182
|
-
link: string;
|
|
2183
2422
|
/** @type {{ type: WebSocketServerConfiguration["type"], options: NonNullable<WebSocketServerConfiguration["options"]> }} */
|
|
2184
|
-
|
|
2423
|
+
link: string;
|
|
2424
|
+
cli?: undefined;
|
|
2185
2425
|
}
|
|
2186
2426
|
)[];
|
|
2187
2427
|
description: string;
|
|
@@ -2214,8 +2454,8 @@ declare class Server {
|
|
|
2214
2454
|
}
|
|
2215
2455
|
| {
|
|
2216
2456
|
enum: string[];
|
|
2217
|
-
type?: undefined;
|
|
2218
|
-
cli?: undefined
|
|
2457
|
+
/** @type {string} */ type?: undefined;
|
|
2458
|
+
cli?: undefined;
|
|
2219
2459
|
}
|
|
2220
2460
|
)[];
|
|
2221
2461
|
description: string;
|
|
@@ -2266,7 +2506,7 @@ declare class Server {
|
|
|
2266
2506
|
OnListening: {
|
|
2267
2507
|
instanceof: string;
|
|
2268
2508
|
description: string;
|
|
2269
|
-
|
|
2509
|
+
link: string;
|
|
2270
2510
|
};
|
|
2271
2511
|
Open: {
|
|
2272
2512
|
anyOf: (
|
|
@@ -2347,7 +2587,7 @@ declare class Server {
|
|
|
2347
2587
|
};
|
|
2348
2588
|
minLength?: undefined;
|
|
2349
2589
|
description?: undefined;
|
|
2350
|
-
cli?: undefined
|
|
2590
|
+
cli?: undefined;
|
|
2351
2591
|
}
|
|
2352
2592
|
| {
|
|
2353
2593
|
type: string;
|
|
@@ -2438,7 +2678,7 @@ declare class Server {
|
|
|
2438
2678
|
};
|
|
2439
2679
|
ServerString: {
|
|
2440
2680
|
type: string;
|
|
2441
|
-
minLength: number;
|
|
2681
|
+
/** @type {string} */ minLength: number;
|
|
2442
2682
|
cli: {
|
|
2443
2683
|
exclude: boolean;
|
|
2444
2684
|
};
|
|
@@ -2596,10 +2836,6 @@ declare class Server {
|
|
|
2596
2836
|
)[];
|
|
2597
2837
|
description: string;
|
|
2598
2838
|
};
|
|
2599
|
-
/**
|
|
2600
|
-
* @param {string | Static | undefined} [optionsForStatic]
|
|
2601
|
-
* @returns {NormalizedStatic}
|
|
2602
|
-
*/
|
|
2603
2839
|
key: {
|
|
2604
2840
|
anyOf: (
|
|
2605
2841
|
| {
|
|
@@ -2621,7 +2857,7 @@ declare class Server {
|
|
|
2621
2857
|
additionalProperties: boolean;
|
|
2622
2858
|
instanceof?: undefined;
|
|
2623
2859
|
}
|
|
2624
|
-
)[]
|
|
2860
|
+
)[];
|
|
2625
2861
|
};
|
|
2626
2862
|
instanceof?: undefined;
|
|
2627
2863
|
}
|
|
@@ -2638,6 +2874,7 @@ declare class Server {
|
|
|
2638
2874
|
)[];
|
|
2639
2875
|
description: string;
|
|
2640
2876
|
};
|
|
2877
|
+
/** @type {NormalizedStatic} */
|
|
2641
2878
|
pfx: {
|
|
2642
2879
|
anyOf: (
|
|
2643
2880
|
| {
|
|
@@ -2700,7 +2937,7 @@ declare class Server {
|
|
|
2700
2937
|
$ref: string;
|
|
2701
2938
|
}[];
|
|
2702
2939
|
};
|
|
2703
|
-
cli?: undefined
|
|
2940
|
+
cli?: undefined;
|
|
2704
2941
|
$ref?: undefined;
|
|
2705
2942
|
}
|
|
2706
2943
|
| {
|
|
@@ -2715,7 +2952,7 @@ declare class Server {
|
|
|
2715
2952
|
$ref: string;
|
|
2716
2953
|
type?: undefined;
|
|
2717
2954
|
items?: undefined;
|
|
2718
|
-
cli?: undefined
|
|
2955
|
+
cli?: undefined;
|
|
2719
2956
|
}
|
|
2720
2957
|
)[];
|
|
2721
2958
|
description: string;
|
|
@@ -2766,7 +3003,7 @@ declare class Server {
|
|
|
2766
3003
|
| {
|
|
2767
3004
|
type: string;
|
|
2768
3005
|
additionalProperties: boolean;
|
|
2769
|
-
cli?: undefined
|
|
3006
|
+
cli?: undefined;
|
|
2770
3007
|
}
|
|
2771
3008
|
)[];
|
|
2772
3009
|
description: string;
|
|
@@ -2786,7 +3023,7 @@ declare class Server {
|
|
|
2786
3023
|
type: string;
|
|
2787
3024
|
description: string;
|
|
2788
3025
|
link: string;
|
|
2789
|
-
cli?: undefined
|
|
3026
|
+
cli?: undefined;
|
|
2790
3027
|
}
|
|
2791
3028
|
)[];
|
|
2792
3029
|
description: string;
|
|
@@ -2877,7 +3114,7 @@ declare class Server {
|
|
|
2877
3114
|
| {
|
|
2878
3115
|
$ref: string;
|
|
2879
3116
|
enum?: undefined;
|
|
2880
|
-
cli?: undefined
|
|
3117
|
+
cli?: undefined;
|
|
2881
3118
|
}
|
|
2882
3119
|
)[];
|
|
2883
3120
|
cli: {
|
|
@@ -2920,10 +3157,6 @@ declare class Server {
|
|
|
2920
3157
|
};
|
|
2921
3158
|
client: {
|
|
2922
3159
|
$ref: string;
|
|
2923
|
-
/**
|
|
2924
|
-
* @param {string | Buffer | undefined} item
|
|
2925
|
-
* @returns {string | Buffer | undefined}
|
|
2926
|
-
*/
|
|
2927
3160
|
};
|
|
2928
3161
|
compress: {
|
|
2929
3162
|
$ref: string;
|
|
@@ -2965,7 +3198,7 @@ declare class Server {
|
|
|
2965
3198
|
$ref: string;
|
|
2966
3199
|
};
|
|
2967
3200
|
onListening: {
|
|
2968
|
-
$ref: string
|
|
3201
|
+
$ref: string;
|
|
2969
3202
|
};
|
|
2970
3203
|
open: {
|
|
2971
3204
|
$ref: string;
|
|
@@ -3148,14 +3381,14 @@ declare class Server {
|
|
|
3148
3381
|
private setupDevMiddleware;
|
|
3149
3382
|
middleware:
|
|
3150
3383
|
| import("webpack-dev-middleware").API<
|
|
3151
|
-
express.Request<
|
|
3384
|
+
import("express").Request<
|
|
3152
3385
|
import("express-serve-static-core").ParamsDictionary,
|
|
3153
3386
|
any,
|
|
3154
3387
|
any,
|
|
3155
3388
|
qs.ParsedQs,
|
|
3156
3389
|
Record<string, any>
|
|
3157
3390
|
>,
|
|
3158
|
-
express.Response<any, Record<string, any>>
|
|
3391
|
+
import("express").Response<any, Record<string, any>>
|
|
3159
3392
|
>
|
|
3160
3393
|
| null
|
|
3161
3394
|
| undefined;
|
|
@@ -3356,6 +3589,7 @@ declare namespace Server {
|
|
|
3356
3589
|
Open,
|
|
3357
3590
|
NormalizedOpen,
|
|
3358
3591
|
WebSocketURL,
|
|
3592
|
+
OverlayMessageOptions,
|
|
3359
3593
|
ClientConfiguration,
|
|
3360
3594
|
Headers,
|
|
3361
3595
|
Middleware,
|
|
@@ -3371,14 +3605,14 @@ type Configuration = {
|
|
|
3371
3605
|
liveReload?: boolean | undefined;
|
|
3372
3606
|
devMiddleware?:
|
|
3373
3607
|
| DevMiddlewareOptions<
|
|
3374
|
-
express.Request<
|
|
3608
|
+
import("express").Request<
|
|
3375
3609
|
import("express-serve-static-core").ParamsDictionary,
|
|
3376
3610
|
any,
|
|
3377
3611
|
any,
|
|
3378
3612
|
qs.ParsedQs,
|
|
3379
3613
|
Record<string, any>
|
|
3380
3614
|
>,
|
|
3381
|
-
express.Response<any, Record<string, any>>
|
|
3615
|
+
import("express").Response<any, Record<string, any>>
|
|
3382
3616
|
>
|
|
3383
3617
|
| undefined;
|
|
3384
3618
|
compress?: boolean | undefined;
|
|
@@ -3425,7 +3659,6 @@ type Configuration = {
|
|
|
3425
3659
|
};
|
|
3426
3660
|
type FSWatcher = import("chokidar").FSWatcher;
|
|
3427
3661
|
type Socket = import("net").Socket;
|
|
3428
|
-
import express = require("express");
|
|
3429
3662
|
type WebSocketServerImplementation = {
|
|
3430
3663
|
implementation: WebSocketServer;
|
|
3431
3664
|
clients: ClientConnection[];
|
|
@@ -3575,14 +3808,15 @@ type WebSocketURL = {
|
|
|
3575
3808
|
protocol?: string | undefined;
|
|
3576
3809
|
username?: string | undefined;
|
|
3577
3810
|
};
|
|
3811
|
+
type OverlayMessageOptions = boolean | ((error: Error) => void);
|
|
3578
3812
|
type ClientConfiguration = {
|
|
3579
3813
|
logging?: "none" | "error" | "warn" | "info" | "log" | "verbose" | undefined;
|
|
3580
3814
|
overlay?:
|
|
3581
3815
|
| boolean
|
|
3582
3816
|
| {
|
|
3583
|
-
warnings?:
|
|
3584
|
-
errors?:
|
|
3585
|
-
runtimeErrors?:
|
|
3817
|
+
warnings?: OverlayMessageOptions | undefined;
|
|
3818
|
+
errors?: OverlayMessageOptions | undefined;
|
|
3819
|
+
runtimeErrors?: OverlayMessageOptions | undefined;
|
|
3586
3820
|
}
|
|
3587
3821
|
| undefined;
|
|
3588
3822
|
progress?: boolean | undefined;
|