| 1 | /******/ (function() { // webpackBootstrap
|
|---|
| 2 | /******/ "use strict";
|
|---|
| 3 | /******/ var __webpack_modules__ = ({
|
|---|
| 4 |
|
|---|
| 5 | /***/ "./client-src/modules/logger/SyncBailHookFake.js":
|
|---|
| 6 | /*!*******************************************************!*\
|
|---|
| 7 | !*** ./client-src/modules/logger/SyncBailHookFake.js ***!
|
|---|
| 8 | \*******************************************************/
|
|---|
| 9 | /***/ (function(module) {
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | /**
|
|---|
| 14 | * Client stub for tapable SyncBailHook
|
|---|
| 15 | */
|
|---|
| 16 | module.exports = function clientTapableSyncBailHook() {
|
|---|
| 17 | return {
|
|---|
| 18 | call: function call() {}
|
|---|
| 19 | };
|
|---|
| 20 | };
|
|---|
| 21 |
|
|---|
| 22 | /***/ }),
|
|---|
| 23 |
|
|---|
| 24 | /***/ "./node_modules/webpack/lib/logging/Logger.js":
|
|---|
| 25 | /*!****************************************************!*\
|
|---|
| 26 | !*** ./node_modules/webpack/lib/logging/Logger.js ***!
|
|---|
| 27 | \****************************************************/
|
|---|
| 28 | /***/ (function(__unused_webpack_module, exports) {
|
|---|
| 29 |
|
|---|
| 30 | /*
|
|---|
| 31 | MIT License http://www.opensource.org/licenses/mit-license.php
|
|---|
| 32 | Author Tobias Koppers @sokra
|
|---|
| 33 | */
|
|---|
| 34 |
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
| 37 | function _toConsumableArray(arr) {
|
|---|
| 38 | return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|---|
| 39 | }
|
|---|
| 40 | function _nonIterableSpread() {
|
|---|
| 41 | throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|---|
| 42 | }
|
|---|
| 43 | function _unsupportedIterableToArray(o, minLen) {
|
|---|
| 44 | if (!o) return;
|
|---|
| 45 | if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|---|
| 46 | var n = Object.prototype.toString.call(o).slice(8, -1);
|
|---|
| 47 | if (n === "Object" && o.constructor) n = o.constructor.name;
|
|---|
| 48 | if (n === "Map" || n === "Set") return Array.from(o);
|
|---|
| 49 | if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|---|
| 50 | }
|
|---|
| 51 | function _iterableToArray(iter) {
|
|---|
| 52 | 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);
|
|---|
| 53 | }
|
|---|
| 54 | function _arrayWithoutHoles(arr) {
|
|---|
| 55 | if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|---|
| 56 | }
|
|---|
| 57 | function _arrayLikeToArray(arr, len) {
|
|---|
| 58 | if (len == null || len > arr.length) len = arr.length;
|
|---|
| 59 | for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|---|
| 60 | return arr2;
|
|---|
| 61 | }
|
|---|
| 62 | function _classCallCheck(instance, Constructor) {
|
|---|
| 63 | if (!(instance instanceof Constructor)) {
|
|---|
| 64 | throw new TypeError("Cannot call a class as a function");
|
|---|
| 65 | }
|
|---|
| 66 | }
|
|---|
| 67 | function _defineProperties(target, props) {
|
|---|
| 68 | for (var i = 0; i < props.length; i++) {
|
|---|
| 69 | var descriptor = props[i];
|
|---|
| 70 | descriptor.enumerable = descriptor.enumerable || false;
|
|---|
| 71 | descriptor.configurable = true;
|
|---|
| 72 | if ("value" in descriptor) descriptor.writable = true;
|
|---|
| 73 | Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|---|
| 74 | }
|
|---|
| 75 | }
|
|---|
| 76 | function _createClass(Constructor, protoProps, staticProps) {
|
|---|
| 77 | if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|---|
| 78 | if (staticProps) _defineProperties(Constructor, staticProps);
|
|---|
| 79 | Object.defineProperty(Constructor, "prototype", {
|
|---|
| 80 | writable: false
|
|---|
| 81 | });
|
|---|
| 82 | return Constructor;
|
|---|
| 83 | }
|
|---|
| 84 | function _toPropertyKey(arg) {
|
|---|
| 85 | var key = _toPrimitive(arg, "string");
|
|---|
| 86 | return typeof key === "symbol" ? key : String(key);
|
|---|
| 87 | }
|
|---|
| 88 | function _toPrimitive(input, hint) {
|
|---|
| 89 | if (typeof input !== "object" || input === null) return input;
|
|---|
| 90 | var prim = input[(typeof Symbol !== "undefined" ? Symbol : function (i) { return i; }).toPrimitive];
|
|---|
| 91 | if (prim !== undefined) {
|
|---|
| 92 | var res = prim.call(input, hint || "default");
|
|---|
| 93 | if (typeof res !== "object") return res;
|
|---|
| 94 | throw new TypeError("@@toPrimitive must return a primitive value.");
|
|---|
| 95 | }
|
|---|
| 96 | return (hint === "string" ? String : Number)(input);
|
|---|
| 97 | }
|
|---|
| 98 | var LogType = Object.freeze({
|
|---|
| 99 | error: /** @type {"error"} */"error",
|
|---|
| 100 | // message, c style arguments
|
|---|
| 101 | warn: /** @type {"warn"} */"warn",
|
|---|
| 102 | // message, c style arguments
|
|---|
| 103 | info: /** @type {"info"} */"info",
|
|---|
| 104 | // message, c style arguments
|
|---|
| 105 | log: /** @type {"log"} */"log",
|
|---|
| 106 | // message, c style arguments
|
|---|
| 107 | debug: /** @type {"debug"} */"debug",
|
|---|
| 108 | // message, c style arguments
|
|---|
| 109 |
|
|---|
| 110 | trace: /** @type {"trace"} */"trace",
|
|---|
| 111 | // no arguments
|
|---|
| 112 |
|
|---|
| 113 | group: /** @type {"group"} */"group",
|
|---|
| 114 | // [label]
|
|---|
| 115 | groupCollapsed: /** @type {"groupCollapsed"} */"groupCollapsed",
|
|---|
| 116 | // [label]
|
|---|
| 117 | groupEnd: /** @type {"groupEnd"} */"groupEnd",
|
|---|
| 118 | // [label]
|
|---|
| 119 |
|
|---|
| 120 | profile: /** @type {"profile"} */"profile",
|
|---|
| 121 | // [profileName]
|
|---|
| 122 | profileEnd: /** @type {"profileEnd"} */"profileEnd",
|
|---|
| 123 | // [profileName]
|
|---|
| 124 |
|
|---|
| 125 | time: /** @type {"time"} */"time",
|
|---|
| 126 | // name, time as [seconds, nanoseconds]
|
|---|
| 127 |
|
|---|
| 128 | clear: /** @type {"clear"} */"clear",
|
|---|
| 129 | // no arguments
|
|---|
| 130 | status: /** @type {"status"} */"status" // message, arguments
|
|---|
| 131 | });
|
|---|
| 132 |
|
|---|
| 133 | exports.LogType = LogType;
|
|---|
| 134 |
|
|---|
| 135 | /** @typedef {typeof LogType[keyof typeof LogType]} LogTypeEnum */
|
|---|
| 136 |
|
|---|
| 137 | var LOG_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger raw log method");
|
|---|
| 138 | var TIMERS_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger times");
|
|---|
| 139 | var TIMERS_AGGREGATES_SYMBOL = (typeof Symbol !== "undefined" ? Symbol : function (i) { return i; })("webpack logger aggregated times");
|
|---|
| 140 | var WebpackLogger = /*#__PURE__*/function () {
|
|---|
| 141 | /**
|
|---|
| 142 | * @param {function(LogTypeEnum, any[]=): void} log log function
|
|---|
| 143 | * @param {function(string | function(): string): WebpackLogger} getChildLogger function to create child logger
|
|---|
| 144 | */
|
|---|
| 145 | function WebpackLogger(log, getChildLogger) {
|
|---|
| 146 | _classCallCheck(this, WebpackLogger);
|
|---|
| 147 | this[LOG_SYMBOL] = log;
|
|---|
| 148 | this.getChildLogger = getChildLogger;
|
|---|
| 149 | }
|
|---|
| 150 | _createClass(WebpackLogger, [{
|
|---|
| 151 | key: "error",
|
|---|
| 152 | value: function error() {
|
|---|
| 153 | for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|---|
| 154 | args[_key] = arguments[_key];
|
|---|
| 155 | }
|
|---|
| 156 | this[LOG_SYMBOL](LogType.error, args);
|
|---|
| 157 | }
|
|---|
| 158 | }, {
|
|---|
| 159 | key: "warn",
|
|---|
| 160 | value: function warn() {
|
|---|
| 161 | for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|---|
| 162 | args[_key2] = arguments[_key2];
|
|---|
| 163 | }
|
|---|
| 164 | this[LOG_SYMBOL](LogType.warn, args);
|
|---|
| 165 | }
|
|---|
| 166 | }, {
|
|---|
| 167 | key: "info",
|
|---|
| 168 | value: function info() {
|
|---|
| 169 | for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|---|
| 170 | args[_key3] = arguments[_key3];
|
|---|
| 171 | }
|
|---|
| 172 | this[LOG_SYMBOL](LogType.info, args);
|
|---|
| 173 | }
|
|---|
| 174 | }, {
|
|---|
| 175 | key: "log",
|
|---|
| 176 | value: function log() {
|
|---|
| 177 | for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|---|
| 178 | args[_key4] = arguments[_key4];
|
|---|
| 179 | }
|
|---|
| 180 | this[LOG_SYMBOL](LogType.log, args);
|
|---|
| 181 | }
|
|---|
| 182 | }, {
|
|---|
| 183 | key: "debug",
|
|---|
| 184 | value: function debug() {
|
|---|
| 185 | for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|---|
| 186 | args[_key5] = arguments[_key5];
|
|---|
| 187 | }
|
|---|
| 188 | this[LOG_SYMBOL](LogType.debug, args);
|
|---|
| 189 | }
|
|---|
| 190 | }, {
|
|---|
| 191 | key: "assert",
|
|---|
| 192 | value: function assert(assertion) {
|
|---|
| 193 | if (!assertion) {
|
|---|
| 194 | for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
|
|---|
| 195 | args[_key6 - 1] = arguments[_key6];
|
|---|
| 196 | }
|
|---|
| 197 | this[LOG_SYMBOL](LogType.error, args);
|
|---|
| 198 | }
|
|---|
| 199 | }
|
|---|
| 200 | }, {
|
|---|
| 201 | key: "trace",
|
|---|
| 202 | value: function trace() {
|
|---|
| 203 | this[LOG_SYMBOL](LogType.trace, ["Trace"]);
|
|---|
| 204 | }
|
|---|
| 205 | }, {
|
|---|
| 206 | key: "clear",
|
|---|
| 207 | value: function clear() {
|
|---|
| 208 | this[LOG_SYMBOL](LogType.clear);
|
|---|
| 209 | }
|
|---|
| 210 | }, {
|
|---|
| 211 | key: "status",
|
|---|
| 212 | value: function status() {
|
|---|
| 213 | for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|---|
| 214 | args[_key7] = arguments[_key7];
|
|---|
| 215 | }
|
|---|
| 216 | this[LOG_SYMBOL](LogType.status, args);
|
|---|
| 217 | }
|
|---|
| 218 | }, {
|
|---|
| 219 | key: "group",
|
|---|
| 220 | value: function group() {
|
|---|
| 221 | for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|---|
| 222 | args[_key8] = arguments[_key8];
|
|---|
| 223 | }
|
|---|
| 224 | this[LOG_SYMBOL](LogType.group, args);
|
|---|
| 225 | }
|
|---|
| 226 | }, {
|
|---|
| 227 | key: "groupCollapsed",
|
|---|
| 228 | value: function groupCollapsed() {
|
|---|
| 229 | for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|---|
| 230 | args[_key9] = arguments[_key9];
|
|---|
| 231 | }
|
|---|
| 232 | this[LOG_SYMBOL](LogType.groupCollapsed, args);
|
|---|
| 233 | }
|
|---|
| 234 | }, {
|
|---|
| 235 | key: "groupEnd",
|
|---|
| 236 | value: function groupEnd() {
|
|---|
| 237 | for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
|---|
| 238 | args[_key10] = arguments[_key10];
|
|---|
| 239 | }
|
|---|
| 240 | this[LOG_SYMBOL](LogType.groupEnd, args);
|
|---|
| 241 | }
|
|---|
| 242 | }, {
|
|---|
| 243 | key: "profile",
|
|---|
| 244 | value: function profile(label) {
|
|---|
| 245 | this[LOG_SYMBOL](LogType.profile, [label]);
|
|---|
| 246 | }
|
|---|
| 247 | }, {
|
|---|
| 248 | key: "profileEnd",
|
|---|
| 249 | value: function profileEnd(label) {
|
|---|
| 250 | this[LOG_SYMBOL](LogType.profileEnd, [label]);
|
|---|
| 251 | }
|
|---|
| 252 | }, {
|
|---|
| 253 | key: "time",
|
|---|
| 254 | value: function time(label) {
|
|---|
| 255 | this[TIMERS_SYMBOL] = this[TIMERS_SYMBOL] || new Map();
|
|---|
| 256 | this[TIMERS_SYMBOL].set(label, process.hrtime());
|
|---|
| 257 | }
|
|---|
| 258 | }, {
|
|---|
| 259 | key: "timeLog",
|
|---|
| 260 | value: function timeLog(label) {
|
|---|
| 261 | var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
|---|
| 262 | if (!prev) {
|
|---|
| 263 | throw new Error("No such label '".concat(label, "' for WebpackLogger.timeLog()"));
|
|---|
| 264 | }
|
|---|
| 265 | var time = process.hrtime(prev);
|
|---|
| 266 | this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
|---|
| 267 | }
|
|---|
| 268 | }, {
|
|---|
| 269 | key: "timeEnd",
|
|---|
| 270 | value: function timeEnd(label) {
|
|---|
| 271 | var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
|---|
| 272 | if (!prev) {
|
|---|
| 273 | throw new Error("No such label '".concat(label, "' for WebpackLogger.timeEnd()"));
|
|---|
| 274 | }
|
|---|
| 275 | var time = process.hrtime(prev);
|
|---|
| 276 | this[TIMERS_SYMBOL].delete(label);
|
|---|
| 277 | this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
|---|
| 278 | }
|
|---|
| 279 | }, {
|
|---|
| 280 | key: "timeAggregate",
|
|---|
| 281 | value: function timeAggregate(label) {
|
|---|
| 282 | var prev = this[TIMERS_SYMBOL] && this[TIMERS_SYMBOL].get(label);
|
|---|
| 283 | if (!prev) {
|
|---|
| 284 | throw new Error("No such label '".concat(label, "' for WebpackLogger.timeAggregate()"));
|
|---|
| 285 | }
|
|---|
| 286 | var time = process.hrtime(prev);
|
|---|
| 287 | this[TIMERS_SYMBOL].delete(label);
|
|---|
| 288 | this[TIMERS_AGGREGATES_SYMBOL] = this[TIMERS_AGGREGATES_SYMBOL] || new Map();
|
|---|
| 289 | var current = this[TIMERS_AGGREGATES_SYMBOL].get(label);
|
|---|
| 290 | if (current !== undefined) {
|
|---|
| 291 | if (time[1] + current[1] > 1e9) {
|
|---|
| 292 | time[0] += current[0] + 1;
|
|---|
| 293 | time[1] = time[1] - 1e9 + current[1];
|
|---|
| 294 | } else {
|
|---|
| 295 | time[0] += current[0];
|
|---|
| 296 | time[1] += current[1];
|
|---|
| 297 | }
|
|---|
| 298 | }
|
|---|
| 299 | this[TIMERS_AGGREGATES_SYMBOL].set(label, time);
|
|---|
| 300 | }
|
|---|
| 301 | }, {
|
|---|
| 302 | key: "timeAggregateEnd",
|
|---|
| 303 | value: function timeAggregateEnd(label) {
|
|---|
| 304 | if (this[TIMERS_AGGREGATES_SYMBOL] === undefined) return;
|
|---|
| 305 | var time = this[TIMERS_AGGREGATES_SYMBOL].get(label);
|
|---|
| 306 | if (time === undefined) return;
|
|---|
| 307 | this[TIMERS_AGGREGATES_SYMBOL].delete(label);
|
|---|
| 308 | this[LOG_SYMBOL](LogType.time, [label].concat(_toConsumableArray(time)));
|
|---|
| 309 | }
|
|---|
| 310 | }]);
|
|---|
| 311 | return WebpackLogger;
|
|---|
| 312 | }();
|
|---|
| 313 | exports.Logger = WebpackLogger;
|
|---|
| 314 |
|
|---|
| 315 | /***/ }),
|
|---|
| 316 |
|
|---|
| 317 | /***/ "./node_modules/webpack/lib/logging/createConsoleLogger.js":
|
|---|
| 318 | /*!*****************************************************************!*\
|
|---|
| 319 | !*** ./node_modules/webpack/lib/logging/createConsoleLogger.js ***!
|
|---|
| 320 | \*****************************************************************/
|
|---|
| 321 | /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
|
|---|
| 322 |
|
|---|
| 323 | /*
|
|---|
| 324 | MIT License http://www.opensource.org/licenses/mit-license.php
|
|---|
| 325 | Author Tobias Koppers @sokra
|
|---|
| 326 | */
|
|---|
| 327 |
|
|---|
| 328 |
|
|---|
| 329 |
|
|---|
| 330 | function _toConsumableArray(arr) {
|
|---|
| 331 | return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|---|
| 332 | }
|
|---|
| 333 | function _nonIterableSpread() {
|
|---|
| 334 | throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|---|
| 335 | }
|
|---|
| 336 | function _unsupportedIterableToArray(o, minLen) {
|
|---|
| 337 | if (!o) return;
|
|---|
| 338 | if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|---|
| 339 | var n = Object.prototype.toString.call(o).slice(8, -1);
|
|---|
| 340 | if (n === "Object" && o.constructor) n = o.constructor.name;
|
|---|
| 341 | if (n === "Map" || n === "Set") return Array.from(o);
|
|---|
| 342 | if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|---|
| 343 | }
|
|---|
| 344 | function _iterableToArray(iter) {
|
|---|
| 345 | 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);
|
|---|
| 346 | }
|
|---|
| 347 | function _arrayWithoutHoles(arr) {
|
|---|
| 348 | if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|---|
| 349 | }
|
|---|
| 350 | function _arrayLikeToArray(arr, len) {
|
|---|
| 351 | if (len == null || len > arr.length) len = arr.length;
|
|---|
| 352 | for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|---|
| 353 | return arr2;
|
|---|
| 354 | }
|
|---|
| 355 | var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
|
|---|
| 356 | LogType = _require.LogType;
|
|---|
| 357 |
|
|---|
| 358 | /** @typedef {import("../../declarations/WebpackOptions").FilterItemTypes} FilterItemTypes */
|
|---|
| 359 | /** @typedef {import("../../declarations/WebpackOptions").FilterTypes} FilterTypes */
|
|---|
| 360 | /** @typedef {import("./Logger").LogTypeEnum} LogTypeEnum */
|
|---|
| 361 |
|
|---|
| 362 | /** @typedef {function(string): boolean} FilterFunction */
|
|---|
| 363 |
|
|---|
| 364 | /**
|
|---|
| 365 | * @typedef {Object} LoggerConsole
|
|---|
| 366 | * @property {function(): void} clear
|
|---|
| 367 | * @property {function(): void} trace
|
|---|
| 368 | * @property {(...args: any[]) => void} info
|
|---|
| 369 | * @property {(...args: any[]) => void} log
|
|---|
| 370 | * @property {(...args: any[]) => void} warn
|
|---|
| 371 | * @property {(...args: any[]) => void} error
|
|---|
| 372 | * @property {(...args: any[]) => void=} debug
|
|---|
| 373 | * @property {(...args: any[]) => void=} group
|
|---|
| 374 | * @property {(...args: any[]) => void=} groupCollapsed
|
|---|
| 375 | * @property {(...args: any[]) => void=} groupEnd
|
|---|
| 376 | * @property {(...args: any[]) => void=} status
|
|---|
| 377 | * @property {(...args: any[]) => void=} profile
|
|---|
| 378 | * @property {(...args: any[]) => void=} profileEnd
|
|---|
| 379 | * @property {(...args: any[]) => void=} logTime
|
|---|
| 380 | */
|
|---|
| 381 |
|
|---|
| 382 | /**
|
|---|
| 383 | * @typedef {Object} LoggerOptions
|
|---|
| 384 | * @property {false|true|"none"|"error"|"warn"|"info"|"log"|"verbose"} level loglevel
|
|---|
| 385 | * @property {FilterTypes|boolean} debug filter for debug logging
|
|---|
| 386 | * @property {LoggerConsole} console the console to log to
|
|---|
| 387 | */
|
|---|
| 388 |
|
|---|
| 389 | /**
|
|---|
| 390 | * @param {FilterItemTypes} item an input item
|
|---|
| 391 | * @returns {FilterFunction} filter function
|
|---|
| 392 | */
|
|---|
| 393 | var filterToFunction = function filterToFunction(item) {
|
|---|
| 394 | if (typeof item === "string") {
|
|---|
| 395 | var regExp = new RegExp("[\\\\/]".concat(item.replace(
|
|---|
| 396 | // eslint-disable-next-line no-useless-escape
|
|---|
| 397 | /[-[\]{}()*+?.\\^$|]/g, "\\$&"), "([\\\\/]|$|!|\\?)"));
|
|---|
| 398 | return function (ident) {
|
|---|
| 399 | return regExp.test(ident);
|
|---|
| 400 | };
|
|---|
| 401 | }
|
|---|
| 402 | if (item && typeof item === "object" && typeof item.test === "function") {
|
|---|
| 403 | return function (ident) {
|
|---|
| 404 | return item.test(ident);
|
|---|
| 405 | };
|
|---|
| 406 | }
|
|---|
| 407 | if (typeof item === "function") {
|
|---|
| 408 | return item;
|
|---|
| 409 | }
|
|---|
| 410 | if (typeof item === "boolean") {
|
|---|
| 411 | return function () {
|
|---|
| 412 | return item;
|
|---|
| 413 | };
|
|---|
| 414 | }
|
|---|
| 415 | };
|
|---|
| 416 |
|
|---|
| 417 | /**
|
|---|
| 418 | * @enum {number}
|
|---|
| 419 | */
|
|---|
| 420 | var LogLevel = {
|
|---|
| 421 | none: 6,
|
|---|
| 422 | false: 6,
|
|---|
| 423 | error: 5,
|
|---|
| 424 | warn: 4,
|
|---|
| 425 | info: 3,
|
|---|
| 426 | log: 2,
|
|---|
| 427 | true: 2,
|
|---|
| 428 | verbose: 1
|
|---|
| 429 | };
|
|---|
| 430 |
|
|---|
| 431 | /**
|
|---|
| 432 | * @param {LoggerOptions} options options object
|
|---|
| 433 | * @returns {function(string, LogTypeEnum, any[]): void} logging function
|
|---|
| 434 | */
|
|---|
| 435 | module.exports = function (_ref) {
|
|---|
| 436 | var _ref$level = _ref.level,
|
|---|
| 437 | level = _ref$level === void 0 ? "info" : _ref$level,
|
|---|
| 438 | _ref$debug = _ref.debug,
|
|---|
| 439 | debug = _ref$debug === void 0 ? false : _ref$debug,
|
|---|
| 440 | console = _ref.console;
|
|---|
| 441 | var debugFilters = typeof debug === "boolean" ? [function () {
|
|---|
| 442 | return debug;
|
|---|
| 443 | }] : /** @type {FilterItemTypes[]} */[].concat(debug).map(filterToFunction);
|
|---|
| 444 | /** @type {number} */
|
|---|
| 445 | var loglevel = LogLevel["".concat(level)] || 0;
|
|---|
| 446 |
|
|---|
| 447 | /**
|
|---|
| 448 | * @param {string} name name of the logger
|
|---|
| 449 | * @param {LogTypeEnum} type type of the log entry
|
|---|
| 450 | * @param {any[]} args arguments of the log entry
|
|---|
| 451 | * @returns {void}
|
|---|
| 452 | */
|
|---|
| 453 | var logger = function logger(name, type, args) {
|
|---|
| 454 | var labeledArgs = function labeledArgs() {
|
|---|
| 455 | if (Array.isArray(args)) {
|
|---|
| 456 | if (args.length > 0 && typeof args[0] === "string") {
|
|---|
| 457 | return ["[".concat(name, "] ").concat(args[0])].concat(_toConsumableArray(args.slice(1)));
|
|---|
| 458 | } else {
|
|---|
| 459 | return ["[".concat(name, "]")].concat(_toConsumableArray(args));
|
|---|
| 460 | }
|
|---|
| 461 | } else {
|
|---|
| 462 | return [];
|
|---|
| 463 | }
|
|---|
| 464 | };
|
|---|
| 465 | var debug = debugFilters.some(function (f) {
|
|---|
| 466 | return f(name);
|
|---|
| 467 | });
|
|---|
| 468 | switch (type) {
|
|---|
| 469 | case LogType.debug:
|
|---|
| 470 | if (!debug) return;
|
|---|
| 471 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 472 | if (typeof console.debug === "function") {
|
|---|
| 473 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 474 | console.debug.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 475 | } else {
|
|---|
| 476 | console.log.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 477 | }
|
|---|
| 478 | break;
|
|---|
| 479 | case LogType.log:
|
|---|
| 480 | if (!debug && loglevel > LogLevel.log) return;
|
|---|
| 481 | console.log.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 482 | break;
|
|---|
| 483 | case LogType.info:
|
|---|
| 484 | if (!debug && loglevel > LogLevel.info) return;
|
|---|
| 485 | console.info.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 486 | break;
|
|---|
| 487 | case LogType.warn:
|
|---|
| 488 | if (!debug && loglevel > LogLevel.warn) return;
|
|---|
| 489 | console.warn.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 490 | break;
|
|---|
| 491 | case LogType.error:
|
|---|
| 492 | if (!debug && loglevel > LogLevel.error) return;
|
|---|
| 493 | console.error.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 494 | break;
|
|---|
| 495 | case LogType.trace:
|
|---|
| 496 | if (!debug) return;
|
|---|
| 497 | console.trace();
|
|---|
| 498 | break;
|
|---|
| 499 | case LogType.groupCollapsed:
|
|---|
| 500 | if (!debug && loglevel > LogLevel.log) return;
|
|---|
| 501 | if (!debug && loglevel > LogLevel.verbose) {
|
|---|
| 502 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 503 | if (typeof console.groupCollapsed === "function") {
|
|---|
| 504 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 505 | console.groupCollapsed.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 506 | } else {
|
|---|
| 507 | console.log.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 508 | }
|
|---|
| 509 | break;
|
|---|
| 510 | }
|
|---|
| 511 | // falls through
|
|---|
| 512 | case LogType.group:
|
|---|
| 513 | if (!debug && loglevel > LogLevel.log) return;
|
|---|
| 514 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 515 | if (typeof console.group === "function") {
|
|---|
| 516 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 517 | console.group.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 518 | } else {
|
|---|
| 519 | console.log.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 520 | }
|
|---|
| 521 | break;
|
|---|
| 522 | case LogType.groupEnd:
|
|---|
| 523 | if (!debug && loglevel > LogLevel.log) return;
|
|---|
| 524 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 525 | if (typeof console.groupEnd === "function") {
|
|---|
| 526 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 527 | console.groupEnd();
|
|---|
| 528 | }
|
|---|
| 529 | break;
|
|---|
| 530 | case LogType.time:
|
|---|
| 531 | {
|
|---|
| 532 | if (!debug && loglevel > LogLevel.log) return;
|
|---|
| 533 | var ms = args[1] * 1000 + args[2] / 1000000;
|
|---|
| 534 | var msg = "[".concat(name, "] ").concat(args[0], ": ").concat(ms, " ms");
|
|---|
| 535 | if (typeof console.logTime === "function") {
|
|---|
| 536 | console.logTime(msg);
|
|---|
| 537 | } else {
|
|---|
| 538 | console.log(msg);
|
|---|
| 539 | }
|
|---|
| 540 | break;
|
|---|
| 541 | }
|
|---|
| 542 | case LogType.profile:
|
|---|
| 543 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 544 | if (typeof console.profile === "function") {
|
|---|
| 545 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 546 | console.profile.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 547 | }
|
|---|
| 548 | break;
|
|---|
| 549 | case LogType.profileEnd:
|
|---|
| 550 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 551 | if (typeof console.profileEnd === "function") {
|
|---|
| 552 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 553 | console.profileEnd.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 554 | }
|
|---|
| 555 | break;
|
|---|
| 556 | case LogType.clear:
|
|---|
| 557 | if (!debug && loglevel > LogLevel.log) return;
|
|---|
| 558 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 559 | if (typeof console.clear === "function") {
|
|---|
| 560 | // eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|---|
| 561 | console.clear();
|
|---|
| 562 | }
|
|---|
| 563 | break;
|
|---|
| 564 | case LogType.status:
|
|---|
| 565 | if (!debug && loglevel > LogLevel.info) return;
|
|---|
| 566 | if (typeof console.status === "function") {
|
|---|
| 567 | if (args.length === 0) {
|
|---|
| 568 | console.status();
|
|---|
| 569 | } else {
|
|---|
| 570 | console.status.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 571 | }
|
|---|
| 572 | } else {
|
|---|
| 573 | if (args.length !== 0) {
|
|---|
| 574 | console.info.apply(console, _toConsumableArray(labeledArgs()));
|
|---|
| 575 | }
|
|---|
| 576 | }
|
|---|
| 577 | break;
|
|---|
| 578 | default:
|
|---|
| 579 | throw new Error("Unexpected LogType ".concat(type));
|
|---|
| 580 | }
|
|---|
| 581 | };
|
|---|
| 582 | return logger;
|
|---|
| 583 | };
|
|---|
| 584 |
|
|---|
| 585 | /***/ }),
|
|---|
| 586 |
|
|---|
| 587 | /***/ "./node_modules/webpack/lib/logging/runtime.js":
|
|---|
| 588 | /*!*****************************************************!*\
|
|---|
| 589 | !*** ./node_modules/webpack/lib/logging/runtime.js ***!
|
|---|
| 590 | \*****************************************************/
|
|---|
| 591 | /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|---|
| 592 |
|
|---|
| 593 | /*
|
|---|
| 594 | MIT License http://www.opensource.org/licenses/mit-license.php
|
|---|
| 595 | Author Tobias Koppers @sokra
|
|---|
| 596 | */
|
|---|
| 597 |
|
|---|
| 598 |
|
|---|
| 599 |
|
|---|
| 600 | function _extends() {
|
|---|
| 601 | _extends = Object.assign ? Object.assign.bind() : function (target) {
|
|---|
| 602 | for (var i = 1; i < arguments.length; i++) {
|
|---|
| 603 | var source = arguments[i];
|
|---|
| 604 | for (var key in source) {
|
|---|
| 605 | if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|---|
| 606 | target[key] = source[key];
|
|---|
| 607 | }
|
|---|
| 608 | }
|
|---|
| 609 | }
|
|---|
| 610 | return target;
|
|---|
| 611 | };
|
|---|
| 612 | return _extends.apply(this, arguments);
|
|---|
| 613 | }
|
|---|
| 614 | var SyncBailHook = __webpack_require__(/*! tapable/lib/SyncBailHook */ "./client-src/modules/logger/SyncBailHookFake.js");
|
|---|
| 615 | var _require = __webpack_require__(/*! ./Logger */ "./node_modules/webpack/lib/logging/Logger.js"),
|
|---|
| 616 | Logger = _require.Logger;
|
|---|
| 617 | var createConsoleLogger = __webpack_require__(/*! ./createConsoleLogger */ "./node_modules/webpack/lib/logging/createConsoleLogger.js");
|
|---|
| 618 |
|
|---|
| 619 | /** @type {createConsoleLogger.LoggerOptions} */
|
|---|
| 620 | var currentDefaultLoggerOptions = {
|
|---|
| 621 | level: "info",
|
|---|
| 622 | debug: false,
|
|---|
| 623 | console: console
|
|---|
| 624 | };
|
|---|
| 625 | var currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
|
|---|
| 626 |
|
|---|
| 627 | /**
|
|---|
| 628 | * @param {string} name name of the logger
|
|---|
| 629 | * @returns {Logger} a logger
|
|---|
| 630 | */
|
|---|
| 631 | exports.getLogger = function (name) {
|
|---|
| 632 | return new Logger(function (type, args) {
|
|---|
| 633 | if (exports.hooks.log.call(name, type, args) === undefined) {
|
|---|
| 634 | currentDefaultLogger(name, type, args);
|
|---|
| 635 | }
|
|---|
| 636 | }, function (childName) {
|
|---|
| 637 | return exports.getLogger("".concat(name, "/").concat(childName));
|
|---|
| 638 | });
|
|---|
| 639 | };
|
|---|
| 640 |
|
|---|
| 641 | /**
|
|---|
| 642 | * @param {createConsoleLogger.LoggerOptions} options new options, merge with old options
|
|---|
| 643 | * @returns {void}
|
|---|
| 644 | */
|
|---|
| 645 | exports.configureDefaultLogger = function (options) {
|
|---|
| 646 | _extends(currentDefaultLoggerOptions, options);
|
|---|
| 647 | currentDefaultLogger = createConsoleLogger(currentDefaultLoggerOptions);
|
|---|
| 648 | };
|
|---|
| 649 | exports.hooks = {
|
|---|
| 650 | log: new SyncBailHook(["origin", "type", "args"])
|
|---|
| 651 | };
|
|---|
| 652 |
|
|---|
| 653 | /***/ })
|
|---|
| 654 |
|
|---|
| 655 | /******/ });
|
|---|
| 656 | /************************************************************************/
|
|---|
| 657 | /******/ // The module cache
|
|---|
| 658 | /******/ var __webpack_module_cache__ = {};
|
|---|
| 659 | /******/
|
|---|
| 660 | /******/ // The require function
|
|---|
| 661 | /******/ function __webpack_require__(moduleId) {
|
|---|
| 662 | /******/ // Check if module is in cache
|
|---|
| 663 | /******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|---|
| 664 | /******/ if (cachedModule !== undefined) {
|
|---|
| 665 | /******/ return cachedModule.exports;
|
|---|
| 666 | /******/ }
|
|---|
| 667 | /******/ // Create a new module (and put it into the cache)
|
|---|
| 668 | /******/ var module = __webpack_module_cache__[moduleId] = {
|
|---|
| 669 | /******/ // no module.id needed
|
|---|
| 670 | /******/ // no module.loaded needed
|
|---|
| 671 | /******/ exports: {}
|
|---|
| 672 | /******/ };
|
|---|
| 673 | /******/
|
|---|
| 674 | /******/ // Execute the module function
|
|---|
| 675 | /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|---|
| 676 | /******/
|
|---|
| 677 | /******/ // Return the exports of the module
|
|---|
| 678 | /******/ return module.exports;
|
|---|
| 679 | /******/ }
|
|---|
| 680 | /******/
|
|---|
| 681 | /************************************************************************/
|
|---|
| 682 | /******/ /* webpack/runtime/define property getters */
|
|---|
| 683 | /******/ !function() {
|
|---|
| 684 | /******/ // define getter functions for harmony exports
|
|---|
| 685 | /******/ __webpack_require__.d = function(exports, definition) {
|
|---|
| 686 | /******/ for(var key in definition) {
|
|---|
| 687 | /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|---|
| 688 | /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|---|
| 689 | /******/ }
|
|---|
| 690 | /******/ }
|
|---|
| 691 | /******/ };
|
|---|
| 692 | /******/ }();
|
|---|
| 693 | /******/
|
|---|
| 694 | /******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|---|
| 695 | /******/ !function() {
|
|---|
| 696 | /******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
|---|
| 697 | /******/ }();
|
|---|
| 698 | /******/
|
|---|
| 699 | /******/ /* webpack/runtime/make namespace object */
|
|---|
| 700 | /******/ !function() {
|
|---|
| 701 | /******/ // define __esModule on exports
|
|---|
| 702 | /******/ __webpack_require__.r = function(exports) {
|
|---|
| 703 | /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|---|
| 704 | /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|---|
| 705 | /******/ }
|
|---|
| 706 | /******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|---|
| 707 | /******/ };
|
|---|
| 708 | /******/ }();
|
|---|
| 709 | /******/
|
|---|
| 710 | /************************************************************************/
|
|---|
| 711 | var __webpack_exports__ = {};
|
|---|
| 712 | // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|---|
| 713 | !function() {
|
|---|
| 714 | /*!********************************************!*\
|
|---|
| 715 | !*** ./client-src/modules/logger/index.js ***!
|
|---|
| 716 | \********************************************/
|
|---|
| 717 | __webpack_require__.r(__webpack_exports__);
|
|---|
| 718 | /* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|---|
| 719 | /* harmony export */ "default": function() { return /* reexport default export from named module */ webpack_lib_logging_runtime_js__WEBPACK_IMPORTED_MODULE_0__; }
|
|---|
| 720 | /* harmony export */ });
|
|---|
| 721 | /* 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");
|
|---|
| 722 |
|
|---|
| 723 | }();
|
|---|
| 724 | var __webpack_export_target__ = exports;
|
|---|
| 725 | for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i];
|
|---|
| 726 | if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true });
|
|---|
| 727 | /******/ })()
|
|---|
| 728 | ; |
|---|