summary refs log tree commit diff
path: root/cdn
diff options
context:
space:
mode:
Diffstat (limited to 'cdn')
-rw-r--r--cdn/src/index.ts3
-rw-r--r--cdn/src/routes/attachments.ts4
-rw-r--r--cdn/src/routes/avatars.ts4
-rw-r--r--cdn/src/routes/external.ts2
-rw-r--r--cdn/src/util/index.ts3
-rw-r--r--cdn/tsconfig.json4
6 files changed, 13 insertions, 7 deletions
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"; diff --git a/cdn/tsconfig.json b/cdn/tsconfig.json
index c80d16fd..249dffff 100644 --- a/cdn/tsconfig.json +++ b/cdn/tsconfig.json
@@ -4,7 +4,7 @@ /* Visit https://aka.ms/tsconfig.json to read more about this file */ /* Basic Options */ - "incremental": true, /* Enable incremental compilation */ + "incremental": true /* Enable incremental compilation */, "target": "ES6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, "lib": ["ES2015", "dom"] /* Specify library files to be included in the compilation. */, @@ -68,7 +68,7 @@ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */, "baseUrl": ".", "paths": { - "@fosscord/cdn/": ["src/index"], + "@fosscord/cdn": ["src/index"], "@fosscord/cdn/*": ["src/*"] }, "plugins": [{ "transform": "@zerollup/ts-transform-paths" }]