mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-11 21:34:04 +01:00
firebase_auth_rest.dart 333 -> 238 + firebase_credentials 71
+ firebase_auth_error 31
firebase_client.dart 283 -> 207 + firebase_keys 60 + firebase_errors 19
sync.dart 259 -> 141 + sync_state 121
Mirrors the split just made on the Python side, module for module, so the two
implementations stay legible against each other: credentials with their store,
key escaping with its escape table, the error type with the response parser
that builds its message.
Every new file is added to lib/crdt_sync.dart. A src/ file that is not in the
barrel compiles and tests green while silently dropping the symbol from every
consumer's import, so the export list is part of the split, not an afterthought.
280 tests pass and `dart analyze` is clean — including the four consumers
(firebase_config, secure_credential_store) whose imports had to follow the
moved types.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CFSGeWxHPY5rHUGrPqhcmG
20 lines
691 B
Dart
20 lines
691 B
Dart
import 'remote_store.dart';
|
|
|
|
/// Raised for a Realtime Database failure the caller must not silently
|
|
/// ignore.
|
|
class FirebaseSyncError extends RemoteSyncError {
|
|
FirebaseSyncError(super.message);
|
|
}
|
|
|
|
/// Raised when the database itself is unreachable or the credential is not
|
|
/// authorized for it.
|
|
///
|
|
/// The Firebase counterpart of `RepoNotFoundError`: it means "the database
|
|
/// URL is wrong, or the security rules reject this uid", as opposed to
|
|
/// "nothing has been pushed to that path yet", which is benign and surfaces
|
|
/// as a null/empty result.
|
|
class DatabaseNotFoundError extends FirebaseSyncError
|
|
implements RemoteNotFoundError {
|
|
DatabaseNotFoundError(super.message);
|
|
}
|