webpack-dev-server 5.0.2 → 5.2.2

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.
@@ -30,7 +30,7 @@ function SyncBailHook() {
30
30
  /*!****************************************************!*\
31
31
  !*** ./node_modules/webpack/lib/logging/Logger.js ***!
32
32
  \****************************************************/
33
- /***/ (function(__unused_webpack_module, exports) {
33
+ /***/ (function(module) {
34
34
 
35
35
  /*
36
36
  MIT License http://www.opensource.org/licenses/mit-license.php
@@ -39,102 +39,102 @@ function SyncBailHook() {
39
39
 
40
40
 
41
41
 
42
- function _toConsumableArray(arr) {
43
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
42
+ function _typeof(o) {
43
+ "@babel/helpers - typeof";
44
+
45
+ return _typeof = "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && "symbol" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator ? function (o) {
46
+ return typeof o;
47
+ } : function (o) {
48
+ return o && "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o.constructor === (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o !== (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).prototype ? "symbol" : typeof o;
49
+ }, _typeof(o);
50
+ }
51
+ function _toConsumableArray(r) {
52
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
44
53
  }
45
54
  function _nonIterableSpread() {
46
55
  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
56
  }
48
- function _unsupportedIterableToArray(o, minLen) {
49
- if (!o) return;
50
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
51
- var n = Object.prototype.toString.call(o).slice(8, -1);
52
- if (n === "Object" && o.constructor) n = o.constructor.name;
53
- if (n === "Map" || n === "Set") return Array.from(o);
54
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
57
+ function _unsupportedIterableToArray(r, a) {
58
+ if (r) {
59
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
60
+ var t = {}.toString.call(r).slice(8, -1);
61
+ 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;
62
+ }
55
63
  }
56
- function _iterableToArray(iter) {
57
- if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) !== "undefined" && iter[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
64
+ function _iterableToArray(r) {
65
+ 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
66
  }
59
- function _arrayWithoutHoles(arr) {
60
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
67
+ function _arrayWithoutHoles(r) {
68
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
61
69
  }
62
- function _arrayLikeToArray(arr, len) {
63
- if (len == null || len > arr.length) len = arr.length;
64
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
65
- return arr2;
70
+ function _arrayLikeToArray(r, a) {
71
+ (null == a || a > r.length) && (a = r.length);
72
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
73
+ return n;
66
74
  }
67
- function _classCallCheck(instance, Constructor) {
68
- if (!(instance instanceof Constructor)) {
69
- throw new TypeError("Cannot call a class as a function");
70
- }
75
+ function _classCallCheck(a, n) {
76
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
71
77
  }
72
- function _defineProperties(target, props) {
73
- for (var i = 0; i < props.length; i++) {
74
- var descriptor = props[i];
75
- descriptor.enumerable = descriptor.enumerable || false;
76
- descriptor.configurable = true;
77
- if ("value" in descriptor) descriptor.writable = true;
78
- Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
78
+ function _defineProperties(e, r) {
79
+ for (var t = 0; t < r.length; t++) {
80
+ var o = r[t];
81
+ o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);
79
82
  }
80
83
  }
81
- function _createClass(Constructor, protoProps, staticProps) {
82
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
83
- if (staticProps) _defineProperties(Constructor, staticProps);
84
- Object.defineProperty(Constructor, "prototype", {
85
- writable: false
86
- });
87
- return Constructor;
84
+ function _createClass(e, r, t) {
85
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
86
+ writable: !1
87
+ }), e;
88
88
  }
89
89
  function _toPropertyKey(t) {
90
90
  var i = _toPrimitive(t, "string");
91
- return "symbol" == typeof i ? i : String(i);
91
+ return "symbol" == _typeof(i) ? i : i + "";
92
92
  }
93
93
  function _toPrimitive(t, r) {
94
- if ("object" != typeof t || !t) return t;
94
+ if ("object" != _typeof(t) || !t) return t;
95
95
  var e = t[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive];
96
96
  if (void 0 !== e) {
97
97
  var i = e.call(t, r || "default");
98
- if ("object" != typeof i) return i;
98
+ if ("object" != _typeof(i)) return i;
99
99
  throw new TypeError("@@toPrimitive must return a primitive value.");
100
100
  }
101
101
  return ("string" === r ? String : Number)(t);
102
102
  }
103
103
  var LogType = Object.freeze({
104
- error: ( /** @type {"error"} */"error"),
104
+ error: (/** @type {"error"} */"error"),
105
105
  // message, c style arguments
106
- warn: ( /** @type {"warn"} */"warn"),
106
+ warn: (/** @type {"warn"} */"warn"),
107
107
  // message, c style arguments
108
- info: ( /** @type {"info"} */"info"),
108
+ info: (/** @type {"info"} */"info"),
109
109
  // message, c style arguments
110
- log: ( /** @type {"log"} */"log"),
110
+ log: (/** @type {"log"} */"log"),
111
111
  // message, c style arguments
112
- debug: ( /** @type {"debug"} */"debug"),
112
+ debug: (/** @type {"debug"} */"debug"),
113
113
  // message, c style arguments
114
114
 
115
- trace: ( /** @type {"trace"} */"trace"),
115
+ trace: (/** @type {"trace"} */"trace"),
116
116
  // no arguments
117
117
 
118
- group: ( /** @type {"group"} */"group"),
118
+ group: (/** @type {"group"} */"group"),
119
119
  // [label]
120
- groupCollapsed: ( /** @type {"groupCollapsed"} */"groupCollapsed"),
120
+ groupCollapsed: (/** @type {"groupCollapsed"} */"groupCollapsed"),
121
121
  // [label]
122
- groupEnd: ( /** @type {"groupEnd"} */"groupEnd"),
122
+ groupEnd: (/** @type {"groupEnd"} */"groupEnd"),
123
123
  // [label]
124
124
 
125
- profile: ( /** @type {"profile"} */"profile"),
125
+ profile: (/** @type {"profile"} */"profile"),
126
126
  // [profileName]
127
- profileEnd: ( /** @type {"profileEnd"} */"profileEnd"),
127
+ profileEnd: (/** @type {"profileEnd"} */"profileEnd"),
128
128
  // [profileName]
129
129
 
130
- time: ( /** @type {"time"} */"time"),
130
+ time: (/** @type {"time"} */"time"),
131
131
  // name, time as [seconds, nanoseconds]
132
132
 
133
- clear: ( /** @type {"clear"} */"clear"),
133
+ clear: (/** @type {"clear"} */"clear"),
134
134
  // no arguments
135
- status: ( /** @type {"status"} */"status") // message, arguments
135
+ status: (/** @type {"status"} */"status") // message, arguments
136
136
  });
137
- exports.LogType = LogType;
137
+ module.exports.LogType = LogType;
138
138
 
139
139
  /** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */
140
140
 
@@ -143,15 +143,19 @@ var TIMERS_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { ret
143
143
  var TIMERS_AGGREGATES_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger aggregated times");
144
144
  var WebpackLogger = /*#__PURE__*/function () {
145
145
  /**
146
- * @param {function(LogTypeEnum, any[]=): void} log log function
147
- * @param {function(string | function(): string): WebpackLogger} getChildLogger function to create child logger
146
+ * @param {(type: LogTypeEnum, args?: EXPECTED_ANY[]) => void} log log function
147
+ * @param {(name: string | (() => string)) => WebpackLogger} getChildLogger function to create child logger
148
148
  */
149
149
  function WebpackLogger(log, getChildLogger) {
150
150
  _classCallCheck(this, WebpackLogger);
151
151
  this[LOG_SYMBOL] = log;
152
152
  this.getChildLogger = getChildLogger;
153
153
  }
154
- _createClass(WebpackLogger, [{
154
+
155
+ /**
156
+ * @param {...EXPECTED_ANY} args args
157
+ */
158
+ return _createClass(WebpackLogger, [{
155
159
  key: "error",
156
160
  value: function error() {
157
161
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -159,6 +163,10 @@ var WebpackLogger = /*#__PURE__*/function () {
159
163
  }
160
164
  this[LOG_SYMBOL](LogType.error, args);
161
165
  }
166
+
167
+ /**
168
+ * @param {...EXPECTED_ANY} args args
169
+ */
162
170
  }, {
163
171
  key: "warn",
164
172
  value: function warn() {
@@ -167,6 +175,10 @@ var WebpackLogger = /*#__PURE__*/function () {
167
175
  }
168
176
  this[LOG_SYMBOL](LogType.warn, args);
169
177
  }
178
+
179
+ /**
180
+ * @param {...EXPECTED_ANY} args args
181
+ */
170
182
  }, {
171
183
  key: "info",
172
184
  value: function info() {
@@ -175,6 +187,10 @@ var WebpackLogger = /*#__PURE__*/function () {
175
187
  }
176
188
  this[LOG_SYMBOL](LogType.info, args);
177
189
  }
190
+
191
+ /**
192
+ * @param {...EXPECTED_ANY} args args
193
+ */
178
194
  }, {
179
195
  key: "log",
180
196
  value: function log() {
@@ -183,6 +199,10 @@ var WebpackLogger = /*#__PURE__*/function () {
183
199
  }
184
200
  this[LOG_SYMBOL](LogType.log, args);
185
201
  }
202
+
203
+ /**
204
+ * @param {...EXPECTED_ANY} args args
205
+ */
186
206
  }, {
187
207
  key: "debug",
188
208
  value: function debug() {
@@ -191,6 +211,11 @@ var WebpackLogger = /*#__PURE__*/function () {
191
211
  }
192
212
  this[LOG_SYMBOL](LogType.debug, args);
193
213
  }
214
+
215
+ /**
216
+ * @param {EXPECTED_ANY} assertion assertion
217
+ * @param {...EXPECTED_ANY} args args
218
+ */
194
219
  }, {
195
220
  key: "assert",
196
221
  value: function assert(assertion) {
@@ -211,6 +236,10 @@ var WebpackLogger = /*#__PURE__*/function () {
211
236
  value: function clear() {
212
237
  this[LOG_SYMBOL](LogType.clear);
213
238
  }
239
+
240
+ /**
241
+ * @param {...EXPECTED_ANY} args args
242
+ */
214
243
  }, {
215
244
  key: "status",
216
245
  value: function status() {
@@ -219,6 +248,10 @@ var WebpackLogger = /*#__PURE__*/function () {
219
248
  }
220
249
  this[LOG_SYMBOL](LogType.status, args);
221
250
  }
251
+
252
+ /**
253
+ * @param {...EXPECTED_ANY} args args
254
+ */
222
255
  }, {
223
256
  key: "group",
224
257
  value: function group() {
@@ -227,6 +260,10 @@ var WebpackLogger = /*#__PURE__*/function () {
227
260
  }
228
261
  this[LOG_SYMBOL](LogType.group, args);
229
262
  }
263
+
264
+ /**
265
+ * @param {...EXPECTED_ANY} args args
266
+ */
230
267
  }, {
231
268
  key: "groupCollapsed",
232
269
  value: function groupCollapsed() {
@@ -238,27 +275,41 @@ var WebpackLogger = /*#__PURE__*/function () {
238
275
  }, {
239
276
  key: "groupEnd",
240
277
  value: function groupEnd() {
241
- for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
242
- args[_key10] = arguments[_key10];
243
- }
244
- this[LOG_SYMBOL](LogType.groupEnd, args);
278
+ this[LOG_SYMBOL](LogType.groupEnd);
245
279
  }
280
+
281
+ /**
282
+ * @param {string=} label label
283
+ */
246
284
  }, {
247
285
  key: "profile",
248
286
  value: function profile(label) {
249
287
  this[LOG_SYMBOL](LogType.profile, [label]);
250
288
  }
289
+
290
+ /**
291
+ * @param {string=} label label
292
+ */
251
293
  }, {
252
294
  key: "profileEnd",
253
295
  value: function profileEnd(label) {
254
296
  this[LOG_SYMBOL](LogType.profileEnd, [label]);
255
297
  }
298
+
299
+ /**
300
+ * @param {string} label label
301
+ */
256
302
  }, {
257
303
  key: "time",
258
304
  value: function time(label) {
305
+ /** @type {Map<string | undefined, [number, number]>} */
259
306
  this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map();
260
307
  this[TIMERS_SYMBOL].set(label, process.hrtime());
261
308
  }
309
+
310
+ /**
311
+ * @param {string=} label label
312
+ */
262
313
  }, {
263
314
  key: "timeLog",
264
315
  value: function timeLog(label) {
@@ -269,6 +320,10 @@ var WebpackLogger = /*#__PURE__*/function () {
269
320
  var time = process.hrtime(prev);
270
321
  this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
271
322
  }
323
+
324
+ /**
325
+ * @param {string=} label label
326
+ */
272
327
  }, {
273
328
  key: "timeEnd",
274
329
  value: function timeEnd(label) {
@@ -277,9 +332,14 @@ var WebpackLogger = /*#__PURE__*/function () {
277
332
  throw new Error("No such label '".concat(label, "' for WebpackLogger.timeEnd()"));
278
333
  }
279
334
  var time = process.hrtime(prev);
335
+ /** @type {Map<string | undefined, [number, number]>} */
280
336
  this[TIMERS_SYMBOL].delete(label);
281
337
  this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
282
338
  }
339
+
340
+ /**
341
+ * @param {string=} label label
342
+ */
283
343
  }, {
284
344
  key: "timeAggregate",
285
345
  value: function timeAggregate(label) {
@@ -288,7 +348,9 @@ var WebpackLogger = /*#__PURE__*/function () {
288
348
  throw new Error("No such label '".concat(label, "' for WebpackLogger.timeAggregate()"));
289
349
  }
290
350
  var time = process.hrtime(prev);
351
+ /** @type {Map<string | undefined, [number, number]>} */
291
352
  this[TIMERS_SYMBOL].delete(label);
353
+ /** @type {Map<string | undefined, [number, number]>} */
292
354
  this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map();
293
355
  var current = this[TIMERS_AGGREGATES_SYMBOL].get(label);
294
356
  if (current !== undefined) {
@@ -302,6 +364,10 @@ var WebpackLogger = /*#__PURE__*/function () {
302
364
  }
303
365
  this[TIMERS_AGGREGATES_SYMBOL].set(label, time);
304
366
  }
367
+
368
+ /**
369
+ * @param {string=} label label
370
+ */
305
371
  }, {
306
372
  key: "timeAggregateEnd",
307
373
  value: function timeAggregateEnd(label) {
@@ -312,9 +378,8 @@ var WebpackLogger = /*#__PURE__*/function () {
312
378
  this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
313
379
  }
314
380
  }]);
315
- return WebpackLogger;
316
381
  }();
317
- exports.Logger = WebpackLogger;
382
+ module.exports.Logger = WebpackLogger;
318
383
 
319
384
  /***/ }),
320
385
 
@@ -331,30 +396,74 @@ exports.Logger = WebpackLogger;
331
396
 
332
397
 
333
398
 
334
- function _toConsumableArray(arr) {
335
- return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
399
+ function _slicedToArray(r, e) {
400
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
401
+ }
402
+ function _nonIterableRest() {
403
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
404
+ }
405
+ function _iterableToArrayLimit(r, l) {
406
+ 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"];
407
+ if (null != t) {
408
+ var e,
409
+ n,
410
+ i,
411
+ u,
412
+ a = [],
413
+ f = !0,
414
+ o = !1;
415
+ try {
416
+ if (i = (t = t.call(r)).next, 0 === l) {
417
+ if (Object(t) !== t) return;
418
+ f = !1;
419
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
420
+ } catch (r) {
421
+ o = !0, n = r;
422
+ } finally {
423
+ try {
424
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
425
+ } finally {
426
+ if (o) throw n;
427
+ }
428
+ }
429
+ return a;
430
+ }
431
+ }
432
+ function _arrayWithHoles(r) {
433
+ if (Array.isArray(r)) return r;
434
+ }
435
+ function _toConsumableArray(r) {
436
+ return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
336
437
  }
337
438
  function _nonIterableSpread() {
338
439
  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
440
  }
340
- function _unsupportedIterableToArray(o, minLen) {
341
- if (!o) return;
342
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
343
- var n = Object.prototype.toString.call(o).slice(8, -1);
344
- if (n === "Object" && o.constructor) n = o.constructor.name;
345
- if (n === "Map" || n === "Set") return Array.from(o);
346
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
441
+ function _unsupportedIterableToArray(r, a) {
442
+ if (r) {
443
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
444
+ var t = {}.toString.call(r).slice(8, -1);
445
+ 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;
446
+ }
447
+ }
448
+ function _iterableToArray(r) {
449
+ 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);
347
450
  }
348
- function _iterableToArray(iter) {
349
- if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) !== "undefined" && iter[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
451
+ function _arrayWithoutHoles(r) {
452
+ if (Array.isArray(r)) return _arrayLikeToArray(r);
350
453
  }
351
- function _arrayWithoutHoles(arr) {
352
- if (Array.isArray(arr)) return _arrayLikeToArray(arr);
454
+ function _arrayLikeToArray(r, a) {
455
+ (null == a || a > r.length) && (a = r.length);
456
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
457
+ return n;
353
458
  }
354
- function _arrayLikeToArray(arr, len) {
355
- if (len == null || len > arr.length) len = arr.length;
356
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
357
- return arr2;
459
+ function _typeof(o) {
460
+ "@babel/helpers - typeof";
461
+
462
+ return _typeof = "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && "symbol" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).iterator ? function (o) {
463
+ return typeof o;
464
+ } : function (o) {
465
+ return o && "function" == typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o.constructor === (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }) && o !== (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).prototype ? "symbol" : typeof o;
466
+ }, _typeof(o);
358
467
  }
359
468
  var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
360
469
  LogType = _require.LogType;
@@ -363,28 +472,29 @@ var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/l
363
472
  /** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */
364
473
  /** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */
365
474
 
366
- /** @typedef {function(string): boolean} FilterFunction */
475
+ /** @typedef {(item: string) => boolean} FilterFunction */
476
+ /** @typedef {(value: string, type: LogTypeEnum, args?: EXPECTED_ANY[]) => void} LoggingFunction */
367
477
 
368
478
  /**
369
- * @typedef {Object} LoggerConsole
370
- * @property {function(): void} clear
371
- * @property {function(): void} trace
372
- * @property {(...args: any[]) => void} info
373
- * @property {(...args: any[]) => void} log
374
- * @property {(...args: any[]) => void} warn
375
- * @property {(...args: any[]) => void} error
376
- * @property {(...args: any[]) => void=} debug
377
- * @property {(...args: any[]) => void=} group
378
- * @property {(...args: any[]) => void=} groupCollapsed
379
- * @property {(...args: any[]) => void=} groupEnd
380
- * @property {(...args: any[]) => void=} status
381
- * @property {(...args: any[]) => void=} profile
382
- * @property {(...args: any[]) => void=} profileEnd
383
- * @property {(...args: any[]) => void=} logTime
479
+ * @typedef {object} LoggerConsole
480
+ * @property {() => void} clear
481
+ * @property {() => void} trace
482
+ * @property {(...args: EXPECTED_ANY[]) => void} info
483
+ * @property {(...args: EXPECTED_ANY[]) => void} log
484
+ * @property {(...args: EXPECTED_ANY[]) => void} warn
485
+ * @property {(...args: EXPECTED_ANY[]) => void} error
486
+ * @property {(...args: EXPECTED_ANY[]) => void=} debug
487
+ * @property {(...args: EXPECTED_ANY[]) => void=} group
488
+ * @property {(...args: EXPECTED_ANY[]) => void=} groupCollapsed
489
+ * @property {(...args: EXPECTED_ANY[]) => void=} groupEnd
490
+ * @property {(...args: EXPECTED_ANY[]) => void=} status
491
+ * @property {(...args: EXPECTED_ANY[]) => void=} profile
492
+ * @property {(...args: EXPECTED_ANY[]) => void=} profileEnd
493
+ * @property {(...args: EXPECTED_ANY[]) => void=} logTime
384
494
  */
385
495
 
386
496
  /**
387
- * @typedef {Object} LoggerOptions
497
+ * @typedef {object} LoggerOptions
388
498
  * @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel
389
499
  * @property {FilterTypes|boolean} debug filter for debug logging
390
500
  * @property {LoggerConsole} console the console to log to
@@ -392,7 +502,7 @@ var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/l
392
502
 
393
503
  /**
394
504
  * @param {FilterItemTypes} item an input item
395
- * @returns {FilterFunction} filter function
505
+ * @returns {FilterFunction | undefined} filter function
396
506
  */
397
507
  var filterToFunction = function filterToFunction(item) {
398
508
  if (typeof item === "string") {
@@ -401,7 +511,7 @@ var filterToFunction = function filterToFunction(item) {
401
511
  return regExp.test(ident);
402
512
  };
403
513
  }
404
- if (item && typeof item === "object" && typeof item.test === "function") {
514
+ if (item && _typeof(item) === "object" && typeof item.test === "function") {
405
515
  return function (ident) {
406
516
  return item.test(ident);
407
517
  };
@@ -432,7 +542,7 @@ var LogLevel = {
432
542
 
433
543
  /**
434
544
  * @param {LoggerOptions} options options object
435
- * @returns {function(string, LogTypeEnum, any[]): void} logging function
545
+ * @returns {LoggingFunction} logging function
436
546
  */
437
547
  module.exports = function (_ref) {
438
548
  var _ref$level = _ref.level,
@@ -440,16 +550,17 @@ module.exports = function (_ref) {
440
550
  _ref$debug = _ref.debug,
441
551
  debug = _ref$debug === void 0 ? false : _ref$debug,
442
552
  console = _ref.console;
443
- var debugFilters = typeof debug === "boolean" ? [function () {
553
+ var debugFilters = /** @type {FilterFunction[]} */
554
+
555
+ typeof debug === "boolean" ? [function () {
444
556
  return debug;
445
557
  }] : /** @type {FilterItemTypes[]} */[].concat(debug).map(filterToFunction);
446
- /** @type {number} */
447
558
  var loglevel = LogLevel["".concat(level)] || 0;
448
559
 
449
560
  /**
450
561
  * @param {string} name name of the logger
451
562
  * @param {LogTypeEnum} type type of the log entry
452
- * @param {any[]} args arguments of the log entry
563
+ * @param {EXPECTED_ANY[]=} args arguments of the log entry
453
564
  * @returns {void}
454
565
  */
455
566
  var logger = function logger(name, type, args) {
@@ -457,12 +568,10 @@ module.exports = function (_ref) {
457
568
  if (Array.isArray(args)) {
458
569
  if (args.length > 0 && typeof args[0] === "string") {
459
570
  return ["[".concat(name, "] ").concat(args[0])].concat(_toConsumableArray(args.slice(1)));
460
- } else {
461
- return ["[".concat(name, "]")].concat(_toConsumableArray(args));
462
571
  }
463
- } else {
464
- return [];
572
+ return ["[".concat(name, "]")].concat(_toConsumableArray(args));
465
573
  }
574
+ return [];
466
575
  };
467
576
  var debug = debugFilters.some(function (f) {
468
577
  return f(name);
@@ -524,8 +633,13 @@ module.exports = function (_ref) {
524
633
  case LogType.time:
525
634
  {
526
635
  if (!debug && loglevel > LogLevel.log) return;
527
- var ms = args[1] * 1000 + args[2] / 1000000;
528
- var msg = "[".concat(name, "] ").concat(args[0], ": ").concat(ms, " ms");
636
+ var _args = _slicedToArray(/** @type {[string, number, number]} */
637
+ args, 3),
638
+ label = _args[0],
639
+ start = _args[1],
640
+ end = _args[2];
641
+ var ms = start * 1000 + end / 1000000;
642
+ var msg = "[".concat(name, "] ").concat(label, ": ").concat(ms, " ms");
529
643
  if (typeof console.logTime === "function") {
530
644
  console.logTime(msg);
531
645
  } else {
@@ -552,15 +666,13 @@ module.exports = function (_ref) {
552
666
  case LogType.status:
553
667
  if (!debug && loglevel > LogLevel.info) return;
554
668
  if (typeof console.status === "function") {
555
- if (args.length === 0) {
669
+ if (!args || args.length === 0) {
556
670
  console.status();
557
671
  } else {
558
672
  console.status.apply(console, _toConsumableArray(labeledArgs()));
559
673
  }
560
- } else {
561
- if (args.length !== 0) {
562
- console.info.apply(console, _toConsumableArray(labeledArgs()));
563
- }
674
+ } else if (args && args.length !== 0) {
675
+ console.info.apply(console, _toConsumableArray(labeledArgs()));
564
676
  }
565
677
  break;
566
678
  default:
@@ -576,7 +688,7 @@ module.exports = function (_ref) {
576
688
  /*!*****************************************************!*\
577
689
  !*** ./node_modules/webpack/lib/logging/runtime.js ***!
578
690
  \*****************************************************/
579
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
691
+ /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
580
692
 
581
693
  /*
582
694
  MIT License http://www.opensource.org/licenses/mit-license.php
@@ -586,18 +698,13 @@ module.exports = function (_ref) {
586
698
 
587
699
 
588
700
  function _extends() {
589
- _extends = Object.assign ? Object.assign.bind() : function (target) {
590
- for (var i = 1; i < arguments.length; i++) {
591
- var source = arguments[i];
592
- for (var key in source) {
593
- if (Object.prototype.hasOwnProperty.call(source, key)) {
594
- target[key] = source[key];
595
- }
596
- }
701
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
702
+ for (var e = 1; e < arguments.length; e++) {
703
+ var t = arguments[e];
704
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
597
705
  }
598
- return target;
599
- };
600
- return _extends.apply(this, arguments);
706
+ return n;
707
+ }, _extends.apply(null, arguments);
601
708
  }
602
709
  var _require = __webpack_require__(/*! tapable */ "./client-src/modules/logger/tapable.js"),
603
710
  SyncBailHook = _require.SyncBailHook;
@@ -617,13 +724,13 @@ var currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
617
724
  * @param {string} name name of the logger
618
725
  * @returns {Logger} a logger
619
726
  */
620
- exports.getLogger = function (name) {
727
+ module.exports.getLogger = function (name) {
621
728
  return new Logger(function (type, args) {
622
- if (exports.hooks.log.call(name, type, args) === undefined) {
729
+ if (module.exports.hooks.log.call(name, type, args) === undefined) {
623
730
  currentDefaultLogger(name, type, args);
624
731
  }
625
732
  }, function (childName) {
626
- return exports.getLogger("".concat(name, "/").concat(childName));
733
+ return module.exports.getLogger("".concat(name, "/").concat(childName));
627
734
  });
628
735
  };
629
736
 
@@ -631,11 +738,11 @@ exports.getLogger = function (name) {
631
738
  * @param {createConsoleLogger.LoggerOptions} options new options, merge with old options
632
739
  * @returns {void}
633
740
  */
634
- exports.configureDefaultLogger = function (options) {
741
+ module.exports.configureDefaultLogger = function (options) {
635
742
  _extends(currentDefaultLoggerOptions, options);
636
743
  currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
637
744
  };
638
- exports.hooks = {
745
+ module.exports.hooks = {
639
746
  log: new SyncBailHook(["origin", "type", "args"])
640
747
  };
641
748
 
@@ -698,7 +805,7 @@ exports.hooks = {
698
805
  /******/
699
806
  /************************************************************************/
700
807
  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.
808
+ // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
702
809
  !function() {
703
810
  /*!********************************************!*\
704
811
  !*** ./client-src/modules/logger/index.js ***!
@@ -711,7 +818,7 @@ __webpack_require__.r(__webpack_exports__);
711
818
 
712
819
  }();
713
820
  var __webpack_export_target__ = exports;
714
- for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
821
+ for(var __webpack_i__ in __webpack_exports__) __webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
715
822
  if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
716
823
  /******/ })()
717
824
  ;