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

@ -6,7 +6,7 @@ import type {
Account as ApiAccount,
Relationship as ApiRelationship,
} from "@versia/client/types";
import { config } from "~/packages/config-manager/index.ts";
import { config } from "~/config.ts";
import { fakeRequest, getTestUsers } from "~/tests/utils";
const { users, tokens, deleteUsers } = await getTestUsers(2);

View file

@ -6,11 +6,12 @@ import { solveChallenge } from "altcha-lib";
import { type InferSelectModel, asc, inArray, like } from "drizzle-orm";
import { appFactory } from "~/app";
import { searchManager } from "~/classes/search/search-manager";
import { config } from "~/config.ts";
import { setupDatabase } from "~/drizzle/db";
import { config } from "~/packages/config-manager";
await setupDatabase();
if (config.sonic.enabled) {
if (config.search.enabled) {
await searchManager.connect();
}