diff --git a/keep-ui/proxyFetch.node.ts b/keep-ui/proxyFetch.node.ts deleted file mode 100644 index 76defb940..000000000 --- a/keep-ui/proxyFetch.node.ts +++ /dev/null @@ -1,24 +0,0 @@ -// proxyFetch.node.ts -import { ProxyAgent, fetch as undici } from "undici"; -import type { ProxyFetchFn } from "./proxyFetch"; - -export const createProxyFetch = async (): Promise => { - const proxyUrl = - process.env.HTTP_PROXY || - process.env.HTTPS_PROXY || - process.env.http_proxy || - process.env.https_proxy; - - if (!proxyUrl) { - return undefined; - } - - const dispatcher = new ProxyAgent(proxyUrl); - - return function proxy( - ...args: Parameters - ): ReturnType { - // @ts-expect-error `undici` has a `duplex` option - return undici(args[0], { ...args[1], dispatcher }); - }; -}; diff --git a/keep-ui/proxyFetch.ts b/keep-ui/proxyFetch.ts deleted file mode 100644 index d0d1c936e..000000000 --- a/keep-ui/proxyFetch.ts +++ /dev/null @@ -1,11 +0,0 @@ -// proxyFetch.ts - -// We only export the type from this file -export type ProxyFetchFn = ( - ...args: Parameters -) => ReturnType; - -// This function will be imported dynamically only in Node.js environment -export const createProxyFetch = async (): Promise => { - return undefined; -};