This commit is contained in:
split / May 2024-07-12 01:56:59 -07:00
parent 7792898653
commit 7d9da874cd
Signed by: split
GPG key ID: C325C61F0BF517C0
3 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "ava",
"version": "1.2.0",
"version": "1.2.1",
"private": true,
"scripts": {
"dev": "vite dev",

View file

@ -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"

View file

@ -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