mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Deprecate prepareOutputData (no-changelog) (#7091)
This commit is contained in:
committed by
GitHub
parent
c04a996fb4
commit
6aa7b93473
@@ -741,6 +741,9 @@ export interface FunctionsBase {
|
||||
|
||||
getMode?: () => WorkflowExecuteMode;
|
||||
getActivationMode?: () => WorkflowActivateMode;
|
||||
|
||||
/** @deprecated */
|
||||
prepareOutputData(outputData: INodeExecutionData[]): Promise<INodeExecutionData[][]>;
|
||||
}
|
||||
|
||||
type FunctionsBaseWithRequiredKeys<Keys extends keyof FunctionsBase> = FunctionsBase & {
|
||||
@@ -763,10 +766,6 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn &
|
||||
inputData?: INodeExecutionData[],
|
||||
): Promise<any>;
|
||||
getInputData(inputIndex?: number, inputName?: string): INodeExecutionData[];
|
||||
prepareOutputData(
|
||||
outputData: INodeExecutionData[],
|
||||
outputIndex?: number,
|
||||
): Promise<INodeExecutionData[][]>;
|
||||
putExecutionToWait(waitTill: Date): Promise<void>;
|
||||
sendMessageToUI(message: any): void;
|
||||
sendResponse(response: IExecuteResponsePromiseData): void;
|
||||
@@ -890,10 +889,6 @@ export interface IWebhookFunctions extends FunctionsBaseWithRequiredKeys<'getMod
|
||||
getRequestObject(): express.Request;
|
||||
getResponseObject(): express.Response;
|
||||
getWebhookName(): string;
|
||||
prepareOutputData(
|
||||
outputData: INodeExecutionData[],
|
||||
outputIndex?: number,
|
||||
): Promise<INodeExecutionData[][]>;
|
||||
nodeHelpers: NodeHelperFunctions;
|
||||
helpers: RequestHelperFunctions &
|
||||
BaseHelperFunctions &
|
||||
|
||||
@@ -15,7 +15,6 @@ import type {
|
||||
IContextObject,
|
||||
INode,
|
||||
INodeCredentialDescription,
|
||||
INodeExecutionData,
|
||||
INodeIssueObjectProperty,
|
||||
INodeIssues,
|
||||
INodeParameterResourceLocator,
|
||||
@@ -847,27 +846,6 @@ export function getNodeParameters(
|
||||
return nodeParameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Brings the output data in a format that can be returned from a node
|
||||
*
|
||||
* @param {number} [outputIndex=0]
|
||||
*/
|
||||
export async function prepareOutputData(
|
||||
outputData: INodeExecutionData[],
|
||||
outputIndex = 0,
|
||||
): Promise<INodeExecutionData[][]> {
|
||||
// TODO: Check if node has output with that index
|
||||
const returnData = [];
|
||||
|
||||
for (let i = 0; i < outputIndex; i++) {
|
||||
returnData.push([]);
|
||||
}
|
||||
|
||||
returnData.push(outputData);
|
||||
|
||||
return returnData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all the webhooks which should be created for the give node
|
||||
*/
|
||||
|
||||
@@ -1362,8 +1362,6 @@ export class Workflow {
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
return { data: null };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user