clientnode 4.0.1517 → 4.0.1519
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/dist/Logger.d.ts +18 -6
- package/dist/Logger.js +28 -8
- package/dist/bundle/index.js +28 -8
- package/dist/compatible/Logger.js +28 -8
- package/dist/compatible/index.js +28 -8
- package/dist/compatible/scope.js +28 -8
- package/dist/index.js +28 -8
- package/dist/scope.js +28 -8
- package/package.json +9 -9
- package/readme.md +10 -9
package/dist/Logger.d.ts
CHANGED
|
@@ -47,48 +47,60 @@ export declare class Logger {
|
|
|
47
47
|
* log level specific annotations.
|
|
48
48
|
* @param level - Description of log messages importance.
|
|
49
49
|
* @param additionalArguments - Additional values to print.
|
|
50
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
51
|
+
* printed.
|
|
50
52
|
*/
|
|
51
|
-
log(object: unknown, force?: boolean, avoidAnnotation?: boolean, level?: Level, ...additionalArguments: Array<unknown>): void
|
|
53
|
+
log(object: unknown, force?: boolean, avoidAnnotation?: boolean, level?: Level, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
52
54
|
/**
|
|
53
55
|
* Wrapper method for the native console method usually provided by
|
|
54
56
|
* interpreter.
|
|
55
57
|
* @param object - Any object to print.
|
|
56
58
|
* @param additionalArguments - Additional arguments are used for string
|
|
57
59
|
* formatting.
|
|
60
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
61
|
+
* printed.
|
|
58
62
|
*/
|
|
59
|
-
info(object: unknown, ...additionalArguments: Array<unknown>): void
|
|
63
|
+
info(object: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
60
64
|
/**
|
|
61
65
|
* Wrapper method for the native console method usually provided by
|
|
62
66
|
* interpreter.
|
|
63
67
|
* @param object - Any object to print.
|
|
64
68
|
* @param additionalArguments - Additional arguments are used for string
|
|
65
69
|
* formatting.
|
|
70
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
71
|
+
* printed.
|
|
66
72
|
*/
|
|
67
|
-
debug(object: unknown, ...additionalArguments: Array<unknown>): void
|
|
73
|
+
debug(object: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
68
74
|
/**
|
|
69
75
|
* Wrapper method for the native console method usually provided by
|
|
70
76
|
* interpreter.
|
|
71
77
|
* @param object - Any object to print.
|
|
72
78
|
* @param additionalArguments - Additional arguments are used for string
|
|
73
79
|
* formatting.
|
|
80
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
81
|
+
* printed.
|
|
74
82
|
*/
|
|
75
|
-
error(object: unknown, ...additionalArguments: Array<unknown>): void
|
|
83
|
+
error(object: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
76
84
|
/**
|
|
77
85
|
* Wrapper method for the native console method usually provided by
|
|
78
86
|
* interpreter.
|
|
79
87
|
* @param object - Any object to print.
|
|
80
88
|
* @param additionalArguments - Additional arguments are used for string
|
|
81
89
|
* formatting.
|
|
90
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
91
|
+
* printed.
|
|
82
92
|
*/
|
|
83
|
-
critical(object: unknown, ...additionalArguments: Array<unknown>): void
|
|
93
|
+
critical(object: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
84
94
|
/**
|
|
85
95
|
* Wrapper method for the native console method usually provided by
|
|
86
96
|
* interpreter.
|
|
87
97
|
* @param object - Any object to print.
|
|
88
98
|
* @param additionalArguments - Additional arguments are used for string
|
|
89
99
|
* formatting.
|
|
100
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
101
|
+
* printed.
|
|
90
102
|
*/
|
|
91
|
-
warn(object: unknown, ...additionalArguments: Array<unknown>): void
|
|
103
|
+
warn(object: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
92
104
|
/**
|
|
93
105
|
* Dumps a given object in a human-readable format.
|
|
94
106
|
* @param object - Any object to show.
|
package/dist/Logger.js
CHANGED
|
@@ -522,7 +522,7 @@ module.exports = x({ });
|
|
|
522
522
|
naming 3.0 unported license.
|
|
523
523
|
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
524
524
|
endregion
|
|
525
|
-
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
525
|
+
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
526
526
|
* This plugin provides such interface logic like generic controller logic for
|
|
527
527
|
* integrating plugins into $, mutual exclusion for dependent gui elements,
|
|
528
528
|
* logging additional string, array or function handling. A set of helper
|
|
@@ -549,38 +549,58 @@ module.exports = x({ });
|
|
|
549
549
|
* log level specific annotations.
|
|
550
550
|
* @param level - Description of log messages importance.
|
|
551
551
|
* @param additionalArguments - Additional values to print.
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
553
|
+
* printed.
|
|
554
|
+
*/},{key:"log",value:(function(){var _log=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(object,force,avoidAnnotation,level){var currentLevelIndex,levelIndex,_globalContext$consol,messages,annotation,_len,additionalArguments,_key,multiLineAnnotation,lineLength,remainingLength,halfRemainingLength,_globalContext$window,_args=arguments;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:if(force===void 0){force=false}if(avoidAnnotation===void 0){avoidAnnotation=false}if(level===void 0){level="info"}currentLevelIndex=LEVELS.indexOf(this.level);levelIndex=LEVELS.indexOf(level);if(!(force||currentLevelIndex>=levelIndex)){_context.n=10;break}messages=[];annotation="".concat(LEVELS_COLOR[levelIndex]).concat(level)+"".concat(_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default,":").concat(this.name,":")+"".concat(new Date().toISOString(),":");for(_len=_args.length,additionalArguments=new Array(_len>4?_len-4:0),_key=4;_key<_len;_key++){additionalArguments[_key-4]=_args[_key]}if(!avoidAnnotation){_context.n=1;break}messages.push(object);_context.n=6;break;case 1:if(!(typeof object==="string")){_context.n=2;break}messages.push.apply(messages,[annotation,object].concat(additionalArguments));_context.n=6;break;case 2:if(!((0,_indicators_js__WEBPACK_IMPORTED_MODULE_2__/* .isNumeric */ .kf)(object)||typeof object==="boolean")){_context.n=3;break}messages.push.apply(messages,[annotation,object.toString()].concat(additionalArguments));_context.n=6;break;case 3:multiLineAnnotation=annotation.substring(0,annotation.length-1);lineLength=79-2;// Color codes are invisible so we have to add it.
|
|
555
|
+
remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default.length-multiLineAnnotation.length;halfRemainingLength=Math.floor(remainingLength/2);_context.n=4;return this.log(",".concat("-".repeat(halfRemainingLength))+multiLineAnnotation+"-".repeat(halfRemainingLength)+"".concat("-".repeat(remainingLength%2),","),force,true,level);case 4:_context.n=5;return this.log(object,force,true,level);case 5:_context.n=6;return this.log("'".concat("-".repeat(lineLength),"'"),force,true,level);case 6:if(!messages.length){_context.n=10;break}if(!(!(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console&&level in _context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)||_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console[level]===_context_js__WEBPACK_IMPORTED_MODULE_1__/* .NOOP */ .tE)){_context.n=7;break}if(Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz,"window")&&Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window,"alert"))(_globalContext$window=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window)===null||_globalContext$window===void 0||_globalContext$window.alert(messages.join(" "));/*
|
|
556
|
+
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
557
|
+
*/_context.n=10;break;case 7:if(!(typeof process!=="undefined"&&process.stdout)){_context.n=9;break}_context.n=8;return new Promise(function(resolve,reject){process.stdout.write("".concat(messages.map(String).join(" "),"\n"),function(error){if(error)/*
|
|
558
|
+
eslint-disable
|
|
559
|
+
prefer-promise-reject-errors
|
|
560
|
+
*/reject(error);/*
|
|
561
|
+
eslint-enable
|
|
562
|
+
prefer-promise-reject-errors
|
|
563
|
+
*/else resolve()})});case 8:_context.n=10;break;case 9:(_globalContext$consol=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)[level].apply(_globalContext$consol,messages);case 10:return _context.a(2)}},_callee,this)}));function log(_x,_x2,_x3,_x4){return _log.apply(this,arguments)}return log}()/**
|
|
554
564
|
* Wrapper method for the native console method usually provided by
|
|
555
565
|
* interpreter.
|
|
556
566
|
* @param object - Any object to print.
|
|
557
567
|
* @param additionalArguments - Additional arguments are used for string
|
|
558
568
|
* formatting.
|
|
559
|
-
|
|
569
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
570
|
+
* printed.
|
|
571
|
+
*/)},{key:"info",value:function info(object){for(var _len2=arguments.length,additionalArguments=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){additionalArguments[_key2-1]=arguments[_key2]}return this.log.apply(this,[object,false,false,"info"].concat(additionalArguments))}/**
|
|
560
572
|
* Wrapper method for the native console method usually provided by
|
|
561
573
|
* interpreter.
|
|
562
574
|
* @param object - Any object to print.
|
|
563
575
|
* @param additionalArguments - Additional arguments are used for string
|
|
564
576
|
* formatting.
|
|
565
|
-
|
|
577
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
578
|
+
* printed.
|
|
579
|
+
*/},{key:"debug",value:function debug(object){for(var _len3=arguments.length,additionalArguments=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){additionalArguments[_key3-1]=arguments[_key3]}return this.log.apply(this,[object,false,false,"debug"].concat(additionalArguments))}/**
|
|
566
580
|
* Wrapper method for the native console method usually provided by
|
|
567
581
|
* interpreter.
|
|
568
582
|
* @param object - Any object to print.
|
|
569
583
|
* @param additionalArguments - Additional arguments are used for string
|
|
570
584
|
* formatting.
|
|
571
|
-
|
|
585
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
586
|
+
* printed.
|
|
587
|
+
*/},{key:"error",value:function error(object){for(var _len4=arguments.length,additionalArguments=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){additionalArguments[_key4-1]=arguments[_key4]}return this.log.apply(this,[object,true,false,"error"].concat(additionalArguments))}/**
|
|
572
588
|
* Wrapper method for the native console method usually provided by
|
|
573
589
|
* interpreter.
|
|
574
590
|
* @param object - Any object to print.
|
|
575
591
|
* @param additionalArguments - Additional arguments are used for string
|
|
576
592
|
* formatting.
|
|
577
|
-
|
|
593
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
594
|
+
* printed.
|
|
595
|
+
*/},{key:"critical",value:function critical(object){for(var _len5=arguments.length,additionalArguments=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){additionalArguments[_key5-1]=arguments[_key5]}return this.log.apply(this,[object,true,false,"warn"].concat(additionalArguments))}/**
|
|
578
596
|
* Wrapper method for the native console method usually provided by
|
|
579
597
|
* interpreter.
|
|
580
598
|
* @param object - Any object to print.
|
|
581
599
|
* @param additionalArguments - Additional arguments are used for string
|
|
582
600
|
* formatting.
|
|
583
|
-
|
|
601
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
602
|
+
* printed.
|
|
603
|
+
*/},{key:"warn",value:function warn(object){for(var _len6=arguments.length,additionalArguments=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){additionalArguments[_key6-1]=arguments[_key6]}return this.log.apply(this,[object,false,false,"warn"].concat(additionalArguments))}/**
|
|
584
604
|
* Dumps a given object in a human-readable format.
|
|
585
605
|
* @param object - Any object to show.
|
|
586
606
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/bundle/index.js
CHANGED
|
@@ -3957,7 +3957,7 @@ __webpack_require__.d(module_namespaceObject, {
|
|
|
3957
3957
|
naming 3.0 unported license.
|
|
3958
3958
|
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
3959
3959
|
endregion
|
|
3960
|
-
*/var _Logger;function Logger_typeof(o){"@babel/helpers - typeof";return Logger_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Logger_typeof(o)}function Logger_slicedToArray(r,e){return Logger_arrayWithHoles(r)||Logger_iterableToArrayLimit(r,e)||Logger_unsupportedIterableToArray(r,e)||Logger_nonIterableRest()}function Logger_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Logger_unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return Logger_arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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)?Logger_arrayLikeToArray(r,a):void 0}}function Logger_arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function Logger_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function Logger_arrayWithHoles(r){if(Array.isArray(r))return r}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Logger_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Logger_defineProperty(e,r,t){return(r=Logger_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Logger_toPropertyKey(t){var i=Logger_toPrimitive(t,"string");return"symbol"==Logger_typeof(i)?i:i+""}function Logger_toPrimitive(t,r){if("object"!=Logger_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Logger_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[constants/* CLI_COLOR */.l_.red,constants/* CLI_COLOR */.l_.magenta,constants/* CLI_COLOR */.l_.yellow,constants/* CLI_COLOR */.l_.green,constants/* CLI_COLOR */.l_.blue];/**
|
|
3960
|
+
*/function Logger_defaults(e,r){for(var t=Object.getOwnPropertyNames(r),o=0;o<t.length;o++){var n=t[o],a=Object.getOwnPropertyDescriptor(r,n);a&&a.configurable&&void 0===e[n]&&Object.defineProperty(e,n,a)}return e}var _Logger;function Logger_typeof(o){"@babel/helpers - typeof";return Logger_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},Logger_typeof(o)}function Logger_slicedToArray(r,e){return Logger_arrayWithHoles(r)||Logger_iterableToArrayLimit(r,e)||Logger_unsupportedIterableToArray(r,e)||Logger_nonIterableRest()}function Logger_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Logger_unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return Logger_arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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)?Logger_arrayLikeToArray(r,a):void 0}}function Logger_arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function Logger_iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function Logger_arrayWithHoles(r){if(Array.isArray(r))return r}function Logger_regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return Logger_regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(Logger_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(Logger_defaults(e,GeneratorFunctionPrototype),Logger_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,Logger_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),Logger_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",Logger_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),Logger_regeneratorDefine2(u),Logger_regeneratorDefine2(u,o,"Generator"),Logger_regeneratorDefine2(u,n,function(){return this}),Logger_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(Logger_regenerator=function _regenerator(){return{w:i,m:f}})()}function Logger_regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}Logger_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){Logger_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},Logger_regeneratorDefine2(e,r,n,t)}function Logger_asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function Logger_asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){Logger_asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){Logger_asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,Logger_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Logger_defineProperty(e,r,t){return(r=Logger_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function Logger_toPropertyKey(t){var i=Logger_toPrimitive(t,"string");return"symbol"==Logger_typeof(i)?i:i+""}function Logger_toPrimitive(t,r){if("object"!=Logger_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=Logger_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[constants/* CLI_COLOR */.l_.red,constants/* CLI_COLOR */.l_.magenta,constants/* CLI_COLOR */.l_.yellow,constants/* CLI_COLOR */.l_.green,constants/* CLI_COLOR */.l_.blue];/**
|
|
3961
3961
|
* This plugin provides such interface logic like generic controller logic for
|
|
3962
3962
|
* integrating plugins into $, mutual exclusion for dependent gui elements,
|
|
3963
3963
|
* logging additional string, array or function handling. A set of helper
|
|
@@ -3984,38 +3984,58 @@ __webpack_require__.d(module_namespaceObject, {
|
|
|
3984
3984
|
* log level specific annotations.
|
|
3985
3985
|
* @param level - Description of log messages importance.
|
|
3986
3986
|
* @param additionalArguments - Additional values to print.
|
|
3987
|
-
|
|
3988
|
-
|
|
3987
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
3988
|
+
* printed.
|
|
3989
|
+
*/},{key:"log",value:(function(){var _log=Logger_asyncToGenerator(/*#__PURE__*/Logger_regenerator().m(function _callee(object,force,avoidAnnotation,level){var currentLevelIndex,levelIndex,_globalContext$consol,messages,annotation,_len,additionalArguments,_key,multiLineAnnotation,lineLength,remainingLength,halfRemainingLength,_globalContext$window,_args=arguments;return Logger_regenerator().w(function(_context){while(1)switch(_context.n){case 0:if(force===void 0){force=false}if(avoidAnnotation===void 0){avoidAnnotation=false}if(level===void 0){level="info"}currentLevelIndex=LEVELS.indexOf(this.level);levelIndex=LEVELS.indexOf(level);if(!(force||currentLevelIndex>=levelIndex)){_context.n=10;break}messages=[];annotation="".concat(LEVELS_COLOR[levelIndex]).concat(level)+"".concat(constants/* CLI_COLOR */.l_.default,":").concat(this.name,":")+"".concat(new Date().toISOString(),":");for(_len=_args.length,additionalArguments=new Array(_len>4?_len-4:0),_key=4;_key<_len;_key++){additionalArguments[_key-4]=_args[_key]}if(!avoidAnnotation){_context.n=1;break}messages.push(object);_context.n=6;break;case 1:if(!(typeof object==="string")){_context.n=2;break}messages.push.apply(messages,[annotation,object].concat(additionalArguments));_context.n=6;break;case 2:if(!((0,indicators/* isNumeric */.kf)(object)||typeof object==="boolean")){_context.n=3;break}messages.push.apply(messages,[annotation,object.toString()].concat(additionalArguments));_context.n=6;break;case 3:multiLineAnnotation=annotation.substring(0,annotation.length-1);lineLength=79-2;// Color codes are invisible so we have to add it.
|
|
3990
|
+
remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+constants/* CLI_COLOR */.l_.default.length-multiLineAnnotation.length;halfRemainingLength=Math.floor(remainingLength/2);_context.n=4;return this.log(",".concat("-".repeat(halfRemainingLength))+multiLineAnnotation+"-".repeat(halfRemainingLength)+"".concat("-".repeat(remainingLength%2),","),force,true,level);case 4:_context.n=5;return this.log(object,force,true,level);case 5:_context.n=6;return this.log("'".concat("-".repeat(lineLength),"'"),force,true,level);case 6:if(!messages.length){_context.n=10;break}if(!(!(context/* globalContext */.Lz.console&&level in context/* globalContext */.Lz.console)||context/* globalContext */.Lz.console[level]===context/* NOOP */.tE)){_context.n=7;break}if(Object.prototype.hasOwnProperty.call(context/* globalContext */.Lz,"window")&&Object.prototype.hasOwnProperty.call(context/* globalContext */.Lz.window,"alert"))(_globalContext$window=context/* globalContext */.Lz.window)===null||_globalContext$window===void 0||_globalContext$window.alert(messages.join(" "));/*
|
|
3991
|
+
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
3992
|
+
*/_context.n=10;break;case 7:if(!(typeof process!=="undefined"&&process.stdout)){_context.n=9;break}_context.n=8;return new Promise(function(resolve,reject){process.stdout.write("".concat(messages.map(String).join(" "),"\n"),function(error){if(error)/*
|
|
3993
|
+
eslint-disable
|
|
3994
|
+
prefer-promise-reject-errors
|
|
3995
|
+
*/reject(error);/*
|
|
3996
|
+
eslint-enable
|
|
3997
|
+
prefer-promise-reject-errors
|
|
3998
|
+
*/else resolve()})});case 8:_context.n=10;break;case 9:(_globalContext$consol=context/* globalContext */.Lz.console)[level].apply(_globalContext$consol,messages);case 10:return _context.a(2)}},_callee,this)}));function log(_x,_x2,_x3,_x4){return _log.apply(this,arguments)}return log}()/**
|
|
3989
3999
|
* Wrapper method for the native console method usually provided by
|
|
3990
4000
|
* interpreter.
|
|
3991
4001
|
* @param object - Any object to print.
|
|
3992
4002
|
* @param additionalArguments - Additional arguments are used for string
|
|
3993
4003
|
* formatting.
|
|
3994
|
-
|
|
4004
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
4005
|
+
* printed.
|
|
4006
|
+
*/)},{key:"info",value:function info(object){for(var _len2=arguments.length,additionalArguments=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){additionalArguments[_key2-1]=arguments[_key2]}return this.log.apply(this,[object,false,false,"info"].concat(additionalArguments))}/**
|
|
3995
4007
|
* Wrapper method for the native console method usually provided by
|
|
3996
4008
|
* interpreter.
|
|
3997
4009
|
* @param object - Any object to print.
|
|
3998
4010
|
* @param additionalArguments - Additional arguments are used for string
|
|
3999
4011
|
* formatting.
|
|
4000
|
-
|
|
4012
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
4013
|
+
* printed.
|
|
4014
|
+
*/},{key:"debug",value:function debug(object){for(var _len3=arguments.length,additionalArguments=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){additionalArguments[_key3-1]=arguments[_key3]}return this.log.apply(this,[object,false,false,"debug"].concat(additionalArguments))}/**
|
|
4001
4015
|
* Wrapper method for the native console method usually provided by
|
|
4002
4016
|
* interpreter.
|
|
4003
4017
|
* @param object - Any object to print.
|
|
4004
4018
|
* @param additionalArguments - Additional arguments are used for string
|
|
4005
4019
|
* formatting.
|
|
4006
|
-
|
|
4020
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
4021
|
+
* printed.
|
|
4022
|
+
*/},{key:"error",value:function error(object){for(var _len4=arguments.length,additionalArguments=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){additionalArguments[_key4-1]=arguments[_key4]}return this.log.apply(this,[object,true,false,"error"].concat(additionalArguments))}/**
|
|
4007
4023
|
* Wrapper method for the native console method usually provided by
|
|
4008
4024
|
* interpreter.
|
|
4009
4025
|
* @param object - Any object to print.
|
|
4010
4026
|
* @param additionalArguments - Additional arguments are used for string
|
|
4011
4027
|
* formatting.
|
|
4012
|
-
|
|
4028
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
4029
|
+
* printed.
|
|
4030
|
+
*/},{key:"critical",value:function critical(object){for(var _len5=arguments.length,additionalArguments=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){additionalArguments[_key5-1]=arguments[_key5]}return this.log.apply(this,[object,true,false,"warn"].concat(additionalArguments))}/**
|
|
4013
4031
|
* Wrapper method for the native console method usually provided by
|
|
4014
4032
|
* interpreter.
|
|
4015
4033
|
* @param object - Any object to print.
|
|
4016
4034
|
* @param additionalArguments - Additional arguments are used for string
|
|
4017
4035
|
* formatting.
|
|
4018
|
-
|
|
4036
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
4037
|
+
* printed.
|
|
4038
|
+
*/},{key:"warn",value:function warn(object){for(var _len6=arguments.length,additionalArguments=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){additionalArguments[_key6-1]=arguments[_key6]}return this.log.apply(this,[object,false,false,"warn"].concat(additionalArguments))}/**
|
|
4019
4039
|
* Dumps a given object in a human-readable format.
|
|
4020
4040
|
* @param object - Any object to show.
|
|
4021
4041
|
* @param level - Number of levels to dig into given object recursively.
|
|
@@ -522,7 +522,7 @@ module.exports = x({ });
|
|
|
522
522
|
naming 3.0 unported license.
|
|
523
523
|
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
524
524
|
endregion
|
|
525
|
-
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
525
|
+
*/function _defaults(e,r){for(var t=Object.getOwnPropertyNames(r),o=0;o<t.length;o++){var n=t[o],a=Object.getOwnPropertyDescriptor(r,n);a&&a.configurable&&void 0===e[n]&&Object.defineProperty(e,n,a)}return e}var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(_defaults(e,GeneratorFunctionPrototype),_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
526
526
|
* This plugin provides such interface logic like generic controller logic for
|
|
527
527
|
* integrating plugins into $, mutual exclusion for dependent gui elements,
|
|
528
528
|
* logging additional string, array or function handling. A set of helper
|
|
@@ -549,38 +549,58 @@ module.exports = x({ });
|
|
|
549
549
|
* log level specific annotations.
|
|
550
550
|
* @param level - Description of log messages importance.
|
|
551
551
|
* @param additionalArguments - Additional values to print.
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
553
|
+
* printed.
|
|
554
|
+
*/},{key:"log",value:(function(){var _log=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(object,force,avoidAnnotation,level){var currentLevelIndex,levelIndex,_globalContext$consol,messages,annotation,_len,additionalArguments,_key,multiLineAnnotation,lineLength,remainingLength,halfRemainingLength,_globalContext$window,_args=arguments;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:if(force===void 0){force=false}if(avoidAnnotation===void 0){avoidAnnotation=false}if(level===void 0){level="info"}currentLevelIndex=LEVELS.indexOf(this.level);levelIndex=LEVELS.indexOf(level);if(!(force||currentLevelIndex>=levelIndex)){_context.n=10;break}messages=[];annotation="".concat(LEVELS_COLOR[levelIndex]).concat(level)+"".concat(_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default,":").concat(this.name,":")+"".concat(new Date().toISOString(),":");for(_len=_args.length,additionalArguments=new Array(_len>4?_len-4:0),_key=4;_key<_len;_key++){additionalArguments[_key-4]=_args[_key]}if(!avoidAnnotation){_context.n=1;break}messages.push(object);_context.n=6;break;case 1:if(!(typeof object==="string")){_context.n=2;break}messages.push.apply(messages,[annotation,object].concat(additionalArguments));_context.n=6;break;case 2:if(!((0,_indicators_js__WEBPACK_IMPORTED_MODULE_2__/* .isNumeric */ .kf)(object)||typeof object==="boolean")){_context.n=3;break}messages.push.apply(messages,[annotation,object.toString()].concat(additionalArguments));_context.n=6;break;case 3:multiLineAnnotation=annotation.substring(0,annotation.length-1);lineLength=79-2;// Color codes are invisible so we have to add it.
|
|
555
|
+
remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default.length-multiLineAnnotation.length;halfRemainingLength=Math.floor(remainingLength/2);_context.n=4;return this.log(",".concat("-".repeat(halfRemainingLength))+multiLineAnnotation+"-".repeat(halfRemainingLength)+"".concat("-".repeat(remainingLength%2),","),force,true,level);case 4:_context.n=5;return this.log(object,force,true,level);case 5:_context.n=6;return this.log("'".concat("-".repeat(lineLength),"'"),force,true,level);case 6:if(!messages.length){_context.n=10;break}if(!(!(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console&&level in _context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)||_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console[level]===_context_js__WEBPACK_IMPORTED_MODULE_1__/* .NOOP */ .tE)){_context.n=7;break}if(Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz,"window")&&Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window,"alert"))(_globalContext$window=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window)===null||_globalContext$window===void 0||_globalContext$window.alert(messages.join(" "));/*
|
|
556
|
+
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
557
|
+
*/_context.n=10;break;case 7:if(!(typeof process!=="undefined"&&process.stdout)){_context.n=9;break}_context.n=8;return new Promise(function(resolve,reject){process.stdout.write("".concat(messages.map(String).join(" "),"\n"),function(error){if(error)/*
|
|
558
|
+
eslint-disable
|
|
559
|
+
prefer-promise-reject-errors
|
|
560
|
+
*/reject(error);/*
|
|
561
|
+
eslint-enable
|
|
562
|
+
prefer-promise-reject-errors
|
|
563
|
+
*/else resolve()})});case 8:_context.n=10;break;case 9:(_globalContext$consol=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)[level].apply(_globalContext$consol,messages);case 10:return _context.a(2)}},_callee,this)}));function log(_x,_x2,_x3,_x4){return _log.apply(this,arguments)}return log}()/**
|
|
554
564
|
* Wrapper method for the native console method usually provided by
|
|
555
565
|
* interpreter.
|
|
556
566
|
* @param object - Any object to print.
|
|
557
567
|
* @param additionalArguments - Additional arguments are used for string
|
|
558
568
|
* formatting.
|
|
559
|
-
|
|
569
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
570
|
+
* printed.
|
|
571
|
+
*/)},{key:"info",value:function info(object){for(var _len2=arguments.length,additionalArguments=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){additionalArguments[_key2-1]=arguments[_key2]}return this.log.apply(this,[object,false,false,"info"].concat(additionalArguments))}/**
|
|
560
572
|
* Wrapper method for the native console method usually provided by
|
|
561
573
|
* interpreter.
|
|
562
574
|
* @param object - Any object to print.
|
|
563
575
|
* @param additionalArguments - Additional arguments are used for string
|
|
564
576
|
* formatting.
|
|
565
|
-
|
|
577
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
578
|
+
* printed.
|
|
579
|
+
*/},{key:"debug",value:function debug(object){for(var _len3=arguments.length,additionalArguments=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){additionalArguments[_key3-1]=arguments[_key3]}return this.log.apply(this,[object,false,false,"debug"].concat(additionalArguments))}/**
|
|
566
580
|
* Wrapper method for the native console method usually provided by
|
|
567
581
|
* interpreter.
|
|
568
582
|
* @param object - Any object to print.
|
|
569
583
|
* @param additionalArguments - Additional arguments are used for string
|
|
570
584
|
* formatting.
|
|
571
|
-
|
|
585
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
586
|
+
* printed.
|
|
587
|
+
*/},{key:"error",value:function error(object){for(var _len4=arguments.length,additionalArguments=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){additionalArguments[_key4-1]=arguments[_key4]}return this.log.apply(this,[object,true,false,"error"].concat(additionalArguments))}/**
|
|
572
588
|
* Wrapper method for the native console method usually provided by
|
|
573
589
|
* interpreter.
|
|
574
590
|
* @param object - Any object to print.
|
|
575
591
|
* @param additionalArguments - Additional arguments are used for string
|
|
576
592
|
* formatting.
|
|
577
|
-
|
|
593
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
594
|
+
* printed.
|
|
595
|
+
*/},{key:"critical",value:function critical(object){for(var _len5=arguments.length,additionalArguments=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){additionalArguments[_key5-1]=arguments[_key5]}return this.log.apply(this,[object,true,false,"warn"].concat(additionalArguments))}/**
|
|
578
596
|
* Wrapper method for the native console method usually provided by
|
|
579
597
|
* interpreter.
|
|
580
598
|
* @param object - Any object to print.
|
|
581
599
|
* @param additionalArguments - Additional arguments are used for string
|
|
582
600
|
* formatting.
|
|
583
|
-
|
|
601
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
602
|
+
* printed.
|
|
603
|
+
*/},{key:"warn",value:function warn(object){for(var _len6=arguments.length,additionalArguments=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){additionalArguments[_key6-1]=arguments[_key6]}return this.log.apply(this,[object,false,false,"warn"].concat(additionalArguments))}/**
|
|
584
604
|
* Dumps a given object in a human-readable format.
|
|
585
605
|
* @param object - Any object to show.
|
|
586
606
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/compatible/index.js
CHANGED
|
@@ -1349,7 +1349,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1349
1349
|
naming 3.0 unported license.
|
|
1350
1350
|
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
1351
1351
|
endregion
|
|
1352
|
-
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
1352
|
+
*/function _defaults(e,r){for(var t=Object.getOwnPropertyNames(r),o=0;o<t.length;o++){var n=t[o],a=Object.getOwnPropertyDescriptor(r,n);a&&a.configurable&&void 0===e[n]&&Object.defineProperty(e,n,a)}return e}var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(_defaults(e,GeneratorFunctionPrototype),_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
1353
1353
|
* This plugin provides such interface logic like generic controller logic for
|
|
1354
1354
|
* integrating plugins into $, mutual exclusion for dependent gui elements,
|
|
1355
1355
|
* logging additional string, array or function handling. A set of helper
|
|
@@ -1376,38 +1376,58 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1376
1376
|
* log level specific annotations.
|
|
1377
1377
|
* @param level - Description of log messages importance.
|
|
1378
1378
|
* @param additionalArguments - Additional values to print.
|
|
1379
|
-
|
|
1380
|
-
|
|
1379
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1380
|
+
* printed.
|
|
1381
|
+
*/},{key:"log",value:(function(){var _log=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(object,force,avoidAnnotation,level){var currentLevelIndex,levelIndex,_globalContext$consol,messages,annotation,_len,additionalArguments,_key,multiLineAnnotation,lineLength,remainingLength,halfRemainingLength,_globalContext$window,_args=arguments;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:if(force===void 0){force=false}if(avoidAnnotation===void 0){avoidAnnotation=false}if(level===void 0){level="info"}currentLevelIndex=LEVELS.indexOf(this.level);levelIndex=LEVELS.indexOf(level);if(!(force||currentLevelIndex>=levelIndex)){_context.n=10;break}messages=[];annotation="".concat(LEVELS_COLOR[levelIndex]).concat(level)+"".concat(_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default,":").concat(this.name,":")+"".concat(new Date().toISOString(),":");for(_len=_args.length,additionalArguments=new Array(_len>4?_len-4:0),_key=4;_key<_len;_key++){additionalArguments[_key-4]=_args[_key]}if(!avoidAnnotation){_context.n=1;break}messages.push(object);_context.n=6;break;case 1:if(!(typeof object==="string")){_context.n=2;break}messages.push.apply(messages,[annotation,object].concat(additionalArguments));_context.n=6;break;case 2:if(!((0,_indicators_js__WEBPACK_IMPORTED_MODULE_2__/* .isNumeric */ .kf)(object)||typeof object==="boolean")){_context.n=3;break}messages.push.apply(messages,[annotation,object.toString()].concat(additionalArguments));_context.n=6;break;case 3:multiLineAnnotation=annotation.substring(0,annotation.length-1);lineLength=79-2;// Color codes are invisible so we have to add it.
|
|
1382
|
+
remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default.length-multiLineAnnotation.length;halfRemainingLength=Math.floor(remainingLength/2);_context.n=4;return this.log(",".concat("-".repeat(halfRemainingLength))+multiLineAnnotation+"-".repeat(halfRemainingLength)+"".concat("-".repeat(remainingLength%2),","),force,true,level);case 4:_context.n=5;return this.log(object,force,true,level);case 5:_context.n=6;return this.log("'".concat("-".repeat(lineLength),"'"),force,true,level);case 6:if(!messages.length){_context.n=10;break}if(!(!(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console&&level in _context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)||_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console[level]===_context_js__WEBPACK_IMPORTED_MODULE_1__/* .NOOP */ .tE)){_context.n=7;break}if(Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz,"window")&&Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window,"alert"))(_globalContext$window=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window)===null||_globalContext$window===void 0||_globalContext$window.alert(messages.join(" "));/*
|
|
1383
|
+
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
1384
|
+
*/_context.n=10;break;case 7:if(!(typeof process!=="undefined"&&process.stdout)){_context.n=9;break}_context.n=8;return new Promise(function(resolve,reject){process.stdout.write("".concat(messages.map(String).join(" "),"\n"),function(error){if(error)/*
|
|
1385
|
+
eslint-disable
|
|
1386
|
+
prefer-promise-reject-errors
|
|
1387
|
+
*/reject(error);/*
|
|
1388
|
+
eslint-enable
|
|
1389
|
+
prefer-promise-reject-errors
|
|
1390
|
+
*/else resolve()})});case 8:_context.n=10;break;case 9:(_globalContext$consol=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)[level].apply(_globalContext$consol,messages);case 10:return _context.a(2)}},_callee,this)}));function log(_x,_x2,_x3,_x4){return _log.apply(this,arguments)}return log}()/**
|
|
1381
1391
|
* Wrapper method for the native console method usually provided by
|
|
1382
1392
|
* interpreter.
|
|
1383
1393
|
* @param object - Any object to print.
|
|
1384
1394
|
* @param additionalArguments - Additional arguments are used for string
|
|
1385
1395
|
* formatting.
|
|
1386
|
-
|
|
1396
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1397
|
+
* printed.
|
|
1398
|
+
*/)},{key:"info",value:function info(object){for(var _len2=arguments.length,additionalArguments=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){additionalArguments[_key2-1]=arguments[_key2]}return this.log.apply(this,[object,false,false,"info"].concat(additionalArguments))}/**
|
|
1387
1399
|
* Wrapper method for the native console method usually provided by
|
|
1388
1400
|
* interpreter.
|
|
1389
1401
|
* @param object - Any object to print.
|
|
1390
1402
|
* @param additionalArguments - Additional arguments are used for string
|
|
1391
1403
|
* formatting.
|
|
1392
|
-
|
|
1404
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1405
|
+
* printed.
|
|
1406
|
+
*/},{key:"debug",value:function debug(object){for(var _len3=arguments.length,additionalArguments=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){additionalArguments[_key3-1]=arguments[_key3]}return this.log.apply(this,[object,false,false,"debug"].concat(additionalArguments))}/**
|
|
1393
1407
|
* Wrapper method for the native console method usually provided by
|
|
1394
1408
|
* interpreter.
|
|
1395
1409
|
* @param object - Any object to print.
|
|
1396
1410
|
* @param additionalArguments - Additional arguments are used for string
|
|
1397
1411
|
* formatting.
|
|
1398
|
-
|
|
1412
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1413
|
+
* printed.
|
|
1414
|
+
*/},{key:"error",value:function error(object){for(var _len4=arguments.length,additionalArguments=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){additionalArguments[_key4-1]=arguments[_key4]}return this.log.apply(this,[object,true,false,"error"].concat(additionalArguments))}/**
|
|
1399
1415
|
* Wrapper method for the native console method usually provided by
|
|
1400
1416
|
* interpreter.
|
|
1401
1417
|
* @param object - Any object to print.
|
|
1402
1418
|
* @param additionalArguments - Additional arguments are used for string
|
|
1403
1419
|
* formatting.
|
|
1404
|
-
|
|
1420
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1421
|
+
* printed.
|
|
1422
|
+
*/},{key:"critical",value:function critical(object){for(var _len5=arguments.length,additionalArguments=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){additionalArguments[_key5-1]=arguments[_key5]}return this.log.apply(this,[object,true,false,"warn"].concat(additionalArguments))}/**
|
|
1405
1423
|
* Wrapper method for the native console method usually provided by
|
|
1406
1424
|
* interpreter.
|
|
1407
1425
|
* @param object - Any object to print.
|
|
1408
1426
|
* @param additionalArguments - Additional arguments are used for string
|
|
1409
1427
|
* formatting.
|
|
1410
|
-
|
|
1428
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1429
|
+
* printed.
|
|
1430
|
+
*/},{key:"warn",value:function warn(object){for(var _len6=arguments.length,additionalArguments=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){additionalArguments[_key6-1]=arguments[_key6]}return this.log.apply(this,[object,false,false,"warn"].concat(additionalArguments))}/**
|
|
1411
1431
|
* Dumps a given object in a human-readable format.
|
|
1412
1432
|
* @param object - Any object to show.
|
|
1413
1433
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/compatible/scope.js
CHANGED
|
@@ -1216,7 +1216,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1216
1216
|
naming 3.0 unported license.
|
|
1217
1217
|
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
1218
1218
|
endregion
|
|
1219
|
-
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
1219
|
+
*/function _defaults(e,r){for(var t=Object.getOwnPropertyNames(r),o=0;o<t.length;o++){var n=t[o],a=Object.getOwnPropertyDescriptor(r,n);a&&a.configurable&&void 0===e[n]&&Object.defineProperty(e,n,a)}return e}var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(_defaults(e,GeneratorFunctionPrototype),_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
1220
1220
|
* This plugin provides such interface logic like generic controller logic for
|
|
1221
1221
|
* integrating plugins into $, mutual exclusion for dependent gui elements,
|
|
1222
1222
|
* logging additional string, array or function handling. A set of helper
|
|
@@ -1243,38 +1243,58 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1243
1243
|
* log level specific annotations.
|
|
1244
1244
|
* @param level - Description of log messages importance.
|
|
1245
1245
|
* @param additionalArguments - Additional values to print.
|
|
1246
|
-
|
|
1247
|
-
|
|
1246
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1247
|
+
* printed.
|
|
1248
|
+
*/},{key:"log",value:(function(){var _log=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(object,force,avoidAnnotation,level){var currentLevelIndex,levelIndex,_globalContext$consol,messages,annotation,_len,additionalArguments,_key,multiLineAnnotation,lineLength,remainingLength,halfRemainingLength,_globalContext$window,_args=arguments;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:if(force===void 0){force=false}if(avoidAnnotation===void 0){avoidAnnotation=false}if(level===void 0){level="info"}currentLevelIndex=LEVELS.indexOf(this.level);levelIndex=LEVELS.indexOf(level);if(!(force||currentLevelIndex>=levelIndex)){_context.n=10;break}messages=[];annotation="".concat(LEVELS_COLOR[levelIndex]).concat(level)+"".concat(_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default,":").concat(this.name,":")+"".concat(new Date().toISOString(),":");for(_len=_args.length,additionalArguments=new Array(_len>4?_len-4:0),_key=4;_key<_len;_key++){additionalArguments[_key-4]=_args[_key]}if(!avoidAnnotation){_context.n=1;break}messages.push(object);_context.n=6;break;case 1:if(!(typeof object==="string")){_context.n=2;break}messages.push.apply(messages,[annotation,object].concat(additionalArguments));_context.n=6;break;case 2:if(!((0,_indicators_js__WEBPACK_IMPORTED_MODULE_2__/* .isNumeric */ .kf)(object)||typeof object==="boolean")){_context.n=3;break}messages.push.apply(messages,[annotation,object.toString()].concat(additionalArguments));_context.n=6;break;case 3:multiLineAnnotation=annotation.substring(0,annotation.length-1);lineLength=79-2;// Color codes are invisible so we have to add it.
|
|
1249
|
+
remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default.length-multiLineAnnotation.length;halfRemainingLength=Math.floor(remainingLength/2);_context.n=4;return this.log(",".concat("-".repeat(halfRemainingLength))+multiLineAnnotation+"-".repeat(halfRemainingLength)+"".concat("-".repeat(remainingLength%2),","),force,true,level);case 4:_context.n=5;return this.log(object,force,true,level);case 5:_context.n=6;return this.log("'".concat("-".repeat(lineLength),"'"),force,true,level);case 6:if(!messages.length){_context.n=10;break}if(!(!(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console&&level in _context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)||_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console[level]===_context_js__WEBPACK_IMPORTED_MODULE_1__/* .NOOP */ .tE)){_context.n=7;break}if(Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz,"window")&&Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window,"alert"))(_globalContext$window=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window)===null||_globalContext$window===void 0||_globalContext$window.alert(messages.join(" "));/*
|
|
1250
|
+
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
1251
|
+
*/_context.n=10;break;case 7:if(!(typeof process!=="undefined"&&process.stdout)){_context.n=9;break}_context.n=8;return new Promise(function(resolve,reject){process.stdout.write("".concat(messages.map(String).join(" "),"\n"),function(error){if(error)/*
|
|
1252
|
+
eslint-disable
|
|
1253
|
+
prefer-promise-reject-errors
|
|
1254
|
+
*/reject(error);/*
|
|
1255
|
+
eslint-enable
|
|
1256
|
+
prefer-promise-reject-errors
|
|
1257
|
+
*/else resolve()})});case 8:_context.n=10;break;case 9:(_globalContext$consol=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)[level].apply(_globalContext$consol,messages);case 10:return _context.a(2)}},_callee,this)}));function log(_x,_x2,_x3,_x4){return _log.apply(this,arguments)}return log}()/**
|
|
1248
1258
|
* Wrapper method for the native console method usually provided by
|
|
1249
1259
|
* interpreter.
|
|
1250
1260
|
* @param object - Any object to print.
|
|
1251
1261
|
* @param additionalArguments - Additional arguments are used for string
|
|
1252
1262
|
* formatting.
|
|
1253
|
-
|
|
1263
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1264
|
+
* printed.
|
|
1265
|
+
*/)},{key:"info",value:function info(object){for(var _len2=arguments.length,additionalArguments=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){additionalArguments[_key2-1]=arguments[_key2]}return this.log.apply(this,[object,false,false,"info"].concat(additionalArguments))}/**
|
|
1254
1266
|
* Wrapper method for the native console method usually provided by
|
|
1255
1267
|
* interpreter.
|
|
1256
1268
|
* @param object - Any object to print.
|
|
1257
1269
|
* @param additionalArguments - Additional arguments are used for string
|
|
1258
1270
|
* formatting.
|
|
1259
|
-
|
|
1271
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1272
|
+
* printed.
|
|
1273
|
+
*/},{key:"debug",value:function debug(object){for(var _len3=arguments.length,additionalArguments=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){additionalArguments[_key3-1]=arguments[_key3]}return this.log.apply(this,[object,false,false,"debug"].concat(additionalArguments))}/**
|
|
1260
1274
|
* Wrapper method for the native console method usually provided by
|
|
1261
1275
|
* interpreter.
|
|
1262
1276
|
* @param object - Any object to print.
|
|
1263
1277
|
* @param additionalArguments - Additional arguments are used for string
|
|
1264
1278
|
* formatting.
|
|
1265
|
-
|
|
1279
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1280
|
+
* printed.
|
|
1281
|
+
*/},{key:"error",value:function error(object){for(var _len4=arguments.length,additionalArguments=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){additionalArguments[_key4-1]=arguments[_key4]}return this.log.apply(this,[object,true,false,"error"].concat(additionalArguments))}/**
|
|
1266
1282
|
* Wrapper method for the native console method usually provided by
|
|
1267
1283
|
* interpreter.
|
|
1268
1284
|
* @param object - Any object to print.
|
|
1269
1285
|
* @param additionalArguments - Additional arguments are used for string
|
|
1270
1286
|
* formatting.
|
|
1271
|
-
|
|
1287
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1288
|
+
* printed.
|
|
1289
|
+
*/},{key:"critical",value:function critical(object){for(var _len5=arguments.length,additionalArguments=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){additionalArguments[_key5-1]=arguments[_key5]}return this.log.apply(this,[object,true,false,"warn"].concat(additionalArguments))}/**
|
|
1272
1290
|
* Wrapper method for the native console method usually provided by
|
|
1273
1291
|
* interpreter.
|
|
1274
1292
|
* @param object - Any object to print.
|
|
1275
1293
|
* @param additionalArguments - Additional arguments are used for string
|
|
1276
1294
|
* formatting.
|
|
1277
|
-
|
|
1295
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1296
|
+
* printed.
|
|
1297
|
+
*/},{key:"warn",value:function warn(object){for(var _len6=arguments.length,additionalArguments=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){additionalArguments[_key6-1]=arguments[_key6]}return this.log.apply(this,[object,false,false,"warn"].concat(additionalArguments))}/**
|
|
1278
1298
|
* Dumps a given object in a human-readable format.
|
|
1279
1299
|
* @param object - Any object to show.
|
|
1280
1300
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/index.js
CHANGED
|
@@ -1349,7 +1349,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1349
1349
|
naming 3.0 unported license.
|
|
1350
1350
|
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
1351
1351
|
endregion
|
|
1352
|
-
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
1352
|
+
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
1353
1353
|
* This plugin provides such interface logic like generic controller logic for
|
|
1354
1354
|
* integrating plugins into $, mutual exclusion for dependent gui elements,
|
|
1355
1355
|
* logging additional string, array or function handling. A set of helper
|
|
@@ -1376,38 +1376,58 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1376
1376
|
* log level specific annotations.
|
|
1377
1377
|
* @param level - Description of log messages importance.
|
|
1378
1378
|
* @param additionalArguments - Additional values to print.
|
|
1379
|
-
|
|
1380
|
-
|
|
1379
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1380
|
+
* printed.
|
|
1381
|
+
*/},{key:"log",value:(function(){var _log=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(object,force,avoidAnnotation,level){var currentLevelIndex,levelIndex,_globalContext$consol,messages,annotation,_len,additionalArguments,_key,multiLineAnnotation,lineLength,remainingLength,halfRemainingLength,_globalContext$window,_args=arguments;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:if(force===void 0){force=false}if(avoidAnnotation===void 0){avoidAnnotation=false}if(level===void 0){level="info"}currentLevelIndex=LEVELS.indexOf(this.level);levelIndex=LEVELS.indexOf(level);if(!(force||currentLevelIndex>=levelIndex)){_context.n=10;break}messages=[];annotation="".concat(LEVELS_COLOR[levelIndex]).concat(level)+"".concat(_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default,":").concat(this.name,":")+"".concat(new Date().toISOString(),":");for(_len=_args.length,additionalArguments=new Array(_len>4?_len-4:0),_key=4;_key<_len;_key++){additionalArguments[_key-4]=_args[_key]}if(!avoidAnnotation){_context.n=1;break}messages.push(object);_context.n=6;break;case 1:if(!(typeof object==="string")){_context.n=2;break}messages.push.apply(messages,[annotation,object].concat(additionalArguments));_context.n=6;break;case 2:if(!((0,_indicators_js__WEBPACK_IMPORTED_MODULE_2__/* .isNumeric */ .kf)(object)||typeof object==="boolean")){_context.n=3;break}messages.push.apply(messages,[annotation,object.toString()].concat(additionalArguments));_context.n=6;break;case 3:multiLineAnnotation=annotation.substring(0,annotation.length-1);lineLength=79-2;// Color codes are invisible so we have to add it.
|
|
1382
|
+
remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default.length-multiLineAnnotation.length;halfRemainingLength=Math.floor(remainingLength/2);_context.n=4;return this.log(",".concat("-".repeat(halfRemainingLength))+multiLineAnnotation+"-".repeat(halfRemainingLength)+"".concat("-".repeat(remainingLength%2),","),force,true,level);case 4:_context.n=5;return this.log(object,force,true,level);case 5:_context.n=6;return this.log("'".concat("-".repeat(lineLength),"'"),force,true,level);case 6:if(!messages.length){_context.n=10;break}if(!(!(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console&&level in _context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)||_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console[level]===_context_js__WEBPACK_IMPORTED_MODULE_1__/* .NOOP */ .tE)){_context.n=7;break}if(Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz,"window")&&Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window,"alert"))(_globalContext$window=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window)===null||_globalContext$window===void 0||_globalContext$window.alert(messages.join(" "));/*
|
|
1383
|
+
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
1384
|
+
*/_context.n=10;break;case 7:if(!(typeof process!=="undefined"&&process.stdout)){_context.n=9;break}_context.n=8;return new Promise(function(resolve,reject){process.stdout.write("".concat(messages.map(String).join(" "),"\n"),function(error){if(error)/*
|
|
1385
|
+
eslint-disable
|
|
1386
|
+
prefer-promise-reject-errors
|
|
1387
|
+
*/reject(error);/*
|
|
1388
|
+
eslint-enable
|
|
1389
|
+
prefer-promise-reject-errors
|
|
1390
|
+
*/else resolve()})});case 8:_context.n=10;break;case 9:(_globalContext$consol=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)[level].apply(_globalContext$consol,messages);case 10:return _context.a(2)}},_callee,this)}));function log(_x,_x2,_x3,_x4){return _log.apply(this,arguments)}return log}()/**
|
|
1381
1391
|
* Wrapper method for the native console method usually provided by
|
|
1382
1392
|
* interpreter.
|
|
1383
1393
|
* @param object - Any object to print.
|
|
1384
1394
|
* @param additionalArguments - Additional arguments are used for string
|
|
1385
1395
|
* formatting.
|
|
1386
|
-
|
|
1396
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1397
|
+
* printed.
|
|
1398
|
+
*/)},{key:"info",value:function info(object){for(var _len2=arguments.length,additionalArguments=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){additionalArguments[_key2-1]=arguments[_key2]}return this.log.apply(this,[object,false,false,"info"].concat(additionalArguments))}/**
|
|
1387
1399
|
* Wrapper method for the native console method usually provided by
|
|
1388
1400
|
* interpreter.
|
|
1389
1401
|
* @param object - Any object to print.
|
|
1390
1402
|
* @param additionalArguments - Additional arguments are used for string
|
|
1391
1403
|
* formatting.
|
|
1392
|
-
|
|
1404
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1405
|
+
* printed.
|
|
1406
|
+
*/},{key:"debug",value:function debug(object){for(var _len3=arguments.length,additionalArguments=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){additionalArguments[_key3-1]=arguments[_key3]}return this.log.apply(this,[object,false,false,"debug"].concat(additionalArguments))}/**
|
|
1393
1407
|
* Wrapper method for the native console method usually provided by
|
|
1394
1408
|
* interpreter.
|
|
1395
1409
|
* @param object - Any object to print.
|
|
1396
1410
|
* @param additionalArguments - Additional arguments are used for string
|
|
1397
1411
|
* formatting.
|
|
1398
|
-
|
|
1412
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1413
|
+
* printed.
|
|
1414
|
+
*/},{key:"error",value:function error(object){for(var _len4=arguments.length,additionalArguments=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){additionalArguments[_key4-1]=arguments[_key4]}return this.log.apply(this,[object,true,false,"error"].concat(additionalArguments))}/**
|
|
1399
1415
|
* Wrapper method for the native console method usually provided by
|
|
1400
1416
|
* interpreter.
|
|
1401
1417
|
* @param object - Any object to print.
|
|
1402
1418
|
* @param additionalArguments - Additional arguments are used for string
|
|
1403
1419
|
* formatting.
|
|
1404
|
-
|
|
1420
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1421
|
+
* printed.
|
|
1422
|
+
*/},{key:"critical",value:function critical(object){for(var _len5=arguments.length,additionalArguments=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){additionalArguments[_key5-1]=arguments[_key5]}return this.log.apply(this,[object,true,false,"warn"].concat(additionalArguments))}/**
|
|
1405
1423
|
* Wrapper method for the native console method usually provided by
|
|
1406
1424
|
* interpreter.
|
|
1407
1425
|
* @param object - Any object to print.
|
|
1408
1426
|
* @param additionalArguments - Additional arguments are used for string
|
|
1409
1427
|
* formatting.
|
|
1410
|
-
|
|
1428
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1429
|
+
* printed.
|
|
1430
|
+
*/},{key:"warn",value:function warn(object){for(var _len6=arguments.length,additionalArguments=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){additionalArguments[_key6-1]=arguments[_key6]}return this.log.apply(this,[object,false,false,"warn"].concat(additionalArguments))}/**
|
|
1411
1431
|
* Dumps a given object in a human-readable format.
|
|
1412
1432
|
* @param object - Any object to show.
|
|
1413
1433
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/scope.js
CHANGED
|
@@ -1216,7 +1216,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1216
1216
|
naming 3.0 unported license.
|
|
1217
1217
|
See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
1218
1218
|
endregion
|
|
1219
|
-
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
1219
|
+
*/var _Logger;function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}function _slicedToArray(r,e){return _arrayWithHoles(r)||_iterableToArrayLimit(r,e)||_unsupportedIterableToArray(r,e)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);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}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _iterableToArrayLimit(r,l){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,n,i,u,a=[],f=!0,o=!1;try{if(i=(t=t.call(r)).next,0===l){if(Object(t)!==t)return;f=!1}else for(;!(f=(e=i.call(t)).done)&&(a.push(e.value),a.length!==l);f=!0);}catch(r){o=!0,n=r}finally{try{if(!f&&null!=t.return&&(u=t.return(),Object(u)!==u))return}finally{if(o)throw n}}return a}}function _arrayWithHoles(r){if(Array.isArray(r))return r}function _regenerator(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var c=n&&n.prototype instanceof Generator?n:Generator,u=Object.create(c.prototype);return _regeneratorDefine2(u,"_invoke",function(r,n,o){var i,c,u,f=0,p=o||[],y=!1,G={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function d(t,r){return i=t,c=0,u=e,G.n=r,a}};function d(r,n){for(c=r,u=n,t=0;!y&&f&&!o&&t<p.length;t++){var o,i=p[t],d=G.p,l=i[2];r>3?(o=l===n)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=r<2&&d<i[1])?(c=0,G.v=n,G.n=i[1]):d<l&&(o=r<3||i[0]>n||n>l)&&(i[4]=r,i[5]=n,G.n=l,c=0))}if(o||r>1)return a;throw y=!0,n}return function(o,p,l){if(f>1)throw TypeError("Generator is already running");for(y&&1===p&&d(p,l),c=p,u=l;(t=c<2?e:u)||!y;){i||(c?c<3?(c>1&&(G.n=-1),d(c,u)):G.n=u:G.v=u);try{if(f=2,i){if(c||(o="next"),t=i[o]){if(!(t=t.call(i,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,c<2&&(c=0)}else 1===c&&(t=i.return)&&t.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=e}else if((t=(y=G.n<0)?u:r.call(n,G))!==a)break}catch(t){i=e,c=1,u=t}finally{f=1}}return{value:t,done:y}}}(r,o,i),!0),u}var a={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(_regeneratorDefine2(t={},n,function(){return this}),t),u=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(c);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,GeneratorFunctionPrototype):(e.__proto__=GeneratorFunctionPrototype,_regeneratorDefine2(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return GeneratorFunction.prototype=GeneratorFunctionPrototype,_regeneratorDefine2(u,"constructor",GeneratorFunctionPrototype),_regeneratorDefine2(GeneratorFunctionPrototype,"constructor",GeneratorFunction),GeneratorFunction.displayName="GeneratorFunction",_regeneratorDefine2(GeneratorFunctionPrototype,o,"GeneratorFunction"),_regeneratorDefine2(u),_regeneratorDefine2(u,o,"Generator"),_regeneratorDefine2(u,n,function(){return this}),_regeneratorDefine2(u,"toString",function(){return"[object Generator]"}),(_regenerator=function _regenerator(){return{w:i,m:f}})()}function _regeneratorDefine2(e,r,n,t){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}_regeneratorDefine2=function _regeneratorDefine(e,r,n,t){function o(r,n){_regeneratorDefine2(e,r,function(e){return this._invoke(r,n,e)})}r?i?i(e,r,{value:n,enumerable:!t,configurable:!t,writable:!t}):e[r]=n:(o("next",0),o("throw",1),o("return",2))},_regeneratorDefine2(e,r,n,t)}function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){return void e(n)}i.done?t(u):Promise.resolve(u).then(r,o)}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n)}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n)}_next(void 0)})}}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+""}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)};var LEVELS=["error","critical","warn","info","debug"];var LEVELS_COLOR=[_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.red,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.magenta,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.yellow,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.green,_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.blue];/**
|
|
1220
1220
|
* This plugin provides such interface logic like generic controller logic for
|
|
1221
1221
|
* integrating plugins into $, mutual exclusion for dependent gui elements,
|
|
1222
1222
|
* logging additional string, array or function handling. A set of helper
|
|
@@ -1243,38 +1243,58 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1243
1243
|
* log level specific annotations.
|
|
1244
1244
|
* @param level - Description of log messages importance.
|
|
1245
1245
|
* @param additionalArguments - Additional values to print.
|
|
1246
|
-
|
|
1247
|
-
|
|
1246
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1247
|
+
* printed.
|
|
1248
|
+
*/},{key:"log",value:(function(){var _log=_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(object,force,avoidAnnotation,level){var currentLevelIndex,levelIndex,_globalContext$consol,messages,annotation,_len,additionalArguments,_key,multiLineAnnotation,lineLength,remainingLength,halfRemainingLength,_globalContext$window,_args=arguments;return _regenerator().w(function(_context){while(1)switch(_context.n){case 0:if(force===void 0){force=false}if(avoidAnnotation===void 0){avoidAnnotation=false}if(level===void 0){level="info"}currentLevelIndex=LEVELS.indexOf(this.level);levelIndex=LEVELS.indexOf(level);if(!(force||currentLevelIndex>=levelIndex)){_context.n=10;break}messages=[];annotation="".concat(LEVELS_COLOR[levelIndex]).concat(level)+"".concat(_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default,":").concat(this.name,":")+"".concat(new Date().toISOString(),":");for(_len=_args.length,additionalArguments=new Array(_len>4?_len-4:0),_key=4;_key<_len;_key++){additionalArguments[_key-4]=_args[_key]}if(!avoidAnnotation){_context.n=1;break}messages.push(object);_context.n=6;break;case 1:if(!(typeof object==="string")){_context.n=2;break}messages.push.apply(messages,[annotation,object].concat(additionalArguments));_context.n=6;break;case 2:if(!((0,_indicators_js__WEBPACK_IMPORTED_MODULE_2__/* .isNumeric */ .kf)(object)||typeof object==="boolean")){_context.n=3;break}messages.push.apply(messages,[annotation,object.toString()].concat(additionalArguments));_context.n=6;break;case 3:multiLineAnnotation=annotation.substring(0,annotation.length-1);lineLength=79-2;// Color codes are invisible so we have to add it.
|
|
1249
|
+
remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPORTED_MODULE_0__/* .CLI_COLOR */ .l_.default.length-multiLineAnnotation.length;halfRemainingLength=Math.floor(remainingLength/2);_context.n=4;return this.log(",".concat("-".repeat(halfRemainingLength))+multiLineAnnotation+"-".repeat(halfRemainingLength)+"".concat("-".repeat(remainingLength%2),","),force,true,level);case 4:_context.n=5;return this.log(object,force,true,level);case 5:_context.n=6;return this.log("'".concat("-".repeat(lineLength),"'"),force,true,level);case 6:if(!messages.length){_context.n=10;break}if(!(!(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console&&level in _context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)||_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console[level]===_context_js__WEBPACK_IMPORTED_MODULE_1__/* .NOOP */ .tE)){_context.n=7;break}if(Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz,"window")&&Object.prototype.hasOwnProperty.call(_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window,"alert"))(_globalContext$window=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.window)===null||_globalContext$window===void 0||_globalContext$window.alert(messages.join(" "));/*
|
|
1250
|
+
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
1251
|
+
*/_context.n=10;break;case 7:if(!(typeof process!=="undefined"&&process.stdout)){_context.n=9;break}_context.n=8;return new Promise(function(resolve,reject){process.stdout.write("".concat(messages.map(String).join(" "),"\n"),function(error){if(error)/*
|
|
1252
|
+
eslint-disable
|
|
1253
|
+
prefer-promise-reject-errors
|
|
1254
|
+
*/reject(error);/*
|
|
1255
|
+
eslint-enable
|
|
1256
|
+
prefer-promise-reject-errors
|
|
1257
|
+
*/else resolve()})});case 8:_context.n=10;break;case 9:(_globalContext$consol=_context_js__WEBPACK_IMPORTED_MODULE_1__/* .globalContext */ .Lz.console)[level].apply(_globalContext$consol,messages);case 10:return _context.a(2)}},_callee,this)}));function log(_x,_x2,_x3,_x4){return _log.apply(this,arguments)}return log}()/**
|
|
1248
1258
|
* Wrapper method for the native console method usually provided by
|
|
1249
1259
|
* interpreter.
|
|
1250
1260
|
* @param object - Any object to print.
|
|
1251
1261
|
* @param additionalArguments - Additional arguments are used for string
|
|
1252
1262
|
* formatting.
|
|
1253
|
-
|
|
1263
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1264
|
+
* printed.
|
|
1265
|
+
*/)},{key:"info",value:function info(object){for(var _len2=arguments.length,additionalArguments=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){additionalArguments[_key2-1]=arguments[_key2]}return this.log.apply(this,[object,false,false,"info"].concat(additionalArguments))}/**
|
|
1254
1266
|
* Wrapper method for the native console method usually provided by
|
|
1255
1267
|
* interpreter.
|
|
1256
1268
|
* @param object - Any object to print.
|
|
1257
1269
|
* @param additionalArguments - Additional arguments are used for string
|
|
1258
1270
|
* formatting.
|
|
1259
|
-
|
|
1271
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1272
|
+
* printed.
|
|
1273
|
+
*/},{key:"debug",value:function debug(object){for(var _len3=arguments.length,additionalArguments=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){additionalArguments[_key3-1]=arguments[_key3]}return this.log.apply(this,[object,false,false,"debug"].concat(additionalArguments))}/**
|
|
1260
1274
|
* Wrapper method for the native console method usually provided by
|
|
1261
1275
|
* interpreter.
|
|
1262
1276
|
* @param object - Any object to print.
|
|
1263
1277
|
* @param additionalArguments - Additional arguments are used for string
|
|
1264
1278
|
* formatting.
|
|
1265
|
-
|
|
1279
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1280
|
+
* printed.
|
|
1281
|
+
*/},{key:"error",value:function error(object){for(var _len4=arguments.length,additionalArguments=new Array(_len4>1?_len4-1:0),_key4=1;_key4<_len4;_key4++){additionalArguments[_key4-1]=arguments[_key4]}return this.log.apply(this,[object,true,false,"error"].concat(additionalArguments))}/**
|
|
1266
1282
|
* Wrapper method for the native console method usually provided by
|
|
1267
1283
|
* interpreter.
|
|
1268
1284
|
* @param object - Any object to print.
|
|
1269
1285
|
* @param additionalArguments - Additional arguments are used for string
|
|
1270
1286
|
* formatting.
|
|
1271
|
-
|
|
1287
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1288
|
+
* printed.
|
|
1289
|
+
*/},{key:"critical",value:function critical(object){for(var _len5=arguments.length,additionalArguments=new Array(_len5>1?_len5-1:0),_key5=1;_key5<_len5;_key5++){additionalArguments[_key5-1]=arguments[_key5]}return this.log.apply(this,[object,true,false,"warn"].concat(additionalArguments))}/**
|
|
1272
1290
|
* Wrapper method for the native console method usually provided by
|
|
1273
1291
|
* interpreter.
|
|
1274
1292
|
* @param object - Any object to print.
|
|
1275
1293
|
* @param additionalArguments - Additional arguments are used for string
|
|
1276
1294
|
* formatting.
|
|
1277
|
-
|
|
1295
|
+
* @returns Returns a promise which resolves when the log message has been
|
|
1296
|
+
* printed.
|
|
1297
|
+
*/},{key:"warn",value:function warn(object){for(var _len6=arguments.length,additionalArguments=new Array(_len6>1?_len6-1:0),_key6=1;_key6<_len6;_key6++){additionalArguments[_key6-1]=arguments[_key6]}return this.log.apply(this,[object,false,false,"warn"].concat(additionalArguments))}/**
|
|
1278
1298
|
* Dumps a given object in a human-readable format.
|
|
1279
1299
|
* @param object - Any object to show.
|
|
1280
1300
|
* @param level - Number of levels to dig into given object recursively.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clientnode",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1519",
|
|
4
4
|
"description": "Handy utilities for any JavaScript environments.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"client",
|
|
@@ -48,14 +48,14 @@
|
|
|
48
48
|
],
|
|
49
49
|
"sideEffects": false,
|
|
50
50
|
"scripts": {
|
|
51
|
-
"build": "yarn build:types
|
|
51
|
+
"build": "yarn build:types && yarn build:plain && yarn build:compatible && yarn build:compatible:bundle",
|
|
52
52
|
"build:bundle": "weboptimizer build '{__reference__: \"target:bundle\"}'",
|
|
53
53
|
"build:compatible": "weboptimizer build '{__reference__: \"target:compatible\"}'",
|
|
54
54
|
"build:compatible:bundle": "weboptimizer build '{__reference__: [\"target:compatible\", \"target:bundle\"]}'",
|
|
55
55
|
"build:plain": "weboptimizer build",
|
|
56
56
|
"build:standalone": "npx babel --config-file ./standalone.babel.config.json --source-maps inline --extensions .ts,.tsx --ignore 'src/test/**' --out-dir dist src; yarn make:executable",
|
|
57
57
|
"build:types": "weboptimizer build:types",
|
|
58
|
-
"check": "yarn check:types
|
|
58
|
+
"check": "yarn check:types && yarn lint",
|
|
59
59
|
"check:types": "weboptimizer check:types",
|
|
60
60
|
"clear": "weboptimizer clear",
|
|
61
61
|
"document": "weboptimizer document",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@babel/cli": "^8.0.5",
|
|
76
|
-
"@babel/eslint-parser": "^
|
|
76
|
+
"@babel/eslint-parser": "^7.29.7",
|
|
77
77
|
"@babel/plugin-transform-class-properties": "^8.0.1",
|
|
78
78
|
"@babel/preset-env": "^8.0.5",
|
|
79
79
|
"@babel/preset-typescript": "^8.0.1",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@types/ejs": "^3.1.5",
|
|
84
84
|
"@types/html-minifier": "^4.0.6",
|
|
85
85
|
"@types/imagemin": "^9.0.1",
|
|
86
|
-
"@types/node": "^26.
|
|
86
|
+
"@types/node": "^26.6.1",
|
|
87
87
|
"@types/prop-types": "^15.7.15",
|
|
88
88
|
"@types/webpack-env": "^1.18.8",
|
|
89
89
|
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"clientnode": "workspace:.",
|
|
94
94
|
"eslint": "^10.10.0",
|
|
95
95
|
"eslint-config-google": "^0.14.0",
|
|
96
|
-
"eslint-plugin-jsdoc": "^64.
|
|
96
|
+
"eslint-plugin-jsdoc": "^64.5.2",
|
|
97
97
|
"favicons-webpack-plugin": "^6.0.1",
|
|
98
98
|
"image-minimizer-webpack-plugin": "^5.0.0",
|
|
99
99
|
"jest": "^30.5.1",
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"prop-types": "^15.8.1",
|
|
103
103
|
"rimraf": "^6.1.3",
|
|
104
104
|
"typescript-eslint": "^8.70.0",
|
|
105
|
-
"web-documentation": "^1.0.
|
|
106
|
-
"weboptimizer": "^4.0.
|
|
105
|
+
"web-documentation": "^1.0.60",
|
|
106
|
+
"weboptimizer": "^4.0.85",
|
|
107
107
|
"webpack-dev-server": "^6.0.0"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"globals@npm:^11.1.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
|
|
128
128
|
"globals@npm:^14.0.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
|
|
129
129
|
"globals@npm:^9.18.0": "patch:globals@npm%3A11.12.0#~/.yarn/patches/globals-npm-11.12.0-1fa7f41a6c.patch",
|
|
130
|
-
"weboptimizer/clientnode": "4.0.
|
|
130
|
+
"weboptimizer/clientnode": "4.0.1516",
|
|
131
131
|
"webpack": "5.109.2"
|
|
132
132
|
},
|
|
133
133
|
"engines": {
|
package/readme.md
CHANGED
|
@@ -10,7 +10,8 @@ This library written by Torben Sickert stands under a creative commons naming
|
|
|
10
10
|
3.0 unported license. See https://creativecommons.org/licenses/by/3.0/deed.de
|
|
11
11
|
endregion -->
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
<!--|deDE:Projektstatus-->
|
|
14
|
+
Project Status
|
|
14
15
|
--------------
|
|
15
16
|
|
|
16
17
|
[](https://www.npmjs.com/package/clientnode)
|
|
@@ -30,20 +31,20 @@ Project status
|
|
|
30
31
|
|
|
31
32
|
[](https://githubbox.com/thaibault/clientnode)
|
|
32
33
|
|
|
33
|
-
<!--|deDE:
|
|
34
|
+
<!--|deDE:Verwendung-->
|
|
34
35
|
Use case
|
|
35
36
|
--------
|
|
36
37
|
|
|
37
38
|
You need utilities for:<!--deDE:Sie benötigen Hilfsfunktionen für:-->
|
|
38
39
|
|
|
39
|
-
- Primitive types
|
|
40
|
+
- Primitive types<!--deDE:Primitive Typen-->
|
|
40
41
|
- Arrays
|
|
41
42
|
- Functions
|
|
42
43
|
- Numbers
|
|
43
44
|
- Objects
|
|
44
45
|
- Strings
|
|
45
46
|
- Date and time
|
|
46
|
-
- Mutual exclusion
|
|
47
|
+
- Mutual exclusion<!--deDE:Wechselseitiger Ausschluss-->
|
|
47
48
|
- Lock management
|
|
48
49
|
- Semaphore management
|
|
49
50
|
- Backend
|
|
@@ -54,7 +55,7 @@ You need utilities for:<!--deDE:Sie benötigen Hilfsfunktionen für:-->
|
|
|
54
55
|
- Cookies
|
|
55
56
|
- DOM
|
|
56
57
|
- Data-Transfer
|
|
57
|
-
- JSON-based Expressions
|
|
58
|
+
- JSON-based Expressions<!--deDE:JSON-basierte Ausdrücke-->
|
|
58
59
|
- Logging
|
|
59
60
|
- Scopes
|
|
60
61
|
- Testing
|
|
@@ -82,6 +83,10 @@ zip file here and inject or request via cdn in HTML:
|
|
|
82
83
|
npm install clientnode
|
|
83
84
|
```
|
|
84
85
|
|
|
86
|
+
<!--|deDE:Beispiel-->
|
|
87
|
+
Example
|
|
88
|
+
-------
|
|
89
|
+
|
|
85
90
|
```TypeScript
|
|
86
91
|
import {createDomNodes, evaluateExpression} from 'cientnode'
|
|
87
92
|
|
|
@@ -122,10 +127,6 @@ want.
|
|
|
122
127
|
Dadurch können verschiedene Module-Bundler genutzt werden.
|
|
123
128
|
-->
|
|
124
129
|
|
|
125
|
-
<!--|deDE:Nutzung-->
|
|
126
|
-
Usage
|
|
127
|
-
-----
|
|
128
|
-
|
|
129
130
|
Execute a JSON based expression:
|
|
130
131
|
<!--deDE:Ausführung eines JSON basierten Ausdrucks:-->
|
|
131
132
|
|