From 6aa7b93473415ec419f386629be6ba72235bb167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Tue, 5 Sep 2023 12:59:02 +0200 Subject: [PATCH] refactor(core): Deprecate `prepareOutputData` (no-changelog) (#7091) --- .../test/integration/shared/utils/index.ts | 12 ++++----- packages/core/src/NodeExecuteFunctions.ts | 4 +-- packages/core/test/helpers/constants.ts | 26 +++++++------------ packages/node-dev/README.md | 2 +- packages/node-dev/templates/execute/simple.ts | 2 +- .../ActiveCampaign/ActiveCampaign.node.ts | 2 +- .../nodes/Affinity/Affinity.node.ts | 2 +- .../nodes/Airtable/v1/AirtableV1.node.ts | 2 +- .../nodes/Airtable/v2/actions/router.ts | 2 +- .../nodes/ApiTemplateIo/ApiTemplateIo.node.ts | 4 +-- .../nodes/Automizy/Automizy.node.ts | 2 +- .../nodes/Aws/DynamoDB/AwsDynamoDB.node.ts | 2 +- .../nodes/Aws/S3/V1/AwsS3V1.node.ts | 4 +-- .../nodes/Aws/S3/V2/AwsS3V2.node.ts | 4 +-- .../nodes-base/nodes/Aws/SES/AwsSes.node.ts | 2 +- .../v1/actions/companyReport/get/execute.ts | 2 +- .../employeeDocument/download/execute.ts | 2 +- .../v1/actions/file/download/execute.ts | 2 +- .../nodes-base/nodes/Baserow/Baserow.node.ts | 2 +- .../nodes/Beeminder/Beeminder.node.ts | 2 +- packages/nodes-base/nodes/Bitly/Bitly.node.ts | 2 +- .../nodes/Bitwarden/Bitwarden.node.ts | 2 +- packages/nodes-base/nodes/Box/Box.node.ts | 4 +-- .../nodes/Brandfetch/Brandfetch.node.ts | 2 +- .../nodes-base/nodes/Bubble/Bubble.node.ts | 2 +- .../nodes/Chargebee/Chargebee.node.ts | 2 +- .../nodes/CircleCi/CircleCi.node.ts | 2 +- .../nodes/Cisco/Webex/CiscoWebex.node.ts | 2 +- .../nodes/Clearbit/Clearbit.node.ts | 2 +- .../nodes-base/nodes/ClickUp/ClickUp.node.ts | 2 +- .../nodes/Clockify/Clockify.node.ts | 2 +- packages/nodes-base/nodes/Coda/Coda.node.ts | 22 ++++++++-------- packages/nodes-base/nodes/Code/Code.node.ts | 4 +-- .../nodes/CoinGecko/CoinGecko.node.ts | 2 +- .../nodes/Compression/Compression.node.ts | 2 +- .../nodes/Contentful/Contentful.node.ts | 2 +- .../nodes/ConvertKit/ConvertKit.node.ts | 2 +- .../nodes-base/nodes/Copper/Copper.node.ts | 2 +- .../nodes-base/nodes/CrateDb/CrateDb.node.ts | 2 +- .../nodes-base/nodes/Crypto/Crypto.node.ts | 2 +- .../nodes/DateTime/V1/DateTimeV1.node.ts | 2 +- .../nodes/DateTime/V2/DateTimeV2.node.ts | 2 +- .../nodes/DebugHelper/DebugHelper.node.ts | 2 +- .../nodes-base/nodes/Discord/Discord.node.ts | 2 +- .../nodes/Discourse/Discourse.node.ts | 2 +- .../nodes-base/nodes/Disqus/Disqus.node.ts | 2 +- .../nodes-base/nodes/Dropbox/Dropbox.node.ts | 4 +-- .../nodes/Dropcontact/Dropcontact.node.ts | 2 +- .../nodes-base/nodes/E2eTest/E2eTest.node.ts | 2 +- .../nodes-base/nodes/ERPNext/ERPNext.node.ts | 2 +- .../nodes/EditImage/EditImage.node.ts | 2 +- packages/nodes-base/nodes/Egoi/Egoi.node.ts | 2 +- .../ElasticSecurity/ElasticSecurity.node.ts | 2 +- .../Elasticsearch/Elasticsearch.node.ts | 2 +- .../nodes/EmailSend/v1/EmailSendV1.node.ts | 2 +- .../nodes/EmailSend/v2/send.operation.ts | 2 +- .../nodes-base/nodes/Emelia/Emelia.node.ts | 2 +- .../nodes/ErrorTrigger/ErrorTrigger.node.ts | 2 +- .../ExecuteCommand/ExecuteCommand.node.ts | 2 +- .../ExecuteWorkflow/ExecuteWorkflow.node.ts | 2 +- .../ExecuteWorkflowTrigger.node.ts | 13 +++------- .../nodes/FileMaker/FileMaker.node.ts | 2 +- packages/nodes-base/nodes/Flow/Flow.node.ts | 2 +- .../nodes/Freshdesk/Freshdesk.node.ts | 2 +- .../nodes/Freshservice/Freshservice.node.ts | 2 +- .../nodes/FreshworksCrm/FreshworksCrm.node.ts | 2 +- packages/nodes-base/nodes/Ftp/Ftp.node.ts | 2 +- .../nodes/Function/Function.node.ts | 2 +- .../nodes/FunctionItem/FunctionItem.node.ts | 2 +- .../nodes/GetResponse/GetResponse.node.ts | 2 +- packages/nodes-base/nodes/Ghost/Ghost.node.ts | 2 +- packages/nodes-base/nodes/Git/Git.node.ts | 2 +- .../nodes-base/nodes/Github/Github.node.ts | 2 +- .../nodes-base/nodes/Gitlab/Gitlab.node.ts | 4 +-- .../nodes/GoToWebinar/GoToWebinar.node.ts | 2 +- .../Analytics/v1/GoogleAnalyticsV1.node.ts | 2 +- .../Google/Analytics/v2/actions/router.ts | 2 +- .../BigQuery/v1/GoogleBigQueryV1.node.ts | 2 +- .../Google/BigQuery/v2/actions/router.ts | 2 +- .../nodes/Google/Books/GoogleBooks.node.ts | 2 +- .../Google/Calendar/GoogleCalendar.node.ts | 2 +- .../nodes/Google/Chat/GoogleChat.node.ts | 4 +-- .../Google/Contacts/GoogleContacts.node.ts | 2 +- .../nodes/Google/Docs/GoogleDocs.node.ts | 2 +- .../Google/Drive/v1/GoogleDriveV1.node.ts | 4 +-- .../nodes/Google/Drive/v2/actions/router.ts | 2 +- .../GoogleFirebaseCloudFirestore.node.ts | 2 +- .../GoogleFirebaseRealtimeDatabase.node.ts | 2 +- .../Google/GSuiteAdmin/GSuiteAdmin.node.ts | 2 +- .../nodes/Google/Gmail/v1/GmailV1.node.ts | 2 +- .../nodes/Google/Gmail/v2/GmailV2.node.ts | 4 +-- .../Perspective/GooglePerspective.node.ts | 2 +- .../Google/Sheet/v1/GoogleSheetsV1.node.ts | 16 ++++++------ .../nodes/Google/Slides/GoogleSlides.node.ts | 2 +- .../nodes/Google/Task/GoogleTasks.node.ts | 2 +- .../Google/Translate/GoogleTranslate.node.ts | 2 +- .../nodes/Google/YouTube/YouTube.node.ts | 2 +- .../nodes-base/nodes/Gotify/Gotify.node.ts | 2 +- .../nodes-base/nodes/GraphQL/GraphQL.node.ts | 2 +- packages/nodes-base/nodes/Grist/Grist.node.ts | 2 +- .../nodes/HackerNews/HackerNews.node.ts | 2 +- .../nodes-base/nodes/HaloPSA/HaloPSA.node.ts | 2 +- .../nodes-base/nodes/Harvest/Harvest.node.ts | 2 +- .../nodes/HelpScout/HelpScout.node.ts | 2 +- .../nodes/HomeAssistant/HomeAssistant.node.ts | 4 +-- packages/nodes-base/nodes/Html/Html.node.ts | 4 +-- .../nodes/HtmlExtract/HtmlExtract.node.ts | 2 +- .../HttpRequest/V1/HttpRequestV1.node.ts | 2 +- .../HttpRequest/V2/HttpRequestV2.node.ts | 2 +- .../HttpRequest/V3/HttpRequestV3.node.ts | 2 +- .../nodes/Hubspot/V1/HubspotV1.node.ts | 2 +- .../nodes/Hubspot/V2/HubspotV2.node.ts | 2 +- .../nodes-base/nodes/Hunter/Hunter.node.ts | 2 +- .../nodes/Intercom/Intercom.node.ts | 2 +- .../nodes/InvoiceNinja/InvoiceNinja.node.ts | 2 +- .../nodes/ItemLists/V1/ItemListsV1.node.ts | 18 ++++++------- .../nodes/ItemLists/V1/summarize.operation.ts | 6 ++--- .../nodes/ItemLists/V2/ItemListsV2.node.ts | 18 ++++++------- .../nodes/ItemLists/V2/summarize.operation.ts | 6 ++--- .../nodes/ItemLists/V3/actions/router.ts | 2 +- packages/nodes-base/nodes/Jira/Jira.node.ts | 2 +- packages/nodes-base/nodes/Keap/Keap.node.ts | 2 +- .../nodes/Kitemaker/Kitemaker.node.ts | 2 +- packages/nodes-base/nodes/Ldap/Ldap.node.ts | 2 +- .../nodes-base/nodes/Lemlist/Lemlist.node.ts | 2 +- packages/nodes-base/nodes/Line/Line.node.ts | 2 +- .../nodes-base/nodes/Linear/Linear.node.ts | 2 +- .../nodes/LinkedIn/LinkedIn.node.ts | 2 +- .../nodes/LoneScale/LoneScale.node.ts | 2 +- .../nodes-base/nodes/Magento/Magento2.node.ts | 2 +- .../nodes/Mailchimp/Mailchimp.node.ts | 2 +- .../nodes/MailerLite/MailerLite.node.ts | 2 +- .../nodes-base/nodes/Mailgun/Mailgun.node.ts | 2 +- .../nodes-base/nodes/Mailjet/Mailjet.node.ts | 2 +- .../nodes/Mandrill/Mandrill.node.ts | 2 +- .../nodes/Marketstack/Marketstack.node.ts | 2 +- .../nodes-base/nodes/Matrix/Matrix.node.ts | 2 +- .../nodes-base/nodes/Mautic/Mautic.node.ts | 2 +- .../Dynamics/MicrosoftDynamicsCrm.node.ts | 2 +- .../Excel/v1/MicrosoftExcelV1.node.ts | 2 +- .../Microsoft/Excel/v2/actions/router.ts | 2 +- .../OneDrive/MicrosoftOneDrive.node.ts | 4 +-- .../Outlook/MicrosoftOutlook.node.ts | 4 +-- .../nodes/Microsoft/Sql/MicrosoftSql.node.ts | 2 +- .../Microsoft/Teams/MicrosoftTeams.node.ts | 2 +- .../Microsoft/ToDo/MicrosoftToDo.node.ts | 2 +- packages/nodes-base/nodes/Misp/Misp.node.ts | 2 +- .../nodes/MondayCom/MondayCom.node.ts | 2 +- .../nodes-base/nodes/MongoDb/MongoDb.node.ts | 2 +- .../nodes/MonicaCrm/MonicaCrm.node.ts | 2 +- .../nodes-base/nodes/MySql/v1/MySqlV1.node.ts | 2 +- .../nodes/MySql/v2/actions/router.ts | 2 +- .../N8nTrainingCustomerDatastore.node.ts | 2 +- .../N8nTrainingCustomerMessenger.node.ts | 2 +- packages/nodes-base/nodes/Nasa/Nasa.node.ts | 6 ++--- .../nodes-base/nodes/Netlify/Netlify.node.ts | 2 +- .../nodes/NextCloud/NextCloud.node.ts | 2 +- packages/nodes-base/nodes/NoOp/NoOp.node.ts | 2 +- .../nodes-base/nodes/NocoDB/NocoDB.node.ts | 4 +-- .../nodes/Notion/v1/NotionV1.node.ts | 2 +- .../nodes/Notion/v2/NotionV2.node.ts | 2 +- packages/nodes-base/nodes/Odoo/Odoo.node.ts | 2 +- .../nodes/OneSimpleApi/OneSimpleApi.node.ts | 2 +- .../nodes/OpenThesaurus/OpenThesaurus.node.ts | 2 +- .../OpenWeatherMap/OpenWeatherMap.node.ts | 2 +- packages/nodes-base/nodes/Orbit/Orbit.node.ts | 2 +- .../nodes-base/nodes/Paddle/Paddle.node.ts | 2 +- .../nodes/PagerDuty/PagerDuty.node.ts | 2 +- .../nodes-base/nodes/PayPal/PayPal.node.ts | 2 +- .../nodes/Phantombuster/Phantombuster.node.ts | 2 +- .../nodes/PhilipsHue/PhilipsHue.node.ts | 2 +- .../nodes/Pipedrive/Pipedrive.node.ts | 4 +-- .../nodes/Postgres/v1/PostgresV1.node.ts | 2 +- .../nodes/Postgres/v2/actions/router.ts | 2 +- .../nodes/Pushbullet/Pushbullet.node.ts | 2 +- .../nodes/Pushover/Pushover.node.ts | 2 +- .../nodes-base/nodes/QuestDb/QuestDb.node.ts | 2 +- .../nodes/QuickBase/QuickBase.node.ts | 4 +-- .../nodes/QuickBooks/QuickBooks.node.ts | 4 +-- .../nodes/QuickChart/QuickChart.node.ts | 24 +++++++++-------- .../nodes/RabbitMQ/RabbitMQ.node.ts | 4 +-- .../ReadBinaryFile/ReadBinaryFile.node.ts | 2 +- .../ReadBinaryFiles/ReadBinaryFiles.node.ts | 2 +- .../nodes-base/nodes/ReadPdf/ReadPDF.node.ts | 2 +- .../nodes-base/nodes/Reddit/Reddit.node.ts | 2 +- packages/nodes-base/nodes/Redis/Redis.node.ts | 4 +-- .../RespondToWebhook/RespondToWebhook.node.ts | 2 +- .../nodes/Rocketchat/Rocketchat.node.ts | 2 +- .../nodes/RssFeedRead/RssFeedRead.node.ts | 2 +- packages/nodes-base/nodes/S3/S3.node.ts | 4 +-- .../nodes/Salesforce/Salesforce.node.ts | 2 +- .../nodes/Salesmate/Salesmate.node.ts | 2 +- .../nodes/SeaTable/SeaTable.node.ts | 2 +- .../SecurityScorecard.node.ts | 2 +- .../nodes/SendGrid/SendGrid.node.ts | 2 +- .../nodes/SentryIo/SentryIo.node.ts | 2 +- .../nodes/ServiceNow/ServiceNow.node.ts | 4 +-- packages/nodes-base/nodes/Set/Set.node.ts | 2 +- .../nodes-base/nodes/Shopify/Shopify.node.ts | 2 +- .../nodes-base/nodes/Slack/V1/SlackV1.node.ts | 2 +- .../nodes-base/nodes/Slack/V2/SlackV2.node.ts | 2 +- .../nodes/Snowflake/Snowflake.node.ts | 2 +- .../nodes-base/nodes/Spotify/Spotify.node.ts | 2 +- .../SpreadsheetFile/SpreadsheetFile.node.ts | 8 +++--- packages/nodes-base/nodes/Ssh/Ssh.node.ts | 4 +-- .../nodes-base/nodes/Stackby/Stackby.node.ts | 2 +- packages/nodes-base/nodes/Start/Start.node.ts | 2 +- .../nodes/StickyNote/StickyNote.node.ts | 2 +- .../nodes/Storyblok/Storyblok.node.ts | 2 +- .../nodes-base/nodes/Strapi/Strapi.node.ts | 2 +- .../nodes-base/nodes/Strava/Strava.node.ts | 2 +- .../nodes-base/nodes/Stripe/Stripe.node.ts | 2 +- .../nodes/Supabase/Supabase.node.ts | 2 +- .../nodes/SyncroMSP/v1/actions/router.ts | 2 +- packages/nodes-base/nodes/Taiga/Taiga.node.ts | 2 +- .../nodes/Tapfiliate/Tapfiliate.node.ts | 2 +- .../nodes/Telegram/Telegram.node.ts | 2 +- .../nodes-base/nodes/TheHive/TheHive.node.ts | 2 +- .../nodes/TimescaleDb/TimescaleDb.node.ts | 2 +- .../nodes/Todoist/v2/TodoistV2.node.ts | 2 +- packages/nodes-base/nodes/Totp/Totp.node.ts | 2 +- .../nodes/TravisCi/TravisCi.node.ts | 2 +- .../nodes-base/nodes/Trello/Trello.node.ts | 2 +- .../nodes/Twitter/V1/TwitterV1.node.ts | 2 +- .../nodes/Twitter/V2/TwitterV2.node.ts | 2 +- .../UnleashedSoftware.node.ts | 2 +- .../nodes-base/nodes/Webflow/Webflow.node.ts | 2 +- packages/nodes-base/nodes/Wise/Wise.node.ts | 2 +- .../nodes/WooCommerce/WooCommerce.node.ts | 2 +- .../nodes/Wordpress/Wordpress.node.ts | 2 +- .../WriteBinaryFile/WriteBinaryFile.node.ts | 2 +- packages/nodes-base/nodes/Xero/Xero.node.ts | 2 +- packages/nodes-base/nodes/Xml/Xml.node.ts | 2 +- .../nodes-base/nodes/Zammad/Zammad.node.ts | 2 +- .../nodes-base/nodes/Zendesk/Zendesk.node.ts | 2 +- .../nodes-base/nodes/Zoho/ZohoCrm.node.ts | 2 +- packages/nodes-base/nodes/Zoom/Zoom.node.ts | 2 +- packages/nodes-base/nodes/Zulip/Zulip.node.ts | 2 +- packages/workflow/src/Interfaces.ts | 11 +++----- packages/workflow/src/NodeHelpers.ts | 22 ---------------- packages/workflow/src/Workflow.ts | 2 -- 241 files changed, 331 insertions(+), 379 deletions(-) diff --git a/packages/cli/test/integration/shared/utils/index.ts b/packages/cli/test/integration/shared/utils/index.ts index 01ecb0154b..f526ccbbab 100644 --- a/packages/cli/test/integration/shared/utils/index.ts +++ b/packages/cli/test/integration/shared/utils/index.ts @@ -109,10 +109,8 @@ export async function initNodeTypes() { outputs: ['main'], properties: [], }, - async execute(this: IExecuteFunctions): Promise { - 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 { + 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 { + 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]; }, }, }, diff --git a/packages/core/src/NodeExecuteFunctions.ts b/packages/core/src/NodeExecuteFunctions.ts index af000e91cc..b6757384bb 100644 --- a/packages/core/src/NodeExecuteFunctions.ts +++ b/packages/core/src/NodeExecuteFunctions.ts @@ -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 { 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), diff --git a/packages/core/test/helpers/constants.ts b/packages/core/test/helpers/constants.ts index 92dcd50cb4..a566ba8a72 100644 --- a/packages/core/test/helpers/constants.ts +++ b/packages/core/test/helpers/constants.ts @@ -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 { + async execute(this: IExecuteFunctions) { const returnDataTrue: INodeExecutionData[] = []; const returnDataFalse: INodeExecutionData[] = []; @@ -415,9 +414,7 @@ export const predefinedNodesTypes: INodeTypeData = { }, ], }, - async execute(this: IExecuteFunctions): Promise { - // 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 { - 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 { + 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 { + 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 { - const items = this.getInputData(); - - return this.prepareOutputData(items); + return [this.getInputData()]; }, }, }, diff --git a/packages/node-dev/README.md b/packages/node-dev/README.md index 6227da0a21..3ad2321a7d 100644 --- a/packages/node-dev/README.md +++ b/packages/node-dev/README.md @@ -114,7 +114,7 @@ export class MyNode implements INodeType { item.json['myString'] = myString; } - return this.prepareOutputData(items); + return [items]; } } diff --git a/packages/node-dev/templates/execute/simple.ts b/packages/node-dev/templates/execute/simple.ts index e48bb62a89..82975677ed 100644 --- a/packages/node-dev/templates/execute/simple.ts +++ b/packages/node-dev/templates/execute/simple.ts @@ -48,6 +48,6 @@ export class ClassNameReplace implements INodeType { item.json.myString = myString; } - return this.prepareOutputData(items); + return [items]; } } diff --git a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts index 8c5a9b6d78..54de0588d9 100644 --- a/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts +++ b/packages/nodes-base/nodes/ActiveCampaign/ActiveCampaign.node.ts @@ -1199,6 +1199,6 @@ export class ActiveCampaign implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Affinity/Affinity.node.ts b/packages/nodes-base/nodes/Affinity/Affinity.node.ts index 4cabe419b4..21c8eb123a 100644 --- a/packages/nodes-base/nodes/Affinity/Affinity.node.ts +++ b/packages/nodes-base/nodes/Affinity/Affinity.node.ts @@ -432,6 +432,6 @@ export class Affinity implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts b/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts index 3ed973c4fe..9b78b57e53 100644 --- a/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts +++ b/packages/nodes-base/nodes/Airtable/v1/AirtableV1.node.ts @@ -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]; } } diff --git a/packages/nodes-base/nodes/Airtable/v2/actions/router.ts b/packages/nodes-base/nodes/Airtable/v2/actions/router.ts index 64262e0861..ac1216a680 100644 --- a/packages/nodes-base/nodes/Airtable/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Airtable/v2/actions/router.ts @@ -55,5 +55,5 @@ export async function router(this: IExecuteFunctions): Promise { - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts b/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts index a328f79abb..c5929abc82 100644 --- a/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts +++ b/packages/nodes-base/nodes/ERPNext/ERPNext.node.ts @@ -288,6 +288,6 @@ export class ERPNext implements INodeType { ); returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/EditImage/EditImage.node.ts b/packages/nodes-base/nodes/EditImage/EditImage.node.ts index 0266e0b23b..dff2c1a555 100644 --- a/packages/nodes-base/nodes/EditImage/EditImage.node.ts +++ b/packages/nodes-base/nodes/EditImage/EditImage.node.ts @@ -1325,6 +1325,6 @@ export class EditImage implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Egoi/Egoi.node.ts b/packages/nodes-base/nodes/Egoi/Egoi.node.ts index 0ebe6e657c..5fae285cdf 100644 --- a/packages/nodes-base/nodes/Egoi/Egoi.node.ts +++ b/packages/nodes-base/nodes/Egoi/Egoi.node.ts @@ -753,6 +753,6 @@ export class Egoi implements INodeType { ); returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts b/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts index 235d6967e7..af73b44283 100644 --- a/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts +++ b/packages/nodes-base/nodes/Elastic/ElasticSecurity/ElasticSecurity.node.ts @@ -590,6 +590,6 @@ export class ElasticSecurity implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts b/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts index 3b49e88836..22c5c1c87f 100644 --- a/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts +++ b/packages/nodes-base/nodes/Elastic/Elasticsearch/Elasticsearch.node.ts @@ -349,6 +349,6 @@ export class Elasticsearch implements INodeType { returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts b/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts index 463052a487..12a4fa164c 100644 --- a/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts +++ b/packages/nodes-base/nodes/EmailSend/v1/EmailSendV1.node.ts @@ -241,6 +241,6 @@ export class EmailSendV1 implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts b/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts index 8b40d51746..c8acb96e6f 100644 --- a/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts +++ b/packages/nodes-base/nodes/EmailSend/v2/send.operation.ts @@ -267,5 +267,5 @@ export async function execute(this: IExecuteFunctions): Promise { - const items = this.getInputData(); - - return this.prepareOutputData(items); + async execute(this: IExecuteFunctions) { + return [this.getInputData()]; } } diff --git a/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts b/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts index fb438bac54..04bf68c792 100644 --- a/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts +++ b/packages/nodes-base/nodes/FileMaker/FileMaker.node.ts @@ -843,6 +843,6 @@ export class FileMaker implements INodeType { } await logout.call(this, token as string); - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Flow/Flow.node.ts b/packages/nodes-base/nodes/Flow/Flow.node.ts index 277f527e62..c39a37d798 100644 --- a/packages/nodes-base/nodes/Flow/Flow.node.ts +++ b/packages/nodes-base/nodes/Flow/Flow.node.ts @@ -269,6 +269,6 @@ export class Flow implements INodeType { ); returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts index dbeb8d14d6..d368fd060e 100644 --- a/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts +++ b/packages/nodes-base/nodes/Freshdesk/Freshdesk.node.ts @@ -1420,6 +1420,6 @@ export class Freshdesk implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts index 54b168461f..03036ff288 100644 --- a/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts +++ b/packages/nodes-base/nodes/Freshservice/Freshservice.node.ts @@ -1390,6 +1390,6 @@ export class Freshservice implements INodeType { returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts index 61d9cac506..bbba70978c 100644 --- a/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts +++ b/packages/nodes-base/nodes/FreshworksCrm/FreshworksCrm.node.ts @@ -994,6 +994,6 @@ export class FreshworksCrm implements INodeType { returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Ftp/Ftp.node.ts b/packages/nodes-base/nodes/Ftp/Ftp.node.ts index 5d5520be08..e807dd833c 100644 --- a/packages/nodes-base/nodes/Ftp/Ftp.node.ts +++ b/packages/nodes-base/nodes/Ftp/Ftp.node.ts @@ -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; diff --git a/packages/nodes-base/nodes/Function/Function.node.ts b/packages/nodes-base/nodes/Function/Function.node.ts index 769c12fcec..0475157702 100644 --- a/packages/nodes-base/nodes/Function/Function.node.ts +++ b/packages/nodes-base/nodes/Function/Function.node.ts @@ -224,6 +224,6 @@ return items;`, } } - return this.prepareOutputData(items); + return [items]; } } diff --git a/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts b/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts index 6733a2b36d..85d4c76dd2 100644 --- a/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts +++ b/packages/nodes-base/nodes/FunctionItem/FunctionItem.node.ts @@ -240,6 +240,6 @@ return item;`, throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts b/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts index dae8088bf4..5a7c1dfc83 100644 --- a/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts +++ b/packages/nodes-base/nodes/GetResponse/GetResponse.node.ts @@ -308,6 +308,6 @@ export class GetResponse implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Ghost/Ghost.node.ts b/packages/nodes-base/nodes/Ghost/Ghost.node.ts index df9112c225..36733028cb 100644 --- a/packages/nodes-base/nodes/Ghost/Ghost.node.ts +++ b/packages/nodes-base/nodes/Ghost/Ghost.node.ts @@ -359,6 +359,6 @@ export class Ghost implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Git/Git.node.ts b/packages/nodes-base/nodes/Git/Git.node.ts index 7c8a69c5f3..5e684a0643 100644 --- a/packages/nodes-base/nodes/Git/Git.node.ts +++ b/packages/nodes-base/nodes/Git/Git.node.ts @@ -500,6 +500,6 @@ export class Git implements INodeType { } } - return this.prepareOutputData(returnItems); + return [returnItems]; } } diff --git a/packages/nodes-base/nodes/Github/Github.node.ts b/packages/nodes-base/nodes/Github/Github.node.ts index e74084462b..8de0b9ed49 100644 --- a/packages/nodes-base/nodes/Github/Github.node.ts +++ b/packages/nodes-base/nodes/Github/Github.node.ts @@ -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]; diff --git a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts index aa928d7957..67203495c2 100644 --- a/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts +++ b/packages/nodes-base/nodes/Gitlab/Gitlab.node.ts @@ -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]; } } } diff --git a/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts b/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts index a3d64c9fd2..db1396794a 100644 --- a/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts +++ b/packages/nodes-base/nodes/GoToWebinar/GoToWebinar.node.ts @@ -652,6 +652,6 @@ export class GoToWebinar implements INodeType { returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts b/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts index 045b22b210..7ac4c9517b 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v1/GoogleAnalyticsV1.node.ts @@ -302,6 +302,6 @@ export class GoogleAnalyticsV1 implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Google/Analytics/v2/actions/router.ts b/packages/nodes-base/nodes/Google/Analytics/v2/actions/router.ts index 47ded6e2a4..1d9cae9900 100644 --- a/packages/nodes-base/nodes/Google/Analytics/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Google/Analytics/v2/actions/router.ts @@ -47,5 +47,5 @@ export async function router(this: IExecuteFunctions): Promise item.json); const destinationFieldName = this.getNodeParameter('destinationFieldName', 0) as string; @@ -1096,9 +1096,7 @@ return 0;`, }, [] as IDataObject[]); } - const output: INodeExecutionData = { json: { [destinationFieldName]: newItems } }; - - return this.prepareOutputData([output]); + return [[{ json: { [destinationFieldName]: newItems } }]]; } } else if (operation === 'removeDuplicates') { const compare = this.getNodeParameter('compare', 0) as string; @@ -1245,7 +1243,7 @@ return 0;`, } // return the filtered items - return this.prepareOutputData(data); + return [data]; } else if (operation === 'sort') { let newItems = [...items]; const type = this.getNodeParameter('type', 0) as string; @@ -1257,7 +1255,7 @@ return 0;`, if (type === 'random') { shuffleArray(newItems); - return this.prepareOutputData(newItems); + return [newItems]; } if (type === 'simple') { @@ -1369,14 +1367,14 @@ return 0;`, } else { newItems = sortByCode.call(this, newItems); } - return this.prepareOutputData(newItems); + return [newItems]; } else if (operation === 'limit') { let newItems = items; const maxItems = this.getNodeParameter('maxItems', 0) as number; const keep = this.getNodeParameter('keep', 0) as string; if (maxItems > items.length) { - return this.prepareOutputData(newItems); + return [newItems]; } if (keep === 'firstItems') { @@ -1384,7 +1382,7 @@ return 0;`, } else { newItems = items.slice(items.length - maxItems, items.length); } - return this.prepareOutputData(newItems); + return [newItems]; } else if (operation === 'summarize') { return summarize.execute.call(this, items); } else { diff --git a/packages/nodes-base/nodes/ItemLists/V1/summarize.operation.ts b/packages/nodes-base/nodes/ItemLists/V1/summarize.operation.ts index e1c47cb3ca..c1f5b0d43f 100644 --- a/packages/nodes-base/nodes/ItemLists/V1/summarize.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V1/summarize.operation.ts @@ -555,7 +555,7 @@ export async function execute( item: index, })), }; - return this.prepareOutputData([executionData]); + return [[executionData]]; } else { if (!fieldsToSplitBy.length) { const { pairedItems, ...json } = aggregationResult; @@ -565,7 +565,7 @@ export async function execute( item: index, })), }; - return this.prepareOutputData([executionData]); + return [[executionData]]; } const returnData = aggregationToArray(aggregationResult, fieldsToSplitBy); const executionData = returnData.map((item) => { @@ -577,6 +577,6 @@ export async function execute( })), }; }); - return this.prepareOutputData(executionData); + return [executionData]; } } diff --git a/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts b/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts index 23c14a156f..4efb60e262 100644 --- a/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts +++ b/packages/nodes-base/nodes/ItemLists/V2/ItemListsV2.node.ts @@ -957,7 +957,7 @@ return 0;`, } } - return this.prepareOutputData(returnData); + return [returnData]; } else if (operation === 'aggregateItems') { const aggregate = this.getNodeParameter('aggregate', 0, '') as string; @@ -1100,7 +1100,7 @@ return 0;`, returnData.push(newItem); - return this.prepareOutputData(returnData); + return [returnData]; } else { let newItems: IDataObject[] = items.map((item) => item.json); const destinationFieldName = this.getNodeParameter('destinationFieldName', 0) as string; @@ -1136,9 +1136,7 @@ return 0;`, }, [] as IDataObject[]); } - const output: INodeExecutionData = { json: { [destinationFieldName]: newItems } }; - - return this.prepareOutputData([output]); + return [[{ json: { [destinationFieldName]: newItems } }]]; } } else if (operation === 'removeDuplicates') { const compare = this.getNodeParameter('compare', 0) as string; @@ -1285,7 +1283,7 @@ return 0;`, } // return the filtered items - return this.prepareOutputData(data); + return [data]; } else if (operation === 'sort') { let newItems = [...items]; const type = this.getNodeParameter('type', 0) as string; @@ -1297,7 +1295,7 @@ return 0;`, if (type === 'random') { shuffleArray(newItems); - return this.prepareOutputData(newItems); + return [newItems]; } if (type === 'simple') { @@ -1409,14 +1407,14 @@ return 0;`, } else { newItems = sortByCode.call(this, newItems); } - return this.prepareOutputData(newItems); + return [newItems]; } else if (operation === 'limit') { let newItems = items; const maxItems = this.getNodeParameter('maxItems', 0) as number; const keep = this.getNodeParameter('keep', 0) as string; if (maxItems > items.length) { - return this.prepareOutputData(newItems); + return [newItems]; } if (keep === 'firstItems') { @@ -1424,7 +1422,7 @@ return 0;`, } else { newItems = items.slice(items.length - maxItems, items.length); } - return this.prepareOutputData(newItems); + return [newItems]; } else if (operation === 'summarize') { return summarize.execute.call(this, items); } else { diff --git a/packages/nodes-base/nodes/ItemLists/V2/summarize.operation.ts b/packages/nodes-base/nodes/ItemLists/V2/summarize.operation.ts index 6bb7c5419e..f29df77035 100644 --- a/packages/nodes-base/nodes/ItemLists/V2/summarize.operation.ts +++ b/packages/nodes-base/nodes/ItemLists/V2/summarize.operation.ts @@ -591,7 +591,7 @@ export async function execute( item: index, })), }; - return this.prepareOutputData([executionData]); + return [[executionData]]; } else { if (!fieldsToSplitBy.length) { const { pairedItems, ...json } = aggregationResult; @@ -601,7 +601,7 @@ export async function execute( item: index, })), }; - return this.prepareOutputData([executionData]); + return [[executionData]]; } const returnData = aggregationToArray(aggregationResult, fieldsToSplitBy); const executionData = returnData.map((item) => { @@ -613,6 +613,6 @@ export async function execute( })), }; }); - return this.prepareOutputData(executionData); + return [executionData]; } } diff --git a/packages/nodes-base/nodes/ItemLists/V3/actions/router.ts b/packages/nodes-base/nodes/ItemLists/V3/actions/router.ts index a5f24e6b86..006d4f9b87 100644 --- a/packages/nodes-base/nodes/ItemLists/V3/actions/router.ts +++ b/packages/nodes-base/nodes/ItemLists/V3/actions/router.ts @@ -31,5 +31,5 @@ export async function router(this: IExecuteFunctions): Promise { const items = this.getInputData(); - return this.prepareOutputData(items); + return [items]; } } diff --git a/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts b/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts index 85dca04833..b1eddae550 100644 --- a/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts +++ b/packages/nodes-base/nodes/NocoDB/NocoDB.node.ts @@ -456,7 +456,7 @@ export class NocoDB implements INodeType { } } - return this.prepareOutputData(returnData as INodeExecutionData[]); + return [returnData as INodeExecutionData[]]; } if (operation === 'get') { @@ -534,7 +534,7 @@ export class NocoDB implements INodeType { throw new NodeApiError(this.getNode(), error as JsonObject, { itemIndex: i }); } } - return this.prepareOutputData(newItems); + return [newItems]; } if (operation === 'update') { diff --git a/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts b/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts index 771a9b6d43..13c3c1b7cb 100644 --- a/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts +++ b/packages/nodes-base/nodes/Notion/v1/NotionV1.node.ts @@ -625,6 +625,6 @@ export class NotionV1 implements INodeType { } } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts index fa55c4ce2a..00987c7f86 100644 --- a/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts +++ b/packages/nodes-base/nodes/Notion/v2/NotionV2.node.ts @@ -768,6 +768,6 @@ export class NotionV2 implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Odoo/Odoo.node.ts b/packages/nodes-base/nodes/Odoo/Odoo.node.ts index 35ce0fa5ae..925579c8f6 100644 --- a/packages/nodes-base/nodes/Odoo/Odoo.node.ts +++ b/packages/nodes-base/nodes/Odoo/Odoo.node.ts @@ -765,6 +765,6 @@ export class Odoo implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts b/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts index 7f133b4c05..32445e0b1e 100644 --- a/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts +++ b/packages/nodes-base/nodes/OneSimpleApi/OneSimpleApi.node.ts @@ -873,7 +873,7 @@ export class OneSimpleApi implements INodeType { } if (download) { - return this.prepareOutputData(returnData as unknown as INodeExecutionData[]); + return [returnData as unknown as INodeExecutionData[]]; } return [this.helpers.returnJsonArray(returnData)]; diff --git a/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts b/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts index aab2b8577d..e4276118b9 100644 --- a/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts +++ b/packages/nodes-base/nodes/OpenThesaurus/OpenThesaurus.node.ts @@ -183,6 +183,6 @@ export class OpenThesaurus implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts b/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts index 04fcb30670..77ffe88abc 100644 --- a/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts +++ b/packages/nodes-base/nodes/OpenWeatherMap/OpenWeatherMap.node.ts @@ -288,6 +288,6 @@ export class OpenWeatherMap implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Orbit/Orbit.node.ts b/packages/nodes-base/nodes/Orbit/Orbit.node.ts index 6c6c0a0e74..46a199fed4 100644 --- a/packages/nodes-base/nodes/Orbit/Orbit.node.ts +++ b/packages/nodes-base/nodes/Orbit/Orbit.node.ts @@ -542,6 +542,6 @@ export class Orbit implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Paddle/Paddle.node.ts b/packages/nodes-base/nodes/Paddle/Paddle.node.ts index a6951cb244..334b1df2cd 100644 --- a/packages/nodes-base/nodes/Paddle/Paddle.node.ts +++ b/packages/nodes-base/nodes/Paddle/Paddle.node.ts @@ -538,6 +538,6 @@ export class Paddle implements INodeType { returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts b/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts index 2acb143d19..e5a8154ad8 100644 --- a/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts +++ b/packages/nodes-base/nodes/PagerDuty/PagerDuty.node.ts @@ -472,6 +472,6 @@ export class PagerDuty implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/PayPal/PayPal.node.ts b/packages/nodes-base/nodes/PayPal/PayPal.node.ts index 856ab8822b..cb4ea65f0c 100644 --- a/packages/nodes-base/nodes/PayPal/PayPal.node.ts +++ b/packages/nodes-base/nodes/PayPal/PayPal.node.ts @@ -253,6 +253,6 @@ export class PayPal implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts b/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts index 473954c744..afb351f9f2 100644 --- a/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts +++ b/packages/nodes-base/nodes/Phantombuster/Phantombuster.node.ts @@ -263,6 +263,6 @@ export class Phantombuster implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts b/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts index f3a31360ba..b9ef5cffa2 100644 --- a/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts +++ b/packages/nodes-base/nodes/PhilipsHue/PhilipsHue.node.ts @@ -181,6 +181,6 @@ export class PhilipsHue implements INodeType { ); returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts index 4d21400ecb..7ae6d1997b 100644 --- a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts @@ -4956,10 +4956,10 @@ export class Pipedrive 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]; } } } diff --git a/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts b/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts index c7b7979a8d..44a192abfe 100644 --- a/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts +++ b/packages/nodes-base/nodes/Postgres/v1/PostgresV1.node.ts @@ -421,6 +421,6 @@ export class PostgresV1 implements INodeType { // Close the connection pgp.end(); - return this.prepareOutputData(returnItems); + return [returnItems]; } } diff --git a/packages/nodes-base/nodes/Postgres/v2/actions/router.ts b/packages/nodes-base/nodes/Postgres/v2/actions/router.ts index 632a0da04b..f6d62787f1 100644 --- a/packages/nodes-base/nodes/Postgres/v2/actions/router.ts +++ b/packages/nodes-base/nodes/Postgres/v2/actions/router.ts @@ -61,5 +61,5 @@ export async function router(this: IExecuteFunctions): Promise value.includes('/')) : undefined; - return this.prepareOutputData([ - { - binary: { - [output]: await this.helpers.prepareBinaryData( - response.body as Buffer, - undefined, - mimeType, - ), + return [ + [ + { + binary: { + [output]: await this.helpers.prepareBinaryData( + response.body as Buffer, + undefined, + mimeType, + ), + }, + json: { chart }, }, - json: { chart }, - }, - ]); + ], + ]; } } diff --git a/packages/nodes-base/nodes/RabbitMQ/RabbitMQ.node.ts b/packages/nodes-base/nodes/RabbitMQ/RabbitMQ.node.ts index 92a1ffece2..12a3396e86 100644 --- a/packages/nodes-base/nodes/RabbitMQ/RabbitMQ.node.ts +++ b/packages/nodes-base/nodes/RabbitMQ/RabbitMQ.node.ts @@ -416,7 +416,7 @@ export class RabbitMQ implements INodeType { const operation = this.getNodeParameter('operation', 0); if (operation === 'deleteMessage') { this.sendResponse(items[0].json); - return await this.prepareOutputData(items); + return [items]; } const mode = (this.getNodeParameter('mode', 0) as string) || 'queue'; const returnItems: INodeExecutionData[] = []; @@ -556,7 +556,7 @@ export class RabbitMQ implements INodeType { throw new NodeOperationError(this.getNode(), `The operation "${mode}" is not known!`); } - return await this.prepareOutputData(returnItems); + return [returnItems]; } catch (error) { if (channel) { await channel.close(); diff --git a/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts b/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts index 03aa9005e6..13d5678b8f 100644 --- a/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFile/ReadBinaryFile.node.ts @@ -89,6 +89,6 @@ export class ReadBinaryFile implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts b/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts index 78887d0f16..42276f973f 100644 --- a/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts +++ b/packages/nodes-base/nodes/ReadBinaryFiles/ReadBinaryFiles.node.ts @@ -62,6 +62,6 @@ export class ReadBinaryFiles implements INodeType { }); } - return this.prepareOutputData(items); + return [items]; } } diff --git a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts index 0379f06293..b638862970 100644 --- a/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts +++ b/packages/nodes-base/nodes/ReadPdf/ReadPDF.node.ts @@ -138,6 +138,6 @@ export class ReadPDF implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Reddit/Reddit.node.ts b/packages/nodes-base/nodes/Reddit/Reddit.node.ts index 0980361273..6c29f9791d 100644 --- a/packages/nodes-base/nodes/Reddit/Reddit.node.ts +++ b/packages/nodes-base/nodes/Reddit/Reddit.node.ts @@ -440,6 +440,6 @@ export class Reddit implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Redis/Redis.node.ts b/packages/nodes-base/nodes/Redis/Redis.node.ts index 9fd9439dc4..9b58837c22 100644 --- a/packages/nodes-base/nodes/Redis/Redis.node.ts +++ b/packages/nodes-base/nodes/Redis/Redis.node.ts @@ -707,7 +707,7 @@ export class Redis implements INodeType { const clientInfo = util.promisify(client.info).bind(client); const result = await clientInfo(); - resolve(this.prepareOutputData([{ json: convertInfoToObject(result as string) }])); + resolve([[{ json: convertInfoToObject(result as string) }]]); client.quit(); } else if ( ['delete', 'get', 'keys', 'set', 'incr', 'publish', 'push', 'pop'].includes(operation) @@ -838,7 +838,7 @@ export class Redis implements INodeType { } client.quit(); - resolve(this.prepareOutputData(returnItems)); + resolve([returnItems]); } } catch (error) { reject(error); diff --git a/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts b/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts index 699dd40a52..f3c42a15ab 100644 --- a/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts +++ b/packages/nodes-base/nodes/RespondToWebhook/RespondToWebhook.node.ts @@ -261,6 +261,6 @@ export class RespondToWebhook implements INodeType { this.sendResponse(response); - return this.prepareOutputData(items); + return [items]; } } diff --git a/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts b/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts index 7c1dbce58e..623ba17788 100644 --- a/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts +++ b/packages/nodes-base/nodes/Rocketchat/Rocketchat.node.ts @@ -495,6 +495,6 @@ export class Rocketchat implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts index af4b2621a9..ff1df919a8 100644 --- a/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts +++ b/packages/nodes-base/nodes/RssFeedRead/RssFeedRead.node.ts @@ -109,7 +109,7 @@ export class RssFeedRead implements INodeType { return [this.helpers.returnJsonArray(returnData)]; } catch (error) { if (this.continueOnFail()) { - return this.prepareOutputData([{ json: { error: error.message } }]); + return [[{ json: { error: error.message } }]]; } throw error; } diff --git a/packages/nodes-base/nodes/S3/S3.node.ts b/packages/nodes-base/nodes/S3/S3.node.ts index 5ddce6ac5e..9532a35e9f 100644 --- a/packages/nodes-base/nodes/S3/S3.node.ts +++ b/packages/nodes-base/nodes/S3/S3.node.ts @@ -902,9 +902,9 @@ export class S3 implements INodeType { } if (resource === 'file' && operation === 'download') { // For file downloads the files get attached to the existing items - return this.prepareOutputData(items); + return [items]; } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts index 976f65f894..380bf0daac 100644 --- a/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts +++ b/packages/nodes-base/nodes/Salesforce/Salesforce.node.ts @@ -3082,6 +3082,6 @@ export class Salesforce implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts b/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts index e23773358f..820f46f7f5 100644 --- a/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts +++ b/packages/nodes-base/nodes/Salesmate/Salesmate.node.ts @@ -789,6 +789,6 @@ export class Salesmate implements INodeType { returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts index 2c40e3bd47..4f8f55b856 100644 --- a/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts +++ b/packages/nodes-base/nodes/SeaTable/SeaTable.node.ts @@ -446,6 +446,6 @@ export class SeaTable implements INodeType { throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`); } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts index 2deb1de4ad..3e2d491a78 100644 --- a/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts +++ b/packages/nodes-base/nodes/SecurityScorecard/SecurityScorecard.node.ts @@ -520,7 +520,7 @@ export class SecurityScorecard implements INodeType { } // Handle file download output data differently if (resource === 'report' && operation === 'download') { - return this.prepareOutputData(items); + return [items]; } return [this.helpers.returnJsonArray(returnData)]; } diff --git a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts index 8409f7d526..772fc3c924 100644 --- a/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts +++ b/packages/nodes-base/nodes/SendGrid/SendGrid.node.ts @@ -654,6 +654,6 @@ export class SendGrid implements INodeType { } } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts index c3b355c8ca..5133f74fe8 100644 --- a/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts +++ b/packages/nodes-base/nodes/SentryIo/SentryIo.node.ts @@ -743,6 +743,6 @@ export class SentryIo implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts index 0a60990513..e76c557f50 100644 --- a/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts +++ b/packages/nodes-base/nodes/ServiceNow/ServiceNow.node.ts @@ -1160,9 +1160,9 @@ export class ServiceNow implements INodeType { if (resource === 'attachment') { if (operation === 'get' || operation === 'getAll') { - return this.prepareOutputData(returnData); + return [returnData]; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Set/Set.node.ts b/packages/nodes-base/nodes/Set/Set.node.ts index dc68182eed..55c54cbbe6 100644 --- a/packages/nodes-base/nodes/Set/Set.node.ts +++ b/packages/nodes-base/nodes/Set/Set.node.ts @@ -212,6 +212,6 @@ export class Set implements INodeType { returnData.push(newItem); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Shopify/Shopify.node.ts b/packages/nodes-base/nodes/Shopify/Shopify.node.ts index 077a0fcebf..2baf13662a 100644 --- a/packages/nodes-base/nodes/Shopify/Shopify.node.ts +++ b/packages/nodes-base/nodes/Shopify/Shopify.node.ts @@ -470,6 +470,6 @@ export class Shopify implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts b/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts index 8143161239..a855ec257a 100644 --- a/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts +++ b/packages/nodes-base/nodes/Slack/V1/SlackV1.node.ts @@ -1380,6 +1380,6 @@ export class SlackV1 implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts index 33e022c1e9..0ab45d0281 100644 --- a/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts +++ b/packages/nodes-base/nodes/Slack/V2/SlackV2.node.ts @@ -1321,6 +1321,6 @@ export class SlackV2 implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts index 77101ee046..c949a0c866 100644 --- a/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts +++ b/packages/nodes-base/nodes/Snowflake/Snowflake.node.ts @@ -250,6 +250,6 @@ export class Snowflake implements INodeType { } await destroy(connection); - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Spotify/Spotify.node.ts b/packages/nodes-base/nodes/Spotify/Spotify.node.ts index fad38cf9ef..93831f0a08 100644 --- a/packages/nodes-base/nodes/Spotify/Spotify.node.ts +++ b/packages/nodes-base/nodes/Spotify/Spotify.node.ts @@ -1324,6 +1324,6 @@ export class Spotify implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts b/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts index ac51121f9b..a3db73a240 100644 --- a/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts +++ b/packages/nodes-base/nodes/SpreadsheetFile/SpreadsheetFile.node.ts @@ -393,7 +393,7 @@ export class SpreadsheetFile implements INodeType { } } - return this.prepareOutputData(newItems); + return [newItems]; } else if (operation === 'toFile') { try { // Write the workflow data to spreadsheet file @@ -482,9 +482,7 @@ export class SpreadsheetFile implements INodeType { } } else { if (this.continueOnFail()) { - return this.prepareOutputData([ - { json: { error: `The operation "${operation}" is not supported!` } }, - ]); + return [[{ json: { error: `The operation "${operation}" is not supported!` } }]]; } else { throw new NodeOperationError( this.getNode(), @@ -492,6 +490,6 @@ export class SpreadsheetFile implements INodeType { ); } } - return this.prepareOutputData(newItems); + return [newItems]; } } diff --git a/packages/nodes-base/nodes/Ssh/Ssh.node.ts b/packages/nodes-base/nodes/Ssh/Ssh.node.ts index b611349895..853eac060f 100644 --- a/packages/nodes-base/nodes/Ssh/Ssh.node.ts +++ b/packages/nodes-base/nodes/Ssh/Ssh.node.ts @@ -502,9 +502,9 @@ export class Ssh 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(returnItems); + return [returnItems]; } } } diff --git a/packages/nodes-base/nodes/Stackby/Stackby.node.ts b/packages/nodes-base/nodes/Stackby/Stackby.node.ts index 2607affa1e..fc06e395bd 100644 --- a/packages/nodes-base/nodes/Stackby/Stackby.node.ts +++ b/packages/nodes-base/nodes/Stackby/Stackby.node.ts @@ -342,6 +342,6 @@ export class Stackby implements INodeType { } } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Start/Start.node.ts b/packages/nodes-base/nodes/Start/Start.node.ts index 05d3871e1e..7affed7c2c 100644 --- a/packages/nodes-base/nodes/Start/Start.node.ts +++ b/packages/nodes-base/nodes/Start/Start.node.ts @@ -36,6 +36,6 @@ export class Start implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - return this.prepareOutputData(items); + return [items]; } } diff --git a/packages/nodes-base/nodes/StickyNote/StickyNote.node.ts b/packages/nodes-base/nodes/StickyNote/StickyNote.node.ts index 819f147735..7dc2eebf23 100644 --- a/packages/nodes-base/nodes/StickyNote/StickyNote.node.ts +++ b/packages/nodes-base/nodes/StickyNote/StickyNote.node.ts @@ -49,6 +49,6 @@ export class StickyNote implements INodeType { async execute(this: IExecuteFunctions): Promise { const items = this.getInputData(); - return this.prepareOutputData(items); + return [items]; } } diff --git a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts index 052760a198..d6323156c5 100644 --- a/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts +++ b/packages/nodes-base/nodes/Storyblok/Storyblok.node.ts @@ -359,6 +359,6 @@ export class Storyblok implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Strapi/Strapi.node.ts b/packages/nodes-base/nodes/Strapi/Strapi.node.ts index ae610b0470..ff45e2bd61 100644 --- a/packages/nodes-base/nodes/Strapi/Strapi.node.ts +++ b/packages/nodes-base/nodes/Strapi/Strapi.node.ts @@ -401,6 +401,6 @@ export class Strapi implements INodeType { throw error; } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Strava/Strava.node.ts b/packages/nodes-base/nodes/Strava/Strava.node.ts index a95fa4b915..c7b8e7778f 100644 --- a/packages/nodes-base/nodes/Strava/Strava.node.ts +++ b/packages/nodes-base/nodes/Strava/Strava.node.ts @@ -193,6 +193,6 @@ export class Strava implements INodeType { } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Stripe/Stripe.node.ts b/packages/nodes-base/nodes/Stripe/Stripe.node.ts index 87c2d12fcc..a58285f125 100644 --- a/packages/nodes-base/nodes/Stripe/Stripe.node.ts +++ b/packages/nodes-base/nodes/Stripe/Stripe.node.ts @@ -484,6 +484,6 @@ export class Stripe implements INodeType { returnData.push(...executionData); } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/Supabase/Supabase.node.ts b/packages/nodes-base/nodes/Supabase/Supabase.node.ts index 0068cd42a8..340b4cace5 100644 --- a/packages/nodes-base/nodes/Supabase/Supabase.node.ts +++ b/packages/nodes-base/nodes/Supabase/Supabase.node.ts @@ -409,6 +409,6 @@ export class Supabase implements INodeType { } } } - return this.prepareOutputData(returnData); + return [returnData]; } } diff --git a/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts b/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts index 1c3f18782b..3b5a5b3210 100644 --- a/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts +++ b/packages/nodes-base/nodes/SyncroMSP/v1/actions/router.ts @@ -54,5 +54,5 @@ export async function router(this: IExecuteFunctions): Promise WorkflowExecuteMode; getActivationMode?: () => WorkflowActivateMode; + + /** @deprecated */ + prepareOutputData(outputData: INodeExecutionData[]): Promise; } type FunctionsBaseWithRequiredKeys = FunctionsBase & { @@ -763,10 +766,6 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn & inputData?: INodeExecutionData[], ): Promise; getInputData(inputIndex?: number, inputName?: string): INodeExecutionData[]; - prepareOutputData( - outputData: INodeExecutionData[], - outputIndex?: number, - ): Promise; putExecutionToWait(waitTill: Date): Promise; 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; nodeHelpers: NodeHelperFunctions; helpers: RequestHelperFunctions & BaseHelperFunctions & diff --git a/packages/workflow/src/NodeHelpers.ts b/packages/workflow/src/NodeHelpers.ts index 9a09d506d0..3125823f68 100644 --- a/packages/workflow/src/NodeHelpers.ts +++ b/packages/workflow/src/NodeHelpers.ts @@ -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 { - // 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 */ diff --git a/packages/workflow/src/Workflow.ts b/packages/workflow/src/Workflow.ts index 267780536c..06ff5606b0 100644 --- a/packages/workflow/src/Workflow.ts +++ b/packages/workflow/src/Workflow.ts @@ -1362,8 +1362,6 @@ export class Workflow { ), }; } - - return { data: null }; } }