You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP

@best/utils

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@best/utils - npm Package Compare versions

Comparing version

to
14.0.0

@@ -12,2 +12,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.default = cacheDirectory;
const os_1 = __importDefault(require("os"));

@@ -25,3 +26,2 @@ const path_1 = __importDefault(require("path"));

}
exports.default = cacheDirectory;
//# sourceMappingURL=cache-directory.js.map

@@ -9,2 +9,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.default = clearLine;
function clearLine(stream) {

@@ -15,3 +16,2 @@ if (process.stdout.isTTY) {

}
exports.default = clearLine;
//# sourceMappingURL=clear-line.js.map

@@ -12,2 +12,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.default = logError;
const chalk_1 = __importDefault(require("chalk"));

@@ -18,3 +19,2 @@ const ERR_TEXT = chalk_1.default.reset.inverse.red.bold(' ERROR ') + ' ';

}
exports.default = logError;
//# sourceMappingURL=log-error.js.map

@@ -16,2 +16,19 @@ "use strict";

class Logger {
static customFormat = winston_1.format.printf((logData) => {
const msg = `${logData.timestamp} | ${logData.level.toUpperCase()} | ${logData.label.toUpperCase()} | ${logData.stack || logData.message}`;
if (!Logger.showColors) {
return msg;
}
switch (logData.level) {
case 'warn':
return picocolors_1.default.yellow(msg);
case 'error':
return picocolors_1.default.red(msg);
default:
return msg;
}
});
static customTimestampFormat = winston_1.format.timestamp({
format: 'YYYY-MM-DD HH:mm:ss.SSS',
});
static getLogger(configs) {

@@ -29,22 +46,5 @@ /*

}
static showColors = false;
}
exports.Logger = Logger;
Logger.customFormat = winston_1.format.printf((logData) => {
const msg = `${logData.timestamp} | ${logData.level.toUpperCase()} | ${logData.label.toUpperCase()} | ${logData.stack || logData.message}`;
if (!Logger.showColors) {
return msg;
}
switch (logData.level) {
case 'warn':
return picocolors_1.default.yellow(msg);
case 'error':
return picocolors_1.default.red(msg);
default:
return msg;
}
});
Logger.customTimestampFormat = winston_1.format.timestamp({
format: 'YYYY-MM-DD HH:mm:ss.SSS',
});
Logger.showColors = false;
//# sourceMappingURL=logger.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.matchSpecs = void 0;
exports.matchSpecs = matchSpecs;
function matchSpecs(specs, runnerSpecs) {
return runnerSpecs.some(({ name, version }) => specs.name === name && ['latest', version.toString()].includes(specs.version.toString()));
}
exports.matchSpecs = matchSpecs;
//# sourceMappingURL=match-specs.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeSpecs = exports.normalizeClientConfig = void 0;
exports.normalizeClientConfig = normalizeClientConfig;
exports.normalizeSpecs = normalizeSpecs;
function normalizeClientConfig(config) {

@@ -11,3 +12,3 @@ const jobs = config.jobs ? parseInt(config.jobs, 10) : 0;

}
catch (_a) {
catch {
specs = { name: 'invalid_specs', version: 0 };

@@ -18,3 +19,2 @@ }

}
exports.normalizeClientConfig = normalizeClientConfig;
function normalizeSpecs(config) {

@@ -24,7 +24,6 @@ try {

}
catch (_a) {
catch {
return [];
}
}
exports.normalizeSpecs = normalizeSpecs;
//# sourceMappingURL=normalize-client-config.js.map

@@ -9,3 +9,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.req = void 0;
exports.req = req;
/**

@@ -18,3 +18,2 @@ * Handles default exports for both ES5 and ES6 syntax

}
exports.req = req;
//# sourceMappingURL=req.js.map

@@ -5,4 +5,5 @@ "use strict";

class RunnerInterruption {
requestedInterruption = false;
id;
constructor(id) {
this.requestedInterruption = false;
this.id = id;

@@ -9,0 +10,0 @@ }

@@ -12,3 +12,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getSystemInfo = void 0;
exports.getSystemInfo = getSystemInfo;
const systeminformation_1 = __importDefault(require("systeminformation"));

@@ -37,3 +37,2 @@ async function getSystemInfo() {

}
exports.getSystemInfo = getSystemInfo;
//# sourceMappingURL=system-info.js.map
{
"dependencies": {
"chalk": "~2.4.2",
"https-proxy-agent": "5.0.1",
"is-ci": "^3.0.1",
"picocolors": "^1.0.0",
"systeminformation": "5.22.7",
"winston": "3.8.2"
"https-proxy-agent": "^5.0.1",
"is-ci": "^4.1.0",
"picocolors": "^1.1.1",
"systeminformation": "^5.23.6",
"winston": "^3.17.0"
},

@@ -23,3 +23,3 @@ "description": "Best Utils",

},
"version": "13.0.0"
"version": "14.0.0"
}