@depup/got 14.6.6-depup.1
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 +36 -0
- package/changes.json +30 -0
- package/dist/source/as-promise/index.d.ts +3 -0
- package/dist/source/as-promise/index.js +204 -0
- package/dist/source/as-promise/types.d.ts +37 -0
- package/dist/source/as-promise/types.js +17 -0
- package/dist/source/core/calculate-retry-delay.d.ts +4 -0
- package/dist/source/core/calculate-retry-delay.js +29 -0
- package/dist/source/core/diagnostics-channel.d.ts +89 -0
- package/dist/source/core/diagnostics-channel.js +49 -0
- package/dist/source/core/errors.d.ts +102 -0
- package/dist/source/core/errors.js +147 -0
- package/dist/source/core/index.d.ts +192 -0
- package/dist/source/core/index.js +1339 -0
- package/dist/source/core/options.d.ts +1564 -0
- package/dist/source/core/options.js +1838 -0
- package/dist/source/core/parse-link-header.d.ts +4 -0
- package/dist/source/core/parse-link-header.js +33 -0
- package/dist/source/core/response.d.ts +109 -0
- package/dist/source/core/response.js +41 -0
- package/dist/source/core/timed-out.d.ts +31 -0
- package/dist/source/core/timed-out.js +136 -0
- package/dist/source/core/utils/defer-to-connect.d.ts +9 -0
- package/dist/source/core/utils/defer-to-connect.js +44 -0
- package/dist/source/core/utils/get-body-size.d.ts +2 -0
- package/dist/source/core/utils/get-body-size.js +37 -0
- package/dist/source/core/utils/is-client-request.d.ts +4 -0
- package/dist/source/core/utils/is-client-request.js +4 -0
- package/dist/source/core/utils/is-form-data.d.ts +7 -0
- package/dist/source/core/utils/is-form-data.js +4 -0
- package/dist/source/core/utils/is-unix-socket-url.d.ts +17 -0
- package/dist/source/core/utils/is-unix-socket-url.js +25 -0
- package/dist/source/core/utils/options-to-url.d.ts +12 -0
- package/dist/source/core/utils/options-to-url.js +48 -0
- package/dist/source/core/utils/proxy-events.d.ts +2 -0
- package/dist/source/core/utils/proxy-events.js +15 -0
- package/dist/source/core/utils/timer.d.ts +31 -0
- package/dist/source/core/utils/timer.js +162 -0
- package/dist/source/core/utils/unhandle.d.ts +10 -0
- package/dist/source/core/utils/unhandle.js +20 -0
- package/dist/source/core/utils/url-to-options.d.ts +14 -0
- package/dist/source/core/utils/url-to-options.js +22 -0
- package/dist/source/core/utils/weakable-map.d.ts +7 -0
- package/dist/source/core/utils/weakable-map.js +24 -0
- package/dist/source/create.d.ts +3 -0
- package/dist/source/create.js +188 -0
- package/dist/source/index.d.ts +16 -0
- package/dist/source/index.js +22 -0
- package/dist/source/types.d.ts +314 -0
- package/dist/source/types.js +1 -0
- package/license +9 -0
- package/package.json +197 -0
- package/readme.md +478 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import type { Buffer } from 'node:buffer';
|
|
2
|
+
import type { Spread } from 'type-fest';
|
|
3
|
+
import type { CancelableRequest } from './as-promise/types.js';
|
|
4
|
+
import type { Response } from './core/response.js';
|
|
5
|
+
import type Options from './core/options.js';
|
|
6
|
+
import { type PaginationOptions, type OptionsInit } from './core/options.js';
|
|
7
|
+
import type Request from './core/index.js';
|
|
8
|
+
type Except<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>;
|
|
9
|
+
type Merge<FirstType, SecondType> = Except<FirstType, Extract<keyof FirstType, keyof SecondType>> & SecondType;
|
|
10
|
+
/**
|
|
11
|
+
Defaults for each Got instance.
|
|
12
|
+
*/
|
|
13
|
+
export type InstanceDefaults = {
|
|
14
|
+
/**
|
|
15
|
+
An object containing the default options of Got.
|
|
16
|
+
*/
|
|
17
|
+
options: Options;
|
|
18
|
+
/**
|
|
19
|
+
An array of functions. You execute them directly by calling `got()`.
|
|
20
|
+
They are some sort of "global hooks" - these functions are called first.
|
|
21
|
+
The last handler (*it's hidden*) is either `asPromise` or `asStream`, depending on the `options.isStream` property.
|
|
22
|
+
|
|
23
|
+
@default []
|
|
24
|
+
*/
|
|
25
|
+
handlers: HandlerFunction[];
|
|
26
|
+
/**
|
|
27
|
+
A read-only boolean describing whether the defaults are mutable or not.
|
|
28
|
+
If set to `true`, you can update headers over time, for example, update an access token when it expires.
|
|
29
|
+
|
|
30
|
+
@default false
|
|
31
|
+
*/
|
|
32
|
+
mutableDefaults: boolean;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
A Request object returned by calling Got, or any of the Got HTTP alias request functions.
|
|
36
|
+
*/
|
|
37
|
+
export type GotReturn = Request | CancelableRequest;
|
|
38
|
+
/**
|
|
39
|
+
A function to handle options and returns a Request object.
|
|
40
|
+
It acts sort of like a "global hook", and will be called before any actual request is made.
|
|
41
|
+
*/
|
|
42
|
+
export type HandlerFunction = <T extends GotReturn>(options: Options, next: (options: Options) => T) => T | Promise<T>;
|
|
43
|
+
/**
|
|
44
|
+
The options available for `got.extend()`.
|
|
45
|
+
*/
|
|
46
|
+
export type ExtendOptions = {
|
|
47
|
+
/**
|
|
48
|
+
An array of functions. You execute them directly by calling `got()`.
|
|
49
|
+
They are some sort of "global hooks" - these functions are called first.
|
|
50
|
+
The last handler (*it's hidden*) is either `asPromise` or `asStream`, depending on the `options.isStream` property.
|
|
51
|
+
|
|
52
|
+
@default []
|
|
53
|
+
*/
|
|
54
|
+
handlers?: HandlerFunction[];
|
|
55
|
+
/**
|
|
56
|
+
A read-only boolean describing whether the defaults are mutable or not.
|
|
57
|
+
If set to `true`, you can update headers over time, for example, update an access token when it expires.
|
|
58
|
+
|
|
59
|
+
@default false
|
|
60
|
+
*/
|
|
61
|
+
mutableDefaults?: boolean;
|
|
62
|
+
} & OptionsInit;
|
|
63
|
+
export type StrictOptions = Except<OptionsInit, 'isStream' | 'responseType' | 'resolveBodyOnly'>;
|
|
64
|
+
export type StreamOptions = Merge<OptionsInit, {
|
|
65
|
+
isStream?: true;
|
|
66
|
+
}>;
|
|
67
|
+
export type OptionsWithPagination<T = unknown, R = unknown> = Merge<OptionsInit, {
|
|
68
|
+
pagination?: PaginationOptions<T, R>;
|
|
69
|
+
}>;
|
|
70
|
+
/**
|
|
71
|
+
An instance of `got.paginate`.
|
|
72
|
+
*/
|
|
73
|
+
export type GotPaginate = {
|
|
74
|
+
/**
|
|
75
|
+
Same as `GotPaginate.each`.
|
|
76
|
+
*/
|
|
77
|
+
<T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>): AsyncIterableIterator<T>;
|
|
78
|
+
/**
|
|
79
|
+
Same as `GotPaginate.each`.
|
|
80
|
+
*/
|
|
81
|
+
<T, R = unknown>(options?: OptionsWithPagination<T, R>): AsyncIterableIterator<T>;
|
|
82
|
+
/**
|
|
83
|
+
Returns an async iterator.
|
|
84
|
+
|
|
85
|
+
See pagination.options for more pagination options.
|
|
86
|
+
|
|
87
|
+
@example
|
|
88
|
+
```
|
|
89
|
+
import got from 'got';
|
|
90
|
+
|
|
91
|
+
const countLimit = 10;
|
|
92
|
+
|
|
93
|
+
const pagination = got.paginate('https://api.github.com/repos/sindresorhus/got/commits', {
|
|
94
|
+
pagination: {countLimit}
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
|
|
98
|
+
|
|
99
|
+
for await (const commitData of pagination) {
|
|
100
|
+
console.log(commitData.commit.message);
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
*/
|
|
104
|
+
each: (<T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>) => AsyncIterableIterator<T>) & (<T, R = unknown>(options?: OptionsWithPagination<T, R>) => AsyncIterableIterator<T>);
|
|
105
|
+
/**
|
|
106
|
+
Returns a Promise for an array of all results.
|
|
107
|
+
|
|
108
|
+
See pagination.options for more pagination options.
|
|
109
|
+
|
|
110
|
+
@example
|
|
111
|
+
```
|
|
112
|
+
import got from 'got';
|
|
113
|
+
|
|
114
|
+
const countLimit = 10;
|
|
115
|
+
|
|
116
|
+
const results = await got.paginate.all('https://api.github.com/repos/sindresorhus/got/commits', {
|
|
117
|
+
pagination: {countLimit}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
|
|
121
|
+
console.log(results);
|
|
122
|
+
```
|
|
123
|
+
*/
|
|
124
|
+
all: (<T, R = unknown>(url: string | URL, options?: OptionsWithPagination<T, R>) => Promise<T[]>) & (<T, R = unknown>(options?: OptionsWithPagination<T, R>) => Promise<T[]>);
|
|
125
|
+
};
|
|
126
|
+
export type OptionsOfTextResponseBody = Merge<StrictOptions, {
|
|
127
|
+
isStream?: false;
|
|
128
|
+
responseType?: 'text';
|
|
129
|
+
}>;
|
|
130
|
+
export type OptionsOfTextResponseBodyOnly = Merge<StrictOptions, {
|
|
131
|
+
isStream?: false;
|
|
132
|
+
resolveBodyOnly: true;
|
|
133
|
+
responseType?: 'text';
|
|
134
|
+
}>;
|
|
135
|
+
export type OptionsOfTextResponseBodyWrapped = Merge<StrictOptions, {
|
|
136
|
+
isStream?: false;
|
|
137
|
+
resolveBodyOnly: false;
|
|
138
|
+
responseType?: 'text';
|
|
139
|
+
}>;
|
|
140
|
+
export type OptionsOfJSONResponseBody = Merge<StrictOptions, {
|
|
141
|
+
isStream?: false;
|
|
142
|
+
responseType?: 'json';
|
|
143
|
+
}>;
|
|
144
|
+
export type OptionsOfJSONResponseBodyOnly = Merge<StrictOptions, {
|
|
145
|
+
isStream?: false;
|
|
146
|
+
resolveBodyOnly: true;
|
|
147
|
+
responseType?: 'json';
|
|
148
|
+
}>;
|
|
149
|
+
export type OptionsOfJSONResponseBodyWrapped = Merge<StrictOptions, {
|
|
150
|
+
isStream?: false;
|
|
151
|
+
resolveBodyOnly: false;
|
|
152
|
+
responseType?: 'json';
|
|
153
|
+
}>;
|
|
154
|
+
export type OptionsOfBufferResponseBody = Merge<StrictOptions, {
|
|
155
|
+
isStream?: false;
|
|
156
|
+
responseType?: 'buffer';
|
|
157
|
+
}>;
|
|
158
|
+
export type OptionsOfBufferResponseBodyOnly = Merge<StrictOptions, {
|
|
159
|
+
isStream?: false;
|
|
160
|
+
resolveBodyOnly: true;
|
|
161
|
+
responseType?: 'buffer';
|
|
162
|
+
}>;
|
|
163
|
+
export type OptionsOfBufferResponseBodyWrapped = Merge<StrictOptions, {
|
|
164
|
+
isStream?: false;
|
|
165
|
+
resolveBodyOnly: false;
|
|
166
|
+
responseType?: 'buffer';
|
|
167
|
+
}>;
|
|
168
|
+
export type OptionsOfUnknownResponseBody = Merge<StrictOptions, {
|
|
169
|
+
isStream?: false;
|
|
170
|
+
}>;
|
|
171
|
+
export type OptionsOfUnknownResponseBodyOnly = Merge<StrictOptions, {
|
|
172
|
+
isStream?: false;
|
|
173
|
+
resolveBodyOnly: true;
|
|
174
|
+
}>;
|
|
175
|
+
export type OptionsOfUnknownResponseBodyWrapped = Merge<StrictOptions, {
|
|
176
|
+
isStream?: false;
|
|
177
|
+
resolveBodyOnly: false;
|
|
178
|
+
}>;
|
|
179
|
+
type DefaultResponseBodyType<U extends ExtendOptions> = U['responseType'] extends 'json' ? unknown : U['responseType'] extends 'buffer' ? Buffer : string;
|
|
180
|
+
export type GotRequestFunction<U extends ExtendOptions = Record<string, unknown>> = {
|
|
181
|
+
(url: string | URL): U['resolveBodyOnly'] extends true ? CancelableRequest<DefaultResponseBodyType<U>> : CancelableRequest<Response<DefaultResponseBodyType<U>>>;
|
|
182
|
+
(url: string | URL, options?: OptionsOfTextResponseBody): U['resolveBodyOnly'] extends true ? CancelableRequest<string> : CancelableRequest<Response<string>>;
|
|
183
|
+
<T>(url: string | URL, options?: OptionsOfJSONResponseBody): U['resolveBodyOnly'] extends true ? CancelableRequest<T> : CancelableRequest<Response<T>>;
|
|
184
|
+
(url: string | URL, options?: OptionsOfBufferResponseBody): U['resolveBodyOnly'] extends true ? CancelableRequest<Buffer> : CancelableRequest<Response<Buffer>>;
|
|
185
|
+
(url: string | URL, options?: OptionsOfUnknownResponseBody): U['resolveBodyOnly'] extends true ? CancelableRequest : CancelableRequest<Response>;
|
|
186
|
+
(url: string | URL, options?: OptionsOfTextResponseBodyWrapped): CancelableRequest<Response<string>>;
|
|
187
|
+
<T>(url: string | URL, options?: OptionsOfJSONResponseBodyWrapped): CancelableRequest<Response<T>>;
|
|
188
|
+
(url: string | URL, options?: OptionsOfBufferResponseBodyWrapped): CancelableRequest<Response<Buffer>>;
|
|
189
|
+
(url: string | URL, options?: OptionsOfUnknownResponseBodyWrapped): CancelableRequest<Response>;
|
|
190
|
+
(url: string | URL, options?: OptionsOfTextResponseBodyOnly): CancelableRequest<string>;
|
|
191
|
+
<T>(url: string | URL, options?: OptionsOfJSONResponseBodyOnly): CancelableRequest<T>;
|
|
192
|
+
(url: string | URL, options?: OptionsOfBufferResponseBodyOnly): CancelableRequest<Buffer>;
|
|
193
|
+
(url: string | URL, options?: OptionsOfUnknownResponseBodyOnly): CancelableRequest;
|
|
194
|
+
(options: {
|
|
195
|
+
url: string | URL;
|
|
196
|
+
}): U['resolveBodyOnly'] extends true ? CancelableRequest<DefaultResponseBodyType<U>> : CancelableRequest<Response<DefaultResponseBodyType<U>>>;
|
|
197
|
+
(options: OptionsOfTextResponseBody): U['resolveBodyOnly'] extends true ? CancelableRequest<string> : CancelableRequest<Response<string>>;
|
|
198
|
+
<T>(options: OptionsOfJSONResponseBody): U['resolveBodyOnly'] extends true ? CancelableRequest<T> : CancelableRequest<Response<T>>;
|
|
199
|
+
(options: OptionsOfBufferResponseBody): U['resolveBodyOnly'] extends true ? CancelableRequest<Buffer> : CancelableRequest<Response<Buffer>>;
|
|
200
|
+
(options: OptionsOfUnknownResponseBody): U['resolveBodyOnly'] extends true ? CancelableRequest : CancelableRequest<Response>;
|
|
201
|
+
(options: OptionsOfTextResponseBodyWrapped): CancelableRequest<Response<string>>;
|
|
202
|
+
<T>(options: OptionsOfJSONResponseBodyWrapped): CancelableRequest<Response<T>>;
|
|
203
|
+
(options: OptionsOfBufferResponseBodyWrapped): CancelableRequest<Response<Buffer>>;
|
|
204
|
+
(options: OptionsOfUnknownResponseBodyWrapped): CancelableRequest<Response>;
|
|
205
|
+
(options: OptionsOfTextResponseBodyOnly): CancelableRequest<string>;
|
|
206
|
+
<T>(options: OptionsOfJSONResponseBodyOnly): CancelableRequest<T>;
|
|
207
|
+
(options: OptionsOfBufferResponseBodyOnly): CancelableRequest<Buffer>;
|
|
208
|
+
(options: OptionsOfUnknownResponseBodyOnly): CancelableRequest;
|
|
209
|
+
(url: string | URL, options?: Merge<OptionsInit, {
|
|
210
|
+
isStream: true;
|
|
211
|
+
}>): Request;
|
|
212
|
+
(options: Merge<OptionsInit, {
|
|
213
|
+
isStream: true;
|
|
214
|
+
}>): Request;
|
|
215
|
+
(url: string | URL, options?: OptionsInit): CancelableRequest | Request;
|
|
216
|
+
(options: OptionsInit): CancelableRequest | Request;
|
|
217
|
+
(url: undefined, options: undefined, defaults: Options): CancelableRequest | Request;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
All available HTTP request methods provided by Got.
|
|
221
|
+
*/
|
|
222
|
+
export type HTTPAlias = 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete';
|
|
223
|
+
type GotStreamFunction = ((url?: string | URL, options?: Merge<OptionsInit, {
|
|
224
|
+
isStream?: true;
|
|
225
|
+
}>) => Request) & ((options?: Merge<OptionsInit, {
|
|
226
|
+
isStream?: true;
|
|
227
|
+
}>) => Request);
|
|
228
|
+
/**
|
|
229
|
+
An instance of `got.stream()`.
|
|
230
|
+
*/
|
|
231
|
+
export type GotStream = GotStreamFunction & Record<HTTPAlias, GotStreamFunction>;
|
|
232
|
+
/**
|
|
233
|
+
An instance of `got`.
|
|
234
|
+
*/
|
|
235
|
+
export type Got<GotOptions extends ExtendOptions = ExtendOptions> = {
|
|
236
|
+
/**
|
|
237
|
+
Sets `options.isStream` to `true`.
|
|
238
|
+
|
|
239
|
+
Returns a [duplex stream](https://nodejs.org/api/stream.html#stream_class_stream_duplex) with additional events:
|
|
240
|
+
- request
|
|
241
|
+
- response
|
|
242
|
+
- redirect
|
|
243
|
+
- uploadProgress
|
|
244
|
+
- downloadProgress
|
|
245
|
+
- error
|
|
246
|
+
|
|
247
|
+
Note: For writable request streams, call `stream.end()` when you are not piping a body. `got.stream` does not auto-end for OPTIONS, DELETE, or PATCH so you can pipe or write a body without getting `write after end`.
|
|
248
|
+
*/
|
|
249
|
+
stream: GotStream;
|
|
250
|
+
/**
|
|
251
|
+
Returns an async iterator.
|
|
252
|
+
|
|
253
|
+
See pagination.options for more pagination options.
|
|
254
|
+
|
|
255
|
+
@example
|
|
256
|
+
```
|
|
257
|
+
import got from 'got';
|
|
258
|
+
|
|
259
|
+
const countLimit = 10;
|
|
260
|
+
|
|
261
|
+
const pagination = got.paginate('https://api.github.com/repos/sindresorhus/got/commits', {
|
|
262
|
+
pagination: {countLimit}
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
console.log(`Printing latest ${countLimit} Got commits (newest to oldest):`);
|
|
266
|
+
|
|
267
|
+
for await (const commitData of pagination) {
|
|
268
|
+
console.log(commitData.commit.message);
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
*/
|
|
272
|
+
paginate: GotPaginate;
|
|
273
|
+
/**
|
|
274
|
+
The Got defaults used in that instance.
|
|
275
|
+
*/
|
|
276
|
+
defaults: InstanceDefaults;
|
|
277
|
+
/**
|
|
278
|
+
Configure a new `got` instance with default `options`.
|
|
279
|
+
The `options` are merged with the parent instance's `defaults.options` using `got.mergeOptions`.
|
|
280
|
+
You can access the resolved options with the `.defaults` property on the instance.
|
|
281
|
+
|
|
282
|
+
Additionally, `got.extend()` accepts two properties from the `defaults` object: `mutableDefaults` and `handlers`.
|
|
283
|
+
|
|
284
|
+
It is also possible to merges many instances into a single one:
|
|
285
|
+
- options are merged using `got.mergeOptions()` (including hooks),
|
|
286
|
+
- handlers are stored in an array (you can access them through `instance.defaults.handlers`).
|
|
287
|
+
|
|
288
|
+
@example
|
|
289
|
+
```
|
|
290
|
+
import got from 'got';
|
|
291
|
+
|
|
292
|
+
const client = got.extend({
|
|
293
|
+
prefixUrl: 'https://example.com',
|
|
294
|
+
headers: {
|
|
295
|
+
'x-unicorn': 'rainbow'
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
client.get('demo');
|
|
300
|
+
|
|
301
|
+
// HTTP Request =>
|
|
302
|
+
// GET /demo HTTP/1.1
|
|
303
|
+
// Host: example.com
|
|
304
|
+
// x-unicorn: rainbow
|
|
305
|
+
```
|
|
306
|
+
*/
|
|
307
|
+
extend<T extends Array<Got | ExtendOptions>>(...instancesOrOptions: T): Got<MergeExtendsConfig<T>>;
|
|
308
|
+
} & Record<HTTPAlias, GotRequestFunction<GotOptions>> & GotRequestFunction<GotOptions>;
|
|
309
|
+
export type ExtractExtendOptions<T> = T extends Got<infer GotOptions> ? GotOptions : T;
|
|
310
|
+
/**
|
|
311
|
+
Merges the options of multiple Got instances.
|
|
312
|
+
*/
|
|
313
|
+
export type MergeExtendsConfig<Value extends Array<Got | ExtendOptions>> = Value extends readonly [Value[0], ...infer NextValue] ? NextValue[0] extends undefined ? Value[0] extends infer OnlyValue ? OnlyValue extends ExtendOptions ? OnlyValue : OnlyValue extends Got<infer GotOptions> ? GotOptions : OnlyValue : never : ExtractExtendOptions<Value[0]> extends infer FirstArg extends ExtendOptions ? ExtractExtendOptions<NextValue[0] extends ExtendOptions | Got ? NextValue[0] : never> extends infer NextArg extends ExtendOptions ? Spread<FirstArg, NextArg> extends infer Merged extends ExtendOptions ? NextValue extends [NextValue[0], ...infer NextRest] ? NextRest extends Array<Got | ExtendOptions> ? MergeExtendsConfig<[Merged, ...NextRest]> : never : never : never : never : never : never;
|
|
314
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/license
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@depup/got",
|
|
3
|
+
"version": "14.6.6-depup.1",
|
|
4
|
+
"description": "Human-friendly and powerful HTTP request library for Node.js (with updated dependencies)",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/got",
|
|
7
|
+
"funding": "https://github.com/sindresorhus/got?sponsor=1",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
"types": "./dist/source/index.d.ts",
|
|
11
|
+
"default": "./dist/source/index.js"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=20"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "xo && tsc --noEmit && NODE_OPTIONS='--import=tsx/esm' ava",
|
|
19
|
+
"test:coverage": "xo && tsc --noEmit && NODE_OPTIONS='--import=tsx/esm' c8 ava",
|
|
20
|
+
"release": "np",
|
|
21
|
+
"build": "del-cli dist && tsc"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist/source",
|
|
25
|
+
"changes.json",
|
|
26
|
+
"README.md"
|
|
27
|
+
],
|
|
28
|
+
"keywords": [
|
|
29
|
+
"got",
|
|
30
|
+
"depup",
|
|
31
|
+
"updated-dependencies",
|
|
32
|
+
"security",
|
|
33
|
+
"latest",
|
|
34
|
+
"patched",
|
|
35
|
+
"http",
|
|
36
|
+
"https",
|
|
37
|
+
"http2",
|
|
38
|
+
"get",
|
|
39
|
+
"url",
|
|
40
|
+
"uri",
|
|
41
|
+
"request",
|
|
42
|
+
"simple",
|
|
43
|
+
"curl",
|
|
44
|
+
"wget",
|
|
45
|
+
"fetch",
|
|
46
|
+
"net",
|
|
47
|
+
"network",
|
|
48
|
+
"gzip",
|
|
49
|
+
"brotli",
|
|
50
|
+
"zstd",
|
|
51
|
+
"zstandard",
|
|
52
|
+
"requests",
|
|
53
|
+
"human-friendly",
|
|
54
|
+
"axios",
|
|
55
|
+
"superagent",
|
|
56
|
+
"node-fetch",
|
|
57
|
+
"ky"
|
|
58
|
+
],
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@sindresorhus/is": "^7.2.0",
|
|
61
|
+
"byte-counter": "^0.1.0",
|
|
62
|
+
"cacheable-lookup": "^7.0.0",
|
|
63
|
+
"cacheable-request": "^13.0.18",
|
|
64
|
+
"decompress-response": "^10.0.0",
|
|
65
|
+
"form-data-encoder": "^4.1.0",
|
|
66
|
+
"http2-wrapper": "^2.2.1",
|
|
67
|
+
"keyv": "^5.6.0",
|
|
68
|
+
"lowercase-keys": "^4.0.1",
|
|
69
|
+
"p-cancelable": "^4.0.1",
|
|
70
|
+
"responselike": "^4.0.2",
|
|
71
|
+
"type-fest": "^5.5.0"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@hapi/bourne": "^3.0.0",
|
|
75
|
+
"@sindresorhus/tsconfig": "^6.0.0",
|
|
76
|
+
"@sinonjs/fake-timers": "^11.2.2",
|
|
77
|
+
"@types/benchmark": "^2.1.5",
|
|
78
|
+
"@types/express": "^5.0.0",
|
|
79
|
+
"@types/node": "^22.7.5",
|
|
80
|
+
"@types/pem": "^1.14.4",
|
|
81
|
+
"@types/readable-stream": "^4.0.14",
|
|
82
|
+
"@types/request": "^2.48.12",
|
|
83
|
+
"@types/sinon": "^17.0.2",
|
|
84
|
+
"@types/sinonjs__fake-timers": "^8.1.5",
|
|
85
|
+
"ava": "^5.3.1",
|
|
86
|
+
"axios": "^1.7.7",
|
|
87
|
+
"benchmark": "^2.1.4",
|
|
88
|
+
"bluebird": "^3.7.2",
|
|
89
|
+
"body-parser": "^1.20.3",
|
|
90
|
+
"c8": "^10.1.3",
|
|
91
|
+
"chunk-data": "^0.1.0",
|
|
92
|
+
"create-cert": "^1.0.6",
|
|
93
|
+
"create-test-server": "^3.0.1",
|
|
94
|
+
"del-cli": "^6.0.0",
|
|
95
|
+
"delay": "^6.0.0",
|
|
96
|
+
"expect-type": "^1.0.0",
|
|
97
|
+
"express": "^4.21.1",
|
|
98
|
+
"form-data": "^4.0.0",
|
|
99
|
+
"formdata-node": "^6.0.3",
|
|
100
|
+
"get-stream": "^9.0.1",
|
|
101
|
+
"nock": "^13.5.5",
|
|
102
|
+
"node-fetch": "^3.3.2",
|
|
103
|
+
"np": "^10.0.5",
|
|
104
|
+
"p-event": "^6.0.1",
|
|
105
|
+
"pem": "^1.14.8",
|
|
106
|
+
"pify": "^6.1.0",
|
|
107
|
+
"quick-lru": "^7.2.0",
|
|
108
|
+
"readable-stream": "^4.4.2",
|
|
109
|
+
"request": "^2.88.2",
|
|
110
|
+
"sinon": "^19.0.2",
|
|
111
|
+
"slow-stream": "0.0.4",
|
|
112
|
+
"tempy": "^3.1.0",
|
|
113
|
+
"then-busboy": "^5.2.1",
|
|
114
|
+
"tough-cookie": "^4.1.4",
|
|
115
|
+
"tsx": "^4.19.1",
|
|
116
|
+
"typescript": "^5.6.3",
|
|
117
|
+
"xo": "^0.56.0"
|
|
118
|
+
},
|
|
119
|
+
"ava": {
|
|
120
|
+
"files": [
|
|
121
|
+
"test/*",
|
|
122
|
+
"!test/*.types.ts"
|
|
123
|
+
],
|
|
124
|
+
"timeout": "10m",
|
|
125
|
+
"extensions": {
|
|
126
|
+
"ts": "module"
|
|
127
|
+
},
|
|
128
|
+
"workerThreads": false
|
|
129
|
+
},
|
|
130
|
+
"c8": {
|
|
131
|
+
"reporter": [
|
|
132
|
+
"text",
|
|
133
|
+
"html",
|
|
134
|
+
"lcov"
|
|
135
|
+
],
|
|
136
|
+
"exclude": [
|
|
137
|
+
"test/**",
|
|
138
|
+
"dist/**"
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
"xo": {
|
|
142
|
+
"ignores": [
|
|
143
|
+
"documentation/examples/*"
|
|
144
|
+
],
|
|
145
|
+
"rules": {
|
|
146
|
+
"@typescript-eslint/no-empty-function": "off",
|
|
147
|
+
"n/no-deprecated-api": "off",
|
|
148
|
+
"@typescript-eslint/no-implicit-any-catch": "off",
|
|
149
|
+
"ava/assertion-arguments": "off",
|
|
150
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
151
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
152
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
153
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
154
|
+
"@typescript-eslint/await-thenable": "off",
|
|
155
|
+
"@typescript-eslint/no-redundant-type-constituents": "off",
|
|
156
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
157
|
+
"@typescript-eslint/promise-function-async": "off",
|
|
158
|
+
"no-lone-blocks": "off",
|
|
159
|
+
"unicorn/no-await-expression-member": "off",
|
|
160
|
+
"unicorn/prefer-event-target": "off"
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"runkitExampleFilename": "./documentation/examples/runkit-example.js",
|
|
164
|
+
"depup": {
|
|
165
|
+
"changes": {
|
|
166
|
+
"@sindresorhus/is": {
|
|
167
|
+
"from": "^7.0.1",
|
|
168
|
+
"to": "^7.2.0"
|
|
169
|
+
},
|
|
170
|
+
"cacheable-request": {
|
|
171
|
+
"from": "^13.0.12",
|
|
172
|
+
"to": "^13.0.18"
|
|
173
|
+
},
|
|
174
|
+
"form-data-encoder": {
|
|
175
|
+
"from": "^4.0.2",
|
|
176
|
+
"to": "^4.1.0"
|
|
177
|
+
},
|
|
178
|
+
"keyv": {
|
|
179
|
+
"from": "^5.5.3",
|
|
180
|
+
"to": "^5.6.0"
|
|
181
|
+
},
|
|
182
|
+
"lowercase-keys": {
|
|
183
|
+
"from": "^3.0.0",
|
|
184
|
+
"to": "^4.0.1"
|
|
185
|
+
},
|
|
186
|
+
"type-fest": {
|
|
187
|
+
"from": "^4.26.1",
|
|
188
|
+
"to": "^5.5.0"
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"depsUpdated": 6,
|
|
192
|
+
"originalPackage": "got",
|
|
193
|
+
"originalVersion": "14.6.6",
|
|
194
|
+
"processedAt": "2026-03-19T08:20:07.012Z",
|
|
195
|
+
"smokeTest": "passed"
|
|
196
|
+
}
|
|
197
|
+
}
|