@common.js/p-retry 6.2.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.js +10 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
|
|
3
3
|
The [p-retry](https://www.npmjs.com/package/p-retry) package exported as CommonJS modules.
|
|
4
4
|
|
|
5
|
-
Exported from [p-retry@6.2.
|
|
5
|
+
Exported from [p-retry@6.2.1](https://www.npmjs.com/package/p-retry/v/6.2.1) using https://github.com/etienne-martin/common.js.
|
package/index.js
CHANGED
|
@@ -310,6 +310,7 @@ var __generator = (void 0) && (void 0).__generator || function(thisArg, body) {
|
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
|
+
var _options, _options1, _options2;
|
|
313
314
|
var AbortError = /*#__PURE__*/ function(Error1) {
|
|
314
315
|
"use strict";
|
|
315
316
|
_inherits(AbortError, Error1);
|
|
@@ -347,13 +348,15 @@ function _pRetry() {
|
|
|
347
348
|
return [
|
|
348
349
|
2,
|
|
349
350
|
new Promise(function(resolve, reject) {
|
|
350
|
-
options = _objectSpread({
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}
|
|
351
|
+
options = _objectSpread({}, options);
|
|
352
|
+
var _onFailedAttempt;
|
|
353
|
+
(_onFailedAttempt = (_options = options).onFailedAttempt) !== null && _onFailedAttempt !== void 0 ? _onFailedAttempt : _options.onFailedAttempt = function() {};
|
|
354
|
+
var _shouldRetry;
|
|
355
|
+
(_shouldRetry = (_options1 = options).shouldRetry) !== null && _shouldRetry !== void 0 ? _shouldRetry : _options1.shouldRetry = function() {
|
|
356
|
+
return true;
|
|
357
|
+
};
|
|
358
|
+
var _retries;
|
|
359
|
+
(_retries = (_options2 = options).retries) !== null && _retries !== void 0 ? _retries : _options2.retries = 10;
|
|
357
360
|
var operation = _retry.default.operation(options);
|
|
358
361
|
var abortHandler = function() {
|
|
359
362
|
var ref;
|