undici-types 8.5.0 → 8.7.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/client.d.ts CHANGED
@@ -57,7 +57,7 @@ export declare namespace Client {
57
57
  keepAliveTimeoutThreshold?: number;
58
58
  /** An IPC endpoint, either a Unix domain socket or Windows named pipe. Default: `null`. */
59
59
  socketPath?: string;
60
- /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
60
+ /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Only enable values greater than `1` when the remote server is trusted. Default: `1`. */
61
61
  pipelining?: number;
62
62
  /** @deprecated use the connect option instead */
63
63
  tls?: never;
package/cookies.d.ts CHANGED
@@ -18,7 +18,7 @@ export interface Cookie {
18
18
  export function deleteCookie (
19
19
  headers: Headers,
20
20
  name: string,
21
- attributes?: { name?: string, domain?: string }
21
+ attributes?: { path?: string, domain?: string }
22
22
  ): void
23
23
 
24
24
  export function getCookies (headers: Headers): Record<string, string>
package/errors.d.ts CHANGED
@@ -154,6 +154,16 @@ declare namespace Errors {
154
154
  code: 'UND_ERR_PRX_TLS'
155
155
  }
156
156
 
157
+ export class ProxyConnectionError extends UndiciError {
158
+ constructor (
159
+ cause?: Error,
160
+ message?: string,
161
+ options?: Record<any, any>
162
+ )
163
+ name: 'ProxyConnectionError'
164
+ code: 'UND_ERR_PRX_CONN'
165
+ }
166
+
157
167
  export class MaxOriginsReachedError extends UndiciError {
158
168
  name: 'MaxOriginsReachedError'
159
169
  code: 'UND_ERR_MAX_ORIGINS_REACHED'
package/handlers.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import Dispatcher from './dispatcher'
2
2
 
3
3
  export declare class RedirectHandler implements Dispatcher.DispatchHandler {
4
+ static buildDispatch (dispatcher: Dispatcher, maxRedirections: number): Dispatcher.Dispatch
5
+
4
6
  constructor (
5
7
  dispatch: Dispatcher.Dispatch,
6
8
  maxRedirections: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "undici-types",
3
- "version": "8.5.0",
3
+ "version": "8.7.0",
4
4
  "description": "A stand-alone types package for Undici",
5
5
  "homepage": "https://undici.nodejs.org",
6
6
  "bugs": {
package/proxy-agent.d.ts CHANGED
@@ -24,6 +24,13 @@ declare namespace ProxyAgent {
24
24
  requestTls?: buildConnector.BuildOptions;
25
25
  proxyTls?: buildConnector.BuildOptions;
26
26
  clientFactory?(origin: URL, opts: object): Dispatcher;
27
+ /**
28
+ * Undici tunnels via CONNECT when the target endpoint uses HTTPS, and
29
+ * forwards (HTTP/1.1 absolute-form request-target, per RFC 9112 §3.2.2)
30
+ * otherwise, regardless of whether the proxy URL is HTTP or HTTPS. The
31
+ * non-tunneled forwarding path does not negotiate HTTP/2 with the proxy.
32
+ * Set to true to force tunneling for plain HTTP requests as well.
33
+ */
27
34
  proxyTunnel?: boolean;
28
35
  }
29
36
  }