undici-types 8.2.0 → 8.3.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 +7 -7
- package/dispatcher.d.ts +0 -2
- package/formdata.d.ts +0 -6
- package/package.json +1 -1
- package/snapshot-agent.d.ts +4 -0
package/client.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import Dispatcher from './dispatcher'
|
|
|
3
3
|
import buildConnector from './connector'
|
|
4
4
|
import TClientStats from './client-stats'
|
|
5
5
|
|
|
6
|
-
type ClientConnectOptions = Omit<Dispatcher.ConnectOptions
|
|
6
|
+
type ClientConnectOptions<TOpaque = null> = Omit<Dispatcher.ConnectOptions<TOpaque>, 'origin'>
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
|
|
@@ -20,12 +20,12 @@ export class Client extends Dispatcher {
|
|
|
20
20
|
readonly stats: TClientStats
|
|
21
21
|
|
|
22
22
|
// Override dispatcher APIs.
|
|
23
|
-
override connect (
|
|
24
|
-
options: ClientConnectOptions
|
|
25
|
-
): Promise<Dispatcher.ConnectData
|
|
26
|
-
override connect (
|
|
27
|
-
options: ClientConnectOptions
|
|
28
|
-
callback: (err: Error | null, data: Dispatcher.ConnectData) => void
|
|
23
|
+
override connect<TOpaque = null> (
|
|
24
|
+
options: ClientConnectOptions<TOpaque>
|
|
25
|
+
): Promise<Dispatcher.ConnectData<TOpaque>>
|
|
26
|
+
override connect<TOpaque = null> (
|
|
27
|
+
options: ClientConnectOptions<TOpaque>,
|
|
28
|
+
callback: (err: Error | null, data: Dispatcher.ConnectData<TOpaque>) => void
|
|
29
29
|
): void
|
|
30
30
|
}
|
|
31
31
|
|
package/dispatcher.d.ts
CHANGED
|
@@ -121,8 +121,6 @@ declare namespace Dispatcher {
|
|
|
121
121
|
bodyTimeout?: number | null;
|
|
122
122
|
/** Whether the request should stablish a keep-alive or not. Default `false` */
|
|
123
123
|
reset?: boolean;
|
|
124
|
-
/** Whether Undici should throw an error upon receiving a 4xx or 5xx response from the server. Defaults to false */
|
|
125
|
-
throwOnError?: boolean;
|
|
126
124
|
/** For H2, it appends the expect: 100-continue header, and halts the request body until a 100-continue is received from the remote server */
|
|
127
125
|
expectContinue?: boolean;
|
|
128
126
|
}
|
package/formdata.d.ts
CHANGED
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
import { File } from 'node:buffer'
|
|
5
5
|
import { SpecIterableIterator } from './fetch'
|
|
6
6
|
|
|
7
|
-
declare module 'node:buffer' {
|
|
8
|
-
interface File {
|
|
9
|
-
readonly [Symbol.toStringTag]: string
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
7
|
/**
|
|
14
8
|
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs.
|
|
15
9
|
*/
|
package/package.json
CHANGED
package/snapshot-agent.d.ts
CHANGED
|
@@ -30,7 +30,9 @@ declare namespace SnapshotRecorder {
|
|
|
30
30
|
ignoreHeaders?: string[]
|
|
31
31
|
excludeHeaders?: string[]
|
|
32
32
|
matchBody?: boolean
|
|
33
|
+
normalizeBody?: (body: string | Buffer | null | undefined) => string
|
|
33
34
|
matchQuery?: boolean
|
|
35
|
+
normalizeQuery?: (query: URLSearchParams) => string
|
|
34
36
|
caseSensitive?: boolean
|
|
35
37
|
shouldRecord?: (requestOpts: any) => boolean
|
|
36
38
|
shouldPlayback?: (requestOpts: any) => boolean
|
|
@@ -98,7 +100,9 @@ declare namespace SnapshotAgent {
|
|
|
98
100
|
ignoreHeaders?: string[]
|
|
99
101
|
excludeHeaders?: string[]
|
|
100
102
|
matchBody?: boolean
|
|
103
|
+
normalizeBody?: (body: string | Buffer | null | undefined) => string
|
|
101
104
|
matchQuery?: boolean
|
|
105
|
+
normalizeQuery?: (query: URLSearchParams) => string
|
|
102
106
|
caseSensitive?: boolean
|
|
103
107
|
shouldRecord?: (requestOpts: any) => boolean
|
|
104
108
|
shouldPlayback?: (requestOpts: any) => boolean
|