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

@ -13,8 +13,8 @@ import type {
} from "@versia/federation/types";
import type { SocketAddress } from "bun";
import type { RouterRoute } from "hono/types";
import type { ConfigSchema } from "~/classes/config/schema";
import type { AuthData } from "~/classes/functions/user";
import type { Config } from "~/packages/config-manager";
export type HttpVerb = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "OPTIONS";
@ -24,7 +24,7 @@ export const ErrorSchema = z.object({
export type HonoEnv = {
Variables: {
config: Config;
config: z.infer<typeof ConfigSchema>;
auth: AuthData;
};
Bindings: {