refactor: Setup typescript project references across workflow, core, and cli (#4519)

* refactor: use consistent folder structure across workflow, core, and cli

* setup typescript project references across workflow, core, and cli
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2022-11-09 15:25:00 +01:00
committed by GitHub
parent de96def372
commit 698d96a617
251 changed files with 1284 additions and 1134 deletions

View File

@@ -0,0 +1,28 @@
/* eslint-disable @typescript-eslint/unbound-method */
/* eslint-disable no-console */
import convict from 'convict';
import dotenv from 'dotenv';
import { schema } from './schema';
dotenv.config();
const config = convict(schema);
config.getEnv = config.get;
// Overwrite default configuration with settings which got defined in
// optional configuration files
if (process.env.N8N_CONFIG_FILES !== undefined) {
const configFiles = process.env.N8N_CONFIG_FILES.split(',');
if (process.env.NODE_ENV !== 'test') {
console.log(`\nLoading configuration overwrites from:\n - ${configFiles.join('\n - ')}\n`);
}
config.loadFile(configFiles);
}
config.validate({
allowed: 'strict',
});
export = config;