Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lightning-flow-scanner-core

Package Overview
Dependencies
Maintainers
0
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightning-flow-scanner-core - npm Package Compare versions

Comparing version 3.20.1 to 3.20.2

20

out/main/libs/Compiler.js

@@ -10,2 +10,3 @@ "use strict";

traverseFlow(flow, startElementName, visitCallback, endElementName) {
var _a;
// Iterative Deepening Depth-First Search (IDDFS)

@@ -17,3 +18,3 @@ let elementsToVisit = [startElementName];

if (!this.visitedElements.has(elementName)) {
const currentElement = flow.elements.find((element) => element instanceof FlowNode_1.FlowNode && element.name === elementName);
const currentElement = (_a = flow.elements) === null || _a === void 0 ? void 0 : _a.find((element) => element instanceof FlowNode_1.FlowNode && element.name === elementName);
if (currentElement) {

@@ -36,10 +37,11 @@ visitCallback(currentElement);

const nextElements = [];
if (currentElement.connectors && currentElement.connectors.length > 0) {
for (const connector of currentElement.connectors) {
const targetReference = (_b = (_a = connector === null || connector === void 0 ? void 0 : connector.connectorTargetReference) === null || _a === void 0 ? void 0 : _a.targetReference) !== null && _b !== void 0 ? _b : connector.reference;
// Check if the reference exists in the flow elements
const nextElement = (_c = flow.elements) === null || _c === void 0 ? void 0 : _c.find((element) => element instanceof FlowNode_1.FlowNode && element.name === targetReference);
if (nextElement instanceof FlowNode_1.FlowNode && nextElement.name !== endElementName) {
nextElements.push(nextElement.name);
}
if (!currentElement.connectors || currentElement.connectors.length === 0) {
return nextElements;
}
for (const connector of currentElement.connectors) {
const targetReference = (_b = (_a = connector === null || connector === void 0 ? void 0 : connector.connectorTargetReference) === null || _a === void 0 ? void 0 : _a.targetReference) !== null && _b !== void 0 ? _b : connector.reference;
// Check if the reference exists in the flow elements
const nextElement = (_c = flow.elements) === null || _c === void 0 ? void 0 : _c.find((element) => element instanceof FlowNode_1.FlowNode && element.name === targetReference);
if (nextElement instanceof FlowNode_1.FlowNode && nextElement.name !== endElementName) {
nextElements.push(nextElement.name);
}

@@ -46,0 +48,0 @@ }

{
"name": "lightning-flow-scanner-core",
"version": "3.20.1",
"version": "3.20.2",
"main": "out/**",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

@@ -21,7 +21,7 @@ import { Flow } from "../models/Flow";

while (elementsToVisit.length > 0) {
const nextElements = [];
const nextElements: string[] = [];
for (const elementName of elementsToVisit) {
if (!this.visitedElements.has(elementName)) {
const currentElement = flow.elements.find(
const currentElement = flow.elements?.find(
(element) => element instanceof FlowNode && element.name === elementName

@@ -53,13 +53,15 @@ ) as FlowNode;

if (currentElement.connectors && currentElement.connectors.length > 0) {
for (const connector of currentElement.connectors) {
const targetReference =
connector?.connectorTargetReference?.targetReference ?? connector.reference;
// Check if the reference exists in the flow elements
const nextElement = flow.elements?.find(
(element) => element instanceof FlowNode && element.name === targetReference
);
if (nextElement instanceof FlowNode && nextElement.name !== endElementName) {
nextElements.push(nextElement.name);
}
if (!currentElement.connectors || currentElement.connectors.length === 0) {
return nextElements;
}
for (const connector of currentElement.connectors) {
const targetReference =
connector?.connectorTargetReference?.targetReference ?? connector.reference;
// Check if the reference exists in the flow elements
const nextElement = flow.elements?.find(
(element) => element instanceof FlowNode && element.name === targetReference
);
if (nextElement instanceof FlowNode && nextElement.name !== endElementName) {
nextElements.push(nextElement.name);
}

@@ -66,0 +68,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc