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

node-red-viseo-helper

Package Overview
Dependencies
Maintainers
3
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-viseo-helper - npm Package Compare versions

Comparing version 0.2.0-alpha.10 to 0.2.0-alpha.11

0

CODE_OF_CONDUCT.md

@@ -0,0 +0,0 @@ # Contributor Covenant Code of Conduct

@@ -0,0 +0,0 @@ # Contributing to the Project

47

index.js

@@ -244,3 +244,2 @@ 'use strict';

let oldKeys = [];
let version = "";
let actKey = "";

@@ -256,22 +255,17 @@

if (!version) {
version = ((CONFIG.framework || {}).version) || '0.0.0';
}
if (!actKey) {
let keyField = "VISEO_BOT_MAKER_KEY";
let conf = CONFIG || global.CONFIG;
let key = conf[keyField] || node.context().global.get(keyField);
if (!key) {
try {
actKey = (CONFIG || global.CONFIG).server.key || node.context().global.get("VISEO_BOT_MAKER_KEY");
}
catch(err) {
actKey = "";
return nextErr("Missing VISEO Bot Maker key - Read the documentation.");
}
if ( key.length !== 40 || oldKeys.indexOf(key) !== -1) {
return nextErr("Invalid VISEO Bot Maker key - Read the documentation.");
}
actKey = key;
node.status({});
}
if (!actKey || actKey.length !== 40 || oldKeys.indexOf(actKey) !== -1) {
actKey = "";
return nextErr("Missing VISEO Bot Maker key - Read the documentation.");
}
node.status({});
let time = Date.now();

@@ -281,3 +275,3 @@

// First pass : set start time
activities = { info : { start : time, key : actKey, version: version }};
activities = { info : { start : time, key : actKey }};
}

@@ -288,6 +282,9 @@ else if (time - activities.info.start > 86400000){

await sendActivities(activities);
activities = { info : { start : time, key : actKey, version: version }};
activities = { info : { start : time, key : actKey }};
} catch(err) {
activities = { info : { start : time, key : actKey, version: version }};
if (err.statusCode === 401) return nextErr("Invalid VISEO Bot Maker key - Read the documentation.");
activities = { info : { start : time, key : actKey }};
if (err.statusCode === 401) {
oldKeys.push(actKey);
return nextErr("Invalid VISEO Bot Maker key - Read the documentation.");
}
return true;

@@ -305,5 +302,7 @@ }

"start": time,
"nodes": [],
"calls": 0
"end": time,
"nodes": [node.id],
"calls": 1
}
return true;
}

@@ -314,3 +313,3 @@

}
activities[node.type].calls += 1;
activities[node.type].calls++;
activities[node.type].end = time;

@@ -317,0 +316,0 @@

@@ -0,0 +0,0 @@ const extend = require('extend');

{
"name" : "node-red-viseo-helper",
"version" : "0.2.0-alpha.10",
"version" : "0.2.0-alpha.11",
"description" : "Utility libarary for Node-RED",

@@ -5,0 +5,0 @@ "dependencies" : {

@@ -0,0 +0,0 @@ # Node-RED

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