🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@byelabel/utils

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@byelabel/utils - npm Package Compare versions

Comparing version
2.1.5
to
2.1.6
+1
-1
build/utils/log.d.ts.map

@@ -1,1 +0,1 @@

{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/utils/log.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,CAAC;AAE3F,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,UAAoB,GAAG;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB,CAsBA;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,OAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAU/E;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,OAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAUlF;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,GAAE,OAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA2EvG;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAYrD"}
{"version":3,"file":"log.d.ts","sourceRoot":"","sources":["../../src/utils/log.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,OAAO,CAAC;AAQ3F,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,UAAoB,GAAG;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAA;CACjB,CAsBA;AAED,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,OAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAU/E;AAED,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,OAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAUlF;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,IAAI,GAAE,OAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA2EvG;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAYrD"}

@@ -27,2 +27,7 @@ "use strict";

const validator_1 = require("./validator");
function timestamp() {
const now = new Date();
const pad = (n, width = 2) => String(n).padStart(width, '0');
return `${now.getFullYear()}-${pad(now.getMonth() + 1)}-${pad(now.getDate())} ${pad(now.getHours())}:${pad(now.getMinutes())}:${pad(now.getSeconds())}.${pad(now.getMilliseconds(), 3)}`;
}
function writeToFile(data, type = 'error') {

@@ -48,3 +53,3 @@ const path = (0, node_path_1.join)(node_process_1.default.env.ROOT_PATH, (node_process_1.default.env.LOGS_PATH || 'logs'));

if ((node_process_1.default.env.DEBUG === 'true') || show) {
console.log(message);
console.log(`${timestamp()} - ${message}`);
}

@@ -58,3 +63,3 @@ resolve(message);

if ((node_process_1.default.env.DEBUG === 'true') || show) {
console.log(message);
console.log(`${timestamp()} - ${message}`);
}

@@ -73,3 +78,3 @@ resolve(message);

if ((node_process_1.default.env.DEBUG === 'true') || show) {
console.log(errorString);
console.log(`${timestamp()} - ${errorString}`);
}

@@ -125,3 +130,3 @@ return resolve(`App Error: ${errorString}`);

if ((node_process_1.default.env.DEBUG === 'true') || show) {
console.log(errorString);
console.log(`${timestamp()} - ${errorString}`);
}

@@ -128,0 +133,0 @@ resolve(errorString);

{
"name": "@byelabel/utils",
"version": "2.1.5",
"version": "2.1.6",
"description": "ByeLabel Utilities",

@@ -5,0 +5,0 @@ "type": "commonjs",