@pioneer-platform/loggerdog
Advanced tools
Comparing version 8.1.18 to 8.1.19
@@ -1,2 +0,1 @@ | ||
declare const clc: any; | ||
declare const LOG_LEVELS: any; | ||
@@ -3,0 +2,0 @@ declare const DEFAULT_LOG_LEVEL: string; |
@@ -41,23 +41,24 @@ "use strict"; | ||
*/ | ||
var __spreadArrays = (this && this.__spreadArrays) || function () { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
var clc = require('cli-color'); | ||
var LOG_LEVELS = { | ||
TEST: { val: 0, label: 'TEST', color: clc.cyanBright }, | ||
EMERG: { val: 0, label: 'EMERG', color: clc.magentaBright }, | ||
ALERT: { val: 1, label: 'ALERT', color: clc.magentaBright }, | ||
CRIT: { val: 2, label: 'CRIT', color: clc.redBright }, | ||
ERROR: { val: 3, label: 'ERROR', color: clc.redBright }, | ||
WARN: { val: 4, label: 'WARN', color: clc.xterm(208) }, | ||
NOTICE: { val: 5, label: 'NOTICE', color: clc.yellowBright }, | ||
VERBOSE: { val: 6, label: 'VERBOSE', color: clc.cyanBright }, | ||
INFO: { val: 6, label: 'INFO', color: clc.cyanBright }, | ||
DEBUG: { val: 7, label: 'DEBUG', color: clc.greenBright }, | ||
DEBUGV: { val: 8, label: 'DEBUG', color: clc.greenBright }, | ||
DEBUGVV: { val: 9, label: 'DEBUG', color: clc.greenBright } | ||
TEST: { val: 0, label: 'TEST', color: 'color: cyan' }, | ||
EMERG: { val: 0, label: 'EMERG', color: 'color: magenta' }, | ||
ALERT: { val: 1, label: 'ALERT', color: 'color: magenta' }, | ||
CRIT: { val: 2, label: 'CRIT', color: 'color: red' }, | ||
ERROR: { val: 3, label: 'ERROR', color: 'color: red' }, | ||
WARN: { val: 4, label: 'WARN', color: 'color: orange' }, | ||
NOTICE: { val: 5, label: 'NOTICE', color: 'color: yellow' }, | ||
VERBOSE: { val: 6, label: 'VERBOSE', color: 'color: cyan' }, | ||
INFO: { val: 6, label: 'INFO', color: 'color: cyan' }, | ||
DEBUG: { val: 7, label: 'DEBUG', color: 'color: green' }, | ||
DEBUGV: { val: 8, label: 'DEBUG', color: 'color: green' }, | ||
DEBUGVV: { val: 9, label: 'DEBUG', color: 'color: green' } | ||
}; | ||
@@ -77,3 +78,2 @@ var DEFAULT_LOG_LEVEL = process.env['DEFAULT_LOG_LEVEL'] || 'INFO'; | ||
catch (ex) { | ||
console.error("WARNING: unable to extract logging context", { ex: ex.toString() }); | ||
return { filename: 'unknown' }; | ||
@@ -86,3 +86,3 @@ } | ||
var _a = _extractContext(stack, 3), filename = _a.filename, line = _a.line, pos = _a.pos; | ||
return "[" + filename + ":" + line + ":" + pos + "]"; | ||
return "[".concat(filename, ":").concat(line, ":").concat(pos, "]"); | ||
} | ||
@@ -149,6 +149,6 @@ var Logger = /** @class */ (function () { | ||
} | ||
console.log(dt, color(label), ctx, message); | ||
console.log('%c ' + dt, color, label, ctx, message); | ||
} | ||
else { | ||
console.log.apply(console, __spreadArrays([dt, color(label), ctx], args)); | ||
console.log.apply(console, __spreadArray(['%c ' + dt, color, label, ctx], args, false)); | ||
} | ||
@@ -155,0 +155,0 @@ } |
{ | ||
"name": "@pioneer-platform/loggerdog", | ||
"version": "8.1.18", | ||
"version": "8.1.19", | ||
"main": "./lib/index.js", | ||
@@ -12,7 +12,7 @@ "types": "./lib/main.d.ts", | ||
"dependencies": { | ||
"cli-color": "^1.4.0", | ||
"dotenv": "^8.2.0", | ||
"typescript": "^3.9.5" | ||
"os": "^0.1.1", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^5.0.2" | ||
}, | ||
"gitHead": "d0e74ea447175d6d7e9697793093f9155f0dab38" | ||
} |
@@ -41,17 +41,15 @@ /* | ||
const clc = require('cli-color') | ||
const LOG_LEVELS:any = { | ||
TEST: { val: 0, label: 'TEST', color: clc.cyanBright }, | ||
EMERG: { val: 0, label: 'EMERG', color: clc.magentaBright }, | ||
ALERT: { val: 1, label: 'ALERT', color: clc.magentaBright }, | ||
CRIT: { val: 2, label: 'CRIT', color: clc.redBright }, | ||
ERROR: { val: 3, label: 'ERROR', color: clc.redBright }, | ||
WARN: { val: 4, label: 'WARN', color: clc.xterm(208) }, // orange | ||
NOTICE: { val: 5, label: 'NOTICE', color: clc.yellowBright }, | ||
VERBOSE: { val: 6, label: 'VERBOSE', color: clc.cyanBright }, | ||
INFO: { val: 6, label: 'INFO', color: clc.cyanBright }, | ||
DEBUG: { val: 7, label: 'DEBUG', color: clc.greenBright }, | ||
DEBUGV: { val: 8, label: 'DEBUG', color: clc.greenBright }, | ||
DEBUGVV: { val: 9, label: 'DEBUG', color: clc.greenBright } | ||
TEST: { val: 0, label: 'TEST', color: 'color: cyan' }, | ||
EMERG: { val: 0, label: 'EMERG', color: 'color: magenta' }, | ||
ALERT: { val: 1, label: 'ALERT', color: 'color: magenta' }, | ||
CRIT: { val: 2, label: 'CRIT', color: 'color: red' }, | ||
ERROR: { val: 3, label: 'ERROR', color: 'color: red' }, | ||
WARN: { val: 4, label: 'WARN', color: 'color: orange' }, | ||
NOTICE: { val: 5, label: 'NOTICE', color: 'color: yellow' }, | ||
VERBOSE: { val: 6, label: 'VERBOSE', color: 'color: cyan' }, | ||
INFO: { val: 6, label: 'INFO', color: 'color: cyan' }, | ||
DEBUG: { val: 7, label: 'DEBUG', color: 'color: green' }, | ||
DEBUGV: { val: 8, label: 'DEBUG', color: 'color: green' }, | ||
DEBUGVV: { val: 9, label: 'DEBUG', color: 'color: green' } | ||
} | ||
@@ -74,3 +72,2 @@ | ||
} catch (ex) { | ||
console.error(`WARNING: unable to extract logging context`, {ex:ex.toString()}) | ||
return { filename: 'unknown' } | ||
@@ -154,5 +151,5 @@ } | ||
console.log(dt, color(label), ctx, message) | ||
console.log('%c ' + dt, color, label, ctx, message) | ||
}else{ | ||
console.log(dt, color(label), ctx, ...args) | ||
console.log('%c ' + dt, color, label, ctx, ...args) | ||
} | ||
@@ -159,0 +156,0 @@ } |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
5
11615
6
312
+ Addedos@^0.1.1
+ Addedts-node@^10.9.1
+ Added@cspotcode/source-map-support@0.8.1(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.9(transitive)
+ Added@tsconfig/node10@1.0.11(transitive)
+ Added@tsconfig/node12@1.0.11(transitive)
+ Added@tsconfig/node14@1.0.3(transitive)
+ Added@tsconfig/node16@1.0.4(transitive)
+ Added@types/node@22.13.10(transitive)
+ Addedacorn@8.14.1(transitive)
+ Addedacorn-walk@8.3.4(transitive)
+ Addedarg@4.1.3(transitive)
+ Addedcreate-require@1.1.1(transitive)
+ Addeddiff@4.0.2(transitive)
+ Addedmake-error@1.3.6(transitive)
+ Addedos@0.1.2(transitive)
+ Addedts-node@10.9.2(transitive)
+ Addedtypescript@5.8.2(transitive)
+ Addedundici-types@6.20.0(transitive)
+ Addedv8-compile-cache-lib@3.0.1(transitive)
+ Addedyn@3.1.1(transitive)
- Removedcli-color@^1.4.0
- Removeddotenv@^8.2.0
- Removedansi-regex@2.1.1(transitive)
- Removedcli-color@1.4.0(transitive)
- Removedd@1.0.2(transitive)
- Removeddotenv@8.6.0(transitive)
- Removedes5-ext@0.10.64(transitive)
- Removedes6-iterator@2.0.3(transitive)
- Removedes6-symbol@3.1.4(transitive)
- Removedes6-weak-map@2.0.3(transitive)
- Removedesniff@2.0.1(transitive)
- Removedevent-emitter@0.3.5(transitive)
- Removedext@1.7.0(transitive)
- Removedis-promise@2.2.2(transitive)
- Removedlru-queue@0.1.0(transitive)
- Removedmemoizee@0.4.17(transitive)
- Removednext-tick@1.1.0(transitive)
- Removedtimers-ext@0.1.8(transitive)
- Removedtype@2.7.3(transitive)
- Removedtypescript@3.9.10(transitive)
Updatedtypescript@^5.0.2