@gitbeaker/requester-utils 39.29.0 → 39.30.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 +107 -115
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +17 -10
- package/dist/index.mjs +16 -10
- package/package.json +13 -8
package/README.md
CHANGED
|
@@ -104,121 +104,113 @@ import { RequesterUtils, BaseResource } from '@gitbeaker/requester-utils';
|
|
|
104
104
|
<!-- markdownlint-disable -->
|
|
105
105
|
<p>
|
|
106
106
|
<tr>
|
|
107
|
-
<td align="center" valign="top" width="
|
|
108
|
-
<td align="center" valign="top" width="
|
|
109
|
-
<td align="center" valign="top" width="
|
|
110
|
-
<td align="center" valign="top" width="
|
|
111
|
-
<td align="center" valign="top" width="
|
|
112
|
-
<td align="center" valign="top" width="
|
|
113
|
-
<td align="center" valign="top" width="
|
|
114
|
-
<td align="center" valign="top" width="
|
|
115
|
-
<td align="center" valign="top" width="
|
|
116
|
-
<td align="center" valign="top" width="
|
|
117
|
-
<td align="center" valign="top" width="
|
|
118
|
-
<td align="center" valign="top" width="
|
|
119
|
-
<td align="center" valign="top" width="
|
|
120
|
-
<td align="center" valign="top" width="
|
|
121
|
-
<td align="center" valign="top" width="
|
|
122
|
-
<td align="center" valign="top" width="
|
|
123
|
-
<td align="center" valign="top" width="
|
|
124
|
-
<td align="center" valign="top" width="
|
|
125
|
-
<td align="center" valign="top" width="
|
|
126
|
-
<td align="center" valign="top" width="
|
|
127
|
-
<td align="center" valign="top" width="
|
|
128
|
-
<td align="center" valign="top" width="
|
|
129
|
-
<td align="center" valign="top" width="
|
|
130
|
-
<td align="center" valign="top" width="
|
|
131
|
-
<td align="center" valign="top" width="
|
|
132
|
-
<td align="center" valign="top" width="
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
<td align="center" valign="top" width="
|
|
136
|
-
<td align="center" valign="top" width="
|
|
137
|
-
<td align="center" valign="top" width="
|
|
138
|
-
<td align="center" valign="top" width="
|
|
139
|
-
<td align="center" valign="top" width="
|
|
140
|
-
<td align="center" valign="top" width="
|
|
141
|
-
<td align="center" valign="top" width="
|
|
142
|
-
<td align="center" valign="top" width="
|
|
143
|
-
<td align="center" valign="top" width="
|
|
144
|
-
<td align="center" valign="top" width="
|
|
145
|
-
<td align="center" valign="top" width="
|
|
146
|
-
<td align="center" valign="top" width="
|
|
147
|
-
<td align="center" valign="top" width="
|
|
148
|
-
<td align="center" valign="top" width="
|
|
149
|
-
<td align="center" valign="top" width="
|
|
150
|
-
<td align="center" valign="top" width="
|
|
151
|
-
<td align="center" valign="top" width="
|
|
152
|
-
<td align="center" valign="top" width="
|
|
153
|
-
<td align="center" valign="top" width="
|
|
154
|
-
<td align="center" valign="top" width="
|
|
155
|
-
<td align="center" valign="top" width="
|
|
156
|
-
<td align="center" valign="top" width="
|
|
157
|
-
<td align="center" valign="top" width="
|
|
158
|
-
<td align="center" valign="top" width="
|
|
159
|
-
<td align="center" valign="top" width="
|
|
160
|
-
<td align="center" valign="top" width="
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<td align="center" valign="top" width="
|
|
164
|
-
<td align="center" valign="top" width="
|
|
165
|
-
<td align="center" valign="top" width="
|
|
166
|
-
<td align="center" valign="top" width="
|
|
167
|
-
<td align="center" valign="top" width="
|
|
168
|
-
<td align="center" valign="top" width="
|
|
169
|
-
<td align="center" valign="top" width="
|
|
170
|
-
<td align="center" valign="top" width="
|
|
171
|
-
<td align="center" valign="top" width="
|
|
172
|
-
<td align="center" valign="top" width="
|
|
173
|
-
<td align="center" valign="top" width="
|
|
174
|
-
<td align="center" valign="top" width="
|
|
175
|
-
<td align="center" valign="top" width="
|
|
176
|
-
<td align="center" valign="top" width="
|
|
177
|
-
<td align="center" valign="top" width="
|
|
178
|
-
<td align="center" valign="top" width="
|
|
179
|
-
<td align="center" valign="top" width="
|
|
180
|
-
<td align="center" valign="top" width="
|
|
181
|
-
<td align="center" valign="top" width="
|
|
182
|
-
<td align="center" valign="top" width="
|
|
183
|
-
<td align="center" valign="top" width="
|
|
184
|
-
<td align="center" valign="top" width="
|
|
185
|
-
<td align="center" valign="top" width="
|
|
186
|
-
<td align="center" valign="top" width="
|
|
187
|
-
<td align="center" valign="top" width="
|
|
188
|
-
<td align="center" valign="top" width="
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<td align="center" valign="top" width="
|
|
192
|
-
<td align="center" valign="top" width="
|
|
193
|
-
<td align="center" valign="top" width="
|
|
194
|
-
<td align="center" valign="top" width="
|
|
195
|
-
<td align="center" valign="top" width="
|
|
196
|
-
<td align="center" valign="top" width="
|
|
197
|
-
<td align="center" valign="top" width="
|
|
198
|
-
<td align="center" valign="top" width="
|
|
199
|
-
<td align="center" valign="top" width="
|
|
200
|
-
<td align="center" valign="top" width="
|
|
201
|
-
<td align="center" valign="top" width="
|
|
202
|
-
<td align="center" valign="top" width="
|
|
203
|
-
<td align="center" valign="top" width="
|
|
204
|
-
<td align="center" valign="top" width="
|
|
205
|
-
<td align="center" valign="top" width="
|
|
206
|
-
<td align="center" valign="top" width="
|
|
207
|
-
<td align="center" valign="top" width="
|
|
208
|
-
<td align="center" valign="top" width="
|
|
209
|
-
<td align="center" valign="top" width="
|
|
210
|
-
<td align="center" valign="top" width="
|
|
211
|
-
<td align="center" valign="top" width="
|
|
212
|
-
<td align="center" valign="top" width="
|
|
213
|
-
<td align="center" valign="top" width="
|
|
214
|
-
<td align="center" valign="top" width="3.84%"><a href="https://github.com/Artemoire"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/18062266?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="artemoire"/></td>
|
|
215
|
-
<td align="center" valign="top" width="3.84%"><a href="https://github.com/pataar"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/3403851?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Pieter Willekens"/></td>
|
|
216
|
-
<td align="center" valign="top" width="3.84%"><a href="https://github.com/Djcd"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/761764?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="David Claybourne"/></td>
|
|
217
|
-
</tr><br />
|
|
218
|
-
<tr>
|
|
219
|
-
<td align="center" valign="top" width="3.84%"><a href="https://github.com/domharrington"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/848223?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Dom Harrington"/></td>
|
|
220
|
-
<td align="center" valign="top" width="3.84%"><a href="https://github.com/kseino"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1378066?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Kohei Seino"/></td>
|
|
221
|
-
<td align="center" valign="top" width="3.84%"><a href="https://www.1stg.me/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8336744?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="JounQin"/></td>
|
|
107
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/jdalrymple"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/3743662?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Justin Dalrymple"/></td>
|
|
108
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/dylandesrosier"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/13701258?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Dylan DesRosier"/></td>
|
|
109
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/mikew"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4729?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Mike Wyatt"/></td>
|
|
110
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/coryzibell"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7986014?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Cory Zibeill"/></td>
|
|
111
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/shadygrove"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5209850?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Bour"/></td>
|
|
112
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/akira345"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/655764?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="akira345"/></td>
|
|
113
|
+
<td align="center" valign="top" width="0.33%"><a href="https://birukov.me"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/1861546?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Pavel Birukov "/></td>
|
|
114
|
+
<td align="center" valign="top" width="0.33%"><a href="http://jetersen.dev"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/1661688?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Joseph Petersen"/></td>
|
|
115
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Musinux"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/563373?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Louis Cherel"/></td>
|
|
116
|
+
<td align="center" valign="top" width="0.33%"><a href="http://www.arsdehnel.net"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/1697162?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Adam Dehnel"/></td>
|
|
117
|
+
<td align="center" valign="top" width="0.33%"><a href="http://www.haus.gg/"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/226640?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Ev Haus"/></td>
|
|
118
|
+
<td align="center" valign="top" width="0.33%"><a href="http://iGLOO.be"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/900947?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Loïc Mahieu"/></td>
|
|
119
|
+
<td align="center" valign="top" width="0.33%"><a href="http://www.giuseppeangri.com"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/9075163?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Giuseppe Angri"/></td>
|
|
120
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/jennparise"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/4134086?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="jennparise"/></td>
|
|
121
|
+
<td align="center" valign="top" width="0.33%"><a href="http://obartra.github.io"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/3877773?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Oscar"/></td>
|
|
122
|
+
<td align="center" valign="top" width="0.33%"><a href="https://daniel-ruf.de"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/827205?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Daniel Ruf"/></td>
|
|
123
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/schindld"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/1659632?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="schindld"/></td>
|
|
124
|
+
<td align="center" valign="top" width="0.33%"><a href="https://alvarobg.com"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/12004383?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Alvaro"/></td>
|
|
125
|
+
<td align="center" valign="top" width="0.33%"><a href="http://northhorizon.net"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/616152?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Daniel Moore"/></td>
|
|
126
|
+
<td align="center" valign="top" width="0.33%"><a href="https://dylanmtaylor.com"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/277927?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Dylan M. Taylor"/></td>
|
|
127
|
+
<td align="center" valign="top" width="0.33%"><a href="https://pixelswap.fr/"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/4266283?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Corentin Mors"/></td>
|
|
128
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/xatavian"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/17217965?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="xatavian"/></td>
|
|
129
|
+
<td align="center" valign="top" width="0.33%"><a href="https://stackoverflow.com/story/yepninja"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/11796206?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Yevgeny Petukhov"/></td>
|
|
130
|
+
<td align="center" valign="top" width="0.33%"><a href="https://about.me/mickaeltr"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/378910?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Mickaël Tricot"/></td>
|
|
131
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/andreasciamanna"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/181780?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Andrea"/></td>
|
|
132
|
+
<td align="center" valign="top" width="0.33%"><a href="http://www.ircad.fr/"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/8638653?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Flavien Bridault"/></td>
|
|
133
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/s-kazuki"><img src="https://images.weserv.nl/?url=https://avatars2.githubusercontent.com/u/9253374?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="s-kazuki"/></td>
|
|
134
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/kiprasmel"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/29430509?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Kipras Melnikovas"/></td>
|
|
135
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Gkxie"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/27680715?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="xieyu"/></td>
|
|
136
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/st1gok"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/13641693?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="st1gok"/></td>
|
|
137
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/max-wittig"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/6639323?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Max Wittig"/></td>
|
|
138
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/nlochschmidt"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/759624?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Niklas Lochschmidt"/></td>
|
|
139
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/illyaMs"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/26578665?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Ilya Dus"/></td>
|
|
140
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/wamry"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/32439651?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Omar Awamry"/></td>
|
|
141
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Sumragen"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/15640910?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Hennadii Varava"/></td>
|
|
142
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/xiezht"><img src="https://images.weserv.nl/?url=https://avatars1.githubusercontent.com/u/18051618?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="xiezht"/></td>
|
|
143
|
+
<td align="center" valign="top" width="0.33%"><a href="http://www.martin-helmich.de/en"><img src="https://images.weserv.nl/?url=https://avatars3.githubusercontent.com/u/2538958?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Helmich"/></td>
|
|
144
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/smcgivern"><img src="https://images.weserv.nl/?url=https://avatars0.githubusercontent.com/u/1120328?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Sean McGivern"/></td>
|
|
145
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Vogel612"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7288995?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Clemens Lieb"/></td>
|
|
146
|
+
<td align="center" valign="top" width="0.33%"><a href="https://sajdl.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5222912?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Vojtěch Sajdl"/></td>
|
|
147
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/divido"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4614626?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="divido"/></td>
|
|
148
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/vboulaye"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/652767?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Vincent Boulaye"/></td>
|
|
149
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Aliyss"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/33941859?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Aliyss Snow"/></td>
|
|
150
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/saada"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1087987?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Mahmoud Saada"/></td>
|
|
151
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/F3n67u"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/12343178?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Feng Yu"/></td>
|
|
152
|
+
<td align="center" valign="top" width="0.33%"><a href="https://datatra.sh/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/173822?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Roy Jacobs"/></td>
|
|
153
|
+
<td align="center" valign="top" width="0.33%"><a href="http://www.paullemke.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/976010?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Paul Lemke"/></td>
|
|
154
|
+
<td align="center" valign="top" width="0.33%"><a href="http://jenko.me/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/131355?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Ian Jenkins"/></td>
|
|
155
|
+
<td align="center" valign="top" width="0.33%"><a href="https://www.nilennoct.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4055220?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="nilennoct"/></td>
|
|
156
|
+
<td align="center" valign="top" width="0.33%"><a href="http://michael.laffargue.fr/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/503129?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Laffargue Michael"/></td>
|
|
157
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/MartinHowarth"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7187425?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Howarth"/></td>
|
|
158
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/christophlehmann"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4953689?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Christoph Lehmann"/></td>
|
|
159
|
+
<td align="center" valign="top" width="0.33%"><a href="https://theopensourceu.org/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/253471?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Frank V"/></td>
|
|
160
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Salimlou"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/357286?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Salim Benabbou"/></td>
|
|
161
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/tvtamas"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1945260?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Tamás Török-Vistai"/></td>
|
|
162
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/MartinBenninger"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/20296116?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Benninger"/></td>
|
|
163
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/fewieden"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9334168?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="fewieden"/></td>
|
|
164
|
+
<td align="center" valign="top" width="0.33%"><a href="https://www.jeffpelton.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/36627?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Jeff Pelton"/></td>
|
|
165
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/claude-abounegm"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/11809881?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Claude Abounegm"/></td>
|
|
166
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Marethyu1"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/17978203?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Stefan Hall"/></td>
|
|
167
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Mr-Wallet"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/799000?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Jordan Wallet"/></td>
|
|
168
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/zhao0"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7556666?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="zhao0"/></td>
|
|
169
|
+
<td align="center" valign="top" width="0.33%"><a href="https://www.linkedin.com/in/joshuagrosso"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4530584?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Joshua Grosso"/></td>
|
|
170
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/yonguelink"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9469187?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Isaac Ouellet Therrien"/></td>
|
|
171
|
+
<td align="center" valign="top" width="0.33%"><a href="https://wearecws.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/24895138?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Rajat Sharma"/></td>
|
|
172
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Casz"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/65105345?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Cesar B."/></td>
|
|
173
|
+
<td align="center" valign="top" width="0.33%"><a href="https://blog.katsuba.dev/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/10637135?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Igor Katsuba"/></td>
|
|
174
|
+
<td align="center" valign="top" width="0.33%"><a href="http://www.doublespeakgames.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4884483?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Michael Townsend"/></td>
|
|
175
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/bodtx"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1039550?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="bodtx"/></td>
|
|
176
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/arthot"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1815294?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Artem"/></td>
|
|
177
|
+
<td align="center" valign="top" width="0.33%"><a href="https://muniftanjim.dev/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8050659?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Munif Tanjim"/></td>
|
|
178
|
+
<td align="center" valign="top" width="0.33%"><a href="https://www.qkdreyer.dev/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/717869?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Quentin Dreyer"/></td>
|
|
179
|
+
<td align="center" valign="top" width="0.33%"><a href="https://iwritethe.codes/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/192728?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Norm MacLennan"/></td>
|
|
180
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/jnovick"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/7881319?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="jnovick"/></td>
|
|
181
|
+
<td align="center" valign="top" width="0.33%"><a href="https://www.fabianaussems.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/57530?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Fabian Aussems"/></td>
|
|
182
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/mima0815"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/14311597?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Michael Matzka"/></td>
|
|
183
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/CraigAllardyce"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/9052289?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="CraigAllardyce"/></td>
|
|
184
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/brunobastosg"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/320122?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Bruno Guimarães"/></td>
|
|
185
|
+
<td align="center" valign="top" width="0.33%"><a href="http://leipert.io/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/2906107?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Lukas Eipert"/></td>
|
|
186
|
+
<td align="center" valign="top" width="0.33%"><a href="https://max.krauss.io/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/914671?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Maximilian Krauß"/></td>
|
|
187
|
+
<td align="center" valign="top" width="0.33%"><a href="https://eng.evolution.com/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/15799569?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Evolution Engineering"/></td>
|
|
188
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Neonox31"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1135958?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="WEBER Logan"/></td>
|
|
189
|
+
<td align="center" valign="top" width="0.33%"><a href="https://t.me/mister_cheater"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5055654?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Anton Zhukov"/></td>
|
|
190
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/beaverusiv"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/4149031?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Nicholas Loomans"/></td>
|
|
191
|
+
<td align="center" valign="top" width="0.33%"><a href="https://icedream.pw/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/807772?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Carl Kittelberger"/></td>
|
|
192
|
+
<td align="center" valign="top" width="0.33%"><a href="https://patrik.votocek.cz/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/112567?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Patrik Votoček"/></td>
|
|
193
|
+
<td align="center" valign="top" width="0.33%"><a href="https://kyr.github.io/CV/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/426462?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Kyrylo Fedorov"/></td>
|
|
194
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/claudio-vellage"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/28930612?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Claudio Vellage"/></td>
|
|
195
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/seb0uil"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/5122626?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Seb0uil"/></td>
|
|
196
|
+
<td align="center" valign="top" width="0.33%"><a href="http://merorafael.info/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/3404989?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Rafael Mello"/></td>
|
|
197
|
+
<td align="center" valign="top" width="0.33%"><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>
|
|
198
|
+
<td align="center" valign="top" width="0.33%"><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>
|
|
199
|
+
<td align="center" valign="top" width="0.33%"><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>
|
|
200
|
+
<td align="center" valign="top" width="0.33%"><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>
|
|
201
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/ravewill"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/128541928?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Will"/></td>
|
|
202
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/ArnaudTA"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/33383276?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="ArnaudTA"/></td>
|
|
203
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/kouak"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/48335?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Benjamin Beret"/></td>
|
|
204
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/demedos"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/16702156?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Alessandro Diez"/></td>
|
|
205
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/artlist-scottambrose"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/124692101?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="artlist-scottambrose"/></td>
|
|
206
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/mercutiodesign"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1114120?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Martin Dreher"/></td>
|
|
207
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/glensc"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/199095?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Elan Ruusamäe"/></td>
|
|
208
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Artemoire"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/18062266?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="artemoire"/></td>
|
|
209
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/pataar"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/3403851?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Pieter Willekens"/></td>
|
|
210
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/Djcd"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/761764?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="David Claybourne"/></td>
|
|
211
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/domharrington"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/848223?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Dom Harrington"/></td>
|
|
212
|
+
<td align="center" valign="top" width="0.33%"><a href="https://github.com/kseino"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/1378066?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="Kohei Seino"/></td>
|
|
213
|
+
<td align="center" valign="top" width="0.33%"><a href="https://www.1stg.me/"><img src="https://images.weserv.nl/?url=https://avatars.githubusercontent.com/u/8336744?v=4&h=25&w=25&fit=cover&mask=circle&maxage=7d" alt="JounQin"/></td>
|
|
222
214
|
</tr>
|
|
223
215
|
</p>
|
|
224
216
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
type RateLimiters = Record<string, ReturnType<typeof RateLimit> | {
|
|
1
|
+
type RateLimiterFn = () => Promise<number>;
|
|
2
|
+
type RateLimiters = Record<string, RateLimiterFn | {
|
|
4
3
|
method: string;
|
|
5
|
-
limit:
|
|
4
|
+
limit: RateLimiterFn;
|
|
6
5
|
}>;
|
|
7
6
|
type RateLimitOptions = Record<string, number | {
|
|
8
7
|
method: string;
|
|
@@ -45,7 +44,7 @@ type RequestOptions = {
|
|
|
45
44
|
body?: string | FormData;
|
|
46
45
|
asStream?: boolean;
|
|
47
46
|
signal?: AbortSignal;
|
|
48
|
-
rateLimiters?: Record<string,
|
|
47
|
+
rateLimiters?: Record<string, RateLimiterFn>;
|
|
49
48
|
};
|
|
50
49
|
interface RequesterType {
|
|
51
50
|
get<T extends ResponseBodyTypes>(endpoint: string, options?: DefaultRequestOptions): Promise<FormattedResponse<T>>;
|
|
@@ -55,13 +54,14 @@ interface RequesterType {
|
|
|
55
54
|
delete<T extends ResponseBodyTypes>(endpoint: string, options?: DefaultRequestOptions): Promise<FormattedResponse<T>>;
|
|
56
55
|
}
|
|
57
56
|
type RequestHandlerFn<T extends ResponseBodyTypes = ResponseBodyTypes> = (endpoint: string, options?: Record<string, unknown>) => Promise<FormattedResponse<T>>;
|
|
57
|
+
declare function generateRateLimiterFn(limit: number, interval: number): () => Promise<number>;
|
|
58
58
|
declare function formatQuery(params?: Record<string, unknown>): string;
|
|
59
59
|
type OptionsHandlerFn = (serviceOptions: ResourceOptions, requestOptions: RequestOptions) => Promise<RequestOptions>;
|
|
60
60
|
declare function defaultOptionsHandler(resourceOptions: ResourceOptions, { body, searchParams, sudo, signal, asStream, method, }?: DefaultRequestOptions): Promise<RequestOptions>;
|
|
61
61
|
declare function createRateLimiters(rateLimitOptions?: RateLimitOptions): RateLimiters;
|
|
62
62
|
declare function createRequesterFn(optionsHandler: OptionsHandlerFn, requestHandler: RequestHandlerFn): (serviceOptions: ResourceOptions) => RequesterType;
|
|
63
63
|
declare function presetResourceArguments<T extends Record<string, Constructable>>(resources: T, customConfig?: Record<string, unknown>): T;
|
|
64
|
-
declare function getMatchingRateLimiter(endpoint: string, rateLimiters?: RateLimiters, method?: string):
|
|
64
|
+
declare function getMatchingRateLimiter(endpoint: string, rateLimiters?: RateLimiters, method?: string): RateLimiterFn;
|
|
65
65
|
|
|
66
66
|
interface RootResourceOptions<C> {
|
|
67
67
|
requesterFn?: (resourceOptions: ResourceOptions) => RequesterType;
|
|
@@ -117,4 +117,4 @@ declare class GitbeakerRetryError extends Error {
|
|
|
117
117
|
constructor(message: string);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
export { type BaseRequestOptionsWithAccessToken, type BaseRequestOptionsWithJobToken, type BaseRequestOptionsWithOAuthToken, BaseResource, type BaseResourceOptions, type Constructable, type DefaultRequestOptions, type FormattedResponse, GitbeakerRequestError, GitbeakerRetryError, GitbeakerTimeoutError, type GitlabToken, type OptionsHandlerFn, type RateLimitOptions, type RateLimiters, type RequestHandlerFn, type RequestOptions, type RequesterType, type ResourceOptions, type ResponseBodyTypes, type RootResourceOptions, createRateLimiters, createRequesterFn, defaultOptionsHandler, formatQuery, getMatchingRateLimiter, presetResourceArguments };
|
|
120
|
+
export { type BaseRequestOptionsWithAccessToken, type BaseRequestOptionsWithJobToken, type BaseRequestOptionsWithOAuthToken, BaseResource, type BaseResourceOptions, type Constructable, type DefaultRequestOptions, type FormattedResponse, GitbeakerRequestError, GitbeakerRetryError, GitbeakerTimeoutError, type GitlabToken, type OptionsHandlerFn, type RateLimitOptions, type RateLimiterFn, type RateLimiters, type RequestHandlerFn, type RequestOptions, type RequesterType, type ResourceOptions, type ResponseBodyTypes, type RootResourceOptions, createRateLimiters, createRequesterFn, defaultOptionsHandler, formatQuery, generateRateLimiterFn, getMatchingRateLimiter, presetResourceArguments };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
type RateLimiters = Record<string, ReturnType<typeof RateLimit> | {
|
|
1
|
+
type RateLimiterFn = () => Promise<number>;
|
|
2
|
+
type RateLimiters = Record<string, RateLimiterFn | {
|
|
4
3
|
method: string;
|
|
5
|
-
limit:
|
|
4
|
+
limit: RateLimiterFn;
|
|
6
5
|
}>;
|
|
7
6
|
type RateLimitOptions = Record<string, number | {
|
|
8
7
|
method: string;
|
|
@@ -45,7 +44,7 @@ type RequestOptions = {
|
|
|
45
44
|
body?: string | FormData;
|
|
46
45
|
asStream?: boolean;
|
|
47
46
|
signal?: AbortSignal;
|
|
48
|
-
rateLimiters?: Record<string,
|
|
47
|
+
rateLimiters?: Record<string, RateLimiterFn>;
|
|
49
48
|
};
|
|
50
49
|
interface RequesterType {
|
|
51
50
|
get<T extends ResponseBodyTypes>(endpoint: string, options?: DefaultRequestOptions): Promise<FormattedResponse<T>>;
|
|
@@ -55,13 +54,14 @@ interface RequesterType {
|
|
|
55
54
|
delete<T extends ResponseBodyTypes>(endpoint: string, options?: DefaultRequestOptions): Promise<FormattedResponse<T>>;
|
|
56
55
|
}
|
|
57
56
|
type RequestHandlerFn<T extends ResponseBodyTypes = ResponseBodyTypes> = (endpoint: string, options?: Record<string, unknown>) => Promise<FormattedResponse<T>>;
|
|
57
|
+
declare function generateRateLimiterFn(limit: number, interval: number): () => Promise<number>;
|
|
58
58
|
declare function formatQuery(params?: Record<string, unknown>): string;
|
|
59
59
|
type OptionsHandlerFn = (serviceOptions: ResourceOptions, requestOptions: RequestOptions) => Promise<RequestOptions>;
|
|
60
60
|
declare function defaultOptionsHandler(resourceOptions: ResourceOptions, { body, searchParams, sudo, signal, asStream, method, }?: DefaultRequestOptions): Promise<RequestOptions>;
|
|
61
61
|
declare function createRateLimiters(rateLimitOptions?: RateLimitOptions): RateLimiters;
|
|
62
62
|
declare function createRequesterFn(optionsHandler: OptionsHandlerFn, requestHandler: RequestHandlerFn): (serviceOptions: ResourceOptions) => RequesterType;
|
|
63
63
|
declare function presetResourceArguments<T extends Record<string, Constructable>>(resources: T, customConfig?: Record<string, unknown>): T;
|
|
64
|
-
declare function getMatchingRateLimiter(endpoint: string, rateLimiters?: RateLimiters, method?: string):
|
|
64
|
+
declare function getMatchingRateLimiter(endpoint: string, rateLimiters?: RateLimiters, method?: string): RateLimiterFn;
|
|
65
65
|
|
|
66
66
|
interface RootResourceOptions<C> {
|
|
67
67
|
requesterFn?: (resourceOptions: ResourceOptions) => RequesterType;
|
|
@@ -117,4 +117,4 @@ declare class GitbeakerRetryError extends Error {
|
|
|
117
117
|
constructor(message: string);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
export { type BaseRequestOptionsWithAccessToken, type BaseRequestOptionsWithJobToken, type BaseRequestOptionsWithOAuthToken, BaseResource, type BaseResourceOptions, type Constructable, type DefaultRequestOptions, type FormattedResponse, GitbeakerRequestError, GitbeakerRetryError, GitbeakerTimeoutError, type GitlabToken, type OptionsHandlerFn, type RateLimitOptions, type RateLimiters, type RequestHandlerFn, type RequestOptions, type RequesterType, type ResourceOptions, type ResponseBodyTypes, type RootResourceOptions, createRateLimiters, createRequesterFn, defaultOptionsHandler, formatQuery, getMatchingRateLimiter, presetResourceArguments };
|
|
120
|
+
export { type BaseRequestOptionsWithAccessToken, type BaseRequestOptionsWithJobToken, type BaseRequestOptionsWithOAuthToken, BaseResource, type BaseResourceOptions, type Constructable, type DefaultRequestOptions, type FormattedResponse, GitbeakerRequestError, GitbeakerRetryError, GitbeakerTimeoutError, type GitlabToken, type OptionsHandlerFn, type RateLimitOptions, type RateLimiterFn, type RateLimiters, type RequestHandlerFn, type RequestOptions, type RequesterType, type ResourceOptions, type ResponseBodyTypes, type RootResourceOptions, createRateLimiters, createRequesterFn, defaultOptionsHandler, formatQuery, generateRateLimiterFn, getMatchingRateLimiter, presetResourceArguments };
|
package/dist/index.js
CHANGED
|
@@ -2,14 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
var qs = require('qs');
|
|
4
4
|
var xcase = require('xcase');
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var rateLimiterFlexible = require('rate-limiter-flexible');
|
|
6
|
+
var Picomatch = require('picomatch-browser');
|
|
7
7
|
|
|
8
8
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var Picomatch__default = /*#__PURE__*/_interopDefault(Picomatch);
|
|
11
11
|
|
|
12
12
|
// src/RequesterUtils.ts
|
|
13
|
+
var { isMatch: isGlobMatch } = Picomatch__default.default;
|
|
14
|
+
function generateRateLimiterFn(limit, interval) {
|
|
15
|
+
const limiter = new rateLimiterFlexible.RateLimiterQueue(
|
|
16
|
+
new rateLimiterFlexible.RateLimiterMemory({ points: limit, duration: interval })
|
|
17
|
+
);
|
|
18
|
+
return () => limiter.removeTokens(1);
|
|
19
|
+
}
|
|
13
20
|
function formatQuery(params = {}) {
|
|
14
21
|
const decamelized = xcase.decamelizeKeys(params);
|
|
15
22
|
return qs.stringify(decamelized, { arrayFormat: "brackets" });
|
|
@@ -52,11 +59,11 @@ function createRateLimiters(rateLimitOptions = {}) {
|
|
|
52
59
|
const rateLimiters = {};
|
|
53
60
|
Object.entries(rateLimitOptions).forEach(([key, config]) => {
|
|
54
61
|
if (typeof config === "number")
|
|
55
|
-
rateLimiters[key] =
|
|
62
|
+
rateLimiters[key] = generateRateLimiterFn(config, 60);
|
|
56
63
|
else
|
|
57
64
|
rateLimiters[key] = {
|
|
58
65
|
method: config.method.toUpperCase(),
|
|
59
|
-
limit:
|
|
66
|
+
limit: generateRateLimiterFn(config.limit, 60)
|
|
60
67
|
};
|
|
61
68
|
});
|
|
62
69
|
return rateLimiters;
|
|
@@ -96,15 +103,14 @@ function presetResourceArguments(resources, customConfig = {}) {
|
|
|
96
103
|
}
|
|
97
104
|
function getMatchingRateLimiter(endpoint, rateLimiters = {}, method = "GET") {
|
|
98
105
|
const sortedEndpoints = Object.keys(rateLimiters).sort().reverse();
|
|
99
|
-
const match = sortedEndpoints.find((ep) =>
|
|
106
|
+
const match = sortedEndpoints.find((ep) => isGlobMatch(endpoint, ep));
|
|
100
107
|
const rateLimitConfig = match && rateLimiters[match];
|
|
101
|
-
if (
|
|
108
|
+
if (typeof rateLimitConfig === "function")
|
|
102
109
|
return rateLimitConfig;
|
|
103
|
-
|
|
104
|
-
if (rateLimitConfig && rateLimitConfig.method.toUpperCase() === method.toUpperCase()) {
|
|
110
|
+
if (rateLimitConfig && rateLimitConfig?.method?.toUpperCase() === method.toUpperCase()) {
|
|
105
111
|
return rateLimitConfig.limit;
|
|
106
112
|
}
|
|
107
|
-
return
|
|
113
|
+
return generateRateLimiterFn(3e3, 60);
|
|
108
114
|
}
|
|
109
115
|
|
|
110
116
|
// src/BaseResource.ts
|
|
@@ -225,5 +231,6 @@ exports.createRateLimiters = createRateLimiters;
|
|
|
225
231
|
exports.createRequesterFn = createRequesterFn;
|
|
226
232
|
exports.defaultOptionsHandler = defaultOptionsHandler;
|
|
227
233
|
exports.formatQuery = formatQuery;
|
|
234
|
+
exports.generateRateLimiterFn = generateRateLimiterFn;
|
|
228
235
|
exports.getMatchingRateLimiter = getMatchingRateLimiter;
|
|
229
236
|
exports.presetResourceArguments = presetResourceArguments;
|
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { stringify } from 'qs';
|
|
2
2
|
import { decamelizeKeys } from 'xcase';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
3
|
+
import { RateLimiterQueue, RateLimiterMemory } from 'rate-limiter-flexible';
|
|
4
|
+
import Picomatch from 'picomatch-browser';
|
|
5
5
|
|
|
6
6
|
// src/RequesterUtils.ts
|
|
7
|
+
var { isMatch: isGlobMatch } = Picomatch;
|
|
8
|
+
function generateRateLimiterFn(limit, interval) {
|
|
9
|
+
const limiter = new RateLimiterQueue(
|
|
10
|
+
new RateLimiterMemory({ points: limit, duration: interval })
|
|
11
|
+
);
|
|
12
|
+
return () => limiter.removeTokens(1);
|
|
13
|
+
}
|
|
7
14
|
function formatQuery(params = {}) {
|
|
8
15
|
const decamelized = decamelizeKeys(params);
|
|
9
16
|
return stringify(decamelized, { arrayFormat: "brackets" });
|
|
@@ -46,11 +53,11 @@ function createRateLimiters(rateLimitOptions = {}) {
|
|
|
46
53
|
const rateLimiters = {};
|
|
47
54
|
Object.entries(rateLimitOptions).forEach(([key, config]) => {
|
|
48
55
|
if (typeof config === "number")
|
|
49
|
-
rateLimiters[key] =
|
|
56
|
+
rateLimiters[key] = generateRateLimiterFn(config, 60);
|
|
50
57
|
else
|
|
51
58
|
rateLimiters[key] = {
|
|
52
59
|
method: config.method.toUpperCase(),
|
|
53
|
-
limit:
|
|
60
|
+
limit: generateRateLimiterFn(config.limit, 60)
|
|
54
61
|
};
|
|
55
62
|
});
|
|
56
63
|
return rateLimiters;
|
|
@@ -90,15 +97,14 @@ function presetResourceArguments(resources, customConfig = {}) {
|
|
|
90
97
|
}
|
|
91
98
|
function getMatchingRateLimiter(endpoint, rateLimiters = {}, method = "GET") {
|
|
92
99
|
const sortedEndpoints = Object.keys(rateLimiters).sort().reverse();
|
|
93
|
-
const match = sortedEndpoints.find((ep) =>
|
|
100
|
+
const match = sortedEndpoints.find((ep) => isGlobMatch(endpoint, ep));
|
|
94
101
|
const rateLimitConfig = match && rateLimiters[match];
|
|
95
|
-
if (
|
|
102
|
+
if (typeof rateLimitConfig === "function")
|
|
96
103
|
return rateLimitConfig;
|
|
97
|
-
|
|
98
|
-
if (rateLimitConfig && rateLimitConfig.method.toUpperCase() === method.toUpperCase()) {
|
|
104
|
+
if (rateLimitConfig && rateLimitConfig?.method?.toUpperCase() === method.toUpperCase()) {
|
|
99
105
|
return rateLimitConfig.limit;
|
|
100
106
|
}
|
|
101
|
-
return
|
|
107
|
+
return generateRateLimiterFn(3e3, 60);
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
// src/BaseResource.ts
|
|
@@ -211,4 +217,4 @@ var GitbeakerRetryError = class extends Error {
|
|
|
211
217
|
}
|
|
212
218
|
};
|
|
213
219
|
|
|
214
|
-
export { BaseResource, GitbeakerRequestError, GitbeakerRetryError, GitbeakerTimeoutError, createRateLimiters, createRequesterFn, defaultOptionsHandler, formatQuery, getMatchingRateLimiter, presetResourceArguments };
|
|
220
|
+
export { BaseResource, GitbeakerRequestError, GitbeakerRetryError, GitbeakerTimeoutError, createRateLimiters, createRequesterFn, defaultOptionsHandler, formatQuery, generateRateLimiterFn, getMatchingRateLimiter, presetResourceArguments };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitbeaker/requester-utils",
|
|
3
|
-
"version": "39.
|
|
3
|
+
"version": "39.30.0",
|
|
4
4
|
"description": "Utility functions for requester implementatons used in @gitbeaker",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -25,9 +25,14 @@
|
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/index.d.mts",
|
|
30
|
+
"default": "./dist/index.mjs"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"default": "./dist/index.js"
|
|
35
|
+
}
|
|
31
36
|
}
|
|
32
37
|
},
|
|
33
38
|
"files": [
|
|
@@ -51,15 +56,15 @@
|
|
|
51
56
|
"release": "auto shipit"
|
|
52
57
|
},
|
|
53
58
|
"dependencies": {
|
|
54
|
-
"
|
|
55
|
-
"micromatch": "^4.0.5",
|
|
59
|
+
"picomatch-browser": "^2.2.6",
|
|
56
60
|
"qs": "^6.11.2",
|
|
61
|
+
"rate-limiter-flexible": "^4.0.0",
|
|
57
62
|
"xcase": "^2.0.1"
|
|
58
63
|
},
|
|
59
64
|
"devDependencies": {
|
|
60
|
-
"@types/node": "^20.10.
|
|
65
|
+
"@types/node": "^20.10.5",
|
|
61
66
|
"tsup": "^8.0.1",
|
|
62
67
|
"typescript": "^5.3.3"
|
|
63
68
|
},
|
|
64
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "1d7e9aee42b91b36e7757c1de5fb6251f459afa8"
|
|
65
70
|
}
|