Update megalodon version to 0.2.0

This commit is contained in:
AkiraFukushima 2018-07-16 17:47:47 +09:00
parent e2c012ab12
commit 52d67e9861
3 changed files with 20 additions and 32 deletions

22
package-lock.json generated
View File

@ -85,9 +85,9 @@
}
},
"@types/request": {
"version": "2.47.0",
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.0.tgz",
"integrity": "sha512-/KXM5oev+nNCLIgBjkwbk8VqxmzI56woD4VUxn95O+YeQ8hJzcSmIZ1IN3WexiqBb6srzDo2bdMbsXxgXNkz5Q==",
"version": "2.47.1",
"resolved": "https://registry.npmjs.org/@types/request/-/request-2.47.1.tgz",
"integrity": "sha512-TV3XLvDjQbIeVxJ1Z3oCTDk/KuYwwcNKVwz2YaT0F5u86Prgc4syDAp6P96rkTQQ4bIdh+VswQIC9zS6NjY7/g==",
"requires": {
"@types/caseless": "0.12.1",
"@types/form-data": "2.2.1",
@ -10889,16 +10889,16 @@
"dev": true
},
"megalodon": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/megalodon/-/megalodon-0.1.1.tgz",
"integrity": "sha512-eDpLdslntzSIPZYQdZg+kRk7jeEZEXq34le9wycYOGIq0luO8j5tPeVbZGkuTFRb4TH/q8/MOJiHqIQGiKpJqQ==",
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/megalodon/-/megalodon-0.2.0.tgz",
"integrity": "sha512-Xkwyy4Epicu5h6yReZeA3gfFZWFT/E6JqSNjGw1qnQ4/s5uyAIqyV1KxJdn3VH/VJMfTBPaA4CboH8n2qxk0VQ==",
"requires": {
"@types/oauth": "0.9.0",
"@types/request": "2.47.0",
"@types/request": "2.47.1",
"axios": "0.18.0",
"oauth": "0.9.15",
"request": "2.87.0",
"typescript": "2.9.1"
"typescript": "2.9.2"
},
"dependencies": {
"request": {
@ -16995,9 +16995,9 @@
"dev": true
},
"typescript": {
"version": "2.9.1",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz",
"integrity": "sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA=="
"version": "2.9.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w=="
},
"uglify-js": {
"version": "3.3.16",

View File

@ -105,7 +105,7 @@
"hoek": "^5.0.3",
"is-empty": "^1.2.0",
"lodash": "^4.17.10",
"megalodon": "^0.1.1",
"megalodon": "^0.2.0",
"moment": "^2.21.0",
"mousetrap": "^1.6.2",
"nedb": "^1.8.0",

View File

@ -15,18 +15,12 @@ export default class Streaming {
this.listener = this.client.stream('/streaming/user')
log.info('/streaming/user started')
this.listener.on('message', (msg) => {
switch (msg.event) {
case 'update':
updateCallback(msg.data)
break
case 'notification':
notificationCallback(msg.data)
break
default:
log.debug(msg)
break
}
this.listener.on('update', (status) => {
updateCallback(status)
})
this.listener.on('notification', (notification) => {
notificationCallback(notification)
})
this.listener.on('error', (err) => {
@ -38,14 +32,8 @@ export default class Streaming {
this.listener = this.client.stream(path)
log.info(`${path} started`)
this.listener.on('message', (msg) => {
switch (msg.event) {
case 'update':
updateCallback(msg.data)
break
default:
break
}
this.listener.on('update', (status) => {
updateCallback(status)
})
this.listener.on('error', (err) => {