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,11 +1,11 @@
import { Container } from 'typedi';
import type { Scope } from '@sentry/node';
import { GlobalConfig } from '@n8n/config';
import { Credentials } from 'n8n-core';
import { randomString } from 'n8n-workflow';
import type { ListQuery } from '@/requests';
import type { User } from '@db/entities/User';
import config from '@/config';
import { ProjectRepository } from '@db/repositories/project.repository';
import type { Project } from '@db/entities/Project';
import { CredentialsRepository } from '@db/repositories/credentials.repository';
@@ -1018,7 +1018,7 @@ describe('PATCH /credentials/:id', () => {
describe('GET /credentials/new', () => {
test('should return default name for new credential or its increment', async () => {
const name = config.getEnv('credentials.defaultName');
const name = Container.get(GlobalConfig).credentials.defaultName;
let tempName = name;
for (let i = 0; i < 4; i++) {