@bitdiver/logadapter-dispatcher
Advanced tools
Comparing version 0.0.1 to 1.0.0
{ | ||
"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; | ||
} |
@@ -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; |
116
package.json
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
130
0
11069
23
9