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
1
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 1.0.12 to 1.0.13

tests/FixFlow.test.ts

4

out/main/libs/BuildFlow.d.ts

@@ -1,3 +0,1 @@

export declare function BuildFlow(nodesToMerge: any): {
Flow: {};
};
export declare function BuildFlow(nodesToMerge: any): {};

@@ -12,5 +12,5 @@ "use strict";

}
return { Flow: res };
return res;
}
exports.BuildFlow = BuildFlow;
//# sourceMappingURL=BuildFlow.js.map

@@ -36,3 +36,4 @@ "use strict";

});
flow.processedData = BuildFlow_1.BuildFlow(nodesToBuild);
flow.xmldata['Flow'] = BuildFlow_1.BuildFlow(nodesToBuild);
flow.preProcessNodes();
flowResults.push(new ScanResult_1.ScanResult(flow, ruleResults));

@@ -39,0 +40,0 @@ }

@@ -19,3 +19,3 @@ import { FlowNode } from './FlowNode';

constructor(args: any);
private preProcessNodes;
preProcessNodes(): void;
}

@@ -24,6 +24,6 @@ "use strict";

this.xmldata = args.xmldata;
this.preProcessNodes(args.xmldata);
this.preProcessNodes();
}
preProcessNodes(xml) {
const mergeableVariables = ['variables', 'choices', 'constants', 'dynamicChoiceSets', 'formulas', 'stages', 'textTemplates'];
preProcessNodes() {
const flowVariables = ['variables', 'choices', 'constants', 'dynamicChoiceSets', 'formulas', 'stages', 'textTemplates'];
const flowMetadata = ['$',

@@ -40,3 +40,3 @@ 'description',

const allNodes = [];
const flowXML = xml.Flow;
const flowXML = this.xmldata.Flow;
for (const nodeType in flowXML) {

@@ -54,3 +54,3 @@ const nodesOfType = flowXML[nodeType];

}
else if (mergeableVariables.includes(nodeType)) {
else if (flowVariables.includes(nodeType)) {
for (const node of nodesOfType) {

@@ -66,14 +66,14 @@ allNodes.push(new FlowVariable_1.FlowVariable(node.name, nodeType, node));

}
this.label = xml.Flow.label;
this.interviewLabel = xml.Flow.interviewLabel;
this.processType = xml.Flow.processType;
this.processMetadataValues = xml.Flow.processMetadataValues;
this.start = xml.Flow.start;
this.status = xml.Flow.status;
this.label = this.xmldata.Flow.label;
this.interviewLabel = this.xmldata.Flow.interviewLabel;
this.processType = this.xmldata.Flow.processType;
this.processMetadataValues = this.xmldata.Flow.processMetadataValues;
this.start = this.xmldata.Flow.start;
this.status = this.xmldata.Flow.status;
let type;
if (xml.Flow.start[0].triggerType) {
type = 'Trigger:' + xml.Flow.start[0].triggerType;
if (this.xmldata.Flow.start[0].triggerType) {
type = 'Trigger:' + this.xmldata.Flow.start[0].triggerType;
}
else {
type = xml.Flow.processType[0] === 'Flow' ? 'Visual Flow' : xml.Flow.processType;
type = this.xmldata.Flow.processType[0] === 'Flow' ? 'Visual Flow' : this.xmldata.Flow.processType;
}

@@ -80,0 +80,0 @@ this.type = type;

{
"name": "lightning-flow-scanner-core",
"version": "1.0.12",
"version": "1.0.13",
"main": "out/**",

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

@@ -10,3 +10,3 @@ import { convertFlowNodes } from './ConvertFlowNodes';

}
return {Flow: res};
return res;
}

@@ -40,3 +40,4 @@ import {Flow} from '../models/Flow';

);
flow.processedData = BuildFlow(nodesToBuild);
flow.xmldata['Flow'] = BuildFlow(nodesToBuild);
flow.preProcessNodes();
flowResults.push(new ScanResult(flow, ruleResults));

@@ -43,0 +44,0 @@ }

@@ -42,8 +42,9 @@ import {FlowElement} from './FlowElement';

this.xmldata = args.xmldata;
this.preProcessNodes(args.xmldata);
this.preProcessNodes();
}
private preProcessNodes(xml) {
const mergeableVariables = ['variables', 'choices', 'constants', 'dynamicChoiceSets', 'formulas', 'stages', 'textTemplates'];
public preProcessNodes() {
const flowVariables = ['variables', 'choices', 'constants', 'dynamicChoiceSets', 'formulas', 'stages', 'textTemplates'];
const flowMetadata = ['$',

@@ -61,3 +62,3 @@ 'description',

const allNodes: (FlowVariable | FlowElement | FlowMetadata)[] = [];
const flowXML = xml.Flow;
const flowXML = this.xmldata.Flow;
for (const nodeType in flowXML) {

@@ -77,3 +78,3 @@ const nodesOfType = flowXML[nodeType];

}
} else if (mergeableVariables.includes(nodeType)) {
} else if (flowVariables.includes(nodeType)) {
for (const node of nodesOfType) {

@@ -93,14 +94,14 @@ allNodes.push(

this.label = xml.Flow.label;
this.interviewLabel = xml.Flow.interviewLabel;
this.processType = xml.Flow.processType;
this.processMetadataValues = xml.Flow.processMetadataValues;
this.start = xml.Flow.start;
this.status = xml.Flow.status;
this.label = this.xmldata.Flow.label;
this.interviewLabel = this.xmldata.Flow.interviewLabel;
this.processType = this.xmldata.Flow.processType;
this.processMetadataValues = this.xmldata.Flow.processMetadataValues;
this.start = this.xmldata.Flow.start;
this.status = this.xmldata.Flow.status;
let type;
if (xml.Flow.start[0].triggerType) {
type = 'Trigger:' + xml.Flow.start[0].triggerType;
if (this.xmldata.Flow.start[0].triggerType) {
type = 'Trigger:' + this.xmldata.Flow.start[0].triggerType;
} else {
type = xml.Flow.processType[0] === 'Flow' ? 'Visual Flow' : xml.Flow.processType;
type = this.xmldata.Flow.processType[0] === 'Flow' ? 'Visual Flow' : this.xmldata.Flow.processType;
}

@@ -107,0 +108,0 @@ this.type = type;

Sorry, the diff of this file is not supported yet

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