@syncular/tauri 0.25.1 → 0.26.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 CHANGED
@@ -55,6 +55,12 @@ export interface TauriSyncClientConfig {
55
55
  readonly clientId?: string;
56
56
  /** §4.2 client limits, forwarded to the native `create`. */
57
57
  readonly limits?: Record<string, unknown>;
58
+ /**
59
+ * SPEC §8.8 realtime policy, forwarded to the native `create`. Absent ⇒
60
+ * `optional`. `required` refuses a sync round while the socket is not
61
+ * connected instead of falling back to HTTP.
62
+ */
63
+ readonly realtimePolicy?: SyncClientConfig['realtimePolicy'];
58
64
  /**
59
65
  * Portable E2EE keys and declarative per-row key-id columns. Raw keys are
60
66
  * encoded into the native command envelope and never sent to the server.
package/dist/index.js CHANGED
@@ -707,6 +707,9 @@ export async function createTauriSyncClient(config) {
707
707
  ...(config.clientId !== undefined ? { clientId: config.clientId } : {}),
708
708
  schema: config.schema,
709
709
  ...(config.limits !== undefined ? { limits: config.limits } : {}),
710
+ ...(config.realtimePolicy !== undefined
711
+ ? { realtimePolicy: config.realtimePolicy }
712
+ : {}),
710
713
  ...(config.encryption !== undefined
711
714
  ? { encryption: encodeEncryption(config.encryption) }
712
715
  : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/tauri",
3
- "version": "0.25.1",
3
+ "version": "0.26.0",
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.25.1"
51
+ "@syncular/client": "0.26.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@tauri-apps/api": ">=2.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@syncular/react": "0.25.1"
57
+ "@syncular/react": "0.26.0"
58
58
  }
59
59
  }
package/src/index.ts CHANGED
@@ -116,6 +116,12 @@ export interface TauriSyncClientConfig {
116
116
  readonly clientId?: string;
117
117
  /** §4.2 client limits, forwarded to the native `create`. */
118
118
  readonly limits?: Record<string, unknown>;
119
+ /**
120
+ * SPEC §8.8 realtime policy, forwarded to the native `create`. Absent ⇒
121
+ * `optional`. `required` refuses a sync round while the socket is not
122
+ * connected instead of falling back to HTTP.
123
+ */
124
+ readonly realtimePolicy?: SyncClientConfig['realtimePolicy'];
119
125
  /**
120
126
  * Portable E2EE keys and declarative per-row key-id columns. Raw keys are
121
127
  * encoded into the native command envelope and never sent to the server.
@@ -1040,6 +1046,9 @@ export async function createTauriSyncClient(
1040
1046
  ...(config.clientId !== undefined ? { clientId: config.clientId } : {}),
1041
1047
  schema: config.schema,
1042
1048
  ...(config.limits !== undefined ? { limits: config.limits } : {}),
1049
+ ...(config.realtimePolicy !== undefined
1050
+ ? { realtimePolicy: config.realtimePolicy }
1051
+ : {}),
1043
1052
  ...(config.encryption !== undefined
1044
1053
  ? { encryption: encodeEncryption(config.encryption) }
1045
1054
  : {}),