This commit is contained in:
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", "name": "ava",
"version": "1.2.0", "version": "1.2.1",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",

View file

@ -4,7 +4,6 @@ import { join } from "node:path"
import { prisma } from "./clientsingleton" import { prisma } from "./clientsingleton"
import configuration from "./configuration" import configuration from "./configuration"
import Sharp, { type FormatEnum } from "sharp" import Sharp, { type FormatEnum } from "sharp"
import mime from "mime"
// todo: make customizable // todo: make customizable
export const avatarDirectory = "./.data/avatars" 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 = { const configuration = {
oauth2: { oauth2: {
endpoints: { endpoints: {
@ -26,7 +26,7 @@ const configuration = {
extra_output_types: extra_output_types:
process.env.IMAGES__EXTRA_OUTPUT_FORMATS process.env.IMAGES__EXTRA_OUTPUT_FORMATS
?.split(",") ?.split(",")
.filter(e => e in format) as (keyof FormatEnum)[] .filter(e => e in Sharp.format) as (keyof FormatEnum)[]
|| [], || [],
output_resolutions: output_resolutions:
process.env.IMAGES__OUTPUT_RESOLUTIONS process.env.IMAGES__OUTPUT_RESOLUTIONS