mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-27 13:39:44 -08:00
d1163533a6
Co-authored-by: Michael Kret <michael.k@radency.com>
31 lines
889 B
TypeScript
31 lines
889 B
TypeScript
import type { INodeTypeBaseDescription, IVersionedNodeType } from 'n8n-workflow';
|
|
import { VersionedNodeType } from 'n8n-workflow';
|
|
|
|
import { SetV1 } from './v1/SetV1.node';
|
|
import { SetV2 } from './v2/SetV2.node';
|
|
|
|
export class Set extends VersionedNodeType {
|
|
constructor() {
|
|
const baseDescription: INodeTypeBaseDescription = {
|
|
displayName: 'Set',
|
|
name: 'set',
|
|
icon: 'fa:pen',
|
|
group: ['input'],
|
|
description: 'Add or edit fields on an input item and optionally remove other fields',
|
|
defaultVersion: 3.4,
|
|
};
|
|
|
|
const nodeVersions: IVersionedNodeType['nodeVersions'] = {
|
|
1: new SetV1(baseDescription),
|
|
2: new SetV1(baseDescription),
|
|
3: new SetV2(baseDescription),
|
|
3.1: new SetV2(baseDescription),
|
|
3.2: new SetV2(baseDescription),
|
|
3.3: new SetV2(baseDescription),
|
|
3.4: new SetV2(baseDescription),
|
|
};
|
|
|
|
super(nodeVersions, baseDescription);
|
|
}
|
|
}
|