Files: 833e6272fdc03999e6a10c74b5adff86a11d8d39 / sbot / index.js
987 bytesRaw
1 | var Channels = require('./channels') |
2 | var Subscriptions = require('./subscriptions') |
3 | var Roots = require('./roots') |
4 | var Progress = require('./progress') |
5 | var Search = require('./search') |
6 | |
7 | exports.name = 'patchwork' |
8 | exports.version = require('../package.json').version |
9 | exports.manifest = { |
10 | channels: 'source', |
11 | subscriptions: 'source', |
12 | roots: 'source', |
13 | latest: 'source', |
14 | linearSearch: 'source', |
15 | progress: 'source', |
16 | getSubscriptions: 'async', |
17 | getChannels: 'async' |
18 | } |
19 | |
20 | exports.init = function (ssb, config) { |
21 | var progress = Progress(ssb, config) |
22 | var channels = Channels(ssb, config) |
23 | var subscriptions = Subscriptions(ssb, config) |
24 | var roots = Roots(ssb, config) |
25 | var search = Search(ssb, config) |
26 | |
27 | return { |
28 | channels: channels.stream, |
29 | subscriptions: subscriptions.stream, |
30 | roots: roots.read, |
31 | latest: roots.latest, |
32 | progress: progress.stream, |
33 | linearSearch: search.linear, |
34 | getSubscriptions: subscriptions.get, |
35 | getChannels: channels.get |
36 | } |
37 | } |
38 |
Built with git-ssb-web