mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-06 16:28:18 +00:00
Complete central provider, resource, scheduling, and recovery contracts
This commit is contained in:
1 parent
24228bf7cf
commit
1d2077d3fc
18 files changed
+464
-34
No files matched your search
@@ -10,7 +10,9 @@ import { createReplicatorDisposer, snapshotRemoteSettings } from "./shared";
|
||||
* Build an unpublished CouchDB synchronisation-information verifier.
|
||||
*
|
||||
* The resource owns its concrete Replicator and connection, and cannot replace
|
||||
* the active provider instance.
|
||||
* the active provider instance. Its check resolves to `false` only for observed
|
||||
* incompatibility; connection, setup, and verification failures reject so the
|
||||
* caller can report an operational failure separately.
|
||||
*/
|
||||
export function createCouchDBSynchronisationInformationResourceFactory(
|
||||
host: LiveSyncCouchDBReplicatorEnv
|
||||
@@ -26,7 +28,7 @@ export function createCouchDBSynchronisationInformationResourceFactory(
|
||||
true
|
||||
);
|
||||
if (typeof connection === "string") {
|
||||
return false;
|
||||
throw new Error(connection);
|
||||
}
|
||||
try {
|
||||
return await checkSyncInfo(connection.db);
|
||||
|
||||
Reference in new issue
Block a user