n8n-workflow
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -23,3 +23,5 @@ import { IConnections, INode, INodes, INodeExecuteFunctions, INodeExecutionData, INodeParameters, NodeParameterValue, INodeTypes, IRunExecutionData, ITaskDataConnections, ITriggerResponse, IWebhookData, IWebhookResonseData, WebhookSetupMethodNames, IWorfklowIssues, IWorkflowExecuteAdditionalData, WorkflowExecuteMode, IWorkflowSettings } from './'; | ||
getHighestNode(nodeName: string, type?: string, nodeConnectionIndex?: number, checkedNodes?: string[]): string[]; | ||
getParentNodes(nodeName: string, type?: string, depth?: number, checkedNodes?: string[]): string[]; | ||
getChildNodes(nodeName: string, type?: string, depth?: number): string[]; | ||
getParentNodes(nodeName: string, type?: string, depth?: number): string[]; | ||
getConnectedNodes(connections: IConnections, nodeName: string, type?: string, depth?: number, checkedNodes?: string[]): string[]; | ||
getNodeConnectionOutputIndex(nodeName: string, parentNodeName: string, type?: string, depth?: number, checkedNodes?: string[]): number | undefined; | ||
@@ -26,0 +28,0 @@ getSimpleParameterValue(node: INode, parameterValue: string | undefined, defaultValue?: string): string | undefined; |
@@ -254,3 +254,9 @@ "use strict"; | ||
} | ||
getParentNodes(nodeName, type = 'main', depth = -1, checkedNodes) { | ||
getChildNodes(nodeName, type = 'main', depth = -1) { | ||
return this.getConnectedNodes(this.connectionsBySourceNode, nodeName, type, depth); | ||
} | ||
getParentNodes(nodeName, type = 'main', depth = -1) { | ||
return this.getConnectedNodes(this.connectionsByDestinationNode, nodeName, type, depth); | ||
} | ||
getConnectedNodes(connections, nodeName, type = 'main', depth = -1, checkedNodes) { | ||
depth = depth === -1 ? -1 : depth; | ||
@@ -261,6 +267,6 @@ const newDepth = depth === -1 ? depth : depth - 1; | ||
} | ||
if (!this.connectionsByDestinationNode.hasOwnProperty(nodeName)) { | ||
if (!connections.hasOwnProperty(nodeName)) { | ||
return []; | ||
} | ||
if (!this.connectionsByDestinationNode[nodeName].hasOwnProperty(type)) { | ||
if (!connections[nodeName].hasOwnProperty(type)) { | ||
return []; | ||
@@ -278,3 +284,3 @@ } | ||
let parentNodeName; | ||
this.connectionsByDestinationNode[nodeName][type].forEach((connectionsByIndex) => { | ||
connections[nodeName][type].forEach((connectionsByIndex) => { | ||
connectionsByIndex.forEach((connection) => { | ||
@@ -285,3 +291,3 @@ if (checkedNodes.includes(connection.node)) { | ||
returnNodes.unshift(connection.node); | ||
addNodes = this.getParentNodes(connection.node, type, newDepth, checkedNodes); | ||
addNodes = this.getConnectedNodes(connections, connection.node, type, newDepth, checkedNodes); | ||
for (i = addNodes.length; i--; i > 0) { | ||
@@ -288,0 +294,0 @@ parentNodeName = addNodes[i]; |
{ | ||
"name": "n8n-workflow", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Workflow base code of n8n", | ||
@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.md", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
365366
5742