diff options
Diffstat (limited to 'util/src')
-rw-r--r-- | util/src/fetch.js | 1 | ||||
-rw-r--r-- | util/src/index.ts | 1 | ||||
-rw-r--r-- | util/src/util/AutoUpdate.ts | 2 | ||||
-rw-r--r-- | util/src/util/cdn.ts | 3 |
4 files changed, 5 insertions, 2 deletions
diff --git a/util/src/fetch.js b/util/src/fetch.js new file mode 100644 index 00000000..709bc440 --- /dev/null +++ b/util/src/fetch.js @@ -0,0 +1 @@ +export default fetch; diff --git a/util/src/index.ts b/util/src/index.ts index ae0f7e54..0de1e19a 100644 --- a/util/src/index.ts +++ b/util/src/index.ts @@ -4,3 +4,4 @@ export * from "./util/index"; export * from "./interfaces/index"; export * from "./entities/index"; export * from "./dtos/index"; +export * from "./fetch.js"; diff --git a/util/src/util/AutoUpdate.ts b/util/src/util/AutoUpdate.ts index 62ce8d79..7a4af4ff 100644 --- a/util/src/util/AutoUpdate.ts +++ b/util/src/util/AutoUpdate.ts @@ -1,5 +1,5 @@ import "missing-native-js-functions"; -import fetch from "node-fetch"; +import fetch from "../fetch"; import ProxyAgent from 'proxy-agent'; import readline from "readline"; import fs from "fs/promises"; diff --git a/util/src/util/cdn.ts b/util/src/util/cdn.ts index ea950cd1..ef4ac47d 100644 --- a/util/src/util/cdn.ts +++ b/util/src/util/cdn.ts @@ -1,8 +1,9 @@ import FormData from "form-data"; import { HTTPError } from "lambert-server"; -import fetch from "node-fetch"; import { Config } from "./Config"; import multer from "multer"; +import fetch from "../fetch" +import { nodeModuleNameResolver } from "typescript"; export async function uploadFile(path: string, file?: Express.Multer.File) { if (!file?.buffer) throw new HTTPError("Missing file in body"); |