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

@@ -1,5 +1,5 @@
import type { IExecuteFunctions, INodeExecutionData } from 'n8n-workflow';
import { NodeExecutionOutput, NodeOperationError } from 'n8n-workflow';
import { NodeOperationError } from 'n8n-workflow';
import * as database from './database/Database.resource';
import type { PostgresType } from './node.type';
@@ -54,15 +54,10 @@ export async function router(this: IExecuteFunctions): Promise<INodeExecutionDat
}
if (operation === 'select' && items.length > 1 && !node.executeOnce) {
return new NodeExecutionOutput(
[returnData],
[
{
message: `This node ran ${items.length} times, once for each input item. To run for the first item only, enable 'execute once' in the node settings`,
location: 'outputPane',
},
],
);
this.addExecutionHints({
message: `This node ran ${items.length} times, once for each input item. To run for the first item only, enable 'execute once' in the node settings`,
location: 'outputPane',
});
}
return [returnData];