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