git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Tree: 50acb42b9733f299a0a10fdb8a84d71ecc04ba7b

Files: 50acb42b9733f299a0a10fdb8a84d71ecc04ba7b / sbot / index.js

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

Built with git-ssb-web