refactor(core): Move backend config to a separate package (no-changelog) (#9325)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-07-05 11:43:27 +02:00
committed by GitHub
parent 1d5b9836ca
commit c7d4b471c4
48 changed files with 941 additions and 556 deletions

View File

@@ -1,6 +1,7 @@
import 'reflect-metadata';
import { Container } from 'typedi';
import { Command, Errors } from '@oclif/core';
import { GlobalConfig } from '@n8n/config';
import { ApplicationError, ErrorReporterProxy as ErrorReporter, sleep } from 'n8n-workflow';
import { BinaryDataService, InstanceSettings, ObjectStoreService } from 'n8n-core';
import type { AbstractServer } from '@/AbstractServer';
@@ -77,7 +78,8 @@ export abstract class BaseCommand extends Command {
await this.exitWithCrash('There was an error running database migrations', error),
);
const dbType = config.getEnv('database.type');
const globalConfig = Container.get(GlobalConfig);
const { type: dbType } = globalConfig.database;
if (['mysqldb', 'mariadb'].includes(dbType)) {
this.logger.warn(