@roc-db/indexed-db 0.2.0-pre.37 → 0.2.0-pre.39
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.js
CHANGED
|
@@ -194,8 +194,7 @@ var getChangeSetMutations = async (txn, changeSetRef) => {
|
|
|
194
194
|
});
|
|
195
195
|
};
|
|
196
196
|
// src/functions/findDebounceMutation.ts
|
|
197
|
-
var findDebounceMutation = async (request, engine, now) => {
|
|
198
|
-
const mutationName = request.schema.shape.name.value;
|
|
197
|
+
var findDebounceMutation = async (request, engine, now, mutationName) => {
|
|
199
198
|
const objectStore = engine.txn.objectStore("mutations");
|
|
200
199
|
const index = objectStore.index("timestamp");
|
|
201
200
|
const timestamp = new Date(now - request.settings.debounce * 1000).toISOString();
|
|
@@ -207,7 +206,7 @@ var findDebounceMutation = async (request, engine, now) => {
|
|
|
207
206
|
const cursor = idbRequest.result;
|
|
208
207
|
if (cursor) {
|
|
209
208
|
const doc = cursor.value;
|
|
210
|
-
if (doc.name === mutationName && doc.payload.ref === request.payload.ref && doc.changeSetRef === request.changeSetRef) {
|
|
209
|
+
if (doc.operation.name === mutationName && doc.payload.ref === request.payload.ref && doc.changeSetRef === request.changeSetRef) {
|
|
211
210
|
results.push(doc);
|
|
212
211
|
}
|
|
213
212
|
cursor.continue();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { WriteRequest } from "roc-db";
|
|
2
2
|
import type { IndexedDBEngine } from "../types/IndexedDBEngine";
|
|
3
|
-
export declare const findDebounceMutation: (request: WriteRequest, engine: IndexedDBEngine, now: number) => Promise<unknown>;
|
|
3
|
+
export declare const findDebounceMutation: (request: WriteRequest, engine: IndexedDBEngine, now: number, mutationName: string) => Promise<unknown>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roc-db/indexed-db",
|
|
3
|
-
"version": "0.2.0-pre.
|
|
3
|
+
"version": "0.2.0-pre.39",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"dependencies": {},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"roc-db": "0.2.0-pre.
|
|
17
|
+
"roc-db": "0.2.0-pre.39",
|
|
18
18
|
"zod": "^3.0.0"
|
|
19
19
|
},
|
|
20
20
|
"keywords": [],
|