diff --git a/package.json b/package.json index a3f22aa..e93908e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ava-node", - "version": "1.2.0", + "version": "1.2.1", "private": true, "scripts": { "dev": "vite dev", diff --git a/src/lib/avatars.ts b/src/lib/avatars.ts index 97dc36d..9fb154c 100644 --- a/src/lib/avatars.ts +++ b/src/lib/avatars.ts @@ -4,7 +4,6 @@ import { join } from "node:path" import { prisma } from "./clientsingleton" import configuration from "./configuration" import Sharp, { type FormatEnum } from "sharp" -import mime from "mime" // todo: make customizable export const avatarDirectory = "./.data/avatars" diff --git a/src/lib/configuration.ts b/src/lib/configuration.ts index 71cd8c5..f12cba1 100644 --- a/src/lib/configuration.ts +++ b/src/lib/configuration.ts @@ -1,4 +1,4 @@ -import { format, type FormatEnum } from "sharp" +import Sharp, { type FormatEnum } from "sharp" const configuration = { oauth2: { endpoints: { @@ -26,7 +26,7 @@ const configuration = { extra_output_types: process.env.IMAGES__EXTRA_OUTPUT_FORMATS ?.split(",") - .filter(e => e in format) as (keyof FormatEnum)[] + .filter(e => e in Sharp.format) as (keyof FormatEnum)[] || [], output_resolutions: process.env.IMAGES__OUTPUT_RESOLUTIONS