Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@bitdiver/logadapter-dispatcher

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bitdiver/logadapter-dispatcher - npm Package Compare versions

Comparing version 0.0.1 to 1.0.0

1

jest.config.json
{
"testEnvironment": "node",
"collectCoverage": true,

@@ -3,0 +4,0 @@ "coverageDirectory": "coverage",

@@ -1,11 +0,30 @@

'use strict';
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LogAdapterDispatcher = exports.getLogAdapter = undefined;
exports.getLogAdapter = getLogAdapter;
Object.defineProperty(exports, "LogAdapterDispatcher", {
enumerable: true,
get: function () {
return _LogAdapterDispatcher.default;
}
});
var _LogAdapterDispatcher = require('./LogAdapterDispatcher');
var _LogAdapterDispatcher = _interopRequireDefault(require("./LogAdapterDispatcher"));
exports.getLogAdapter = _LogAdapterDispatcher.getLogAdapter;
exports.LogAdapterDispatcher = _LogAdapterDispatcher.LogAdapterDispatcher;
// Stores the logger instance
let logAdapter;
/**
* returns the logAdapter
*/
function getLogAdapter(opts) {
if (logAdapter === undefined) {
logAdapter = new _LogAdapterDispatcher.default(opts);
}
return logAdapter;
}

31

lib/LogAdapterDispatcher.js

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

'use strict';
"use strict";

@@ -6,12 +6,4 @@ Object.defineProperty(exports, "__esModule", {

});
exports.LogAdapterDispatcher = undefined;
exports.default = void 0;
var _promise = require('babel-runtime/core-js/promise');
var _promise2 = _interopRequireDefault(_promise);
exports.getLogAdapter = getLogAdapter;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
class LogAdapterDispatcher {

@@ -21,5 +13,7 @@ constructor(opts = {}) {

}
async log(logMessage) {
if (this.logAdapterList !== undefined && this.logAdapterList.length > 0) {
const promisses = [];
for (const logger of this.logAdapterList) {

@@ -32,3 +26,3 @@ promisses.push(logger.log(logMessage).catch(err => {

return _promise2.default.all(promisses);
return Promise.all(promisses);
}

@@ -44,16 +38,5 @@ }

}
}
exports.LogAdapterDispatcher = LogAdapterDispatcher; // Stores the logger instance
let logAdapter;
/**
* returns the logAdapter
*/
function getLogAdapter(opts) {
if (logAdapter === undefined) {
logAdapter = new LogAdapterDispatcher(opts);
}
return logAdapter;
}
exports.default = LogAdapterDispatcher;
{
"name": "@bitdiver/logadapter-dispatcher",
"version": "0.0.1",
"description": "",
"main": "lib/index.js",
"repository": {
"type": "git",
"url": "git+https://github.com/bitdiver/logadapter-dispatcher.git"
},
"bugs": {
"url": "https://github.com/bitdiver/logadapter-dispatcher/issues"
},
"homepage": "https://github.com/bitdiver/logadapter-dispatcher#readme",
"scripts": {
"build": "npm run src_format && npm run src_lint && babel src -d lib",
"src_lint": "eslint src tests",
"src_format": "prettier --no-semi --single-quote --trailing-comma es5 --write \"{src,tests}/**/*.js\"",
"test_only": "jest",
"test": "npm run build && jest -c jest.config.json",
"debug": "npm run build && node --inspect-brk ./node_modules/.bin/jest -i --config=./jest.config.json",
"prepare": "npm run build"
},
"contributors": [
{
"name": "Torsten Link",
"email": "torstenlink@gmx.de"
},
{
"name": "Markus Felten",
"email": "markus.felten@gmx.de"
}
],
"license": "ISC",
"devDependencies": {
"assert": "1.4.1",
"babel-cli": "6.26.0",
"babel-core": "6.26.3",
"babel-eslint": "8.2.3",
"babel-jest": "22.4.4",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-plugin-transform-runtime": "6.23.0",
"babel-polyfill": "6.26.0",
"babel-preset-env": "1.7.0",
"babel-preset-flow": "6.23.0",
"babel-register": "6.26.0",
"cz-conventional-changelog": "2.1.0",
"eslint": "4.19.1",
"eslint-config-prettier": "2.9.0",
"eslint-plugin-babel": "5.1.0",
"jest": "22.4.4",
"jest-cli": "22.4.4",
"jest-environment-node-debug": "2.0.0",
"prettier": "1.12.1",
"regenerator-runtime": "0.11.1",
"semantic-release": "15.4.1",
"uuid": "3.2.1"
}
"name": "@bitdiver/logadapter-dispatcher",
"version": "1.0.0",
"description": "",
"main": "lib/index.js",
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bitdiver/logadapter-dispatcher.git"
},
"bugs": {
"url": "https://github.com/bitdiver/logadapter-dispatcher/issues"
},
"homepage": "https://github.com/bitdiver/logadapter-dispatcher#readme",
"scripts": {
"build": "npm run src_format && npm run src_lint && babel src -d lib",
"src_lint": "eslint src tests",
"src_format": "prettier --no-semi --single-quote --trailing-comma es5 --write \"{src,tests}/**/*.js\"",
"test_only": "jest",
"test": "npm run build && jest -c jest.config.json",
"debug": "npm run build && node --inspect-brk ./node_modules/.bin/jest -i --config=./jest.config.json",
"prepare": "npm run build"
},
"contributors": [
{
"name": "Torsten Link",
"email": "torstenlink@gmx.de"
},
{
"name": "Markus Felten",
"email": "markus.felten@gmx.de"
}
],
"license": "ISC",
"devDependencies": {
"@babel/cli": "7.2.0",
"@babel/core": "7.2.0",
"@babel/node": "7.2.0",
"@babel/plugin-proposal-object-rest-spread": "7.2.0",
"@babel/plugin-transform-runtime": "7.2.0",
"@babel/polyfill": "7.0.0",
"@babel/preset-env": "7.2.0",
"@babel/register": "7.0.0",
"@babel/runtime": "7.2.0",
"babel-core": "7.0.0-bridge.0",
"babel-eslint": "10.0.1",
"babel-jest": "23.6.0",
"cz-conventional-changelog": "2.1.0",
"eslint": "5.10.0",
"eslint-config-prettier": "3.3.0",
"eslint-plugin-babel": "5.3.0",
"jest": "23.6.0",
"jest-cli": "23.6.0",
"jest-environment-node-debug": "2.0.0",
"prettier": "1.15.3",
"regenerator-runtime": "0.13.1",
"semantic-release": "15.12.4",
"uuid": "3.3.2"
}
}

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