@vrtmrz/livesync-commonlib 0.1.19 → 0.1.21

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.
Files changed (114) hide show
  1. package/README.md +5 -1
  2. package/dist/common/models/setting.p2p.d.ts +2 -0
  3. package/dist/common/models/setting.p2p.js +5 -0
  4. package/dist/interfaces/ServiceModule.d.ts +13 -4
  5. package/dist/managers/ChunkFetcher.js +10 -0
  6. package/dist/p2p/P2PService.d.ts +123 -0
  7. package/dist/p2p/P2PService.js +271 -0
  8. package/dist/p2p/index.d.ts +8 -0
  9. package/dist/p2p/index.js +8 -0
  10. package/dist/pouchdb/LiveSyncLocalDB.d.ts +3 -0
  11. package/dist/pouchdb/LiveSyncLocalDB.js +23 -3
  12. package/dist/pouchdb/ReplicatorShim.d.ts +43 -4
  13. package/dist/pouchdb/ReplicatorShim.js +78 -5
  14. package/dist/replication/CentralCompatibility.d.ts +38 -0
  15. package/dist/replication/CentralCompatibility.js +39 -0
  16. package/dist/replication/CentralRemoteAdministration.d.ts +84 -0
  17. package/dist/replication/CentralRemoteAdministration.js +71 -0
  18. package/dist/replication/LiveSyncAbstractReplicator.d.ts +19 -6
  19. package/dist/replication/ProviderCapability.d.ts +32 -0
  20. package/dist/replication/ProviderCapability.js +27 -0
  21. package/dist/replication/RemoteResource.d.ts +85 -0
  22. package/dist/replication/RemoteResource.js +17 -0
  23. package/dist/replication/ReplicatorInstance.d.ts +23 -0
  24. package/dist/replication/ReplicatorProvider.d.ts +262 -0
  25. package/dist/replication/ReplicatorProvider.js +150 -0
  26. package/dist/replication/couchdb/LiveSyncReplicator.d.ts +54 -8
  27. package/dist/replication/couchdb/LiveSyncReplicator.js +411 -158
  28. package/dist/replication/index.d.ts +10 -0
  29. package/dist/replication/index.js +72 -0
  30. package/dist/replication/journal/JournalSyncCore.d.ts +2 -0
  31. package/dist/replication/journal/JournalSyncCore.js +18 -5
  32. package/dist/replication/journal/LiveSyncJournalReplicator.d.ts +38 -10
  33. package/dist/replication/journal/LiveSyncJournalReplicator.js +271 -63
  34. package/dist/replication/journal/LiveSyncJournalReplicatorEnv.d.ts +8 -0
  35. package/dist/replication/journal/objectstore/JournalStorageAdapter.d.ts +2 -0
  36. package/dist/replication/journal/objectstore/MinioStorageAdapter.d.ts +2 -0
  37. package/dist/replication/journal/objectstore/MinioStorageAdapter.js +10 -1
  38. package/dist/replication/trystero/LiveSyncTrysteroReplicator.d.ts +12 -40
  39. package/dist/replication/trystero/LiveSyncTrysteroReplicator.js +52 -152
  40. package/dist/replication/trystero/P2PAutomationCoordinator.d.ts +20 -0
  41. package/dist/replication/trystero/P2PAutomationCoordinator.js +43 -0
  42. package/dist/replication/trystero/P2PConnectionProbeAdmission.d.ts +32 -0
  43. package/dist/replication/trystero/P2PConnectionProbeAdmission.js +10 -0
  44. package/dist/replication/trystero/P2PReplicationWire.d.ts +31 -0
  45. package/dist/replication/trystero/P2PReplicationWire.js +50 -0
  46. package/dist/replication/trystero/P2PRoomSession.d.ts +32 -0
  47. package/dist/replication/trystero/P2PRoomSession.js +101 -0
  48. package/dist/replication/trystero/P2PRoomSessionOwner.d.ts +61 -0
  49. package/dist/replication/trystero/P2PRoomSessionOwner.js +249 -0
  50. package/dist/replication/trystero/TrysteroReplicator.d.ts +88 -36
  51. package/dist/replication/trystero/TrysteroReplicator.js +273 -113
  52. package/dist/replication/trystero/TrysteroReplicatorP2PClient.d.ts +7 -4
  53. package/dist/replication/trystero/TrysteroReplicatorP2PClient.js +21 -14
  54. package/dist/replication/trystero/TrysteroReplicatorP2PServer.d.ts +26 -3
  55. package/dist/replication/trystero/TrysteroReplicatorP2PServer.js +84 -39
  56. package/dist/replication/trystero/UseP2PReplicatorResult.d.ts +10 -6
  57. package/dist/replication/trystero/addP2PEventHandlers.d.ts +8 -12
  58. package/dist/replication/trystero/addP2PEventHandlers.js +19 -19
  59. package/dist/replication/trystero/p2pReplicatorConfigurationIdentity.d.ts +9 -0
  60. package/dist/replication/trystero/p2pReplicatorConfigurationIdentity.js +30 -0
  61. package/dist/replication/trystero/types.d.ts +18 -0
  62. package/dist/replication/trystero/types.js +5 -1
  63. package/dist/replication/trystero/useP2PReplicatorCommands.d.ts +3 -3
  64. package/dist/replication/trystero/useP2PReplicatorCommands.js +6 -8
  65. package/dist/replication/trystero/useP2PReplicatorFeature.d.ts +16 -7
  66. package/dist/replication/trystero/useP2PReplicatorFeature.js +73 -55
  67. package/dist/rpc/RpcRoom.d.ts +15 -1
  68. package/dist/rpc/RpcRoom.js +176 -41
  69. package/dist/rpc/RpcSession.d.ts +3 -1
  70. package/dist/rpc/RpcSession.js +2 -2
  71. package/dist/rpc/index.d.ts +1 -1
  72. package/dist/rpc/transports/trysteroUtils.js +2 -1
  73. package/dist/rpc/types.d.ts +26 -1
  74. package/dist/serviceFeatures/checkRemoteSize.js +5 -2
  75. package/dist/serviceModules/Rebuilder.js +66 -56
  76. package/dist/services/base/AppLifecycleService.d.ts +4 -0
  77. package/dist/services/base/AppLifecycleService.js +4 -0
  78. package/dist/services/base/ControlService.js +0 -4
  79. package/dist/services/base/DatabaseEventService.js +1 -1
  80. package/dist/services/base/IService.d.ts +105 -8
  81. package/dist/services/base/ReadinessEvaluator.d.ts +40 -0
  82. package/dist/services/base/ReadinessEvaluator.js +16 -0
  83. package/dist/services/base/RemoteConnection.d.ts +3 -0
  84. package/dist/services/base/RemoteService.js +2 -2
  85. package/dist/services/base/ReplicationService.d.ts +45 -10
  86. package/dist/services/base/ReplicationService.js +250 -91
  87. package/dist/services/base/ReplicationService.readiness.d.ts +52 -0
  88. package/dist/services/base/ReplicationService.readiness.js +87 -0
  89. package/dist/services/base/ReplicationService.typedReplication.d.ts +93 -0
  90. package/dist/services/base/ReplicationService.typedReplication.js +214 -0
  91. package/dist/services/base/ReplicatorService.activeReplicatorState.d.ts +47 -0
  92. package/dist/services/base/ReplicatorService.activeReplicatorState.js +107 -0
  93. package/dist/services/base/ReplicatorService.centralRemoteAdministration.d.ts +5 -0
  94. package/dist/services/base/ReplicatorService.centralRemoteAdministration.js +44 -0
  95. package/dist/services/base/ReplicatorService.d.ts +75 -14
  96. package/dist/services/base/ReplicatorService.js +232 -53
  97. package/dist/services/base/ReplicatorService.remoteResourceResolver.d.ts +4 -0
  98. package/dist/services/base/ReplicatorService.remoteResourceResolver.js +11 -0
  99. package/dist/services/base/TweakValueService.d.ts +3 -2
  100. package/dist/services/implements/injectable/InjectableTweakValueService.d.ts +1 -1
  101. package/dist/services/lib/HandlerUtils.d.ts +24 -0
  102. package/dist/services/lib/HandlerUtils.js +40 -0
  103. package/docs/development.md +40 -7
  104. package/docs/p2p-transport-lifecycle.md +135 -11
  105. package/docs/proven-in-use.md +5 -1
  106. package/docs/remote-configurations.md +4 -0
  107. package/docs/service-feature-composition.md +250 -0
  108. package/package.json +17 -1
  109. package/dist/replication/trystero/P2PReplicatorBase.d.ts +0 -19
  110. package/dist/replication/trystero/P2PReplicatorCore.d.ts +0 -8
  111. package/dist/replication/trystero/P2PReplicatorCore.js +0 -56
  112. package/dist/replication/trystero/TrysteroReplicatorP2PConnection.d.ts +0 -2
  113. package/dist/replication/trystero/TrysteroReplicatorP2PConnection.js +0 -4
  114. /package/dist/replication/{trystero/P2PReplicatorBase.js → ReplicatorInstance.js} +0 -0
@@ -0,0 +1,10 @@
1
+ export { CAPABILITY_NOT_APPLICABLE, CAPABILITY_NOT_IMPLEMENTED, CENTRAL_REMOTE_REPLICATION_READINESS, NO_INTERACTION, PEER_REPLICATION_READINESS, REPLICATION_CANCELLED, REPLICATION_COMPLETED, REPLICATION_PROGRESS_PRESENTATIONS, USER_INITIATED_REPLICATION_AUTHORITY, defineReplicatorProviderDefinitions, isReplicationCompleted, outcomeFromContinuousOpenReplication, outcomeFromFiniteOpenReplication, replicationBlocked, replicationFailed, supportedOpenReplicationContinuous, supportedOpenReplicationOneShot, supportedOpenReplicationUnattended, supportedStopActiveTransfer, supportedCapability, } from "./ReplicatorProvider.js";
2
+ export type { ReplicatorInstance } from "./ReplicatorInstance.js";
3
+ export type { ActiveReplicatorContext, CapabilitySupport, ContinuousReplicationRequest, ContinuousReplicationTrigger, ContinuousRunner, InteractionAuthority, InteractionPermissions, NotApplicableCapability, NotImplementedCapability, NoInteraction, PermittedInteractionPermissions, ReplicationBlockReason, ReplicationAttemptFailure, ReplicationCancelled, ReplicationCompleted, ReplicationFailed, ReplicationInteraction, ReplicationOutcome, ReplicationProgressPresentation, ReplicationReadinessRequirements, ReplicationPartial, ReplicationFailureRequest, ReplicatorConfigurationIdentity, ReplicatorProviderDefinition, ReplicatorProviderDefinitionMap, StopActiveTransferRunner, SupportedCapability, UnattendedOneShotRequest, UnattendedReplicationTrigger, UnattendedOneShotRunner, UserInitiatedOneShotRequest, UserInitiatedReplicationAuthority, UserInitiatedOneShotRunner, } from "./ReplicatorProvider.js";
4
+ export { CAPABILITY_SUPPORT_KINDS, CAPABILITY_UNAVAILABLE_REASONS } from "./ProviderCapability.js";
5
+ export { NO_REMOTE_RESOURCE_CAPABILITIES, REMOTE_RESOURCE_KINDS } from "./RemoteResource.js";
6
+ export type { ConnectionProbeFactory, PreferredTweakProbe, PreferredTweakProbeFactory, RemoteConnectionProbe, RemoteConnectionProbeOptions, RemoteConnectionProbeResult, RemoteResourceCapabilities, RemoteResourceFactoryMap, RemoteResourceKind, RemoteResourceMap, SecuritySeedResource, SecuritySeedResourceFactory, SynchronisationInformationResource, SynchronisationInformationResourceFactory, } from "./RemoteResource.js";
7
+ export { CENTRAL_REMOTE_ADMINISTRATION_ACTIONS, CENTRAL_REMOTE_ADMINISTRATION_FAILURE_REASONS, CENTRAL_REMOTE_ADMINISTRATION_OBSERVATION_KINDS, CENTRAL_REMOTE_ADMINISTRATION_RESULT_STATUSES, applyCentralRemoteAdministrationMutation, isCentralRemoteAdministrationVerified, milestoneSatisfiesCentralRemoteAdministration, centralRemoteAdministrationVerificationFailed, centralRemoteAdministrationVerified, } from "./CentralRemoteAdministration.js";
8
+ export type { MilestoneCentralRemoteAdministrationObservation, CentralRemoteAdministrationAction, CentralRemoteAdministrationFailureReason, CentralRemoteAdministrationObservation, CentralRemoteAdministrationRequest, CentralRemoteAdministrationReplicator, CentralRemoteAdministrationResult, CentralRemoteAdministrationRunner, CentralRemoteAdministrationVerificationFailed, CentralRemoteAdministrationVerified, } from "./CentralRemoteAdministration.js";
9
+ export { CENTRAL_COMPATIBILITY_REJECTION_REASONS } from "./CentralCompatibility.js";
10
+ export type { CentralCompatibilityRecoveryHint, CentralCompatibilityRejectionReason } from "./CentralCompatibility.js";
@@ -0,0 +1,72 @@
1
+ import {
2
+ CAPABILITY_NOT_APPLICABLE,
3
+ CAPABILITY_NOT_IMPLEMENTED,
4
+ CENTRAL_REMOTE_REPLICATION_READINESS,
5
+ NO_INTERACTION,
6
+ PEER_REPLICATION_READINESS,
7
+ REPLICATION_CANCELLED,
8
+ REPLICATION_COMPLETED,
9
+ REPLICATION_PROGRESS_PRESENTATIONS,
10
+ USER_INITIATED_REPLICATION_AUTHORITY,
11
+ defineReplicatorProviderDefinitions,
12
+ isReplicationCompleted,
13
+ outcomeFromContinuousOpenReplication,
14
+ outcomeFromFiniteOpenReplication,
15
+ replicationBlocked,
16
+ replicationFailed,
17
+ supportedOpenReplicationContinuous,
18
+ supportedOpenReplicationOneShot,
19
+ supportedOpenReplicationUnattended,
20
+ supportedStopActiveTransfer,
21
+ supportedCapability
22
+ } from "./ReplicatorProvider.js";
23
+ import { CAPABILITY_SUPPORT_KINDS, CAPABILITY_UNAVAILABLE_REASONS } from "./ProviderCapability.js";
24
+ import { NO_REMOTE_RESOURCE_CAPABILITIES, REMOTE_RESOURCE_KINDS } from "./RemoteResource.js";
25
+ import {
26
+ CENTRAL_REMOTE_ADMINISTRATION_ACTIONS,
27
+ CENTRAL_REMOTE_ADMINISTRATION_FAILURE_REASONS,
28
+ CENTRAL_REMOTE_ADMINISTRATION_OBSERVATION_KINDS,
29
+ CENTRAL_REMOTE_ADMINISTRATION_RESULT_STATUSES,
30
+ applyCentralRemoteAdministrationMutation,
31
+ isCentralRemoteAdministrationVerified,
32
+ milestoneSatisfiesCentralRemoteAdministration,
33
+ centralRemoteAdministrationVerificationFailed,
34
+ centralRemoteAdministrationVerified
35
+ } from "./CentralRemoteAdministration.js";
36
+ import { CENTRAL_COMPATIBILITY_REJECTION_REASONS } from "./CentralCompatibility.js";
37
+ export {
38
+ CAPABILITY_NOT_APPLICABLE,
39
+ CAPABILITY_NOT_IMPLEMENTED,
40
+ CAPABILITY_SUPPORT_KINDS,
41
+ CAPABILITY_UNAVAILABLE_REASONS,
42
+ CENTRAL_COMPATIBILITY_REJECTION_REASONS,
43
+ CENTRAL_REMOTE_ADMINISTRATION_ACTIONS,
44
+ CENTRAL_REMOTE_ADMINISTRATION_FAILURE_REASONS,
45
+ CENTRAL_REMOTE_ADMINISTRATION_OBSERVATION_KINDS,
46
+ CENTRAL_REMOTE_ADMINISTRATION_RESULT_STATUSES,
47
+ CENTRAL_REMOTE_REPLICATION_READINESS,
48
+ NO_INTERACTION,
49
+ NO_REMOTE_RESOURCE_CAPABILITIES,
50
+ PEER_REPLICATION_READINESS,
51
+ REMOTE_RESOURCE_KINDS,
52
+ REPLICATION_CANCELLED,
53
+ REPLICATION_COMPLETED,
54
+ REPLICATION_PROGRESS_PRESENTATIONS,
55
+ USER_INITIATED_REPLICATION_AUTHORITY,
56
+ applyCentralRemoteAdministrationMutation,
57
+ centralRemoteAdministrationVerificationFailed,
58
+ centralRemoteAdministrationVerified,
59
+ defineReplicatorProviderDefinitions,
60
+ isCentralRemoteAdministrationVerified,
61
+ isReplicationCompleted,
62
+ milestoneSatisfiesCentralRemoteAdministration,
63
+ outcomeFromContinuousOpenReplication,
64
+ outcomeFromFiniteOpenReplication,
65
+ replicationBlocked,
66
+ replicationFailed,
67
+ supportedCapability,
68
+ supportedOpenReplicationContinuous,
69
+ supportedOpenReplicationOneShot,
70
+ supportedOpenReplicationUnattended,
71
+ supportedStopActiveTransfer
72
+ };
@@ -67,5 +67,7 @@ export declare class JournalSyncCore {
67
67
  receiveRemoteJournal(showMessage?: boolean): Promise<boolean>;
68
68
  sync(showResult?: boolean): Promise<boolean>;
69
69
  requestStop(): void;
70
+ /** Stop this Journal operation owner and release its storage transport. */
71
+ dispose(): void;
70
72
  }
71
73
  export {};
@@ -70,11 +70,14 @@ class JournalSyncCore {
70
70
  }
71
71
  async getSyncParameters() {
72
72
  try {
73
- const downloadedData = await this.storage.download(DOCID_JOURNAL_SYNC_PARAMETERS, true);
74
- if (!downloadedData) {
73
+ const result = await this.storage.downloadWithResult(DOCID_JOURNAL_SYNC_PARAMETERS, true);
74
+ if (result.status === JournalStorageReadStatuses.NOT_FOUND) {
75
75
  throw new SyncParamsNotFoundError(`Missing sync parameters`);
76
76
  }
77
- const downloadedSyncParams = JSON.parse(new TextDecoder().decode(downloadedData));
77
+ if (result.status === JournalStorageReadStatuses.UNAVAILABLE) {
78
+ throw SyncParamsFetchError.fromError(result.error);
79
+ }
80
+ const downloadedSyncParams = JSON.parse(new TextDecoder().decode(result.value));
78
81
  return downloadedSyncParams;
79
82
  } catch (ex) {
80
83
  Logger(`Could not retrieve remote sync parameters`, LOG_LEVEL_INFO);
@@ -262,19 +265,24 @@ class JournalSyncCore {
262
265
  if (files.length == 0) {
263
266
  break;
264
267
  }
265
- await this.storage.deleteFiles(files);
268
+ if (!await this.storage.deleteFiles(files)) {
269
+ return false;
270
+ }
266
271
  } while (files.length != 0);
267
272
  clearHandlers();
268
273
  } catch (ex) {
269
274
  Logger(`WARNING! Could not delete files.`, LOG_LEVEL_NOTICE, "reset-bucket");
270
275
  Logger(ex, LOG_LEVEL_VERBOSE);
276
+ return false;
271
277
  }
272
278
  const journals = await this._getRemoteJournals();
273
279
  if (journals.length == 0) {
274
280
  Logger("Nothing to delete!", LOG_LEVEL_NOTICE);
275
281
  return true;
276
282
  }
277
- await this.storage.deleteFiles(journals);
283
+ if (!await this.storage.deleteFiles(journals)) {
284
+ return false;
285
+ }
278
286
  Logger(`${journals.length} items has been deleted!`, LOG_LEVEL_NOTICE);
279
287
  await this.resetCheckpointInfo();
280
288
  return true;
@@ -751,6 +759,11 @@ class JournalSyncCore {
751
759
  requestStop() {
752
760
  this.requestedStop = true;
753
761
  }
762
+ /** Stop this Journal operation owner and release its storage transport. */
763
+ dispose() {
764
+ this.requestStop();
765
+ this.storage.dispose?.();
766
+ }
754
767
  }
755
768
  export {
756
769
  JournalSyncCore
@@ -1,26 +1,55 @@
1
- import { type RemoteDBSettings, type EntryLeaf, type ChunkVersionRange, type NodeData, type RemotePreferredTweakResult } from "../../common/types.js";
1
+ import { type RemoteDBSettings, type ChunkVersionRange, type NodeData, type RemotePreferredTweakResult } from "../../common/types.js";
2
2
  import { JournalSyncCore } from "./JournalSyncCore.js";
3
3
  import { LiveSyncAbstractReplicator, type RemoteDBStatus } from "../LiveSyncAbstractReplicator.js";
4
4
  import { type ENSURE_DB_RESULT } from "../../pouchdb/LiveSyncDBFunctions.js";
5
5
  import type { CheckPointInfo } from "./JournalSyncTypes.js";
6
6
  import type { SimpleStore } from "../../common/utils.js";
7
7
  import type { LiveSyncJournalReplicatorEnv } from "./LiveSyncJournalReplicatorEnv.js";
8
+ import { type CentralCompatibilityDecisionRecorder } from "../CentralCompatibility.js";
9
+ import { type ReplicationOutcome } from "../ReplicatorProvider.js";
8
10
  export declare class LiveSyncJournalReplicator extends LiveSyncAbstractReplicator {
9
11
  env: LiveSyncJournalReplicatorEnv;
10
12
  get client(): JournalSyncCore;
11
13
  get simpleStore(): SimpleStore<CheckPointInfo>;
12
- _client: JournalSyncCore;
14
+ _client?: JournalSyncCore;
15
+ /** Whether this instance has entered a Journal transfer since its last close. */
16
+ private hasEnteredReplication;
17
+ /** Transfers whose settlement must be observed by an admitted Stop request. */
18
+ private activeJournalTransfers?;
19
+ /** Shared settlement for repeated Stop requests at the same boundary. */
20
+ private journalTransferStopSettlement?;
21
+ /** Monotonic fence which prevents a preflight crossing a later Stop boundary. */
22
+ private journalTransferStopGeneration;
13
23
  getReplicationPBKDF2Salt(setting: RemoteDBSettings, refresh?: boolean): Promise<Uint8Array<ArrayBuffer>>;
14
- setupJournalSyncClient(): JournalSyncCore;
15
- ensureBucketIsCompatible(deviceNodeID: string, currentVersionRange: ChunkVersionRange): Promise<ENSURE_DB_RESULT>;
24
+ setupJournalSyncClient(settings?: RemoteDBSettings): JournalSyncCore;
25
+ ensureBucketIsCompatible(deviceNodeID: string, currentVersionRange: ChunkVersionRange, setting?: RemoteDBSettings, client?: Pick<JournalSyncCore, "downloadJsonWithResult" | "getCheckpointInfo" | "uploadJson">): Promise<ENSURE_DB_RESULT>;
16
26
  constructor(env: LiveSyncJournalReplicatorEnv);
17
27
  migrate(from: number, to: number): Promise<boolean>;
18
- terminateSync(): void;
19
- openReplication(setting: RemoteDBSettings, _: boolean, showResult: boolean, ignoreCleanLock?: boolean): Promise<boolean>;
28
+ /**
29
+ * Run one Replicator-owned Journal transfer after any earlier Stop boundary.
30
+ *
31
+ * The client owns transfer mechanics, while this Replicator owns the
32
+ * settlement required by its active-transfer cancellation contract.
33
+ */
34
+ private runJournalTransfer;
35
+ /** Request client cancellation and await the transfers admitted before this Stop boundary. */
36
+ terminateSync(): Promise<void>;
37
+ openReplication(setting: RemoteDBSettings, _: boolean, showResult: boolean, ignoreCleanLock?: boolean, recordCompatibilityDecision?: CentralCompatibilityDecisionRecorder): Promise<boolean>;
38
+ /**
39
+ * Run one finite Journal attempt against one settings-bound borrowed client.
40
+ *
41
+ * Only a rejection observed by this attempt is projected into recovery;
42
+ * unavailable storage and later transport failures do not reuse old state.
43
+ */
44
+ openOneShotReplicationWithOutcome(setting: RemoteDBSettings, showResult: boolean, ignoreCleanLock?: boolean): Promise<ReplicationOutcome>;
45
+ private runDirectionalReplication;
46
+ /** Capture only the compatibility decision made by this exact borrowed client. */
47
+ private runDirectionalReplicationWithOutcome;
20
48
  replicateAllToServer(setting: RemoteDBSettings, showingNotice?: boolean): Promise<boolean>;
49
+ replicateAllToServerWithOutcome(setting: RemoteDBSettings, showingNotice?: boolean): Promise<ReplicationOutcome>;
21
50
  replicateAllFromServer(setting: RemoteDBSettings, showingNotice?: boolean): Promise<boolean>;
22
- checkReplicationConnectivity(skipCheck: boolean, ignoreCleanLock?: boolean, showMessage?: boolean): Promise<boolean>;
23
- fetchRemoteChunks(missingChunks: string[], showResult: boolean): Promise<false | EntryLeaf[]>;
51
+ replicateAllFromServerWithOutcome(setting: RemoteDBSettings, showingNotice?: boolean): Promise<ReplicationOutcome>;
52
+ checkReplicationConnectivity(skipCheck: boolean, ignoreCleanLock?: boolean, showMessage?: boolean, setting?: RemoteDBSettings, client?: JournalSyncCore, recordCompatibilityDecision?: CentralCompatibilityDecisionRecorder): Promise<boolean>;
24
53
  closeReplication(): void;
25
54
  tryResetRemoteDatabase(setting: RemoteDBSettings): Promise<void>;
26
55
  tryCreateRemoteDatabase(setting: RemoteDBSettings): Promise<void>;
@@ -29,9 +58,8 @@ export declare class LiveSyncJournalReplicator extends LiveSyncAbstractReplicato
29
58
  tryConnectRemote(setting: RemoteDBSettings, showResult?: boolean): Promise<boolean>;
30
59
  resetRemoteTweakSettings(setting: RemoteDBSettings): Promise<void>;
31
60
  setPreferredRemoteTweakSettings(setting: RemoteDBSettings): Promise<void>;
32
- getRemotePreferredTweakValues(_setting: RemoteDBSettings): Promise<RemotePreferredTweakResult>;
61
+ getRemotePreferredTweakValues(setting: RemoteDBSettings): Promise<RemotePreferredTweakResult>;
33
62
  getRemoteStatus(setting: RemoteDBSettings): Promise<false | RemoteDBStatus>;
34
- countCompromisedChunks(): Promise<number>;
35
63
  getConnectedDeviceList(setting?: RemoteDBSettings): Promise<false | {
36
64
  node_info: Record<string, NodeData>;
37
65
  accepted_nodes: string[];