Merge pull request #37 from bluemaex/update-deps

Update dependencies for node 8
This commit is contained in:
Max Stockner 2018-01-10 23:25:37 +01:00 committed by GitHub
commit 90e882fb0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 25 deletions

View File

@ -3,7 +3,7 @@
var fs = require('fs') var fs = require('fs')
var http = require('http') var http = require('http')
var connect = require('connect') var body = require('body-parser')
var express = require('express') var express = require('express')
var socketio = require('socket.io') var socketio = require('socket.io')
var program = require('commander') var program = require('commander')
@ -48,14 +48,11 @@ function DMXWeb() {
} }
} }
}) })
io.set('log level', 1)
app.configure(function() { app.use(body.json())
app.use(connect.json())
})
app.get('/', function(req, res) { app.get('/', function(req, res) {
res.sendfile(__dirname + '/index.html') res.sendFile(__dirname + '/index.html')
}) })
app.get('/config', function(req, res) { app.get('/config', function(req, res) {
@ -75,7 +72,7 @@ function DMXWeb() {
res.json({"state": dmx.universeToObject(req.params.universe)}) res.json({"state": dmx.universeToObject(req.params.universe)})
}) })
app.post('/state/:universe', function(req, res) { app.post('/state/:universe', function(req, res) {
if(!(req.params.universe in dmx.universes)) { if(!(req.params.universe in dmx.universes)) {
res.status(404).json({"error": "universe not found"}) res.status(404).json({"error": "universe not found"})

View File

@ -11,7 +11,7 @@ function DMX4ALL(device_id, options) {
this.universe.fill(0) this.universe.fill(0)
this.dev = new SerialPort(device_id, { this.dev = new SerialPort(device_id, {
'baudrate': 38400, 'baudRate': 38400,
'databits': 8, 'databits': 8,
'stopbits': 1, 'stopbits': 1,
'parity': 'none' 'parity': 'none'
@ -26,7 +26,7 @@ function DMX4ALL(device_id, options) {
} }
DMX4ALL.prototype.send_universe = function() { DMX4ALL.prototype.send_universe = function() {
if(!this.dev.isOpen()) { if(!this.dev.writable) {
return return
} }
@ -64,4 +64,4 @@ DMX4ALL.prototype.get = function(c) {
return this.universe[c] return this.universe[c]
} }
module.exports = DMX4ALL module.exports = DMX4ALL

View File

@ -25,7 +25,7 @@ function DMXKingUltraDMXPro(device_id, options) {
} }
this.dev = new SerialPort(device_id, { this.dev = new SerialPort(device_id, {
'baudrate': 250000, 'baudRate': 250000,
'databits': 8, 'databits': 8,
'stopbits': 2, 'stopbits': 2,
'parity': 'none' 'parity': 'none'
@ -37,7 +37,7 @@ function DMXKingUltraDMXPro(device_id, options) {
} }
DMXKingUltraDMXPro.prototype.send_universe = function() { DMXKingUltraDMXPro.prototype.send_universe = function() {
if(!this.dev.isOpen()) { if(!this.dev.writable) {
return return
} }
var hdr = Buffer([ var hdr = Buffer([
@ -81,4 +81,4 @@ DMXKingUltraDMXPro.prototype.get = function(c) {
return this.universe[c] return this.universe[c]
} }
module.exports = DMXKingUltraDMXPro module.exports = DMXKingUltraDMXPro

View File

@ -12,7 +12,7 @@ function EnttecOpenUsbDMX(device_id, options) {
self.interval = 46 self.interval = 46
this.dev = new SerialPort(device_id, { this.dev = new SerialPort(device_id, {
'baudrate': 250000, 'baudRate': 250000,
'databits': 8, 'databits': 8,
'stopbits': 2, 'stopbits': 2,
'parity': 'none' 'parity': 'none'
@ -27,7 +27,7 @@ function EnttecOpenUsbDMX(device_id, options) {
EnttecOpenUsbDMX.prototype.send_universe = function() { EnttecOpenUsbDMX.prototype.send_universe = function() {
var self = this var self = this
if(!this.dev.isOpen()) { if(!this.dev.writable) {
return return
} }

View File

@ -16,7 +16,7 @@ function EnttecUSBDMXPRO(device_id, options) {
this.universe.fill(0) this.universe.fill(0)
this.dev = new SerialPort(device_id, { this.dev = new SerialPort(device_id, {
'baudrate': 250000, 'baudRate': 250000,
'databits': 8, 'databits': 8,
'stopbits': 2, 'stopbits': 2,
'parity': 'none' 'parity': 'none'
@ -28,7 +28,7 @@ function EnttecUSBDMXPRO(device_id, options) {
} }
EnttecUSBDMXPRO.prototype.send_universe = function() { EnttecUSBDMXPRO.prototype.send_universe = function() {
if(!this.dev.isOpen()) { if(!this.dev.writable) {
return return
} }
var hdr = Buffer([ var hdr = Buffer([
@ -72,4 +72,4 @@ EnttecUSBDMXPRO.prototype.get = function(c) {
return this.universe[c] return this.universe[c]
} }
module.exports = EnttecUSBDMXPRO module.exports = EnttecUSBDMXPRO

View File

@ -56,7 +56,7 @@
return 'channel_' + universe + '_' + channel; return 'channel_' + universe + '_' + channel;
} }
var socket = io.connect(); var socket = io();
socket.on('init', function (msg) { socket.on('init', function (msg) {
$('#presets').empty(); $('#presets').empty();
$('#sliders').empty(); $('#sliders').empty();

View File

@ -1,6 +1,6 @@
{ {
"name": "dmx", "name": "dmx",
"version": "0.0.5", "version": "0.0.6",
"author": "Sebastian Wiedenroth <wiedi@frubar.net>", "author": "Sebastian Wiedenroth <wiedi@frubar.net>",
"description": "DMX library and webservice", "description": "DMX library and webservice",
"url": "https://github.com/wiedi/node-dmx", "url": "https://github.com/wiedi/node-dmx",
@ -17,11 +17,11 @@
"light control" "light control"
], ],
"dependencies": { "dependencies": {
"serialport": "4.0.x", "serialport": "^6.0.4",
"socket.io": "0.9.x", "socket.io": "^2.0.4",
"connect": "2.11.x", "express": "^4.16.2",
"express": "3.4.x", "body-parser": "^1.5.2",
"commander": "2.0.x" "commander": "^2.12.2"
}, },
"licenses": [ "licenses": [
{ {