undici-types 6.18.2 → 6.19.2

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/errors.d.ts CHANGED
@@ -125,4 +125,25 @@ declare namespace Errors {
125
125
  name: 'ResponseExceededMaxSizeError';
126
126
  code: 'UND_ERR_RES_EXCEEDED_MAX_SIZE';
127
127
  }
128
+
129
+ export class RequestRetryError extends UndiciError {
130
+ constructor (
131
+ message: string,
132
+ statusCode: number,
133
+ headers?: IncomingHttpHeaders | string[] | null,
134
+ body?: null | Record<string, any> | string
135
+ );
136
+ name: 'RequestRetryError';
137
+ code: 'UND_ERR_REQ_RETRY';
138
+ statusCode: number;
139
+ data: {
140
+ count: number;
141
+ };
142
+ headers: Record<string, string | string[]>;
143
+ }
144
+
145
+ export class SecureProxyConnectionError extends UndiciError {
146
+ name: 'SecureProxyConnectionError';
147
+ code: 'UND_ERR_PRX_TLS';
148
+ }
128
149
  }
package/formdata.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  /// <reference types="node" />
3
3
 
4
4
  import { File } from './file'
5
- import { SpecIterator, SpecIterableIterator } from './fetch'
5
+ import { SpecIterableIterator } from './fetch'
6
6
 
7
7
  /**
8
8
  * A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
package/index.d.ts CHANGED
@@ -18,6 +18,7 @@ import EnvHttpProxyAgent from './env-http-proxy-agent'
18
18
  import RetryHandler from'./retry-handler'
19
19
  import RetryAgent from'./retry-agent'
20
20
  import { request, pipeline, stream, connect, upgrade } from './api'
21
+ import interceptors from './interceptors'
21
22
 
22
23
  export * from './util'
23
24
  export * from './cookies'
@@ -32,7 +33,7 @@ export * from './content-type'
32
33
  export * from './cache'
33
34
  export { Interceptable } from './mock-interceptor'
34
35
 
35
- export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent }
36
+ export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, interceptors, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, EnvHttpProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler, RetryAgent }
36
37
  export default Undici
37
38
 
38
39
  declare namespace Undici {
@@ -41,7 +42,7 @@ declare namespace Undici {
41
42
  var RedirectHandler: typeof import ('./handlers').RedirectHandler
42
43
  var DecoratorHandler: typeof import ('./handlers').DecoratorHandler
43
44
  var RetryHandler: typeof import ('./retry-handler').default
44
- var createRedirectInterceptor: typeof import ('./interceptors').createRedirectInterceptor
45
+ var createRedirectInterceptor: typeof import ('./interceptors').default.createRedirectInterceptor
45
46
  var BalancedPool: typeof import('./balanced-pool').default;
46
47
  var Client: typeof import('./client').default;
47
48
  var buildConnector: typeof import('./connector').default;
@@ -66,9 +67,5 @@ declare namespace Undici {
66
67
  var File: typeof import('./file').File;
67
68
  var FileReader: typeof import('./filereader').FileReader;
68
69
  var caches: typeof import('./cache').caches;
69
- var interceptors: {
70
- dump: typeof import('./interceptors').dump;
71
- retry: typeof import('./interceptors').retry;
72
- redirect: typeof import('./interceptors').redirect;
73
- }
70
+ var interceptors: typeof import('./interceptors').default;
74
71
  }
package/interceptors.d.ts CHANGED
@@ -1,11 +1,15 @@
1
1
  import Dispatcher from "./dispatcher";
2
2
  import RetryHandler from "./retry-handler";
3
3
 
4
- export type DumpInterceptorOpts = { maxSize?: number }
5
- export type RetryInterceptorOpts = RetryHandler.RetryOptions
6
- export type RedirectInterceptorOpts = { maxRedirections?: number }
4
+ export default Interceptors;
7
5
 
8
- export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
9
- export declare function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
10
- export declare function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
11
- export declare function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
6
+ declare namespace Interceptors {
7
+ export type DumpInterceptorOpts = { maxSize?: number }
8
+ export type RetryInterceptorOpts = RetryHandler.RetryOptions
9
+ export type RedirectInterceptorOpts = { maxRedirections?: number }
10
+
11
+ export function createRedirectInterceptor(opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
12
+ export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
13
+ export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
14
+ export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "6.18.2",
3
+ "version": "6.19.2",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
package/retry-agent.d.ts CHANGED
@@ -1,7 +1,4 @@
1
- import Agent from './agent'
2
- import buildConnector from './connector';
3
1
  import Dispatcher from './dispatcher'
4
- import { IncomingHttpHeaders } from './header'
5
2
  import RetryHandler from './retry-handler'
6
3
 
7
4
  export default RetryAgent
package/webidl.d.ts CHANGED
@@ -55,9 +55,7 @@ interface WebidlUtil {
55
55
  V: unknown,
56
56
  bitLength: number,
57
57
  signedness: 'signed' | 'unsigned',
58
- opts?: ConvertToIntOpts,
59
- prefix: string,
60
- argument: string
58
+ opts?: ConvertToIntOpts
61
59
  ): number
62
60
 
63
61
  /**