mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor: Use NodeConnectionType consistently across the code base (no-changelog) (#10595)
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import type {
|
||||
INode,
|
||||
INodeParameters,
|
||||
INodeProperties,
|
||||
INodeType,
|
||||
INodeTypeDescription,
|
||||
import {
|
||||
NodeConnectionType,
|
||||
type INode,
|
||||
type INodeParameters,
|
||||
type INodeProperties,
|
||||
type INodeType,
|
||||
type INodeTypeDescription,
|
||||
} from '@/Interfaces';
|
||||
import type { Workflow } from '@/Workflow';
|
||||
import {
|
||||
@@ -3573,9 +3574,9 @@ describe('NodeHelpers', () => {
|
||||
[false, null],
|
||||
[false, { outputs: '={{random_expression}}' }],
|
||||
[false, { outputs: [] }],
|
||||
[false, { outputs: ['main'] }],
|
||||
[true, { outputs: ['ai_agent'] }],
|
||||
[true, { outputs: ['main', 'ai_agent'] }],
|
||||
[false, { outputs: [NodeConnectionType.Main] }],
|
||||
[true, { outputs: [NodeConnectionType.AiAgent] }],
|
||||
[true, { outputs: [NodeConnectionType.Main, NodeConnectionType.AiAgent] }],
|
||||
];
|
||||
test.each(tests)('should return %p for %o', (expected, nodeType) => {
|
||||
expect(isSubNodeType(nodeType)).toBe(expected);
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { mock } from 'jest-mock-extended';
|
||||
import type {
|
||||
IDataObject,
|
||||
INodeType,
|
||||
INodeTypeData,
|
||||
INodeTypes,
|
||||
IVersionedNodeType,
|
||||
LoadedClass,
|
||||
import {
|
||||
NodeConnectionType,
|
||||
type IDataObject,
|
||||
type INodeType,
|
||||
type INodeTypeData,
|
||||
type INodeTypes,
|
||||
type IVersionedNodeType,
|
||||
type LoadedClass,
|
||||
} from '@/Interfaces';
|
||||
import * as NodeHelpers from '@/NodeHelpers';
|
||||
|
||||
@@ -60,8 +61,8 @@ const googleSheetsNode: LoadedClass<IVersionedNodeType> = {
|
||||
defaults: {
|
||||
name: 'Google Sheets',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
credentials: [
|
||||
{
|
||||
name: 'googleApi',
|
||||
@@ -286,9 +287,9 @@ const googleSheetsNode: LoadedClass<IVersionedNodeType> = {
|
||||
displayName: 'Google Sheets',
|
||||
group: ['input', 'output'],
|
||||
icon: 'file:googleSheets.svg',
|
||||
inputs: ['main'],
|
||||
inputs: [NodeConnectionType.Main],
|
||||
name: 'googleSheets',
|
||||
outputs: ['main'],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
properties: [
|
||||
{
|
||||
default: 'oAuth2',
|
||||
@@ -551,8 +552,8 @@ const setNode: LoadedClass<INodeType> = {
|
||||
name: 'Set',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Value1',
|
||||
@@ -588,7 +589,7 @@ const manualTriggerNode: LoadedClass<INodeType> = {
|
||||
color: '#909298',
|
||||
},
|
||||
inputs: [],
|
||||
outputs: ['main'],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
properties: [
|
||||
{
|
||||
displayName:
|
||||
@@ -621,8 +622,8 @@ export class NodeTypes implements INodeTypes {
|
||||
name: 'Set Multi',
|
||||
color: '#0000FF',
|
||||
},
|
||||
inputs: ['main'],
|
||||
outputs: ['main'],
|
||||
inputs: [NodeConnectionType.Main],
|
||||
outputs: [NodeConnectionType.Main],
|
||||
properties: [
|
||||
{
|
||||
displayName: 'Values',
|
||||
|
||||
Reference in New Issue
Block a user