git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: 90e95e88c9ba1764127661b72a41b571f87c3b54

Files: 90e95e88c9ba1764127661b72a41b571f87c3b54 / sbot / index.js

1429 bytesRaw
1var Channels = require('./channels')
2var Heartbeat = require('./heartbeat')
3var Subscriptions = require('./subscriptions')
4var Roots = require('./roots')
5var Progress = require('./progress')
6var Search = require('./search')
7var RecentFeeds = require('./recent-feeds')
8var LiveBacklinks = require('./live-backlinks')
9
10exports.name = 'patchwork'
11exports.version = require('../package.json').version
12exports.manifest = {
13 channels: 'source',
14 subscriptions: 'source',
15 roots: 'source',
16 latest: 'source',
17 linearSearch: 'source',
18 progress: 'source',
19 recentFeeds: 'source',
20 heartbeat: 'source',
21
22 getSubscriptions: 'async',
23 getChannels: 'async',
24
25 liveBacklinks: {
26 subscribe: 'sync',
27 unsubscribe: 'sync',
28 stream: 'source'
29 }
30}
31
32exports.init = function (ssb, config) {
33 var progress = Progress(ssb, config)
34 var channels = Channels(ssb, config)
35 var subscriptions = Subscriptions(ssb, config)
36 var roots = Roots(ssb, config)
37 var search = Search(ssb, config)
38 var recentFeeds = RecentFeeds(ssb, config)
39
40 return {
41 heartbeat: Heartbeat(ssb, config),
42 channels: channels.stream,
43 subscriptions: subscriptions.stream,
44 roots: roots.read,
45 latest: roots.latest,
46 progress: progress.stream,
47 recentFeeds: recentFeeds.stream,
48 linearSearch: search.linear,
49 getSubscriptions: subscriptions.get,
50 getChannels: channels.get,
51 liveBacklinks: LiveBacklinks(ssb, config)
52 }
53}
54

Built with git-ssb-web