mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-02-09 08:18:44 +01:00
Merge pull request #440 from h3poteto/update_megalodon
Update megalodon version to 0.2.0
This commit is contained in:
commit
a508775d76
22
package-lock.json
generated
22
package-lock.json
generated
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user