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

syntex-automation

Package Overview
Dependencies
Maintainers
1
Versions
113
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-b23 to 1.2.1-b24

4

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

@@ -12,3 +12,3 @@ "main": "main.js",

"dependencies": {
"syntex-filesystem": "1.0.3-b9",
"syntex-filesystem": "1.0.3-b10",
"syntex-logger": "1.0.9-b2"

@@ -15,0 +15,0 @@ },

@@ -24,46 +24,49 @@ module.exports = class Automation

this.loadAutomation().then((automationSuccess) => {
if(this.files.checkFile('automation/automation.json'))
{
this.loadAutomation().then((automationSuccess) => {
if(automationSuccess)
{
this.loadLock().then((lockSuccess) => {
if(lockSuccess)
{
this.initNetwork();
this.timeInterval = setInterval(() => {
var promiseArray = [];
for(const automation of this.automation)
{
if(automation.active && this._includesTime(automation))
if(automationSuccess)
{
this.loadLock().then((lockSuccess) => {
if(lockSuccess)
{
this.initNetwork();
this.timeInterval = setInterval(() => {
var promiseArray = [];
for(const automation of this.automation)
{
promiseArray.push(this._checkLock(automation));
if(!this._isLocked(automation))
if(automation.active && this._includesTime(automation))
{
this.checkTrigger(automation, { name : ('0' + new Date().getHours()).slice(-2) + ':' + ('0' + new Date().getMinutes()).slice(-2) });
promiseArray.push(this._checkLock(automation));
if(!this._isLocked(automation))
{
this.checkTrigger(automation, { name : ('0' + new Date().getHours()).slice(-2) + ':' + ('0' + new Date().getMinutes()).slice(-2) });
}
}
}
}
Promise.all(promiseArray).then((result) => {
if(result.includes(true))
{
this.files.writeFile('automation/automation-lock.json', { timeLock : this.timeLock, stateLock : this.stateLock });
}
});
}, 60000);
this.logger.log('success', 'automation', 'Automation', '%automation_load_success%!');
this.ready = true;
}
});
}
});
Promise.all(promiseArray).then((result) => {
if(result.includes(true))
{
this.files.writeFile('automation/automation-lock.json', { timeLock : this.timeLock, stateLock : this.stateLock });
}
});
}, 60000);
this.logger.log('success', 'automation', 'Automation', '%automation_load_success%!');
this.ready = true;
}
});
}
});
}
}

@@ -70,0 +73,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