@brftech/filex-core 0.33.0 → 0.34.1
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/README.md +23 -0
- package/dist/filex-core.js +2529 -2514
- package/dist/filex-core.js.map +1 -1
- package/dist/filex-core.umd.cjs +38 -38
- package/dist/filex-core.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/composables/useRealtime.ts +12 -15
- package/src/lib/burstDebounce.ts +57 -0
package/README.md
CHANGED
|
@@ -191,6 +191,29 @@ package exists to prevent.
|
|
|
191
191
|
|
|
192
192
|
See [docs/PROTOCOLS.md](https://github.com/BRF-Tech/filex/blob/main/docs/PROTOCOLS.md).
|
|
193
193
|
|
|
194
|
+
### Live updates
|
|
195
|
+
|
|
196
|
+
An embedded explorer keeps itself current over a WebSocket: it mints a
|
|
197
|
+
short-lived ticket, opens the socket and re-lists a folder when something in it
|
|
198
|
+
changes. Two things are worth knowing before you host it.
|
|
199
|
+
|
|
200
|
+
**Proxy `/api/ws`.** If your page reaches filex through your own backend, the
|
|
201
|
+
ticket route is under `/api/files/` and the socket is **not** — a proxy rule
|
|
202
|
+
that only forwards `/api/files/*` leaves the explorer with no socket, and it
|
|
203
|
+
falls back to re-listing every 12 s. It keeps working, quietly, which is why
|
|
204
|
+
this is easy to ship without noticing.
|
|
205
|
+
|
|
206
|
+
**A burst is one frame per window, not one frame per file.** The server sends
|
|
207
|
+
the first change in a quiet folder immediately and merges everything after it
|
|
208
|
+
into one frame per window (200 ms, stretching to 1.5 s while the burst
|
|
209
|
+
continues); a merged frame carries `count`. Nothing is dropped — the last frame
|
|
210
|
+
of a burst always reflects the final state. If you debounce on your side as
|
|
211
|
+
well, give your debounce a **ceiling**: a plain trailing debounce starves under
|
|
212
|
+
a sustained stream, because every arriving frame cancels the pending reload.
|
|
213
|
+
The package's own `burstDebounce` does exactly that.
|
|
214
|
+
|
|
215
|
+
Full contract: [docs/REALTIME.md](https://github.com/BRF-Tech/filex/blob/main/docs/REALTIME.md).
|
|
216
|
+
|
|
194
217
|
## Build
|
|
195
218
|
|
|
196
219
|
```bash
|