got 10.5.7 → 11.0.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/source/{calculate-retry-delay.d.ts → as-promise/calculate-retry-delay.d.ts} +0 -0
- package/dist/source/{calculate-retry-delay.js → as-promise/calculate-retry-delay.js} +6 -7
- package/dist/source/as-promise/core.d.ts +13 -0
- package/dist/source/as-promise/core.js +124 -0
- package/dist/source/as-promise/create-rejection.d.ts +2 -0
- package/dist/source/as-promise/create-rejection.js +30 -0
- package/dist/source/as-promise/index.d.ts +5 -0
- package/dist/source/as-promise/index.js +203 -0
- package/dist/source/as-promise/types.d.ts +77 -0
- package/dist/source/as-promise/types.js +27 -0
- package/dist/source/core/index.d.ts +272 -0
- package/dist/source/core/index.js +1091 -0
- package/dist/source/{utils → core/utils}/get-body-size.d.ts +0 -0
- package/dist/source/{utils → core/utils}/get-body-size.js +0 -0
- package/dist/source/core/utils/is-form-data.d.ts +8 -0
- package/dist/source/{utils → core/utils}/is-form-data.js +0 -0
- package/dist/source/core/utils/options-to-url.d.ts +15 -0
- package/dist/source/{utils → core/utils}/options-to-url.js +5 -34
- package/dist/source/core/utils/proxy-events.d.ts +3 -0
- package/dist/source/core/utils/proxy-events.js +17 -0
- package/dist/source/{utils → core/utils}/timed-out.d.ts +0 -0
- package/dist/source/{utils → core/utils}/timed-out.js +2 -5
- package/dist/source/{utils → core/utils}/unhandle.d.ts +1 -1
- package/dist/source/{utils → core/utils}/unhandle.js +0 -0
- package/dist/source/{utils → core/utils}/url-to-options.d.ts +0 -0
- package/dist/source/{utils → core/utils}/url-to-options.js +0 -0
- package/dist/source/core/utils/weakable-map.d.ts +8 -0
- package/dist/source/core/utils/weakable-map.js +29 -0
- package/dist/source/create.d.ts +3 -79
- package/dist/source/create.js +83 -39
- package/dist/source/index.d.ts +3 -6
- package/dist/source/index.js +13 -19
- package/dist/source/types.d.ts +84 -198
- package/dist/source/types.js +0 -1
- package/package.json +41 -37
- package/readme.md +211 -97
- package/dist/source/as-promise.d.ts +0 -3
- package/dist/source/as-promise.js +0 -152
- package/dist/source/as-stream.d.ts +0 -7
- package/dist/source/as-stream.js +0 -121
- package/dist/source/errors.d.ts +0 -41
- package/dist/source/errors.js +0 -103
- package/dist/source/get-response.d.ts +0 -6
- package/dist/source/get-response.js +0 -25
- package/dist/source/known-hook-events.d.ts +0 -88
- package/dist/source/known-hook-events.js +0 -11
- package/dist/source/normalize-arguments.d.ts +0 -19
- package/dist/source/normalize-arguments.js +0 -436
- package/dist/source/progress.d.ts +0 -4
- package/dist/source/progress.js +0 -40
- package/dist/source/request-as-event-emitter.d.ts +0 -12
- package/dist/source/request-as-event-emitter.js +0 -284
- package/dist/source/utils/dynamic-require.d.ts +0 -3
- package/dist/source/utils/dynamic-require.js +0 -4
- package/dist/source/utils/is-form-data.d.ts +0 -3
- package/dist/source/utils/merge.d.ts +0 -6
- package/dist/source/utils/merge.js +0 -35
- package/dist/source/utils/options-to-url.d.ts +0 -19
- package/dist/source/utils/supports-brotli.d.ts +0 -2
- package/dist/source/utils/supports-brotli.js +0 -4
package/dist/source/types.d.ts
CHANGED
|
@@ -1,208 +1,94 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import http = require('http');
|
|
3
|
-
import https = require('https');
|
|
4
|
-
import Keyv = require('keyv');
|
|
5
|
-
import CacheableRequest = require('cacheable-request');
|
|
6
|
-
import PCancelable = require('p-cancelable');
|
|
7
|
-
import ResponseLike = require('responselike');
|
|
8
2
|
import { URL } from 'url';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import { Hooks } from './known-hook-events';
|
|
16
|
-
import { URLOptions } from './utils/options-to-url';
|
|
17
|
-
export declare type GeneralError = Error | GotError | HTTPError | MaxRedirectsError | ParseError;
|
|
18
|
-
export declare type Method = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'HEAD' | 'DELETE' | 'OPTIONS' | 'TRACE' | 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete' | 'options' | 'trace';
|
|
19
|
-
export declare type ResponseType = 'json' | 'buffer' | 'text';
|
|
20
|
-
export interface Response<BodyType = unknown> extends IncomingMessageWithTimings {
|
|
21
|
-
body: BodyType;
|
|
22
|
-
statusCode: number;
|
|
23
|
-
/**
|
|
24
|
-
The remote IP address.
|
|
25
|
-
|
|
26
|
-
Note: Not available when the response is cached. This is hopefully a temporary limitation, see [lukechilds/cacheable-request#86](https://github.com/lukechilds/cacheable-request/issues/86).
|
|
27
|
-
*/
|
|
28
|
-
ip: string;
|
|
29
|
-
fromCache?: boolean;
|
|
30
|
-
isFromCache?: boolean;
|
|
31
|
-
req?: http.ClientRequest;
|
|
32
|
-
requestUrl: string;
|
|
33
|
-
retryCount: number;
|
|
34
|
-
timings: Timings;
|
|
35
|
-
redirectUrls: string[];
|
|
36
|
-
request: {
|
|
37
|
-
options: NormalizedOptions;
|
|
38
|
-
};
|
|
39
|
-
url: string;
|
|
40
|
-
}
|
|
41
|
-
export interface ResponseObject extends Partial<ResponseLike> {
|
|
42
|
-
socket: {
|
|
43
|
-
remoteAddress: string;
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
export interface RetryObject {
|
|
47
|
-
attemptCount: number;
|
|
48
|
-
retryOptions: Required<RetryOptions>;
|
|
49
|
-
error: TimeoutError | RequestError;
|
|
50
|
-
computedValue: number;
|
|
51
|
-
}
|
|
52
|
-
export declare type RetryFunction = (retryObject: RetryObject) => number;
|
|
53
|
-
export declare type HandlerFunction = <T extends GotReturn>(options: NormalizedOptions, next: (options: NormalizedOptions) => T) => T | Promise<T>;
|
|
54
|
-
export interface DefaultRetryOptions {
|
|
55
|
-
limit: number;
|
|
56
|
-
methods: Method[];
|
|
57
|
-
statusCodes: number[];
|
|
58
|
-
errorCodes: string[];
|
|
59
|
-
calculateDelay: RetryFunction;
|
|
60
|
-
maxRetryAfter?: number;
|
|
61
|
-
}
|
|
62
|
-
export interface RetryOptions extends Partial<DefaultRetryOptions> {
|
|
63
|
-
retries?: number;
|
|
64
|
-
}
|
|
65
|
-
export declare type RequestFunction = typeof http.request;
|
|
66
|
-
export interface AgentByProtocol {
|
|
67
|
-
http?: http.Agent;
|
|
68
|
-
https?: https.Agent;
|
|
69
|
-
}
|
|
70
|
-
export interface Delays {
|
|
71
|
-
lookup?: number;
|
|
72
|
-
connect?: number;
|
|
73
|
-
secureConnect?: number;
|
|
74
|
-
socket?: number;
|
|
75
|
-
response?: number;
|
|
76
|
-
send?: number;
|
|
77
|
-
request?: number;
|
|
78
|
-
}
|
|
79
|
-
export declare type Headers = Record<string, string | string[] | undefined>;
|
|
80
|
-
interface ToughCookieJar {
|
|
81
|
-
getCookieString(currentUrl: string, options: {
|
|
82
|
-
[key: string]: unknown;
|
|
83
|
-
}, cb: (err: Error | null, cookies: string) => void): void;
|
|
84
|
-
getCookieString(url: string, callback: (error: Error | null, cookieHeader: string) => void): void;
|
|
85
|
-
setCookie(cookieOrString: unknown, currentUrl: string, options: {
|
|
86
|
-
[key: string]: unknown;
|
|
87
|
-
}, cb: (err: Error | null, cookie: unknown) => void): void;
|
|
88
|
-
setCookie(rawCookie: string, url: string, callback: (error: Error | null, result: unknown) => void): void;
|
|
89
|
-
}
|
|
90
|
-
interface PromiseCookieJar {
|
|
91
|
-
getCookieString(url: string): Promise<string>;
|
|
92
|
-
setCookie(rawCookie: string, url: string): Promise<unknown>;
|
|
93
|
-
}
|
|
94
|
-
export declare const requestSymbol: unique symbol;
|
|
95
|
-
export declare type DefaultOptions = Merge<Required<Except<GotOptions, 'hooks' | 'retry' | 'timeout' | 'context' | '_pagination' | 'agent' | 'body' | 'cookieJar' | 'encoding' | 'form' | 'json' | 'lookup' | 'request' | 'url' | typeof requestSymbol>>, {
|
|
96
|
-
hooks: Required<Hooks>;
|
|
97
|
-
retry: DefaultRetryOptions;
|
|
98
|
-
timeout: Delays;
|
|
99
|
-
context: {
|
|
100
|
-
[key: string]: any;
|
|
101
|
-
};
|
|
102
|
-
_pagination?: PaginationOptions<unknown>['_pagination'];
|
|
103
|
-
}>;
|
|
104
|
-
export interface PaginationOptions<T> {
|
|
105
|
-
_pagination?: {
|
|
106
|
-
transform?: (response: Response) => Promise<T[]> | T[];
|
|
107
|
-
filter?: (item: T, allItems: T[]) => boolean;
|
|
108
|
-
paginate?: (response: Response) => Options | false;
|
|
109
|
-
shouldContinue?: (item: T, allItems: T[]) => boolean;
|
|
110
|
-
countLimit?: number;
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
export interface GotOptions extends PaginationOptions<unknown> {
|
|
114
|
-
[requestSymbol]?: RequestFunction;
|
|
115
|
-
url?: URL | string;
|
|
116
|
-
body?: string | Buffer | ReadableStream;
|
|
117
|
-
hooks?: Hooks;
|
|
118
|
-
decompress?: boolean;
|
|
119
|
-
isStream?: boolean;
|
|
120
|
-
encoding?: BufferEncoding;
|
|
121
|
-
method?: Method;
|
|
122
|
-
retry?: RetryOptions | number;
|
|
123
|
-
throwHttpErrors?: boolean;
|
|
124
|
-
cookieJar?: ToughCookieJar | PromiseCookieJar;
|
|
125
|
-
ignoreInvalidCookies?: boolean;
|
|
126
|
-
request?: RequestFunction;
|
|
127
|
-
agent?: http.Agent | https.Agent | boolean | AgentByProtocol;
|
|
128
|
-
cache?: string | CacheableRequest.StorageAdapter | false;
|
|
129
|
-
headers?: Headers;
|
|
130
|
-
responseType?: ResponseType;
|
|
131
|
-
resolveBodyOnly?: boolean;
|
|
132
|
-
followRedirect?: boolean;
|
|
133
|
-
prefixUrl?: URL | string;
|
|
134
|
-
timeout?: number | Delays;
|
|
135
|
-
dnsCache?: CacheableLookup | Map<string, string> | Keyv | false;
|
|
136
|
-
useElectronNet?: boolean;
|
|
137
|
-
form?: {
|
|
138
|
-
[key: string]: any;
|
|
139
|
-
};
|
|
140
|
-
json?: {
|
|
141
|
-
[key: string]: any;
|
|
142
|
-
};
|
|
143
|
-
context?: {
|
|
144
|
-
[key: string]: any;
|
|
145
|
-
};
|
|
146
|
-
maxRedirects?: number;
|
|
147
|
-
lookup?: CacheableLookup['lookup'];
|
|
148
|
-
methodRewriting?: boolean;
|
|
149
|
-
}
|
|
150
|
-
export declare type Options = Merge<https.RequestOptions, Merge<GotOptions, URLOptions>>;
|
|
151
|
-
export interface NormalizedOptions extends Options {
|
|
152
|
-
headers: Headers;
|
|
153
|
-
hooks: Required<Hooks>;
|
|
154
|
-
timeout: Delays;
|
|
155
|
-
dnsCache: CacheableLookup | false;
|
|
156
|
-
lookup?: CacheableLookup['lookup'];
|
|
157
|
-
retry: Required<RetryOptions>;
|
|
158
|
-
prefixUrl: string;
|
|
159
|
-
method: Method;
|
|
160
|
-
url: URL;
|
|
161
|
-
cacheableRequest?: (options: string | URL | http.RequestOptions, callback?: (response: http.ServerResponse | ResponseLike) => void) => CacheableRequest.Emitter;
|
|
162
|
-
cookieJar?: PromiseCookieJar;
|
|
163
|
-
maxRedirects: number;
|
|
164
|
-
pagination?: Required<PaginationOptions<unknown>['_pagination']>;
|
|
165
|
-
[requestSymbol]: RequestFunction;
|
|
166
|
-
decompress: boolean;
|
|
167
|
-
isStream: boolean;
|
|
168
|
-
throwHttpErrors: boolean;
|
|
169
|
-
ignoreInvalidCookies: boolean;
|
|
170
|
-
cache: CacheableRequest.StorageAdapter | false;
|
|
171
|
-
responseType: ResponseType;
|
|
172
|
-
resolveBodyOnly: boolean;
|
|
173
|
-
followRedirect: boolean;
|
|
174
|
-
useElectronNet: boolean;
|
|
175
|
-
methodRewriting: boolean;
|
|
176
|
-
context: {
|
|
177
|
-
[key: string]: any;
|
|
178
|
-
};
|
|
179
|
-
path?: string;
|
|
180
|
-
}
|
|
181
|
-
export interface ExtendOptions extends Options {
|
|
182
|
-
handlers?: HandlerFunction[];
|
|
183
|
-
mutableDefaults?: boolean;
|
|
184
|
-
}
|
|
185
|
-
export interface Defaults {
|
|
3
|
+
import { CancelError } from 'p-cancelable';
|
|
4
|
+
import { CancelableRequest, Response, Options, NormalizedOptions, Defaults as DefaultOptions, PaginationOptions, ParseError, RequestError, CacheError, ReadError, HTTPError, MaxRedirectsError, TimeoutError } from './as-promise';
|
|
5
|
+
import Request from './core';
|
|
6
|
+
declare type Except<ObjectType, KeysType extends keyof ObjectType> = Pick<ObjectType, Exclude<keyof ObjectType, KeysType>>;
|
|
7
|
+
declare type Merge<FirstType, SecondType> = Except<FirstType, Extract<keyof FirstType, keyof SecondType>> & SecondType;
|
|
8
|
+
export interface InstanceDefaults {
|
|
186
9
|
options: DefaultOptions;
|
|
187
10
|
handlers: HandlerFunction[];
|
|
188
11
|
mutableDefaults: boolean;
|
|
189
12
|
_rawHandlers?: HandlerFunction[];
|
|
190
13
|
}
|
|
191
|
-
export declare type
|
|
192
|
-
export
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
export interface GotEvents<T> {
|
|
198
|
-
on(name: 'request', listener: (request: http.ClientRequest) => void): T;
|
|
199
|
-
on(name: 'response', listener: (response: Response) => void): T;
|
|
200
|
-
on(name: 'redirect', listener: (response: Response, nextOptions: NormalizedOptions) => void): T;
|
|
201
|
-
on(name: 'uploadProgress' | 'downloadProgress', listener: (progress: Progress) => void): T;
|
|
14
|
+
export declare type GotReturn = Request | CancelableRequest;
|
|
15
|
+
export declare type HandlerFunction = <T extends GotReturn>(options: NormalizedOptions, next: (options: NormalizedOptions) => T) => T | Promise<T>;
|
|
16
|
+
export interface ExtendOptions extends Options {
|
|
17
|
+
handlers?: HandlerFunction[];
|
|
18
|
+
mutableDefaults?: boolean;
|
|
202
19
|
}
|
|
203
|
-
export
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
text
|
|
20
|
+
export declare type OptionsOfTextResponseBody = Options & {
|
|
21
|
+
isStream?: false;
|
|
22
|
+
resolveBodyOnly?: false;
|
|
23
|
+
responseType?: 'text';
|
|
24
|
+
};
|
|
25
|
+
export declare type OptionsOfJSONResponseBody = Options & {
|
|
26
|
+
isStream?: false;
|
|
27
|
+
resolveBodyOnly?: false;
|
|
28
|
+
responseType: 'json';
|
|
29
|
+
};
|
|
30
|
+
export declare type OptionsOfBufferResponseBody = Options & {
|
|
31
|
+
isStream?: false;
|
|
32
|
+
resolveBodyOnly?: false;
|
|
33
|
+
responseType: 'buffer';
|
|
34
|
+
};
|
|
35
|
+
export declare type StrictOptions = Except<Options, 'isStream' | 'responseType' | 'resolveBodyOnly'>;
|
|
36
|
+
declare type ResponseBodyOnly = {
|
|
37
|
+
resolveBodyOnly: true;
|
|
38
|
+
};
|
|
39
|
+
export declare type OptionsWithPagination<T = unknown> = Merge<Options, PaginationOptions<T>>;
|
|
40
|
+
export interface GotPaginate {
|
|
41
|
+
<T>(url: string | URL, options?: OptionsWithPagination<T>): AsyncIterableIterator<T>;
|
|
42
|
+
all<T>(url: string | URL, options?: OptionsWithPagination<T>): Promise<T[]>;
|
|
43
|
+
<T>(options?: OptionsWithPagination<T>): AsyncIterableIterator<T>;
|
|
44
|
+
all<T>(options?: OptionsWithPagination<T>): Promise<T[]>;
|
|
45
|
+
}
|
|
46
|
+
export interface GotRequestFunction {
|
|
47
|
+
(url: string | URL, options?: OptionsOfTextResponseBody): CancelableRequest<Response<string>>;
|
|
48
|
+
<T>(url: string | URL, options?: OptionsOfJSONResponseBody): CancelableRequest<Response<T>>;
|
|
49
|
+
(url: string | URL, options?: OptionsOfBufferResponseBody): CancelableRequest<Response<Buffer>>;
|
|
50
|
+
(options: OptionsOfTextResponseBody): CancelableRequest<Response<string>>;
|
|
51
|
+
<T>(options: OptionsOfJSONResponseBody): CancelableRequest<Response<T>>;
|
|
52
|
+
(options: OptionsOfBufferResponseBody): CancelableRequest<Response<Buffer>>;
|
|
53
|
+
(url: string | URL, options?: (OptionsOfTextResponseBody & ResponseBodyOnly)): CancelableRequest<string>;
|
|
54
|
+
<T>(url: string | URL, options?: (OptionsOfJSONResponseBody & ResponseBodyOnly)): CancelableRequest<T>;
|
|
55
|
+
(url: string | URL, options?: (OptionsOfBufferResponseBody & ResponseBodyOnly)): CancelableRequest<Buffer>;
|
|
56
|
+
(options: (OptionsOfTextResponseBody & ResponseBodyOnly)): CancelableRequest<string>;
|
|
57
|
+
<T>(options: (OptionsOfJSONResponseBody & ResponseBodyOnly)): CancelableRequest<T>;
|
|
58
|
+
(options: (OptionsOfBufferResponseBody & ResponseBodyOnly)): CancelableRequest<Buffer>;
|
|
59
|
+
(url: string | URL, options?: Options & {
|
|
60
|
+
isStream: true;
|
|
61
|
+
}): Request;
|
|
62
|
+
(options: Options & {
|
|
63
|
+
isStream: true;
|
|
64
|
+
}): Request;
|
|
65
|
+
(url: string | URL, options?: Options): CancelableRequest | Request;
|
|
66
|
+
(options: Options): CancelableRequest | Request;
|
|
67
|
+
}
|
|
68
|
+
export declare type HTTPAlias = 'get' | 'post' | 'put' | 'patch' | 'head' | 'delete';
|
|
69
|
+
interface GotStreamFunction {
|
|
70
|
+
(url: string | URL, options?: Options & {
|
|
71
|
+
isStream?: true;
|
|
72
|
+
}): Request;
|
|
73
|
+
(options?: Options & {
|
|
74
|
+
isStream?: true;
|
|
75
|
+
}): Request;
|
|
76
|
+
}
|
|
77
|
+
export declare type GotStream = GotStreamFunction & Record<HTTPAlias, GotStreamFunction>;
|
|
78
|
+
export interface Got extends Record<HTTPAlias, GotRequestFunction>, GotRequestFunction {
|
|
79
|
+
stream: GotStream;
|
|
80
|
+
paginate: GotPaginate;
|
|
81
|
+
defaults: InstanceDefaults;
|
|
82
|
+
CacheError: typeof CacheError;
|
|
83
|
+
RequestError: typeof RequestError;
|
|
84
|
+
ReadError: typeof ReadError;
|
|
85
|
+
ParseError: typeof ParseError;
|
|
86
|
+
HTTPError: typeof HTTPError;
|
|
87
|
+
MaxRedirectsError: typeof MaxRedirectsError;
|
|
88
|
+
TimeoutError: typeof TimeoutError;
|
|
89
|
+
CancelError: typeof CancelError;
|
|
90
|
+
extend(...instancesOrOptions: Array<Got | ExtendOptions>): Got;
|
|
91
|
+
mergeInstances(parent: Got, ...instances: Got[]): Got;
|
|
92
|
+
mergeOptions(...sources: Options[]): NormalizedOptions;
|
|
207
93
|
}
|
|
208
94
|
export {};
|
package/dist/source/types.js
CHANGED
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "got",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
4
4
|
"description": "Human-friendly and powerful HTTP request library for Node.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "sindresorhus/got",
|
|
7
7
|
"funding": "https://github.com/sindresorhus/got?sponsor=1",
|
|
8
8
|
"main": "dist/source",
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": ">=10"
|
|
10
|
+
"node": ">=10.19.0"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"test": "xo && tsc --noEmit && nyc ava",
|
|
13
|
+
"test": "xo && tsc --noEmit && nyc --reporter=html --reporter=text ava",
|
|
14
14
|
"release": "np",
|
|
15
15
|
"build": "del-cli dist && tsc",
|
|
16
16
|
"prepare": "npm run build"
|
|
@@ -33,70 +33,68 @@
|
|
|
33
33
|
"fetch",
|
|
34
34
|
"net",
|
|
35
35
|
"network",
|
|
36
|
-
"
|
|
36
|
+
"gzip",
|
|
37
37
|
"brotli",
|
|
38
38
|
"requests",
|
|
39
39
|
"human-friendly",
|
|
40
40
|
"axios",
|
|
41
|
-
"superagent"
|
|
41
|
+
"superagent",
|
|
42
|
+
"node-fetch",
|
|
43
|
+
"ky"
|
|
42
44
|
],
|
|
43
45
|
"dependencies": {
|
|
44
|
-
"@sindresorhus/is": "^2.
|
|
46
|
+
"@sindresorhus/is": "^2.1.0",
|
|
45
47
|
"@szmarczak/http-timer": "^4.0.0",
|
|
46
48
|
"@types/cacheable-request": "^6.0.1",
|
|
47
|
-
"
|
|
49
|
+
"@types/responselike": "^1.0.0",
|
|
50
|
+
"cacheable-lookup": "^4.1.1",
|
|
48
51
|
"cacheable-request": "^7.0.1",
|
|
49
52
|
"decompress-response": "^5.0.0",
|
|
50
|
-
"duplexer3": "^0.1.4",
|
|
51
53
|
"get-stream": "^5.0.0",
|
|
54
|
+
"http2-wrapper": "^1.0.0-beta.4.3",
|
|
52
55
|
"lowercase-keys": "^2.0.0",
|
|
53
|
-
"mimic-response": "^2.0.0",
|
|
54
56
|
"p-cancelable": "^2.0.0",
|
|
55
|
-
"
|
|
56
|
-
"responselike": "^2.0.0",
|
|
57
|
-
"to-readable-stream": "^2.0.0",
|
|
58
|
-
"type-fest": "^0.10.0"
|
|
57
|
+
"responselike": "^2.0.0"
|
|
59
58
|
},
|
|
60
59
|
"devDependencies": {
|
|
61
|
-
"@ava/typescript": "^1.1.
|
|
60
|
+
"@ava/typescript": "^1.1.1",
|
|
62
61
|
"@sindresorhus/tsconfig": "^0.7.0",
|
|
63
|
-
"@types/
|
|
64
|
-
"@types/express": "^4.17.
|
|
62
|
+
"@types/benchmark": "^1.0.31",
|
|
63
|
+
"@types/express": "^4.17.6",
|
|
65
64
|
"@types/lolex": "^5.1.0",
|
|
66
65
|
"@types/node": "13.1.2",
|
|
67
|
-
"@types/
|
|
68
|
-
"@types/
|
|
69
|
-
"@types/
|
|
70
|
-
"@
|
|
71
|
-
"@typescript-eslint/
|
|
72
|
-
"
|
|
66
|
+
"@types/node-fetch": "^2.5.5",
|
|
67
|
+
"@types/request": "^2.48.4",
|
|
68
|
+
"@types/sinon": "^9.0.0",
|
|
69
|
+
"@types/tough-cookie": "^4.0.0",
|
|
70
|
+
"@typescript-eslint/eslint-plugin": "^2.27.0",
|
|
71
|
+
"@typescript-eslint/parser": "^2.27.0",
|
|
72
|
+
"ava": "^3.6.0",
|
|
73
|
+
"axios": "^0.19.2",
|
|
74
|
+
"benchmark": "^2.1.4",
|
|
73
75
|
"coveralls": "^3.0.4",
|
|
74
76
|
"create-test-server": "^3.0.1",
|
|
75
77
|
"del-cli": "^3.0.0",
|
|
76
78
|
"delay": "^4.3.0",
|
|
77
|
-
"eslint-config-xo-typescript": "^0.
|
|
79
|
+
"eslint-config-xo-typescript": "^0.27.0",
|
|
78
80
|
"express": "^4.17.1",
|
|
79
81
|
"form-data": "^3.0.0",
|
|
80
|
-
"get-port": "^5.0.0",
|
|
81
|
-
"keyv": "^4.0.0",
|
|
82
82
|
"lolex": "^6.0.0",
|
|
83
|
-
"nock": "^
|
|
83
|
+
"nock": "^12.0.0",
|
|
84
|
+
"node-fetch": "^2.6.0",
|
|
84
85
|
"np": "^6.0.0",
|
|
85
|
-
"nyc": "^15.0.
|
|
86
|
-
"
|
|
87
|
-
"sinon": "^
|
|
86
|
+
"nyc": "^15.0.1",
|
|
87
|
+
"p-event": "^4.0.0",
|
|
88
|
+
"sinon": "^9.0.2",
|
|
88
89
|
"slow-stream": "0.0.4",
|
|
89
|
-
"tempy": "^0.
|
|
90
|
-
"
|
|
90
|
+
"tempy": "^0.5.0",
|
|
91
|
+
"to-readable-stream": "^2.1.0",
|
|
92
|
+
"tough-cookie": "^4.0.0",
|
|
91
93
|
"typescript": "3.7.5",
|
|
92
|
-
"xo": "^0.
|
|
94
|
+
"xo": "^0.29.0"
|
|
93
95
|
},
|
|
94
96
|
"types": "dist/source",
|
|
95
97
|
"sideEffects": false,
|
|
96
|
-
"browser": {
|
|
97
|
-
"decompress-response": false,
|
|
98
|
-
"electron": false
|
|
99
|
-
},
|
|
100
98
|
"ava": {
|
|
101
99
|
"files": [
|
|
102
100
|
"test/*"
|
|
@@ -126,8 +124,14 @@
|
|
|
126
124
|
],
|
|
127
125
|
"rules": {
|
|
128
126
|
"@typescript-eslint/no-empty-function": "off",
|
|
127
|
+
"@typescript-eslint/no-base-to-string": "off",
|
|
129
128
|
"node/prefer-global/url": "off",
|
|
130
|
-
"node/prefer-global/url-search-params": "off"
|
|
129
|
+
"node/prefer-global/url-search-params": "off",
|
|
130
|
+
"unicorn/string-content": "off",
|
|
131
|
+
"@typescript-eslint/prefer-readonly-parameter-types": "off",
|
|
132
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
133
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
134
|
+
"@typescript-eslint/no-unsafe-return": "off"
|
|
131
135
|
}
|
|
132
136
|
}
|
|
133
137
|
}
|