Skip to content

Commit ce2a043

Browse files
committed
Revert "[wip] bundle ssbd (#196)"
This reverts commit 210d91e.
1 parent c6dbc39 commit ce2a043

File tree

6 files changed

+73
-2079
lines changed

6 files changed

+73
-2079
lines changed

app/config.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const USER_DATA = app.getPath('userData')
55
const DEFAULT_EXTENSIONS_DIR = path.join(USER_DATA, 'extensions')
66
const DEFAULT_IPFS_DIR = path.join(USER_DATA, 'ipfs')
77
const DEFAULT_HYPER_DIR = path.join(USER_DATA, 'hyper')
8-
const DEFAULT_SSB_APPNAME = 'agregore-ssb'
8+
// const DEFAULT_SSB_DIR = path.join(USER_DATA, 'ssb')
99
const DEFAULT_BT_DIR = path.join(USER_DATA, 'bt')
1010

1111
const DEFAULT_PAGE = 'agregore://welcome'
@@ -71,17 +71,8 @@ module.exports = require('rc')('agregore', {
7171
storage: DEFAULT_HYPER_DIR
7272
},
7373

74-
/**
75-
* All ssb options here: https://github.com/ssbc/ssb-config#configuration
76-
* For bundled ssb server we use ssbd. Pass in an array of require'd ssb plugins
77-
*/
78-
ssbOptions: {
79-
appname: DEFAULT_SSB_APPNAME,
80-
ssbd: {
81-
runServer: true,
82-
plugins: require('@metacentre/shipyard-ssb')
83-
}
84-
},
74+
// All options here: https://github.com/ssbc/ssb-config#configuration
75+
ssbOptions: {},
8576

8677
// All options here: https://github.com/webtorrent/webtorrent/blob/master/docs/api.md
8778
btOptions: {

app/protocols/ssb-protocol.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,9 @@ const fetchToHandler = require('./fetch-to-handler')
33
module.exports = async function createHandler (options, session) {
44
return fetchToHandler(async () => {
55
const { makeSsbFetch } = require('ssb-fetch')
6-
const appname = process.env.ssb_appname || options.appname || 'ssb'
76

8-
/** connect to running ssb-server */
9-
if (!!options.ssbd?.runServer === false) {
10-
const fetch = makeSsbFetch({ ...options, appname })
11-
return fetch
12-
}
7+
const fetch = makeSsbFetch(options)
138

14-
/** bundle ssb-server with agregore browser */
15-
const ssbd = require('ssbd')
16-
const sbot = ssbd({ ...options, appname })
17-
const fetch = makeSsbFetch({ ...options, appname, sbot })
189
return fetch
1910
}, session)
2011
}

docs/Fetch-SSB.md

Lines changed: 0 additions & 198 deletions
This file was deleted.

docs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@
77
- [Using the fetch API with the `hyper://` protocol](Fetch-Hyper.md)
88
- [Using the fetch API with the `gemini://` protocol](Fetch-Gemini.md)
99
- [Using the fetch API with the `ipfs://` protocol](Fetch-IPFS.md)
10-
- [Using the fetch API with the `ssb://` protocol](Fetch-SSB.md)

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
"standard": "^14.3.4"
178178
},
179179
"dependencies": {
180-
"@metacentre/shipyard-ssb": "^1.2.0",
181180
"abort-controller": "^3.0.0",
182181
"bt-fetch": "^3.1.1",
183182
"create-desktop-shortcuts": "^1.7.0",
@@ -197,7 +196,6 @@
197196
"sanitize-filename": "^1.6.3",
198197
"scoped-fs": "^1.4.1",
199198
"ssb-fetch": "^1.5.2",
200-
"ssbd": "^0.0.3",
201199
"whatwg-mimetype": "https://github.com/jsdom/whatwg-mimetype#v2.3.0",
202200
"wrtc": "^0.4.7"
203201
}

0 commit comments

Comments
 (0)