clientnode 4.0.1520 → 4.0.1521
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 +6 -6
- package/dist/Logger.js +6 -6
- package/dist/bundle/index.js +6 -6
- package/dist/compatible/Logger.js +6 -6
- package/dist/compatible/index.js +6 -6
- package/dist/compatible/scope.js +6 -6
- package/dist/index.js +6 -6
- package/dist/scope.js +6 -6
- package/package.json +2 -2
package/dist/Logger.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare class Logger {
|
|
|
50
50
|
* @returns Returns a promise which resolves when the log message has been
|
|
51
51
|
* printed.
|
|
52
52
|
*/
|
|
53
|
-
log(object
|
|
53
|
+
log(object?: unknown, force?: boolean, avoidAnnotation?: boolean, level?: Level, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
54
54
|
/**
|
|
55
55
|
* Wrapper method for the native console method usually provided by
|
|
56
56
|
* interpreter.
|
|
@@ -60,7 +60,7 @@ export declare class Logger {
|
|
|
60
60
|
* @returns Returns a promise which resolves when the log message has been
|
|
61
61
|
* printed.
|
|
62
62
|
*/
|
|
63
|
-
info(object
|
|
63
|
+
info(object?: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
64
64
|
/**
|
|
65
65
|
* Wrapper method for the native console method usually provided by
|
|
66
66
|
* interpreter.
|
|
@@ -70,7 +70,7 @@ export declare class Logger {
|
|
|
70
70
|
* @returns Returns a promise which resolves when the log message has been
|
|
71
71
|
* printed.
|
|
72
72
|
*/
|
|
73
|
-
debug(object
|
|
73
|
+
debug(object?: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
74
74
|
/**
|
|
75
75
|
* Wrapper method for the native console method usually provided by
|
|
76
76
|
* interpreter.
|
|
@@ -80,7 +80,7 @@ export declare class Logger {
|
|
|
80
80
|
* @returns Returns a promise which resolves when the log message has been
|
|
81
81
|
* printed.
|
|
82
82
|
*/
|
|
83
|
-
error(object
|
|
83
|
+
error(object?: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
84
84
|
/**
|
|
85
85
|
* Wrapper method for the native console method usually provided by
|
|
86
86
|
* interpreter.
|
|
@@ -90,7 +90,7 @@ export declare class Logger {
|
|
|
90
90
|
* @returns Returns a promise which resolves when the log message has been
|
|
91
91
|
* printed.
|
|
92
92
|
*/
|
|
93
|
-
critical(object
|
|
93
|
+
critical(object?: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
94
94
|
/**
|
|
95
95
|
* Wrapper method for the native console method usually provided by
|
|
96
96
|
* interpreter.
|
|
@@ -100,7 +100,7 @@ export declare class Logger {
|
|
|
100
100
|
* @returns Returns a promise which resolves when the log message has been
|
|
101
101
|
* printed.
|
|
102
102
|
*/
|
|
103
|
-
warn(object
|
|
103
|
+
warn(object?: unknown, ...additionalArguments: Array<unknown>): Promise<void>;
|
|
104
104
|
/**
|
|
105
105
|
* Dumps a given object in a human-readable format.
|
|
106
106
|
* @param object - Any object to show.
|
package/dist/Logger.js
CHANGED
|
@@ -551,7 +551,7 @@ module.exports = x({ });
|
|
|
551
551
|
* @param additionalArguments - Additional values to print.
|
|
552
552
|
* @returns Returns a promise which resolves when the log message has been
|
|
553
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.
|
|
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(object===void 0){object=""}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
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
556
|
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
557
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)/*
|
|
@@ -568,7 +568,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
568
568
|
* formatting.
|
|
569
569
|
* @returns Returns a promise which resolves when the log message has been
|
|
570
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))}/**
|
|
571
|
+
*/)},{key:"info",value:function info(object){if(object===void 0){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))}/**
|
|
572
572
|
* Wrapper method for the native console method usually provided by
|
|
573
573
|
* interpreter.
|
|
574
574
|
* @param object - Any object to print.
|
|
@@ -576,7 +576,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
576
576
|
* formatting.
|
|
577
577
|
* @returns Returns a promise which resolves when the log message has been
|
|
578
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))}/**
|
|
579
|
+
*/},{key:"debug",value:function debug(object){if(object===void 0){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))}/**
|
|
580
580
|
* Wrapper method for the native console method usually provided by
|
|
581
581
|
* interpreter.
|
|
582
582
|
* @param object - Any object to print.
|
|
@@ -584,7 +584,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
584
584
|
* formatting.
|
|
585
585
|
* @returns Returns a promise which resolves when the log message has been
|
|
586
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))}/**
|
|
587
|
+
*/},{key:"error",value:function error(object){if(object===void 0){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))}/**
|
|
588
588
|
* Wrapper method for the native console method usually provided by
|
|
589
589
|
* interpreter.
|
|
590
590
|
* @param object - Any object to print.
|
|
@@ -592,7 +592,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
592
592
|
* formatting.
|
|
593
593
|
* @returns Returns a promise which resolves when the log message has been
|
|
594
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))}/**
|
|
595
|
+
*/},{key:"critical",value:function critical(object){if(object===void 0){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))}/**
|
|
596
596
|
* Wrapper method for the native console method usually provided by
|
|
597
597
|
* interpreter.
|
|
598
598
|
* @param object - Any object to print.
|
|
@@ -600,7 +600,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
600
600
|
* formatting.
|
|
601
601
|
* @returns Returns a promise which resolves when the log message has been
|
|
602
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))}/**
|
|
603
|
+
*/},{key:"warn",value:function warn(object){if(object===void 0){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))}/**
|
|
604
604
|
* Dumps a given object in a human-readable format.
|
|
605
605
|
* @param object - Any object to show.
|
|
606
606
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/bundle/index.js
CHANGED
|
@@ -3986,7 +3986,7 @@ __webpack_require__.d(module_namespaceObject, {
|
|
|
3986
3986
|
* @param additionalArguments - Additional values to print.
|
|
3987
3987
|
* @returns Returns a promise which resolves when the log message has been
|
|
3988
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.
|
|
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(object===void 0){object=""}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
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
3991
|
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
3992
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)/*
|
|
@@ -4003,7 +4003,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+constants/* CLI_COLOR
|
|
|
4003
4003
|
* formatting.
|
|
4004
4004
|
* @returns Returns a promise which resolves when the log message has been
|
|
4005
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))}/**
|
|
4006
|
+
*/)},{key:"info",value:function info(object){if(object===void 0){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))}/**
|
|
4007
4007
|
* Wrapper method for the native console method usually provided by
|
|
4008
4008
|
* interpreter.
|
|
4009
4009
|
* @param object - Any object to print.
|
|
@@ -4011,7 +4011,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+constants/* CLI_COLOR
|
|
|
4011
4011
|
* formatting.
|
|
4012
4012
|
* @returns Returns a promise which resolves when the log message has been
|
|
4013
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))}/**
|
|
4014
|
+
*/},{key:"debug",value:function debug(object){if(object===void 0){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))}/**
|
|
4015
4015
|
* Wrapper method for the native console method usually provided by
|
|
4016
4016
|
* interpreter.
|
|
4017
4017
|
* @param object - Any object to print.
|
|
@@ -4019,7 +4019,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+constants/* CLI_COLOR
|
|
|
4019
4019
|
* formatting.
|
|
4020
4020
|
* @returns Returns a promise which resolves when the log message has been
|
|
4021
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))}/**
|
|
4022
|
+
*/},{key:"error",value:function error(object){if(object===void 0){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))}/**
|
|
4023
4023
|
* Wrapper method for the native console method usually provided by
|
|
4024
4024
|
* interpreter.
|
|
4025
4025
|
* @param object - Any object to print.
|
|
@@ -4027,7 +4027,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+constants/* CLI_COLOR
|
|
|
4027
4027
|
* formatting.
|
|
4028
4028
|
* @returns Returns a promise which resolves when the log message has been
|
|
4029
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))}/**
|
|
4030
|
+
*/},{key:"critical",value:function critical(object){if(object===void 0){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))}/**
|
|
4031
4031
|
* Wrapper method for the native console method usually provided by
|
|
4032
4032
|
* interpreter.
|
|
4033
4033
|
* @param object - Any object to print.
|
|
@@ -4035,7 +4035,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+constants/* CLI_COLOR
|
|
|
4035
4035
|
* formatting.
|
|
4036
4036
|
* @returns Returns a promise which resolves when the log message has been
|
|
4037
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))}/**
|
|
4038
|
+
*/},{key:"warn",value:function warn(object){if(object===void 0){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))}/**
|
|
4039
4039
|
* Dumps a given object in a human-readable format.
|
|
4040
4040
|
* @param object - Any object to show.
|
|
4041
4041
|
* @param level - Number of levels to dig into given object recursively.
|
|
@@ -551,7 +551,7 @@ module.exports = x({ });
|
|
|
551
551
|
* @param additionalArguments - Additional values to print.
|
|
552
552
|
* @returns Returns a promise which resolves when the log message has been
|
|
553
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.
|
|
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(object===void 0){object=""}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
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
556
|
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
557
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)/*
|
|
@@ -568,7 +568,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
568
568
|
* formatting.
|
|
569
569
|
* @returns Returns a promise which resolves when the log message has been
|
|
570
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))}/**
|
|
571
|
+
*/)},{key:"info",value:function info(object){if(object===void 0){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))}/**
|
|
572
572
|
* Wrapper method for the native console method usually provided by
|
|
573
573
|
* interpreter.
|
|
574
574
|
* @param object - Any object to print.
|
|
@@ -576,7 +576,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
576
576
|
* formatting.
|
|
577
577
|
* @returns Returns a promise which resolves when the log message has been
|
|
578
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))}/**
|
|
579
|
+
*/},{key:"debug",value:function debug(object){if(object===void 0){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))}/**
|
|
580
580
|
* Wrapper method for the native console method usually provided by
|
|
581
581
|
* interpreter.
|
|
582
582
|
* @param object - Any object to print.
|
|
@@ -584,7 +584,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
584
584
|
* formatting.
|
|
585
585
|
* @returns Returns a promise which resolves when the log message has been
|
|
586
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))}/**
|
|
587
|
+
*/},{key:"error",value:function error(object){if(object===void 0){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))}/**
|
|
588
588
|
* Wrapper method for the native console method usually provided by
|
|
589
589
|
* interpreter.
|
|
590
590
|
* @param object - Any object to print.
|
|
@@ -592,7 +592,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
592
592
|
* formatting.
|
|
593
593
|
* @returns Returns a promise which resolves when the log message has been
|
|
594
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))}/**
|
|
595
|
+
*/},{key:"critical",value:function critical(object){if(object===void 0){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))}/**
|
|
596
596
|
* Wrapper method for the native console method usually provided by
|
|
597
597
|
* interpreter.
|
|
598
598
|
* @param object - Any object to print.
|
|
@@ -600,7 +600,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
600
600
|
* formatting.
|
|
601
601
|
* @returns Returns a promise which resolves when the log message has been
|
|
602
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))}/**
|
|
603
|
+
*/},{key:"warn",value:function warn(object){if(object===void 0){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))}/**
|
|
604
604
|
* Dumps a given object in a human-readable format.
|
|
605
605
|
* @param object - Any object to show.
|
|
606
606
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/compatible/index.js
CHANGED
|
@@ -1378,7 +1378,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1378
1378
|
* @param additionalArguments - Additional values to print.
|
|
1379
1379
|
* @returns Returns a promise which resolves when the log message has been
|
|
1380
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.
|
|
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(object===void 0){object=""}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
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
1383
|
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
1384
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)/*
|
|
@@ -1395,7 +1395,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1395
1395
|
* formatting.
|
|
1396
1396
|
* @returns Returns a promise which resolves when the log message has been
|
|
1397
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))}/**
|
|
1398
|
+
*/)},{key:"info",value:function info(object){if(object===void 0){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))}/**
|
|
1399
1399
|
* Wrapper method for the native console method usually provided by
|
|
1400
1400
|
* interpreter.
|
|
1401
1401
|
* @param object - Any object to print.
|
|
@@ -1403,7 +1403,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1403
1403
|
* formatting.
|
|
1404
1404
|
* @returns Returns a promise which resolves when the log message has been
|
|
1405
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))}/**
|
|
1406
|
+
*/},{key:"debug",value:function debug(object){if(object===void 0){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))}/**
|
|
1407
1407
|
* Wrapper method for the native console method usually provided by
|
|
1408
1408
|
* interpreter.
|
|
1409
1409
|
* @param object - Any object to print.
|
|
@@ -1411,7 +1411,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1411
1411
|
* formatting.
|
|
1412
1412
|
* @returns Returns a promise which resolves when the log message has been
|
|
1413
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))}/**
|
|
1414
|
+
*/},{key:"error",value:function error(object){if(object===void 0){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))}/**
|
|
1415
1415
|
* Wrapper method for the native console method usually provided by
|
|
1416
1416
|
* interpreter.
|
|
1417
1417
|
* @param object - Any object to print.
|
|
@@ -1419,7 +1419,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1419
1419
|
* formatting.
|
|
1420
1420
|
* @returns Returns a promise which resolves when the log message has been
|
|
1421
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))}/**
|
|
1422
|
+
*/},{key:"critical",value:function critical(object){if(object===void 0){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))}/**
|
|
1423
1423
|
* Wrapper method for the native console method usually provided by
|
|
1424
1424
|
* interpreter.
|
|
1425
1425
|
* @param object - Any object to print.
|
|
@@ -1427,7 +1427,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1427
1427
|
* formatting.
|
|
1428
1428
|
* @returns Returns a promise which resolves when the log message has been
|
|
1429
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))}/**
|
|
1430
|
+
*/},{key:"warn",value:function warn(object){if(object===void 0){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))}/**
|
|
1431
1431
|
* Dumps a given object in a human-readable format.
|
|
1432
1432
|
* @param object - Any object to show.
|
|
1433
1433
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/compatible/scope.js
CHANGED
|
@@ -1245,7 +1245,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1245
1245
|
* @param additionalArguments - Additional values to print.
|
|
1246
1246
|
* @returns Returns a promise which resolves when the log message has been
|
|
1247
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.
|
|
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(object===void 0){object=""}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
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
1250
|
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
1251
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)/*
|
|
@@ -1262,7 +1262,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1262
1262
|
* formatting.
|
|
1263
1263
|
* @returns Returns a promise which resolves when the log message has been
|
|
1264
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))}/**
|
|
1265
|
+
*/)},{key:"info",value:function info(object){if(object===void 0){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))}/**
|
|
1266
1266
|
* Wrapper method for the native console method usually provided by
|
|
1267
1267
|
* interpreter.
|
|
1268
1268
|
* @param object - Any object to print.
|
|
@@ -1270,7 +1270,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1270
1270
|
* formatting.
|
|
1271
1271
|
* @returns Returns a promise which resolves when the log message has been
|
|
1272
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))}/**
|
|
1273
|
+
*/},{key:"debug",value:function debug(object){if(object===void 0){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))}/**
|
|
1274
1274
|
* Wrapper method for the native console method usually provided by
|
|
1275
1275
|
* interpreter.
|
|
1276
1276
|
* @param object - Any object to print.
|
|
@@ -1278,7 +1278,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1278
1278
|
* formatting.
|
|
1279
1279
|
* @returns Returns a promise which resolves when the log message has been
|
|
1280
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))}/**
|
|
1281
|
+
*/},{key:"error",value:function error(object){if(object===void 0){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))}/**
|
|
1282
1282
|
* Wrapper method for the native console method usually provided by
|
|
1283
1283
|
* interpreter.
|
|
1284
1284
|
* @param object - Any object to print.
|
|
@@ -1286,7 +1286,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1286
1286
|
* formatting.
|
|
1287
1287
|
* @returns Returns a promise which resolves when the log message has been
|
|
1288
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))}/**
|
|
1289
|
+
*/},{key:"critical",value:function critical(object){if(object===void 0){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))}/**
|
|
1290
1290
|
* Wrapper method for the native console method usually provided by
|
|
1291
1291
|
* interpreter.
|
|
1292
1292
|
* @param object - Any object to print.
|
|
@@ -1294,7 +1294,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1294
1294
|
* formatting.
|
|
1295
1295
|
* @returns Returns a promise which resolves when the log message has been
|
|
1296
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))}/**
|
|
1297
|
+
*/},{key:"warn",value:function warn(object){if(object===void 0){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))}/**
|
|
1298
1298
|
* Dumps a given object in a human-readable format.
|
|
1299
1299
|
* @param object - Any object to show.
|
|
1300
1300
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/index.js
CHANGED
|
@@ -1378,7 +1378,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1378
1378
|
* @param additionalArguments - Additional values to print.
|
|
1379
1379
|
* @returns Returns a promise which resolves when the log message has been
|
|
1380
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.
|
|
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(object===void 0){object=""}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
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
1383
|
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
1384
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)/*
|
|
@@ -1395,7 +1395,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1395
1395
|
* formatting.
|
|
1396
1396
|
* @returns Returns a promise which resolves when the log message has been
|
|
1397
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))}/**
|
|
1398
|
+
*/)},{key:"info",value:function info(object){if(object===void 0){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))}/**
|
|
1399
1399
|
* Wrapper method for the native console method usually provided by
|
|
1400
1400
|
* interpreter.
|
|
1401
1401
|
* @param object - Any object to print.
|
|
@@ -1403,7 +1403,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1403
1403
|
* formatting.
|
|
1404
1404
|
* @returns Returns a promise which resolves when the log message has been
|
|
1405
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))}/**
|
|
1406
|
+
*/},{key:"debug",value:function debug(object){if(object===void 0){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))}/**
|
|
1407
1407
|
* Wrapper method for the native console method usually provided by
|
|
1408
1408
|
* interpreter.
|
|
1409
1409
|
* @param object - Any object to print.
|
|
@@ -1411,7 +1411,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1411
1411
|
* formatting.
|
|
1412
1412
|
* @returns Returns a promise which resolves when the log message has been
|
|
1413
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))}/**
|
|
1414
|
+
*/},{key:"error",value:function error(object){if(object===void 0){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))}/**
|
|
1415
1415
|
* Wrapper method for the native console method usually provided by
|
|
1416
1416
|
* interpreter.
|
|
1417
1417
|
* @param object - Any object to print.
|
|
@@ -1419,7 +1419,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1419
1419
|
* formatting.
|
|
1420
1420
|
* @returns Returns a promise which resolves when the log message has been
|
|
1421
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))}/**
|
|
1422
|
+
*/},{key:"critical",value:function critical(object){if(object===void 0){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))}/**
|
|
1423
1423
|
* Wrapper method for the native console method usually provided by
|
|
1424
1424
|
* interpreter.
|
|
1425
1425
|
* @param object - Any object to print.
|
|
@@ -1427,7 +1427,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1427
1427
|
* formatting.
|
|
1428
1428
|
* @returns Returns a promise which resolves when the log message has been
|
|
1429
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))}/**
|
|
1430
|
+
*/},{key:"warn",value:function warn(object){if(object===void 0){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))}/**
|
|
1431
1431
|
* Dumps a given object in a human-readable format.
|
|
1432
1432
|
* @param object - Any object to show.
|
|
1433
1433
|
* @param level - Number of levels to dig into given object recursively.
|
package/dist/scope.js
CHANGED
|
@@ -1245,7 +1245,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1245
1245
|
* @param additionalArguments - Additional values to print.
|
|
1246
1246
|
* @returns Returns a promise which resolves when the log message has been
|
|
1247
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.
|
|
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(object===void 0){object=""}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
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
1250
|
eslint-disable @typescript-eslint/no-unnecessary-condition
|
|
1251
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)/*
|
|
@@ -1262,7 +1262,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1262
1262
|
* formatting.
|
|
1263
1263
|
* @returns Returns a promise which resolves when the log message has been
|
|
1264
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))}/**
|
|
1265
|
+
*/)},{key:"info",value:function info(object){if(object===void 0){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))}/**
|
|
1266
1266
|
* Wrapper method for the native console method usually provided by
|
|
1267
1267
|
* interpreter.
|
|
1268
1268
|
* @param object - Any object to print.
|
|
@@ -1270,7 +1270,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1270
1270
|
* formatting.
|
|
1271
1271
|
* @returns Returns a promise which resolves when the log message has been
|
|
1272
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))}/**
|
|
1273
|
+
*/},{key:"debug",value:function debug(object){if(object===void 0){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))}/**
|
|
1274
1274
|
* Wrapper method for the native console method usually provided by
|
|
1275
1275
|
* interpreter.
|
|
1276
1276
|
* @param object - Any object to print.
|
|
@@ -1278,7 +1278,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1278
1278
|
* formatting.
|
|
1279
1279
|
* @returns Returns a promise which resolves when the log message has been
|
|
1280
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))}/**
|
|
1281
|
+
*/},{key:"error",value:function error(object){if(object===void 0){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))}/**
|
|
1282
1282
|
* Wrapper method for the native console method usually provided by
|
|
1283
1283
|
* interpreter.
|
|
1284
1284
|
* @param object - Any object to print.
|
|
@@ -1286,7 +1286,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1286
1286
|
* formatting.
|
|
1287
1287
|
* @returns Returns a promise which resolves when the log message has been
|
|
1288
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))}/**
|
|
1289
|
+
*/},{key:"critical",value:function critical(object){if(object===void 0){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))}/**
|
|
1290
1290
|
* Wrapper method for the native console method usually provided by
|
|
1291
1291
|
* interpreter.
|
|
1292
1292
|
* @param object - Any object to print.
|
|
@@ -1294,7 +1294,7 @@ remainingLength=lineLength+LEVELS_COLOR[levelIndex].length+_cli_js__WEBPACK_IMPO
|
|
|
1294
1294
|
* formatting.
|
|
1295
1295
|
* @returns Returns a promise which resolves when the log message has been
|
|
1296
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))}/**
|
|
1297
|
+
*/},{key:"warn",value:function warn(object){if(object===void 0){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))}/**
|
|
1298
1298
|
* Dumps a given object in a human-readable format.
|
|
1299
1299
|
* @param object - Any object to show.
|
|
1300
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.1521",
|
|
4
4
|
"description": "Handy utilities for any JavaScript environments.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"client",
|
|
@@ -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.1519",
|
|
131
131
|
"webpack": "5.109.2"
|
|
132
132
|
},
|
|
133
133
|
"engines": {
|