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

@caseywebb/growhaus-server

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@caseywebb/growhaus-server - npm Package Compare versions

Comparing version 1.0.0-alpha.156 to 1.0.0-alpha.158

dist/brightness.d.ts

1

dist/agents.d.ts

@@ -10,3 +10,2 @@ import * as WebSocket from 'ws';

private setBrightness;
private setBrightnessViaWeather;
}

@@ -13,0 +12,0 @@ declare class AgentRegistry extends Subscribable {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const autobind_decorator_1 = tslib_1.__importDefault(require("autobind-decorator"));
const brightness_1 = require("./brightness");
const growhaus_1 = require("@caseywebb/growhaus");
const weather_1 = require("./weather");
class Agent extends growhaus_1.Subscribable {

@@ -20,6 +18,5 @@ constructor(name, socket) {

});
this.setBrightnessViaWeather();
weather_1.weather.subscribe(this.setBrightnessViaWeather);
brightness_1.brightness.subscribe(() => this.setBrightness(brightness_1.brightness.current));
}
setBrightness(brightness, duration = 5) {
setBrightness(brightness) {
console.log(`Setting "${this.name}" to ${brightness}% brightness`);

@@ -30,13 +27,6 @@ this.pending = true;

brightness,
duration
}));
this.next();
}
setBrightnessViaWeather() {
this.setBrightness(weather_1.weather.current.brightness, weather_1.weather.reloadIntervalDurationMinutes);
}
}
tslib_1.__decorate([
autobind_decorator_1.default
], Agent.prototype, "setBrightnessViaWeather", null);
class AgentRegistry extends growhaus_1.Subscribable {

@@ -43,0 +33,0 @@ constructor() {

@@ -7,3 +7,2 @@ "use strict";

const agents_1 = require("./agents");
const weather_1 = require("./weather");
exports.websocketRoutes = [

@@ -18,14 +17,8 @@ route.all('/agent/:name', (ctx, name) => {

event: growhaus_1.WebApiEvents.AgentData,
data: agents_1.agents
data: agents_1.agents,
});
const sendWeatherData = () => send({
event: growhaus_1.WebApiEvents.WeatherData,
data: weather_1.weather
});
sendAgentData();
sendWeatherData();
agents_1.agents.subscribe(sendAgentData);
weather_1.weather.subscribe(sendWeatherData);
})
}),
];
//# sourceMappingURL=api.js.map
export declare const PORT: number;
export declare const DARK_SKY_API_KEY: string;
export declare const DARK_SKY_LOCATION: string;
//# sourceMappingURL=config.d.ts.map

@@ -10,4 +10,2 @@ "use strict";

: 8081;
exports.DARK_SKY_API_KEY = process.env.DARK_SKY_API_KEY;
exports.DARK_SKY_LOCATION = process.env.DARK_SKY_LOCATION;
//# sourceMappingURL=config.js.map
{
"name": "@caseywebb/growhaus-server",
"version": "1.0.0-alpha.156+fd197ac",
"version": "1.0.0-alpha.158+f7e8d53",
"author": "Casey Webb (https://caseyWebb.xyz)",

@@ -17,4 +17,3 @@ "license": "WTFPL",

"dependencies": {
"@caseywebb/growhaus": "^1.0.0-alpha.156+fd197ac",
"autobind-decorator": "^2.4.0",
"@caseywebb/growhaus": "^1.0.0-alpha.158+f7e8d53",
"dotenv": "^8.2.0",

@@ -24,3 +23,2 @@ "koa": "^2.10.0",

"koa-websocket": "^6.0.0",
"node-fetch": "^2.6.0",
"tslib": "^1.10.0"

@@ -34,3 +32,2 @@ },

"@types/node": "^13.13.4",
"@types/node-fetch": "^2.5.2",
"concurrently": "^5.2.0",

@@ -40,3 +37,3 @@ "nodemon": "^2.0.3",

},
"gitHead": "fd197ac53f11ade03eee120f41920928bb1d9ca9"
"gitHead": "f7e8d53a2b7cf64b30cd8500511e52e9657c4df3"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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