From e043e89f7f31ebccd8b446daf2d78fc8c657282e Mon Sep 17 00:00:00 2001 From: Ben Hesseldieck Date: Tue, 9 Mar 2021 12:45:17 +0100 Subject: [PATCH] :construction: remove mongoDB leftovers, adjust editorconfig --- .editorconfig | 3 ++- packages/cli/src/ActiveExecutions.ts | 3 +-- packages/cli/src/Interfaces.ts | 27 ++++++++++++++++----------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.editorconfig b/.editorconfig index 5d02a5688b..5ab90f90d7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,6 +3,7 @@ root = true [*] charset = utf-8 indent_style = tab +indent_size = 2 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true @@ -12,4 +13,4 @@ indent_style = space indent_size = 2 [*.ts] -quote_type = single \ No newline at end of file +quote_type = single diff --git a/packages/cli/src/ActiveExecutions.ts b/packages/cli/src/ActiveExecutions.ts index c802b3afd0..1352e9ee00 100644 --- a/packages/cli/src/ActiveExecutions.ts +++ b/packages/cli/src/ActiveExecutions.ts @@ -19,7 +19,6 @@ import { import { ChildProcess } from 'child_process'; import * as PCancelable from 'p-cancelable'; -import { ObjectID } from 'typeorm'; export class ActiveExecutions { @@ -53,7 +52,7 @@ export class ActiveExecutions { if (executionData.workflowData.id !== undefined && WorkflowHelpers.isWorkflowIdValid(executionData.workflowData.id.toString()) === true) { fullExecutionData.workflowId = executionData.workflowData.id.toString(); } - + const execution = ResponseHelper.flattenExecutionData(fullExecutionData); // Save the Execution in DB diff --git a/packages/cli/src/Interfaces.ts b/packages/cli/src/Interfaces.ts index d5f8f1af3c..11c6c895fc 100644 --- a/packages/cli/src/Interfaces.ts +++ b/packages/cli/src/Interfaces.ts @@ -20,7 +20,7 @@ import { import * as PCancelable from 'p-cancelable'; -import { ObjectID, Repository } from 'typeorm'; +import { Repository } from 'typeorm'; import { ChildProcess } from 'child_process'; import { Url } from 'url'; @@ -62,7 +62,7 @@ export interface IDatabaseCollections { } export interface IWebhookDb { - workflowId: number | string | ObjectID; + workflowId: number | string; webhookPath: string; method: string; node: string; @@ -71,14 +71,19 @@ export interface IWebhookDb { } export interface IWorkflowBase extends IWorkflowBaseWorkflow { - id?: number | string | ObjectID; + id?: number | string; + +} + +export interface ITagDb { + id: number | string; } // Almost identical to editor-ui.Interfaces.ts export interface IWorkflowDb extends IWorkflowBase { - id: number | string | ObjectID; + id: number | string; } export interface IWorkflowResponse extends IWorkflowBase { @@ -99,7 +104,7 @@ export interface ICredentialsBase { } export interface ICredentialsDb extends ICredentialsBase, ICredentialsEncrypted { - id: number | string | ObjectID; + id: number | string; } export interface ICredentialsResponse extends ICredentialsDb { @@ -107,7 +112,7 @@ export interface ICredentialsResponse extends ICredentialsDb { } export interface ICredentialsDecryptedDb extends ICredentialsBase, ICredentialsDecrypted { - id: number | string | ObjectID; + id: number | string; } export interface ICredentialsDecryptedResponse extends ICredentialsDecryptedDb { @@ -118,14 +123,14 @@ export type DatabaseType = 'mariadb' | 'postgresdb' | 'mysqldb' | 'sqlite'; export type SaveExecutionDataType = 'all' | 'none'; export interface IExecutionBase { - id?: number | string | ObjectID; + id?: number | string; mode: WorkflowExecuteMode; startedAt: Date; stoppedAt?: Date; // empty value means execution is still running workflowId?: string; // To be able to filter executions easily // finished: boolean; - retryOf?: number | string | ObjectID; // If it is a retry, the id of the execution it is a retry of. - retrySuccessId?: number | string | ObjectID; // If it failed and a retry did succeed. The id of the successful retry. + retryOf?: number | string; // If it is a retry, the id of the execution it is a retry of. + retrySuccessId?: number | string; // If it failed and a retry did succeed. The id of the successful retry. } // Data in regular format with references @@ -155,7 +160,7 @@ export interface IExecutionFlatted extends IExecutionBase { } export interface IExecutionFlattedDb extends IExecutionBase { - id: number | string | ObjectID; + id: number | string; data: string; workflowData: IWorkflowBase; } @@ -398,7 +403,7 @@ export interface IWorkflowExecutionDataProcess { executionMode: WorkflowExecuteMode; executionData?: IRunExecutionData; runData?: IRunData; - retryOf?: number | string | ObjectID; + retryOf?: number | string; sessionId?: string; startNodes?: string[]; workflowData: IWorkflowBase;