mirror of https://codeberg.org/pzp/pzp-hub.git
Rename to pzp
This commit is contained in:
parent
fca6b46f68
commit
ae04e9a048
|
@ -1,5 +1,4 @@
|
|||
node_modules
|
||||
pnpm-lock.yaml
|
||||
yarn.lock
|
||||
TODO
|
||||
data
|
||||
data
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const Path = require('node:path')
|
||||
const Keypair = require('ppppp-keypair')
|
||||
const caps = require('ppppp-caps')
|
||||
const Keypair = require('pzp-keypair')
|
||||
const caps = require('pzp-caps')
|
||||
const SecretStack = require('secret-stack/bare')
|
||||
|
||||
module.exports = function startPeer() {
|
||||
|
@ -11,7 +11,7 @@ module.exports = function startPeer() {
|
|||
return SecretStack()
|
||||
.use(require('secret-stack/plugins/net'))
|
||||
.use(require('secret-handshake-ext/secret-stack'))
|
||||
.use(require('ppppp-net'))
|
||||
.use(require('pzp-net'))
|
||||
.use(require('./plugin-hub.cjs'))
|
||||
.use(require('./plugin-hub-client.cjs'))
|
||||
.call(null, {
|
||||
|
@ -28,7 +28,7 @@ module.exports = function startPeer() {
|
|||
{
|
||||
scope: 'public',
|
||||
transform: 'shse',
|
||||
port: process.env.PPPPP_PORT ?? 8008,
|
||||
port: process.env.PZP_PORT ?? 8008,
|
||||
host: '0.0.0.0',
|
||||
},
|
||||
],
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const cat = require('pull-cat')
|
||||
const Notify = require('pull-notify')
|
||||
const pull = require('pull-stream')
|
||||
const debug = require('debug')('ppppp:hub')
|
||||
const debug = require('debug')('pzp:hub')
|
||||
const Tokens = require('./tokens.cjs')
|
||||
const Members = require('./members.cjs')
|
||||
|
||||
|
|
|
@ -9,11 +9,11 @@ window.addEventListener('focus', () => {
|
|||
const host = window.location.hostname
|
||||
const hostFormat = /[a-zA-Z]/.test(window.location.hostname) ? 'dns' : 'ip4';
|
||||
const { tcpPort, shseCredentials } = window.hubInvite
|
||||
const uri = `ppppp://invite/join/${hostFormat}/${host}/tcp/${tcpPort}/shse/${shseCredentials}`
|
||||
const uri = `pzp://invite/join/${hostFormat}/${host}/tcp/${tcpPort}/shse/${shseCredentials}`
|
||||
|
||||
const inviteLinkElem = document.getElementById('invite')
|
||||
inviteLinkElem.href = uri
|
||||
// Autoredirect to the PPPPP URI as soon as possible
|
||||
// Autoredirect to the PZP URI as soon as possible
|
||||
setTimeout(() => {
|
||||
window.location.replace(uri)
|
||||
}, 100)
|
||||
|
|
|
@ -12,10 +12,10 @@ const failureElem = document.getElementById('failure')
|
|||
const hash = window.location.hash
|
||||
if (hash) {
|
||||
let uri = decodeURIComponent(hash.slice(1))
|
||||
if (!uri.startsWith('ppppp:')) uri = 'ppppp://invite' + uri
|
||||
if (!uri.startsWith('pzp:')) uri = 'pzp://invite' + uri
|
||||
inviteLinkElem.href = uri
|
||||
|
||||
// Autoredirect to the PPPPP URI as soon as possible
|
||||
// Autoredirect to the PZP URI as soon as possible
|
||||
setTimeout(() => {
|
||||
console.log(uri)
|
||||
// window.location.replace(uri);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
<body>
|
||||
<article>
|
||||
<h1>Join PPPPP</h1>
|
||||
<h1>Join PZP</h1>
|
||||
<a id="invite" class="btn" href="#">Claim invite</a>
|
||||
or
|
||||
<a id="copy" class="btn" href="#">Copy invite</a>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "ppppp-hub",
|
||||
"name": "pzp-hub",
|
||||
"version": "0.0.1",
|
||||
"description": "PPPPP hub server",
|
||||
"description": "PZP hub server",
|
||||
"author": "Andre Staltz <contact@staltz.com>",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/staltz/ppppp-hub",
|
||||
"homepage": "https://codeberg.org/pzp/pzp-hub/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@github.com:staltz/ppppp-hub.git"
|
||||
"url": "git@codeberg.org:pzp/pzp-hub.git"
|
||||
},
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
|
@ -31,9 +31,9 @@
|
|||
"debug": "4.3.4",
|
||||
"ejs": "3.1.9",
|
||||
"fastify": "4.25.2",
|
||||
"ppppp-caps": "github:staltz/ppppp-caps",
|
||||
"ppppp-keypair": "github:staltz/ppppp-keypair",
|
||||
"ppppp-net": "github:staltz/ppppp-net",
|
||||
"pzp-caps": "^1.0.0",
|
||||
"pzp-keypair": "^1.0.0",
|
||||
"pzp-net": "^1.0.0",
|
||||
"pino": "8.17.2",
|
||||
"pull-cat": "1.1.11",
|
||||
"pull-notify": "0.1.2",
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue