@gitbeaker/rest 38.7.0 → 38.9.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 +3 -2
- package/dist/index.js +11 -9
- package/dist/index.mjs +11 -9
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
|
|
85
85
|
## Features
|
|
86
86
|
|
|
87
|
-
- **Complete** - All features of Gitlab's exposed APIs are covered up to version [16.0](https://docs.gitlab.com/
|
|
87
|
+
- **Complete** - All features of Gitlab's exposed APIs are covered up to version [16.0](https://docs.gitlab.com/16.0/ee/api/api_resources.html).
|
|
88
88
|
- **Universal** - Works in all modern browsers, [Node.js](https://nodejs.org/), and [Deno](https://deno.land/).
|
|
89
89
|
- **Tested** - All libraries have > 80% test coverage.
|
|
90
90
|
- **Typed** - All libraries have extensive TypeScript declarations.
|
|
@@ -151,7 +151,7 @@ Available instantiating options:
|
|
|
151
151
|
| `sudo` | Yes | `false` | [Sudo](https://docs.gitlab.com/ee/api/#sudo) query parameter |
|
|
152
152
|
| `camelize` | Yes | `false` | Camelizes all response body keys |
|
|
153
153
|
| `requesterFn` | Yes | @gitbeaker/rest & @gitbeaker/cli : fetch-based, The @gitbeaker/core package **does not** have a default and thus must be set explicitly | Request Library Wrapper |
|
|
154
|
-
| `
|
|
154
|
+
| `queryTimeout` | Yes | `300000` | Query Timeout in ms |
|
|
155
155
|
| `profileToken` | Yes | N/A | [Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html) |
|
|
156
156
|
| `profileMode` | Yes | `execution` | [Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html) |
|
|
157
157
|
|
|
@@ -403,6 +403,7 @@ projectsAPI.create({
|
|
|
403
403
|
<td align="center" valign="top" width="3.84%"><a href="https://github.com/tbazin"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9104039?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Théis Bazin"/></td>
|
|
404
404
|
<td align="center" valign="top" width="3.84%"><a href="http://spencersalisbury.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8053224?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Spencer Salisbury"/></td>
|
|
405
405
|
<td align="center" valign="top" width="3.84%"><a href="https://simonecorsi.dev/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5617452?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Simone Corsi"/></td>
|
|
406
|
+
<td align="center" valign="top" width="3.84%"><a href="https://github.com/Bambii556"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/34485027?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Bambii"/></td>
|
|
406
407
|
</tr>
|
|
407
408
|
</p>
|
|
408
409
|
|
package/dist/index.js
CHANGED
|
@@ -24,14 +24,11 @@ function _interopNamespace(e) {
|
|
|
24
24
|
var Resources__namespace = /*#__PURE__*/_interopNamespace(Resources);
|
|
25
25
|
|
|
26
26
|
// src/index.ts
|
|
27
|
-
async function defaultOptionsHandler(resourceOptions,
|
|
28
|
-
const options = await requesterUtils.defaultOptionsHandler(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
sudo,
|
|
33
|
-
method
|
|
34
|
-
});
|
|
27
|
+
async function defaultOptionsHandler(resourceOptions, requestOptions = {}) {
|
|
28
|
+
const options = await requesterUtils.defaultOptionsHandler(
|
|
29
|
+
resourceOptions,
|
|
30
|
+
requestOptions
|
|
31
|
+
);
|
|
35
32
|
if (resourceOptions.url.includes("https") && resourceOptions.rejectUnauthorized != null && resourceOptions.rejectUnauthorized === false) {
|
|
36
33
|
if (typeof window !== "object") {
|
|
37
34
|
const { Agent } = await import('https');
|
|
@@ -101,7 +98,12 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
101
98
|
url.search = searchParams || "";
|
|
102
99
|
const mode = getConditionalMode(endpoint);
|
|
103
100
|
for (let i = 0; i < maxRetries; i += 1) {
|
|
104
|
-
const response = await fetch(url, { ...opts, mode })
|
|
101
|
+
const response = await fetch(url, { ...opts, mode }).catch((e) => {
|
|
102
|
+
if (e.name === "TimeoutError" || e.name === "AbortError") {
|
|
103
|
+
throw new Error("Query timeout was reached");
|
|
104
|
+
}
|
|
105
|
+
throw e;
|
|
106
|
+
});
|
|
105
107
|
if (response.ok)
|
|
106
108
|
return parseResponse(response, asStream);
|
|
107
109
|
if (!retryCodes.includes(response.status))
|
package/dist/index.mjs
CHANGED
|
@@ -2,14 +2,11 @@ import * as Resources from '@gitbeaker/core';
|
|
|
2
2
|
import { createRequesterFn, presetResourceArguments, defaultOptionsHandler as defaultOptionsHandler$1 } from '@gitbeaker/requester-utils';
|
|
3
3
|
|
|
4
4
|
// src/index.ts
|
|
5
|
-
async function defaultOptionsHandler(resourceOptions,
|
|
6
|
-
const options = await defaultOptionsHandler$1(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
sudo,
|
|
11
|
-
method
|
|
12
|
-
});
|
|
5
|
+
async function defaultOptionsHandler(resourceOptions, requestOptions = {}) {
|
|
6
|
+
const options = await defaultOptionsHandler$1(
|
|
7
|
+
resourceOptions,
|
|
8
|
+
requestOptions
|
|
9
|
+
);
|
|
13
10
|
if (resourceOptions.url.includes("https") && resourceOptions.rejectUnauthorized != null && resourceOptions.rejectUnauthorized === false) {
|
|
14
11
|
if (typeof window !== "object") {
|
|
15
12
|
const { Agent } = await import('https');
|
|
@@ -79,7 +76,12 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
79
76
|
url.search = searchParams || "";
|
|
80
77
|
const mode = getConditionalMode(endpoint);
|
|
81
78
|
for (let i = 0; i < maxRetries; i += 1) {
|
|
82
|
-
const response = await fetch(url, { ...opts, mode })
|
|
79
|
+
const response = await fetch(url, { ...opts, mode }).catch((e) => {
|
|
80
|
+
if (e.name === "TimeoutError" || e.name === "AbortError") {
|
|
81
|
+
throw new Error("Query timeout was reached");
|
|
82
|
+
}
|
|
83
|
+
throw e;
|
|
84
|
+
});
|
|
83
85
|
if (response.ok)
|
|
84
86
|
return parseResponse(response, asStream);
|
|
85
87
|
if (!retryCodes.includes(response.status))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitbeaker/rest",
|
|
3
|
-
"version": "38.
|
|
3
|
+
"version": "38.9.0",
|
|
4
4
|
"description": "Cross Platform implementation of the GitLab API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"release": "auto shipit"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@gitbeaker/core": "^38.
|
|
60
|
-
"@gitbeaker/requester-utils": "^38.
|
|
59
|
+
"@gitbeaker/core": "^38.9.0",
|
|
60
|
+
"@gitbeaker/requester-utils": "^38.9.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@playwright/test": "^1.33.0",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"tsup": "^6.7.0",
|
|
67
67
|
"typescript": "^5.0.4"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "853426564867bc77e42f175aed7ea9903be1bfdc"
|
|
70
70
|
}
|