@syncular/tauri 0.15.10 → 0.15.12
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/README.md +8 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -0
- package/package.json +3 -3
- package/src/index.ts +10 -0
package/README.md
CHANGED
|
@@ -20,6 +20,14 @@ are never silently removed by retention. Failed outcomes retain their complete
|
|
|
20
20
|
ordered local operation envelope for authorized aggregate recovery with the
|
|
21
21
|
same protected-storage and retention contract as the core client.
|
|
22
22
|
|
|
23
|
+
The bridge also exposes `purgeLocalData({ purgeId, targets })` with the same
|
|
24
|
+
idempotent transaction as the browser worker: exact synced-row and generated
|
|
25
|
+
FTS deletion, whole-commit outbox rejection, optimistic replay, blob-reference
|
|
26
|
+
reconciliation, and counts-only acknowledgement. The app remains responsible
|
|
27
|
+
for validating the server-authoritative directive, gating subscriptions before
|
|
28
|
+
the purge, deleting app-owned drafts/files, and removing the corresponding key
|
|
29
|
+
from the OS secure store after SQLite cleanup succeeds.
|
|
30
|
+
|
|
23
31
|
Part of [Syncular](https://syncular.dev) — an offline-first sync framework.
|
|
24
32
|
See the [Syncular repository](https://github.com/syncular/syncular) for docs.
|
|
25
33
|
|
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* `invoke`/`listen` either from its ESM entry points, from the ambient
|
|
27
27
|
* `window.__TAURI__`, or via injected doubles (tests).
|
|
28
28
|
*/
|
|
29
|
-
import type { ClientChangeListener, CommitOutcome, CommitOutcomeQuery, ConflictRecord, EncryptionKeyringConfig, InvalidationListener, LeaseState, MutationInput, PresencePeer, QueryReadSpec, QuerySnapshot, RejectionRecord, ResolveCommitOutcomeInput, SchemaFloor, SqlRow, SqlValue, SyncStatusSnapshot, WindowBase, WindowState } from '@syncular/client';
|
|
29
|
+
import type { ClientChangeListener, CommitOutcome, CommitOutcomeQuery, ConflictRecord, EncryptionKeyringConfig, InvalidationListener, LeaseState, LocalDataPurgeInput, LocalDataPurgeResult, MutationInput, PresencePeer, QueryReadSpec, QuerySnapshot, RejectionRecord, ResolveCommitOutcomeInput, SchemaFloor, SqlRow, SqlValue, SyncStatusSnapshot, WindowBase, WindowState } from '@syncular/client';
|
|
30
30
|
/** One event pushed on `syncular://event` (the derived client-observable set). */
|
|
31
31
|
interface SyncularEvent {
|
|
32
32
|
readonly type: string;
|
|
@@ -91,6 +91,7 @@ export declare class TauriSyncClient {
|
|
|
91
91
|
patch(table: string, rowId: string, partial: Readonly<Record<string, unknown>>, options?: {
|
|
92
92
|
readonly baseVersion?: number;
|
|
93
93
|
}): Promise<string>;
|
|
94
|
+
purgeLocalData(input: LocalDataPurgeInput): Promise<LocalDataPurgeResult>;
|
|
94
95
|
/**
|
|
95
96
|
* Replace the native transport's request headers at runtime — the auth
|
|
96
97
|
* rotation path (RFC 0002 §2.3). Pass the FULL header set (it replaces,
|
package/dist/index.js
CHANGED
|
@@ -271,6 +271,11 @@ export class TauriSyncClient {
|
|
|
271
271
|
}));
|
|
272
272
|
return result.clientCommitId;
|
|
273
273
|
}
|
|
274
|
+
async purgeLocalData(input) {
|
|
275
|
+
return (await this.#command('purgeLocalData', {
|
|
276
|
+
input,
|
|
277
|
+
}));
|
|
278
|
+
}
|
|
274
279
|
/**
|
|
275
280
|
* Replace the native transport's request headers at runtime — the auth
|
|
276
281
|
* rotation path (RFC 0002 §2.3). Pass the FULL header set (it replaces,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/tauri",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.12",
|
|
4
4
|
"description": "Tauri integration for the Syncular client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Benjamin Kniffler",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"test": "bun test"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@syncular/client": "0.15.
|
|
51
|
+
"@syncular/client": "0.15.12"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@tauri-apps/api": ">=2.0.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@syncular/react": "0.15.
|
|
57
|
+
"@syncular/react": "0.15.12"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/src/index.ts
CHANGED
|
@@ -40,6 +40,8 @@ import type {
|
|
|
40
40
|
InvalidationEvent,
|
|
41
41
|
InvalidationListener,
|
|
42
42
|
LeaseState,
|
|
43
|
+
LocalDataPurgeInput,
|
|
44
|
+
LocalDataPurgeResult,
|
|
43
45
|
MutationInput,
|
|
44
46
|
PresencePeer,
|
|
45
47
|
QueryReadSpec,
|
|
@@ -402,6 +404,14 @@ export class TauriSyncClient {
|
|
|
402
404
|
return result.clientCommitId;
|
|
403
405
|
}
|
|
404
406
|
|
|
407
|
+
async purgeLocalData(
|
|
408
|
+
input: LocalDataPurgeInput,
|
|
409
|
+
): Promise<LocalDataPurgeResult> {
|
|
410
|
+
return (await this.#command('purgeLocalData', {
|
|
411
|
+
input,
|
|
412
|
+
})) as LocalDataPurgeResult;
|
|
413
|
+
}
|
|
414
|
+
|
|
405
415
|
/**
|
|
406
416
|
* Replace the native transport's request headers at runtime — the auth
|
|
407
417
|
* rotation path (RFC 0002 §2.3). Pass the FULL header set (it replaces,
|