@vercel/client 17.2.29 → 17.2.31
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.
|
@@ -37,9 +37,10 @@ var import_utils = require("./utils");
|
|
|
37
37
|
var import_get_polling_delay = require("./utils/get-polling-delay");
|
|
38
38
|
var import_ready_state = require("./utils/ready-state");
|
|
39
39
|
var import_utils2 = require("./utils");
|
|
40
|
-
const RETRY_COUNT =
|
|
40
|
+
const RETRY_COUNT = 5;
|
|
41
41
|
const RETRY_DELAY_MAX_MS = 6e4;
|
|
42
42
|
const RETRY_DELAY_MIN_MS = 5e3;
|
|
43
|
+
const RETRY_DELAY_SKEW_MS = 3e4;
|
|
43
44
|
const RETRY_DELAY_DEFAULT_MS = 5e3;
|
|
44
45
|
function parseRetryAfterMs(response) {
|
|
45
46
|
if (response.status === 429 || response.status === 503) {
|
|
@@ -95,10 +96,11 @@ async function* checkDeploymentStatus(deployment, clientOptions) {
|
|
|
95
96
|
}
|
|
96
97
|
const retryAfterMs = parseRetryAfterMs(deploymentResponse);
|
|
97
98
|
if (retryAfterMs != null) {
|
|
99
|
+
const randomSkewMs = Math.floor(RETRY_DELAY_SKEW_MS * Math.random());
|
|
98
100
|
debug(
|
|
99
|
-
`Received a transient error or rate limit (HTTP ${deploymentResponse.status}) while querying deployment status, retrying after ${retryAfterMs}ms`
|
|
101
|
+
`Received a transient error or rate limit (HTTP ${deploymentResponse.status}) while querying deployment status, retrying after ${retryAfterMs + randomSkewMs}ms (${retryAfterMs} + ${randomSkewMs}ms of random skew)`
|
|
100
102
|
);
|
|
101
|
-
await (0, import_sleep_promise.default)(retryAfterMs);
|
|
103
|
+
await (0, import_sleep_promise.default)(retryAfterMs + randomSkewMs);
|
|
102
104
|
continue;
|
|
103
105
|
}
|
|
104
106
|
break;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/client",
|
|
3
|
-
"version": "17.2.
|
|
3
|
+
"version": "17.2.31",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"typings": "dist/index.d.ts",
|
|
6
6
|
"homepage": "https://vercel.com",
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
"querystring": "^0.2.0",
|
|
43
43
|
"sleep-promise": "8.0.1",
|
|
44
44
|
"tar-fs": "1.16.3",
|
|
45
|
+
"@vercel/build-utils": "13.2.16",
|
|
45
46
|
"@vercel/error-utils": "2.0.3",
|
|
46
|
-
"@vercel/routing-utils": "5.3.2"
|
|
47
|
-
"@vercel/build-utils": "13.2.15"
|
|
47
|
+
"@vercel/routing-utils": "5.3.2"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "node ../../utils/build.mjs",
|