@syncular/tauri 0.15.34 → 0.15.35
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 +5 -1
- package/dist/index.js +2 -9
- package/package.json +3 -3
- package/src/index.ts +4 -8
package/README.md
CHANGED
|
@@ -35,7 +35,11 @@ outbox, and requests a fresh bootstrap while preserving device identity,
|
|
|
35
35
|
lease state, outcomes, and protected bookkeeping. The result contains only
|
|
36
36
|
`alreadyApplied`, `retainedCommits`, and `resetSubscriptions`. It is blocked
|
|
37
37
|
during security preflight and an active schema-floor stop; it is not a sign-out
|
|
38
|
-
or secure-erasure API.
|
|
38
|
+
or secure-erasure API. The JavaScript bridge strictly validates the exact
|
|
39
|
+
acknowledgement shape and non-negative safe-integer counts; version drift or a
|
|
40
|
+
malformed native response fails with the sanitized, stable
|
|
41
|
+
`client.invalid_host_response` code before application recovery state can
|
|
42
|
+
persist it.
|
|
39
43
|
|
|
40
44
|
## Secure preflight and native disposal
|
|
41
45
|
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
// -- Types the bridge speaks (structurally the web-client's) -----------------
|
|
30
30
|
// Most imports stay type-only; the stable preflight error code is shared at
|
|
31
31
|
// runtime so every host surfaces byte-identical policy evidence.
|
|
32
|
-
import { SECURITY_PREFLIGHT_REQUIRED_CODE, withClientDiagnosticsHost, } from '@syncular/client';
|
|
32
|
+
import { decodeLocalDataRebootstrapResult, SECURITY_PREFLIGHT_REQUIRED_CODE, withClientDiagnosticsHost, } from '@syncular/client';
|
|
33
33
|
/** The plugin's Tauri event name — mirror of `tauri-plugin-syncular`. */
|
|
34
34
|
export const SYNCULAR_EVENT = 'syncular://event';
|
|
35
35
|
const PLUGIN = 'plugin:syncular|';
|
|
@@ -371,14 +371,7 @@ export class TauriSyncClient {
|
|
|
371
371
|
}));
|
|
372
372
|
}
|
|
373
373
|
async rebootstrapLocalData(input) {
|
|
374
|
-
|
|
375
|
-
input,
|
|
376
|
-
}));
|
|
377
|
-
return {
|
|
378
|
-
alreadyApplied: result.alreadyApplied,
|
|
379
|
-
retainedCommits: result.retainedCommits,
|
|
380
|
-
resetSubscriptions: result.resetSubscriptions,
|
|
381
|
-
};
|
|
374
|
+
return decodeLocalDataRebootstrapResult(await this.#command('rebootstrapLocalData', { input }));
|
|
382
375
|
}
|
|
383
376
|
/**
|
|
384
377
|
* Replace the native transport's request headers at runtime — the auth
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syncular/tauri",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.35",
|
|
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.35"
|
|
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.35"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/src/index.ts
CHANGED
|
@@ -62,6 +62,7 @@ import type {
|
|
|
62
62
|
// Most imports stay type-only; the stable preflight error code is shared at
|
|
63
63
|
// runtime so every host surfaces byte-identical policy evidence.
|
|
64
64
|
import {
|
|
65
|
+
decodeLocalDataRebootstrapResult,
|
|
65
66
|
SECURITY_PREFLIGHT_REQUIRED_CODE,
|
|
66
67
|
withClientDiagnosticsHost,
|
|
67
68
|
} from '@syncular/client';
|
|
@@ -544,14 +545,9 @@ export class TauriSyncClient {
|
|
|
544
545
|
async rebootstrapLocalData(
|
|
545
546
|
input: LocalDataRebootstrapInput,
|
|
546
547
|
): Promise<LocalDataRebootstrapResult> {
|
|
547
|
-
|
|
548
|
-
input,
|
|
549
|
-
|
|
550
|
-
return {
|
|
551
|
-
alreadyApplied: result.alreadyApplied,
|
|
552
|
-
retainedCommits: result.retainedCommits,
|
|
553
|
-
resetSubscriptions: result.resetSubscriptions,
|
|
554
|
-
};
|
|
548
|
+
return decodeLocalDataRebootstrapResult(
|
|
549
|
+
await this.#command('rebootstrapLocalData', { input }),
|
|
550
|
+
);
|
|
555
551
|
}
|
|
556
552
|
|
|
557
553
|
/**
|