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.0.2-b4 to 1.0.2-b5

28

automation.js
//let TypeManager = require('./type-manager'), AutomationSystem = require('syntex-automation');
const request = require('request'), store = require('json-fs-store');
var logger, storage;
var logger, storage, eventManager;
var eventLock = [], positiveFired = [], negativeFired = [], ready = false;

@@ -8,8 +8,11 @@

{
constructor(log, storagePath, dataManager)
constructor(log, storagePath, dataManager, EventManager)
{
logger = log;
storage = store(storagePath);
storage = store(storagePath);
console.log('STORAGE PATH', storagePath);
this.dataManager = dataManager;
this.dataManager = dataManager;
eventManager = EventManager;

@@ -38,2 +41,4 @@ //TypeManager = new TypeManager(logger);

return new Promise((resolve) => {
storage.list((err, obj) => console.log(obj));

@@ -49,3 +54,5 @@ storage.load('automation', (err, obj) => {

this.automation = obj.automation;
}
}
console.log(this.automation, obj);

@@ -61,3 +68,5 @@ ready = true;

{
value = value.value.toString();
value = value.toString();
console.log('RUN AUTOMATION', this.automation);

@@ -116,3 +125,5 @@ for(var i = 0; i < this.automation.length; i++)

{
var trigger = null;
var trigger = null;
console.log(value);

@@ -224,3 +235,4 @@ for(var i = 0; i < automation.trigger.length; i++)

}
*/
*/
eventManager.setOutputStream('SynTexAutomation', { id : automation.result[i].id, letters : automation.result[i].letters }, { value : JSON.parse(automation.result[i].value) });
}

@@ -227,0 +239,0 @@

@@ -13,3 +13,3 @@ const EventEmitter = require('events'), request = require('request');

this.LogikEngine = new LogikEngine(logger, storagePath, dataManager);
this.LogikEngine = new LogikEngine(logger, storagePath, dataManager, this);
}

@@ -19,3 +19,8 @@

{
super.on(stream, (reciever, values) => callback(reciever, values));
super.on(stream, (reciever, values) => {
console.log('<<<', stream, reciever, values);
callback(reciever, values)
});
}

@@ -25,8 +30,7 @@

{
if(!super.emit(stream, reciever, values))
{
}
super.emit(stream, reciever, values);
sendToAutomationServer(reciever.id, reciever.letters, values);
console.log('>>>', stream, reciever, values);
this.sendToAutomationServer(reciever.id, reciever.letters, values);
}

@@ -33,0 +37,0 @@

{
"name": "syntex-automation",
"version": "1.0.2-b4",
"version": "1.0.2-b5",
"description": "An automation system for your smart home",

@@ -5,0 +5,0 @@ "main": "main.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