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

@flowfuse/node-red-dashboard-2-migration

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@flowfuse/node-red-dashboard-2-migration - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

28

index.js

@@ -48,22 +48,10 @@ const generators = require('./generators')

console.log(idMap)
// loop ovr all nodes in thw flow and ensure we have updated references:
migratedFlow.forEach(node => {
if (node.wires && node.wires.length) {
node.wires = node.wires.map(wire => {
return wire.map(id => {
return idMap[id] || id
})
})
}
if (node.group) {
node.group = idMap[node.group] || node.group
}
if (node.page) {
node.page = idMap[node.page] || node.page
}
})
return migratedFlow
// work smart, not hard
let strJson = JSON.stringify(migratedFlow)
// loop over idMap
for (const key in idMap) {
// replace all instances of the old ID with the new ID
strJson = strJson.replaceAll(key, idMap[key])
}
return JSON.parse(strJson)
}

@@ -70,0 +58,0 @@ }

{
"name": "@flowfuse/node-red-dashboard-2-migration",
"version": "0.0.2",
"version": "0.0.3",
"description": "A module that exposes a migration script for converting Dashboard 1.0 flows to Dashboard 2.0",

@@ -5,0 +5,0 @@ "main": "index.js",

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