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

nflow-vis

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nflow-vis - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

package.json
{
"name": "nflow-vis",
"version": "0.1.4",
"version": "0.1.5",
"description": "d3 visualisation for nflow",

@@ -5,0 +5,0 @@ "main": "dist/nflow-vis.js",

@@ -57,3 +57,4 @@ import './inspector.scss'

//data
d.d3dom.select('.data').text(JSON.stringify(e.f.data,null, ' '))
let datum = e.f.data!=null?JSON.stringify(JSON.parse(e.f.data), null, ' '):''
d.d3dom.select('.data').text(datum)
.each(function(){

@@ -67,3 +68,3 @@ hl.highlightBlock(this);

.data(Object.keys(e.f.listeners||{}))
let dl = listeners.enter()

@@ -70,0 +71,0 @@ .append('dl')

@@ -16,2 +16,3 @@ import nflow from 'nflow'

if (actions[name]) {
console.log(name, data)
actions[name](s, ...data)

@@ -51,2 +52,4 @@ updateProps(s, ...data)

if (!e.listeners) e.listeners = {}
//console.log(newData, newData.name)
if (typeof newData == 'string') newData = JSON.parse(newData)
e.listeners[newData.name] = newData.handlers

@@ -65,2 +68,3 @@ updateHash(e)

s.root.children.push(e)
e.parent = s.root
updateHash(s.root)

@@ -77,2 +81,3 @@ }

var e = createNode(newData, s)
e.parent = p
// if (existingNode){

@@ -127,6 +132,9 @@ // removeNode(existingNode,s)

updateHash(e)
// remove child from old parent
var oldP = oldParent && s.nodeMap[oldParent.guid]
if (oldP && newParent) oldP.children = oldP.children.filter(n=>n.guid!=f.guid)
var oldP = e.parent
if (oldP && newParent) { // fix this, introduce ownership
console.log(oldP)
oldP.children = oldP.children.filter(n=>n.guid!=f.guid)
updateHash(oldP)
}

@@ -138,3 +146,6 @@ // add to new parent

newP.children.push(e)
e.parent = newP
updateHash(newP)
}
else e.parent = null
}

@@ -148,3 +159,2 @@

numInstances:1,
parent:f.parent,
data:f.data,

@@ -151,0 +161,0 @@ status:f.status,

@@ -47,3 +47,3 @@ import utils from '../utils/utils'

f.emit('action', name,
flow.toObj()
flow.toObj('name','guid')
, utils.toObj(newData), utils.toObj(oldData))

@@ -50,0 +50,0 @@ })

@@ -101,3 +101,2 @@ import './tree.scss'

node.displayName = node.f.name
node.f.name=='flow' && console.log(node.f)
if (node.f.version) node.displayName += `(${node.f.version})`

@@ -104,0 +103,0 @@ node.recurring = false

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