File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @continuedev/fetch" ,
3
- "version" : " 1.0.4 " ,
3
+ "version" : " 1.0.5 " ,
4
4
"description" : " " ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -15,9 +15,9 @@ export function fetchwithRequestOptions(
15
15
init ?: RequestInit ,
16
16
requestOptions ?: RequestOptions ,
17
17
) : Promise < Response > {
18
- let url = url_ ;
19
- if ( typeof url === "string " ) {
20
- url = new URL ( url ) ;
18
+ const url = typeof url_ === "string" ? new URL ( url_ ) : url_ ;
19
+ if ( url . host === "localhost " ) {
20
+ url . host = "127.0.0.1" ;
21
21
}
22
22
23
23
const TIMEOUT = 7200 ; // 7200 seconds = 2 hours
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ export async function* toAsyncIterable(
2
2
nodeReadable : NodeJS . ReadableStream ,
3
3
) : AsyncGenerator < Uint8Array > {
4
4
for await ( const chunk of nodeReadable ) {
5
+ // @ts -expect-error
5
6
yield chunk as Uint8Array ;
6
7
}
7
8
}
You can’t perform that action at this time.
0 commit comments