@roc-db/in-memory 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
|
@@ -67,12 +67,11 @@ var commit = (txn, mutation, { created, updated, deleted }) => {
|
|
|
67
67
|
return mutation;
|
|
68
68
|
};
|
|
69
69
|
// src/functions/findDebounceMutation.ts
|
|
70
|
-
var findDebounceMutation = (request, engine, now) => {
|
|
70
|
+
var findDebounceMutation = (request, engine, now, mutationName) => {
|
|
71
71
|
const debounceTime = request.settings.debounce;
|
|
72
|
-
const mutationName = request.schema.shape.name.value;
|
|
73
72
|
const thresholdTime = new Date(now - debounceTime * 1000).toISOString();
|
|
74
73
|
const res = engine.mutations.values().find((mutation) => {
|
|
75
|
-
if (mutation.name === mutationName && mutation.timestamp > thresholdTime && mutation.payload.ref === request.payload.ref) {
|
|
74
|
+
if (mutation.operation.name === mutationName && mutation.timestamp > thresholdTime && mutation.payload.ref === request.payload.ref) {
|
|
76
75
|
return true;
|
|
77
76
|
}
|
|
78
77
|
});
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { WriteOperation } from "roc-db";
|
|
2
2
|
import type { InMemoryEngine } from "../types/InMemoryEngine";
|
|
3
|
-
export declare const findDebounceMutation: (request: WriteOperation, engine: InMemoryEngine, now: any) => import("roc-db").Mutation | undefined;
|
|
3
|
+
export declare const findDebounceMutation: (request: WriteOperation, engine: InMemoryEngine, now: any, mutationName: string) => import("roc-db").Mutation | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roc-db/in-memory",
|
|
3
|
-
"version": "0.2.0-pre.
|
|
3
|
+
"version": "0.2.0-pre.39",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
],
|
|
14
14
|
"sideEffects": false,
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"roc-db": "0.2.0-pre.
|
|
16
|
+
"roc-db": "0.2.0-pre.39",
|
|
17
17
|
"zod": "^3.0.0"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [],
|