refactor(core): Remove NodeExecutionOutput. Add execution hints directly to the context (#13111)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-02-10 16:51:01 +01:00
committed by GitHub
parent 5dddf772cf
commit dbb9475b7b
17 changed files with 103 additions and 171 deletions

View File

@@ -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];
}
}
}