libfw-client 0.3.1 → 0.3.2

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/index.js CHANGED
@@ -673,11 +673,14 @@ export class LibfwClient {
673
673
  this._fallback.buffers.set(path, buf);
674
674
  this._fallback.order.push(path);
675
675
  }
676
- // A chunk whose absolute offset is at or before the last one delivered
677
- // means the engine restarted this file (an internal retry re-delivers
678
- // the same byte range) — drop the partial buffer so the prefix is not
679
- // duplicated in the produced blob/zip.
680
- if (offset <= buf.len) {
676
+ // A chunk whose absolute offset is BEFORE the buffered span means the
677
+ // engine restarted this file (an internal retry re-delivers the same
678
+ // byte range) — drop the partial buffer so the prefix is not duplicated
679
+ // in the produced blob/zip. Note: `offset === buf.len` is the NORMAL
680
+ // next-chunk case (chunk N ends exactly where chunk N+1 begins), so it
681
+ // must NOT be treated as a restart — otherwise the first chunk of every
682
+ // browser-mode download is silently dropped.
683
+ if (offset < buf.len) {
681
684
  buf.chunks = [];
682
685
  buf.len = 0;
683
686
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libfw-client",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "High-performance streaming file & folder transfer SDK for the browser (libfw WASM engine + File System Access API + IndexedDB resume).",
5
5
  "license": "MIT",
6
6
  "type": "module",
Binary file
package/pkg/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "libfw-client",
3
3
  "type": "module",
4
4
  "description": "WASM engine + JS SDK for libfw browser clients",
5
- "version": "0.3.1",
5
+ "version": "0.3.2",
6
6
  "license": "MIT",
7
7
  "repository": {
8
8
  "type": "git",