Add new media handling package

This commit is contained in:
Jesse Wierzbinski 2024-03-08 13:14:45 -10:00
parent a6c441f665
commit 177f573792
No known key found for this signature in database
13 changed files with 631 additions and 0 deletions

View file

@ -101,6 +101,7 @@ export interface ConfigType {
convert_images: boolean;
convert_to: string;
};
local_uploads_folder: string;
};
s3: {
@ -234,6 +235,7 @@ export const configDefaults: ConfigType = {
convert_images: false,
convert_to: "webp",
},
local_uploads_folder: "uploads",
},
email: {
send_on_report: false,

View file

@ -7,6 +7,7 @@
import { parse, stringify, type JsonMap } from "@iarna/toml";
import type { ConfigType } from "./config-type.type";
import { configDefaults } from "./config-type.type";
import merge from "merge-deep-ts";
export class ConfigManager {
@ -116,3 +117,6 @@ export class ConfigManager {
return merge(configs) as T;
}
}
export type { ConfigType };
export const defaultConfig = configDefaults;