update dependencies

This commit is contained in:
Andre Staltz 2024-01-03 16:24:26 +02:00
parent fd3d48766f
commit e6bf56282d
No known key found for this signature in database
GPG Key ID: 9EDE23EA7E8A4890
6 changed files with 370 additions and 258 deletions

View File

@ -4,9 +4,7 @@ const AtomicFileRW = require('atomic-file-rw')
class Members { class Members {
static #filePath static #filePath
/** /** @type {Set<string>} */
* @type {Set<string>}
*/
static #set static #set
static #loaded = false static #loaded = false

View File

@ -8,30 +8,33 @@ module.exports = function startPeer() {
const keypairPath = Path.join(path, 'keypair') const keypairPath = Path.join(path, 'keypair')
const keypair = Keypair.loadOrCreateSync(keypairPath) const keypair = Keypair.loadOrCreateSync(keypairPath)
SecretStack({ caps }) SecretStack()
.use(require('secret-stack/plugins/net')) .use(require('secret-stack/plugins/net'))
.use(require('secret-handshake-ext/secret-stack')) .use(require('secret-handshake-ext/secret-stack'))
.use(require('ssb-conn')) .use(require('ssb-conn'))
.use(require('./plugin-hub.cjs')) .use(require('./plugin-hub.cjs'))
.use(require('./plugin-hub-client.cjs')) .use(require('./plugin-hub-client.cjs'))
.call(null, { .call(null, {
path, shse: { caps },
keypair, global: {
timers: { path,
inactivity: 600e3, keypair,
timers: {
inactivity: 600e3,
},
connections: {
incoming: {
net: [
{ scope: 'public', transform: 'shse', port: 8008, host: '0.0.0.0' },
],
},
outgoing: {
net: [{ transform: 'shse' }],
},
},
}, },
conn: { conn: {
autostart: false, autostart: false,
}, },
connections: {
incoming: {
net: [
{ scope: 'public', transform: 'shse', port: 8008, host: '0.0.0.0' },
],
},
outgoing: {
net: [{ transform: 'shse' }],
},
},
}) })
} }

View File

@ -1,4 +1,3 @@
const bs58 = require('bs58')
const cat = require('pull-cat') const cat = require('pull-cat')
const Notify = require('pull-notify') const Notify = require('pull-notify')
const pull = require('pull-stream') const pull = require('pull-stream')
@ -39,8 +38,8 @@ module.exports = {
} }
debug('running multiserver at %s', local.getAddress('public')) debug('running multiserver at %s', local.getAddress('public'))
Tokens.load(config.path) Tokens.load(config.global.path)
Members.load(config.path) Members.load(config.global.path)
// Ensure that client connections are only from members or to-be members // Ensure that client connections are only from members or to-be members
local.auth.hook(function (fn, args) { local.auth.hook(function (fn, args) {

View File

@ -6,9 +6,7 @@ const Base58 = require('bs58')
class Tokens { class Tokens {
static #filePath static #filePath
/** /** @type {Set<string>} */
* @type {Set<string>}
*/
static #set static #set
static #loaded = false static #loaded = false

569
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,22 +24,21 @@
"node": ">=16" "node": ">=16"
}, },
"dependencies": { "dependencies": {
"@fastify/static": "6.10.2", "@fastify/static": "6.12.0",
"@fastify/view": "7.4.1", "@fastify/view": "8.2.0",
"atomic-file-rw": "~0.3.0", "atomic-file-rw": "~0.3.0",
"bs58": "5.0.0", "bs58": "5.0.0",
"debug": "4.3.4", "debug": "4.3.4",
"ejs": "3.1.9", "ejs": "3.1.9",
"fastify": "4.17.0", "fastify": "4.25.2",
"ppppp-caps": "github:staltz/ppppp-caps", "ppppp-caps": "github:staltz/ppppp-caps",
"ppppp-keypair": "github:staltz/ppppp-keypair", "ppppp-keypair": "github:staltz/ppppp-keypair",
"pino": "8.14.1", "pino": "8.17.2",
"pull-cat": "1.1.11", "pull-cat": "1.1.11",
"pull-notify": "0.1.2", "pull-notify": "0.1.2",
"pull-stream": "3.7.0", "pull-stream": "3.7.0",
"secret-stack": "7.1.0", "secret-stack": "8.0.0",
"secret-handshake-ext": "0.0.8", "secret-handshake-ext": "0.0.11",
"ssb-caps": "1.1.0",
"ssb-conn": "6.0.4", "ssb-conn": "6.0.4",
"unified": "10.1.2", "unified": "10.1.2",
"remark-parse": "10.0.2", "remark-parse": "10.0.2",