@gitbeaker/rest 40.5.0 → 40.6.0
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 -0
- package/dist/index.js +3 -1
- package/dist/index.mjs +3 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -510,6 +510,7 @@ projectsAPI.create({
|
|
|
510
510
|
<td align="center" valign="top" width="0.33%"><a href="https://baylee.dev/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/119542904?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Baylee Schmeisser"/></td>
|
|
511
511
|
<td align="center" valign="top" width="0.33%"><a href="https://github.com/andys8"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/13085980?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Andy"/></td>
|
|
512
512
|
<td align="center" valign="top" width="0.33%"><a href="https://github.com/roberta-pavel"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/26488965?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="roberta-pavel"/></td>
|
|
513
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/yousinix"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/41103290?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Youssef"/></td>
|
|
513
514
|
</tr>
|
|
514
515
|
</p>
|
|
515
516
|
|
package/dist/index.js
CHANGED
|
@@ -77,6 +77,7 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
77
77
|
const maxRetries = 10;
|
|
78
78
|
const { prefixUrl, asStream, searchParams, rateLimiters, method, ...opts } = options || {};
|
|
79
79
|
const rateLimit = requesterUtils.getMatchingRateLimiter(endpoint, rateLimiters, method);
|
|
80
|
+
let lastStatus;
|
|
80
81
|
let baseUrl;
|
|
81
82
|
if (prefixUrl) baseUrl = prefixUrl.endsWith("/") ? prefixUrl : `${prefixUrl}/`;
|
|
82
83
|
const url = new URL(endpoint, baseUrl);
|
|
@@ -93,11 +94,12 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
93
94
|
});
|
|
94
95
|
if (response.ok) return parseResponse(response, asStream);
|
|
95
96
|
if (!retryCodes.includes(response.status)) await throwFailedRequestError(request, response);
|
|
97
|
+
lastStatus = response.status;
|
|
96
98
|
await delay(2 ** i * 0.25);
|
|
97
99
|
continue;
|
|
98
100
|
}
|
|
99
101
|
throw new requesterUtils.GitbeakerRetryError(
|
|
100
|
-
`Could not successfully complete this request
|
|
102
|
+
`Could not successfully complete this request after ${maxRetries} retries, last status code: ${lastStatus}. ${lastStatus === 429 ? "Check the applicable rate limits for this endpoint" : "Verify the status of the endpoint"}.`
|
|
101
103
|
);
|
|
102
104
|
}
|
|
103
105
|
var requesterFn = requesterUtils.createRequesterFn(
|
package/dist/index.mjs
CHANGED
|
@@ -55,6 +55,7 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
55
55
|
const maxRetries = 10;
|
|
56
56
|
const { prefixUrl, asStream, searchParams, rateLimiters, method, ...opts } = options || {};
|
|
57
57
|
const rateLimit = getMatchingRateLimiter(endpoint, rateLimiters, method);
|
|
58
|
+
let lastStatus;
|
|
58
59
|
let baseUrl;
|
|
59
60
|
if (prefixUrl) baseUrl = prefixUrl.endsWith("/") ? prefixUrl : `${prefixUrl}/`;
|
|
60
61
|
const url = new URL(endpoint, baseUrl);
|
|
@@ -71,11 +72,12 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
71
72
|
});
|
|
72
73
|
if (response.ok) return parseResponse(response, asStream);
|
|
73
74
|
if (!retryCodes.includes(response.status)) await throwFailedRequestError(request, response);
|
|
75
|
+
lastStatus = response.status;
|
|
74
76
|
await delay(2 ** i * 0.25);
|
|
75
77
|
continue;
|
|
76
78
|
}
|
|
77
79
|
throw new GitbeakerRetryError(
|
|
78
|
-
`Could not successfully complete this request
|
|
80
|
+
`Could not successfully complete this request after ${maxRetries} retries, last status code: ${lastStatus}. ${lastStatus === 429 ? "Check the applicable rate limits for this endpoint" : "Verify the status of the endpoint"}.`
|
|
79
81
|
);
|
|
80
82
|
}
|
|
81
83
|
var requesterFn = createRequesterFn(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitbeaker/rest",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.6.0",
|
|
4
4
|
"description": "Cross Platform implementation of the GitLab API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -54,8 +54,8 @@
|
|
|
54
54
|
"lint:fix": "yarn lint --fix"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@gitbeaker/core": "^40.
|
|
58
|
-
"@gitbeaker/requester-utils": "^40.
|
|
57
|
+
"@gitbeaker/core": "^40.6.0",
|
|
58
|
+
"@gitbeaker/requester-utils": "^40.6.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@playwright/test": "^1.45.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"tsup": "^8.1.0",
|
|
64
64
|
"typescript": "^5.5.3"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "dc4c9d7607be55222677b88b0134150cebddcc32"
|
|
67
67
|
}
|