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

@lskjs/module

Package Overview
Dependencies
Maintainers
5
Versions
322
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lskjs/module - npm Package Compare versions

Comparing version 0.32.0 to 0.32.2

Core.js.map

122

Core.js

@@ -8,3 +8,3 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;

@@ -23,2 +23,4 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));

var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _toPairs = _interopRequireDefault(require("lodash/toPairs"));

@@ -42,3 +44,3 @@

function isClass(v) {
return (0, _isFunction.default)(v); // && /^\s*class\s+/.test(v.toString());
return (0, _isFunction["default"])(v); // && /^\s*class\s+/.test(v.toString());
}

@@ -53,16 +55,16 @@

var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
(0, _classCallCheck2.default)(this, Core);
this.name = 'Core';
this.startCount = 0;
(0, _classCallCheck2["default"])(this, Core);
(0, _defineProperty2["default"])(this, "name", 'Core');
(0, _defineProperty2["default"])(this, "startCount", 0);
Object.assign(this, params);
}
(0, _createClass2.default)(Core, [{
(0, _createClass2["default"])(Core, [{
key: "createLogger",
value: function createLogger(params) {
return _log.default.createLogger((0, _objectSpread2.default)({
return _log["default"].createLogger((0, _objectSpread2["default"])({
name: this.name || 'app',
src: __DEV__,
level: 'trace'
}, (0, _get.default)(this, 'config.log', {}), params));
}, (0, _get["default"])(this, 'config.log', {}), params));
}

@@ -72,3 +74,3 @@ }, {

value: function emit() {
var _this$log, _console, _this$ee;
var _this$ee;

@@ -79,3 +81,13 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {

this.log ? (_this$log = this.log).trace.apply(_this$log, ["".concat(this.name)].concat(args)) : (_console = console).log.apply(_console, ["".concat(this.name)].concat(args));
if (this.log) {
var _this$log;
(_this$log = this.log).trace.apply(_this$log, ["".concat(this.name)].concat(args));
} else {
var _console;
(_console = console).log.apply(_console, ["".concat(this.name)].concat(args)); // eslint-disable-line no-console
}
if (this.ee) (_this$ee = this.ee).emit.apply(_this$ee, args);

@@ -95,7 +107,7 @@ }

/*#__PURE__*/
(0, _asyncToGenerator2.default)(
(0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regenerator.default.mark(function _callee() {
_regenerator["default"].mark(function _callee() {
var _args = arguments;
return _regenerator.default.wrap(function _callee$(_context) {
return _regenerator["default"].wrap(function _callee$(_context) {
while (1) {

@@ -130,12 +142,12 @@ switch (_context.prev = _context.next) {

value: function () {
var _beforeInit = (0, _asyncToGenerator2.default)(
var _beforeInit = (0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regenerator.default.mark(function _callee2() {
_regenerator["default"].mark(function _callee2() {
var _this2 = this;
return _regenerator.default.wrap(function _callee2$(_context2) {
return _regenerator["default"].wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
if (!this.ee) this.ee = new _emitter.default();
if (!this.ee) this.ee = new _emitter["default"]();
if (!this.log) this.log = this.createLogger();

@@ -163,6 +175,6 @@ if (this.log) this.ee.on('*', function (event) {

value: function () {
var _init = (0, _asyncToGenerator2.default)(
var _init = (0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regenerator.default.mark(function _callee3() {
return _regenerator.default.wrap(function _callee3$(_context3) {
_regenerator["default"].mark(function _callee3() {
return _regenerator["default"].wrap(function _callee3$(_context3) {
while (1) {

@@ -197,4 +209,4 @@ switch (_context3.prev = _context3.next) {

value: function getModulesSequence() {
return (0, _toPairs.default)(this.modules || {}).map(function (_ref2) {
var _ref3 = (0, _slicedToArray2.default)(_ref2, 2),
return (0, _toPairs["default"])(this.modules || {}).map(function (_ref2) {
var _ref3 = (0, _slicedToArray2["default"])(_ref2, 2),
k = _ref3[0],

@@ -216,5 +228,4 @@ v = _ref3[1];

return _bluebird.default.map(this.getModulesSequence(), function (pack) {
// this.log.trace(`@@@@ module ${pack.name}.${method}()`, typeof pack.module[method], pack.module);
if (!(pack.module && (0, _isFunction.default)(pack.module[method]))) return null; // let res;
return _bluebird["default"].map(this.getModulesSequence(), function (pack) {
if (!(pack.module && (0, _isFunction["default"])(pack.module[method]))) return null; // let res;

@@ -240,3 +251,3 @@ try {

var modules = {};
(0, _forEach.default)(this._modules, function (Module, key) {
(0, _forEach["default"])(this._modules, function (Module, key) {
// const Module = module(ctx);

@@ -254,3 +265,3 @@ if (isClass(Module)) {

this.modules = modules;
DEBUG && this.log.trace("".concat(this.name, ".modules"), Object.keys(this.modules)); // this.log.debug('_modules', Object.keys(this._modules));
if (DEBUG) this.log.trace("".concat(this.name, ".modules"), Object.keys(this.modules)); // this.log.debug('_modules', Object.keys(this._modules));

@@ -267,6 +278,6 @@ return this.broadcastModules('init');

value: function () {
var _startOrRestart = (0, _asyncToGenerator2.default)(
var _startOrRestart = (0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regenerator.default.mark(function _callee4() {
return _regenerator.default.wrap(function _callee4$(_context4) {
_regenerator["default"].mark(function _callee4() {
return _regenerator["default"].wrap(function _callee4$(_context4) {
while (1) {

@@ -302,6 +313,6 @@ switch (_context4.prev = _context4.next) {

value: function () {
var _restart = (0, _asyncToGenerator2.default)(
var _restart = (0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regenerator.default.mark(function _callee5() {
return _regenerator.default.wrap(function _callee5$(_context5) {
_regenerator["default"].mark(function _callee5() {
return _regenerator["default"].wrap(function _callee5$(_context5) {
while (1) {

@@ -315,3 +326,3 @@ switch (_context5.prev = _context5.next) {

case 3:
if (!(0, _isFunction.default)(this.onRestart)) {
if (!(0, _isFunction["default"])(this.onRestart)) {
_context5.next = 7;

@@ -346,6 +357,6 @@ break;

value: function () {
var _start = (0, _asyncToGenerator2.default)(
var _start = (0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regenerator.default.mark(function _callee6() {
return _regenerator.default.wrap(function _callee6$(_context6) {
_regenerator["default"].mark(function _callee6() {
return _regenerator["default"].wrap(function _callee6$(_context6) {
while (1) {

@@ -356,3 +367,3 @@ switch (_context6.prev = _context6.next) {

if (!(0, _isFunction.default)(this.beforeInit)) {
if (!(0, _isFunction["default"])(this.beforeInit)) {
_context6.next = 4;

@@ -366,3 +377,3 @@ break;

case 4:
if (!(0, _isFunction.default)(this.init)) {
if (!(0, _isFunction["default"])(this.init)) {
_context6.next = 7;

@@ -376,3 +387,3 @@ break;

case 7:
if (!(0, _isFunction.default)(this.initModules)) {
if (!(0, _isFunction["default"])(this.initModules)) {
_context6.next = 11;

@@ -387,3 +398,3 @@ break;

case 11:
if (!(0, _isFunction.default)(this.afterInit)) {
if (!(0, _isFunction["default"])(this.afterInit)) {
_context6.next = 15;

@@ -398,3 +409,3 @@ break;

case 15:
if (!(0, _isFunction.default)(this.run)) {
if (!(0, _isFunction["default"])(this.run)) {
_context6.next = 19;

@@ -409,3 +420,3 @@ break;

case 19:
if (!(0, _isFunction.default)(this.broadcastModules)) {
if (!(0, _isFunction["default"])(this.broadcastModules)) {
_context6.next = 23;

@@ -420,3 +431,3 @@ break;

case 23:
if (!(0, _isFunction.default)(this.afterRun)) {
if (!(0, _isFunction["default"])(this.afterRun)) {
_context6.next = 27;

@@ -431,3 +442,3 @@ break;

case 27:
if (!(0, _isFunction.default)(this.started)) {
if (!(0, _isFunction["default"])(this.started)) {
_context6.next = 31;

@@ -442,3 +453,3 @@ break;

case 31:
if (!(0, _isFunction.default)(this.onStart)) {
if (!(0, _isFunction["default"])(this.onStart)) {
_context6.next = 35;

@@ -464,3 +475,3 @@ break;

} else {
console.error("".concat(this.name, ".start() err"), _context6.t0);
console.error("".concat(this.name, ".start() err"), _context6.t0); // eslint-disable-line no-console
}

@@ -494,6 +505,6 @@

value: function () {
var _stop = (0, _asyncToGenerator2.default)(
var _stop = (0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regenerator.default.mark(function _callee7() {
return _regenerator.default.wrap(function _callee7$(_context7) {
_regenerator["default"].mark(function _callee7() {
return _regenerator["default"].wrap(function _callee7$(_context7) {
while (1) {

@@ -506,3 +517,3 @@ switch (_context7.prev = _context7.next) {

if (!(0, _isFunction.default)(this.broadcastModules)) {
if (!(0, _isFunction["default"])(this.broadcastModules)) {
_context7.next = 7;

@@ -517,3 +528,3 @@ break;

case 7:
if (!(0, _isFunction.default)(this.onStop)) {
if (!(0, _isFunction["default"])(this.onStop)) {
_context7.next = 11;

@@ -538,3 +549,3 @@ break;

} else {
console.error("".concat(this.name, ".stop() err"), _context7.t0);
console.error("".concat(this.name, ".stop() err"), _context7.t0); // eslint-disable-line no-console
}

@@ -569,3 +580,4 @@

exports.default = Core;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9Db3JlLmpzIl0sIm5hbWVzIjpbImlzQ2xhc3MiLCJ2IiwiREVCVUciLCJDb3JlIiwicGFyYW1zIiwibmFtZSIsInN0YXJ0Q291bnQiLCJPYmplY3QiLCJhc3NpZ24iLCJsb2dnZXIiLCJjcmVhdGVMb2dnZXIiLCJzcmMiLCJfX0RFVl9fIiwibGV2ZWwiLCJhcmdzIiwibG9nIiwidHJhY2UiLCJjb25zb2xlIiwiZWUiLCJlbWl0Iiwib24iLCJlcnJvciIsImVtaXR0ZXIiLCJldmVudCIsIm1vZHVsZXMiLCJtYXAiLCJrIiwibW9kdWxlIiwibWV0aG9kIiwiUHJvbWlzZSIsImdldE1vZHVsZXNTZXF1ZW5jZSIsInBhY2siLCJlcnIiLCJfbW9kdWxlcyIsImdldE1vZHVsZXMiLCJNb2R1bGUiLCJrZXkiLCJrZXlzIiwiYnJvYWRjYXN0TW9kdWxlcyIsInJlc3RhcnQiLCJzdGFydCIsInN0b3AiLCJvblJlc3RhcnQiLCJiZWZvcmVJbml0IiwiaW5pdCIsImluaXRNb2R1bGVzIiwiYWZ0ZXJJbml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l19
//# sourceMappingURL=Core.js.map

@@ -8,8 +8,9 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;
var _eventemitter = _interopRequireDefault(require("eventemitter3"));
var _default = _eventemitter.default;
exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbWl0dGVyL2VtaXR0ZXIuY2xpZW50LmpzIl0sIm5hbWVzIjpbIkV2ZW50RW1pdHRlciJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7O2VBRWVBLHFCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEV2ZW50RW1pdHRlciBmcm9tICdldmVudGVtaXR0ZXIzJztcblxuZXhwb3J0IGRlZmF1bHQgRXZlbnRFbWl0dGVyO1xuIl19
var _default = _eventemitter["default"];
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbWl0dGVyL2VtaXR0ZXIuY2xpZW50LmpzIl0sIm5hbWVzIjpbIkV2ZW50RW1pdHRlciJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7O2VBRWVBLHdCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEV2ZW50RW1pdHRlciBmcm9tICdldmVudGVtaXR0ZXIzJztcblxuZXhwb3J0IGRlZmF1bHQgRXZlbnRFbWl0dGVyO1xuIl19
//# sourceMappingURL=emitter.client.js.map

@@ -8,8 +8,9 @@ "use strict";

});
exports.default = void 0;
exports["default"] = void 0;
var _events = _interopRequireDefault(require("events"));
var _default = _events.default;
exports.default = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbWl0dGVyL2VtaXR0ZXIuc2VydmVyLmpzIl0sIm5hbWVzIjpbIkV2ZW50RW1pdHRlciJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7O2VBRWVBLGUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgRXZlbnRFbWl0dGVyIGZyb20gJ2V2ZW50cyc7XG5cbmV4cG9ydCBkZWZhdWx0IEV2ZW50RW1pdHRlcjtcbiJdfQ==
var _default = _events["default"];
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbWl0dGVyL2VtaXR0ZXIuc2VydmVyLmpzIl0sIm5hbWVzIjpbIkV2ZW50RW1pdHRlciJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUE7O2VBRWVBLGtCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IEV2ZW50RW1pdHRlciBmcm9tICdldmVudHMnO1xuXG5leHBvcnQgZGVmYXVsdCBFdmVudEVtaXR0ZXI7XG4iXX0=
//# sourceMappingURL=emitter.server.js.map
"use strict";
if (typeof window !== 'undefined') {
module.exports = require('./emitter.client').default;
module.exports = require('./emitter.client')["default"];
} else {
module.exports = require('./emitter.server').default;
module.exports = require('./emitter.server')["default"];
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9lbWl0dGVyL2luZGV4LmpzIl0sIm5hbWVzIjpbIndpbmRvdyIsIm1vZHVsZSIsImV4cG9ydHMiLCJyZXF1aXJlIiwiZGVmYXVsdCJdLCJtYXBwaW5ncyI6Ijs7QUFBQSxJQUFJLE9BQU9BLE1BQVAsS0FBa0IsV0FBdEIsRUFBbUM7QUFDakNDLEVBQUFBLE1BQU0sQ0FBQ0MsT0FBUCxHQUFpQkMsT0FBTyxDQUFDLGtCQUFELENBQVAsQ0FBNEJDLE9BQTdDO0FBQ0QsQ0FGRCxNQUVPO0FBQ0xILEVBQUFBLE1BQU0sQ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";

get: function get() {
return _Core.default;
return _Core["default"];
}

@@ -17,2 +17,3 @@ });

var _Core = _interopRequireDefault(require("./Core"));
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vQ29yZSc7XG4iXX0=
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IHsgZGVmYXVsdCB9IGZyb20gJy4vQ29yZSc7XG4iXX0=
//# sourceMappingURL=index.js.map
{
"name": "@lskjs/module",
"version": "0.32.0",
"version": "0.32.2",
"description": "LSK module.",

@@ -12,4 +12,7 @@ "author": "Igor Suvorov <hi@isuvorov.com>",

"keywords": [],
"dependencies": {
"eventemitter3": "^3.1.0"
},
"devDependencies": {
"@lskjs/log": "^0.32.0",
"@lskjs/log": "^0.32.2",
"bluebird": "^3.5.3",

@@ -24,7 +27,12 @@ "lodash": "^4.17.11"

"scripts": {
"postversion": "../../scripts/pack-release.sh"
},
"dependencies": {
"eventemitter3": "^3.1.0"
"dev": "npm run watch",
"postversion": "npm run release",
"lint:js": "../../scripts/package-lint-js.sh",
"bootstrap": "../../scripts/package-bootstrap.sh",
"build": "../../scripts/package-build.sh",
"watch": "../../scripts/package-watch.sh",
"link": "../../scripts/package-link.sh",
"bump": "../../scripts/package-bump.sh",
"release": "../../scripts/package-release.sh"
}
}
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