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.
- package/README.md +1 -1
- package/client/clients/SockJSClient.js +7 -7
- package/client/clients/WebSocketClient.js +7 -7
- package/client/index.js +303 -23
- package/client/modules/logger/index.js +240 -133
- package/client/modules/sockjs-client/index.js +18 -12
- package/client/overlay.js +365 -18
- package/client/progress.js +125 -0
- package/client/socket.js +5 -1
- package/client/utils/log.js +1 -17
- package/lib/Server.js +831 -479
- package/lib/options.json +23 -5
- package/package.json +37 -36
- package/types/bin/cli-flags.d.ts +15 -0
- package/types/lib/Server.d.ts +216 -339
- package/types/lib/servers/WebsocketServer.d.ts +0 -1
- package/client/overlay/fsm.js +0 -64
- package/client/overlay/runtime-error.js +0 -47
- package/client/overlay/state-machine.js +0 -100
- package/client/overlay/styles.js +0 -74
- package/client/utils/createSocketURL.js +0 -121
- package/client/utils/getCurrentScriptSource.js +0 -24
- package/client/utils/parseURL.js +0 -36
- package/client/utils/reloadApp.js +0 -63
- package/client/utils/stripAnsi.js +0 -18
|
@@ -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,102 +39,102 @@ function SyncBailHook() {
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
function
|
|
43
|
-
|
|
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(
|
|
49
|
-
if (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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(
|
|
57
|
-
if (typeof (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })
|
|
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(
|
|
60
|
-
if (Array.isArray(
|
|
67
|
+
function _arrayWithoutHoles(r) {
|
|
68
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
61
69
|
}
|
|
62
|
-
function _arrayLikeToArray(
|
|
63
|
-
|
|
64
|
-
for (var
|
|
65
|
-
return
|
|
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(
|
|
68
|
-
if (!(
|
|
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(
|
|
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);
|
|
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(
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
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" ==
|
|
91
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
92
92
|
}
|
|
93
93
|
function _toPrimitive(t, r) {
|
|
94
|
-
if ("object" !=
|
|
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" !=
|
|
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: (
|
|
104
|
+
error: (/** @type {"error"} */"error"),
|
|
105
105
|
// message, c style arguments
|
|
106
|
-
warn: (
|
|
106
|
+
warn: (/** @type {"warn"} */"warn"),
|
|
107
107
|
// message, c style arguments
|
|
108
|
-
info: (
|
|
108
|
+
info: (/** @type {"info"} */"info"),
|
|
109
109
|
// message, c style arguments
|
|
110
|
-
log: (
|
|
110
|
+
log: (/** @type {"log"} */"log"),
|
|
111
111
|
// message, c style arguments
|
|
112
|
-
debug: (
|
|
112
|
+
debug: (/** @type {"debug"} */"debug"),
|
|
113
113
|
// message, c style arguments
|
|
114
114
|
|
|
115
|
-
trace: (
|
|
115
|
+
trace: (/** @type {"trace"} */"trace"),
|
|
116
116
|
// no arguments
|
|
117
117
|
|
|
118
|
-
group: (
|
|
118
|
+
group: (/** @type {"group"} */"group"),
|
|
119
119
|
// [label]
|
|
120
|
-
groupCollapsed: (
|
|
120
|
+
groupCollapsed: (/** @type {"groupCollapsed"} */"groupCollapsed"),
|
|
121
121
|
// [label]
|
|
122
|
-
groupEnd: (
|
|
122
|
+
groupEnd: (/** @type {"groupEnd"} */"groupEnd"),
|
|
123
123
|
// [label]
|
|
124
124
|
|
|
125
|
-
profile: (
|
|
125
|
+
profile: (/** @type {"profile"} */"profile"),
|
|
126
126
|
// [profileName]
|
|
127
|
-
profileEnd: (
|
|
127
|
+
profileEnd: (/** @type {"profileEnd"} */"profileEnd"),
|
|
128
128
|
// [profileName]
|
|
129
129
|
|
|
130
|
-
time: (
|
|
130
|
+
time: (/** @type {"time"} */"time"),
|
|
131
131
|
// name, time as [seconds, nanoseconds]
|
|
132
132
|
|
|
133
|
-
clear: (
|
|
133
|
+
clear: (/** @type {"clear"} */"clear"),
|
|
134
134
|
// no arguments
|
|
135
|
-
status: (
|
|
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 {
|
|
147
|
-
* @param {
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
335
|
-
return
|
|
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(
|
|
341
|
-
if (
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
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
|
|
349
|
-
if (
|
|
451
|
+
function _arrayWithoutHoles(r) {
|
|
452
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
350
453
|
}
|
|
351
|
-
function
|
|
352
|
-
|
|
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
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
return
|
|
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 {
|
|
475
|
+
/** @typedef {(item: string) => boolean} FilterFunction */
|
|
476
|
+
/** @typedef {(value: string, type: LogTypeEnum, args?: EXPECTED_ANY[]) => void} LoggingFunction */
|
|
367
477
|
|
|
368
478
|
/**
|
|
369
|
-
* @typedef {
|
|
370
|
-
* @property {
|
|
371
|
-
* @property {
|
|
372
|
-
* @property {(...args:
|
|
373
|
-
* @property {(...args:
|
|
374
|
-
* @property {(...args:
|
|
375
|
-
* @property {(...args:
|
|
376
|
-
* @property {(...args:
|
|
377
|
-
* @property {(...args:
|
|
378
|
-
* @property {(...args:
|
|
379
|
-
* @property {(...args:
|
|
380
|
-
* @property {(...args:
|
|
381
|
-
* @property {(...args:
|
|
382
|
-
* @property {(...args:
|
|
383
|
-
* @property {(...args:
|
|
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 {
|
|
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 &&
|
|
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 {
|
|
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 =
|
|
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 {
|
|
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
|
-
|
|
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
|
|
528
|
-
|
|
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
|
-
|
|
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(
|
|
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 (
|
|
590
|
-
for (var
|
|
591
|
-
var
|
|
592
|
-
for (var
|
|
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
|
|
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
|
|
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
|
|
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
|
;
|