fix: event publication

This commit is contained in:
Alejandro Gómez
2025-12-21 21:50:09 +01:00
parent 64212121bd
commit fc63b3c685
10 changed files with 47 additions and 33 deletions

View File

@@ -35,7 +35,9 @@ export interface PublishSpellbookOptions {
* @example
* ```typescript
* // Publish via ActionHub with proper side-effect handling
* for await (const event of hub.exec(PublishSpellbook, options)) {
* const event = await lastValueFrom(hub.exec(PublishSpellbook, options));
* if (event) {
* await publishEvent(event);
* // Only mark as published AFTER successful relay publish
* await markSpellbookPublished(localId, event as SpellbookEvent);
* }