Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopereira12 authored Jul 26, 2024
2 parents 09e5403 + 9751804 commit 52f9e46
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 24 deletions.
8 changes: 4 additions & 4 deletions examples/canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"start": "ts-node ./src/index.ts"
},
"dependencies": {
"@topology-foundation/crdt": "0.0.22",
"@topology-foundation/network": "0.0.22",
"@topology-foundation/node": "0.0.22",
"@topology-foundation/object": "0.0.22",
"@topology-foundation/crdt": "file:../../packages/crdt",
"@topology-foundation/network": "file:../../packages/network",
"@topology-foundation/node": "file:../../packages/node",
"@topology-foundation/object": "file:../../packages/object",
"crypto-browserify": "^3.12.0",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
"@chainsafe/libp2p-noise": "^15.1.0",
"@chainsafe/libp2p-yamux": "^6.0.2",
"@libp2p/autonat": "^1.0.0",
"@libp2p/bootstrap": "^10.1.0",
"@libp2p/bootstrap": "^10.1.2",
"@libp2p/circuit-relay-v2": "^1.1.2",
"@libp2p/dcutr": "^1.1.0",
"@libp2p/identify": "^2.0.2",
"@libp2p/identify": "^2.1.2",
"@libp2p/interface-pubsub": "^4.0.1",
"@libp2p/mdns": "^10.1.1",
"@libp2p/mdns": "^10.1.2",
"@libp2p/pubsub-peer-discovery": "^10.0.2",
"@libp2p/webrtc": "^4.1.2",
"@libp2p/websockets": "^8.1.1",
"@libp2p/webtransport": "^4.1.1",
"@libp2p/websockets": "^8.1.2",
"@libp2p/webtransport": "^4.1.2",
"@multiformats/multiaddr": "^12.3.0",
"it-pipe": "^3.0.1",
"libp2p": "^1.8.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/network/src/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ export class TopologyNetworkNode {
this._config && this._config.bootstrap_peers
? this._config.bootstrap_peers
: [
"/dns4/relay.droak.sh/tcp/443/wss/p2p/Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP",
],
"/dns4/relay.droak.sh/tcp/443/wss/p2p/Qma3GsJmB47xYuyahPZPSadh1avvxfyYQwk8R3UnFrQ6aP",
],
}),
],
services: {
Expand Down
6 changes: 4 additions & 2 deletions packages/node/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export class TopologyNode {
uint8ArrayToString(new Uint8Array(message["data"])),
);
this._objectStore.put(object["id"], object);
break;
}
case "object_sync": {
const objectId = uint8ArrayToString(
Expand All @@ -89,6 +90,7 @@ export class TopologyNode {
local.merge(object);
this._objectStore.put(object["id"], local);
}
break;
}
default: {
return;
Expand All @@ -115,7 +117,7 @@ export class TopologyNode {
"data": [${uint8ArrayFromString(objectId)}]
}`;

if (peerId === "") {
if (!peerId) {
await this.networkNode.sendGroupMessageRandomPeer(
objectId,
["/topology/message/0.0.1"],
Expand All @@ -137,7 +139,7 @@ export class TopologyNode {
"data": [${uint8ArrayFromString(objectId)}]
}`;

if (peerId === "") {
if (!peerId) {
await this.networkNode.sendGroupMessageRandomPeer(
objectId,
["/topology/message/0.0.1"],
Expand Down
2 changes: 1 addition & 1 deletion packages/node/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = "0.0.22-2";
export const VERSION = "0.0.22";
55 changes: 45 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@
protons-runtime "^5.4.0"
uint8arraylist "^2.4.8"

"@libp2p/bootstrap@^10.1.0":
"@libp2p/bootstrap@^10.1.2":
version "10.1.2"
resolved "https://registry.npmjs.org/@libp2p/bootstrap/-/bootstrap-10.1.2.tgz#dae2a2061af16755a14879b58a3f5930466e1a42"
resolved "https://registry.yarnpkg.com/@libp2p/bootstrap/-/bootstrap-10.1.2.tgz#dae2a2061af16755a14879b58a3f5930466e1a42"
integrity sha512-FTM4hZTSiIBOtB9CtCQfpFfwWJva6+l3phR9eRa5gvsEdJdiUCFKe6VFHqwnsnRN1hobcLUWYi2AN6+0OdPdXw==
dependencies:
"@libp2p/interface" "^1.6.1"
Expand Down Expand Up @@ -414,9 +414,9 @@
protons-runtime "^5.4.0"
uint8arraylist "^2.4.8"

"@libp2p/identify@^2.0.2":
"@libp2p/identify@^2.1.2":
version "2.1.2"
resolved "https://registry.npmjs.org/@libp2p/identify/-/identify-2.1.2.tgz#85a69eb341d893a767d81b3b6138790278109fb9"
resolved "https://registry.yarnpkg.com/@libp2p/identify/-/identify-2.1.2.tgz#85a69eb341d893a767d81b3b6138790278109fb9"
integrity sha512-neLNz6WhYAxDHgsb/LGyZF9i+nE4E+dk30/5gFxc/876oVwgc1IqSs2eEEEx9t0l2ToeHADScBM+bHrFsLIk3g==
dependencies:
"@libp2p/interface" "^1.6.1"
Expand Down Expand Up @@ -501,9 +501,9 @@
interface-datastore "^8.2.11"
multiformats "^13.1.0"

"@libp2p/mdns@^10.1.1":
"@libp2p/mdns@^10.1.2":
version "10.1.2"
resolved "https://registry.npmjs.org/@libp2p/mdns/-/mdns-10.1.2.tgz#39629cbebf98c0eba7e9f48620e29dbf2a24ca20"
resolved "https://registry.yarnpkg.com/@libp2p/mdns/-/mdns-10.1.2.tgz#39629cbebf98c0eba7e9f48620e29dbf2a24ca20"
integrity sha512-OmKa6RnFt2SDVoBK6d/gUUF5AC5+IeL5poBfvDh90ihqZihEukKWWixaiPcmLRt375sMEkGqeY0Jk5vuy+XUsA==
dependencies:
"@libp2p/interface" "^1.6.1"
Expand Down Expand Up @@ -682,9 +682,9 @@
uint8arraylist "^2.4.8"
uint8arrays "^5.1.0"

"@libp2p/websockets@^8.1.1":
"@libp2p/websockets@^8.1.2":
version "8.1.2"
resolved "https://registry.npmjs.org/@libp2p/websockets/-/websockets-8.1.2.tgz#1cbabca6a9f0a70758f11800e617f3307afa3c67"
resolved "https://registry.yarnpkg.com/@libp2p/websockets/-/websockets-8.1.2.tgz#1cbabca6a9f0a70758f11800e617f3307afa3c67"
integrity sha512-URq0udV+QDRzB31uNKfH/PAte4gdP5pYiZSJZvJ99YZudERTjjjU0+ElqEy3qwm6MX6w1bgf/muld6X0cGWfBg==
dependencies:
"@libp2p/interface" "^1.6.1"
Expand All @@ -700,9 +700,9 @@
wherearewe "^2.0.1"
ws "^8.17.0"

"@libp2p/webtransport@^4.1.1":
"@libp2p/webtransport@^4.1.2":
version "4.1.2"
resolved "https://registry.npmjs.org/@libp2p/webtransport/-/webtransport-4.1.2.tgz#c0c4ca0107f19f4fba3afec79cce3132769b771e"
resolved "https://registry.yarnpkg.com/@libp2p/webtransport/-/webtransport-4.1.2.tgz#c0c4ca0107f19f4fba3afec79cce3132769b771e"
integrity sha512-TAKb+dKxVxA8mNFsqio/gJSkK2jvZbKZECSZnHWMehpzQ8x8FFfGSK5ogy99Y1LhuC206e4YaDY/FocrFgNcfA==
dependencies:
"@chainsafe/libp2p-noise" "^15.0.0"
Expand Down Expand Up @@ -1053,6 +1053,41 @@
resolved "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz#db4ecfd499a9765ab24002c3b696d02e6d32a12c"
integrity sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==

"@topology-foundation/crdt@file:packages/crdt":
version "0.0.22"

"@topology-foundation/network@file:packages/network":
version "0.0.22"
dependencies:
"@chainsafe/libp2p-gossipsub" "^13.1.0"
"@chainsafe/libp2p-noise" "^15.1.0"
"@chainsafe/libp2p-yamux" "^6.0.2"
"@libp2p/autonat" "^1.0.0"
"@libp2p/bootstrap" "^10.1.0"
"@libp2p/circuit-relay-v2" "^1.1.2"
"@libp2p/dcutr" "^1.1.0"
"@libp2p/identify" "^2.0.2"
"@libp2p/interface-pubsub" "^4.0.1"
"@libp2p/mdns" "^10.1.1"
"@libp2p/pubsub-peer-discovery" "^10.0.2"
"@libp2p/webrtc" "^4.1.2"
"@libp2p/websockets" "^8.1.1"
"@libp2p/webtransport" "^4.1.1"
"@multiformats/multiaddr" "^12.3.0"
it-pipe "^3.0.1"
libp2p "^1.8.1"

"@topology-foundation/node@file:packages/node":
version "0.0.22"
dependencies:
"@topology-foundation/crdt" "0.0.22"
"@topology-foundation/network" "0.0.22"
"@topology-foundation/object" "0.0.22"
commander "^12.1.0"

"@topology-foundation/object@file:packages/object":
version "0.0.22"

"@tsconfig/node10@^1.0.7":
version "1.0.11"
resolved "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz#6ee46400685f130e278128c7b38b7e031ff5b2f2"
Expand Down

0 comments on commit 52f9e46

Please sign in to comment.