@signaldb/sync 2.0.0-beta.2 → 2.0.0-beta.21
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/SyncManager.d.ts +5 -5
- package/dist/applyChanges.d.ts +2 -2
- package/dist/computeChanges.d.ts +1 -1
- package/dist/getSnapshot.d.ts +2 -2
- package/dist/index.mjs +532 -597
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +3 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/sync.d.ts +2 -2
- package/dist/types.d.ts +1 -1
- package/package.json +2 -2
package/dist/SyncManager.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import type { Change, LoadResponse, Snapshot, SyncOperation } from './types';
|
|
1
|
+
import { BaseItem, DataAdapter, ReactivityAdapter, Changeset, Collection } from '@signaldb/core';
|
|
2
|
+
import { default as PromiseQueue } from './utils/PromiseQueue';
|
|
3
|
+
import { Change, LoadResponse, Snapshot, SyncOperation } from './types';
|
|
5
4
|
type SyncOptions<T extends Record<string, any>> = {
|
|
6
5
|
name: string;
|
|
7
6
|
} & T;
|
|
@@ -153,7 +152,8 @@ export default class SyncManager<CollectionOptions extends Record<string, any>,
|
|
|
153
152
|
* @param [async] If true, it will check for active syncs in the database. This is useful if you have multiple instances of the application running.
|
|
154
153
|
* @returns True if the collection is currently beeing synced, false otherwise. If async is true, it will return a promise that resolves to true or false.
|
|
155
154
|
*/
|
|
156
|
-
isSyncing
|
|
155
|
+
isSyncing(name: string | undefined, async: true): Promise<boolean>;
|
|
156
|
+
isSyncing(name?: string, async?: false): boolean;
|
|
157
157
|
/**
|
|
158
158
|
* Checks if the sync manager is ready to sync.
|
|
159
159
|
* @returns A promise that resolves when the sync manager is ready to sync.
|
package/dist/applyChanges.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { BaseItem } from '@signaldb/core';
|
|
2
|
+
import { Change } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* applies changes to a collection of items
|
|
5
5
|
* @param items The items to apply the changes to
|
package/dist/computeChanges.d.ts
CHANGED
package/dist/getSnapshot.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { BaseItem } from '@signaldb/core';
|
|
2
|
+
import { LoadResponse } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Gets the snapshot of items from the last snapshot and the changes.
|
|
5
5
|
* @param lastSnapshot The last snapshot of items
|