mirror of https://codeberg.org/pzp/pzp-hub.git
update dependencies
This commit is contained in:
parent
fd3d48766f
commit
e6bf56282d
|
@ -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
|
||||||
|
|
33
lib/peer.cjs
33
lib/peer.cjs
|
@ -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' }],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
13
package.json
13
package.json
|
@ -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",
|
||||||
|
|
Loading…
Reference in New Issue