From 41a193dff0911da78fe080f610478ecabeb6184a Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 9 Oct 2021 01:45:02 +0200 Subject: :art: fix imports with new build script --- cdn/src/index.ts | 3 +++ cdn/src/routes/attachments.ts | 4 ++-- cdn/src/routes/avatars.ts | 4 ++-- cdn/src/routes/external.ts | 2 +- cdn/src/util/index.ts | 3 +++ 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 cdn/src/util/index.ts (limited to 'cdn/src') diff --git a/cdn/src/index.ts b/cdn/src/index.ts index 7513bd2f..a24300d6 100644 --- a/cdn/src/index.ts +++ b/cdn/src/index.ts @@ -1 +1,4 @@ export * from "./Server"; +export * from "./util/FileStorage"; +export * from "./util/Storage"; +export * from "./util/multer"; diff --git a/cdn/src/routes/attachments.ts b/cdn/src/routes/attachments.ts index 49ceb1b6..354bdde9 100644 --- a/cdn/src/routes/attachments.ts +++ b/cdn/src/routes/attachments.ts @@ -1,9 +1,9 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@fosscord/util"; -import { storage } from "@fosscord/cdn/util/Storage"; +import { storage } from "@fosscord/cdn"; import FileType from "file-type"; import { HTTPError } from "lambert-server"; -import { multer } from "@fosscord/cdn/util/multer"; +import { multer } from "@fosscord/cdn"; import imageSize from "image-size"; const router = Router(); diff --git a/cdn/src/routes/avatars.ts b/cdn/src/routes/avatars.ts index 93045925..981cc417 100644 --- a/cdn/src/routes/avatars.ts +++ b/cdn/src/routes/avatars.ts @@ -1,10 +1,10 @@ import { Router, Response, Request } from "express"; import { Config, Snowflake } from "@fosscord/util"; -import { storage } from "@fosscord/cdn/util/Storage"; +import { storage } from "@fosscord/cdn"; import FileType from "file-type"; import { HTTPError } from "lambert-server"; -import { multer } from "@fosscord/cdn/util/multer"; import crypto from "crypto"; +import { multer } from "../util/multer"; // TODO: check premium and animated pfp are allowed in the config // TODO: generate different sizes of icon diff --git a/cdn/src/routes/external.ts b/cdn/src/routes/external.ts index e7783ec3..50014600 100644 --- a/cdn/src/routes/external.ts +++ b/cdn/src/routes/external.ts @@ -2,7 +2,7 @@ import { Router, Response, Request } from "express"; import fetch from "node-fetch"; import { HTTPError } from "lambert-server"; import { Snowflake } from "@fosscord/util"; -import { storage } from "@fosscord/cdn/util/Storage"; +import { storage } from "@fosscord/cdn"; import FileType from "file-type"; import { Config } from "@fosscord/util"; diff --git a/cdn/src/util/index.ts b/cdn/src/util/index.ts new file mode 100644 index 00000000..07a5c31a --- /dev/null +++ b/cdn/src/util/index.ts @@ -0,0 +1,3 @@ +export * from "./FileStorage"; +export * from "./multer"; +export * from "./Storage"; -- cgit 1.5.1