mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 20:27:15 +01:00
crdt_sync_dart: new domain-agnostic LogStore -- an in-memory Log with a reactive changes stream and upsert/delete(sticky tombstone)/replaceAll, behind an injectable LogPersistence port -- plus logToJson/logFromJson. FileLogPersistence (atomic temp-file-then-rename, generalizing diet_guard's LogStorageService) lives behind a separate crdt_sync_io.dart entrypoint so the core barrel stays pure Dart / web-safe. crdt-sync (Python): mirror dump_log/load_log/read_log/write_log sharing the same on-disk JSON format so a log written on one side parses on the other. Load/save only -- the reactive store is a Dart/Flutter convenience with no Python equivalent by design (Python consumers are headless sync ticks). Querying stays app-side: a Record's fields are opaque to the library, so filtering/sorting/search is the caller's job over LogStore.values. Both packages bumped to 0.2.0. 83 Dart tests + 71 Python tests (100% branch coverage) green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019KwUCPESvE5CjCtmUFz8xQ
9 lines
322 B
Dart
9 lines
322 B
Dart
/// Filesystem-backed persistence for `LogStore`.
|
|
///
|
|
/// Import this instead of (in addition to) `package:crdt_sync/crdt_sync.dart`
|
|
/// on platforms with a filesystem (mobile, desktop, server). It pulls in
|
|
/// `dart:io`, so it is unavailable on web; the main barrel stays pure Dart.
|
|
library;
|
|
|
|
export 'src/io_store.dart';
|