git ssb

16+

Dominic / patchbay



Tree: 5f693f6ac696487e0347ce4940955470ec5a38e5

Files: 5f693f6ac696487e0347ce4940955470ec5a38e5 / exports.js

1623 bytesRaw
1const bulk = require('bulk-require')
2const nest = require('depnest')
3
4const patchcore = require('patchcore')
5delete patchcore.patchcore.message.html.action.reply
6// prune an action we don't want
7
8const patchbay = {
9 patchbay: {
10 about: bulk(__dirname, [ 'about/**/*.js' ]),
11 app: bulk(__dirname, [ 'app/**/*.js' ]),
12 blob: bulk(__dirname, [ 'blob/**/*.js' ]),
13 channel: bulk(__dirname, [ 'channel/**/*.js' ]),
14 contact: bulk(__dirname, [ 'contact/**/*.js' ]),
15 message: bulk(__dirname, [ 'message/**/*.js' ]),
16 router: bulk(__dirname, [ 'router/**/*.js' ]),
17 styles: bulk(__dirname, [ 'styles/**/*.js' ]),
18 sbot: bulk(__dirname, [ 'sbot/**/*.js' ]),
19
20 suggestions: require('patch-suggest'),
21 settings: require('patch-settings'),
22 drafts: require('patch-drafts'),
23 history: require('patch-history')
24 }
25}
26
27const plugins = {
28 scry: require('patchbay-scry'),
29 darkCrystal: require('patchbay-dark-crystal'),
30 poll: require('patchbay-poll'),
31 inbox: require('patch-inbox'), // TODO needs work
32 chess: require('ssb-chess-mithril'),
33 book: require('patchbay-book'),
34 gatherings: require('patchbay-gatherings')
35}
36
37function configModule (config) {
38 // This is needed to over-ride config.sync.load in patchcore.
39 // By baking a fresh module with the config inside it,
40 // we avoid a race condition around trying to set / get the config
41 const configModule = {
42 gives: nest('config.sync.load'),
43 create: api => nest('config.sync.load', () => {
44 return config
45 })
46 }
47
48 return { configModule }
49}
50
51module.exports = {
52 configModule,
53 plugins,
54 patchbay,
55 patchcore
56}
57

Built with git-ssb-web