webpack-dev-server 4.4.0 → 4.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -65
- package/bin/cli-flags.js +268 -244
- package/bin/process-arguments.js +87 -7
- package/bin/webpack-dev-server.js +3 -0
- package/client/clients/SockJSClient.js +26 -3
- package/client/clients/WebSocketClient.js +16 -1
- package/client/index.js +76 -3
- package/client/modules/logger/index.js +3 -0
- package/client/modules/sockjs-client/index.js +18 -16
- package/client/overlay.js +38 -3
- package/client/socket.js +19 -8
- package/client/utils/createSocketURL.js +71 -4
- package/client/utils/getCurrentScriptSource.js +3 -0
- package/client/utils/log.js +6 -1
- package/client/utils/parseURL.js +17 -19
- package/client/utils/reloadApp.js +15 -2
- package/client/utils/sendMessage.js +5 -0
- package/lib/Server.js +1887 -824
- package/lib/options.json +42 -22
- package/lib/servers/BaseServer.js +8 -0
- package/lib/servers/SockJSServer.js +42 -9
- package/lib/servers/WebsocketServer.js +66 -35
- package/package.json +27 -17
- package/types/bin/cli-flags.d.ts +934 -0
- package/types/bin/process-arguments.d.ts +50 -0
- package/types/bin/webpack-dev-server.d.ts +27 -0
- package/types/lib/Server.d.ts +3388 -0
- package/types/lib/servers/BaseServer.d.ts +15 -0
- package/types/lib/servers/SockJSServer.d.ts +12 -0
- package/types/lib/servers/WebsocketServer.d.ts +13 -0
package/bin/process-arguments.js
CHANGED
|
@@ -5,8 +5,50 @@ const path = require("path");
|
|
|
5
5
|
// Based on https://github.com/webpack/webpack/blob/master/lib/cli.js
|
|
6
6
|
// Please do not modify it
|
|
7
7
|
|
|
8
|
+
/** @typedef {"unknown-argument" | "unexpected-non-array-in-path" | "unexpected-non-object-in-path" | "multiple-values-unexpected" | "invalid-value"} ProblemType */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @typedef {Object} Problem
|
|
12
|
+
* @property {ProblemType} type
|
|
13
|
+
* @property {string} path
|
|
14
|
+
* @property {string} argument
|
|
15
|
+
* @property {any=} value
|
|
16
|
+
* @property {number=} index
|
|
17
|
+
* @property {string=} expected
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @typedef {Object} LocalProblem
|
|
22
|
+
* @property {ProblemType} type
|
|
23
|
+
* @property {string} path
|
|
24
|
+
* @property {string=} expected
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @typedef {Object} ArgumentConfig
|
|
29
|
+
* @property {string} description
|
|
30
|
+
* @property {string} path
|
|
31
|
+
* @property {boolean} multiple
|
|
32
|
+
* @property {"enum"|"string"|"path"|"number"|"boolean"|"RegExp"|"reset"} type
|
|
33
|
+
* @property {any[]=} values
|
|
34
|
+
*/
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @typedef {Object} Argument
|
|
38
|
+
* @property {string} description
|
|
39
|
+
* @property {"string"|"number"|"boolean"} simpleType
|
|
40
|
+
* @property {boolean} multiple
|
|
41
|
+
* @property {ArgumentConfig[]} configs
|
|
42
|
+
*/
|
|
43
|
+
|
|
8
44
|
const cliAddedItems = new WeakMap();
|
|
9
45
|
|
|
46
|
+
/**
|
|
47
|
+
* @param {any} config configuration
|
|
48
|
+
* @param {string} schemaPath path in the config
|
|
49
|
+
* @param {number | undefined} index index of value when multiple values are provided, otherwise undefined
|
|
50
|
+
* @returns {{ problem?: LocalProblem, object?: any, property?: string | number, value?: any }} problem or object with property and value
|
|
51
|
+
*/
|
|
10
52
|
const getObjectAndProperty = (config, schemaPath, index = 0) => {
|
|
11
53
|
if (!schemaPath) {
|
|
12
54
|
return { value: config };
|
|
@@ -81,10 +123,10 @@ const getObjectAndProperty = (config, schemaPath, index = 0) => {
|
|
|
81
123
|
i++;
|
|
82
124
|
}
|
|
83
125
|
|
|
84
|
-
const value = current[property];
|
|
126
|
+
const value = current[/** @type {string} */ (property)];
|
|
85
127
|
|
|
86
|
-
if (property.endsWith("[]")) {
|
|
87
|
-
const name = property.slice(0, -2);
|
|
128
|
+
if (/** @type {string} */ (property).endsWith("[]")) {
|
|
129
|
+
const name = /** @type {string} */ (property).slice(0, -2);
|
|
88
130
|
// eslint-disable-next-line no-shadow
|
|
89
131
|
const value = current[name];
|
|
90
132
|
|
|
@@ -140,6 +182,11 @@ const getObjectAndProperty = (config, schemaPath, index = 0) => {
|
|
|
140
182
|
return { object: current, property, value };
|
|
141
183
|
};
|
|
142
184
|
|
|
185
|
+
/**
|
|
186
|
+
* @param {ArgumentConfig} argConfig processing instructions
|
|
187
|
+
* @param {any} value the value
|
|
188
|
+
* @returns {any | undefined} parsed value
|
|
189
|
+
*/
|
|
143
190
|
const parseValueForArgumentConfig = (argConfig, value) => {
|
|
144
191
|
// eslint-disable-next-line default-case
|
|
145
192
|
switch (argConfig.type) {
|
|
@@ -194,11 +241,11 @@ const parseValueForArgumentConfig = (argConfig, value) => {
|
|
|
194
241
|
|
|
195
242
|
break;
|
|
196
243
|
case "enum":
|
|
197
|
-
if (argConfig.values.includes(value)) {
|
|
244
|
+
if (/** @type {any[]} */ (argConfig.values).includes(value)) {
|
|
198
245
|
return value;
|
|
199
246
|
}
|
|
200
247
|
|
|
201
|
-
for (const item of argConfig.values) {
|
|
248
|
+
for (const item of /** @type {any[]} */ (argConfig.values)) {
|
|
202
249
|
if (`${item}` === value) return item;
|
|
203
250
|
}
|
|
204
251
|
|
|
@@ -212,6 +259,10 @@ const parseValueForArgumentConfig = (argConfig, value) => {
|
|
|
212
259
|
}
|
|
213
260
|
};
|
|
214
261
|
|
|
262
|
+
/**
|
|
263
|
+
* @param {ArgumentConfig} argConfig processing instructions
|
|
264
|
+
* @returns {string | undefined} expected message
|
|
265
|
+
*/
|
|
215
266
|
const getExpectedValue = (argConfig) => {
|
|
216
267
|
switch (argConfig.type) {
|
|
217
268
|
default:
|
|
@@ -221,12 +272,21 @@ const getExpectedValue = (argConfig) => {
|
|
|
221
272
|
case "RegExp":
|
|
222
273
|
return "regular expression (example: /ab?c*/)";
|
|
223
274
|
case "enum":
|
|
224
|
-
return
|
|
275
|
+
return /** @type {any[]} */ (argConfig.values)
|
|
276
|
+
.map((v) => `${v}`)
|
|
277
|
+
.join(" | ");
|
|
225
278
|
case "reset":
|
|
226
279
|
return "true (will reset the previous value to an empty array)";
|
|
227
280
|
}
|
|
228
281
|
};
|
|
229
282
|
|
|
283
|
+
/**
|
|
284
|
+
* @param {any} config configuration
|
|
285
|
+
* @param {string} schemaPath path in the config
|
|
286
|
+
* @param {any} value parsed value
|
|
287
|
+
* @param {number | undefined} index index of value when multiple values are provided, otherwise undefined
|
|
288
|
+
* @returns {LocalProblem | null} problem or null for success
|
|
289
|
+
*/
|
|
230
290
|
const setValue = (config, schemaPath, value, index) => {
|
|
231
291
|
const { problem, object, property } = getObjectAndProperty(
|
|
232
292
|
config,
|
|
@@ -238,11 +298,18 @@ const setValue = (config, schemaPath, value, index) => {
|
|
|
238
298
|
return problem;
|
|
239
299
|
}
|
|
240
300
|
|
|
241
|
-
object[property] = value;
|
|
301
|
+
object[/** @type {string} */ (property)] = value;
|
|
242
302
|
|
|
243
303
|
return null;
|
|
244
304
|
};
|
|
245
305
|
|
|
306
|
+
/**
|
|
307
|
+
* @param {ArgumentConfig} argConfig processing instructions
|
|
308
|
+
* @param {any} config configuration
|
|
309
|
+
* @param {any} value the value
|
|
310
|
+
* @param {number | undefined} index the index if multiple values provided
|
|
311
|
+
* @returns {LocalProblem | null} a problem if any
|
|
312
|
+
*/
|
|
246
313
|
const processArgumentConfig = (argConfig, config, value, index) => {
|
|
247
314
|
// eslint-disable-next-line no-undefined
|
|
248
315
|
if (index !== undefined && !argConfig.multiple) {
|
|
@@ -272,7 +339,16 @@ const processArgumentConfig = (argConfig, config, value, index) => {
|
|
|
272
339
|
return null;
|
|
273
340
|
};
|
|
274
341
|
|
|
342
|
+
/**
|
|
343
|
+
* @param {Record<string, Argument>} args object of arguments
|
|
344
|
+
* @param {any} config configuration
|
|
345
|
+
* @param {Record<string, string | number | boolean | RegExp | (string | number | boolean | RegExp)[]>} values object with values
|
|
346
|
+
* @returns {Problem[] | null} problems or null for success
|
|
347
|
+
*/
|
|
275
348
|
const processArguments = (args, config, values) => {
|
|
349
|
+
/**
|
|
350
|
+
* @type {Problem[]}
|
|
351
|
+
*/
|
|
276
352
|
const problems = [];
|
|
277
353
|
|
|
278
354
|
for (const key of Object.keys(values)) {
|
|
@@ -289,6 +365,10 @@ const processArguments = (args, config, values) => {
|
|
|
289
365
|
continue;
|
|
290
366
|
}
|
|
291
367
|
|
|
368
|
+
/**
|
|
369
|
+
* @param {any} value
|
|
370
|
+
* @param {number | undefined} i
|
|
371
|
+
*/
|
|
292
372
|
const processValue = (value, i) => {
|
|
293
373
|
const currentProblems = [];
|
|
294
374
|
|
|
@@ -2,38 +2,61 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
2
2
|
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4
4
|
|
|
5
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
6
|
|
|
7
7
|
import SockJS from "../modules/sockjs-client/index.js";
|
|
8
8
|
import { log } from "../utils/log.js";
|
|
9
9
|
|
|
10
10
|
var SockJSClient = /*#__PURE__*/function () {
|
|
11
|
+
/**
|
|
12
|
+
* @param {string} url
|
|
13
|
+
*/
|
|
11
14
|
function SockJSClient(url) {
|
|
12
15
|
_classCallCheck(this, SockJSClient);
|
|
13
16
|
|
|
14
17
|
// SockJS requires `http` and `https` protocols
|
|
15
18
|
this.sock = new SockJS(url.replace(/^ws:/i, "http:").replace(/^wss:/i, "https:"));
|
|
16
19
|
|
|
17
|
-
this.sock.onerror =
|
|
20
|
+
this.sock.onerror =
|
|
21
|
+
/**
|
|
22
|
+
* @param {Error} error
|
|
23
|
+
*/
|
|
24
|
+
function (error) {
|
|
18
25
|
log.error(error);
|
|
19
26
|
};
|
|
20
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* @param {(...args: any[]) => void} f
|
|
30
|
+
*/
|
|
31
|
+
|
|
21
32
|
|
|
22
33
|
_createClass(SockJSClient, [{
|
|
23
34
|
key: "onOpen",
|
|
24
35
|
value: function onOpen(f) {
|
|
25
36
|
this.sock.onopen = f;
|
|
26
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* @param {(...args: any[]) => void} f
|
|
40
|
+
*/
|
|
41
|
+
|
|
27
42
|
}, {
|
|
28
43
|
key: "onClose",
|
|
29
44
|
value: function onClose(f) {
|
|
30
45
|
this.sock.onclose = f;
|
|
31
46
|
} // call f with the message string as the first argument
|
|
32
47
|
|
|
48
|
+
/**
|
|
49
|
+
* @param {(...args: any[]) => void} f
|
|
50
|
+
*/
|
|
51
|
+
|
|
33
52
|
}, {
|
|
34
53
|
key: "onMessage",
|
|
35
54
|
value: function onMessage(f) {
|
|
36
|
-
this.sock.onmessage =
|
|
55
|
+
this.sock.onmessage =
|
|
56
|
+
/**
|
|
57
|
+
* @param {Error & { data: string }} e
|
|
58
|
+
*/
|
|
59
|
+
function (e) {
|
|
37
60
|
f(e.data);
|
|
38
61
|
};
|
|
39
62
|
}
|
|
@@ -2,11 +2,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
2
2
|
|
|
3
3
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
4
4
|
|
|
5
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
5
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
6
6
|
|
|
7
7
|
import { log } from "../utils/log.js";
|
|
8
8
|
|
|
9
9
|
var WebSocketClient = /*#__PURE__*/function () {
|
|
10
|
+
/**
|
|
11
|
+
* @param {string} url
|
|
12
|
+
*/
|
|
10
13
|
function WebSocketClient(url) {
|
|
11
14
|
_classCallCheck(this, WebSocketClient);
|
|
12
15
|
|
|
@@ -16,18 +19,30 @@ var WebSocketClient = /*#__PURE__*/function () {
|
|
|
16
19
|
log.error(error);
|
|
17
20
|
};
|
|
18
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* @param {(...args: any[]) => void} f
|
|
24
|
+
*/
|
|
25
|
+
|
|
19
26
|
|
|
20
27
|
_createClass(WebSocketClient, [{
|
|
21
28
|
key: "onOpen",
|
|
22
29
|
value: function onOpen(f) {
|
|
23
30
|
this.client.onopen = f;
|
|
24
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* @param {(...args: any[]) => void} f
|
|
34
|
+
*/
|
|
35
|
+
|
|
25
36
|
}, {
|
|
26
37
|
key: "onClose",
|
|
27
38
|
value: function onClose(f) {
|
|
28
39
|
this.client.onclose = f;
|
|
29
40
|
} // call f with the message string as the first argument
|
|
30
41
|
|
|
42
|
+
/**
|
|
43
|
+
* @param {(...args: any[]) => void} f
|
|
44
|
+
*/
|
|
45
|
+
|
|
31
46
|
}, {
|
|
32
47
|
key: "onMessage",
|
|
33
48
|
value: function onMessage(f) {
|
package/client/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/* global __resourceQuery, __webpack_hash__ */
|
|
2
|
+
/// <reference types="webpack/module" />
|
|
2
3
|
import webpackHotLog from "webpack/hot/log.js";
|
|
3
4
|
import stripAnsi from "./modules/strip-ansi/index.js";
|
|
4
5
|
import parseURL from "./utils/parseURL.js";
|
|
@@ -8,12 +9,35 @@ import { log, setLogLevel } from "./utils/log.js";
|
|
|
8
9
|
import sendMessage from "./utils/sendMessage.js";
|
|
9
10
|
import reloadApp from "./utils/reloadApp.js";
|
|
10
11
|
import createSocketURL from "./utils/createSocketURL.js";
|
|
12
|
+
/**
|
|
13
|
+
* @typedef {Object} Options
|
|
14
|
+
* @property {boolean} hot
|
|
15
|
+
* @property {boolean} liveReload
|
|
16
|
+
* @property {boolean} progress
|
|
17
|
+
* @property {boolean | { warnings?: boolean, errors?: boolean }} overlay
|
|
18
|
+
* @property {string} [logging]
|
|
19
|
+
* @property {number} [reconnect]
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @typedef {Object} Status
|
|
24
|
+
* @property {boolean} isUnloading
|
|
25
|
+
* @property {string} currentHash
|
|
26
|
+
* @property {string} [previousHash]
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @type {Status}
|
|
31
|
+
*/
|
|
32
|
+
|
|
11
33
|
var status = {
|
|
12
34
|
isUnloading: false,
|
|
13
35
|
// TODO Workaround for webpack v4, `__webpack_hash__` is not replaced without HotModuleReplacement
|
|
14
36
|
// eslint-disable-next-line camelcase
|
|
15
37
|
currentHash: typeof __webpack_hash__ !== "undefined" ? __webpack_hash__ : ""
|
|
16
38
|
};
|
|
39
|
+
/** @type {Options} */
|
|
40
|
+
|
|
17
41
|
var options = {
|
|
18
42
|
hot: false,
|
|
19
43
|
liveReload: false,
|
|
@@ -39,6 +63,10 @@ if (parsedResourceQuery.logging) {
|
|
|
39
63
|
if (typeof parsedResourceQuery.reconnect !== "undefined") {
|
|
40
64
|
options.reconnect = Number(parsedResourceQuery.reconnect);
|
|
41
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* @param {string} level
|
|
68
|
+
*/
|
|
69
|
+
|
|
42
70
|
|
|
43
71
|
function setAllLogLevel(level) {
|
|
44
72
|
// This is needed because the HMR logger operate separately from dev server logger
|
|
@@ -79,11 +107,19 @@ var onSocketMessage = {
|
|
|
79
107
|
|
|
80
108
|
sendMessage("Invalid");
|
|
81
109
|
},
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @param {string} hash
|
|
113
|
+
*/
|
|
82
114
|
hash: function hash(_hash) {
|
|
83
115
|
status.previousHash = status.currentHash;
|
|
84
116
|
status.currentHash = _hash;
|
|
85
117
|
},
|
|
86
118
|
logging: setAllLogLevel,
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* @param {boolean} value
|
|
122
|
+
*/
|
|
87
123
|
overlay: function overlay(value) {
|
|
88
124
|
if (typeof document === "undefined") {
|
|
89
125
|
return;
|
|
@@ -91,6 +127,10 @@ var onSocketMessage = {
|
|
|
91
127
|
|
|
92
128
|
options.overlay = value;
|
|
93
129
|
},
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @param {number} value
|
|
133
|
+
*/
|
|
94
134
|
reconnect: function reconnect(value) {
|
|
95
135
|
if (parsedResourceQuery.reconnect === "false") {
|
|
96
136
|
return;
|
|
@@ -98,9 +138,17 @@ var onSocketMessage = {
|
|
|
98
138
|
|
|
99
139
|
options.reconnect = value;
|
|
100
140
|
},
|
|
101
|
-
|
|
102
|
-
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* @param {boolean} value
|
|
144
|
+
*/
|
|
145
|
+
progress: function progress(value) {
|
|
146
|
+
options.progress = value;
|
|
103
147
|
},
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @param {{ pluginName?: string, percent: number, msg: string }} data
|
|
151
|
+
*/
|
|
104
152
|
"progress-update": function progressUpdate(data) {
|
|
105
153
|
if (options.progress) {
|
|
106
154
|
log.info("".concat(data.pluginName ? "[".concat(data.pluginName, "] ") : "").concat(data.percent, "% - ").concat(data.msg, "."));
|
|
@@ -127,15 +175,28 @@ var onSocketMessage = {
|
|
|
127
175
|
reloadApp(options, status);
|
|
128
176
|
},
|
|
129
177
|
// TODO: remove in v5 in favor of 'static-changed'
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* @param {string} file
|
|
181
|
+
*/
|
|
130
182
|
"content-changed": function contentChanged(file) {
|
|
131
183
|
log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));
|
|
132
184
|
self.location.reload();
|
|
133
185
|
},
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @param {string} file
|
|
189
|
+
*/
|
|
134
190
|
"static-changed": function staticChanged(file) {
|
|
135
191
|
log.info("".concat(file ? "\"".concat(file, "\"") : "Content", " from static directory was changed. Reloading..."));
|
|
136
192
|
self.location.reload();
|
|
137
193
|
},
|
|
138
|
-
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @param {Error[]} warnings
|
|
197
|
+
* @param {any} params
|
|
198
|
+
*/
|
|
199
|
+
warnings: function warnings(_warnings, params) {
|
|
139
200
|
log.warn("Warnings while compiling.");
|
|
140
201
|
|
|
141
202
|
var printableWarnings = _warnings.map(function (error) {
|
|
@@ -158,8 +219,16 @@ var onSocketMessage = {
|
|
|
158
219
|
show("warning", _warnings);
|
|
159
220
|
}
|
|
160
221
|
|
|
222
|
+
if (params && params.preventReloading) {
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
|
|
161
226
|
reloadApp(options, status);
|
|
162
227
|
},
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @param {Error[]} errors
|
|
231
|
+
*/
|
|
163
232
|
errors: function errors(_errors) {
|
|
164
233
|
log.error("Errors while compiling. Reload prevented.");
|
|
165
234
|
|
|
@@ -183,6 +252,10 @@ var onSocketMessage = {
|
|
|
183
252
|
show("error", _errors);
|
|
184
253
|
}
|
|
185
254
|
},
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* @param {Error} error
|
|
258
|
+
*/
|
|
186
259
|
error: function error(_error) {
|
|
187
260
|
log.error(_error);
|
|
188
261
|
},
|
|
@@ -87,6 +87,9 @@ function _defineProperties(target, props) {
|
|
|
87
87
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
88
88
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
89
89
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
90
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
91
|
+
writable: false
|
|
92
|
+
});
|
|
90
93
|
return Constructor;
|
|
91
94
|
}
|
|
92
95
|
|
|
@@ -1880,7 +1880,7 @@ module.exports = function (SockJS, availableTransports) {
|
|
|
1880
1880
|
"use strict";
|
|
1881
1881
|
|
|
1882
1882
|
|
|
1883
|
-
var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
1883
|
+
var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
1884
1884
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
1885
1885
|
JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js"),
|
|
1886
1886
|
objectUtils = __webpack_require__(/*! ./utils/object */ "./node_modules/sockjs-client/lib/utils/object.js");
|
|
@@ -1941,7 +1941,7 @@ module.exports = InfoAjax;
|
|
|
1941
1941
|
|
|
1942
1942
|
|
|
1943
1943
|
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
1944
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
1944
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
1945
1945
|
JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js"),
|
|
1946
1946
|
XHRLocalObject = __webpack_require__(/*! ./transport/sender/xhr-local */ "./node_modules/sockjs-client/lib/transport/sender/xhr-local.js"),
|
|
1947
1947
|
InfoAjax = __webpack_require__(/*! ./info-ajax */ "./node_modules/sockjs-client/lib/info-ajax.js");
|
|
@@ -1981,7 +1981,7 @@ module.exports = InfoReceiverIframe;
|
|
|
1981
1981
|
"use strict";
|
|
1982
1982
|
|
|
1983
1983
|
|
|
1984
|
-
var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
1984
|
+
var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
1985
1985
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
1986
1986
|
JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js"),
|
|
1987
1987
|
utils = __webpack_require__(/*! ./utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
|
|
@@ -2062,7 +2062,7 @@ module.exports = InfoIframe;
|
|
|
2062
2062
|
"use strict";
|
|
2063
2063
|
|
|
2064
2064
|
|
|
2065
|
-
var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
2065
|
+
var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
2066
2066
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
2067
2067
|
urlUtils = __webpack_require__(/*! ./utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
|
|
2068
2068
|
XDR = __webpack_require__(/*! ./transport/sender/xdr */ "./node_modules/sockjs-client/lib/transport/sender/xdr.js"),
|
|
@@ -3087,7 +3087,7 @@ __webpack_require__(/*! ./transport/websocket */ "./node_modules/sockjs-client/l
|
|
|
3087
3087
|
"use strict";
|
|
3088
3088
|
|
|
3089
3089
|
|
|
3090
|
-
var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
3090
|
+
var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
3091
3091
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
3092
3092
|
utils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
|
|
3093
3093
|
urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
|
|
@@ -3416,7 +3416,7 @@ module.exports = HtmlFileTransport;
|
|
|
3416
3416
|
|
|
3417
3417
|
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
3418
3418
|
JSON3 = __webpack_require__(/*! json3 */ "./node_modules/json3/lib/json3.js"),
|
|
3419
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
3419
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
3420
3420
|
version = __webpack_require__(/*! ../version */ "./node_modules/sockjs-client/lib/version.js"),
|
|
3421
3421
|
urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
|
|
3422
3422
|
iframeUtils = __webpack_require__(/*! ../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
|
|
@@ -3660,7 +3660,7 @@ module.exports = AjaxBasedTransport;
|
|
|
3660
3660
|
|
|
3661
3661
|
|
|
3662
3662
|
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
3663
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter;
|
|
3663
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
|
|
3664
3664
|
|
|
3665
3665
|
var debug = function debug() {};
|
|
3666
3666
|
|
|
@@ -3804,7 +3804,7 @@ module.exports = function (transport) {
|
|
|
3804
3804
|
|
|
3805
3805
|
|
|
3806
3806
|
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
3807
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter;
|
|
3807
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
|
|
3808
3808
|
|
|
3809
3809
|
var debug = function debug() {};
|
|
3810
3810
|
|
|
@@ -3926,7 +3926,7 @@ module.exports = SenderReceiver;
|
|
|
3926
3926
|
|
|
3927
3927
|
|
|
3928
3928
|
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
3929
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
3929
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
3930
3930
|
EventSourceDriver = __webpack_require__(/*! eventsource */ "./node_modules/sockjs-client/lib/transport/browser/eventsource.js");
|
|
3931
3931
|
|
|
3932
3932
|
var debug = function debug() {};
|
|
@@ -4007,7 +4007,7 @@ module.exports = EventSourceReceiver;
|
|
|
4007
4007
|
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
4008
4008
|
iframeUtils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs-client/lib/utils/iframe.js"),
|
|
4009
4009
|
urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
|
|
4010
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
4010
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
4011
4011
|
random = __webpack_require__(/*! ../../utils/random */ "./node_modules/sockjs-client/lib/utils/random.js");
|
|
4012
4012
|
|
|
4013
4013
|
var debug = function debug() {};
|
|
@@ -4108,7 +4108,7 @@ var utils = __webpack_require__(/*! ../../utils/iframe */ "./node_modules/sockjs
|
|
|
4108
4108
|
browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
|
|
4109
4109
|
urlUtils = __webpack_require__(/*! ../../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
|
|
4110
4110
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
4111
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter;
|
|
4111
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
|
|
4112
4112
|
|
|
4113
4113
|
var debug = function debug() {};
|
|
4114
4114
|
|
|
@@ -4312,7 +4312,7 @@ module.exports = JsonpReceiver;
|
|
|
4312
4312
|
|
|
4313
4313
|
|
|
4314
4314
|
var inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
4315
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter;
|
|
4315
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter);
|
|
4316
4316
|
|
|
4317
4317
|
var debug = function debug() {};
|
|
4318
4318
|
|
|
@@ -4514,7 +4514,7 @@ module.exports = function (url, payload, callback) {
|
|
|
4514
4514
|
"use strict";
|
|
4515
4515
|
|
|
4516
4516
|
|
|
4517
|
-
var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
4517
|
+
var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
4518
4518
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
4519
4519
|
eventUtils = __webpack_require__(/*! ../../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
|
|
4520
4520
|
browser = __webpack_require__(/*! ../../utils/browser */ "./node_modules/sockjs-client/lib/utils/browser.js"),
|
|
@@ -4660,10 +4660,12 @@ module.exports = XHRCorsObject;
|
|
|
4660
4660
|
"use strict";
|
|
4661
4661
|
|
|
4662
4662
|
|
|
4663
|
-
var EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
4663
|
+
var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
4664
4664
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
|
|
4665
4665
|
|
|
4666
|
-
function
|
|
4666
|
+
function
|
|
4667
|
+
/* method, url, payload, opts */
|
|
4668
|
+
XHRFake() {
|
|
4667
4669
|
var self = this;
|
|
4668
4670
|
EventEmitter.call(this);
|
|
4669
4671
|
this.to = setTimeout(function () {
|
|
@@ -4720,7 +4722,7 @@ module.exports = XHRLocalObject;
|
|
|
4720
4722
|
var utils = __webpack_require__(/*! ../utils/event */ "./node_modules/sockjs-client/lib/utils/event.js"),
|
|
4721
4723
|
urlUtils = __webpack_require__(/*! ../utils/url */ "./node_modules/sockjs-client/lib/utils/url.js"),
|
|
4722
4724
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js"),
|
|
4723
|
-
EventEmitter = __webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter,
|
|
4725
|
+
EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
4724
4726
|
WebsocketDriver = __webpack_require__(/*! ./driver/websocket */ "./node_modules/sockjs-client/lib/transport/browser/websocket.js");
|
|
4725
4727
|
|
|
4726
4728
|
var debug = function debug() {};
|