@oesp/storage-memory 4.0.0 → 5.0.0
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.d.ts +2 -5
- package/dist/index.js +11 -15
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { ReplayStore } from '@oesp/core';
|
|
2
|
-
|
|
3
|
-
declare class MemoryReplayStore implements ReplayStore {
|
|
1
|
+
import type { ReplayStore } from '@oesp/core';
|
|
2
|
+
export declare class MemoryReplayStore implements ReplayStore {
|
|
4
3
|
private seenSet;
|
|
5
4
|
seen(fromDid: string, mid: string): Promise<boolean>;
|
|
6
5
|
markSeen(fromDid: string, mid: string): Promise<void>;
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
export { MemoryReplayStore };
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
MemoryReplayStore
|
|
15
|
-
};
|
|
1
|
+
export class MemoryReplayStore {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.seenSet = new Set();
|
|
4
|
+
}
|
|
5
|
+
async seen(fromDid, mid) {
|
|
6
|
+
return this.seenSet.has(`${fromDid}:${mid}`);
|
|
7
|
+
}
|
|
8
|
+
async markSeen(fromDid, mid) {
|
|
9
|
+
this.seenSet.add(`${fromDid}:${mid}`);
|
|
10
|
+
}
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oesp/storage-memory",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "ReplayStore mémoire",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@oesp/core": "
|
|
25
|
+
"@oesp/core": "5.0.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"tsup": "^8.0.1",
|
|
29
29
|
"typescript": "^5.6.3"
|
|
30
30
|
},
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "
|
|
32
|
+
"build": "tsc -p tsconfig.build.json",
|
|
33
33
|
"lint": "tsc -p tsconfig.json --noEmit"
|
|
34
34
|
}
|
|
35
35
|
}
|