@continuedev/fetch 1.0.14 → 1.0.15
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 +2 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/release.config.js +3 -0
- package/src/fetch.ts +2 -2
- package/src/index.ts +3 -0
package/dist/fetch.js
CHANGED
|
@@ -3,7 +3,7 @@ import { HttpProxyAgent } from "http-proxy-agent";
|
|
|
3
3
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
4
4
|
import { Response } from "node-fetch";
|
|
5
5
|
import { getAgentOptions } from "./getAgentOptions.js";
|
|
6
|
-
import
|
|
6
|
+
import patchedFetch from "./node-fetch-patch.js";
|
|
7
7
|
import { getProxy, shouldBypassProxy } from "./util.js";
|
|
8
8
|
const { http, https } = followRedirects.default;
|
|
9
9
|
function logRequest(method, url, headers, body, proxy, shouldBypass) {
|
|
@@ -112,7 +112,7 @@ export async function fetchwithRequestOptions(url_, init, requestOptions) {
|
|
|
112
112
|
}
|
|
113
113
|
// fetch the request with the provided options
|
|
114
114
|
try {
|
|
115
|
-
const resp = await
|
|
115
|
+
const resp = await patchedFetch(url, {
|
|
116
116
|
...init,
|
|
117
117
|
body: finalBody,
|
|
118
118
|
headers: headers,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { streamJSON, streamResponse, streamSse, toAsyncIterable } from "./stream.js";
|
|
2
|
+
import patchedFetch from "./node-fetch-patch.js";
|
|
2
3
|
import { fetchwithRequestOptions } from "./fetch.js";
|
|
3
|
-
export { fetchwithRequestOptions, streamJSON, streamResponse, streamSse, toAsyncIterable, };
|
|
4
|
+
export { fetchwithRequestOptions, patchedFetch, streamJSON, streamResponse, streamSse, toAsyncIterable, };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { streamJSON, streamResponse, streamSse, toAsyncIterable, } from "./stream.js";
|
|
2
|
+
import patchedFetch from "./node-fetch-patch.js";
|
|
2
3
|
import { fetchwithRequestOptions } from "./fetch.js";
|
|
3
|
-
export { fetchwithRequestOptions, streamJSON, streamResponse, streamSse, toAsyncIterable, };
|
|
4
|
+
export { fetchwithRequestOptions, patchedFetch, streamJSON, streamResponse, streamSse, toAsyncIterable, };
|
package/package.json
CHANGED
package/src/fetch.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { HttpProxyAgent } from "http-proxy-agent";
|
|
|
4
4
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
5
5
|
import { BodyInit, RequestInit, Response } from "node-fetch";
|
|
6
6
|
import { getAgentOptions } from "./getAgentOptions.js";
|
|
7
|
-
import
|
|
7
|
+
import patchedFetch from "./node-fetch-patch.js";
|
|
8
8
|
import { getProxy, shouldBypassProxy } from "./util.js";
|
|
9
9
|
|
|
10
10
|
const { http, https } = (followRedirects as any).default;
|
|
@@ -144,7 +144,7 @@ export async function fetchwithRequestOptions(
|
|
|
144
144
|
|
|
145
145
|
// fetch the request with the provided options
|
|
146
146
|
try {
|
|
147
|
-
const resp = await
|
|
147
|
+
const resp = await patchedFetch(url, {
|
|
148
148
|
...init,
|
|
149
149
|
body: finalBody,
|
|
150
150
|
headers: headers,
|
package/src/index.ts
CHANGED
|
@@ -5,10 +5,13 @@ import {
|
|
|
5
5
|
toAsyncIterable,
|
|
6
6
|
} from "./stream.js";
|
|
7
7
|
|
|
8
|
+
import patchedFetch from "./node-fetch-patch.js";
|
|
9
|
+
|
|
8
10
|
import { fetchwithRequestOptions } from "./fetch.js";
|
|
9
11
|
|
|
10
12
|
export {
|
|
11
13
|
fetchwithRequestOptions,
|
|
14
|
+
patchedFetch,
|
|
12
15
|
streamJSON,
|
|
13
16
|
streamResponse,
|
|
14
17
|
streamSse,
|