Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update v15 #739

Merged
merged 3 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions bin.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ var File = require('pull-file')
var explain = require('explain-error')
var Config = require('ssb-config/inject')
var Client = require('ssb-client')
var createHash = require('multiblob/util').createHash
var minimist = require('minimist')
var muxrpcli = require('muxrpcli')
var cmdAliases = require('./lib/cli-cmd-aliases')
Expand Down Expand Up @@ -126,10 +125,6 @@ if (argv[0] == 'start') {
cb()
}

// HACK
// we need to output the hash of blobs that are added via blobs.add
// because muxrpc doesnt support the `sink` callback yet, we need this manual override
// -prf
if (process.argv[2] === 'blobs.add') {
var filename = process.argv[3]
var source =
Expand All @@ -141,14 +136,12 @@ if (argv[0] == 'start') {
console.error(' source | blobs.add # read from stdin')
process.exit(1)
})()
var hasher = createHash('sha256')
pull(
source,
hasher,
rpc.blobs.add(function (err) {
rpc.blobs.add(null, function (err, hash) {
if (err)
throw err
console.log('&'+hasher.digest)
console.log(hash)
process.exit()
})
)
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ var SSB = require('ssb-db')

//create a sbot with default caps. these can be overridden again when you call create.
function createSsbServer () {
return SecretStack({ caps: { shs: Buffer.from(caps.shs, 'base64') } }).use(SSB)
return SecretStack({ caps }).use(SSB)
}
module.exports = createSsbServer()

Expand Down
Loading