@nxtedition/nxt-undici 7.3.1 → 7.3.3

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +9 -1
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -11,6 +11,13 @@ export interface URLObject {
11
11
  search?: string | null
12
12
  }
13
13
 
14
+ export interface BodyReadable extends Readable {
15
+ text(): Promise<string>
16
+ json(): Promise<unknown>
17
+ arrayBuffer(): Promise<ArrayBuffer>
18
+ blob(): Promise<Blob>
19
+ }
20
+
14
21
  export type URLLike = string | URL | URLObject
15
22
 
16
23
  export interface Dispatcher {
@@ -67,6 +74,7 @@ export interface DispatchOptions {
67
74
  bodyTimeout?: number | null
68
75
  idempotent?: boolean | null
69
76
  typeOfService?: number | null
77
+ dispatcher?: Dispatcher | null
70
78
  retry?: RetryOptions | number | boolean | RetryFn | null
71
79
  proxy?: ProxyOptions | boolean | null
72
80
  cache?: CacheOptions | boolean | null
@@ -192,7 +200,7 @@ export interface RequestOptions extends DispatchOptions {
192
200
  export interface ResponseData {
193
201
  statusCode: number
194
202
  headers: Record<string, string | string[] | undefined>
195
- body: Readable
203
+ body: BodyReadable
196
204
  }
197
205
 
198
206
  export function request(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/nxt-undici",
3
- "version": "7.3.1",
3
+ "version": "7.3.3",
4
4
  "license": "MIT",
5
5
  "author": "Robert Nagy <robert.nagy@boffins.se>",
6
6
  "main": "lib/index.js",