mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
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:
parent
d4afd84019
commit
54fd81f076
118 changed files with 3892 additions and 5291 deletions
|
|
@ -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: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue