simple-logging-system
Advanced tools
Comparing version 1.0.0 to 1.0.1
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Logger = exports.ApplicationLogger = void 0; | ||
exports.LoggerLevel = exports.Logger = exports.ApplicationLogger = void 0; | ||
var ApplicationLogger_1 = require("./lib/ApplicationLogger"); | ||
@@ -8,2 +8,4 @@ Object.defineProperty(exports, "ApplicationLogger", { enumerable: true, get: function () { return ApplicationLogger_1.ApplicationLogger; } }); | ||
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return Logger_1.Logger; } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNkRBQTRFO0FBQW5ELHNIQUFBLGlCQUFpQixPQUFBO0FBQzFDLHVDQUFzQztBQUE3QixnR0FBQSxNQUFNLE9BQUEifQ== | ||
var LoggerLevel_1 = require("./lib/LoggerLevel"); | ||
Object.defineProperty(exports, "LoggerLevel", { enumerable: true, get: function () { return LoggerLevel_1.LoggerLevel; } }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsNkRBQTRFO0FBQW5ELHNIQUFBLGlCQUFpQixPQUFBO0FBQzFDLHVDQUFzQztBQUE3QixnR0FBQSxNQUFNLE9BQUE7QUFDZixpREFBZ0Q7QUFBdkMsMEdBQUEsV0FBVyxPQUFBIn0= |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ApplicationLogger = void 0; | ||
const LoggerLevel_1 = require("./LoggerLevel"); | ||
function loggerConsole(level, loggerName, message, args) { | ||
const fullMessage = `${loggerName}: ${message}`; | ||
let consoleFunction = console.error; | ||
if (level === 0 /* DEBUG */) { | ||
if (level === LoggerLevel_1.LoggerLevel.DEBUG) { | ||
consoleFunction = console.debug; | ||
} | ||
else if (level === 1 /* INFO */) { | ||
else if (level === LoggerLevel_1.LoggerLevel.INFO) { | ||
consoleFunction = console.info; | ||
} | ||
else if (level === 2 /* WARN */) { | ||
else if (level === LoggerLevel_1.LoggerLevel.WARN) { | ||
consoleFunction = console.warn; | ||
@@ -33,2 +34,2 @@ } | ||
ApplicationLogger.loggerFunction = loggerConsole; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwbGljYXRpb25Mb2dnZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL0FwcGxpY2F0aW9uTG9nZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQU1BLFNBQVMsYUFBYSxDQUNwQixLQUFrQixFQUFFLFVBQWtCLEVBQUUsT0FBZSxFQUFFLElBQVc7SUFFcEUsTUFBTSxXQUFXLEdBQUcsR0FBRyxVQUFVLEtBQUssT0FBTyxFQUFFLENBQUM7SUFDaEQsSUFBSSxlQUFlLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQztJQUNwQyxJQUFJLEtBQUssa0JBQXNCLEVBQUU7UUFDL0IsZUFBZSxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUM7S0FDakM7U0FBTSxJQUFJLEtBQUssaUJBQXFCLEVBQUU7UUFDckMsZUFBZSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUM7S0FDaEM7U0FBTSxJQUFJLEtBQUssaUJBQXFCLEVBQUU7UUFDckMsZUFBZSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUM7S0FDaEM7SUFDRCxJQUFJLElBQUksQ0FBQyxNQUFNLEtBQUss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0FBQyxLQUFLLEVBQUU7UUFDL0IsZUFBZSxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUM7S0FDakM7U0FBTSxJQUFJLEtBQUssS0FBSyx5QkFBVyxDQUFDLElBQUksRUFBRTtRQUNyQyxlQUFlLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztLQUNoQztTQUFNLElBQUksS0FBSyxLQUFLLHlCQUFXLENBQUMsSUFBSSxFQUFFO1FBQ3JDLGVBQWUsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDO0tBQ2hDO0lBQ0QsSUFBSSxJQUFJLENBQUMsTUFBTSxLQUFLLENBQUMsRUFBRTtRQUNyQixlQUFlLENBQUMsSUFBSSxDQUFDLE9BQU8sRUFBRSxXQUFXLENBQUMsQ0FBQztLQUM1QztTQUFNO1FBQ0wsZUFBZSxDQUFDLElBQUksQ0FBQyxPQUFPLEVBQUUsV0FBVyxFQUFFLElBQUksQ0FBQyxDQUFDO0tBQ2xEO0FBQ0gsQ0FBQztBQUVELE1BQWEsaUJBQWlCO0lBRzVCLE1BQU0sQ0FBQyxpQkFBaUIsQ0FBQyxjQUE4QjtRQUNyRCxpQkFBaUIsQ0FBQyxjQUFjLEdBQUcsY0FBYyxDQUFDO0lBQ3BELENBQUM7SUFFRCxNQUFNLENBQUMsR0FBRyxDQUFDLEtBQWtCLEVBQUUsVUFBa0IsRUFBRSxPQUFlLEVBQUUsSUFBVztRQUM3RSxpQkFBaUIsQ0FBQyxjQUFjLENBQUMsS0FBSyxFQUFFLFVBQVUsRUFBRSxPQUFPLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDckUsQ0FBQzs7QUFUSCw4Q0FVQztBQVRnQixnQ0FBYyxHQUFtQixhQUFhLENBQUMifQ== |
@@ -5,2 +5,3 @@ "use strict"; | ||
const ApplicationLogger_1 = require("./ApplicationLogger"); | ||
const LoggerLevel_1 = require("./LoggerLevel"); | ||
class Logger { | ||
@@ -14,15 +15,15 @@ constructor(name) { | ||
error(message, ...args) { | ||
this.log(3 /* ERROR */, message, args); | ||
this.log(LoggerLevel_1.LoggerLevel.ERROR, message, args); | ||
} | ||
warn(message, ...args) { | ||
this.log(2 /* WARN */, message, args); | ||
this.log(LoggerLevel_1.LoggerLevel.WARN, message, args); | ||
} | ||
info(message, ...args) { | ||
this.log(1 /* INFO */, message, args); | ||
this.log(LoggerLevel_1.LoggerLevel.INFO, message, args); | ||
} | ||
debug(message, ...args) { | ||
this.log(0 /* DEBUG */, message, args); | ||
this.log(LoggerLevel_1.LoggerLevel.DEBUG, message, args); | ||
} | ||
} | ||
exports.Logger = Logger; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9Mb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkRBQXdEO0FBR3hELE1BQWEsTUFBTTtJQUNqQixZQUE2QixJQUFZO1FBQVosU0FBSSxHQUFKLElBQUksQ0FBUTtJQUN6QyxDQUFDO0lBRUQsR0FBRyxDQUFDLEtBQWtCLEVBQUUsT0FBZSxFQUFFLElBQVc7UUFDbEQscUNBQWlCLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxJQUFJLENBQUMsSUFBSSxFQUFFLE9BQU8sRUFBRSxJQUFJLENBQUMsQ0FBQztJQUN6RCxDQUFDO0lBRUQsS0FBSyxDQUFDLE9BQWUsRUFBRSxHQUFHLElBQVc7UUFDbkMsSUFBSSxDQUFDLEdBQUcsZ0JBQW9CLE9BQU8sRUFBRSxJQUFJLENBQUMsQ0FBQztJQUM3QyxDQUFDO0lBRUQsSUFBSSxDQUFDLE9BQWUsRUFBRSxHQUFHLElBQVc7UUFDbEMsSUFBSSxDQUFDLEdBQUcsZUFBbUIsT0FBTyxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQzVDLENBQUM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JLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBRUQsSUFBSSxDQUFDLE9BQWUsRUFBRSxHQUFHLElBQVc7UUFDbEMsSUFBSSxDQUFDLEdBQUcsQ0FBQyx5QkFBVyxDQUFDLElBQUksRUFBRSxPQUFPLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDNUMsQ0FBQztJQUVELEtBQUssQ0FBQyxPQUFlLEVBQUUsR0FBRyxJQUFXO1FBQ25DLElBQUksQ0FBQyxHQUFHLENBQUMseUJBQVcsQ0FBQyxLQUFLLEVBQUUsT0FBTyxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQzdDLENBQUM7Q0FDRjtBQXZCRCx3QkF1QkMifQ== |
@@ -1,6 +0,7 @@ | ||
export declare const enum LoggerLevel { | ||
DEBUG = 0, | ||
INFO = 1, | ||
WARN = 2, | ||
ERROR = 3 | ||
} | ||
export declare const LoggerLevel: { | ||
readonly DEBUG: "debug"; | ||
readonly INFO: "info"; | ||
readonly WARN: "warn"; | ||
readonly ERROR: "error"; | ||
}; | ||
export declare type LoggerLevel = typeof LoggerLevel[keyof typeof LoggerLevel]; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyTGV2ZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL0xvZ2dlckxldmVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ== | ||
exports.LoggerLevel = void 0; | ||
exports.LoggerLevel = { | ||
DEBUG: 'debug', | ||
INFO: 'info', | ||
WARN: 'warn', | ||
ERROR: 'error', | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyTGV2ZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL0xvZ2dlckxldmVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFhLFFBQUEsV0FBVyxHQUFHO0lBQ3pCLEtBQUssRUFBRSxPQUFPO0lBQ2QsSUFBSSxFQUFFLE1BQU07SUFDWixJQUFJLEVBQUUsTUFBTTtJQUNaLEtBQUssRUFBRSxPQUFPO0NBQ04sQ0FBQyJ9 |
export { ApplicationLogger } from './lib/ApplicationLogger'; | ||
export { Logger } from './lib/Logger'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFrQixpQkFBaUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzVFLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxjQUFjLENBQUMifQ== | ||
export { LoggerLevel } from './lib/LoggerLevel'; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFrQixpQkFBaUIsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQzVFLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDdEMsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLG1CQUFtQixDQUFDIn0= |
@@ -0,11 +1,12 @@ | ||
import { LoggerLevel } from './LoggerLevel'; | ||
function loggerConsole(level, loggerName, message, args) { | ||
const fullMessage = `${loggerName}: ${message}`; | ||
let consoleFunction = console.error; | ||
if (level === 0 /* DEBUG */) { | ||
if (level === LoggerLevel.DEBUG) { | ||
consoleFunction = console.debug; | ||
} | ||
else if (level === 1 /* INFO */) { | ||
else if (level === LoggerLevel.INFO) { | ||
consoleFunction = console.info; | ||
} | ||
else if (level === 2 /* WARN */) { | ||
else if (level === LoggerLevel.WARN) { | ||
consoleFunction = console.warn; | ||
@@ -29,2 +30,2 @@ } | ||
ApplicationLogger.loggerFunction = loggerConsole; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQXBwbGljYXRpb25Mb2dnZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL0FwcGxpY2F0aW9uTG9nZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU1BLFNBQVMsYUFBYSxDQUNwQixLQUFrQixFQUFFLFVBQWtCLEVBQUUsT0FBZSxFQUFFLElBQVc7SUFFcEUsTUFBTSxXQUFXLEdBQUcsR0FBRyxVQUFVLEtBQUssT0FBTyxFQUFFLENBQUM7SUFDaEQsSUFBSSxlQUFlLEdBQUcsT0FBTyxDQUFDLEtBQUssQ0FBQztJQUNwQyxJQUFJLEtBQUssa0JBQXNCLEVBQUU7UUFDL0IsZUFBZSxHQUFHLE9BQU8sQ0FBQyxLQUFLLENBQUM7S0FDakM7U0FBTSxJQUFJLEtBQUssaUJBQXFCLEVBQUU7UUFDckMsZUFBZSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUM7S0FDaEM7U0FBTSxJQUFJLEtBQUssaUJBQXFCLEVBQUU7UUFDckMsZUFBZSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUM7S0FDaEM7SUFDRCxJQUFJLElBQUksQ0FBQyxNQUFNLEtBQUssQ0FBQyxFQUFFO1FBQ3JCLGVBQWUsQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLFdBQVcsQ0FBQyxDQUFDO0tBQzVDO1NBQU07UUFDTCxlQUFlLENBQUMsSUFBSSxDQUFDLE9BQU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sSUFBSSxFQUFFO1FBQ3JDLGVBQWUsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDO0tBQ2hDO1NBQU0sSUFBSSxLQUFLLEtBQUssV0FBVyxDQUFDLElBQUksRUFBRTtRQUNyQyxlQUFlLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztLQUNoQztJQUNELElBQUksSUFBSSxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7UUFDckIsZUFBZSxDQUFDLElBQUksQ0FBQyxPQUFPLEVBQUUsV0FBVyxDQUFDLENBQUM7S0FDNUM7U0FBTTtRQUNMLGVBQWUsQ0FBQyxJQUFJLENBQUMsT0FBTyxFQUFFLFdBQVcsRUFBRSxJQUFJLENBQUMsQ0FBQztLQUNsRDtBQUNILENBQUM7QUFFRCxNQUFNLE9BQU8saUJBQWlCO0lBRzVCLE1BQU0sQ0FBQyxpQkFBaUIsQ0FBQyxjQUE4QjtRQUNyRCxpQkFBaUIsQ0FBQyxjQUFjLEdBQUcsY0FBYyxDQUFDO0lBQ3BELENBQUM7SUFFRCxNQUFNLENBQUMsR0FBRyxDQUFDLEtBQWtCLEVBQUUsVUFBa0IsRUFBRSxPQUFlLEVBQUUsSUFBVztRQUM3RSxpQkFBaUIsQ0FBQyxjQUFjLENBQUMsS0FBSyxFQUFFLFVBQVUsRUFBRSxPQUFPLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDckUsQ0FBQzs7QUFSYyxnQ0FBYyxHQUFtQixhQUFhLENBQUMifQ== |
import { ApplicationLogger } from './ApplicationLogger'; | ||
import { LoggerLevel } from './LoggerLevel'; | ||
export class Logger { | ||
@@ -10,14 +11,14 @@ constructor(name) { | ||
error(message, ...args) { | ||
this.log(3 /* ERROR */, message, args); | ||
this.log(LoggerLevel.ERROR, message, args); | ||
} | ||
warn(message, ...args) { | ||
this.log(2 /* WARN */, message, args); | ||
this.log(LoggerLevel.WARN, message, args); | ||
} | ||
info(message, ...args) { | ||
this.log(1 /* INFO */, message, args); | ||
this.log(LoggerLevel.INFO, message, args); | ||
} | ||
debug(message, ...args) { | ||
this.log(0 /* DEBUG */, message, args); | ||
this.log(LoggerLevel.DEBUG, message, args); | ||
} | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9Mb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFHeEQsTUFBTSxPQUFPLE1BQU07SUFDakIsWUFBNkIsSUFBWTtRQUFaLFNBQUksR0FBSixJQUFJLENBQVE7SUFDekMsQ0FBQztJQUVELEdBQUcsQ0FBQyxLQUFrQixFQUFFLE9BQWUsRUFBRSxJQUFXO1FBQ2xELGlCQUFpQixDQUFDLEdBQUcsQ0FBQyxLQUFLLEVBQUUsSUFBSSxDQUFDLElBQUksRUFBRSxPQUFPLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDekQsQ0FBQztJQUVELEtBQUssQ0FBQyxPQUFlLEVBQUUsR0FBRyxJQUFXO1FBQ25DLElBQUksQ0FBQyxHQUFHLGdCQUFvQixPQUFPLEVBQUUsSUFBSSxDQUFDLENBQUM7SUFDN0MsQ0FBQztJQUVELElBQUksQ0FBQyxPQUFlLEVBQUUsR0FBRyxJQUFXO1FBQ2xDLElBQUksQ0FBQyxHQUFHLGVBQW1CLE9BQU8sRUFBRSxJQUFJLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBRUQsSUFBSSxDQUFDLE9BQWUsRUFBRSxHQUFHLElBQVc7UUFDbEMsSUFBSSxDQUFDLEdBQUcsZUFBbUIsT0FBTyxFQUFFLElBQUksQ0FBQyxDQUFDO0lBQzVDLENBQUM7SUFFRCxLQUFLLENBQUMsT0FBZSxFQUFFLEdBQUcsSUFBVzt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Q0FBQyxXQUFXLENBQUMsSUFBSSxFQUFFLE9BQU8sRUFBRSxJQUFJLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBRUQsS0FBSyxDQUFDLE9BQWUsRUFBRSxHQUFHLElBQVc7UUFDbkMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxXQUFXLENBQUMsS0FBSyxFQUFFLE9BQU8sRUFBRSxJQUFJLENBQUMsQ0FBQztJQUM3QyxDQUFDO0NBQ0YifQ== |
@@ -1,6 +0,7 @@ | ||
export declare const enum LoggerLevel { | ||
DEBUG = 0, | ||
INFO = 1, | ||
WARN = 2, | ||
ERROR = 3 | ||
} | ||
export declare const LoggerLevel: { | ||
readonly DEBUG: "debug"; | ||
readonly INFO: "info"; | ||
readonly WARN: "warn"; | ||
readonly ERROR: "error"; | ||
}; | ||
export declare type LoggerLevel = typeof LoggerLevel[keyof typeof LoggerLevel]; |
@@ -1,2 +0,7 @@ | ||
export {}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyTGV2ZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL0xvZ2dlckxldmVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ== | ||
export const LoggerLevel = { | ||
DEBUG: 'debug', | ||
INFO: 'info', | ||
WARN: 'warn', | ||
ERROR: 'error', | ||
}; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyTGV2ZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL0xvZ2dlckxldmVsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBRztJQUN6QixLQUFLLEVBQUUsT0FBTztJQUNkLElBQUksRUFBRSxNQUFNO0lBQ1osSUFBSSxFQUFFLE1BQU07SUFDWixLQUFLLEVBQUUsT0FBTztDQUNOLENBQUMifQ== |
{ | ||
"name": "simple-logging-system", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "A simple JS Logging system written in TypeScript", | ||
@@ -26,3 +26,5 @@ "author": "Aurélien Manteaux <amanteaux@coreoz.com> (https://coreoz.com)", | ||
"hooks": { | ||
"before:init": ["npm run prepare-release"] | ||
"before:init": [ | ||
"npm run prepare-release" | ||
] | ||
} | ||
@@ -45,3 +47,3 @@ }, | ||
"eslint-plugin-react": "^7.21.5", | ||
"release-it": "^14.2.2", | ||
"release-it": "^14.10.0", | ||
"ts-node": "^9.0.0", | ||
@@ -48,0 +50,0 @@ "typedoc": "^0.19.0", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37482
195