webpack-dev-server 5.0.3 → 5.1.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/README.md +1 -1
- package/client/clients/SockJSClient.js +5 -6
- package/client/clients/WebSocketClient.js +5 -6
- package/client/index.js +15 -2
- package/client/modules/logger/index.js +200 -113
- package/client/modules/sockjs-client/index.js +1 -1
- package/client/overlay/fsm.js +2 -2
- package/client/overlay.js +6 -6
- package/client/progress.js +124 -0
- package/client/utils/reloadApp.js +1 -1
- package/lib/Server.js +600 -369
- package/lib/options.json +23 -5
- package/package.json +30 -29
- package/types/bin/cli-flags.d.ts +15 -0
- package/types/lib/Server.d.ts +187 -282
- package/types/lib/servers/WebsocketServer.d.ts +0 -1
|
@@ -30,7 +30,7 @@ function SyncBailHook() {
|
|
|
30
30
|
/*!****************************************************!*\
|
|
31
31
|
!*** ./node_modules/webpack/lib/logging/Logger.js ***!
|
|
32
32
|
\****************************************************/
|
|
33
|
-
/***/ (function(
|
|
33
|
+
/***/ (function(module) {
|
|
34
34
|
|
|
35
35
|
/*
|
|
36
36
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
@@ -39,56 +39,47 @@ function SyncBailHook() {
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
function _toConsumableArray(
|
|
43
|
-
return _arrayWithoutHoles(
|
|
42
|
+
function _toConsumableArray(r) {
|
|
43
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
44
44
|
}
|
|
45
45
|
function _nonIterableSpread() {
|
|
46
46
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
47
47
|
}
|
|
48
|
-
function _unsupportedIterableToArray(
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
48
|
+
function _unsupportedIterableToArray(r, a) {
|
|
49
|
+
if (r) {
|
|
50
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
51
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
52
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
53
|
+
}
|
|
55
54
|
}
|
|
56
|
-
function _iterableToArray(
|
|
57
|
-
if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })
|
|
55
|
+
function _iterableToArray(r) {
|
|
56
|
+
if ("undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && null != r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
58
57
|
}
|
|
59
|
-
function _arrayWithoutHoles(
|
|
60
|
-
if (Array.isArray(
|
|
58
|
+
function _arrayWithoutHoles(r) {
|
|
59
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
61
60
|
}
|
|
62
|
-
function _arrayLikeToArray(
|
|
63
|
-
|
|
64
|
-
for (var
|
|
65
|
-
return
|
|
61
|
+
function _arrayLikeToArray(r, a) {
|
|
62
|
+
(null == a || a > r.length) && (a = r.length);
|
|
63
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
64
|
+
return n;
|
|
66
65
|
}
|
|
67
|
-
function _classCallCheck(
|
|
68
|
-
if (!(
|
|
69
|
-
throw new TypeError("Cannot call a class as a function");
|
|
70
|
-
}
|
|
66
|
+
function _classCallCheck(a, n) {
|
|
67
|
+
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
71
68
|
}
|
|
72
|
-
function _defineProperties(
|
|
73
|
-
for (var
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
descriptor.configurable = true;
|
|
77
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
78
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
69
|
+
function _defineProperties(e, r) {
|
|
70
|
+
for (var t = 0; t < r.length; t++) {
|
|
71
|
+
var o = r[t];
|
|
72
|
+
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
79
73
|
}
|
|
80
74
|
}
|
|
81
|
-
function _createClass(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
writable: false
|
|
86
|
-
});
|
|
87
|
-
return Constructor;
|
|
75
|
+
function _createClass(e, r, t) {
|
|
76
|
+
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
77
|
+
writable: !1
|
|
78
|
+
}), e;
|
|
88
79
|
}
|
|
89
80
|
function _toPropertyKey(t) {
|
|
90
81
|
var i = _toPrimitive(t, "string");
|
|
91
|
-
return "symbol" == typeof i ? i :
|
|
82
|
+
return "symbol" == typeof i ? i : i + "";
|
|
92
83
|
}
|
|
93
84
|
function _toPrimitive(t, r) {
|
|
94
85
|
if ("object" != typeof t || !t) return t;
|
|
@@ -101,40 +92,40 @@ function _toPrimitive(t, r) {
|
|
|
101
92
|
return ("string" === r ? String : Number)(t);
|
|
102
93
|
}
|
|
103
94
|
var LogType = Object.freeze({
|
|
104
|
-
error: (
|
|
95
|
+
error: (/** @type {"error"} */"error"),
|
|
105
96
|
// message, c style arguments
|
|
106
|
-
warn: (
|
|
97
|
+
warn: (/** @type {"warn"} */"warn"),
|
|
107
98
|
// message, c style arguments
|
|
108
|
-
info: (
|
|
99
|
+
info: (/** @type {"info"} */"info"),
|
|
109
100
|
// message, c style arguments
|
|
110
|
-
log: (
|
|
101
|
+
log: (/** @type {"log"} */"log"),
|
|
111
102
|
// message, c style arguments
|
|
112
|
-
debug: (
|
|
103
|
+
debug: (/** @type {"debug"} */"debug"),
|
|
113
104
|
// message, c style arguments
|
|
114
105
|
|
|
115
|
-
trace: (
|
|
106
|
+
trace: (/** @type {"trace"} */"trace"),
|
|
116
107
|
// no arguments
|
|
117
108
|
|
|
118
|
-
group: (
|
|
109
|
+
group: (/** @type {"group"} */"group"),
|
|
119
110
|
// [label]
|
|
120
|
-
groupCollapsed: (
|
|
111
|
+
groupCollapsed: (/** @type {"groupCollapsed"} */"groupCollapsed"),
|
|
121
112
|
// [label]
|
|
122
|
-
groupEnd: (
|
|
113
|
+
groupEnd: (/** @type {"groupEnd"} */"groupEnd"),
|
|
123
114
|
// [label]
|
|
124
115
|
|
|
125
|
-
profile: (
|
|
116
|
+
profile: (/** @type {"profile"} */"profile"),
|
|
126
117
|
// [profileName]
|
|
127
|
-
profileEnd: (
|
|
118
|
+
profileEnd: (/** @type {"profileEnd"} */"profileEnd"),
|
|
128
119
|
// [profileName]
|
|
129
120
|
|
|
130
|
-
time: (
|
|
121
|
+
time: (/** @type {"time"} */"time"),
|
|
131
122
|
// name, time as [seconds, nanoseconds]
|
|
132
123
|
|
|
133
|
-
clear: (
|
|
124
|
+
clear: (/** @type {"clear"} */"clear"),
|
|
134
125
|
// no arguments
|
|
135
|
-
status: (
|
|
126
|
+
status: (/** @type {"status"} */"status") // message, arguments
|
|
136
127
|
});
|
|
137
|
-
exports.LogType = LogType;
|
|
128
|
+
module.exports.LogType = LogType;
|
|
138
129
|
|
|
139
130
|
/** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */
|
|
140
131
|
|
|
@@ -151,7 +142,11 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
151
142
|
this[LOG_SYMBOL] = log;
|
|
152
143
|
this.getChildLogger = getChildLogger;
|
|
153
144
|
}
|
|
154
|
-
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @param {...any} args args
|
|
148
|
+
*/
|
|
149
|
+
return _createClass(WebpackLogger, [{
|
|
155
150
|
key: "error",
|
|
156
151
|
value: function error() {
|
|
157
152
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -159,6 +154,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
159
154
|
}
|
|
160
155
|
this[LOG_SYMBOL](LogType.error, args);
|
|
161
156
|
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @param {...any} args args
|
|
160
|
+
*/
|
|
162
161
|
}, {
|
|
163
162
|
key: "warn",
|
|
164
163
|
value: function warn() {
|
|
@@ -167,6 +166,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
167
166
|
}
|
|
168
167
|
this[LOG_SYMBOL](LogType.warn, args);
|
|
169
168
|
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @param {...any} args args
|
|
172
|
+
*/
|
|
170
173
|
}, {
|
|
171
174
|
key: "info",
|
|
172
175
|
value: function info() {
|
|
@@ -175,6 +178,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
175
178
|
}
|
|
176
179
|
this[LOG_SYMBOL](LogType.info, args);
|
|
177
180
|
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @param {...any} args args
|
|
184
|
+
*/
|
|
178
185
|
}, {
|
|
179
186
|
key: "log",
|
|
180
187
|
value: function log() {
|
|
@@ -183,6 +190,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
183
190
|
}
|
|
184
191
|
this[LOG_SYMBOL](LogType.log, args);
|
|
185
192
|
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @param {...any} args args
|
|
196
|
+
*/
|
|
186
197
|
}, {
|
|
187
198
|
key: "debug",
|
|
188
199
|
value: function debug() {
|
|
@@ -191,6 +202,11 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
191
202
|
}
|
|
192
203
|
this[LOG_SYMBOL](LogType.debug, args);
|
|
193
204
|
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* @param {any} assertion assertion
|
|
208
|
+
* @param {...any} args args
|
|
209
|
+
*/
|
|
194
210
|
}, {
|
|
195
211
|
key: "assert",
|
|
196
212
|
value: function assert(assertion) {
|
|
@@ -211,6 +227,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
211
227
|
value: function clear() {
|
|
212
228
|
this[LOG_SYMBOL](LogType.clear);
|
|
213
229
|
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* @param {...any} args args
|
|
233
|
+
*/
|
|
214
234
|
}, {
|
|
215
235
|
key: "status",
|
|
216
236
|
value: function status() {
|
|
@@ -219,6 +239,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
219
239
|
}
|
|
220
240
|
this[LOG_SYMBOL](LogType.status, args);
|
|
221
241
|
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @param {...any} args args
|
|
245
|
+
*/
|
|
222
246
|
}, {
|
|
223
247
|
key: "group",
|
|
224
248
|
value: function group() {
|
|
@@ -227,6 +251,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
227
251
|
}
|
|
228
252
|
this[LOG_SYMBOL](LogType.group, args);
|
|
229
253
|
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @param {...any} args args
|
|
257
|
+
*/
|
|
230
258
|
}, {
|
|
231
259
|
key: "groupCollapsed",
|
|
232
260
|
value: function groupCollapsed() {
|
|
@@ -238,27 +266,41 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
238
266
|
}, {
|
|
239
267
|
key: "groupEnd",
|
|
240
268
|
value: function groupEnd() {
|
|
241
|
-
|
|
242
|
-
args[_key10] = arguments[_key10];
|
|
243
|
-
}
|
|
244
|
-
this[LOG_SYMBOL](LogType.groupEnd, args);
|
|
269
|
+
this[LOG_SYMBOL](LogType.groupEnd);
|
|
245
270
|
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @param {string=} label label
|
|
274
|
+
*/
|
|
246
275
|
}, {
|
|
247
276
|
key: "profile",
|
|
248
277
|
value: function profile(label) {
|
|
249
278
|
this[LOG_SYMBOL](LogType.profile, [label]);
|
|
250
279
|
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* @param {string=} label label
|
|
283
|
+
*/
|
|
251
284
|
}, {
|
|
252
285
|
key: "profileEnd",
|
|
253
286
|
value: function profileEnd(label) {
|
|
254
287
|
this[LOG_SYMBOL](LogType.profileEnd, [label]);
|
|
255
288
|
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* @param {string} label label
|
|
292
|
+
*/
|
|
256
293
|
}, {
|
|
257
294
|
key: "time",
|
|
258
295
|
value: function time(label) {
|
|
296
|
+
/** @type {Map<string | undefined, [number, number]>} */
|
|
259
297
|
this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map();
|
|
260
298
|
this[TIMERS_SYMBOL].set(label, process.hrtime());
|
|
261
299
|
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* @param {string=} label label
|
|
303
|
+
*/
|
|
262
304
|
}, {
|
|
263
305
|
key: "timeLog",
|
|
264
306
|
value: function timeLog(label) {
|
|
@@ -269,6 +311,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
269
311
|
var time = process.hrtime(prev);
|
|
270
312
|
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
|
271
313
|
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* @param {string=} label label
|
|
317
|
+
*/
|
|
272
318
|
}, {
|
|
273
319
|
key: "timeEnd",
|
|
274
320
|
value: function timeEnd(label) {
|
|
@@ -277,9 +323,14 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
277
323
|
throw new Error("No such label '".concat(label, "' for WebpackLogger.timeEnd()"));
|
|
278
324
|
}
|
|
279
325
|
var time = process.hrtime(prev);
|
|
326
|
+
/** @type {Map<string | undefined, [number, number]>} */
|
|
280
327
|
this[TIMERS_SYMBOL].delete(label);
|
|
281
328
|
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
|
282
329
|
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* @param {string=} label label
|
|
333
|
+
*/
|
|
283
334
|
}, {
|
|
284
335
|
key: "timeAggregate",
|
|
285
336
|
value: function timeAggregate(label) {
|
|
@@ -288,7 +339,9 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
288
339
|
throw new Error("No such label '".concat(label, "' for WebpackLogger.timeAggregate()"));
|
|
289
340
|
}
|
|
290
341
|
var time = process.hrtime(prev);
|
|
342
|
+
/** @type {Map<string | undefined, [number, number]>} */
|
|
291
343
|
this[TIMERS_SYMBOL].delete(label);
|
|
344
|
+
/** @type {Map<string | undefined, [number, number]>} */
|
|
292
345
|
this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map();
|
|
293
346
|
var current = this[TIMERS_AGGREGATES_SYMBOL].get(label);
|
|
294
347
|
if (current !== undefined) {
|
|
@@ -302,6 +355,10 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
302
355
|
}
|
|
303
356
|
this[TIMERS_AGGREGATES_SYMBOL].set(label, time);
|
|
304
357
|
}
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* @param {string=} label label
|
|
361
|
+
*/
|
|
305
362
|
}, {
|
|
306
363
|
key: "timeAggregateEnd",
|
|
307
364
|
value: function timeAggregateEnd(label) {
|
|
@@ -312,9 +369,8 @@ var WebpackLogger = /*#__PURE__*/function () {
|
|
|
312
369
|
this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
|
313
370
|
}
|
|
314
371
|
}]);
|
|
315
|
-
return WebpackLogger;
|
|
316
372
|
}();
|
|
317
|
-
exports.Logger = WebpackLogger;
|
|
373
|
+
module.exports.Logger = WebpackLogger;
|
|
318
374
|
|
|
319
375
|
/***/ }),
|
|
320
376
|
|
|
@@ -331,30 +387,65 @@ exports.Logger = WebpackLogger;
|
|
|
331
387
|
|
|
332
388
|
|
|
333
389
|
|
|
334
|
-
function
|
|
335
|
-
return
|
|
390
|
+
function _slicedToArray(r, e) {
|
|
391
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
392
|
+
}
|
|
393
|
+
function _nonIterableRest() {
|
|
394
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
395
|
+
}
|
|
396
|
+
function _iterableToArrayLimit(r, l) {
|
|
397
|
+
var t = null == r ? null : "undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || r["@@iterator"];
|
|
398
|
+
if (null != t) {
|
|
399
|
+
var e,
|
|
400
|
+
n,
|
|
401
|
+
i,
|
|
402
|
+
u,
|
|
403
|
+
a = [],
|
|
404
|
+
f = !0,
|
|
405
|
+
o = !1;
|
|
406
|
+
try {
|
|
407
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
408
|
+
if (Object(t) !== t) return;
|
|
409
|
+
f = !1;
|
|
410
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
411
|
+
} catch (r) {
|
|
412
|
+
o = !0, n = r;
|
|
413
|
+
} finally {
|
|
414
|
+
try {
|
|
415
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
416
|
+
} finally {
|
|
417
|
+
if (o) throw n;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
return a;
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
function _arrayWithHoles(r) {
|
|
424
|
+
if (Array.isArray(r)) return r;
|
|
425
|
+
}
|
|
426
|
+
function _toConsumableArray(r) {
|
|
427
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
336
428
|
}
|
|
337
429
|
function _nonIterableSpread() {
|
|
338
430
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
339
431
|
}
|
|
340
|
-
function _unsupportedIterableToArray(
|
|
341
|
-
if (
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
432
|
+
function _unsupportedIterableToArray(r, a) {
|
|
433
|
+
if (r) {
|
|
434
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
435
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
436
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
437
|
+
}
|
|
347
438
|
}
|
|
348
|
-
function _iterableToArray(
|
|
349
|
-
if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })
|
|
439
|
+
function _iterableToArray(r) {
|
|
440
|
+
if ("undefined" != typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && null != r[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
350
441
|
}
|
|
351
|
-
function _arrayWithoutHoles(
|
|
352
|
-
if (Array.isArray(
|
|
442
|
+
function _arrayWithoutHoles(r) {
|
|
443
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
353
444
|
}
|
|
354
|
-
function _arrayLikeToArray(
|
|
355
|
-
|
|
356
|
-
for (var
|
|
357
|
-
return
|
|
445
|
+
function _arrayLikeToArray(r, a) {
|
|
446
|
+
(null == a || a > r.length) && (a = r.length);
|
|
447
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
448
|
+
return n;
|
|
358
449
|
}
|
|
359
450
|
var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
|
|
360
451
|
LogType = _require.LogType;
|
|
@@ -364,9 +455,10 @@ var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/l
|
|
|
364
455
|
/** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */
|
|
365
456
|
|
|
366
457
|
/** @typedef {function(string): boolean} FilterFunction */
|
|
458
|
+
/** @typedef {function(string, LogTypeEnum, any[]=): void} LoggingFunction */
|
|
367
459
|
|
|
368
460
|
/**
|
|
369
|
-
* @typedef {
|
|
461
|
+
* @typedef {object} LoggerConsole
|
|
370
462
|
* @property {function(): void} clear
|
|
371
463
|
* @property {function(): void} trace
|
|
372
464
|
* @property {(...args: any[]) => void} info
|
|
@@ -384,7 +476,7 @@ var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/l
|
|
|
384
476
|
*/
|
|
385
477
|
|
|
386
478
|
/**
|
|
387
|
-
* @typedef {
|
|
479
|
+
* @typedef {object} LoggerOptions
|
|
388
480
|
* @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel
|
|
389
481
|
* @property {FilterTypes|boolean} debug filter for debug logging
|
|
390
482
|
* @property {LoggerConsole} console the console to log to
|
|
@@ -392,7 +484,7 @@ var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/l
|
|
|
392
484
|
|
|
393
485
|
/**
|
|
394
486
|
* @param {FilterItemTypes} item an input item
|
|
395
|
-
* @returns {FilterFunction} filter function
|
|
487
|
+
* @returns {FilterFunction | undefined} filter function
|
|
396
488
|
*/
|
|
397
489
|
var filterToFunction = function filterToFunction(item) {
|
|
398
490
|
if (typeof item === "string") {
|
|
@@ -432,7 +524,7 @@ var LogLevel = {
|
|
|
432
524
|
|
|
433
525
|
/**
|
|
434
526
|
* @param {LoggerOptions} options options object
|
|
435
|
-
* @returns {
|
|
527
|
+
* @returns {LoggingFunction} logging function
|
|
436
528
|
*/
|
|
437
529
|
module.exports = function (_ref) {
|
|
438
530
|
var _ref$level = _ref.level,
|
|
@@ -440,7 +532,9 @@ module.exports = function (_ref) {
|
|
|
440
532
|
_ref$debug = _ref.debug,
|
|
441
533
|
debug = _ref$debug === void 0 ? false : _ref$debug,
|
|
442
534
|
console = _ref.console;
|
|
443
|
-
var debugFilters =
|
|
535
|
+
var debugFilters = /** @type {FilterFunction[]} */
|
|
536
|
+
|
|
537
|
+
typeof debug === "boolean" ? [function () {
|
|
444
538
|
return debug;
|
|
445
539
|
}] : /** @type {FilterItemTypes[]} */[].concat(debug).map(filterToFunction);
|
|
446
540
|
/** @type {number} */
|
|
@@ -449,7 +543,7 @@ module.exports = function (_ref) {
|
|
|
449
543
|
/**
|
|
450
544
|
* @param {string} name name of the logger
|
|
451
545
|
* @param {LogTypeEnum} type type of the log entry
|
|
452
|
-
* @param {any[]} args arguments of the log entry
|
|
546
|
+
* @param {any[]=} args arguments of the log entry
|
|
453
547
|
* @returns {void}
|
|
454
548
|
*/
|
|
455
549
|
var logger = function logger(name, type, args) {
|
|
@@ -457,12 +551,10 @@ module.exports = function (_ref) {
|
|
|
457
551
|
if (Array.isArray(args)) {
|
|
458
552
|
if (args.length > 0 && typeof args[0] === "string") {
|
|
459
553
|
return ["[".concat(name, "] ").concat(args[0])].concat(_toConsumableArray(args.slice(1)));
|
|
460
|
-
} else {
|
|
461
|
-
return ["[".concat(name, "]")].concat(_toConsumableArray(args));
|
|
462
554
|
}
|
|
463
|
-
|
|
464
|
-
return [];
|
|
555
|
+
return ["[".concat(name, "]")].concat(_toConsumableArray(args));
|
|
465
556
|
}
|
|
557
|
+
return [];
|
|
466
558
|
};
|
|
467
559
|
var debug = debugFilters.some(function (f) {
|
|
468
560
|
return f(name);
|
|
@@ -524,8 +616,13 @@ module.exports = function (_ref) {
|
|
|
524
616
|
case LogType.time:
|
|
525
617
|
{
|
|
526
618
|
if (!debug && loglevel > LogLevel.log) return;
|
|
527
|
-
var
|
|
528
|
-
|
|
619
|
+
var _args = _slicedToArray(/** @type {[string, number, number]} */
|
|
620
|
+
args, 3),
|
|
621
|
+
label = _args[0],
|
|
622
|
+
start = _args[1],
|
|
623
|
+
end = _args[2];
|
|
624
|
+
var ms = start * 1000 + end / 1000000;
|
|
625
|
+
var msg = "[".concat(name, "] ").concat(label, ": ").concat(ms, " ms");
|
|
529
626
|
if (typeof console.logTime === "function") {
|
|
530
627
|
console.logTime(msg);
|
|
531
628
|
} else {
|
|
@@ -552,15 +649,13 @@ module.exports = function (_ref) {
|
|
|
552
649
|
case LogType.status:
|
|
553
650
|
if (!debug && loglevel > LogLevel.info) return;
|
|
554
651
|
if (typeof console.status === "function") {
|
|
555
|
-
if (args.length === 0) {
|
|
652
|
+
if (!args || args.length === 0) {
|
|
556
653
|
console.status();
|
|
557
654
|
} else {
|
|
558
655
|
console.status.apply(console, _toConsumableArray(labeledArgs()));
|
|
559
656
|
}
|
|
560
|
-
} else {
|
|
561
|
-
|
|
562
|
-
console.info.apply(console, _toConsumableArray(labeledArgs()));
|
|
563
|
-
}
|
|
657
|
+
} else if (args && args.length !== 0) {
|
|
658
|
+
console.info.apply(console, _toConsumableArray(labeledArgs()));
|
|
564
659
|
}
|
|
565
660
|
break;
|
|
566
661
|
default:
|
|
@@ -576,7 +671,7 @@ module.exports = function (_ref) {
|
|
|
576
671
|
/*!*****************************************************!*\
|
|
577
672
|
!*** ./node_modules/webpack/lib/logging/runtime.js ***!
|
|
578
673
|
\*****************************************************/
|
|
579
|
-
/***/ (function(
|
|
674
|
+
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|
580
675
|
|
|
581
676
|
/*
|
|
582
677
|
MIT License http://www.opensource.org/licenses/mit-license.php
|
|
@@ -586,18 +681,13 @@ module.exports = function (_ref) {
|
|
|
586
681
|
|
|
587
682
|
|
|
588
683
|
function _extends() {
|
|
589
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
590
|
-
for (var
|
|
591
|
-
var
|
|
592
|
-
for (var
|
|
593
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
594
|
-
target[key] = source[key];
|
|
595
|
-
}
|
|
596
|
-
}
|
|
684
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
685
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
686
|
+
var t = arguments[e];
|
|
687
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
597
688
|
}
|
|
598
|
-
return
|
|
599
|
-
};
|
|
600
|
-
return _extends.apply(this, arguments);
|
|
689
|
+
return n;
|
|
690
|
+
}, _extends.apply(null, arguments);
|
|
601
691
|
}
|
|
602
692
|
var _require = __webpack_require__(/*! tapable */ "./client-src/modules/logger/tapable.js"),
|
|
603
693
|
SyncBailHook = _require.SyncBailHook;
|
|
@@ -617,13 +707,13 @@ var currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
|
|
|
617
707
|
* @param {string} name name of the logger
|
|
618
708
|
* @returns {Logger} a logger
|
|
619
709
|
*/
|
|
620
|
-
exports.getLogger = function (name) {
|
|
710
|
+
module.exports.getLogger = function (name) {
|
|
621
711
|
return new Logger(function (type, args) {
|
|
622
|
-
if (exports.hooks.log.call(name, type, args) === undefined) {
|
|
712
|
+
if (module.exports.hooks.log.call(name, type, args) === undefined) {
|
|
623
713
|
currentDefaultLogger(name, type, args);
|
|
624
714
|
}
|
|
625
715
|
}, function (childName) {
|
|
626
|
-
return exports.getLogger("".concat(name, "/").concat(childName));
|
|
716
|
+
return module.exports.getLogger("".concat(name, "/").concat(childName));
|
|
627
717
|
});
|
|
628
718
|
};
|
|
629
719
|
|
|
@@ -631,11 +721,11 @@ exports.getLogger = function (name) {
|
|
|
631
721
|
* @param {createConsoleLogger.LoggerOptions} options new options, merge with old options
|
|
632
722
|
* @returns {void}
|
|
633
723
|
*/
|
|
634
|
-
exports.configureDefaultLogger = function (options) {
|
|
724
|
+
module.exports.configureDefaultLogger = function (options) {
|
|
635
725
|
_extends(currentDefaultLoggerOptions, options);
|
|
636
726
|
currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
|
|
637
727
|
};
|
|
638
|
-
exports.hooks = {
|
|
728
|
+
module.exports.hooks = {
|
|
639
729
|
log: new SyncBailHook(["origin", "type", "args"])
|
|
640
730
|
};
|
|
641
731
|
|
|
@@ -698,8 +788,6 @@ exports.hooks = {
|
|
|
698
788
|
/******/
|
|
699
789
|
/************************************************************************/
|
|
700
790
|
var __webpack_exports__ = {};
|
|
701
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
702
|
-
!function() {
|
|
703
791
|
/*!********************************************!*\
|
|
704
792
|
!*** ./client-src/modules/logger/index.js ***!
|
|
705
793
|
\********************************************/
|
|
@@ -709,7 +797,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
709
797
|
/* harmony export */ });
|
|
710
798
|
/* harmony import */ var webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! webpack/lib/logging/runtime.js */ "./node_modules/webpack/lib/logging/runtime.js");
|
|
711
799
|
|
|
712
|
-
}();
|
|
713
800
|
var __webpack_export_target__ = exports;
|
|
714
801
|
for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
|
|
715
802
|
if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
|
|
@@ -3133,7 +3133,7 @@ module.exports = XHRCorsObject;
|
|
|
3133
3133
|
|
|
3134
3134
|
var EventEmitter = (__webpack_require__(/*! events */ "./node_modules/sockjs-client/lib/event/emitter.js").EventEmitter),
|
|
3135
3135
|
inherits = __webpack_require__(/*! inherits */ "./node_modules/inherits/inherits_browser.js");
|
|
3136
|
-
function XHRFake(
|
|
3136
|
+
function XHRFake(/* method, url, payload, opts */
|
|
3137
3137
|
) {
|
|
3138
3138
|
var self = this;
|
|
3139
3139
|
EventEmitter.call(this);
|
package/client/overlay/fsm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2
2
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
3
|
-
function _defineProperty(
|
|
4
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i :
|
|
3
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
4
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
6
|
/**
|
|
7
7
|
* @typedef {Object} StateDefinitions
|