refactor: Delete a lot of unused and duplicate code in Server and WebhookServer (#5080)

* store n8n version string in a const and use that everywhere

* reduce code duplication between Server and WebhookServer

* unify redis checks

* fix linting
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-01-04 11:38:48 +01:00
committed by GitHub
parent b67f803cbe
commit 8b19fdd5f0
25 changed files with 882 additions and 1324 deletions

View File

@@ -27,9 +27,7 @@ import PCancelable from 'p-cancelable';
import type { FindOperator, Repository } from 'typeorm';
import type { ChildProcess } from 'child_process';
import { Url } from 'url';
import type { Request } from 'express';
import type { InstalledNodes } from '@db/entities/InstalledNodes';
import type { InstalledPackages } from '@db/entities/InstalledPackages';
import type { Role } from '@db/entities/Role';
@@ -57,10 +55,6 @@ export interface IQueuedWorkflowActivations {
workflowData: IWorkflowDb;
}
export interface ICustomRequest extends Request {
parsedUrl: Url | undefined;
}
export interface ICredentialsTypeData {
[key: string]: CredentialLoadingDetails;
}
@@ -498,8 +492,8 @@ export interface IVersionNotificationSettings {
export interface IN8nUISettings {
endpointWebhook: string;
endpointWebhookTest: string;
saveDataErrorExecution: string;
saveDataSuccessExecution: string;
saveDataErrorExecution: 'all' | 'none';
saveDataSuccessExecution: 'all' | 'none';
saveManualExecutions: boolean;
executionTimeout: number;
maxExecutionTimeout: number;