New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-syntex-webhooks

Package Overview
Dependencies
Maintainers
1
Versions
1176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-syntex-webhooks - npm Package Compare versions

Comparing version 1.0.5-b30 to 1.0.5-b31

70

index.js

@@ -403,18 +403,9 @@ var request = require('request');

storage.load('storage', (err, obj) => {
storage.load(this.mac, (err, obj) => {
if(obj && !err)
{
for(var i = 0; i < obj.devices.length; i++)
{
if(obj.devices[i].mac === this.mac)
{
state = obj.devices[i].value;
if(state == 'true' || state == 'false')
{
state = (state === 'true');
}
}
}
state = obj.value;
log('\x1b[36m%s\x1b[0m', "[READ]", "HomeKit Status für '" + this.name + "' ist '" + state + "' ( " + this.mac + " )");
}

@@ -424,3 +415,3 @@

{
log('\x1b[31m%s\x1b[0m', "[ERROR]", "Storage.json konnte nicht geladen werden!");
log('\x1b[31m%s\x1b[0m', "[ERROR]", this.mac + ".json konnte nicht geladen werden!");
}

@@ -434,4 +425,2 @@

callback(null, state);
log('\x1b[36m%s\x1b[0m', "[READ]", "HomeKit Status für '" + this.name + "' ist '" + state + "' ( " + this.mac + " )");
});

@@ -457,47 +446,8 @@ };

storage.load('storage', (err, obj) => {
if(obj && !err)
{
var found = false;
var device = {
mac: this.mac,
value: this.value
};
for(var i = 0; i < obj.devices.length; i++)
{
if(obj.devices[i].mac === this.mac)
{
obj.devices[i].value = powerOn;
found = true;
}
}
if(found == false)
{
obj.devices[obj.devices.length] = {mac: this.mac, value: powerOn};
}
storage.add(obj, (err) => {
if(err)
{
log('\x1b[31m%s\x1b[0m', "[ERROR]", "Storage.json konnte nicht aktualisiert werden!");
}
});
}
else
{
var device = {
id: "storage",
devices: [{mac: this.mac, value: powerOn}]
};
storage.add(device, (err) => {
if(err)
{
log('\x1b[31m%s\x1b[0m', "[ERROR]", "Storage.json konnte nicht aktualisiert werden!");
}
});
}
});
updateDevice(device);

@@ -504,0 +454,0 @@ if(urlToCall != "")

2

package.json
{
"name": "homebridge-syntex-webhooks",
"version": "1.0.5-b30",
"version": "1.0.5-b31",
"description": "A webhook plugin for HTTP devices",

@@ -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