mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
refactor(core): Deprecate prepareOutputData (no-changelog) (#7091)
This commit is contained in:
committed by
GitHub
parent
c04a996fb4
commit
6aa7b93473
@@ -109,10 +109,8 @@ export async function initNodeTypes() {
|
||||
outputs: ['main'],
|
||||
properties: [],
|
||||
},
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
async execute(this: IExecuteFunctions) {
|
||||
return [this.getInputData()];
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -151,7 +149,7 @@ export async function initNodeTypes() {
|
||||
},
|
||||
],
|
||||
},
|
||||
async trigger(this: ITriggerFunctions): Promise<ITriggerResponse> {
|
||||
async trigger(this: ITriggerFunctions) {
|
||||
const triggerTimes = this.getNodeParameter('triggerTimes') as unknown as {
|
||||
item: TriggerTime[];
|
||||
};
|
||||
@@ -312,7 +310,7 @@ export async function initNodeTypes() {
|
||||
},
|
||||
],
|
||||
},
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
async execute(this: IExecuteFunctions) {
|
||||
const items = this.getInputData();
|
||||
|
||||
if (items.length === 0) {
|
||||
@@ -380,7 +378,7 @@ export async function initNodeTypes() {
|
||||
returnData.push(newItem);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -2187,6 +2187,8 @@ const getCommonWorkflowFunctions = (
|
||||
getRestApiUrl: () => additionalData.restApiUrl,
|
||||
getInstanceBaseUrl: () => additionalData.instanceBaseUrl,
|
||||
getTimezone: () => getTimezone(workflow, additionalData),
|
||||
|
||||
prepareOutputData: async (outputData) => [outputData],
|
||||
});
|
||||
|
||||
const getRequestHelperFunctions = (
|
||||
@@ -2633,7 +2635,6 @@ export function getExecuteFunctions(
|
||||
);
|
||||
return dataProxy.getDataProxy();
|
||||
},
|
||||
prepareOutputData: NodeHelpers.prepareOutputData,
|
||||
binaryToBuffer,
|
||||
async putExecutionToWait(waitTill: Date): Promise<void> {
|
||||
runExecutionData.waitTill = waitTill;
|
||||
@@ -3067,7 +3068,6 @@ export function getExecuteWebhookFunctions(
|
||||
getAdditionalKeys(additionalData, mode, null),
|
||||
),
|
||||
getWebhookName: () => webhookData.webhookDescription.name,
|
||||
prepareOutputData: NodeHelpers.prepareOutputData,
|
||||
helpers: {
|
||||
createDeferredPromise,
|
||||
...getRequestHelperFunctions(workflow, node, additionalData),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import set from 'lodash/set';
|
||||
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeParameters,
|
||||
INodeTypeData,
|
||||
@@ -9,8 +10,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import { deepCopy } from 'n8n-workflow';
|
||||
|
||||
import type { IExecuteFunctions } from '@/Interfaces';
|
||||
|
||||
export const predefinedNodesTypes: INodeTypeData = {
|
||||
'n8n-nodes-base.if': {
|
||||
sourcePath: '',
|
||||
@@ -241,7 +240,7 @@ export const predefinedNodesTypes: INodeTypeData = {
|
||||
},
|
||||
],
|
||||
},
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
async execute(this: IExecuteFunctions) {
|
||||
const returnDataTrue: INodeExecutionData[] = [];
|
||||
const returnDataFalse: INodeExecutionData[] = [];
|
||||
|
||||
@@ -415,9 +414,7 @@ export const predefinedNodesTypes: INodeTypeData = {
|
||||
},
|
||||
],
|
||||
},
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
// const itemsInput2 = this.getInputData(1);
|
||||
|
||||
async execute(this: IExecuteFunctions) {
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
|
||||
const mode = this.getNodeParameter('mode', 0) as string;
|
||||
@@ -461,9 +458,8 @@ export const predefinedNodesTypes: INodeTypeData = {
|
||||
outputs: ['main'],
|
||||
properties: [],
|
||||
},
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
return this.prepareOutputData(items);
|
||||
async execute(this: IExecuteFunctions) {
|
||||
return [this.getInputData()];
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -507,7 +503,7 @@ export const predefinedNodesTypes: INodeTypeData = {
|
||||
},
|
||||
],
|
||||
},
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
async execute(this: IExecuteFunctions) {
|
||||
const items = this.getInputData();
|
||||
const returnData: INodeExecutionData[] = [];
|
||||
|
||||
@@ -522,7 +518,7 @@ export const predefinedNodesTypes: INodeTypeData = {
|
||||
returnData.push(newItem);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -646,7 +642,7 @@ export const predefinedNodesTypes: INodeTypeData = {
|
||||
},
|
||||
],
|
||||
},
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
async execute(this: IExecuteFunctions) {
|
||||
const items = this.getInputData();
|
||||
|
||||
if (items.length === 0) {
|
||||
@@ -714,7 +710,7 @@ export const predefinedNodesTypes: INodeTypeData = {
|
||||
returnData.push(newItem);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -736,9 +732,7 @@ export const predefinedNodesTypes: INodeTypeData = {
|
||||
properties: [],
|
||||
},
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
return [this.getInputData()];
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -114,7 +114,7 @@ export class MyNode implements INodeType {
|
||||
item.json['myString'] = myString;
|
||||
}
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,6 @@ export class ClassNameReplace implements INodeType {
|
||||
item.json.myString = myString;
|
||||
}
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1199,6 +1199,6 @@ export class ActiveCampaign implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -432,6 +432,6 @@ export class Affinity implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,6 +867,6 @@ export class AirtableV1 implements INodeType {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,5 +55,5 @@ export async function router(this: IExecuteFunctions): Promise<INodeExecutionDat
|
||||
throw error;
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
|
||||
@@ -460,7 +460,7 @@ export class ApiTemplateIo implements INodeType {
|
||||
}
|
||||
|
||||
if (download) {
|
||||
return this.prepareOutputData(returnData as unknown as INodeExecutionData[]);
|
||||
return [returnData as unknown as INodeExecutionData[]];
|
||||
}
|
||||
}
|
||||
} else if (resource === 'pdf') {
|
||||
@@ -549,7 +549,7 @@ export class ApiTemplateIo implements INodeType {
|
||||
}
|
||||
}
|
||||
if (download) {
|
||||
return this.prepareOutputData(returnData as unknown as INodeExecutionData[]);
|
||||
return [returnData as unknown as INodeExecutionData[]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,6 +362,6 @@ export class Automizy implements INodeType {
|
||||
|
||||
returnData.push(...(responseData as NodeExecutionWithMetadata[]));
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,6 +411,6 @@ export class AwsDynamoDB implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -907,9 +907,9 @@ export class AwsS3V1 implements INodeType {
|
||||
}
|
||||
if (resource === 'file' && operation === 'download') {
|
||||
// For file downloads the files get attached to the existing items
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
} else {
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1070,9 +1070,9 @@ export class AwsS3V2 implements INodeType {
|
||||
}
|
||||
if (resource === 'file' && operation === 'download') {
|
||||
// For file downloads the files get attached to the existing items
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
} else {
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1298,6 +1298,6 @@ export class AwsSes implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,5 +66,5 @@ export async function get(this: IExecuteFunctions, index: number) {
|
||||
),
|
||||
};
|
||||
|
||||
return this.prepareOutputData(newItem as unknown as INodeExecutionData[]);
|
||||
return [newItem as unknown as INodeExecutionData[]];
|
||||
}
|
||||
|
||||
@@ -53,5 +53,5 @@ export async function download(this: IExecuteFunctions, index: number) {
|
||||
),
|
||||
};
|
||||
|
||||
return this.prepareOutputData(newItem as unknown as INodeExecutionData[]);
|
||||
return [newItem as unknown as INodeExecutionData[]];
|
||||
}
|
||||
|
||||
@@ -53,5 +53,5 @@ export async function download(this: IExecuteFunctions, index: number) {
|
||||
),
|
||||
};
|
||||
|
||||
return this.prepareOutputData(newItem as unknown as INodeExecutionData[]);
|
||||
return [newItem as unknown as INodeExecutionData[]];
|
||||
}
|
||||
|
||||
@@ -341,6 +341,6 @@ export class Baserow implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,6 +379,6 @@ export class Beeminder implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -218,6 +218,6 @@ export class Bitly implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -568,6 +568,6 @@ export class Bitwarden implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -526,9 +526,9 @@ export class Box implements INodeType {
|
||||
|
||||
if (resource === 'file' && operation === 'download') {
|
||||
// For file downloads the files get attached to the existing items
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
} else {
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ export class Brandfetch implements INodeType {
|
||||
|
||||
if (operation === 'logo' && this.getNodeParameter('download', 0)) {
|
||||
// For file downloads the files get attached to the existing items
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
} else {
|
||||
return [responseData];
|
||||
}
|
||||
|
||||
@@ -179,6 +179,6 @@ export class Bubble implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,6 +633,6 @@ export class Chargebee implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +149,6 @@ export class CircleCi implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,6 +559,6 @@ export class CiscoWebex implements INodeType {
|
||||
// }
|
||||
// }
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,6 +164,6 @@ export class Clearbit implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1636,6 +1636,6 @@ export class ClickUp implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,6 +848,6 @@ export class Clockify implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ export class Coda implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
// https://coda.io/developers/apis/v1beta1#operation/listRows
|
||||
if (operation === 'getAllRows') {
|
||||
@@ -535,7 +535,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
if (resource === 'formula') {
|
||||
@@ -564,7 +564,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/listFormulas
|
||||
if (operation === 'getAll') {
|
||||
@@ -597,7 +597,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
if (resource === 'control') {
|
||||
@@ -626,7 +626,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/listControls
|
||||
if (operation === 'getAll') {
|
||||
@@ -659,7 +659,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
if (resource === 'view') {
|
||||
@@ -676,7 +676,7 @@ export class Coda implements INodeType {
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/listViews
|
||||
if (operation === 'getAll') {
|
||||
@@ -709,7 +709,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
if (operation === 'getAllViewRows') {
|
||||
const docId = this.getNodeParameter('docId', 0) as string;
|
||||
@@ -791,7 +791,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/pushViewButton
|
||||
if (operation === 'pushViewButton') {
|
||||
@@ -820,7 +820,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
if (operation === 'getAllViewColumns') {
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
@@ -853,7 +853,7 @@ export class Coda implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
//https://coda.io/developers/apis/v1beta1#operation/updateViewRow
|
||||
if (operation === 'updateViewRow') {
|
||||
|
||||
@@ -142,7 +142,7 @@ export class Code implements INodeType {
|
||||
standardizeOutput(item.json);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
}
|
||||
|
||||
// ----------------------------------
|
||||
@@ -172,6 +172,6 @@ export class Code implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -485,6 +485,6 @@ export class CoinGecko implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,6 +321,6 @@ export class Compression implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,6 +370,6 @@ export class Contentful implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,6 +492,6 @@ export class ConvertKit implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,6 +633,6 @@ export class Copper implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -387,6 +387,6 @@ export class CrateDb implements INodeType {
|
||||
// Close the connection
|
||||
pgp.end();
|
||||
|
||||
return this.prepareOutputData(returnItems);
|
||||
return [returnItems];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -552,6 +552,6 @@ export class Crypto implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -585,6 +585,6 @@ export class DateTimeV1 implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -213,6 +213,6 @@ export class DateTimeV2 implements INodeType {
|
||||
// Reset responseData
|
||||
responseData.length = 0;
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,6 +369,6 @@ export class DebugHelper implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,6 +270,6 @@ export class Discord implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -436,6 +436,6 @@ export class Discourse implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -761,6 +761,6 @@ export class Disqus implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1017,10 +1017,10 @@ export class Dropbox implements INodeType {
|
||||
|
||||
if (resource === 'file' && operation === 'download') {
|
||||
// For file downloads the files get attached to the existing items
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
} else {
|
||||
// For all other ones does the output items get replaced
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,6 +370,6 @@ export class Dropcontact implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,6 +202,6 @@ export class E2eTest implements INodeType {
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -288,6 +288,6 @@ export class ERPNext implements INodeType {
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1325,6 +1325,6 @@ export class EditImage implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -753,6 +753,6 @@ export class Egoi implements INodeType {
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -590,6 +590,6 @@ export class ElasticSecurity implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -349,6 +349,6 @@ export class Elasticsearch implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,6 +241,6 @@ export class EmailSendV1 implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,5 +267,5 @@ export async function execute(this: IExecuteFunctions): Promise<INodeExecutionDa
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
|
||||
@@ -441,6 +441,6 @@ export class Emelia implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,6 +74,6 @@ export class ErrorTrigger implements INodeType {
|
||||
};
|
||||
}
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,6 @@ export class ExecuteCommand implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnItems);
|
||||
return [returnItems];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,7 +208,7 @@ export class ExecuteWorkflow implements INodeType {
|
||||
return receivedData;
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return this.prepareOutputData([{ json: { error: error.message } }]);
|
||||
return [[{ json: { error: error.message } }]];
|
||||
}
|
||||
|
||||
throw error;
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
import type {
|
||||
IExecuteFunctions,
|
||||
INodeExecutionData,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
import type { IExecuteFunctions, INodeType, INodeTypeDescription } from 'n8n-workflow';
|
||||
|
||||
export class ExecuteWorkflowTrigger implements INodeType {
|
||||
description: INodeTypeDescription = {
|
||||
@@ -49,9 +44,7 @@ export class ExecuteWorkflowTrigger implements INodeType {
|
||||
],
|
||||
};
|
||||
|
||||
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
|
||||
const items = this.getInputData();
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
async execute(this: IExecuteFunctions) {
|
||||
return [this.getInputData()];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -843,6 +843,6 @@ export class FileMaker implements INodeType {
|
||||
}
|
||||
|
||||
await logout.call(this, token as string);
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -269,6 +269,6 @@ export class Flow implements INodeType {
|
||||
);
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1420,6 +1420,6 @@ export class Freshdesk implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1390,6 +1390,6 @@ export class Freshservice implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -994,6 +994,6 @@ export class FreshworksCrm implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -806,7 +806,7 @@ export class Ftp implements INodeType {
|
||||
}
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return this.prepareOutputData([{ json: { error: error.message } }]);
|
||||
return [[{ json: { error: error.message } }]];
|
||||
}
|
||||
|
||||
throw error;
|
||||
|
||||
@@ -224,6 +224,6 @@ return items;`,
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,6 +240,6 @@ return item;`,
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -308,6 +308,6 @@ export class GetResponse implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -359,6 +359,6 @@ export class Ghost implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -500,6 +500,6 @@ export class Git implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnItems);
|
||||
return [returnItems];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2269,7 +2269,7 @@ export class Github implements INodeType {
|
||||
overwriteDataOperationsArray.includes(fullOperation)
|
||||
) {
|
||||
// Return data gets replaced
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
} else {
|
||||
// For all other ones simply return the unchanged items
|
||||
return [items];
|
||||
|
||||
@@ -1766,10 +1766,10 @@ export class Gitlab implements INodeType {
|
||||
overwriteDataOperationsArray.includes(fullOperation)
|
||||
) {
|
||||
// Return data gets replaced
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
} else {
|
||||
// For all other ones simply return the unchanged items
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -652,6 +652,6 @@ export class GoToWebinar implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,6 +302,6 @@ export class GoogleAnalyticsV1 implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,5 +47,5 @@ export async function router(this: IExecuteFunctions): Promise<INodeExecutionDat
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
|
||||
@@ -301,6 +301,6 @@ export class GoogleBigQueryV1 implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,5 +23,5 @@ export async function router(this: IExecuteFunctions): Promise<INodeExecutionDat
|
||||
throw new NodeOperationError(this.getNode(), `The resource "${resource}" is not known`);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
|
||||
@@ -522,6 +522,6 @@ export class GoogleBooks implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -602,6 +602,6 @@ export class GoogleCalendar implements INodeType {
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -559,10 +559,10 @@ export class GoogleChat implements INodeType {
|
||||
|
||||
if (operation === 'download') {
|
||||
// For file downloads the files get attached to the existing items
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
} else {
|
||||
// For all other ones does the output get replaced
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -521,6 +521,6 @@ export class GoogleContacts implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -528,6 +528,6 @@ export class GoogleDocs implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2736,10 +2736,10 @@ export class GoogleDriveV1 implements INodeType {
|
||||
}
|
||||
if (resource === 'file' && operation === 'download') {
|
||||
// For file downloads the files get attached to the existing items
|
||||
return this.prepareOutputData(items);
|
||||
return [items];
|
||||
} else {
|
||||
// For all other ones does the output items get replaced
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,5 +51,5 @@ export async function router(this: IExecuteFunctions): Promise<INodeExecutionDat
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
|
||||
@@ -402,6 +402,6 @@ export class GoogleFirebaseCloudFirestore implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,6 +249,6 @@ export class GoogleFirebaseRealtimeDatabase implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,6 +424,6 @@ export class GSuiteAdmin implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -834,6 +834,6 @@ export class GmailV1 implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -819,8 +819,8 @@ export class GmailV2 implements INodeType {
|
||||
['draft', 'message', 'thread'].includes(resource) &&
|
||||
['get', 'getAll'].includes(operation)
|
||||
) {
|
||||
return this.prepareOutputData(unescapeSnippets(returnData));
|
||||
return [unescapeSnippets(returnData)];
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -282,6 +282,6 @@ export class GooglePerspective implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -141,10 +141,10 @@ export class GoogleSheetsV1 implements INodeType {
|
||||
// TODO: Should add this data somewhere
|
||||
// TODO: Should have something like add metadata which does not get passed through
|
||||
|
||||
return await this.prepareOutputData(items);
|
||||
return [items];
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return this.prepareOutputData([{ json: { error: error.message } }]);
|
||||
return [[{ json: { error: error.message } }]];
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
@@ -156,10 +156,10 @@ export class GoogleSheetsV1 implements INodeType {
|
||||
await sheet.clearData(sheet.encodeRange(range));
|
||||
|
||||
const items = this.getInputData();
|
||||
return await this.prepareOutputData(items);
|
||||
return [items];
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return this.prepareOutputData([{ json: { error: error.message } }]);
|
||||
return [[{ json: { error: error.message } }]];
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
@@ -245,10 +245,10 @@ export class GoogleSheetsV1 implements INodeType {
|
||||
await sheet.spreadsheetBatchUpdate(requests);
|
||||
|
||||
const items = this.getInputData();
|
||||
return await this.prepareOutputData(items);
|
||||
return [items];
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return this.prepareOutputData([{ json: { error: error.message } }]);
|
||||
return [[{ json: { error: error.message } }]];
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
@@ -420,10 +420,10 @@ export class GoogleSheetsV1 implements INodeType {
|
||||
// TODO: Should add this data somewhere
|
||||
// TODO: Should have something like add metadata which does not get passed through
|
||||
|
||||
return await this.prepareOutputData(items);
|
||||
return [items];
|
||||
} catch (error) {
|
||||
if (this.continueOnFail()) {
|
||||
return this.prepareOutputData([{ json: { error: error.message } }]);
|
||||
return [[{ json: { error: error.message } }]];
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
|
||||
@@ -591,6 +591,6 @@ export class GoogleSlides implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -271,6 +271,6 @@ export class GoogleTasks implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,6 +212,6 @@ export class GoogleTranslate implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(responseData);
|
||||
return [responseData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1068,6 +1068,6 @@ export class YouTube implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,6 +225,6 @@ export class Gotify implements INodeType {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -523,6 +523,6 @@ export class GraphQL implements INodeType {
|
||||
}
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnItems);
|
||||
return [returnItems];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,6 +263,6 @@ export class Grist implements INodeType {
|
||||
returnData.push(...executionData);
|
||||
}
|
||||
|
||||
return this.prepareOutputData(returnData);
|
||||
return [returnData];
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user