@gitbeaker/rest 39.1.0 → 39.2.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/dist/index.d.mts +186 -0
- package/dist/index.js +9 -5
- package/dist/index.mjs +9 -5
- package/package.json +8 -9
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import * as Resources from '@gitbeaker/core';
|
|
2
|
+
export * from '@gitbeaker/core';
|
|
3
|
+
|
|
4
|
+
declare const Agents: typeof Resources.Agents;
|
|
5
|
+
declare const AlertManagement: typeof Resources.AlertManagement;
|
|
6
|
+
declare const ApplicationAppearance: typeof Resources.ApplicationAppearance;
|
|
7
|
+
declare const ApplicationPlanLimits: typeof Resources.ApplicationPlanLimits;
|
|
8
|
+
declare const Applications: typeof Resources.Applications;
|
|
9
|
+
declare const ApplicationSettings: typeof Resources.ApplicationSettings;
|
|
10
|
+
declare const ApplicationStatistics: typeof Resources.ApplicationStatistics;
|
|
11
|
+
declare const AuditEvents: typeof Resources.AuditEvents;
|
|
12
|
+
declare const Avatar: typeof Resources.Avatar;
|
|
13
|
+
declare const BroadcastMessages: typeof Resources.BroadcastMessages;
|
|
14
|
+
declare const Composer: typeof Resources.Composer;
|
|
15
|
+
declare const Conan: typeof Resources.Conan;
|
|
16
|
+
declare const DashboardAnnotations: typeof Resources.DashboardAnnotations;
|
|
17
|
+
declare const Debian: typeof Resources.Debian;
|
|
18
|
+
declare const DependencyProxy: typeof Resources.DependencyProxy;
|
|
19
|
+
declare const DeployKeys: typeof Resources.DeployKeys;
|
|
20
|
+
declare const DeployTokens: typeof Resources.DeployTokens;
|
|
21
|
+
declare const DockerfileTemplates: typeof Resources.DockerfileTemplates;
|
|
22
|
+
declare const Events: typeof Resources.Events;
|
|
23
|
+
declare const Experiments: typeof Resources.Experiments;
|
|
24
|
+
declare const GeoNodes: typeof Resources.GeoNodes;
|
|
25
|
+
declare const GitignoreTemplates: typeof Resources.GitignoreTemplates;
|
|
26
|
+
declare const GitLabCIYMLTemplates: typeof Resources.GitLabCIYMLTemplates;
|
|
27
|
+
declare const Import: typeof Resources.Import;
|
|
28
|
+
declare const InstanceLevelCICDVariables: typeof Resources.InstanceLevelCICDVariables;
|
|
29
|
+
declare const Keys: typeof Resources.Keys;
|
|
30
|
+
declare const License: typeof Resources.License;
|
|
31
|
+
declare const LicenseTemplates: typeof Resources.LicenseTemplates;
|
|
32
|
+
declare const Lint: typeof Resources.Lint;
|
|
33
|
+
declare const Markdown: typeof Resources.Markdown;
|
|
34
|
+
declare const Maven: typeof Resources.Maven;
|
|
35
|
+
declare const Metadata: typeof Resources.Metadata;
|
|
36
|
+
declare const Migrations: typeof Resources.Migrations;
|
|
37
|
+
declare const Namespaces: typeof Resources.Namespaces;
|
|
38
|
+
declare const NotificationSettings: typeof Resources.NotificationSettings;
|
|
39
|
+
declare const NPM: typeof Resources.NPM;
|
|
40
|
+
declare const NuGet: typeof Resources.NuGet;
|
|
41
|
+
declare const PersonalAccessTokens: typeof Resources.PersonalAccessTokens;
|
|
42
|
+
declare const PyPI: typeof Resources.PyPI;
|
|
43
|
+
declare const RubyGems: typeof Resources.RubyGems;
|
|
44
|
+
declare const Search: typeof Resources.Search;
|
|
45
|
+
declare const ServiceData: typeof Resources.ServiceData;
|
|
46
|
+
declare const SidekiqMetrics: typeof Resources.SidekiqMetrics;
|
|
47
|
+
declare const SidekiqQueues: typeof Resources.SidekiqQueues;
|
|
48
|
+
declare const SnippetRepositoryStorageMoves: typeof Resources.SnippetRepositoryStorageMoves;
|
|
49
|
+
declare const Snippets: typeof Resources.Snippets;
|
|
50
|
+
declare const Suggestions: typeof Resources.Suggestions;
|
|
51
|
+
declare const SystemHooks: typeof Resources.SystemHooks;
|
|
52
|
+
declare const TodoLists: typeof Resources.TodoLists;
|
|
53
|
+
declare const Topics: typeof Resources.Topics;
|
|
54
|
+
declare const Branches: typeof Resources.Branches;
|
|
55
|
+
declare const CommitDiscussions: typeof Resources.CommitDiscussions;
|
|
56
|
+
declare const Commits: typeof Resources.Commits;
|
|
57
|
+
declare const ContainerRegistry: typeof Resources.ContainerRegistry;
|
|
58
|
+
declare const Deployments: typeof Resources.Deployments;
|
|
59
|
+
declare const Environments: typeof Resources.Environments;
|
|
60
|
+
declare const ErrorTrackingClientKeys: typeof Resources.ErrorTrackingClientKeys;
|
|
61
|
+
declare const ErrorTrackingSettings: typeof Resources.ErrorTrackingSettings;
|
|
62
|
+
declare const ExternalStatusChecks: typeof Resources.ExternalStatusChecks;
|
|
63
|
+
declare const FeatureFlags: typeof Resources.FeatureFlags;
|
|
64
|
+
declare const FeatureFlagUserLists: typeof Resources.FeatureFlagUserLists;
|
|
65
|
+
declare const FreezePeriods: typeof Resources.FreezePeriods;
|
|
66
|
+
declare const GitlabPages: typeof Resources.GitlabPages;
|
|
67
|
+
declare const GoProxy: typeof Resources.GoProxy;
|
|
68
|
+
declare const Helm: typeof Resources.Helm;
|
|
69
|
+
declare const Integrations: typeof Resources.Integrations;
|
|
70
|
+
declare const IssueAwardEmojis: typeof Resources.IssueAwardEmojis;
|
|
71
|
+
declare const IssueDiscussions: typeof Resources.IssueDiscussions;
|
|
72
|
+
declare const IssueIterationEvents: typeof Resources.IssueIterationEvents;
|
|
73
|
+
declare const IssueLabelEvents: typeof Resources.IssueLabelEvents;
|
|
74
|
+
declare const IssueLinks: typeof Resources.IssueLinks;
|
|
75
|
+
declare const IssueMilestoneEvents: typeof Resources.IssueMilestoneEvents;
|
|
76
|
+
declare const IssueNoteAwardEmojis: typeof Resources.IssueNoteAwardEmojis;
|
|
77
|
+
declare const IssueNotes: typeof Resources.IssueNotes;
|
|
78
|
+
declare const Issues: typeof Resources.Issues;
|
|
79
|
+
declare const IssuesStatistics: typeof Resources.IssuesStatistics;
|
|
80
|
+
declare const IssueStateEvents: typeof Resources.IssueStateEvents;
|
|
81
|
+
declare const IssueWeightEvents: typeof Resources.IssueWeightEvents;
|
|
82
|
+
declare const JobArtifacts: typeof Resources.JobArtifacts;
|
|
83
|
+
declare const Jobs: typeof Resources.Jobs;
|
|
84
|
+
declare const MergeRequestApprovals: typeof Resources.MergeRequestApprovals;
|
|
85
|
+
declare const MergeRequestAwardEmojis: typeof Resources.MergeRequestAwardEmojis;
|
|
86
|
+
declare const MergeRequestContextCommits: typeof Resources.MergeRequestContextCommits;
|
|
87
|
+
declare const MergeRequestDiscussions: typeof Resources.MergeRequestDiscussions;
|
|
88
|
+
declare const MergeRequestLabelEvents: typeof Resources.MergeRequestLabelEvents;
|
|
89
|
+
declare const MergeRequestMilestoneEvents: typeof Resources.MergeRequestMilestoneEvents;
|
|
90
|
+
declare const MergeRequestDraftNotes: typeof Resources.MergeRequestDraftNotes;
|
|
91
|
+
declare const MergeRequestNotes: typeof Resources.MergeRequestNotes;
|
|
92
|
+
declare const MergeRequestNoteAwardEmojis: typeof Resources.MergeRequestNoteAwardEmojis;
|
|
93
|
+
declare const MergeRequests: typeof Resources.MergeRequests;
|
|
94
|
+
declare const MergeTrains: typeof Resources.MergeTrains;
|
|
95
|
+
declare const PackageRegistry: typeof Resources.PackageRegistry;
|
|
96
|
+
declare const Packages: typeof Resources.Packages;
|
|
97
|
+
declare const PagesDomains: typeof Resources.PagesDomains;
|
|
98
|
+
declare const Pipelines: typeof Resources.Pipelines;
|
|
99
|
+
declare const PipelineSchedules: typeof Resources.PipelineSchedules;
|
|
100
|
+
declare const PipelineScheduleVariables: typeof Resources.PipelineScheduleVariables;
|
|
101
|
+
declare const PipelineTriggerTokens: typeof Resources.PipelineTriggerTokens;
|
|
102
|
+
declare const ProductAnalytics: typeof Resources.ProductAnalytics;
|
|
103
|
+
declare const ProjectAccessRequests: typeof Resources.ProjectAccessRequests;
|
|
104
|
+
declare const ProjectAccessTokens: typeof Resources.ProjectAccessTokens;
|
|
105
|
+
declare const ProjectAliases: typeof Resources.ProjectAliases;
|
|
106
|
+
declare const ProjectBadges: typeof Resources.ProjectBadges;
|
|
107
|
+
declare const ProjectCustomAttributes: typeof Resources.ProjectCustomAttributes;
|
|
108
|
+
declare const ProjectDORA4Metrics: typeof Resources.ProjectDORA4Metrics;
|
|
109
|
+
declare const ProjectHooks: typeof Resources.ProjectHooks;
|
|
110
|
+
declare const ProjectImportExports: typeof Resources.ProjectImportExports;
|
|
111
|
+
declare const ProjectInvitations: typeof Resources.ProjectInvitations;
|
|
112
|
+
declare const ProjectIssueBoards: typeof Resources.ProjectIssueBoards;
|
|
113
|
+
declare const ProjectIterations: typeof Resources.ProjectIterations;
|
|
114
|
+
declare const ProjectLabels: typeof Resources.ProjectLabels;
|
|
115
|
+
declare const ProjectMembers: typeof Resources.ProjectMembers;
|
|
116
|
+
declare const ProjectMilestones: typeof Resources.ProjectMilestones;
|
|
117
|
+
declare const ProjectProtectedEnvironments: typeof Resources.ProjectProtectedEnvironments;
|
|
118
|
+
declare const ProjectPushRules: typeof Resources.ProjectPushRules;
|
|
119
|
+
declare const ProjectRelationsExport: typeof Resources.ProjectRelationsExport;
|
|
120
|
+
declare const ProjectReleases: typeof Resources.ProjectReleases;
|
|
121
|
+
declare const ProjectRemoteMirrors: typeof Resources.ProjectRemoteMirrors;
|
|
122
|
+
declare const ProjectRepositoryStorageMoves: typeof Resources.ProjectRepositoryStorageMoves;
|
|
123
|
+
declare const Projects: typeof Resources.Projects;
|
|
124
|
+
declare const ProjectSnippetAwardEmojis: typeof Resources.ProjectSnippetAwardEmojis;
|
|
125
|
+
declare const ProjectSnippetDiscussions: typeof Resources.ProjectSnippetDiscussions;
|
|
126
|
+
declare const ProjectSnippetNotes: typeof Resources.ProjectSnippetNotes;
|
|
127
|
+
declare const ProjectSnippets: typeof Resources.ProjectSnippets;
|
|
128
|
+
declare const ProjectStatistics: typeof Resources.ProjectStatistics;
|
|
129
|
+
declare const ProjectTemplates: typeof Resources.ProjectTemplates;
|
|
130
|
+
declare const ProjectVariables: typeof Resources.ProjectVariables;
|
|
131
|
+
declare const ProjectVulnerabilities: typeof Resources.ProjectVulnerabilities;
|
|
132
|
+
declare const ProjectWikis: typeof Resources.ProjectWikis;
|
|
133
|
+
declare const ProtectedBranches: typeof Resources.ProtectedBranches;
|
|
134
|
+
declare const ProtectedTags: typeof Resources.ProtectedTags;
|
|
135
|
+
declare const ReleaseLinks: typeof Resources.ReleaseLinks;
|
|
136
|
+
declare const Repositories: typeof Resources.Repositories;
|
|
137
|
+
declare const RepositoryFiles: typeof Resources.RepositoryFiles;
|
|
138
|
+
declare const RepositorySubmodules: typeof Resources.RepositorySubmodules;
|
|
139
|
+
declare const ResourceGroups: typeof Resources.ResourceGroups;
|
|
140
|
+
declare const Runners: typeof Resources.Runners;
|
|
141
|
+
declare const SecureFiles: typeof Resources.SecureFiles;
|
|
142
|
+
declare const Tags: typeof Resources.Tags;
|
|
143
|
+
declare const UserStarredMetricsDashboard: typeof Resources.UserStarredMetricsDashboard;
|
|
144
|
+
declare const EpicAwardEmojis: typeof Resources.EpicAwardEmojis;
|
|
145
|
+
declare const EpicDiscussions: typeof Resources.EpicDiscussions;
|
|
146
|
+
declare const EpicIssues: typeof Resources.EpicIssues;
|
|
147
|
+
declare const EpicLabelEvents: typeof Resources.EpicLabelEvents;
|
|
148
|
+
declare const EpicLinks: typeof Resources.EpicLinks;
|
|
149
|
+
declare const EpicNotes: typeof Resources.EpicNotes;
|
|
150
|
+
declare const Epics: typeof Resources.Epics;
|
|
151
|
+
declare const GroupAccessRequests: typeof Resources.GroupAccessRequests;
|
|
152
|
+
declare const GroupAccessTokens: typeof Resources.GroupAccessTokens;
|
|
153
|
+
declare const GroupActivityAnalytics: typeof Resources.GroupActivityAnalytics;
|
|
154
|
+
declare const GroupBadges: typeof Resources.GroupBadges;
|
|
155
|
+
declare const GroupCustomAttributes: typeof Resources.GroupCustomAttributes;
|
|
156
|
+
declare const GroupDORA4Metrics: typeof Resources.GroupDORA4Metrics;
|
|
157
|
+
declare const GroupHooks: typeof Resources.GroupHooks;
|
|
158
|
+
declare const GroupImportExports: typeof Resources.GroupImportExports;
|
|
159
|
+
declare const GroupInvitations: typeof Resources.GroupInvitations;
|
|
160
|
+
declare const GroupIssueBoards: typeof Resources.GroupIssueBoards;
|
|
161
|
+
declare const GroupIterations: typeof Resources.GroupIterations;
|
|
162
|
+
declare const GroupLabels: typeof Resources.GroupLabels;
|
|
163
|
+
declare const GroupLDAPLinks: typeof Resources.GroupLDAPLinks;
|
|
164
|
+
declare const GroupMembers: typeof Resources.GroupMembers;
|
|
165
|
+
declare const GroupMemberRoles: typeof Resources.GroupMemberRoles;
|
|
166
|
+
declare const GroupMilestones: typeof Resources.GroupMilestones;
|
|
167
|
+
declare const GroupProtectedEnvironments: typeof Resources.GroupProtectedEnvironments;
|
|
168
|
+
declare const GroupPushRules: typeof Resources.GroupPushRules;
|
|
169
|
+
declare const GroupRelationExports: typeof Resources.GroupRelationExports;
|
|
170
|
+
declare const GroupReleases: typeof Resources.GroupReleases;
|
|
171
|
+
declare const GroupRepositoryStorageMoves: typeof Resources.GroupRepositoryStorageMoves;
|
|
172
|
+
declare const Groups: typeof Resources.Groups;
|
|
173
|
+
declare const GroupSAMLIdentities: typeof Resources.GroupSAMLIdentities;
|
|
174
|
+
declare const GroupSCIMIdentities: typeof Resources.GroupSCIMIdentities;
|
|
175
|
+
declare const GroupVariables: typeof Resources.GroupVariables;
|
|
176
|
+
declare const GroupWikis: typeof Resources.GroupWikis;
|
|
177
|
+
declare const LinkedEpics: typeof Resources.LinkedEpics;
|
|
178
|
+
declare const UserCustomAttributes: typeof Resources.UserCustomAttributes;
|
|
179
|
+
declare const UserEmails: typeof Resources.UserEmails;
|
|
180
|
+
declare const UserGPGKeys: typeof Resources.UserGPGKeys;
|
|
181
|
+
declare const UserImpersonationTokens: typeof Resources.UserImpersonationTokens;
|
|
182
|
+
declare const Users: typeof Resources.Users;
|
|
183
|
+
declare const UserSSHKeys: typeof Resources.UserSSHKeys;
|
|
184
|
+
declare const Gitlab: typeof Resources.Gitlab;
|
|
185
|
+
|
|
186
|
+
export { Agents, AlertManagement, ApplicationAppearance, ApplicationPlanLimits, ApplicationSettings, ApplicationStatistics, Applications, AuditEvents, Avatar, Branches, BroadcastMessages, CommitDiscussions, Commits, Composer, Conan, ContainerRegistry, DashboardAnnotations, Debian, DependencyProxy, DeployKeys, DeployTokens, Deployments, DockerfileTemplates, Environments, EpicAwardEmojis, EpicDiscussions, EpicIssues, EpicLabelEvents, EpicLinks, EpicNotes, Epics, ErrorTrackingClientKeys, ErrorTrackingSettings, Events, Experiments, ExternalStatusChecks, FeatureFlagUserLists, FeatureFlags, FreezePeriods, GeoNodes, GitLabCIYMLTemplates, GitignoreTemplates, Gitlab, GitlabPages, GoProxy, GroupAccessRequests, GroupAccessTokens, GroupActivityAnalytics, GroupBadges, GroupCustomAttributes, GroupDORA4Metrics, GroupHooks, GroupImportExports, GroupInvitations, GroupIssueBoards, GroupIterations, GroupLDAPLinks, GroupLabels, GroupMemberRoles, GroupMembers, GroupMilestones, GroupProtectedEnvironments, GroupPushRules, GroupRelationExports, GroupReleases, GroupRepositoryStorageMoves, GroupSAMLIdentities, GroupSCIMIdentities, GroupVariables, GroupWikis, Groups, Helm, Import, InstanceLevelCICDVariables, Integrations, IssueAwardEmojis, IssueDiscussions, IssueIterationEvents, IssueLabelEvents, IssueLinks, IssueMilestoneEvents, IssueNoteAwardEmojis, IssueNotes, IssueStateEvents, IssueWeightEvents, Issues, IssuesStatistics, JobArtifacts, Jobs, Keys, License, LicenseTemplates, LinkedEpics, Lint, Markdown, Maven, MergeRequestApprovals, MergeRequestAwardEmojis, MergeRequestContextCommits, MergeRequestDiscussions, MergeRequestDraftNotes, MergeRequestLabelEvents, MergeRequestMilestoneEvents, MergeRequestNoteAwardEmojis, MergeRequestNotes, MergeRequests, MergeTrains, Metadata, Migrations, NPM, Namespaces, NotificationSettings, NuGet, PackageRegistry, Packages, PagesDomains, PersonalAccessTokens, PipelineScheduleVariables, PipelineSchedules, PipelineTriggerTokens, Pipelines, ProductAnalytics, ProjectAccessRequests, ProjectAccessTokens, ProjectAliases, ProjectBadges, ProjectCustomAttributes, ProjectDORA4Metrics, ProjectHooks, ProjectImportExports, ProjectInvitations, ProjectIssueBoards, ProjectIterations, ProjectLabels, ProjectMembers, ProjectMilestones, ProjectProtectedEnvironments, ProjectPushRules, ProjectRelationsExport, ProjectReleases, ProjectRemoteMirrors, ProjectRepositoryStorageMoves, ProjectSnippetAwardEmojis, ProjectSnippetDiscussions, ProjectSnippetNotes, ProjectSnippets, ProjectStatistics, ProjectTemplates, ProjectVariables, ProjectVulnerabilities, ProjectWikis, Projects, ProtectedBranches, ProtectedTags, PyPI, ReleaseLinks, Repositories, RepositoryFiles, RepositorySubmodules, ResourceGroups, RubyGems, Runners, Search, SecureFiles, ServiceData, SidekiqMetrics, SidekiqQueues, SnippetRepositoryStorageMoves, Snippets, Suggestions, SystemHooks, Tags, TodoLists, Topics, UserCustomAttributes, UserEmails, UserGPGKeys, UserImpersonationTokens, UserSSHKeys, UserStarredMetricsDashboard, Users };
|
package/dist/index.js
CHANGED
|
@@ -65,7 +65,7 @@ async function parseResponse(response, asStream = false) {
|
|
|
65
65
|
}
|
|
66
66
|
return { body, headers, status };
|
|
67
67
|
}
|
|
68
|
-
async function throwFailedRequestError(response) {
|
|
68
|
+
async function throwFailedRequestError(request, response) {
|
|
69
69
|
const content = await response.text();
|
|
70
70
|
const contentType = response.headers.get("Content-Type");
|
|
71
71
|
let description = "API Request Error";
|
|
@@ -78,6 +78,7 @@ async function throwFailedRequestError(response) {
|
|
|
78
78
|
throw new Error(response.statusText, {
|
|
79
79
|
cause: {
|
|
80
80
|
description,
|
|
81
|
+
request,
|
|
81
82
|
response
|
|
82
83
|
}
|
|
83
84
|
});
|
|
@@ -98,7 +99,8 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
98
99
|
url.search = searchParams || "";
|
|
99
100
|
const mode = getConditionalMode(endpoint);
|
|
100
101
|
for (let i = 0; i < maxRetries; i += 1) {
|
|
101
|
-
const
|
|
102
|
+
const request = new Request(url, { ...opts, mode });
|
|
103
|
+
const response = await fetch(request).catch((e) => {
|
|
102
104
|
if (e.name === "TimeoutError" || e.name === "AbortError") {
|
|
103
105
|
throw new Error("Query timeout was reached");
|
|
104
106
|
}
|
|
@@ -107,11 +109,13 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
107
109
|
if (response.ok)
|
|
108
110
|
return parseResponse(response, asStream);
|
|
109
111
|
if (!retryCodes.includes(response.status))
|
|
110
|
-
await throwFailedRequestError(response);
|
|
111
|
-
await delay(2 ** i * 0.
|
|
112
|
+
await throwFailedRequestError(request, response);
|
|
113
|
+
await delay(2 ** i * 0.25);
|
|
112
114
|
continue;
|
|
113
115
|
}
|
|
114
|
-
throw new Error(
|
|
116
|
+
throw new Error(
|
|
117
|
+
`Could not successfully complete this request due to Error 429. Check the applicable rate limits for this endpoint.`
|
|
118
|
+
);
|
|
115
119
|
}
|
|
116
120
|
var requesterFn = requesterUtils.createRequesterFn(defaultOptionsHandler, defaultRequestHandler);
|
|
117
121
|
|
package/dist/index.mjs
CHANGED
|
@@ -43,7 +43,7 @@ async function parseResponse(response, asStream = false) {
|
|
|
43
43
|
}
|
|
44
44
|
return { body, headers, status };
|
|
45
45
|
}
|
|
46
|
-
async function throwFailedRequestError(response) {
|
|
46
|
+
async function throwFailedRequestError(request, response) {
|
|
47
47
|
const content = await response.text();
|
|
48
48
|
const contentType = response.headers.get("Content-Type");
|
|
49
49
|
let description = "API Request Error";
|
|
@@ -56,6 +56,7 @@ async function throwFailedRequestError(response) {
|
|
|
56
56
|
throw new Error(response.statusText, {
|
|
57
57
|
cause: {
|
|
58
58
|
description,
|
|
59
|
+
request,
|
|
59
60
|
response
|
|
60
61
|
}
|
|
61
62
|
});
|
|
@@ -76,7 +77,8 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
76
77
|
url.search = searchParams || "";
|
|
77
78
|
const mode = getConditionalMode(endpoint);
|
|
78
79
|
for (let i = 0; i < maxRetries; i += 1) {
|
|
79
|
-
const
|
|
80
|
+
const request = new Request(url, { ...opts, mode });
|
|
81
|
+
const response = await fetch(request).catch((e) => {
|
|
80
82
|
if (e.name === "TimeoutError" || e.name === "AbortError") {
|
|
81
83
|
throw new Error("Query timeout was reached");
|
|
82
84
|
}
|
|
@@ -85,11 +87,13 @@ async function defaultRequestHandler(endpoint, options) {
|
|
|
85
87
|
if (response.ok)
|
|
86
88
|
return parseResponse(response, asStream);
|
|
87
89
|
if (!retryCodes.includes(response.status))
|
|
88
|
-
await throwFailedRequestError(response);
|
|
89
|
-
await delay(2 ** i * 0.
|
|
90
|
+
await throwFailedRequestError(request, response);
|
|
91
|
+
await delay(2 ** i * 0.25);
|
|
90
92
|
continue;
|
|
91
93
|
}
|
|
92
|
-
throw new Error(
|
|
94
|
+
throw new Error(
|
|
95
|
+
`Could not successfully complete this request due to Error 429. Check the applicable rate limits for this endpoint.`
|
|
96
|
+
);
|
|
93
97
|
}
|
|
94
98
|
var requesterFn = createRequesterFn(defaultOptionsHandler, defaultRequestHandler);
|
|
95
99
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitbeaker/rest",
|
|
3
|
-
"version": "39.
|
|
3
|
+
"version": "39.2.0",
|
|
4
4
|
"description": "Cross Platform implementation of the GitLab API",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -56,15 +56,14 @@
|
|
|
56
56
|
"release": "auto shipit"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@gitbeaker/core": "^39.
|
|
60
|
-
"@gitbeaker/requester-utils": "^39.
|
|
59
|
+
"@gitbeaker/core": "^39.2.0",
|
|
60
|
+
"@gitbeaker/requester-utils": "^39.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@playwright/test": "^1.
|
|
64
|
-
"@types/node": "^20.
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"typescript": "^5.0.4"
|
|
63
|
+
"@playwright/test": "^1.35.1",
|
|
64
|
+
"@types/node": "^20.3.1",
|
|
65
|
+
"tsup": "^7.1.0",
|
|
66
|
+
"typescript": "^5.1.3"
|
|
68
67
|
},
|
|
69
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "d7a872816145eacdac3773821b4640e60bb38db7"
|
|
70
69
|
}
|