git ssb

16+

Dominic / patchbay



Commit 5e49975bd655888b5d5e8e4bc2d699a35e99061e

Merge branch 'master' into ssb-server-14

mixmix committed on 1/28/2019, 1:30:04 AM
Parent: ec42a491d34579d6de754135827e8046751f292f
Parent: 9b4e198358bf6c129b0edc937c79ca5733c84a9a

Files changed

app/page/posts.mcsschanged
config.jschanged
package-lock.jsonchanged
package.jsonchanged
app/page/posts.mcssView
@@ -121,8 +121,11 @@
121121 p {
122122 :first-of-type { margin-top: 0 }
123123 }
124124 (img) { max-width: 100% }
125 + (pre) { background-color: #000; }
126 + (code) { background-color: #000; }
127 + (a) { color: #db67ed }
125128 }
126129 }
127130
128131 div.recent {
config.jsView
@@ -2,42 +2,44 @@
22 const Config = require('ssb-config/inject')
33 const Path = require('path')
44 const merge = require('lodash/merge')
55
6-const appName = process.env.ssb_appname || 'ssb'
7-const opts = appName === 'ssb' ? null : null
8-
96 exports.gives = nest('config.sync.load')
107 exports.create = (api) => {
118 var config
129 return nest('config.sync.load', () => {
1310 if (config) return config
1411
1512 console.log('LOADING config')
16- config = Config(appName, opts)
13 + config = Config(process.env.ssb_appname || 'ssb')
1714
18- config = merge(
19- config,
20- Connections(config),
21- Remote(config)
22- )
15 + config = addSockets(config)
16 + config = fixLocalhost(config)
2317
2418 return config
2519 })
2620 }
2721
28-function Connections (config) {
29- const connections = (process.platform === 'win32')
30- ? undefined
31- : { incoming: { unix: [{ scope: 'local', transform: 'noauth', server: true }] } }
22 +function addSockets (config) {
23 + if (process.platform === 'win32') return config
3224
33- return connections ? { connections } : {}
25 + const pubkey = config.keys.id.slice(1).replace(`.${config.keys.curve}`, '')
26 + return merge(
27 + config,
28 + {
29 + connections: {
30 + incoming: { unix: [{ scope: 'local', transform: 'noauth', server: true }] }
31 + },
32 + remote: `unix:${Path.join(config.path, 'socket')}:~noauth:${pubkey}` // overwrites
33 + }
34 + )
3435 }
3536
36-function Remote (config) {
37- const pubkey = config.keys.id.slice(1).replace(`.${config.keys.curve}`, '')
38- const remote = (process.platform === 'win32')
39- ? undefined // `net:127.0.0.1:${config.port}~shs:${pubkey}` // currently broken
40- : `unix:${Path.join(config.path, 'socket')}:~noauth:${pubkey}`
37 +function fixLocalhost (config) {
38 + if (process.platform !== 'win32') return config
4139
42- return remote ? { remote } : {}
40 + // without this host defaults to :: which doesn't work on windows 10?
41 + config.connections.incoming.net[0].host = '127.0.0.1'
42 + config.connections.incoming.ws[0].host = '127.0.0.1'
43 + config.host = '127.0.0.1'
44 + return config
4345 }
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 587807 bytes
New file size: 587807 bytes
package.jsonView
@@ -72,12 +72,12 @@
7272 "patch-settings": "^1.1.2",
7373 "patch-suggest": "^3.0.1",
7474 "patchbay-book": "^1.0.8",
7575 "patchbay-dark-crystal": "^2.0.0",
76- "patchbay-gatherings": "^3.2.8",
77- "patchbay-poll": "^1.1.3",
78- "patchbay-scry": "^1.3.4",
79- "patchcore": "^2.1.3",
76 + "patchbay-gatherings": "^3.2.9",
77 + "patchbay-poll": "^1.1.4",
78 + "patchbay-scry": "^1.5.0",
79 + "patchcore": "^2.1.4",
8080 "pull-abortable": "^4.1.1",
8181 "pull-next-query": "^1.0.0",
8282 "pull-notify": "^0.1.1",
8383 "pull-scroll": "^1.0.9",

Built with git-ssb-web