mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
fix(cli): Fix excessive instantiation type error for flattened execution (#3921)
* 📘 Fix excessive instantiation error * ♻️ Simplify interface for TypeORM
This commit is contained in:
@@ -227,7 +227,7 @@ export interface IExecutionFlattedDb extends IExecutionBase {
|
||||
id: number | string;
|
||||
data: string;
|
||||
waitTill?: Date | null;
|
||||
workflowData: IWorkflowBase;
|
||||
workflowData: Omit<IWorkflowBase, 'pinData'>;
|
||||
}
|
||||
|
||||
export interface IExecutionFlattedResponse extends IExecutionFlatted {
|
||||
|
||||
@@ -2,7 +2,14 @@
|
||||
/* eslint-disable import/no-cycle */
|
||||
import { Length } from 'class-validator';
|
||||
|
||||
import { IConnections, IDataObject, INode, IPinData, IWorkflowSettings } from 'n8n-workflow';
|
||||
import {
|
||||
IBinaryKeyData,
|
||||
IConnections,
|
||||
IDataObject,
|
||||
INode,
|
||||
IPairedItemData,
|
||||
IWorkflowSettings,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
import {
|
||||
BeforeUpdate,
|
||||
@@ -122,10 +129,22 @@ export class WorkflowEntity implements IWorkflowDb {
|
||||
nullable: true,
|
||||
transformer: sqlite.jsonColumn,
|
||||
})
|
||||
pinData: IPinData;
|
||||
pinData: ISimplifiedPinData;
|
||||
|
||||
@BeforeUpdate()
|
||||
setUpdateDate() {
|
||||
this.updatedAt = new Date();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Simplified to prevent excessively deep type instantiation error from
|
||||
* `INodeExecutionData` in `IPinData` in a TypeORM entity field.
|
||||
*/
|
||||
export interface ISimplifiedPinData {
|
||||
[nodeName: string]: Array<{
|
||||
json: IDataObject;
|
||||
binary?: IBinaryKeyData;
|
||||
pairedItem?: IPairedItemData | IPairedItemData[] | number;
|
||||
}>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user