2023-01-27 03:22:44 -08:00
|
|
|
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-09-12 22:59:49 -07:00
|
|
|
import { MergeV1 } from './v1/MergeV1.node';
|
|
|
|
import { MergeV2 } from './v2/MergeV2.node';
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-10-25 12:33:12 -07:00
|
|
|
export class Merge extends VersionedNodeType {
|
2022-09-12 22:59:49 -07:00
|
|
|
constructor() {
|
|
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
|
|
displayName: 'Merge',
|
|
|
|
name: 'merge',
|
|
|
|
icon: 'fa:code-branch',
|
|
|
|
group: ['transform'],
|
|
|
|
subtitle: '={{$parameter["mode"]}}',
|
|
|
|
description: 'Merges data of multiple streams once data from both is available',
|
2023-04-28 09:46:59 -07:00
|
|
|
defaultVersion: 2.1,
|
2022-09-12 22:59:49 -07:00
|
|
|
};
|
2019-06-23 03:35:23 -07:00
|
|
|
|
2022-10-25 12:33:12 -07:00
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
2022-09-12 22:59:49 -07:00
|
|
|
1: new MergeV1(baseDescription),
|
|
|
|
2: new MergeV2(baseDescription),
|
2023-04-28 09:46:59 -07:00
|
|
|
2.1: new MergeV2(baseDescription),
|
2023-06-23 03:07:52 -07:00
|
|
|
2.2: new MergeV2(baseDescription),
|
2022-09-12 22:59:49 -07:00
|
|
|
};
|
2019-08-02 01:26:05 -07:00
|
|
|
|
2022-09-12 22:59:49 -07:00
|
|
|
super(nodeVersions, baseDescription);
|
2019-06-23 03:35:23 -07:00
|
|
|
}
|
|
|
|
}
|