@continuedev/fetch 1.0.4 → 1.0.5
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/dist/fetch.js +3 -3
- package/dist/stream.js +1 -0
- package/package.json +1 -1
- package/src/fetch.ts +3 -3
- package/src/stream.ts +1 -0
package/dist/fetch.js
CHANGED
|
@@ -7,9 +7,9 @@ import { HttpsProxyAgent } from "https-proxy-agent";
|
|
|
7
7
|
import fetch from "node-fetch";
|
|
8
8
|
const { http, https } = followRedirects.default;
|
|
9
9
|
export function fetchwithRequestOptions(url_, init, requestOptions) {
|
|
10
|
-
|
|
11
|
-
if (
|
|
12
|
-
url =
|
|
10
|
+
const url = typeof url_ === "string" ? new URL(url_) : url_;
|
|
11
|
+
if (url.host === "localhost") {
|
|
12
|
+
url.host = "127.0.0.1";
|
|
13
13
|
}
|
|
14
14
|
const TIMEOUT = 7200; // 7200 seconds = 2 hours
|
|
15
15
|
let globalCerts = [];
|
package/dist/stream.js
CHANGED
package/package.json
CHANGED
package/src/fetch.ts
CHANGED
|
@@ -15,9 +15,9 @@ export function fetchwithRequestOptions(
|
|
|
15
15
|
init?: RequestInit,
|
|
16
16
|
requestOptions?: RequestOptions,
|
|
17
17
|
): Promise<Response> {
|
|
18
|
-
|
|
19
|
-
if (
|
|
20
|
-
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
|