Comparing version 2.5.0 to 2.5.1
@@ -1,189 +0,121 @@ | ||
require('source-map-support').install(); | ||
"use strict"; | ||
'use strict'; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _slicedToArray = require('babel-runtime/helpers/sliced-to-array')['default']; | ||
var _toConsumableArray = require('babel-runtime/helpers/to-consumable-array')['default']; | ||
var _regeneratorRuntime = require('babel-runtime/regenerator')['default']; | ||
var _getIterator = require('babel-runtime/core-js/get-iterator')['default']; | ||
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; | ||
Object.defineProperty(exports, '__esModule', { | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.sleep = sleep; | ||
exports.retry = retry; | ||
exports.nodeify = nodeify; | ||
exports.nodeifyAll = nodeifyAll; | ||
exports.retryInterval = retryInterval; | ||
exports.asyncify = asyncify; | ||
exports.parallel = parallel; | ||
exports.asyncmap = asyncmap; | ||
exports.asyncfilter = asyncfilter; | ||
exports.waitForCondition = waitForCondition; | ||
var _bluebird = require('bluebird'); | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _bluebird2 = _interopRequireDefault(_bluebird); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
var _es6Mapify = require('es6-mapify'); | ||
var _bluebird = _interopRequireDefault(require("bluebird")); | ||
var _lodash = require('lodash'); | ||
var _es6Mapify = require("es6-mapify"); | ||
var _lodash2 = _interopRequireDefault(_lodash); | ||
var _lodash = _interopRequireDefault(require("lodash")); | ||
function sleep(ms) { | ||
return _regeneratorRuntime.async(function sleep$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.next = 2; | ||
return _regeneratorRuntime.awrap(_bluebird2['default'].delay(ms)); | ||
function sleep(_x) { | ||
return _sleep.apply(this, arguments); | ||
} | ||
case 2: | ||
return context$1$0.abrupt('return', context$1$0.sent); | ||
function _sleep() { | ||
_sleep = (0, _asyncToGenerator2.default)(function* (ms) { | ||
return yield _bluebird.default.delay(ms); | ||
}); | ||
return _sleep.apply(this, arguments); | ||
} | ||
case 3: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
function retry(_x2, _x3) { | ||
return _retry.apply(this, arguments); | ||
} | ||
function retry(times, fn) { | ||
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { | ||
args[_key - 2] = arguments[_key]; | ||
} | ||
function _retry() { | ||
_retry = (0, _asyncToGenerator2.default)(function* (times, fn, ...args) { | ||
let tries = 0; | ||
let done = false; | ||
let res = null; | ||
var tries, done, res; | ||
return _regeneratorRuntime.async(function retry$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
tries = 0; | ||
done = false; | ||
res = null; | ||
while (!done && tries < times) { | ||
tries++; | ||
case 3: | ||
if (!(!done && tries < times)) { | ||
context$1$0.next = 18; | ||
break; | ||
} | ||
tries++; | ||
context$1$0.prev = 5; | ||
context$1$0.next = 8; | ||
return _regeneratorRuntime.awrap(fn.apply(undefined, args)); | ||
case 8: | ||
res = context$1$0.sent; | ||
try { | ||
res = yield fn(...args); | ||
done = true; | ||
context$1$0.next = 16; | ||
break; | ||
case 12: | ||
context$1$0.prev = 12; | ||
context$1$0.t0 = context$1$0['catch'](5); | ||
if (!(tries >= times)) { | ||
context$1$0.next = 16; | ||
break; | ||
} catch (err) { | ||
if (tries >= times) { | ||
throw err; | ||
} | ||
} | ||
} | ||
throw context$1$0.t0; | ||
return res; | ||
}); | ||
return _retry.apply(this, arguments); | ||
} | ||
case 16: | ||
context$1$0.next = 3; | ||
break; | ||
case 18: | ||
return context$1$0.abrupt('return', res); | ||
case 19: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this, [[5, 12]]); | ||
function retryInterval(_x4, _x5, _x6) { | ||
return _retryInterval.apply(this, arguments); | ||
} | ||
function retryInterval(times, sleepMs, fn) { | ||
for (var _len2 = arguments.length, args = Array(_len2 > 3 ? _len2 - 3 : 0), _key2 = 3; _key2 < _len2; _key2++) { | ||
args[_key2 - 3] = arguments[_key2]; | ||
} | ||
function _retryInterval() { | ||
_retryInterval = (0, _asyncToGenerator2.default)(function* (times, sleepMs, fn, ...args) { | ||
let count = 0; | ||
var count, wrapped; | ||
return _regeneratorRuntime.async(function retryInterval$(context$1$0) { | ||
var _this = this; | ||
let wrapped = function () { | ||
var _ref = (0, _asyncToGenerator2.default)(function* () { | ||
count++; | ||
let res; | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
count = 0; | ||
try { | ||
res = yield fn(...args); | ||
} catch (e) { | ||
if (count !== times) { | ||
yield sleep(sleepMs); | ||
} | ||
wrapped = function wrapped() { | ||
var res; | ||
return _regeneratorRuntime.async(function wrapped$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
count++; | ||
res = undefined; | ||
context$2$0.prev = 2; | ||
context$2$0.next = 5; | ||
return _regeneratorRuntime.awrap(fn.apply(undefined, args)); | ||
throw e; | ||
} | ||
case 5: | ||
res = context$2$0.sent; | ||
context$2$0.next = 14; | ||
break; | ||
return res; | ||
}); | ||
case 8: | ||
context$2$0.prev = 8; | ||
context$2$0.t0 = context$2$0['catch'](2); | ||
return function wrapped() { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
if (!(count !== times)) { | ||
context$2$0.next = 13; | ||
break; | ||
} | ||
return yield retry(times, wrapped); | ||
}); | ||
return _retryInterval.apply(this, arguments); | ||
} | ||
context$2$0.next = 13; | ||
return _regeneratorRuntime.awrap(sleep(sleepMs)); | ||
case 13: | ||
throw context$2$0.t0; | ||
case 14: | ||
return context$2$0.abrupt('return', res); | ||
case 15: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, _this, [[2, 8]]); | ||
}; | ||
return context$1$0.abrupt('return', retry(times, wrapped)); | ||
case 3: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
function parallel(_x7) { | ||
return _parallel.apply(this, arguments); | ||
} | ||
function parallel(promises) { | ||
return _regeneratorRuntime.async(function parallel$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
context$1$0.next = 2; | ||
return _regeneratorRuntime.awrap(_bluebird2['default'].all(promises)); | ||
case 2: | ||
return context$1$0.abrupt('return', context$1$0.sent); | ||
case 3: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
function _parallel() { | ||
_parallel = (0, _asyncToGenerator2.default)(function* (promises) { | ||
return yield _bluebird.default.all(promises); | ||
}); | ||
return _parallel.apply(this, arguments); | ||
} | ||
function nodeify(promisey, cb) { | ||
// eslint-disable-line promise/prefer-await-to-callbacks | ||
return _bluebird2['default'].resolve(promisey).nodeify(cb); | ||
return _bluebird.default.resolve(promisey).nodeify(cb); | ||
} | ||
function nodeifyAll(promiseyMap) { | ||
var cbMap = {}; | ||
let cbMap = {}; | ||
var _iteratorNormalCompletion = true; | ||
@@ -194,22 +126,12 @@ var _didIteratorError = false; | ||
try { | ||
var _loop = function () { | ||
var _step$value = _slicedToArray(_step.value, 2); | ||
for (var _iterator = (0, _es6Mapify.mapify)(promiseyMap)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
let _step$value = (0, _slicedToArray2.default)(_step.value, 2), | ||
name = _step$value[0], | ||
fn = _step$value[1]; | ||
var name = _step$value[0]; | ||
var fn = _step$value[1]; | ||
/*jshint -W083 */ | ||
cbMap[name] = function () { | ||
for (var _len3 = arguments.length, args = Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
args[_key3] = arguments[_key3]; | ||
} | ||
var _cb = args.slice(-1)[0]; | ||
cbMap[name] = function (...args) { | ||
let _cb = args.slice(-1)[0]; | ||
args = args.slice(0, -1); | ||
nodeify(fn.apply(undefined, _toConsumableArray(args)), _cb); | ||
nodeify(fn(...args), _cb); | ||
}; | ||
}; | ||
for (var _iterator = _getIterator((0, _es6Mapify.mapify)(promiseyMap)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { | ||
_loop(); | ||
} | ||
@@ -221,4 +143,4 @@ } catch (err) { | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator['return']) { | ||
_iterator['return'](); | ||
if (!_iteratorNormalCompletion && _iterator.return != null) { | ||
_iterator.return(); | ||
} | ||
@@ -235,289 +157,142 @@ } finally { | ||
function asyncify(fn) { | ||
for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { | ||
args[_key4 - 1] = arguments[_key4]; | ||
} | ||
function asyncify(fn, ...args) { | ||
_bluebird.default.resolve(fn(...args)).done(); | ||
} | ||
_bluebird2['default'].resolve(fn.apply(undefined, args)).done(); | ||
function asyncmap(_x8, _x9) { | ||
return _asyncmap.apply(this, arguments); | ||
} | ||
function asyncmap(coll, mapper) { | ||
var runInParallel = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; | ||
function _asyncmap() { | ||
_asyncmap = (0, _asyncToGenerator2.default)(function* (coll, mapper, runInParallel = true) { | ||
if (runInParallel) { | ||
return parallel(coll.map(mapper)); | ||
} | ||
var newColl, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, item; | ||
let newColl = []; | ||
var _iteratorNormalCompletion2 = true; | ||
var _didIteratorError2 = false; | ||
var _iteratorError2 = undefined; | ||
return _regeneratorRuntime.async(function asyncmap$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
if (!runInParallel) { | ||
context$1$0.next = 2; | ||
break; | ||
try { | ||
for (var _iterator2 = coll[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { | ||
let item = _step2.value; | ||
newColl.push((yield mapper(item))); | ||
} | ||
} catch (err) { | ||
_didIteratorError2 = true; | ||
_iteratorError2 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion2 && _iterator2.return != null) { | ||
_iterator2.return(); | ||
} | ||
return context$1$0.abrupt('return', parallel(coll.map(mapper))); | ||
case 2: | ||
newColl = []; | ||
_iteratorNormalCompletion2 = true; | ||
_didIteratorError2 = false; | ||
_iteratorError2 = undefined; | ||
context$1$0.prev = 6; | ||
_iterator2 = _getIterator(coll); | ||
case 8: | ||
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) { | ||
context$1$0.next = 18; | ||
break; | ||
} finally { | ||
if (_didIteratorError2) { | ||
throw _iteratorError2; | ||
} | ||
} | ||
} | ||
item = _step2.value; | ||
context$1$0.t0 = newColl; | ||
context$1$0.next = 13; | ||
return _regeneratorRuntime.awrap(mapper(item)); | ||
return newColl; | ||
}); | ||
return _asyncmap.apply(this, arguments); | ||
} | ||
case 13: | ||
context$1$0.t1 = context$1$0.sent; | ||
context$1$0.t0.push.call(context$1$0.t0, context$1$0.t1); | ||
case 15: | ||
_iteratorNormalCompletion2 = true; | ||
context$1$0.next = 8; | ||
break; | ||
case 18: | ||
context$1$0.next = 24; | ||
break; | ||
case 20: | ||
context$1$0.prev = 20; | ||
context$1$0.t2 = context$1$0['catch'](6); | ||
_didIteratorError2 = true; | ||
_iteratorError2 = context$1$0.t2; | ||
case 24: | ||
context$1$0.prev = 24; | ||
context$1$0.prev = 25; | ||
if (!_iteratorNormalCompletion2 && _iterator2['return']) { | ||
_iterator2['return'](); | ||
} | ||
case 27: | ||
context$1$0.prev = 27; | ||
if (!_didIteratorError2) { | ||
context$1$0.next = 30; | ||
break; | ||
} | ||
throw _iteratorError2; | ||
case 30: | ||
return context$1$0.finish(27); | ||
case 31: | ||
return context$1$0.finish(24); | ||
case 32: | ||
return context$1$0.abrupt('return', newColl); | ||
case 33: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this, [[6, 20, 24, 32], [25,, 27, 31]]); | ||
function asyncfilter(_x10, _x11) { | ||
return _asyncfilter.apply(this, arguments); | ||
} | ||
function asyncfilter(coll, filter) { | ||
var runInParallel = arguments.length <= 2 || arguments[2] === undefined ? true : arguments[2]; | ||
function _asyncfilter() { | ||
_asyncfilter = (0, _asyncToGenerator2.default)(function* (coll, filter, runInParallel = true) { | ||
let newColl = []; | ||
var newColl, bools, i, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3, item; | ||
if (runInParallel) { | ||
let bools = yield parallel(coll.map(filter)); | ||
return _regeneratorRuntime.async(function asyncfilter$(context$1$0) { | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
newColl = []; | ||
if (!runInParallel) { | ||
context$1$0.next = 8; | ||
break; | ||
for (let i = 0; i < coll.length; i++) { | ||
if (bools[i]) { | ||
newColl.push(coll[i]); | ||
} | ||
} | ||
} else { | ||
var _iteratorNormalCompletion3 = true; | ||
var _didIteratorError3 = false; | ||
var _iteratorError3 = undefined; | ||
context$1$0.next = 4; | ||
return _regeneratorRuntime.awrap(parallel(coll.map(filter))); | ||
try { | ||
for (var _iterator3 = coll[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) { | ||
let item = _step3.value; | ||
case 4: | ||
bools = context$1$0.sent; | ||
for (i = 0; i < coll.length; i++) { | ||
if (bools[i]) { | ||
newColl.push(coll[i]); | ||
if (yield filter(item)) { | ||
newColl.push(item); | ||
} | ||
} | ||
context$1$0.next = 36; | ||
break; | ||
case 8: | ||
_iteratorNormalCompletion3 = true; | ||
_didIteratorError3 = false; | ||
_iteratorError3 = undefined; | ||
context$1$0.prev = 11; | ||
_iterator3 = _getIterator(coll); | ||
case 13: | ||
if (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done) { | ||
context$1$0.next = 22; | ||
break; | ||
} catch (err) { | ||
_didIteratorError3 = true; | ||
_iteratorError3 = err; | ||
} finally { | ||
try { | ||
if (!_iteratorNormalCompletion3 && _iterator3.return != null) { | ||
_iterator3.return(); | ||
} | ||
} finally { | ||
if (_didIteratorError3) { | ||
throw _iteratorError3; | ||
} | ||
} | ||
} | ||
} | ||
item = _step3.value; | ||
context$1$0.next = 17; | ||
return _regeneratorRuntime.awrap(filter(item)); | ||
return newColl; | ||
}); | ||
return _asyncfilter.apply(this, arguments); | ||
} | ||
case 17: | ||
if (!context$1$0.sent) { | ||
context$1$0.next = 19; | ||
break; | ||
} | ||
function waitForCondition(_x12) { | ||
return _waitForCondition.apply(this, arguments); | ||
} | ||
newColl.push(item); | ||
function _waitForCondition() { | ||
_waitForCondition = (0, _asyncToGenerator2.default)(function* (condFn, opts = {}) { | ||
_lodash.default.defaults(opts, { | ||
waitMs: 5000, | ||
intervalMs: 500 | ||
}); | ||
case 19: | ||
_iteratorNormalCompletion3 = true; | ||
context$1$0.next = 13; | ||
break; | ||
let debug = opts.logger ? opts.logger.debug.bind(opts.logger) : _lodash.default.noop; | ||
let begunAt = Date.now(); | ||
let endAt = begunAt + opts.waitMs; | ||
case 22: | ||
context$1$0.next = 28; | ||
break; | ||
let spin = function () { | ||
var _ref2 = (0, _asyncToGenerator2.default)(function* () { | ||
const result = yield condFn(); | ||
case 24: | ||
context$1$0.prev = 24; | ||
context$1$0.t0 = context$1$0['catch'](11); | ||
_didIteratorError3 = true; | ||
_iteratorError3 = context$1$0.t0; | ||
case 28: | ||
context$1$0.prev = 28; | ||
context$1$0.prev = 29; | ||
if (!_iteratorNormalCompletion3 && _iterator3['return']) { | ||
_iterator3['return'](); | ||
if (result) { | ||
return result; | ||
} | ||
case 31: | ||
context$1$0.prev = 31; | ||
let now = Date.now(); | ||
let waited = now - begunAt; | ||
if (!_didIteratorError3) { | ||
context$1$0.next = 34; | ||
break; | ||
if (now < endAt) { | ||
debug(`Waited for ${waited} ms so far`); | ||
yield _bluebird.default.delay(opts.intervalMs); | ||
return yield spin(); | ||
} | ||
throw _iteratorError3; | ||
throw new Error(`Condition unmet after ${waited} ms. Timing out.`); | ||
}); | ||
case 34: | ||
return context$1$0.finish(31); | ||
return function spin() { | ||
return _ref2.apply(this, arguments); | ||
}; | ||
}(); | ||
case 35: | ||
return context$1$0.finish(28); | ||
return yield spin(); | ||
}); | ||
return _waitForCondition.apply(this, arguments); | ||
}require('source-map-support').install(); | ||
case 36: | ||
return context$1$0.abrupt('return', newColl); | ||
case 37: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this, [[11, 24, 28, 36], [29,, 31, 35]]); | ||
} | ||
function waitForCondition(condFn) { | ||
var opts = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var debug, begunAt, endAt, spin; | ||
return _regeneratorRuntime.async(function waitForCondition$(context$1$0) { | ||
var _this2 = this; | ||
while (1) switch (context$1$0.prev = context$1$0.next) { | ||
case 0: | ||
_lodash2['default'].defaults(opts, { | ||
waitMs: 5000, | ||
intervalMs: 500 | ||
}); | ||
debug = opts.logger ? opts.logger.debug.bind(opts.logger) : _lodash2['default'].noop; | ||
begunAt = Date.now(); | ||
endAt = begunAt + opts.waitMs; | ||
spin = function spin() { | ||
var result, now, waited; | ||
return _regeneratorRuntime.async(function spin$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
context$2$0.next = 2; | ||
return _regeneratorRuntime.awrap(condFn()); | ||
case 2: | ||
result = context$2$0.sent; | ||
if (!result) { | ||
context$2$0.next = 5; | ||
break; | ||
} | ||
return context$2$0.abrupt('return', result); | ||
case 5: | ||
now = Date.now(); | ||
waited = now - begunAt; | ||
if (!(now < endAt)) { | ||
context$2$0.next = 14; | ||
break; | ||
} | ||
debug('Waited for ' + waited + ' ms so far'); | ||
context$2$0.next = 11; | ||
return _regeneratorRuntime.awrap(_bluebird2['default'].delay(opts.intervalMs)); | ||
case 11: | ||
context$2$0.next = 13; | ||
return _regeneratorRuntime.awrap(spin()); | ||
case 13: | ||
return context$2$0.abrupt('return', context$2$0.sent); | ||
case 14: | ||
throw new Error('Condition unmet after ' + waited + ' ms. Timing out.'); | ||
case 15: | ||
case 'end': | ||
return context$2$0.stop(); | ||
} | ||
}, null, _this2); | ||
}; | ||
context$1$0.next = 7; | ||
return _regeneratorRuntime.awrap(spin()); | ||
case 7: | ||
return context$1$0.abrupt('return', context$1$0.sent); | ||
case 8: | ||
case 'end': | ||
return context$1$0.stop(); | ||
} | ||
}, null, this); | ||
} | ||
exports.sleep = sleep; | ||
exports.retry = retry; | ||
exports.nodeify = nodeify; | ||
exports.nodeifyAll = nodeifyAll; | ||
exports.retryInterval = retryInterval; | ||
exports.asyncify = asyncify; | ||
exports.parallel = parallel; | ||
exports.asyncmap = asyncmap; | ||
exports.asyncfilter = asyncfilter; | ||
exports.waitForCondition = waitForCondition; | ||
// do not pause when finished the last retry | ||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi9hc3luY2JveC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7d0JBRWMsVUFBVTs7Ozt5QkFDRCxZQUFZOztzQkFDckIsUUFBUTs7OztBQUV0QixTQUFlLEtBQUssQ0FBRSxFQUFFOzs7Ozt5Q0FDVCxzQkFBRSxLQUFLLENBQUMsRUFBRSxDQUFDOzs7Ozs7Ozs7O0NBQ3pCOztBQUVELFNBQWUsS0FBSyxDQUFFLEtBQUssRUFBRSxFQUFFO29DQUFLLElBQUk7QUFBSixRQUFJOzs7TUFDbEMsS0FBSyxFQUNMLElBQUksRUFDSixHQUFHOzs7O0FBRkgsYUFBSyxHQUFHLENBQUM7QUFDVCxZQUFJLEdBQUcsS0FBSztBQUNaLFdBQUcsR0FBRyxJQUFJOzs7Y0FDUCxDQUFDLElBQUksSUFBSSxLQUFLLEdBQUcsS0FBSyxDQUF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Bhd2FpdCBzcGluKCk7XG4gICAgfVxuICAgIHRocm93IG5ldyBFcnJvcihgQ29uZGl0aW9uIHVubWV0IGFmdGVyICR7d2FpdGVkfSBtcy4gVGltaW5nIG91dC5gKTtcbiAgfTtcbiAgcmV0dXJuIGF3YWl0IHNwaW4oKTtcbn1cblxuZXhwb3J0IHtcbiAgc2xlZXAsIHJldHJ5LCBub2RlaWZ5LCBub2RlaWZ5QWxsLCByZXRyeUludGVydmFsLCBhc3luY2lmeSwgcGFyYWxsZWwsXG4gIGFzeW5jbWFwLCBhc3luY2ZpbHRlciwgd2FpdEZvckNvbmRpdGlvblxufTtcbiJdLCJmaWxlIjoibGliL2FzeW5jYm94LmpzIiwic291cmNlUm9vdCI6Ii4uLy4uIn0= |
@@ -45,3 +45,3 @@ // transpile:main | ||
}; | ||
return retry(times, wrapped); | ||
return await retry(times, wrapped); | ||
} | ||
@@ -108,3 +108,3 @@ | ||
waitMs: 5000, | ||
intervalMs : 500, | ||
intervalMs: 500, | ||
}); | ||
@@ -131,3 +131,5 @@ let debug = opts.logger ? opts.logger.debug.bind(opts.logger) : _.noop; | ||
export { sleep, retry, nodeify, nodeifyAll, retryInterval, asyncify, parallel, | ||
asyncmap, asyncfilter, waitForCondition}; | ||
export { | ||
sleep, retry, nodeify, nodeifyAll, retryInterval, asyncify, parallel, | ||
asyncmap, asyncfilter, waitForCondition | ||
}; |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "2.5.0", | ||
"version": "2.5.1", | ||
"author": "jlipps@gmail.com", | ||
@@ -28,4 +28,8 @@ "license": "Apache-2.0", | ||
}, | ||
"files": [ | ||
"lib", | ||
"build/lib" | ||
], | ||
"dependencies": { | ||
"babel-runtime": "=5.8.24", | ||
"@babel/runtime": "^7.0.0", | ||
"bluebird": "^3.5.1", | ||
@@ -37,3 +41,4 @@ "es6-mapify": "^1.1.0", | ||
"scripts": { | ||
"prepublish": "gulp prepublish", | ||
"clean": "rm -rf node_modules && rm -f package-lock.json && npm install", | ||
"prepare": "gulp prepublish", | ||
"test": "gulp once", | ||
@@ -46,12 +51,13 @@ "e2e-test": "gulp e2e-test", | ||
"devDependencies": { | ||
"appium-gulp-plugins": "^2.2.0", | ||
"chai": "4.1.2", | ||
"ajv": "^6.5.3", | ||
"appium-gulp-plugins": "^3.0.0", | ||
"babel-eslint": "^10.0.0", | ||
"chai": "4.2.0", | ||
"chai-as-promised": "^7.1.1", | ||
"eslint": "^3.18.0", | ||
"eslint-config-appium": "^2.0.1", | ||
"eslint-plugin-babel": "^3.3.0", | ||
"eslint": "^5.2.0", | ||
"eslint-config-appium": "^3.1.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-mocha": "^4.7.0", | ||
"eslint-plugin-promise": "^3.3.1", | ||
"gulp": "^3.8.11", | ||
"eslint-plugin-mocha": "^5.0.0", | ||
"eslint-plugin-promise": "^4.0.0", | ||
"gulp": "^4.0.0", | ||
"request": "^2.47.0", | ||
@@ -58,0 +64,0 @@ "should": "^13.2.1" |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 4 instances in 1 package
2
65199
13
6
399
+ Added@babel/runtime@^7.0.0
- Removedbabel-runtime@=5.8.24