@decentnetwork/beagle 0.1.52 → 0.1.53
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/desktop/app.js +1 -1
- package/dist/embedded-host.js +7 -9
- package/package.json +3 -3
package/dist/desktop/app.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
window.__DK_UI_VERSION="0.1.
|
|
1
|
+
window.__DK_UI_VERSION="0.1.53";
|
|
2
2
|
const ICON_PATHS = {
|
|
3
3
|
// ---- tab bar (the four must feel like one set) ----
|
|
4
4
|
users: '<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M22 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>',
|
package/dist/embedded-host.js
CHANGED
|
@@ -592,21 +592,19 @@ export class EmbeddedHost {
|
|
|
592
592
|
this.#events.emit("event", { type: "chat", userid, dir: "out" });
|
|
593
593
|
return { queued: true, name: safe, size: data.length };
|
|
594
594
|
}
|
|
595
|
-
// A NATIVE friend (iOS/Android/C Carrier)
|
|
596
|
-
//
|
|
597
|
-
//
|
|
598
|
-
//
|
|
595
|
+
// A NATIVE friend (iOS/Android/C Carrier) takes the inline envelope for
|
|
596
|
+
// small files (single blob, the Beagle apps' own fast path). Larger files
|
|
597
|
+
// go through the normal sendFile below — peer >= 0.1.141 carries those to
|
|
598
|
+
// natives as DNFT1 frames inside friend messages (offset acks, FEC,
|
|
599
|
+
// resume; verified 100MB JS→iPad). Only route to inline what fits it.
|
|
599
600
|
const native = this.#node.isNativeFriend(userid);
|
|
600
|
-
|
|
601
|
-
throw new Error(`This friend is a native (iOS/Android) client — files are sent inline and limited to ` +
|
|
602
|
-
`${(INLINE_MAX_BYTES / 1024 / 1024).toFixed(1)} MB (this is ${(data.length / 1024 / 1024).toFixed(1)} MB).`);
|
|
603
|
-
}
|
|
601
|
+
const inlineNative = native && data.length <= INLINE_MAX_BYTES;
|
|
604
602
|
const msg = this.#messages.appendFile(userid, "out", { name: safe, size: data.length, status: "sending", sent: 0 });
|
|
605
603
|
if (!msg)
|
|
606
604
|
throw new Error("Could not create file message");
|
|
607
605
|
await mkdir(this.outboxDir, { recursive: true });
|
|
608
606
|
await writeFile(resolve(this.outboxDir, msg.id), data);
|
|
609
|
-
const fileId =
|
|
607
|
+
const fileId = inlineNative ? null : this.#node.sendFile(userid, new Uint8Array(data), safe);
|
|
610
608
|
if (!fileId) {
|
|
611
609
|
// Native friend, or no transfer slot — the inline envelope path.
|
|
612
610
|
if (data.length > INLINE_MAX_BYTES) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@decentnetwork/beagle",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.53",
|
|
4
4
|
"description": "Beagle — P2P chat, file transfer and calls for regular users, on the Decent Network. No admin privilege required.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@decentnetwork/chat-components": "^0.1.3",
|
|
29
|
-
"@decentnetwork/lan": "^0.1.
|
|
30
|
-
"@decentnetwork/peer": "^0.1.
|
|
29
|
+
"@decentnetwork/lan": "^0.1.280",
|
|
30
|
+
"@decentnetwork/peer": "^0.1.141",
|
|
31
31
|
"@decentnetwork/peer-webrtc": "^0.2.16",
|
|
32
32
|
"js-yaml": "^4.1.0",
|
|
33
33
|
"yargs": "^17.7.2"
|