@lskjs/module
Advanced tools
Comparing version 0.29.8-alpha.0 to 0.30.0
12
Core.js
@@ -32,3 +32,3 @@ "use strict"; | ||
var _logger = _interopRequireDefault(require("./logger")); | ||
var _log = _interopRequireDefault(require("@lskjs/log")); | ||
@@ -60,3 +60,3 @@ var _emitter = _interopRequireDefault(require("./emitter")); | ||
value: function createLogger(params) { | ||
return _logger.default.createLogger((0, _objectSpread2.default)({ | ||
return _log.default.createLogger((0, _objectSpread2.default)({ | ||
name: this.name || 'app', | ||
@@ -264,3 +264,3 @@ src: __DEV__, | ||
if (!this.startCount) { | ||
_context4.next = 4; | ||
_context4.next = 2; | ||
break; | ||
@@ -271,6 +271,6 @@ } | ||
case 4: | ||
case 2: | ||
return _context4.abrupt("return", this.start()); | ||
case 5: | ||
case 3: | ||
case "end": | ||
@@ -533,2 +533,2 @@ return _context4.stop(); | ||
exports.default = Core; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Db3JlLmpzIl0sIm5hbWVzIjpbImlzQ2xhc3MiLCJ2IiwiREVCVUciLCJDb3JlIiwicGFyYW1zIiwibmFtZSIsInN0YXJ0Q291bnQiLCJPYmplY3QiLCJhc3NpZ24iLCJsb2dnZXIiLCJjcmVhdGVMb2dnZXIiLCJzcmMiLCJfX0RFVl9fIiwibGV2ZWwiLCJhcmdzIiwibG9nIiwidHJhY2UiLCJjb25zb2xlIiwiZWUiLCJlbWl0Iiwib24iLCJlcnJvciIsImVtaXR0ZXIiLCJldmVudCIsIm1vZHVsZXMiLCJtYXAiLCJrIiwibW9kdWxlIiwibWV0aG9kIiwiUHJvbWlzZSIsImdldE1vZHVsZXNTZXF1ZW5jZSIsInBhY2siLCJlcnIiLCJfbW9kdWxlcyIsImdldE1vZHVsZXMiLCJNb2R1bGUiLCJrZXkiLCJrZXlzIiwiYnJvYWRjYXN0TW9kdWxlcyIsInJlc3RhcnQiLCJzdGFydCIsInN0b3A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BlcnI7XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xuICB9XG5cbiAgYXN5bmMgc3RvcCgpIHtcbiAgICB0aGlzLmVtaXQoJ3N0b3AnKTtcbiAgICB0aGlzLmxvZy50cmFjZShgJHt0aGlzLm5hbWV9LnN0b3AoKWApO1xuICAgIHRyeSB7XG4gICAgICBpZiAoaXNGdW5jdGlvbih0aGlzLmJyb2FkY2FzdE1vZHVsZXMpKSB7XG4gICAgICAgIHRoaXMubG9nLnRyYWNlKGAke3RoaXMubmFtZX0uYnJvYWRjYXN0TW9kdWxlcygnc3RvcCcpYCk7XG4gICAgICAgIGF3YWl0IHRoaXMuYnJvYWRjYXN0TW9kdWxlcygnc3RvcCcpO1xuICAgICAgfVxuICAgICAgaWYgKGlzRnVuY3Rpb24odGhpcy5vblN0b3ApKSB7XG4gICAgICAgIHRoaXMubG9nLnRyYWNlKGAke3RoaXMubmFtZX0ub25TdG9wKClgKTtcbiAgICAgICAgYXdhaXQgdGhpcy5vblN0b3AoKTtcbiAgICAgIH1cbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIGlmICh0aGlzLmxvZyAmJiB0aGlzLmxvZy5mYXRhbCkge1xuICAgICAgICB0aGlzLmxvZy5mYXRhbChgJHt0aGlzLm5hbWV9LnN0b3AoKSBlcnJgLCBlcnIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29uc29sZS5lcnJvcihgJHt0aGlzLm5hbWV9LnN0b3AoKSBlcnJgLCBlcnIpO1xuICAgICAgfVxuICAgICAgaWYgKHR5cGVvZiBwcm9jZXNzICE9PSAndW5kZWZpbmVkJyAmJiBwcm9jZXNzLmV4aXQpIHtcbiAgICAgICAgcHJvY2Vzcy5leGl0KDEpO1xuICAgICAgfVxuICAgICAgdGhyb3cgZXJyO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcztcbiAgfVxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb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AoKTtcbiAgICAgIH1cbiAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgIGlmICh0aGlzLmxvZyAmJiB0aGlzLmxvZy5mYXRhbCkge1xuICAgICAgICB0aGlzLmxvZy5mYXRhbChgJHt0aGlzLm5hbWV9LnN0b3AoKSBlcnJgLCBlcnIpO1xuICAgICAgfSBlbHNlIHtcbiAgICAgICAgY29uc29sZS5lcnJvcihgJHt0aGlzLm5hbWV9LnN0b3AoKSBlcnJgLCBlcnIpO1xuICAgICAgfVxuICAgICAgaWYgKHR5cGVvZiBwcm9jZXNzICE9PSAndW5kZWZpbmVkJyAmJiBwcm9jZXNzLmV4aXQpIHtcbiAgICAgICAgcHJvY2Vzcy5leGl0KDEpO1xuICAgICAgfVxuICAgICAgdGhyb3cgZXJyO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcztcbiAgfVxufVxuIl19 |
{ | ||
"name": "@lskjs/module", | ||
"version": "0.29.8-alpha.0", | ||
"version": "0.30.0", | ||
"description": "LSK module.", | ||
@@ -12,2 +12,12 @@ "author": "Igor Suvorov <hi@isuvorov.com>", | ||
"keywords": [], | ||
"devDependencies": { | ||
"@lskjs/log": "*", | ||
"bluebird": "^3.5.3", | ||
"lodash": "^4.17.11" | ||
}, | ||
"peerDependencies": { | ||
"@lskjs/log": "*", | ||
"bluebird": "*", | ||
"lodash": "*" | ||
}, | ||
"scripts": { | ||
@@ -14,0 +24,0 @@ "postversion": "../../scripts/pack-release.sh" |
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
33364
3
3