remove redundant serialization of muxrpc over ipc

This commit is contained in:
Paul Frazee 2015-06-25 19:03:26 -05:00
parent b459569dcf
commit d3bb7cf6d7
2 changed files with 1 additions and 5 deletions

View File

@ -1,7 +1,6 @@
var ipc = require('ipc') var ipc = require('ipc')
var muxrpc = require('muxrpc') var muxrpc = require('muxrpc')
var pull = require('pull-stream') var pull = require('pull-stream')
var Serializer = require('pull-serializer')
var pushable = require('pull-pushable') var pushable = require('pull-pushable')
var Api = require('scuttlebot/lib/api') var Api = require('scuttlebot/lib/api')
@ -17,9 +16,7 @@ module.exports = function (sbot, window) {
var rpc = muxrpc(null, sbot.manifest, serialize)(api) var rpc = muxrpc(null, sbot.manifest, serialize)(api)
rpc.authorized = { id: sbot.feed.id, role: 'master' } rpc.authorized = { id: sbot.feed.id, role: 'master' }
rpc.permissions({allow: null, deny: null}) rpc.permissions({allow: null, deny: null})
function serialize (stream) { function serialize (stream) { return stream }
return Serializer(stream, JSON, {split: '\n\n'})
}
// setup rpc stream over ipc // setup rpc stream over ipc
var rpcStream = rpc.createStream() var rpcStream = rpc.createStream()

View File

@ -29,7 +29,6 @@
"multicb": "^1.1.0", "multicb": "^1.1.0",
"muxrpc": "^5.0.1", "muxrpc": "^5.0.1",
"pull-pushable": "^1.1.4", "pull-pushable": "^1.1.4",
"pull-serializer": "^0.3.2",
"pull-stream": "^2.27.0", "pull-stream": "^2.27.0",
"scuttlebot": "^4.2.3", "scuttlebot": "^4.2.3",
"ssb-config": "^1.0.3", "ssb-config": "^1.0.3",