@anfenn/dync 1.0.1 → 1.0.2
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/{chunk-LGHOZECP.js → chunk-66PSQW4D.js} +120 -120
- package/dist/chunk-66PSQW4D.js.map +1 -0
- package/dist/index.cjs +119 -119
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{index.shared-YSn6c01d.d.cts → index.shared-BGwvMH8f.d.cts} +3 -3
- package/dist/{index.shared-CPIge2ZM.d.ts → index.shared-CkYsQYyn.d.ts} +3 -3
- package/dist/react/index.cjs +119 -119
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.js +1 -1
- package/package.json +1 -4
- package/src/core/StateManager.ts +15 -15
- package/src/core/firstLoad.ts +27 -27
- package/src/core/pullOperations.ts +28 -28
- package/src/core/pushOperations.ts +41 -41
- package/src/core/tableEnhancers.ts +9 -9
- package/src/index.shared.ts +3 -3
- package/src/types.ts +3 -3
- package/dist/chunk-LGHOZECP.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-
|
|
1
|
+
export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-BGwvMH8f.cjs';
|
|
2
2
|
export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-Bv-fV10P.cjs';
|
|
3
3
|
export { S as SQLiteDatabaseDriver, b as SQLiteQueryResult, a as SQLiteRunResult } from './types-CSbIAfu2.cjs';
|
|
4
4
|
import 'dexie';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-
|
|
1
|
+
export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-CkYsQYyn.js';
|
|
2
2
|
export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-DJFApKsM.js';
|
|
3
3
|
export { S as SQLiteDatabaseDriver, b as SQLiteQueryResult, a as SQLiteRunResult } from './types-CSbIAfu2.js';
|
|
4
4
|
import 'dexie';
|
package/dist/index.js
CHANGED
|
@@ -79,7 +79,7 @@ interface BatchSync {
|
|
|
79
79
|
}
|
|
80
80
|
type MissingRemoteRecordStrategy = 'ignore' | 'delete-local-record' | 'insert-remote-record';
|
|
81
81
|
type ConflictResolutionStrategy = 'local-wins' | 'remote-wins' | 'try-shallow-merge';
|
|
82
|
-
type AfterRemoteAddCallback = (
|
|
82
|
+
type AfterRemoteAddCallback = (tableName: string, item: SyncedRecord) => void;
|
|
83
83
|
type MissingRemoteRecordDuringUpdateCallback = (strategy: MissingRemoteRecordStrategy, item: SyncedRecord) => void;
|
|
84
84
|
interface SyncOptions {
|
|
85
85
|
syncInterval?: number;
|
|
@@ -129,7 +129,7 @@ declare enum SyncAction {
|
|
|
129
129
|
}
|
|
130
130
|
interface PendingChange {
|
|
131
131
|
action: SyncAction;
|
|
132
|
-
|
|
132
|
+
tableName: string;
|
|
133
133
|
localId: string;
|
|
134
134
|
id?: any;
|
|
135
135
|
version: number;
|
|
@@ -138,7 +138,7 @@ interface PendingChange {
|
|
|
138
138
|
after?: any;
|
|
139
139
|
}
|
|
140
140
|
interface Conflict {
|
|
141
|
-
|
|
141
|
+
tableName: string;
|
|
142
142
|
fields: FieldConflict[];
|
|
143
143
|
}
|
|
144
144
|
interface FieldConflict {
|
|
@@ -79,7 +79,7 @@ interface BatchSync {
|
|
|
79
79
|
}
|
|
80
80
|
type MissingRemoteRecordStrategy = 'ignore' | 'delete-local-record' | 'insert-remote-record';
|
|
81
81
|
type ConflictResolutionStrategy = 'local-wins' | 'remote-wins' | 'try-shallow-merge';
|
|
82
|
-
type AfterRemoteAddCallback = (
|
|
82
|
+
type AfterRemoteAddCallback = (tableName: string, item: SyncedRecord) => void;
|
|
83
83
|
type MissingRemoteRecordDuringUpdateCallback = (strategy: MissingRemoteRecordStrategy, item: SyncedRecord) => void;
|
|
84
84
|
interface SyncOptions {
|
|
85
85
|
syncInterval?: number;
|
|
@@ -129,7 +129,7 @@ declare enum SyncAction {
|
|
|
129
129
|
}
|
|
130
130
|
interface PendingChange {
|
|
131
131
|
action: SyncAction;
|
|
132
|
-
|
|
132
|
+
tableName: string;
|
|
133
133
|
localId: string;
|
|
134
134
|
id?: any;
|
|
135
135
|
version: number;
|
|
@@ -138,7 +138,7 @@ interface PendingChange {
|
|
|
138
138
|
after?: any;
|
|
139
139
|
}
|
|
140
140
|
interface Conflict {
|
|
141
|
-
|
|
141
|
+
tableName: string;
|
|
142
142
|
fields: FieldConflict[];
|
|
143
143
|
}
|
|
144
144
|
interface FieldConflict {
|