Refactor SSB distro into @fraction/flotilla module

This commit is contained in:
Christian Bundy 2019-09-16 13:27:55 -07:00
parent 9c3c689c26
commit 4a9361a8b6
No known key found for this signature in database
GPG Key ID: EB541AAEF4366237
6 changed files with 368 additions and 370 deletions

View File

@ -5,6 +5,7 @@
"author": "Christian Bundy <christianbundy@fraction.io>",
"license": "ISC",
"dependencies": {
"@fraction/flotilla": "^1.0.1",
"debug": "^4.1.1",
"highlight.js": "^9.15.8",
"hyperaxe": "^1.3.0",
@ -18,34 +19,13 @@
"pretty-ms": "^5.0.0",
"pull-stream": "^3.6.12",
"require-style": "^1.1.0",
"secret-stack": "^6.2.0",
"sharp": "^0.23.0",
"ssb-about": "^2.0.1",
"ssb-backlinks": "^0.7.3",
"ssb-blobs": "^1.2.1",
"ssb-client": "^4.7.7",
"ssb-config": "github:ssbc/ssb-config#auto-config-incoming",
"ssb-db": "^19.3.0",
"ssb-ebt": "^5.6.6",
"ssb-friends": "^4.1.4",
"ssb-gossip": "^1.1.0",
"ssb-invite": "^2.1.3",
"ssb-links": "^3.0.8",
"ssb-local": "^1.0.0",
"ssb-logging": "^1.0.0",
"ssb-markdown": "^5.0.2",
"ssb-master": "^1.0.3",
"ssb-mentions": "^0.5.0",
"ssb-msgs": "^5.2.0",
"ssb-no-auth": "^1.0.0",
"ssb-onion": "^1.0.0",
"ssb-ooo": "^1.3.0",
"ssb-plugins": "^1.0.2",
"ssb-query": "^2.4.2",
"ssb-ref": "^2.13.9",
"ssb-replicate": "^1.3.0",
"ssb-unix-socket": "^1.0.0",
"ssb-ws": "^6.2.3",
"yargs": "^13.2.4"
},
"bin": {
@ -60,9 +40,9 @@
"standard": "^13.1.0"
},
"scripts": {
"start": "node index.js",
"debug": "nodemon --inspect index.js --debug",
"test": "test/script.sh",
"preversion": "test/script.sh"
"start": "scripts/start",
"debug": "scripts/debug",
"test": "scripts/test",
"preversion": "scripts/test"
}
}

2
scripts/debug Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env bash
exec nodemon --inspect index.js --debug

3
scripts/start Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
exec node index.js

View File

@ -1,4 +1,4 @@
#!/usr/bin/env sh
#!/usr/bin/env bash
# http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail

View File

@ -1,34 +1,11 @@
'use strict'
const ssbClient = require('ssb-client')
const secretStack = require('secret-stack')
const ssbConfig = require('ssb-config')
const debug = require('debug')('oasis')
const flotilla = require('@fraction/flotilla')
const ssbClient = require('ssb-client')
const ssbConfig = require('ssb-config')
const server = secretStack()
server
.use(require('ssb-db'))
.use(require('ssb-replicate'))
.use(require('ssb-about'))
.use(require('ssb-backlinks'))
.use(require('ssb-blobs'))
.use(require('ssb-ebt'))
.use(require('ssb-friends'))
.use(require('ssb-gossip'))
.use(require('ssb-invite'))
.use(require('ssb-links'))
.use(require('ssb-local'))
.use(require('ssb-logging'))
.use(require('ssb-master'))
.use(require('ssb-no-auth'))
.use(require('ssb-onion'))
.use(require('ssb-ooo'))
.use(require('ssb-plugins'))
.use(require('ssb-query'))
.use(require('ssb-unix-socket'))
.use(require('ssb-ws'))
const server = flotilla()
const rawConnect = () => new Promise((resolve, reject) => {
ssbClient((err, api) => {

670
yarn.lock

File diff suppressed because it is too large Load Diff