@syncular/tauri 0.41.2 → 0.42.0
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.
- package/dist/index.d.ts +6 -0
- package/dist/index.js +9 -0
- package/package.json +4 -4
- package/src/index.ts +12 -0
package/dist/index.d.ts
CHANGED
|
@@ -223,6 +223,12 @@ export declare class TauriSyncClient implements PromiseMethods<ClientSnapshotMet
|
|
|
223
223
|
setWindow(base: WindowBase, units: readonly string[]): Promise<void>;
|
|
224
224
|
windowState(base: WindowBase): Promise<WindowState>;
|
|
225
225
|
sync(): Promise<unknown>;
|
|
226
|
+
/**
|
|
227
|
+
* Rotate the client id (§1.5) after a `sync.invalid_client_id` refusal
|
|
228
|
+
* (`recommendedAction: resetClientId`). The next round carries the new id;
|
|
229
|
+
* the replica and outbox stay in place.
|
|
230
|
+
*/
|
|
231
|
+
resetClientId(): Promise<string>;
|
|
226
232
|
syncUntilIdle(maxRounds?: number): Promise<unknown>;
|
|
227
233
|
conflicts(): Promise<readonly ConflictRecord[]>;
|
|
228
234
|
rejections(): Promise<readonly RejectionRecord[]>;
|
package/dist/index.js
CHANGED
|
@@ -687,6 +687,15 @@ export class TauriSyncClient {
|
|
|
687
687
|
async sync() {
|
|
688
688
|
return this.#command('sync', {});
|
|
689
689
|
}
|
|
690
|
+
/**
|
|
691
|
+
* Rotate the client id (§1.5) after a `sync.invalid_client_id` refusal
|
|
692
|
+
* (`recommendedAction: resetClientId`). The next round carries the new id;
|
|
693
|
+
* the replica and outbox stay in place.
|
|
694
|
+
*/
|
|
695
|
+
async resetClientId() {
|
|
696
|
+
const result = (await this.#command('resetClientId', {}));
|
|
697
|
+
return result.clientId;
|
|
698
|
+
}
|
|
690
699
|
async syncUntilIdle(maxRounds) {
|
|
691
700
|
return this.#command('syncUntilIdle', {
|
|
692
701
|
...(maxRounds !== undefined ? { maxRounds } : {}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/tauri",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.0",
|
|
4
4
|
"description": "Tauri integration for the Syncular client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Benjamin Kniffler",
|
|
@@ -56,13 +56,13 @@
|
|
|
56
56
|
"test": "bun test"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@syncular/client": "0.
|
|
59
|
+
"@syncular/client": "0.42.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"@tauri-apps/api": ">=2.0.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@syncular/react": "0.
|
|
66
|
-
"@syncular/server": "0.
|
|
65
|
+
"@syncular/react": "0.42.0",
|
|
66
|
+
"@syncular/server": "0.42.0"
|
|
67
67
|
}
|
|
68
68
|
}
|
package/src/index.ts
CHANGED
|
@@ -1101,6 +1101,18 @@ export class TauriSyncClient implements PromiseMethods<ClientSnapshotMethods> {
|
|
|
1101
1101
|
return this.#command('sync', {});
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
|
+
/**
|
|
1105
|
+
* Rotate the client id (§1.5) after a `sync.invalid_client_id` refusal
|
|
1106
|
+
* (`recommendedAction: resetClientId`). The next round carries the new id;
|
|
1107
|
+
* the replica and outbox stay in place.
|
|
1108
|
+
*/
|
|
1109
|
+
async resetClientId(): Promise<string> {
|
|
1110
|
+
const result = (await this.#command('resetClientId', {})) as {
|
|
1111
|
+
clientId: string;
|
|
1112
|
+
};
|
|
1113
|
+
return result.clientId;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1104
1116
|
async syncUntilIdle(maxRounds?: number): Promise<unknown> {
|
|
1105
1117
|
return this.#command('syncUntilIdle', {
|
|
1106
1118
|
...(maxRounds !== undefined ? { maxRounds } : {}),
|