mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08: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:
parent
30326d7098
commit
1d4f92a657
|
@ -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;
|
||||
}>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue