refactor(config): ♻️ Redo config structure from scratch, simplify validation code, improve checks, add support for loading sensitive data from paths

This commit is contained in:
Jesse Wierzbinski 2025-02-15 02:47:29 +01:00
parent d4afd84019
commit 54fd81f076
No known key found for this signature in database
118 changed files with 3892 additions and 5291 deletions

View file

@ -3,7 +3,7 @@ import { createRoute, z } from "@hono/zod-openapi";
import { proxy } from "hono/proxy";
import type { ContentfulStatusCode, StatusCode } from "hono/utils/http-status";
import { ApiError } from "~/classes/errors/api-error";
import { config } from "~/packages/config-manager";
import { config } from "~/config.ts";
import { ErrorSchema } from "~/types/api";
const schemas = {
@ -56,7 +56,7 @@ export default apiRoute((app) =>
const media = await proxy(id, {
// @ts-expect-error Proxy is a Bun-specific feature
proxy: config.http.proxy.address,
proxy: config.http.proxy_address,
});
// Check if file extension ends in svg or svg