@peerbit/server 5.8.13-bf19b30 → 5.8.14-5d6b35a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/client.d.ts.map +1 -1
- package/dist/src/client.js +8 -1
- package/dist/src/client.js.map +1 -1
- package/dist/src/peerbit.d.ts.map +1 -1
- package/dist/src/peerbit.js +2 -3
- package/dist/src/peerbit.js.map +1 -1
- package/dist/test/api.spec.js +4 -1
- package/dist/test/api.spec.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/assets/index-eOjCmm72.js +73 -0
- package/dist/ui/index.html +1 -1
- package/package.json +28 -8
- package/src/client.ts +11 -1
- package/src/peerbit.ts +2 -3
- package/dist/ui/assets/index-DIOBOX6-.js +0 -66
package/dist/ui/index.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
Learn how to configure a non-root public URL by running `npm run build`.
|
|
24
24
|
-->
|
|
25
25
|
<title>Peerbit</title>
|
|
26
|
-
<script type="module" crossorigin src="/assets/index-
|
|
26
|
+
<script type="module" crossorigin src="/assets/index-eOjCmm72.js"></script>
|
|
27
27
|
<link rel="stylesheet" crossorigin href="/assets/index-CIfVvUo9.css">
|
|
28
28
|
</head>
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peerbit/server",
|
|
3
|
-
"version": "5.8.
|
|
3
|
+
"version": "5.8.14-5d6b35a",
|
|
4
4
|
"author": "dao.xyz",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,31 +58,51 @@
|
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"clean": "shx rm -rf lib/*",
|
|
61
|
-
"build": "
|
|
61
|
+
"build": "pnpm run clean && pnpm run build-lib && pnpm run build-ui",
|
|
62
62
|
"build-lib": "tsc -p tsconfig.json",
|
|
63
|
-
"build-ui": "
|
|
63
|
+
"build-ui": "pnpm --dir ../frontend build",
|
|
64
64
|
"postbuild": "cp src/nginx-template.conf dist/src/ && cp -r ../frontend/dist/. dist/ui",
|
|
65
65
|
"test": "aegir test --t node",
|
|
66
66
|
"lint": "aegir lint"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@peerbit/test-lib": "0.0.1-
|
|
70
|
-
"@peerbit/test-utils": "2.2.
|
|
69
|
+
"@peerbit/test-lib": "0.0.1-5d6b35a",
|
|
70
|
+
"@peerbit/test-utils": "2.2.9-5d6b35a",
|
|
71
71
|
"@types/yargs": "17.0.24",
|
|
72
72
|
"aws-sdk": "^2.1259.0",
|
|
73
73
|
"dotenv": "^16.1.4",
|
|
74
74
|
"@types/tmp": "^0.2.3",
|
|
75
75
|
"@types/tar-stream": "^3.1.3",
|
|
76
|
-
"shx": "^0.3.4"
|
|
76
|
+
"shx": "^0.3.4",
|
|
77
|
+
"@types/libsodium-wrappers": "^0.7.14",
|
|
78
|
+
"uuid": "^10.0.0"
|
|
77
79
|
},
|
|
78
80
|
"dependencies": {
|
|
79
81
|
"axios": "^1.4.0",
|
|
80
82
|
"chalk": "^5.3.0",
|
|
81
|
-
"peerbit": "4.3.
|
|
83
|
+
"peerbit": "4.3.8-5d6b35a",
|
|
82
84
|
"yargs": "^17.7.2",
|
|
83
85
|
"tar-stream": "^3.1.7",
|
|
84
86
|
"tmp": "^0.2.1",
|
|
85
|
-
"tty-table": "^4.2.1"
|
|
87
|
+
"tty-table": "^4.2.1",
|
|
88
|
+
"@libp2p/interface": "^3.0.0",
|
|
89
|
+
"@libp2p/crypto": "^5.1.10",
|
|
90
|
+
"@libp2p/peer-id": "^6.0.1",
|
|
91
|
+
"@libp2p/tcp": "^11.0.2",
|
|
92
|
+
"@libp2p/websockets": "^10.0.3",
|
|
93
|
+
"@multiformats/multiaddr": "^13.0.1",
|
|
94
|
+
"@peerbit/blocks": "3.0.14-5d6b35a",
|
|
95
|
+
"@peerbit/crypto": "2.3.12-5d6b35a",
|
|
96
|
+
"@peerbit/program": "5.3.4-5d6b35a",
|
|
97
|
+
"@peerbit/pubsub": "4.0.17-5d6b35a",
|
|
98
|
+
"@peerbit/time": "2.2.0-5d6b35a",
|
|
99
|
+
"@dao-xyz/borsh": "^5.2.3",
|
|
100
|
+
"libsodium-wrappers": "^0.7.15",
|
|
101
|
+
"uint8arrays": "^5.1.0",
|
|
102
|
+
"level": "^10.0.0",
|
|
103
|
+
"memory-level": "^3.1.0",
|
|
104
|
+
"multiformats": "^13.4.1",
|
|
105
|
+
"abstract-level": "^3.1.0"
|
|
86
106
|
},
|
|
87
107
|
"optionalDependencies": {
|
|
88
108
|
"@aws-sdk/client-ec2": "^3.390.0",
|
package/src/client.ts
CHANGED
|
@@ -379,7 +379,17 @@ export const waitForDomain = async (
|
|
|
379
379
|
const result = await waitForResolved(
|
|
380
380
|
async () => {
|
|
381
381
|
const addresses = await c.peer.addresses.get();
|
|
382
|
-
const
|
|
382
|
+
const first = addresses[0];
|
|
383
|
+
const ma = typeof first === "string" ? multiaddr(first) : first;
|
|
384
|
+
const hostComponent = ma
|
|
385
|
+
.getComponents()
|
|
386
|
+
.find(
|
|
387
|
+
(component) =>
|
|
388
|
+
component.value &&
|
|
389
|
+
(component.name.startsWith("dns") ||
|
|
390
|
+
component.name.startsWith("ip")),
|
|
391
|
+
);
|
|
392
|
+
const domain = hostComponent?.value;
|
|
383
393
|
if (!domain) {
|
|
384
394
|
throw new Error("Not ready");
|
|
385
395
|
}
|
package/src/peerbit.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { keys } from "@libp2p/crypto";
|
|
2
2
|
import { DirectBlock } from "@peerbit/blocks";
|
|
3
3
|
import type { Ed25519Keypair } from "@peerbit/crypto";
|
|
4
4
|
import { DirectSub } from "@peerbit/pubsub";
|
|
@@ -18,7 +18,7 @@ export const create = (properties: {
|
|
|
18
18
|
properties.directory != null
|
|
19
19
|
? path.join(properties.directory, "/blocks").toString()
|
|
20
20
|
: undefined;
|
|
21
|
-
const privateKey = privateKeyFromRaw(
|
|
21
|
+
const privateKey = keys.privateKeyFromRaw(
|
|
22
22
|
concat([
|
|
23
23
|
properties.keypair.privateKey.privateKey,
|
|
24
24
|
properties.keypair.publicKey.publicKey,
|
|
@@ -62,7 +62,6 @@ export const create = (properties: {
|
|
|
62
62
|
inboundStreamProtocolNegotiationTimeout: 1e4,
|
|
63
63
|
inboundUpgradeTimeout: 1e4,
|
|
64
64
|
outboundStreamProtocolNegotiationTimeout: 1e4,
|
|
65
|
-
outboundUpgradeTimeout: 1e4,
|
|
66
65
|
maxConnections: Infinity,
|
|
67
66
|
reconnectRetries: 0, // https://github.com/libp2p/js-libp2p/issues/3289
|
|
68
67
|
},
|