Socket
Socket
Sign inDemoInstall

syntex-automation

Package Overview
Dependencies
Maintainers
1
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syntex-automation - npm Package Compare versions

Comparing version 1.2.1-b18 to 1.2.1-b19

2

package.json
{
"name": "syntex-automation",
"version": "1.2.1-b18",
"version": "1.2.1-b19",
"description": "An automation system for your smart home",

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

@@ -357,3 +357,3 @@ module.exports = class Automation

var theRequest = {
url : 'http://' + block.bridge + ':' + block.port + '/devices?id=' + block.id + '&type=' + this.TypeManager.letterToType(block.letters[0]) + '&counter=' + block.letters[1],
url : 'http://' + block.bridge + ':' + block.port + '/devices?id=' + block.id + '&type=' + this.TypeManager.letterToType(block.letters[0]) + '&counter=' + block.letters.slice(1),
timeout : 10000

@@ -520,3 +520,3 @@ };

var theRequest = {
url : 'http://' + (block.bridge || '127.0.0.1') + ':' + (block.port || this.manager.RouteManager.getPort(block.plugin)) + '/devices?id=' + block.id + '&type=' + this.TypeManager.letterToType(block.letters[0]) + '&counter=' + block.letters[1],
url : 'http://' + (block.bridge || '127.0.0.1') + ':' + (block.port || this.manager.RouteManager.getPort(block.plugin)) + '/devices?id=' + block.id + '&type=' + this.TypeManager.letterToType(block.letters[0]) + '&counter=' + block.slice(1),
timeout : 10000

@@ -840,2 +840,28 @@ };

{
const checkCharacteristics = (result) => {
if(result.state instanceof Object && result.block instanceof Object && result.block.characteristics instanceof Object)
{
var characteristics = Object.keys(result.block.characteristics);
for(const x in result.block.state)
{
if(!characteristics.includes(x))
{
delete result.block.state[x];
}
}
for(const x in result.state)
{
if(!characteristics.includes(x))
{
delete result.state[x];
}
}
}
return result;
};
return new Promise((resolve) => {

@@ -851,3 +877,3 @@

resolve({ block, state });
resolve(checkCharacteristics({ block, state }));
});

@@ -857,3 +883,3 @@ }

{
resolve({ block, state });
resolve(checkCharacteristics({ block, state }));
}

@@ -867,5 +893,19 @@ }

block.state = state;
if(block.characteristics != null)
{
block.state = {};
resolve({ block, state : comparison });
for(const x in block.characteristics)
{
block.state[x] = state[x];
}
resolve(checkCharacteristics({ block, state : comparison }));
}
else
{
block.state = state;
resolve(checkCharacteristics({ block, state : comparison }));
}
});

@@ -875,3 +915,3 @@ }

{
this._getState(automation, block).then((state) => resolve({ block, state }));
this._getState(automation, block).then((state) => resolve(checkCharacteristics({ block, state })));
}

@@ -878,0 +918,0 @@ }

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