applesauce-relay 0.0.0-next-20250423145737 → 0.0.0-next-20250423151245
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/operators/index.js
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IEventStore } from "applesauce-core";
|
|
2
|
+
import { MonoTypeOperatorFunction } from "rxjs";
|
|
3
|
+
import { SubscriptionResponse } from "../types.js";
|
|
4
|
+
/** Sends all events to the event store */
|
|
5
|
+
export declare function storeEvents(eventStore: IEventStore): MonoTypeOperatorFunction<SubscriptionResponse>;
|
|
@@ -2,5 +2,5 @@ import { OperatorFunction } from "rxjs";
|
|
|
2
2
|
import { IEventStore } from "applesauce-core";
|
|
3
3
|
import { NostrEvent } from "nostr-tools";
|
|
4
4
|
import { SubscriptionResponse } from "../types.js";
|
|
5
|
-
/** Adds all events to event store and returns a deduplicated timeline */
|
|
5
|
+
/** Adds all events to event store and returns a deduplicated timeline when EOSE is received */
|
|
6
6
|
export declare function toEventStore(eventStore: IEventStore): OperatorFunction<SubscriptionResponse, NostrEvent[]>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { scan } from "rxjs";
|
|
2
|
-
import { completeOnEose } from "./complete-on-eose.js";
|
|
3
2
|
import { insertEventIntoDescendingList } from "nostr-tools/utils";
|
|
4
|
-
|
|
3
|
+
import { completeOnEose } from "./complete-on-eose.js";
|
|
4
|
+
/** Adds all events to event store and returns a deduplicated timeline when EOSE is received */
|
|
5
5
|
export function toEventStore(eventStore) {
|
|
6
6
|
return (source) => source.pipe(
|
|
7
7
|
// Complete when there are not events
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "applesauce-relay",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250423151245",
|
|
4
4
|
"description": "nostr relay communication framework built on rxjs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
56
|
"@noble/hashes": "^1.7.1",
|
|
57
|
-
"applesauce-core": "0.0.0-next-
|
|
57
|
+
"applesauce-core": "0.0.0-next-20250423151245",
|
|
58
58
|
"nanoid": "^5.0.9",
|
|
59
59
|
"nostr-tools": "^2.10.4",
|
|
60
60
|
"rxjs": "^7.8.1"
|