Socket
Socket
Sign inDemoInstall

@applitools/logger

Package Overview
Dependencies
Maintainers
30
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@applitools/logger - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

dist/browser.js

1

dist/handler-rolling-file.js

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

try {
// @ts-ignore - fs.rmSync is not available in node <= 14.14
fs.rmSync(logFiles.shift(), { maxRetries: 3, retryDelay: 300 });

@@ -47,0 +48,0 @@ }

21

dist/logger.js

@@ -85,3 +85,7 @@ "use strict";

const consoleHandler = console ? (utils.types.isObject(console) ? console : (0, handler_console_1.makeConsoleHandler)()) : handler;
return Object.assign(Object.assign({ isLogger: true, console: (0, printer_1.makePrinter)({ handler: consoleHandler, format, prelude: false }) }, (0, printer_1.makePrinter)({ handler, format, label, tags, timestamp, level, colors: colors })), { tag(name, value) {
return {
isLogger: true,
console: (0, printer_1.makePrinter)({ handler: consoleHandler, format, prelude: false }),
...(0, printer_1.makePrinter)({ handler, format, label, tags, timestamp, level, colors: colors }),
tag(name, value) {
tags !== null && tags !== void 0 ? tags : (tags = {});

@@ -96,9 +100,15 @@ tags[name] = value;

else if (colors) {
options.colors = Object.assign(Object.assign({}, colors), options === null || options === void 0 ? void 0 : options.colors);
options.colors = { ...colors, ...options === null || options === void 0 ? void 0 : options.colors };
}
return makeLogger(Object.assign(Object.assign({ format,
return makeLogger({
format,
label,
tags,
timestamp,
level, console: consoleHandler }, options), { handler, extended: true }));
level,
console: consoleHandler,
...options,
handler,
extended: true,
});
},

@@ -114,4 +124,5 @@ open() {

(_b = (_a = handler).close) === null || _b === void 0 ? void 0 : _b.call(_a);
} });
},
};
}
exports.makeLogger = makeLogger;
"use strict";
var __rest = (this && this.__rest) || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function")
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
t[p[i]] = s[p[i]];
}
return t;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.makePrinter = void 0;
const log_level_1 = require("./log-level");
function makePrinter(_a) {
var { handler, format, level } = _a, defaults = __rest(_a, ["handler", "format", "level"]);
function makePrinter({ handler, format, level, ...defaults }) {
return { log, warn, error, fatal, verbose: log };

@@ -22,3 +10,3 @@ function log(...messages) {

return;
const options = Object.assign(Object.assign({}, defaults), { level: 'info' });
const options = { ...defaults, level: 'info' };
handler.log(format(messages, options));

@@ -29,3 +17,3 @@ }

return;
const options = Object.assign(Object.assign({}, defaults), { level: 'warn' });
const options = { ...defaults, level: 'warn' };
if (handler.warn)

@@ -39,3 +27,3 @@ handler.warn(format(messages, options));

return;
const options = Object.assign(Object.assign({}, defaults), { level: 'error' });
const options = { ...defaults, level: 'error' };
if (handler.error)

@@ -49,3 +37,3 @@ handler.error(format(messages, options));

return;
const options = Object.assign(Object.assign({}, defaults), { level: 'fatal' });
const options = { ...defaults, level: 'fatal' };
if (handler.fatal)

@@ -52,0 +40,0 @@ handler.fatal(format(messages, options));

{
"name": "@applitools/logger",
"version": "1.1.5",
"version": "1.1.6",
"description": "Applitools logger",

@@ -25,11 +25,7 @@ "keywords": [

},
"browser": {
"tunnel": false
},
"main": "./dist/index.js",
"types": "./types/index.d.ts",
"exports": {
".": {
"default": "./dist/index.js",
"types": "./types/index.d.ts"
"types": "./types/index.d.ts",
"browser": "./dist/browser.js",
"default": "./dist/index.js"
},

@@ -39,2 +35,5 @@ "./dist/*": "./dist/*.js",

},
"main": "./dist/index.js",
"browser": "./dist/browser.js",
"types": "./types/index.d.ts",
"files": [

@@ -59,12 +58,12 @@ "dist",

"dependencies": {
"@applitools/utils": "1.3.0",
"@applitools/utils": "1.3.1",
"chalk": "4.1.2"
},
"devDependencies": {
"@applitools/bongo": "^2.1.0",
"@applitools/bongo": "^2.1.1",
"@types/mocha": "^9.1.1",
"@types/node": "^17.0.31",
"@types/node": "12",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"eslint": "^8.14.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",

@@ -75,10 +74,10 @@ "eslint-plugin-mocha-no-only": "^1.1.1",

"husky": "^4.3.8",
"mocha": "9",
"mocha": "10.0.0",
"prettier": "^2.6.2",
"ts-node": "^10.7.0",
"typescript": "^4.6"
"ts-node": "^10.8.0",
"typescript": "^4.7.2"
},
"engines": {
"node": ">= 8.9.0"
"node": ">=12.13.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc