@gitbeaker/rest
Advanced tools
Comparing version 38.7.0 to 38.8.0
@@ -27,10 +27,7 @@ 'use strict'; | ||
// src/index.ts | ||
async function defaultOptionsHandler(resourceOptions, { body, searchParams, asStream, sudo, method } = {}) { | ||
const options = await requesterUtils.defaultOptionsHandler(resourceOptions, { | ||
body, | ||
searchParams, | ||
asStream, | ||
sudo, | ||
method | ||
}); | ||
async function defaultOptionsHandler(resourceOptions, requestOptions = {}) { | ||
const options = await requesterUtils.defaultOptionsHandler( | ||
resourceOptions, | ||
requestOptions | ||
); | ||
if (resourceOptions.url.includes("https") && resourceOptions.rejectUnauthorized != null && resourceOptions.rejectUnauthorized === false) { | ||
@@ -105,3 +102,8 @@ if (typeof window !== "object") { | ||
for (let i = 0; i < maxRetries; i += 1) { | ||
const response = await fetch(url, { ...opts, mode }); | ||
const response = await fetch(url, { ...opts, mode }).catch((e) => { | ||
if (e.name === "TimeoutError" || e.name === "AbortError") { | ||
throw new Error("Query timeout was reached"); | ||
} | ||
throw e; | ||
}); | ||
if (response.ok) | ||
@@ -108,0 +110,0 @@ return parseResponse(response, asStream); |
{ | ||
"name": "@gitbeaker/rest", | ||
"version": "38.7.0", | ||
"version": "38.8.0", | ||
"description": "Cross Platform implementation of the GitLab API", | ||
@@ -59,4 +59,4 @@ "license": "MIT", | ||
"dependencies": { | ||
"@gitbeaker/core": "^38.7.0", | ||
"@gitbeaker/requester-utils": "^38.7.0" | ||
"@gitbeaker/core": "^38.8.0", | ||
"@gitbeaker/requester-utils": "^38.8.0" | ||
}, | ||
@@ -70,3 +70,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "e35a0e9745a64004accbb644d7ddc40acacb7315" | ||
"gitHead": "fecce64a1a754794ad6e133eca04f36215914495" | ||
} |
@@ -154,3 +154,3 @@ <div align="center"> | ||
| `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 | | ||
| `requestTimeout` | Yes | `300000` | Request Library Timeout in ms | | ||
| `queryTimeout` | Yes | `300000` | Query Timeout in ms | | ||
| `profileToken` | Yes | N/A | [Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html) | | ||
@@ -157,0 +157,0 @@ | `profileMode` | Yes | `execution` | [Requests Profiles Token](https://docs.gitlab.com/ee/administration/monitoring/performance/request_profiling.html) | |
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
78725
963