node-red-contrib-prib-functions
Advanced tools
Comparing version 0.11.0 to 0.11.1
{ | ||
"name": "node-red-contrib-prib-functions", | ||
"version": "0.11.0", | ||
"version": "0.11.1", | ||
"description": "Node-RED added node functions.", | ||
@@ -39,3 +39,3 @@ "dependencies": { | ||
"avg", | ||
"ARVO", | ||
"AVRO", | ||
"arvo", | ||
@@ -42,0 +42,0 @@ "compare", |
@@ -77,3 +77,3 @@ # [node-red-contrib-prib-functions][2] | ||
* Array to Messages | ||
* ARVO to JSON | ||
* AVRO to JSON | ||
* CSV to Array | ||
@@ -89,3 +89,3 @@ * CSV to HTML | ||
* JSON to CSV | ||
* JSON to ARVO | ||
* JSON to AVRO | ||
* JSON to ISO8385 | ||
@@ -107,5 +107,5 @@ * JSON to Messages | ||
Example ARVO with schema | ||
Example AVRO with schema | ||
![Transform ARVO](documentation/transformArvo.JPG "Transform ARVO example") | ||
![Transform AVRO](documentation/transformArvo.JPG "Transform AVRO example") | ||
@@ -236,4 +236,6 @@ ------------------------------------------------------------ | ||
0.11.0 Transform for ARVO and snappy. Add JSON to CSV | ||
0.11.1 Fix spelling of AVRO. | ||
0.11.0 Transform for AVRO and snappy. Add JSON to CSV | ||
0.10.2 Transform validate for array source, bug fixes on transform and add improvements to array to messages. Added node for levenshtein distance. | ||
@@ -240,0 +242,0 @@ |
@@ -81,18 +81,18 @@ const should = require("should"); | ||
it('ARVO', function(done) { | ||
it('AVRO', function(done) { | ||
const flow = [ | ||
{ id : "JSON2ARVO", | ||
name : "JSON2ARVOname", | ||
{ id : "JSON2AVRO", | ||
name : "JSON2AVROname", | ||
type : "transform", | ||
actionSource: "JSON", | ||
actionTarget: "ARVO", | ||
actionTarget: "AVRO", | ||
sourceProperty:"msg.payload", | ||
targetProperty:"msg.payload", | ||
schema: '{"type":"record","fields":[{"name":"name","type":"string"}]}', | ||
wires : [ [ "ARVO2JSON" ],["errorHelper"] ] | ||
wires : [ [ "AVRO2JSON" ],["errorHelper"] ] | ||
}, | ||
{ id : "ARVO2JSON", | ||
name : "ARVO2JSONname", | ||
{ id : "AVRO2JSON", | ||
name : "AVRO2JSONname", | ||
type : "transform", | ||
actionSource: "ARVO", | ||
actionSource: "AVRO", | ||
actionTarget: "JSON", | ||
@@ -108,3 +108,3 @@ sourceProperty:"msg.payload", | ||
helper.load(transformNode, flow, function() { | ||
const JSON2ARVO = helper.getNode("JSON2ARVO"); | ||
const JSON2AVRO = helper.getNode("JSON2AVRO"); | ||
const outHelper = helper.getNode("outHelper"); | ||
@@ -127,3 +127,3 @@ const errorHelper = helper.getNode("errorHelper"); | ||
}); | ||
JSON2ARVO.receive({ | ||
JSON2AVRO.receive({ | ||
topic:"test", | ||
@@ -130,0 +130,0 @@ payload : JSON.parse(testData) |
@@ -61,3 +61,3 @@ [ | ||
"actionSource": "JSON", | ||
"actionTarget": "ARVO", | ||
"actionTarget": "AVRO", | ||
"sourceProperty": "msg.payload", | ||
@@ -89,3 +89,3 @@ "targetProperty": "msg.payload", | ||
"name": "", | ||
"actionSource": "ARVO", | ||
"actionSource": "AVRO", | ||
"actionTarget": "JSON", | ||
@@ -92,0 +92,0 @@ "sourceProperty": "msg.payload", |
@@ -101,3 +101,3 @@ const logger = new (require("node-red-contrib-logger"))("transform"); | ||
}, | ||
ARVOToJSON: (RED,node,msg,data)=>node.avroTransformer.fromBuffer(data), // = {kind: 'CAT', name: 'Albert'} | ||
AVROToJSON: (RED,node,msg,data)=>node.avroTransformer.fromBuffer(data), // = {kind: 'CAT', name: 'Albert'} | ||
CSVToArray: (RED,node,msg,data)=>{ | ||
@@ -161,3 +161,3 @@ let lines=csvLines(data,node.skipLeading,node.skipTrailing); | ||
JSONToCSV: (RED,node,msg,data)=>functions.ArrayToCSV(RED,node,msg,functions.JSONToArray(RED,node,msg,data)), | ||
JSONToARVO: (RED,node,msg,data)=>node.avroTransformer.toBuffer(data), // Encoded buffer. | ||
JSONToAVRO: (RED,node,msg,data)=>node.avroTransformer.toBuffer(data), // Encoded buffer. | ||
JSONToHTML: (RED,node,msg,data,level=0)=>{ | ||
@@ -259,3 +259,3 @@ if(Array.isArray(data)) { | ||
node.topicFunction=evalFunction("topic",topicMap); | ||
if(node.actionSource=="ARVO" ||node.actionTarget=="ARVO") { | ||
if(node.actionSource=="AVRO" ||node.actionTarget=="AVRO") { | ||
node.avroTransformer=avsc.Type.forSchema(JSON.parse(node.schema)); | ||
@@ -262,0 +262,0 @@ } |
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
1198969
289