reliable 0.7.0
reliable: ^0.7.0 copied to clipboard
An offline-first, secure data repository with automatic sync, retry, and encryption for Dart & Flutter.
CHANGELOG #
0.7.0 #
- feat: SyncEngine closes cleanly, counts sends before they go, and says when to retry
- close() drops late send and pull results: a closed engine never writes to its stores, so the next user signed in on the device cannot inherit the outbox
- attempts is counted before each send; SyncMutation.isResend says an earlier send may already have reached the server
- retryDelay gives a doubling backoff (firstRetryDelay, maxRetryDelay) for the owner to schedule the next flush
- a change the server keeps failing is logged as an error after reportFailuresAfter sends
0.6.0 #
- feat:
SyncEngine.discardtakes back a change the server has not seen (an undo made before it left the device), so neither reaches the server - BREAKING: the engine's storage collections are named
<namespace>_REPLICA_<collection>,<namespace>_OUTBOXand<namespace>_META(default namespaceSYNC), exposed asreplicaStoreName,outboxStoreNameandmetaStoreNameso an app can register them with its own store list; stores written by 0.5.0 are not read
0.5.0 #
- feat:
SyncEngine, a local-first sync engine over anyStorageAdapter: a replica of the server's documents plus an ordered outbox of the device's own changes (SyncMutation, applied and sent by an app-definedSyncMutationKind), shown together as one view; changes survive restarts, replay under their own idempotency key, refusals are dropped and reported, and pulls page through an app-definedSyncServercursor
0.4.0 #
- feat:
readCacheFirst,readListCacheFirstandreadOneCacheFirstshow the cached answer at once and refresh it from the network in the background, so a screen never waits out the request timeout on a link that delivers nothing df_logconstraint widened to>=0.6.1 <0.8.0(onlyLog.info,Log.alertandLog.errare used), so apps still ondf_log0.6 can upgrade
0.3.3 #
- Merge branch 'main' into prod
0.3.2 #
- Merge branch 'main' into prod
0.3.1 #
- docs: remove Discord, point contributors to issues and email
0.3.0 #
- chore: standardize README and CI/CD workflows, remove donation links, update contact info and repository links
- chore: resolve analyzer issues
0.2.1 #
- Released @ 10/2026 (UTC)
- A read that got no answer at all (a
ReliableNetworkExceptionwithout astatusCode: offline, dropped connection, timeout, a request the adapter chose not to send) now logs atLog.alertwhether or not the cache could answer, and also when the error propagates; being offline is expected, not a bug. Server error statuses, malformed answers and bugs still log atLog.err.ReliableNetworkException.statusCodedocuments the contract: an adapter throws a status-less exception only for "no answer", and lets a bug propagate as itself
0.2.0 #
- Released @ 10/2026 (UTC)
- BREAKING:
fetchnow throws aFormatException(naming the keys it saw) for a list answer of unknown shape, instead of silently reading it as[]and serving stale cache forever; a list entry that is not an object also throws aFormatException.{items: [...]}is now unwrapped alongside a bare array and{data: [...]}; anullbody still reads as[] - A read whose answer lands after
purgeCollections,clearUserDataor asetActiveUserswitch to another user no longer writes it into the cache (the caller still gets the answer); a purge arriving part-way through a multi-step cache write stops it, and the purge clears what landed SembastAdapterreopens a dead database connection (iOS Safari killing IndexedDB under a backgrounded tab) and retries the operation once, giving up for the session if the reopen fails, hangs pastreopenTimeout, or is followed straight away by another dead-connection failure; new optional constructor parametersreopenTimeoutandopenDatabase, plusrecoveryGaveUpandSembastAdapter.isDeadConnectionError- A failed read served from cache (
NETWORK_OR_ELSE_CACHE) now logs atLog.alertinstead ofLog.errwhen the request got no answer at all (offline, dropped connection, timeout);Log.errremains when nothing answered from cache, the error propagates, the server answered with an error status (ReliableNetworkException.statusCodeset, e.g. 401 or 5xx), or the answer was malformed - A good read whose cache copy cannot be saved is returned as a success, with the failed save logged as a
Log.alertwarning (REPO_CACHE_WRITE_FAILED) instead of failing the read
0.1.1 #
- Update dependencies
0.1.0 #
- Initial release