diff --git a/package-lock.json b/package-lock.json index b084e71..adcc057 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "octagonal-wheels": "^0.1.38", "qrcode-generator": "^1.4.4", "svelte-check": "^4.1.7", - "trystero": "^0.21.7", + "trystero": "github:vrtmrz/trystero#9e892a93ec14eeb57ce806d272fbb7c3935256d8", "xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2" }, "devDependencies": { @@ -8752,9 +8752,9 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", - "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz", + "integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==", "dev": true, "license": "ISC", "engines": { @@ -10365,20 +10365,29 @@ } }, "node_modules/trystero": { - "version": "0.21.7", - "resolved": "https://registry.npmjs.org/trystero/-/trystero-0.21.7.tgz", - "integrity": "sha512-SdpxC9Q29bDBUdIWvkELHvOlmpelHAbjgclXR6cPeUWeLkbyY8ku2ZCJjozO4L2CLOMiclOoMKdmtpYLAwZvIw==", + "version": "0.21.8", + "resolved": "git+ssh://git@github.com/vrtmrz/trystero.git#9e892a93ec14eeb57ce806d272fbb7c3935256d8", + "integrity": "sha512-LUlmTTSxgomyYvU1K05snl18+GLAxqO4W8P9lePLbRnZVJyGZUVXMM4/aW9384GtIf0VLJquloWqz9PriJZg2w==", "license": "MIT", "dependencies": { - "@noble/secp256k1": "^1.7.1", + "@noble/secp256k1": "^3.0.0", "@supabase/supabase-js": "^2.49.8", "@waku/discovery": "^0.0.8", "@waku/sdk": "^0.0.31", - "firebase": "^12.0.0", + "firebase": "^12.2.1", "libp2p": "^2.8.8", "mqtt": "^5.13.0" } }, + "node_modules/trystero/node_modules/@noble/secp256k1": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-3.0.0.tgz", + "integrity": "sha512-NJBaR352KyIvj3t6sgT/+7xrNyF9Xk9QlLSIqUGVUYlsnDTAUqY8LOmwpcgEx4AMJXRITQ5XEVHD+mMaPfr3mg==", + "license": "MIT", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/ts-api-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.0.1.tgz", @@ -17147,9 +17156,9 @@ }, "dependencies": { "lru-cache": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.1.0.tgz", - "integrity": "sha512-QIXZUBJUx+2zHUdQujWejBkcD9+cs94tLn0+YL8UrCh+D5sCXZ4c7LaEH48pNwRY3MLDgqUFyhlCyjJPf1WP0A==", + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.1.tgz", + "integrity": "sha512-r8LA6i4LP4EeWOhqBaZZjDWwehd1xUJPCJd9Sv300H0ZmcUER4+JPh7bqqZeqs1o5pgtgvXm+d9UGrB5zZGDiQ==", "dev": true } } @@ -18229,17 +18238,24 @@ } }, "trystero": { - "version": "0.21.7", - "resolved": "https://registry.npmjs.org/trystero/-/trystero-0.21.7.tgz", - "integrity": "sha512-SdpxC9Q29bDBUdIWvkELHvOlmpelHAbjgclXR6cPeUWeLkbyY8ku2ZCJjozO4L2CLOMiclOoMKdmtpYLAwZvIw==", + "version": "git+ssh://git@github.com/vrtmrz/trystero.git#9e892a93ec14eeb57ce806d272fbb7c3935256d8", + "integrity": "sha512-LUlmTTSxgomyYvU1K05snl18+GLAxqO4W8P9lePLbRnZVJyGZUVXMM4/aW9384GtIf0VLJquloWqz9PriJZg2w==", + "from": "trystero@github:vrtmrz/trystero#9e892a93ec14eeb57ce806d272fbb7c3935256d8", "requires": { - "@noble/secp256k1": "^1.7.1", + "@noble/secp256k1": "^3.0.0", "@supabase/supabase-js": "^2.49.8", "@waku/discovery": "^0.0.8", "@waku/sdk": "^0.0.31", - "firebase": "^12.0.0", + "firebase": "^12.2.1", "libp2p": "^2.8.8", "mqtt": "^5.13.0" + }, + "dependencies": { + "@noble/secp256k1": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-3.0.0.tgz", + "integrity": "sha512-NJBaR352KyIvj3t6sgT/+7xrNyF9Xk9QlLSIqUGVUYlsnDTAUqY8LOmwpcgEx4AMJXRITQ5XEVHD+mMaPfr3mg==" + } } }, "ts-api-utils": { diff --git a/package.json b/package.json index fd3e0df..0de5f51 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "octagonal-wheels": "^0.1.38", "qrcode-generator": "^1.4.4", "svelte-check": "^4.1.7", - "trystero": "^0.21.7", + "trystero": "github:vrtmrz/trystero#9e892a93ec14eeb57ce806d272fbb7c3935256d8", "xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2" } } diff --git a/src/features/P2PSync/CmdP2PReplicator.ts b/src/features/P2PSync/CmdP2PReplicator.ts index e2a3687..39d7e77 100644 --- a/src/features/P2PSync/CmdP2PReplicator.ts +++ b/src/features/P2PSync/CmdP2PReplicator.ts @@ -174,6 +174,13 @@ export class P2PReplicator if (this.settings.P2P_Enabled && this.settings.P2P_AutoStart) { setTimeout(() => void this.open(), 100); } + const rep = this._replicatorInstance; + rep?.allowReconnection(); + return Promise.resolve(true); + } + $everyBeforeSuspendProcess(): Promise { + const rep = this._replicatorInstance; + rep?.disconnectFromServer(); return Promise.resolve(true); } } diff --git a/src/lib b/src/lib index 4cedb17..c00f62f 160000 --- a/src/lib +++ b/src/lib @@ -1 +1 @@ -Subproject commit 4cedb17db151225df371559162d79b3331512b0a +Subproject commit c00f62f060b7401350962f7c8307bd138a0c1713