git ssb

1+

Daan Patchwork / manyverse



Commit 721ff0a79fa253edc914f17782164f46f56761b5

dx: update ssb-server to v15

Andre Staltz committed on 7/10/2019, 10:27:15 PM
Parent: 37359f70471e994ca098e99f5021f3e386d51b4a

Files changed

package-lock.jsonchanged
package.jsonchanged
src/backend/index.tschanged
src/backend/package-lock.jsonchanged
src/backend/package.jsonchanged
tools/build-backendchanged
tools/patch-backend-ssb-serverchanged
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 1100423 bytes
New file size: 1100564 bytes
package.jsonView
@@ -130,5 +130,5 @@
130130 "react-native": {
131131 "os": "react-native-os-staltz",
132132 "rn-viewpager": "@staltz/rn-viewpager"
133133 }
134-}
134+}
src/backend/index.tsView
@@ -16,8 +16,9 @@
1616 const npip = require('non-private-ip');
1717 const injectSsbConfig = require('ssb-config/inject');
1818 const BluetoothManager = require('ssb-mobile-bluetooth-manager');
1919 const bluetoothTransportAndPlugin = require('ssb-bluetooth');
20+const SecretStack = require('secret-stack');
2021 import syncingPlugin = require('./plugins/syncing');
2122 import blobsFromPathPlugin = require('./plugins/blobsFromPath');
2223 import votesPlugin = require('./plugins/votes');
2324 import manifest = require('./manifest');
@@ -103,19 +104,20 @@
103104 const bluetoothPluginConfig = {
104105 scope: 'public',
105106 };
106107
107-require('ssb-server/index')
108+SecretStack({caps: {shs: Buffer.from(require('ssb-caps').shs, 'base64')}})
109+ .use(require('ssb-db'))
108110 .use(noAuthTransform)
109111 .use(rnChannelTransport)
110112 .use(wsTransport)
111113 .use(require('ssb-dht-invite'))
112114 .use(dhtTransport)
113115 .use(bluetoothTransportAndPlugin(bluetoothManager, bluetoothPluginConfig))
114- .use(require('ssb-server/plugins/master'))
116+ .use(require('ssb-master'))
115117 .use(require('ssb-lan'))
116118 .use(require('ssb-conn'))
117- .use(require('ssb-server/plugins/replicate'))
119+ .use(require('ssb-replicate'))
118120 .use(syncingPlugin)
119121 .use(require('ssb-backlinks'))
120122 .use(require('ssb-about'))
121123 .use(require('ssb-friends'))
@@ -126,7 +128,7 @@
126128 .use(require('ssb-private'))
127129 .use(require('ssb-contacts'))
128130 .use(require('ssb-query'))
129131 .use(require('ssb-threads'))
130- .use(require('ssb-server/plugins/invite'))
132+ .use(require('ssb-invite'))
131133 .use(require('ssb-ebt'))
132134 .call(null, config);
src/backend/package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 239078 bytes
New file size: 216841 bytes
src/backend/package.jsonView
@@ -5,50 +5,50 @@
55 "engines": {
66 "node": "10.13.0"
77 },
88 "dependencies": {
9- "abstract-leveldown": "5.0.0",
109 "bindings-noderify-nodejs-mobile": "10.3.0",
1110 "bufferutil": "4.0.1",
1211 "cached-path-relative": ">=1.0.2",
1312 "chloride": "2.2.14",
1413 "delay": "3.1.0",
1514 "estimate-progress": "1.0.0",
16- "flumeview-level": "3.0.8",
1715 "ip": "1.1.5",
1816 "multiserver-dht": "4.0.0",
19- "multiserver-rn-channel": "1.2.0",
17+ "multiserver-rn-channel": "1.3.0",
2018 "non-private-ip-android": "1.4.4-2",
2119 "pull-cat": "1.1.11",
2220 "pull-file": "1.1.0",
2321 "pull-pushable": "2.2.0",
24- "pull-stream": "3.6.9",
22+ "pull-stream": "3.6.13",
2523 "pull-thenable": "1.0.0",
26- "secret-stack": "6.2.0",
24+ "secret-stack": "6.2.1",
2725 "secret-stack-decorators": "~1.0.0",
28- "ssb-server": "13.6.3",
26+ "ssb-db": "19.2.0",
2927 "ssb-about": "2.0.0",
3028 "ssb-backlinks": "0.7.3",
31- "ssb-blobs": "1.1.7",
29+ "ssb-blobs": "1.2.1",
3230 "ssb-bluetooth": "1.1.14",
3331 "ssb-lan": "0.0.2",
34- "ssb-config": "2.3.7",
32+ "ssb-config": "3.3.1",
3533 "ssb-contacts": "0.0.2",
3634 "ssb-dht-invite": "1.0.0",
37- "ssb-ebt": "5.2.7",
38- "ssb-friends": "3.1.9",
39- "ssb-keys": "7.1.3",
35+ "ssb-ebt": "5.6.7",
36+ "ssb-friends": "4.1.4",
37+ "ssb-keys": "7.1.7",
4038 "ssb-conn": "0.0.12",
39+ "ssb-master": "1.0.3",
40+ "ssb-invite": "2.1.3",
41+ "ssb-replicate": "1.3.0",
4142 "ssb-mobile-bluetooth-manager": "3.2.2",
4243 "ssb-private": "0.2.3",
43- "ssb-query": "2.3.0",
44+ "ssb-query": "2.4.2",
4445 "ssb-ref": "2.13.9",
45- "ssb-serve-blobs": "2.0.0",
46+ "ssb-serve-blobs": "2.1.0",
4647 "ssb-threads": "3.4.0",
4748 "ssb-typescript": "1.4.0",
4849 "utf-8-validate": "5.0.2",
49- "utp-native-no-prebuild": "1.7.3-4",
50- "xtend": "4.0.1"
50+ "utp-native-no-prebuild": "1.7.3-4"
5151 },
5252 "devDependencies": {
5353 "noderify": "4.1.0"
5454 }
tools/build-backendView
@@ -33,9 +33,9 @@
3333 rm ./nodejs-assets/nodejs-project/*.js.map;
3434 rm ./nodejs-assets/nodejs-project/plugins/*.js.map;
3535
3636 echo "Installing dependencies...";
37-cd ./nodejs-assets/nodejs-project && npm i;
37+cd ./nodejs-assets/nodejs-project && npm install --no-optional;
3838
3939 # For more details on this, read issue #398:
4040 echo "Removing problematic transitive dependencies...";
4141 cd node_modules && rm -rf chokidar fsevents && cd ../../..;
tools/patch-backend-ssb-serverView
@@ -6,49 +6,28 @@
66 const fs = require('fs');
77 const path = require('path');
88
99 const backendPath = process.argv[2];
10-const ssbServerPath = path.join(backendPath, 'node_modules/ssb-server');
10+const ssbDbPath = path.join(backendPath, 'node_modules/ssb-db');
1111
12-if (!fs.existsSync(ssbServerPath)) {
13- throw new Error('Cannot find file ssb-server/lib/apidocs.js to patch');
12+if (!fs.existsSync(ssbDbPath)) {
13+ throw new Error('Cannot find file ssb-db/index.js to patch');
1414 }
1515
16-const apidocsPath = path.join(ssbServerPath, './lib/apidocs.js');
17-const prevContent = fs.readFileSync(apidocsPath, 'utf-8');
16+const indexjsPath = path.join(ssbDbPath, './index.js');
17+const prevContent = fs.readFileSync(indexjsPath, 'utf-8');
1818
19-const dirname = path.dirname(apidocsPath);
19+const dirname = path.dirname(indexjsPath);
2020
2121 function readMarkdownCompileTime(relPath) {
2222 return fs
2323 .readFileSync(path.join(dirname, relPath), 'utf-8')
2424 .replace(/\`\`\`/g, '')
2525 .replace(/\`/g, '"');
2626 }
2727
28-const nextContent = prevContent
29- .replace(
30- `fs.readFileSync(path.join(__dirname, '../api.md'), 'utf-8')`,
31- `\`${readMarkdownCompileTime('../api.md')}\``,
32- )
33- .replace(
34- `fs.readFileSync(path.join(__dirname, '../plugins/friends.md'), 'utf-8')`,
35- `\`${readMarkdownCompileTime('../plugins/friends.md')}\``,
36- )
37- .replace(
38- `fs.readFileSync(path.join(__dirname, '../plugins/gossip.md'), 'utf-8')`,
39- `\`${readMarkdownCompileTime('../plugins/gossip.md')}\``,
40- )
41- .replace(
42- `fs.readFileSync(path.join(__dirname, '../plugins/invite.md'), 'utf-8')`,
43- `\`${readMarkdownCompileTime('../plugins/invite.md')}\``,
44- )
45- .replace(
46- `fs.readFileSync(path.join(__dirname, '../plugins/plugins.md'), 'utf-8')`,
47- `\`${readMarkdownCompileTime('../plugins/plugins.md')}\``,
48- )
49- .replace(
50- `fs.readFileSync(path.join(__dirname, '../plugins/replicate.md'), 'utf-8')`,
51- `\`${readMarkdownCompileTime('../plugins/replicate.md')}\``,
52- );
28+const nextContent = prevContent.replace(
29+ `fs.readFileSync(path.join(__dirname, 'api.md'), 'utf-8')`,
30+ `\`${readMarkdownCompileTime('api.md')}\``,
31+);
5332
54-fs.writeFileSync(apidocsPath, nextContent, 'utf-8');
33+fs.writeFileSync(indexjsPath, nextContent, 'utf-8');

Built with git-ssb-web