-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
- Loading branch information
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,22 @@ var signalhub = require('signalhub') | |
var hyperlog = require('hyperlog') | ||
var through = require('through2') | ||
var protobuf = require('protocol-buffers') | ||
var fs = require('fs') | ||
var multiline = require('multiline') | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ungoldman
Member
|
||
|
||
var messages = protobuf(fs.readFileSync(__dirname + '/../schema.proto')) | ||
var messages = protobuf(multiline(function () {/* | ||
message SignedMessage { | ||
optional bytes signature = 1; | ||
required bytes message = 2; | ||
} | ||
message Message { | ||
optional string username = 1; | ||
optional string channel = 2; | ||
optional uint64 timestamp = 3; | ||
optional string text = 4; | ||
} | ||
*/})) | ||
|
||
module.exports = createSwarm | ||
|
||
|
@Flet Hmm.. removing
fs
(a core module) in favor ofmultiline
(an external dependency) seems weird to me (if removing dependencies is the goal of this commit). Would be nice to keep the buffer protocol schemas as a separate file (could be consumed more easily elsewhere).