Socket
Socket
Sign inDemoInstall

roarr

Package Overview
Dependencies
Maintainers
1
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

roarr - npm Package Compare versions

Comparing version 2.15.1 to 2.15.2

37

dist/factories/createLogger.js

@@ -63,2 +63,29 @@ "use strict";

const getFirstParentDomainContext = () => {
if (!domain) {
return {};
}
let currentDomain = process.domain; // $FlowFixMe
if (currentDomain && currentDomain.roarr && currentDomain.roarr.context) {
return currentDomain.roarr.context;
} // $FlowFixMe
if (!currentDomain || !currentDomain.parentDomain) {
return {};
}
while (currentDomain && currentDomain.parentDomain) {
currentDomain = currentDomain.parentDomain;
if (currentDomain.roarr && currentDomain.roarr.context) {
return currentDomain.roarr.context;
}
}
return {};
};
const createLogger = (onMessage, parentContext) => {

@@ -73,3 +100,3 @@ // eslint-disable-next-line id-length, unicorn/prevent-abbreviations

if (typeof a === 'string') {
context = _objectSpread({}, domain && process.domain && process.domain.roarr && process.domain.roarr.context, {}, parentContext || {});
context = _objectSpread({}, getFirstParentDomainContext(), {}, parentContext || {});
message = (0, _sprintfJs.sprintf)(a, b, c, d, e, f, g, h, i, k);

@@ -81,3 +108,3 @@ } else {

context = JSON.parse((0, _jsonStringifySafe.default)(_objectSpread({}, domain && process.domain && process.domain.roarr && process.domain.roarr.context, {}, parentContext || {}, {}, a)));
context = JSON.parse((0, _jsonStringifySafe.default)(_objectSpread({}, getFirstParentDomainContext(), {}, parentContext || {}, {}, a)));
message = (0, _sprintfJs.sprintf)(b, c, d, e, f, g, h, i, k);

@@ -106,7 +133,7 @@ }

return createLogger(onMessage, _objectSpread({}, domain && process.domain && process.domain.roarr && process.domain.roarr.context, {}, parentContext, {}, context));
return createLogger(onMessage, _objectSpread({}, getFirstParentDomainContext(), {}, parentContext, {}, context));
};
log.getContext = () => {
return _objectSpread({}, domain && process.domain && process.domain.roarr && process.domain.roarr.context, {}, parentContext || {});
return _objectSpread({}, getFirstParentDomainContext(), {}, parentContext || {});
};

@@ -123,3 +150,3 @@

adoptedDomain.roarr = {
context: _objectSpread({}, getParentDomainContext() || {}, {}, context)
context: _objectSpread({}, getParentDomainContext(), {}, context)
};

@@ -126,0 +153,0 @@ return routine();

2

package.json

@@ -91,3 +91,3 @@ {

},
"version": "2.15.1"
"version": "2.15.2"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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