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
|
|
@ -2,7 +2,7 @@ import { Args, Flags } from "@oclif/core";
|
|||
import ora from "ora";
|
||||
import { SonicIndexType, searchManager } from "~/classes/search/search-manager";
|
||||
import { BaseCommand } from "~/cli/base";
|
||||
import { config } from "~/packages/config-manager";
|
||||
import { config } from "~/config.ts";
|
||||
|
||||
export default class IndexRebuild extends BaseCommand<typeof IndexRebuild> {
|
||||
public static override args = {
|
||||
|
|
@ -28,8 +28,8 @@ export default class IndexRebuild extends BaseCommand<typeof IndexRebuild> {
|
|||
public async run(): Promise<void> {
|
||||
const { flags, args } = await this.parse(IndexRebuild);
|
||||
|
||||
if (!config.sonic.enabled) {
|
||||
this.error("Sonic search is disabled");
|
||||
if (!config.search.enabled) {
|
||||
this.error("Search is disabled");
|
||||
this.exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue