Use convict for configuration to make n8n easier to configure

This commit is contained in:
Jan Oberhauser
2019-07-21 19:47:41 +02:00
parent fbaf445bf8
commit d027545986
15 changed files with 234 additions and 114 deletions

View File

@@ -89,6 +89,7 @@ export interface ICredentialsDecryptedResponse extends ICredentialsDecryptedDb {
}
export type DatabaseType = 'mongodb' | 'sqlite';
export type SaveExecutionDataType = 'all' | 'none';
export interface IExecutionBase {
id?: number | string | ObjectID;
@@ -171,18 +172,47 @@ export interface IExecutionDeleteFilter {
export interface IN8nConfig {
database: IN8nConfigDatabase;
nodes?: IN8nConfigNodes;
endpoints: IN8nConfigEndpoints;
executions: IN8nConfigExecutions;
generic: IN8nConfigGeneric;
host: string;
nodes: IN8nConfigNodes;
port: number;
protocol: 'http' | 'https';
}
export interface IN8nConfigDatabase {
type: DatabaseType;
mongodbConfig?: {
url: string;
mongodb: {
connectionUrl: string;
};
}
export interface IN8nConfigEndpoints {
rest: string;
webhook: string;
webhookTest: string;
}
export interface IN8nConfigExecutions {
saveDataOnError: SaveExecutionDataType;
saveDataOnSuccess: SaveExecutionDataType;
saveDataManualExecutions: boolean;
}
export interface IN8nConfigExecutions {
saveDataOnError: SaveExecutionDataType;
saveDataOnSuccess: SaveExecutionDataType;
saveDataManualExecutions: boolean;
}
export interface IN8nConfigGeneric {
timezone: string;
}
export interface IN8nConfigNodes {
exclude?: string[];
errorTriggerType: string;
exclude: string[];
}