@anfenn/dync 1.0.2 → 1.0.4
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 +33 -15
- package/dist/{chunk-66PSQW4D.js → chunk-PCA4XM2N.js} +17 -17
- package/dist/chunk-PCA4XM2N.js.map +1 -0
- package/dist/{dexie-Bv-fV10P.d.cts → dexie-1_xyU5MV.d.cts} +41 -38
- package/dist/{dexie-DJFApKsM.d.ts → dexie-ChZ0o0Sz.d.ts} +41 -38
- package/dist/dexie.cjs +40 -40
- package/dist/dexie.cjs.map +1 -1
- package/dist/dexie.d.cts +1 -1
- package/dist/dexie.d.ts +1 -1
- package/dist/dexie.js +40 -40
- package/dist/dexie.js.map +1 -1
- package/dist/index.cjs +16 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{index.shared-CkYsQYyn.d.ts → index.shared-Byhq6TyU.d.ts} +1 -1
- package/dist/{index.shared-BGwvMH8f.d.cts → index.shared-DsDBNWlz.d.cts} +1 -1
- package/dist/react/index.cjs +2 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +2 -2
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.js +1 -1
- package/package.json +9 -1
- package/src/core/tableEnhancers.ts +17 -17
- package/src/storage/dexie/DexieAdapter.ts +2 -2
- package/src/storage/dexie/{DexieStorageCollection.ts → DexieCollection.ts} +12 -12
- package/src/storage/dexie/DexieTable.ts +123 -0
- package/src/storage/dexie/{DexieStorageWhereClause.ts → DexieWhereClause.ts} +21 -21
- package/src/storage/dexie/index.ts +3 -3
- package/src/storage/memory/MemoryTable.ts +40 -40
- package/src/storage/sqlite/SQLiteTable.ts +34 -36
- package/src/storage/types.ts +22 -19
- package/dist/chunk-66PSQW4D.js.map +0 -1
- package/src/storage/dexie/DexieStorageTable.ts +0 -123
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-
|
|
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-DsDBNWlz.cjs';
|
|
2
|
+
export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-1_xyU5MV.cjs';
|
|
3
3
|
export { S as SQLiteDatabaseDriver, b as SQLiteQueryResult, a as SQLiteRunResult } from './types-CSbIAfu2.cjs';
|
|
4
4
|
import 'dexie';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-
|
|
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-Byhq6TyU.js';
|
|
2
|
+
export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-ChZ0o0Sz.js';
|
|
3
3
|
export { S as SQLiteDatabaseDriver, b as SQLiteQueryResult, a as SQLiteRunResult } from './types-CSbIAfu2.js';
|
|
4
4
|
import 'dexie';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as StorageTable, c as StorageAdapter, T as TableSchemaDefinition, D as DexieQueryContext, b as SqliteQueryContext, a as MemoryQueryContext } from './dexie-
|
|
1
|
+
import { d as StorageTable, c as StorageAdapter, T as TableSchemaDefinition, D as DexieQueryContext, b as SqliteQueryContext, a as MemoryQueryContext } from './dexie-ChZ0o0Sz.js';
|
|
2
2
|
import { c as SQLiteVersionConfigurator } from './types-CSbIAfu2.js';
|
|
3
3
|
|
|
4
4
|
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { d as StorageTable, c as StorageAdapter, T as TableSchemaDefinition, D as DexieQueryContext, b as SqliteQueryContext, a as MemoryQueryContext } from './dexie-
|
|
1
|
+
import { d as StorageTable, c as StorageAdapter, T as TableSchemaDefinition, D as DexieQueryContext, b as SqliteQueryContext, a as MemoryQueryContext } from './dexie-1_xyU5MV.cjs';
|
|
2
2
|
import { c as SQLiteVersionConfigurator } from './types-CSbIAfu2.cjs';
|
|
3
3
|
|
|
4
4
|
type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
|
package/dist/react/index.cjs
CHANGED
|
@@ -504,7 +504,7 @@ function enhanceSyncTable({ table, tableName, withTransaction, state, enhancedTa
|
|
|
504
504
|
}
|
|
505
505
|
};
|
|
506
506
|
const wrappedBulkAdd = async (items) => {
|
|
507
|
-
if (items.length === 0) return;
|
|
507
|
+
if (items.length === 0) return [];
|
|
508
508
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
509
509
|
const syncedItems = items.map((item) => {
|
|
510
510
|
const localId = item._localId || createLocalId();
|
|
@@ -532,7 +532,7 @@ function enhanceSyncTable({ table, tableName, withTransaction, state, enhancedTa
|
|
|
532
532
|
return result;
|
|
533
533
|
};
|
|
534
534
|
const wrappedBulkPut = async (items) => {
|
|
535
|
-
if (items.length === 0) return;
|
|
535
|
+
if (items.length === 0) return [];
|
|
536
536
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
537
537
|
const syncedItems = items.map((item) => {
|
|
538
538
|
const localId = item._localId || createLocalId();
|