@sweidos/eidos 1.0.19 → 1.0.20
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 +19 -0
- package/dist/eidos.cjs.js +4 -752
- package/dist/eidos.cjs.js.map +1 -1
- package/dist/eidos.es.js +419 -560
- package/dist/eidos.es.js.map +1 -1
- package/package.json +7 -1
package/README.md
CHANGED
|
@@ -608,6 +608,7 @@ Registers a `QueryClient` with Eidos. After calling this:
|
|
|
608
608
|
| Query string ignored | Resources match by pathname (or full URL for cross-origin). `/api/products?page=2` and `/api/products` share the same SW rule but are cached as separate entries. |
|
|
609
609
|
| Module-scope actions | `action()` must be called at module scope so functions are registered before a page reload triggers queue replay. |
|
|
610
610
|
| Single SW | `EidosProvider` assumes one SW at `/eidos-sw.js`. Multiple registrations are unsupported. |
|
|
611
|
+
| React in main bundle | The published ESM bundle is a single file — consumers who import `resource()` or `eidosStore` (no React) still pull in the `react` import declaration. Since `react` is an optional peer dep, bundlers handle it correctly (import is skipped if unused), but Vue/Svelte projects should ensure `react` is available as a dep. A future `preserveModules` refactor will fix this properly. |
|
|
611
612
|
|
|
612
613
|
---
|
|
613
614
|
|
|
@@ -624,6 +625,24 @@ Registers a `QueryClient` with Eidos. After calling this:
|
|
|
624
625
|
- [x] Vue / Svelte bindings (framework-agnostic reactive stores)
|
|
625
626
|
- [x] TanStack Query integration (`@sweidos/eidos/query` subpath — `useEidosQuery`, `useEidosMutation`, `withEidosQueryClient`)
|
|
626
627
|
|
|
628
|
+
**Core reliability**
|
|
629
|
+
- [ ] Optimistic updates — `onOptimistic` / `onRollback` callbacks on `action()` for instant UI feedback before server confirms
|
|
630
|
+
- [ ] Conflict resolution hook — `onConflict` callback when replaying a queued action returns 4xx; decide per-item: retry, skip, or merge
|
|
631
|
+
- [ ] Queue prioritization — `priority: 'high' | 'normal' | 'low'` on `action()`; high-priority items replay first
|
|
632
|
+
|
|
633
|
+
**DX / Tooling**
|
|
634
|
+
- [ ] Devtools panel component — drop-in `<EidosDevtools />` showing cache entries, queue state, replay status, and offline toggle
|
|
635
|
+
- [ ] Testing utilities (`@sweidos/eidos/testing`) — `mockOffline()`, `drainQueue()`, `getCachedEntry(url)` for Vitest / Playwright
|
|
636
|
+
- [ ] SvelteKit / Next.js adapters — SSR-aware init helpers that skip SW registration server-side
|
|
637
|
+
|
|
638
|
+
**Performance**
|
|
639
|
+
- [ ] Request deduplication — multiple simultaneous `resource.fetch()` calls share one in-flight network request
|
|
640
|
+
- [ ] Cache warming — `warmCache(handles[])` bulk-prefetches a list of resources on init (e.g. on login)
|
|
641
|
+
|
|
642
|
+
**Ecosystem**
|
|
643
|
+
- [ ] React Native support — AsyncStorage + fetch-based backend (no Cache API / SW); same `resource` / `action` API surface
|
|
644
|
+
- [ ] OpenAPI codegen CLI — `npx eidos-gen ./openapi.json` generates typed `resource()` and `action()` declarations
|
|
645
|
+
|
|
627
646
|
---
|
|
628
647
|
|
|
629
648
|
## Contributing
|