mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Remove NodeExecutionOutput. Add execution hints directly to the context (#13111)
This commit is contained in:
committed by
GitHub
parent
5dddf772cf
commit
dbb9475b7b
@@ -5,7 +5,6 @@ import {
|
||||
type INodeExecutionData,
|
||||
type INodeType,
|
||||
type INodeTypeDescription,
|
||||
NodeExecutionOutput,
|
||||
type NodeExecutionHint,
|
||||
type IDataObject,
|
||||
} from 'n8n-workflow';
|
||||
@@ -345,6 +344,10 @@ export class Summarize implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
if (fieldsNotFound.length) {
|
||||
this.addExecutionHints(...fieldsNotFound);
|
||||
}
|
||||
|
||||
if (options.outputFormat === 'singleItem') {
|
||||
const executionData: INodeExecutionData = {
|
||||
json: aggregationResult,
|
||||
@@ -352,7 +355,7 @@ export class Summarize implements INodeType {
|
||||
item: index,
|
||||
})),
|
||||
};
|
||||
return new NodeExecutionOutput([[executionData]], fieldsNotFound);
|
||||
return [[executionData]];
|
||||
} else {
|
||||
if (!fieldsToSplitBy.length) {
|
||||
const { pairedItems, ...json } = aggregationResult;
|
||||
@@ -362,7 +365,7 @@ export class Summarize implements INodeType {
|
||||
item: index,
|
||||
})),
|
||||
};
|
||||
return new NodeExecutionOutput([[executionData]], fieldsNotFound);
|
||||
return [[executionData]];
|
||||
}
|
||||
let returnData: IDataObject[] = [];
|
||||
if (nodeVersion > 1) {
|
||||
@@ -379,7 +382,7 @@ export class Summarize implements INodeType {
|
||||
})),
|
||||
};
|
||||
});
|
||||
return new NodeExecutionOutput([executionData], fieldsNotFound);
|
||||
return [executionData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user