undici 8.12.2 → 8.12.4
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 +1 -1
- package/docs/docs/api/Dispatcher.md +4 -1
- package/docs/docs/api/Interceptors.md +15 -2
- package/docs/docs/api/RetryAgent.md +1 -1
- package/docs/docs/api/RetryHandler.md +1 -1
- package/docs/docs/index.md +1 -1
- package/lib/cache/sqlite-cache-store.js +58 -12
- package/lib/dispatcher/client-h1.js +3 -1
- package/lib/dispatcher/client-h2.js +158 -26
- package/lib/dispatcher/parser-h1.js +2 -1
- package/lib/dispatcher/pool-base.js +20 -3
- package/lib/handler/cache-handler.js +305 -39
- package/lib/handler/decorator-handler.js +6 -2
- package/lib/handler/redirect-handler.js +32 -11
- package/lib/interceptor/cache.js +112 -23
- package/lib/mock/mock-utils.js +11 -1
- package/lib/web/fetch/body.js +28 -8
- package/lib/web/fetch/index.js +3 -9
- package/lib/web/fetch/request.js +93 -115
- package/lib/web/subresource-integrity/subresource-integrity.js +2 -2
- package/package.json +4 -4
- package/types/api.d.ts +1 -1
- package/types/dispatcher.d.ts +1 -1
- package/types/formdata.d.ts +6 -6
- package/types/retry-handler.d.ts +3 -3
- package/types/utility.d.ts +4 -4
package/types/retry-handler.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ declare namespace RetryHandler {
|
|
|
37
37
|
export interface RetryOptions {
|
|
38
38
|
/**
|
|
39
39
|
* If true, the retry handler will throw an error if the request fails,
|
|
40
|
-
* this will prevent the
|
|
40
|
+
* this will prevent the following handlers from being called, and will destroy the socket.
|
|
41
41
|
*
|
|
42
42
|
* @type {boolean}
|
|
43
43
|
* @memberof RetryOptions
|
|
@@ -98,14 +98,14 @@ declare namespace RetryHandler {
|
|
|
98
98
|
*
|
|
99
99
|
* @type {Dispatcher.HttpMethod[]}
|
|
100
100
|
* @memberof RetryOptions
|
|
101
|
-
* @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],
|
|
101
|
+
* @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE', 'QUERY'],
|
|
102
102
|
*/
|
|
103
103
|
methods?: Dispatcher.HttpMethod[];
|
|
104
104
|
/**
|
|
105
105
|
* Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc.
|
|
106
106
|
*
|
|
107
107
|
* @type {string[]}
|
|
108
|
-
* @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE']
|
|
108
|
+
* @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE','UND_ERR_SOCKET']
|
|
109
109
|
*/
|
|
110
110
|
errorCodes?: string[];
|
|
111
111
|
/**
|
package/types/utility.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
type AutocompletePrimitiveBaseType<T> =
|
|
2
|
-
T extends string ? string
|
|
3
|
-
T extends number ? number
|
|
4
|
-
T extends boolean ? boolean
|
|
5
|
-
never
|
|
2
|
+
T extends string ? string
|
|
3
|
+
: T extends number ? number
|
|
4
|
+
: T extends boolean ? boolean
|
|
5
|
+
: never
|
|
6
6
|
|
|
7
7
|
export type Autocomplete<T> = T | (AutocompletePrimitiveBaseType<T> & Record<never, never>)
|