builder-util
Advanced tools
Comparing version 25.0.3 to 25.0.6
@@ -389,18 +389,8 @@ "use strict"; | ||
async function retry(task, retryCount, interval, backoff = 0, attempt = 0, shouldRetry) { | ||
var _a; | ||
const cancellationToken = new builder_util_runtime_1.CancellationToken(); | ||
try { | ||
return await task(); | ||
} | ||
catch (error) { | ||
return await (0, builder_util_runtime_1.retry)(task, retryCount, interval, backoff, attempt, e => { | ||
var _a; | ||
log_1.log.info(`Above command failed, retrying ${retryCount} more times`); | ||
if (((_a = shouldRetry === null || shouldRetry === void 0 ? void 0 : shouldRetry(error)) !== null && _a !== void 0 ? _a : true) && retryCount > 0 && !cancellationToken.cancelled) { | ||
await new Promise(resolve => setTimeout(resolve, interval + backoff * attempt)); | ||
return await retry(task, retryCount - 1, interval, backoff, attempt + 1, shouldRetry); | ||
} | ||
else { | ||
throw error; | ||
} | ||
} | ||
return (_a = shouldRetry === null || shouldRetry === void 0 ? void 0 : shouldRetry(e)) !== null && _a !== void 0 ? _a : true; | ||
}); | ||
} | ||
//# sourceMappingURL=util.js.map |
{ | ||
"name": "builder-util", | ||
"version": "25.0.3", | ||
"version": "25.0.6", | ||
"main": "out/util.js", | ||
@@ -33,3 +33,3 @@ "author": "Vladimir Krivosheev", | ||
"temp-file": "^3.4.0", | ||
"builder-util-runtime": "9.2.5" | ||
"builder-util-runtime": "9.2.6" | ||
}, | ||
@@ -36,0 +36,0 @@ "typings": "./out/util.d.ts", |
Sorry, the diff of this file is not supported yet
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
130667
1331
+ Addedbuilder-util-runtime@9.2.6(transitive)
- Removedbuilder-util-runtime@9.2.5(transitive)
Updatedbuilder-util-runtime@9.2.6