applesauce-actions 0.0.0-next-20250312113207 → 0.0.0-next-20250312162115
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/action-hub.d.ts +4 -4
- package/package.json +4 -4
package/dist/action-hub.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IEventStore } from "applesauce-core/event-store";
|
|
2
2
|
import { EventFactory } from "applesauce-factory";
|
|
3
3
|
import { NostrEvent } from "nostr-tools";
|
|
4
4
|
/**
|
|
@@ -9,7 +9,7 @@ export type PublishMethod = (label: string, event: NostrEvent, explicitRelays?:
|
|
|
9
9
|
/** The context that is passed to actions for them to use to preform actions */
|
|
10
10
|
export type ActionContext = {
|
|
11
11
|
/** The event store to load events from */
|
|
12
|
-
events:
|
|
12
|
+
events: IEventStore;
|
|
13
13
|
/** The pubkey of the signer in the event factory */
|
|
14
14
|
self: string;
|
|
15
15
|
/** The event factory used to build and modify events */
|
|
@@ -22,10 +22,10 @@ export type Action<T extends unknown = unknown> = (ctx: ActionContext) => Promis
|
|
|
22
22
|
export type ActionConstructor<Args extends Array<any>, T extends unknown = unknown> = (...args: Args) => Action<T>;
|
|
23
23
|
/** The main class that runs actions */
|
|
24
24
|
export declare class ActionHub {
|
|
25
|
-
events:
|
|
25
|
+
events: IEventStore;
|
|
26
26
|
factory: EventFactory;
|
|
27
27
|
publish: PublishMethod;
|
|
28
|
-
constructor(events:
|
|
28
|
+
constructor(events: IEventStore, factory: EventFactory, publish: PublishMethod);
|
|
29
29
|
protected context: ActionContext | undefined;
|
|
30
30
|
getContext(): Promise<ActionContext>;
|
|
31
31
|
run<Args extends Array<any>, T extends unknown = unknown>(Action: ActionConstructor<Args, T>, ...args: Args): Promise<T>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "applesauce-actions",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20250312162115",
|
|
4
4
|
"description": "A package for performing common nostr actions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"applesauce-core": "0.0.0-next-
|
|
36
|
-
"applesauce-factory": "0.0.0-next-
|
|
35
|
+
"applesauce-core": "0.0.0-next-20250312162115",
|
|
36
|
+
"applesauce-factory": "0.0.0-next-20250312162115",
|
|
37
37
|
"nostr-tools": "^2.10.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/debug": "^4.1.12",
|
|
41
|
-
"applesauce-signers": "0.0.0-next-
|
|
41
|
+
"applesauce-signers": "0.0.0-next-20250312162115",
|
|
42
42
|
"nanoid": "^5.0.9",
|
|
43
43
|
"typescript": "^5.7.3",
|
|
44
44
|
"vitest": "^3.0.5"
|