@caseywebb/growhaus-agent
Advanced tools
Comparing version 0.0.0-latest.20190725T212009Z.5b89a5e to 0.0.0-latest.20190725T223106Z.25b0d55
export declare const DRIVER_PWM_PIN: number; | ||
export declare const SERVER_HOST: string; | ||
export declare const SERVER_URL: string; | ||
export declare const AGENT_NAME: string; | ||
//# sourceMappingURL=config.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
const path_1 = require("path"); | ||
const dotenv_1 = tslib_1.__importDefault(require("dotenv")); | ||
dotenv_1.default.config(); | ||
dotenv_1.default.config({ path: path_1.resolve(__dirname, '../../.env') }); | ||
exports.DRIVER_PWM_PIN = process.env.DRIVER_PWM_PIN | ||
? parseInt(process.env.DRIVER_PWM_PIN) | ||
: 18; | ||
exports.SERVER_HOST = process.env.SERVER_HOST || 'localhost:3000'; | ||
exports.SERVER_URL = process.env.SERVER_URL || 'ws://localhost:3001'; | ||
exports.AGENT_NAME = process.env.AGENT_NAME || 'growhaus-agent'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const tslib_1 = require("tslib"); | ||
const config = tslib_1.__importStar(require("./config")); | ||
const config_1 = require("./config"); | ||
const driver_1 = require("./driver"); | ||
@@ -10,4 +9,4 @@ const schedule_1 = require("./schedule"); | ||
async function main() { | ||
const driver = new driver_1.LedDriver(config.DRIVER_PWM_PIN); | ||
const socket = new socket_1.Socket(`ws://${config.SERVER_HOST}/agent/${config.AGENT_NAME}`); | ||
const driver = new driver_1.LedDriver(config_1.DRIVER_PWM_PIN); | ||
const socket = new socket_1.Socket(`${config_1.SERVER_URL}/agent/${config_1.AGENT_NAME}`); | ||
const offlineFallbackSchedule = new schedule_1.LightSchedule(); | ||
@@ -14,0 +13,0 @@ process.on('SIGINT', () => driver.setBrightness(100)); |
{ | ||
"name": "@caseywebb/growhaus-agent", | ||
"version": "0.0.0-latest.20190725T212009Z.5b89a5e", | ||
"version": "0.0.0-latest.20190725T223106Z.25b0d55", | ||
"author": "Casey Webb (https://caseyWebb.xyz)", | ||
@@ -5,0 +5,0 @@ "bin": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
10429