Comparing version 1.0.3 to 1.0.4
@@ -6,2 +6,5 @@ "use strict"; | ||
}); | ||
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } | ||
var Runner = function Runner(env, kafkaHost, registry) { | ||
@@ -13,8 +16,27 @@ var send = function send(topic, payload) { | ||
var receive = function receive(payload, topic) { | ||
// receive messages from kafka | ||
var task = registry[topic]; | ||
task.subscribe(payload); | ||
}; | ||
var receive = function () { | ||
var _ref = _asyncToGenerator(regeneratorRuntime.mark(function _callee(payload, topic) { | ||
var task; | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
// receive messages from kafka | ||
task = registry[topic]; | ||
_context.next = 3; | ||
return task.subscribe(payload); | ||
case 3: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, undefined); | ||
})); | ||
return function receive(_x, _x2) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
return { | ||
@@ -21,0 +43,0 @@ send: send, |
{ | ||
"name": "steveo", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A Task Manager Library", | ||
@@ -23,2 +23,6 @@ "main": "lib/index.js", | ||
], | ||
"dependencies": { | ||
"babel-polyfill": "^6.23.0", | ||
"babel-runtime": "^6.23.0" | ||
}, | ||
"devDependencies": { | ||
@@ -29,4 +33,5 @@ "babel-cli": "^6.24.0", | ||
"babel-istanbul": "^0.12.2", | ||
"babel-plugin-transform-async-to-generator": "^6.22.0", | ||
"babel-plugin-transform-flow-strip-types": "^6.22.0", | ||
"babel-polyfill": "^6.23.0", | ||
"babel-plugin-transform-runtime": "^6.22.0", | ||
"babel-preset-es2015": "^6.24.0", | ||
@@ -33,0 +38,0 @@ "babel-preset-stage-1": "^6.22.0", |
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
7494
125
2
20
+ Addedbabel-polyfill@^6.23.0
+ Addedbabel-runtime@^6.23.0
+ Addedbabel-polyfill@6.26.0(transitive)
+ Addedbabel-runtime@6.26.0(transitive)
+ Addedcore-js@2.6.12(transitive)
+ Addedregenerator-runtime@0.10.50.11.1(transitive)