fix: Add paired item to the most used nodes (#5220)

* PairedItem for N8n training

* Add paired item to ftp node

* Add paired item to rocketChat

* Add pairedItem to pushOver

* Add paired item to Matrix

* Add pairedItem to theHive

* Add paired item to Snowflake

* Add paired item to PhilipsHue

* Add pairedItem to supabase

* Add paired item to Odoo

* fix odoo & add paired item to grist

* add pairedItem to Linkedin

* add pairedItem Zulip

* add pairedItem PhatomBuster

* add pairedItem to TodoistV2

* Add pairedItem HomeAssistant

* Add pairedItem to DropContact

* Add pairedItem to Aws SES

* Add pairedItem to microsoftOutlook

* Add pairedItem to AwsS3

* Add pairedItem to Aws DynamoDB

* 🐛 fix Dropcontact enrich operation paired item support

* 🐛 fix Dropcontact insert/update operation paired items

* 🐛 fix Supabase paired item support

* 🐛 fix Supabase paired item support

* 🐛 fix N8nTrainingCustomerDatastore paired item support

* 🎨 remove unused imports

* 🐛 fix MicrosoftOutlook paired item support

* 🐛 fix AwsS3 paired item support

---------

Co-authored-by: Marcus <marcus@n8n.io>
This commit is contained in:
agobrech
2023-01-31 20:39:20 +01:00
committed by GitHub
parent d87ff130a4
commit 409a9ea357
24 changed files with 661 additions and 253 deletions

View File

@@ -543,17 +543,19 @@ export class Ftp implements INodeType {
if (recursive) {
responseData = await callRecursiveList(path, sftp!, normalizeSFtpItem);
returnItems.push.apply(
returnItems,
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData as unknown as IDataObject[]),
{ itemData: { item: i } },
);
returnItems.push.apply(returnItems, executionData);
} else {
responseData = await sftp!.list(path);
responseData.forEach((item) => normalizeSFtpItem(item, path));
returnItems.push.apply(
returnItems,
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData as unknown as IDataObject[]),
{ itemData: { item: i } },
);
returnItems.push.apply(returnItems, executionData);
}
}
@@ -566,8 +568,11 @@ export class Ftp implements INodeType {
} else {
responseData = await sftp!.delete(path);
}
returnItems.push({ json: { success: true } });
const executionData = this.helpers.constructExecutionMetaData(
[{ json: { success: true } }],
{ itemData: { item: i } },
);
returnItems.push(...executionData);
}
if (operation === 'rename') {
@@ -582,8 +587,11 @@ export class Ftp implements INodeType {
}
responseData = await sftp!.rename(oldPath, newPath);
returnItems.push({ json: { success: true } });
const executionData = this.helpers.constructExecutionMetaData(
[{ json: { success: true } }],
{ itemData: { item: i } },
);
returnItems.push(...executionData);
}
if (operation === 'download') {
@@ -600,7 +608,11 @@ export class Ftp implements INodeType {
filePathDownload,
);
returnItems.push(items[i]);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(items[i]),
{ itemData: { item: i } },
);
returnItems.push(...executionData);
} finally {
await binaryFile.cleanup();
}
@@ -643,7 +655,11 @@ export class Ftp implements INodeType {
await sftp!.put(buffer, remotePath);
}
returnItems.push(items[i]);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(items[i]),
{ itemData: { item: i } },
);
returnItems.push(...executionData);
}
}
@@ -655,19 +671,21 @@ export class Ftp implements INodeType {
if (recursive) {
responseData = await callRecursiveList(path, ftp!, normalizeFtpItem);
returnItems.push.apply(
returnItems,
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData as unknown as IDataObject[]),
{ itemData: { item: i } },
);
returnItems.push.apply(returnItems, executionData);
} else {
responseData = await ftp!.list(path);
responseData.forEach((item) =>
normalizeFtpItem(item as ftpClient.ListingElement, path),
);
returnItems.push.apply(
returnItems,
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(responseData as unknown as IDataObject[]),
{ itemData: { item: i } },
);
returnItems.push.apply(returnItems, executionData);
}
}
@@ -680,8 +698,11 @@ export class Ftp implements INodeType {
} else {
responseData = await ftp!.delete(path);
}
returnItems.push({ json: { success: true } });
const executionData = this.helpers.constructExecutionMetaData(
[{ json: { success: true } }],
{ itemData: { item: i } },
);
returnItems.push(...executionData);
}
if (operation === 'download') {
@@ -699,7 +720,11 @@ export class Ftp implements INodeType {
filePathDownload,
);
returnItems.push(items[i]);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(items[i]),
{ itemData: { item: i } },
);
returnItems.push(...executionData);
} finally {
await binaryFile.cleanup();
}
@@ -711,8 +736,11 @@ export class Ftp implements INodeType {
const newPath = this.getNodeParameter('newPath', i) as string;
responseData = await ftp!.rename(oldPath, newPath);
returnItems.push({ json: { success: true } });
const executionData = this.helpers.constructExecutionMetaData(
[{ json: { success: true } }],
{ itemData: { item: i } },
);
returnItems.push(...executionData);
}
if (operation === 'upload') {
@@ -773,7 +801,11 @@ export class Ftp implements INodeType {
}
}
}
returnItems.push(items[i]);
const executionData = this.helpers.constructExecutionMetaData(
this.helpers.returnJsonArray(items[i]),
{ itemData: { item: i } },
);
returnItems.push(...executionData);
}
}
}