@continuedev/fetch 1.0.2 → 1.0.4
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.d.ts +1 -1
- package/dist/fetch.js +3 -3
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/stream.d.ts +0 -1
- package/package.json +1 -1
- package/src/fetch.ts +5 -4
- package/src/index.ts +10 -2
package/dist/fetch.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { RequestOptions } from "@continuedev/config-types
|
|
1
|
+
import { RequestOptions } from "@continuedev/config-types";
|
|
2
2
|
import { RequestInit, Response } from "node-fetch";
|
|
3
3
|
export declare function fetchwithRequestOptions(url_: URL | string, init?: RequestInit, requestOptions?: RequestOptions): Promise<Response>;
|
package/dist/fetch.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { globalAgent } from "https";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import tls from "node:tls";
|
|
1
4
|
import * as followRedirects from "follow-redirects";
|
|
2
5
|
import { HttpProxyAgent } from "http-proxy-agent";
|
|
3
|
-
import { globalAgent } from "https";
|
|
4
6
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
5
7
|
import fetch from "node-fetch";
|
|
6
|
-
import * as fs from "node:fs";
|
|
7
|
-
import tls from "node:tls";
|
|
8
8
|
const { http, https } = followRedirects.default;
|
|
9
9
|
export function fetchwithRequestOptions(url_, init, requestOptions) {
|
|
10
10
|
let url = url_;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { streamJSON, streamResponse, streamSse, toAsyncIterable } from "./stream.js";
|
|
2
|
+
import { fetchwithRequestOptions } from "./fetch.js";
|
|
3
|
+
export { fetchwithRequestOptions, streamJSON, streamResponse, streamSse, toAsyncIterable, };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { streamJSON, streamResponse, streamSse, toAsyncIterable, } from "./stream.js";
|
|
2
|
+
import { fetchwithRequestOptions } from "./fetch.js";
|
|
3
|
+
export { fetchwithRequestOptions, streamJSON, streamResponse, streamSse, toAsyncIterable, };
|
package/dist/stream.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" resolution-mode="require"/>
|
|
2
1
|
export declare function toAsyncIterable(nodeReadable: NodeJS.ReadableStream): AsyncGenerator<Uint8Array>;
|
|
3
2
|
export declare function streamResponse(response: Response): AsyncGenerator<string>;
|
|
4
3
|
export declare function streamSse(response: Response): AsyncGenerator<any>;
|
package/package.json
CHANGED
package/src/fetch.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { globalAgent } from "https";
|
|
2
|
+
import * as fs from "node:fs";
|
|
3
|
+
import tls from "node:tls";
|
|
4
|
+
|
|
5
|
+
import { RequestOptions } from "@continuedev/config-types";
|
|
2
6
|
import * as followRedirects from "follow-redirects";
|
|
3
7
|
import { HttpProxyAgent } from "http-proxy-agent";
|
|
4
|
-
import { globalAgent } from "https";
|
|
5
8
|
import { HttpsProxyAgent } from "https-proxy-agent";
|
|
6
9
|
import fetch, { RequestInit, Response } from "node-fetch";
|
|
7
|
-
import * as fs from "node:fs";
|
|
8
|
-
import tls from "node:tls";
|
|
9
10
|
|
|
10
11
|
const { http, https } = (followRedirects as any).default;
|
|
11
12
|
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
2
|
streamJSON,
|
|
3
3
|
streamResponse,
|
|
4
4
|
streamSse,
|
|
5
5
|
toAsyncIterable,
|
|
6
6
|
} from "./stream.js";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
import { fetchwithRequestOptions } from "./fetch.js";
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
fetchwithRequestOptions,
|
|
12
|
+
streamJSON,
|
|
13
|
+
streamResponse,
|
|
14
|
+
streamSse,
|
|
15
|
+
toAsyncIterable,
|
|
16
|
+
};
|