applesauce-actions 0.0.0-next-20250323173930 → 0.0.0-next-20250327153627

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.
@@ -1,6 +1,6 @@
1
1
  import { Observable } from "rxjs";
2
2
  import { NostrEvent } from "nostr-tools";
3
- import { IEventStore } from "applesauce-core/event-store";
3
+ import { ISyncEventStore } from "applesauce-core/event-store";
4
4
  import { EventFactory } from "applesauce-factory";
5
5
  /**
6
6
  * A callback used to tell the upstream app to publish an event
@@ -10,7 +10,7 @@ export type PublishMethod = (event: NostrEvent) => void | Promise<void>;
10
10
  /** The context that is passed to actions for them to use to preform actions */
11
11
  export type ActionContext = {
12
12
  /** The event store to load events from */
13
- events: IEventStore;
13
+ events: ISyncEventStore;
14
14
  /** The pubkey of the signer in the event factory */
15
15
  self: string;
16
16
  /** The event factory used to build and modify events */
@@ -21,10 +21,10 @@ export type Action = (ctx: ActionContext) => Observable<NostrEvent> | AsyncGener
21
21
  export type ActionConstructor<Args extends Array<any>> = (...args: Args) => Action;
22
22
  /** The main class that runs actions */
23
23
  export declare class ActionHub {
24
- events: IEventStore;
24
+ events: ISyncEventStore;
25
25
  factory: EventFactory;
26
26
  publish?: PublishMethod | undefined;
27
- constructor(events: IEventStore, factory: EventFactory, publish?: PublishMethod | undefined);
27
+ constructor(events: ISyncEventStore, factory: EventFactory, publish?: PublishMethod | undefined);
28
28
  protected context: ActionContext | undefined;
29
29
  protected getContext(): Promise<ActionContext>;
30
30
  /** Runs an action in a ActionContext and converts the result to an Observable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "applesauce-actions",
3
- "version": "0.0.0-next-20250323173930",
3
+ "version": "0.0.0-next-20250327153627",
4
4
  "description": "A package for performing common nostr actions",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -32,15 +32,15 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "applesauce-core": "^0.12.0",
36
- "applesauce-factory": "^0.12.0",
35
+ "applesauce-core": "0.0.0-next-20250327153627",
36
+ "applesauce-factory": "0.0.0-next-20250327153627",
37
37
  "nostr-tools": "^2.10.4",
38
38
  "rxjs": "^7.8.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@hirez_io/observer-spy": "^2.2.0",
42
42
  "@types/debug": "^4.1.12",
43
- "applesauce-signers": "0.0.0-next-20250323173930",
43
+ "applesauce-signers": "0.0.0-next-20250327153627",
44
44
  "nanoid": "^5.0.9",
45
45
  "typescript": "^5.7.3",
46
46
  "vitest": "^3.0.5"