diff --git a/cypress/e2e/4-node-creator.cy.ts b/cypress/e2e/4-node-creator.cy.ts index 197aefbe21..6955c95463 100644 --- a/cypress/e2e/4-node-creator.cy.ts +++ b/cypress/e2e/4-node-creator.cy.ts @@ -485,7 +485,7 @@ describe('Node Creator', () => { nodeCreatorFeature.getters.searchBar().find('input').clear().type('spreadsheet'); nodeCreatorFeature.getters.nodeItemName().first().should('have.text', 'Convert to File'); - nodeCreatorFeature.getters.nodeItemName().eq(1).should('have.text', 'Extract From File'); + nodeCreatorFeature.getters.nodeItemName().eq(1).should('have.text', 'Extract from File'); nodeCreatorFeature.getters.nodeItemName().eq(2).should('have.text', 'Google Sheets'); nodeCreatorFeature.getters.searchBar().find('input').clear().type('sheets'); diff --git a/packages/nodes-base/nodes/Code/Code.node.ts b/packages/nodes-base/nodes/Code/Code.node.ts index e616dc2f00..2ddc46db89 100644 --- a/packages/nodes-base/nodes/Code/Code.node.ts +++ b/packages/nodes-base/nodes/Code/Code.node.ts @@ -19,14 +19,13 @@ export class Code implements INodeType { description: INodeTypeDescription = { displayName: 'Code', name: 'code', - icon: 'fa:code', + icon: 'file:code.svg', group: ['transform'], version: [1, 2], defaultVersion: 2, description: 'Run custom JavaScript or Python code', defaults: { name: 'Code', - color: '#FF9922', }, inputs: ['main'], outputs: ['main'], diff --git a/packages/nodes-base/nodes/Code/code.svg b/packages/nodes-base/nodes/Code/code.svg new file mode 100644 index 0000000000..6345d8a84c --- /dev/null +++ b/packages/nodes-base/nodes/Code/code.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.json b/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.json index bb99ab9459..ec8adf50bc 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.json +++ b/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.json @@ -26,6 +26,7 @@ "JSON", "HTML", "ICS", + "iCal", "RTF", "64" ], diff --git a/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts b/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts index 8a2fd7f7d3..a89beebb51 100644 --- a/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts +++ b/packages/nodes-base/nodes/Files/ConvertToFile/ConvertToFile.node.ts @@ -45,9 +45,9 @@ export class ConvertToFile implements INodeType { description: 'Transform input data into a table in an HTML file', }, { - name: 'Convert to iCal', + name: 'Convert to ICS', value: 'iCal', - action: 'Convert to iCal', + action: 'Convert to ICS', description: 'Converts each input item to an ICS event file', }, { diff --git a/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.json b/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.json index 989173a6a5..3a2bd8ef8a 100644 --- a/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.json +++ b/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.json @@ -27,6 +27,7 @@ "JSON", "HTML", "ICS", + "iCal", "txt", "Text", "RTF", diff --git a/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.ts b/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.ts index 3908fc842e..156988eefa 100644 --- a/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.ts +++ b/packages/nodes-base/nodes/Files/ExtractFromFile/ExtractFromFile.node.ts @@ -12,14 +12,14 @@ import * as pdf from './actions/pdf.operation'; export class ExtractFromFile implements INodeType { // eslint-disable-next-line n8n-nodes-base/node-class-description-missing-subtitle description: INodeTypeDescription = { - displayName: 'Extract From File', + displayName: 'Extract from File', name: 'extractFromFile', icon: 'file:extractFromFile.svg', group: ['input'], version: 1, description: 'Convert binary data to JSON', defaults: { - name: 'Extract From File', + name: 'Extract from File', }, inputs: ['main'], outputs: ['main'], @@ -43,18 +43,18 @@ export class ExtractFromFile implements INodeType { action: 'Extract from HTML', description: 'Transform a table in an HTML file into output items', }, - { - name: 'Extract From JSON', - value: 'fromJson', - action: 'Extract from JSON', - description: 'Transform a JSON file into output items', - }, { name: 'Extract From ICS', value: 'fromIcs', action: 'Extract from ICS', description: 'Transform a ICS file into output items', }, + { + name: 'Extract From JSON', + value: 'fromJson', + action: 'Extract from JSON', + description: 'Transform a JSON file into output items', + }, { name: 'Extract From ODS', value: 'ods', @@ -82,7 +82,7 @@ export class ExtractFromFile implements INodeType { { name: 'Extract From XML', value: 'xml', - action: 'Extract from XLS', + action: 'Extract from XML', description: 'Extracts the content of an XML file', }, { diff --git a/packages/nodes-base/nodes/Merge/Merge.node.ts b/packages/nodes-base/nodes/Merge/Merge.node.ts index bb29606618..d20883d2bd 100644 --- a/packages/nodes-base/nodes/Merge/Merge.node.ts +++ b/packages/nodes-base/nodes/Merge/Merge.node.ts @@ -9,7 +9,7 @@ export class Merge extends VersionedNodeType { const baseDescription: INodeTypeBaseDescription = { displayName: 'Merge', name: 'merge', - icon: 'fa:code-branch', + icon: 'file:merge.svg', group: ['transform'], subtitle: '={{$parameter["mode"]}}', description: 'Merges data of multiple streams once data from both is available', @@ -20,7 +20,6 @@ export class Merge extends VersionedNodeType { 1: new MergeV1(baseDescription), 2: new MergeV2(baseDescription), 2.1: new MergeV2(baseDescription), - 2.2: new MergeV2(baseDescription), }; super(nodeVersions, baseDescription); diff --git a/packages/nodes-base/nodes/Merge/merge.svg b/packages/nodes-base/nodes/Merge/merge.svg new file mode 100644 index 0000000000..e01df70aae --- /dev/null +++ b/packages/nodes-base/nodes/Merge/merge.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/packages/nodes-base/nodes/Merge/test/node/workflow.mixed.not.forceInputNodeExecution.json b/packages/nodes-base/nodes/Merge/test/node/workflow.mixed.not.forceInputNodeExecution.json index d8396942f1..5517b02687 100644 --- a/packages/nodes-base/nodes/Merge/test/node/workflow.mixed.not.forceInputNodeExecution.json +++ b/packages/nodes-base/nodes/Merge/test/node/workflow.mixed.not.forceInputNodeExecution.json @@ -31,7 +31,7 @@ "id": "0cc8ce9e-6c16-4fc9-a1b4-589a33dca5e8", "name": "Merge", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 100] }, { @@ -39,7 +39,7 @@ "id": "5ba18ff2-a5b4-4515-a055-1c26fe7e5c02", "name": "Merge1", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 100] }, { @@ -51,7 +51,7 @@ "id": "cba07480-4ad6-4238-b786-61bacf7660f4", "name": "Merge3", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, -60] }, { @@ -63,7 +63,7 @@ "id": "6f6b87fa-2c63-46ab-9f50-d26a376fc4b4", "name": "Merge4", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, -60] }, { @@ -83,7 +83,7 @@ "id": "e4aef8cb-3733-43c5-a615-0d1e64393316", "name": "Merge2", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 280] }, { @@ -93,7 +93,7 @@ "id": "10c4f897-503b-4fdc-93c8-577bad12d8f0", "name": "Merge5", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 280] }, { @@ -149,7 +149,7 @@ "id": "aafbba65-a18d-43b8-8150-88c300992f1d", "name": "Merge6", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, -220] }, { @@ -169,7 +169,7 @@ "id": "9098d926-6006-4aed-ad5d-8128128ce6dc", "name": "Merge8", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, -220] }, { @@ -181,7 +181,7 @@ "id": "eeece670-291f-4c50-977a-6f3608e8b815", "name": "Merge9", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, -380] }, { @@ -193,7 +193,7 @@ "id": "c5ddf991-a05f-441d-9fdf-d4ba0db55894", "name": "Merge10", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, -380] }, { @@ -204,7 +204,7 @@ "id": "2bbdfe57-5541-4634-922b-230b03394ee7", "name": "Merge7", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 460] }, { @@ -215,7 +215,7 @@ "id": "fbf20a2d-4d08-4302-8289-c0149d5d804f", "name": "Merge11", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 460] }, { @@ -223,7 +223,7 @@ "id": "9729a369-5bc7-49c7-9156-1cef519c2744", "name": "Merge12", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 1200] }, { @@ -231,7 +231,7 @@ "id": "068c9d3c-f186-4b00-9d96-1de60ce7a92a", "name": "Merge13", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 1200] }, { @@ -243,7 +243,7 @@ "id": "6d2de385-9e01-416b-b9b9-948c1ba77e4f", "name": "Merge14", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 1040] }, { @@ -255,7 +255,7 @@ "id": "d4b34831-3757-42b7-93e0-53630a46b734", "name": "Merge15", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 1040] }, { @@ -265,7 +265,7 @@ "id": "c51a1ec8-d104-4803-9eb1-83630166c749", "name": "Merge16", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 1380] }, { @@ -275,7 +275,7 @@ "id": "af935dce-fc44-4075-b3c6-4629fe796f16", "name": "Merge17", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 1380] }, { @@ -295,7 +295,7 @@ "id": "bf586064-63aa-4f0e-9fad-c5e97fa23fb8", "name": "Merge18", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 880] }, { @@ -315,7 +315,7 @@ "id": "9908bca5-067a-4184-8333-2e48f74f34a1", "name": "Merge19", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 880] }, { @@ -327,7 +327,7 @@ "id": "5fcdc9b3-a0c6-424e-a325-d0e83e27e4f1", "name": "Merge20", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 720] }, { @@ -339,7 +339,7 @@ "id": "5a8d7598-e88b-4e81-ac57-5c3b6eadfe5a", "name": "Merge21", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 720] }, { @@ -350,7 +350,7 @@ "id": "32797fb4-ed6d-4127-823f-982c72d859a8", "name": "Merge22", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [820, 1560] }, { @@ -361,7 +361,7 @@ "id": "5299797d-2aa8-4f6b-a5d8-2a3c2bb0295d", "name": "Merge23", "type": "n8n-nodes-base.merge", - "typeVersion": 2.2, + "typeVersion": 2.1, "position": [1080, 1560] }, { diff --git a/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts b/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts index e8224d0eef..3d53be0aa3 100644 --- a/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts +++ b/packages/nodes-base/nodes/Merge/v1/MergeV1.node.ts @@ -15,201 +15,192 @@ import { deepCopy } from 'n8n-workflow'; import { oldVersionNotice } from '@utils/descriptions'; import { generatePairedItemData } from '../../../utils/utilities'; -const versionDescription: INodeTypeDescription = { - displayName: 'Merge', - name: 'merge', - icon: 'fa:code-branch', - group: ['transform'], - version: 1, - subtitle: '={{$parameter["mode"]}}', - description: 'Merges data of multiple streams once data from both is available', - defaults: { - name: 'Merge', - color: '#00bbcc', - }, - // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node - inputs: ['main', 'main'], - outputs: ['main'], - inputNames: ['Input 1', 'Input 2'], - properties: [ - oldVersionNotice, - { - displayName: 'Mode', - name: 'mode', - type: 'options', - options: [ - { - name: 'Append', - value: 'append', - description: - 'Combines data of both inputs. The output will contain items of input 1 and input 2.', - }, - { - name: 'Keep Key Matches', - value: 'keepKeyMatches', - description: 'Keeps data of input 1 if it does find a match with data of input 2', - }, - { - name: 'Merge By Index', - value: 'mergeByIndex', - description: - 'Merges data of both inputs. The output will contain items of input 1 merged with data of input 2. Merge happens depending on the index of the items. So first item of input 1 will be merged with first item of input 2 and so on.', - }, - { - name: 'Merge By Key', - value: 'mergeByKey', - description: - 'Merges data of both inputs. The output will contain items of input 1 merged with data of input 2. Merge happens depending on a defined key.', - }, - { - name: 'Multiplex', - value: 'multiplex', - description: - 'Merges each value of one input with each value of the other input. The output will contain (m * n) items where (m) and (n) are lengths of the inputs.', - }, - { - name: 'Pass-Through', - value: 'passThrough', - description: - 'Passes through data of one input. The output will contain only items of the defined input.', - }, - { - name: 'Remove Key Matches', - value: 'removeKeyMatches', - description: 'Keeps data of input 1 if it does NOT find match with data of input 2', - }, - { - name: 'Wait', - value: 'wait', - description: - 'Waits till data of both inputs is available and will then output a single empty item. Source Nodes must connect to both Input 1 and 2. This node only supports 2 Sources, if you need more Sources, connect multiple Merge nodes in series. This node will not output any data.', - }, - ], - default: 'append', - description: 'How data of branches should be merged', - }, - { - displayName: 'Join', - name: 'join', - type: 'options', - displayOptions: { - show: { - mode: ['mergeByIndex'], - }, - }, - options: [ - { - name: 'Inner Join', - value: 'inner', - description: - 'Merges as many items as both inputs contain. (Example: Input1 = 5 items, Input2 = 3 items | Output will contain 3 items).', - }, - { - name: 'Left Join', - value: 'left', - description: - 'Merges as many items as first input contains. (Example: Input1 = 3 items, Input2 = 5 items | Output will contain 3 items).', - }, - { - name: 'Outer Join', - value: 'outer', - description: - 'Merges as many items as input contains with most items. (Example: Input1 = 3 items, Input2 = 5 items | Output will contain 5 items).', - }, - ], - default: 'left', - description: - 'How many items the output will contain if inputs contain different amount of items', - }, - { - displayName: 'Property Input 1', - name: 'propertyName1', - type: 'string', - default: '', - hint: 'The name of the field as text (e.g. “id”)', - required: true, - displayOptions: { - show: { - mode: ['keepKeyMatches', 'mergeByKey', 'removeKeyMatches'], - }, - }, - description: 'Name of property which decides which items to merge of input 1', - }, - { - displayName: 'Property Input 2', - name: 'propertyName2', - type: 'string', - default: '', - hint: 'The name of the field as text (e.g. “id”)', - required: true, - displayOptions: { - show: { - mode: ['keepKeyMatches', 'mergeByKey', 'removeKeyMatches'], - }, - }, - description: 'Name of property which decides which items to merge of input 2', - }, - { - displayName: 'Output Data', - name: 'output', - type: 'options', - displayOptions: { - show: { - mode: ['passThrough'], - }, - }, - options: [ - { - name: 'Input 1', - value: 'input1', - }, - { - name: 'Input 2', - value: 'input2', - }, - ], - default: 'input1', - description: 'Defines of which input the data should be used as output of node', - }, - { - displayName: 'Overwrite', - name: 'overwrite', - type: 'options', - displayOptions: { - show: { - mode: ['mergeByKey'], - }, - }, - options: [ - { - name: 'Always', - value: 'always', - description: 'Always overwrites everything', - }, - { - name: 'If Blank', - value: 'blank', - description: 'Overwrites only values of "null", "undefined" or empty string', - }, - { - name: 'If Missing', - value: 'undefined', - description: 'Only adds values which do not exist yet', - }, - ], - default: 'always', - description: 'Select when to overwrite the values from Input1 with values from Input 2', - }, - ], -}; - export class MergeV1 implements INodeType { description: INodeTypeDescription; constructor(baseDescription: INodeTypeBaseDescription) { this.description = { ...baseDescription, - ...versionDescription, + icon: 'fa:code-branch', + version: 1, + defaults: { + name: 'Merge', + color: '#00bbcc', + }, + // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node + inputs: ['main', 'main'], + outputs: ['main'], + inputNames: ['Input 1', 'Input 2'], + properties: [ + oldVersionNotice, + { + displayName: 'Mode', + name: 'mode', + type: 'options', + options: [ + { + name: 'Append', + value: 'append', + description: + 'Combines data of both inputs. The output will contain items of input 1 and input 2.', + }, + { + name: 'Keep Key Matches', + value: 'keepKeyMatches', + description: 'Keeps data of input 1 if it does find a match with data of input 2', + }, + { + name: 'Merge By Index', + value: 'mergeByIndex', + description: + 'Merges data of both inputs. The output will contain items of input 1 merged with data of input 2. Merge happens depending on the index of the items. So first item of input 1 will be merged with first item of input 2 and so on.', + }, + { + name: 'Merge By Key', + value: 'mergeByKey', + description: + 'Merges data of both inputs. The output will contain items of input 1 merged with data of input 2. Merge happens depending on a defined key.', + }, + { + name: 'Multiplex', + value: 'multiplex', + description: + 'Merges each value of one input with each value of the other input. The output will contain (m * n) items where (m) and (n) are lengths of the inputs.', + }, + { + name: 'Pass-Through', + value: 'passThrough', + description: + 'Passes through data of one input. The output will contain only items of the defined input.', + }, + { + name: 'Remove Key Matches', + value: 'removeKeyMatches', + description: 'Keeps data of input 1 if it does NOT find match with data of input 2', + }, + { + name: 'Wait', + value: 'wait', + description: + 'Waits till data of both inputs is available and will then output a single empty item. Source Nodes must connect to both Input 1 and 2. This node only supports 2 Sources, if you need more Sources, connect multiple Merge nodes in series. This node will not output any data.', + }, + ], + default: 'append', + description: 'How data of branches should be merged', + }, + { + displayName: 'Join', + name: 'join', + type: 'options', + displayOptions: { + show: { + mode: ['mergeByIndex'], + }, + }, + options: [ + { + name: 'Inner Join', + value: 'inner', + description: + 'Merges as many items as both inputs contain. (Example: Input1 = 5 items, Input2 = 3 items | Output will contain 3 items).', + }, + { + name: 'Left Join', + value: 'left', + description: + 'Merges as many items as first input contains. (Example: Input1 = 3 items, Input2 = 5 items | Output will contain 3 items).', + }, + { + name: 'Outer Join', + value: 'outer', + description: + 'Merges as many items as input contains with most items. (Example: Input1 = 3 items, Input2 = 5 items | Output will contain 5 items).', + }, + ], + default: 'left', + description: + 'How many items the output will contain if inputs contain different amount of items', + }, + { + displayName: 'Property Input 1', + name: 'propertyName1', + type: 'string', + default: '', + hint: 'The name of the field as text (e.g. “id”)', + required: true, + displayOptions: { + show: { + mode: ['keepKeyMatches', 'mergeByKey', 'removeKeyMatches'], + }, + }, + description: 'Name of property which decides which items to merge of input 1', + }, + { + displayName: 'Property Input 2', + name: 'propertyName2', + type: 'string', + default: '', + hint: 'The name of the field as text (e.g. “id”)', + required: true, + displayOptions: { + show: { + mode: ['keepKeyMatches', 'mergeByKey', 'removeKeyMatches'], + }, + }, + description: 'Name of property which decides which items to merge of input 2', + }, + { + displayName: 'Output Data', + name: 'output', + type: 'options', + displayOptions: { + show: { + mode: ['passThrough'], + }, + }, + options: [ + { + name: 'Input 1', + value: 'input1', + }, + { + name: 'Input 2', + value: 'input2', + }, + ], + default: 'input1', + description: 'Defines of which input the data should be used as output of node', + }, + { + displayName: 'Overwrite', + name: 'overwrite', + type: 'options', + displayOptions: { + show: { + mode: ['mergeByKey'], + }, + }, + options: [ + { + name: 'Always', + value: 'always', + description: 'Always overwrites everything', + }, + { + name: 'If Blank', + value: 'blank', + description: 'Overwrites only values of "null", "undefined" or empty string', + }, + { + name: 'If Missing', + value: 'undefined', + description: 'Only adds values which do not exist yet', + }, + ], + default: 'always', + description: 'Select when to overwrite the values from Input1 with values from Input 2', + }, + ], }; } diff --git a/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts b/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts index 5ee6767480..ffdfcfe545 100644 --- a/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts +++ b/packages/nodes-base/nodes/Merge/v2/MergeV2.node.ts @@ -31,274 +31,264 @@ import { import { optionsDescription } from './OptionsDescription'; import { preparePairedItemDataArray } from '@utils/utilities'; -const versionDescription: INodeTypeDescription = { - displayName: 'Merge', - name: 'merge', - icon: 'fa:code-branch', - group: ['transform'], - version: [2, 2.1, 2.2], - subtitle: '={{$parameter["mode"]}}', - description: 'Merge data of two inputs once data from both is available', - defaults: { - name: 'Merge', - color: '#00bbcc', - }, - // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node - inputs: ['main', 'main'], - outputs: ['main'], - inputNames: ['Input 1', 'Input 2'], - // If the node is of version 2.2 or if mode is chooseBranch data from both branches is required - // to continue, else data from any input suffices - requiredInputs: '={{ $parameter["mode"] === "chooseBranch" ? [0, 1] : 1 }}', - properties: [ - { - displayName: 'Mode', - name: 'mode', - type: 'options', - options: [ - { - name: 'Append', - value: 'append', - description: 'All items of input 1, then all items of input 2', - }, - { - name: 'Combine', - value: 'combine', - description: 'Merge matching items together', - }, - { - name: 'Choose Branch', - value: 'chooseBranch', - description: 'Output input data, without modifying it', - }, - ], - default: 'append', - description: 'How data of branches should be merged', - }, - { - displayName: 'Combination Mode', - name: 'combinationMode', - type: 'options', - options: [ - { - name: 'Merge By Fields', - value: 'mergeByFields', - description: 'Combine items with the same field values', - }, - { - name: 'Merge By Position', - value: 'mergeByPosition', - description: 'Combine items based on their order', - }, - { - name: 'Multiplex', - value: 'multiplex', - description: 'All possible item combinations (cross join)', - }, - ], - default: 'mergeByFields', - displayOptions: { - show: { - mode: ['combine'], - }, - }, - }, - // mergeByFields ------------------------------------------------------------------ - { - displayName: 'Fields to Match', - name: 'mergeByFields', - type: 'fixedCollection', - placeholder: 'Add Fields to Match', - default: { values: [{ field1: '', field2: '' }] }, - typeOptions: { - multipleValues: true, - }, - options: [ - { - displayName: 'Values', - name: 'values', - values: [ - { - displayName: 'Input 1 Field', - name: 'field1', - type: 'string', - default: '', - // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id - placeholder: 'e.g. id', - hint: ' Enter the field name as text', - requiresDataPath: 'single', - }, - { - displayName: 'Input 2 Field', - name: 'field2', - type: 'string', - default: '', - // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id - placeholder: 'e.g. id', - hint: ' Enter the field name as text', - requiresDataPath: 'single', - }, - ], - }, - ], - displayOptions: { - show: { - mode: ['combine'], - combinationMode: ['mergeByFields'], - }, - }, - }, - { - displayName: 'Output Type', - name: 'joinMode', - type: 'options', - // eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items - options: [ - { - name: 'Keep Matches', - value: 'keepMatches', - description: 'Items that match, merged together (inner join)', - }, - { - name: 'Keep Non-Matches', - value: 'keepNonMatches', - description: "Items that don't match", - }, - { - name: 'Keep Everything', - value: 'keepEverything', - description: "Items that match merged together, plus items that don't match (outer join)", - }, - { - name: 'Enrich Input 1', - value: 'enrichInput1', - description: 'All of input 1, with data from input 2 added in (left join)', - }, - { - name: 'Enrich Input 2', - value: 'enrichInput2', - description: 'All of input 2, with data from input 1 added in (right join)', - }, - ], - default: 'keepMatches', - displayOptions: { - show: { - mode: ['combine'], - combinationMode: ['mergeByFields'], - }, - }, - }, - { - displayName: 'Output Data From', - name: 'outputDataFrom', - type: 'options', - options: [ - { - name: 'Both Inputs Merged Together', - value: 'both', - }, - { - name: 'Input 1', - value: 'input1', - }, - { - name: 'Input 2', - value: 'input2', - }, - ], - default: 'both', - displayOptions: { - show: { - mode: ['combine'], - combinationMode: ['mergeByFields'], - joinMode: ['keepMatches'], - }, - }, - }, - { - displayName: 'Output Data From', - name: 'outputDataFrom', - type: 'options', - options: [ - { - name: 'Both Inputs Appended Together', - value: 'both', - }, - { - name: 'Input 1', - value: 'input1', - }, - { - name: 'Input 2', - value: 'input2', - }, - ], - default: 'both', - displayOptions: { - show: { - mode: ['combine'], - combinationMode: ['mergeByFields'], - joinMode: ['keepNonMatches'], - }, - }, - }, - - // chooseBranch ----------------------------------------------------------------- - { - displayName: 'Output Type', - name: 'chooseBranchMode', - type: 'options', - options: [ - { - name: 'Wait for Both Inputs to Arrive', - value: 'waitForBoth', - }, - ], - default: 'waitForBoth', - displayOptions: { - show: { - mode: ['chooseBranch'], - }, - }, - }, - { - displayName: 'Output', - name: 'output', - type: 'options', - options: [ - { - name: 'Input 1 Data', - value: 'input1', - }, - { - name: 'Input 2 Data', - value: 'input2', - }, - { - name: 'A Single, Empty Item', - value: 'empty', - }, - ], - default: 'input1', - displayOptions: { - show: { - mode: ['chooseBranch'], - chooseBranchMode: ['waitForBoth'], - }, - }, - }, - - ...optionsDescription, - ], -}; - export class MergeV2 implements INodeType { description: INodeTypeDescription; constructor(baseDescription: INodeTypeBaseDescription) { this.description = { ...baseDescription, - ...versionDescription, + version: [2, 2.1], + defaults: { + name: 'Merge', + }, + // eslint-disable-next-line n8n-nodes-base/node-class-description-inputs-wrong-regular-node + inputs: ['main', 'main'], + outputs: ['main'], + inputNames: ['Input 1', 'Input 2'], + // If mode is chooseBranch data from both branches is required + // to continue, else data from any input suffices + requiredInputs: '={{ $parameter["mode"] === "chooseBranch" ? [0, 1] : 1 }}', + properties: [ + { + displayName: 'Mode', + name: 'mode', + type: 'options', + options: [ + { + name: 'Append', + value: 'append', + description: 'All items of input 1, then all items of input 2', + }, + { + name: 'Combine', + value: 'combine', + description: 'Merge matching items together', + }, + { + name: 'Choose Branch', + value: 'chooseBranch', + description: 'Output input data, without modifying it', + }, + ], + default: 'append', + description: 'How data of branches should be merged', + }, + { + displayName: 'Combination Mode', + name: 'combinationMode', + type: 'options', + options: [ + { + name: 'Merge By Fields', + value: 'mergeByFields', + description: 'Combine items with the same field values', + }, + { + name: 'Merge By Position', + value: 'mergeByPosition', + description: 'Combine items based on their order', + }, + { + name: 'Multiplex', + value: 'multiplex', + description: 'All possible item combinations (cross join)', + }, + ], + default: 'mergeByFields', + displayOptions: { + show: { + mode: ['combine'], + }, + }, + }, + // mergeByFields ------------------------------------------------------------------ + { + displayName: 'Fields to Match', + name: 'mergeByFields', + type: 'fixedCollection', + placeholder: 'Add Fields to Match', + default: { values: [{ field1: '', field2: '' }] }, + typeOptions: { + multipleValues: true, + }, + options: [ + { + displayName: 'Values', + name: 'values', + values: [ + { + displayName: 'Input 1 Field', + name: 'field1', + type: 'string', + default: '', + // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id + placeholder: 'e.g. id', + hint: ' Enter the field name as text', + requiresDataPath: 'single', + }, + { + displayName: 'Input 2 Field', + name: 'field2', + type: 'string', + default: '', + // eslint-disable-next-line n8n-nodes-base/node-param-placeholder-miscased-id + placeholder: 'e.g. id', + hint: ' Enter the field name as text', + requiresDataPath: 'single', + }, + ], + }, + ], + displayOptions: { + show: { + mode: ['combine'], + combinationMode: ['mergeByFields'], + }, + }, + }, + { + displayName: 'Output Type', + name: 'joinMode', + type: 'options', + // eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items + options: [ + { + name: 'Keep Matches', + value: 'keepMatches', + description: 'Items that match, merged together (inner join)', + }, + { + name: 'Keep Non-Matches', + value: 'keepNonMatches', + description: "Items that don't match", + }, + { + name: 'Keep Everything', + value: 'keepEverything', + description: + "Items that match merged together, plus items that don't match (outer join)", + }, + { + name: 'Enrich Input 1', + value: 'enrichInput1', + description: 'All of input 1, with data from input 2 added in (left join)', + }, + { + name: 'Enrich Input 2', + value: 'enrichInput2', + description: 'All of input 2, with data from input 1 added in (right join)', + }, + ], + default: 'keepMatches', + displayOptions: { + show: { + mode: ['combine'], + combinationMode: ['mergeByFields'], + }, + }, + }, + { + displayName: 'Output Data From', + name: 'outputDataFrom', + type: 'options', + options: [ + { + name: 'Both Inputs Merged Together', + value: 'both', + }, + { + name: 'Input 1', + value: 'input1', + }, + { + name: 'Input 2', + value: 'input2', + }, + ], + default: 'both', + displayOptions: { + show: { + mode: ['combine'], + combinationMode: ['mergeByFields'], + joinMode: ['keepMatches'], + }, + }, + }, + { + displayName: 'Output Data From', + name: 'outputDataFrom', + type: 'options', + options: [ + { + name: 'Both Inputs Appended Together', + value: 'both', + }, + { + name: 'Input 1', + value: 'input1', + }, + { + name: 'Input 2', + value: 'input2', + }, + ], + default: 'both', + displayOptions: { + show: { + mode: ['combine'], + combinationMode: ['mergeByFields'], + joinMode: ['keepNonMatches'], + }, + }, + }, + + // chooseBranch ----------------------------------------------------------------- + { + displayName: 'Output Type', + name: 'chooseBranchMode', + type: 'options', + options: [ + { + name: 'Wait for Both Inputs to Arrive', + value: 'waitForBoth', + }, + ], + default: 'waitForBoth', + displayOptions: { + show: { + mode: ['chooseBranch'], + }, + }, + }, + { + displayName: 'Output', + name: 'output', + type: 'options', + options: [ + { + name: 'Input 1 Data', + value: 'input1', + }, + { + name: 'Input 2 Data', + value: 'input2', + }, + { + name: 'A Single, Empty Item', + value: 'empty', + }, + ], + default: 'input1', + displayOptions: { + show: { + mode: ['chooseBranch'], + chooseBranchMode: ['waitForBoth'], + }, + }, + }, + + ...optionsDescription, + ], }; } diff --git a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/versionDescription.ts b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/versionDescription.ts index e0f83ca5bb..f0b31b9d0a 100644 --- a/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/versionDescription.ts +++ b/packages/nodes-base/nodes/Microsoft/Excel/v2/actions/versionDescription.ts @@ -27,7 +27,7 @@ export const versionDescription: INodeTypeDescription = { properties: [ { displayName: - 'This node connects to the Microsoft 365 cloud platform. Use the \'Extract From File\' and \'Convert to File\' nodes to directly manipulate spreadsheet files (.xls, .csv, etc). More info.', + 'This node connects to the Microsoft 365 cloud platform. Use the \'Extract from File\' and \'Convert to File\' nodes to directly manipulate spreadsheet files (.xls, .csv, etc). More info.', name: 'notice', type: 'notice', default: '', diff --git a/packages/nodes-base/nodes/Transform/Sort/Sort.node.json b/packages/nodes-base/nodes/Transform/Sort/Sort.node.json index 13e63540d2..387b009439 100644 --- a/packages/nodes-base/nodes/Transform/Sort/Sort.node.json +++ b/packages/nodes-base/nodes/Transform/Sort/Sort.node.json @@ -12,7 +12,7 @@ ], "generic": [] }, - "alias": ["Sort", "Order", "Transform", "Array", "List", "Item"], + "alias": ["Sort", "Order", "Transform", "Array", "List", "Item", "Random"], "subcategories": { "Core Nodes": ["Data Transformation"] } diff --git a/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.json b/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.json new file mode 100644 index 0000000000..d495137617 --- /dev/null +++ b/packages/nodes-base/nodes/WhatsApp/WhatsApp.node.json @@ -0,0 +1,18 @@ +{ + "node": "n8n-nodes-base.whatsApp", + "nodeVersion": "1.0", + "codexVersion": "1.0", + "categories": ["Communication"], + "resources": { + "credentialDocumentation": [ + { + "url": "https://docs.n8n.io/integrations/builtin/credentials/whatsapp/" + } + ], + "primaryDocumentation": [ + { + "url": "https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.whatsapp/" + } + ] + } +} diff --git a/packages/nodes-base/nodes/Xml/Xml.node.ts b/packages/nodes-base/nodes/Xml/Xml.node.ts index d80d97f9f5..efb3518a34 100644 --- a/packages/nodes-base/nodes/Xml/Xml.node.ts +++ b/packages/nodes-base/nodes/Xml/Xml.node.ts @@ -44,7 +44,7 @@ export class Xml implements INodeType { }, { displayName: - "If your XML is inside a binary file, use the 'Extract From File' node to convert it to text first", + "If your XML is inside a binary file, use the 'Extract from File' node to convert it to text first", name: 'xmlNotice', type: 'notice', default: '',