abxbus 2.4.1 → 2.4.15

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.
@@ -112,14 +112,12 @@ export declare class EventBus {
112
112
  eventIsParentOf(parent_event: BaseEvent, child_event: BaseEvent): boolean;
113
113
  logTree(): string;
114
114
  findEventById(event_id: string): BaseEvent | null;
115
- _getParentEventResultAcrossAllBuses(event: BaseEvent): EventResult | null;
116
115
  private _startRunloop;
117
116
  private _processEvent;
118
117
  _processEventImmediately<T extends BaseEvent>(event: T, handler_result?: EventResult): Promise<T>;
119
118
  private _processEventImmediatelyAcrossBuses;
120
119
  private _runloop;
121
120
  _hasProcessedEvent(event: BaseEvent): boolean;
122
- private _resolveImplicitParentHandlerResult;
123
121
  _getEventProxyScopedToThisBus<T extends BaseEvent>(event: T, handler_result?: EventResult): T;
124
122
  private _resolveFindWaiters;
125
123
  _getHandlersForEvent(event: BaseEvent): EventHandler[];
@@ -54,7 +54,7 @@ export declare class LockManager {
54
54
  _waitUntilRunloopResumed(): Promise<void>;
55
55
  _isPaused(): boolean;
56
56
  _runWithHandlerDispatchContext<T>(result: EventResult, fn: () => Promise<T>): Promise<T>;
57
- _getActiveHandlerResult(): EventResult | undefined;
57
+ _getActiveHandlerResultForCurrentAsyncContext(): EventResult | undefined;
58
58
  _getActiveHandlerResults(): EventResult[];
59
59
  _isAnyHandlerActive(): boolean;
60
60
  waitForIdle(timeout_seconds?: number | null): Promise<boolean>;
@@ -1,3 +1,4 @@
1
+ type SemaphoreScope = 'multiprocess' | 'global' | 'class' | 'instance';
1
2
  export interface RetryOptions {
2
3
  /** Total number of attempts including the initial call (1 = no retry, 3 = up to 2 retries). Default: 1 */
3
4
  max_attempts?: number;
@@ -19,11 +20,12 @@ export interface RetryOptions {
19
20
  /** If true, proceed without concurrency limit when semaphore acquisition times out. Default: true */
20
21
  semaphore_lax?: boolean;
21
22
  /** Semaphore scoping strategy. Default: 'global'
23
+ * - 'multiprocess': all processes on the machine share one semaphore (Node.js only)
22
24
  * - 'global': all calls share one semaphore (keyed by semaphore_name)
23
25
  * - 'class': all instances of the same class share one semaphore (keyed by className.semaphore_name)
24
26
  * - 'instance': each object instance gets its own semaphore (keyed by instanceId.semaphore_name)
25
27
  * 'class' and 'instance' require `this` to be an object; they fall back to 'global' for standalone calls. */
26
- semaphore_scope?: 'global' | 'class' | 'instance';
28
+ semaphore_scope?: SemaphoreScope;
27
29
  /** Maximum seconds to wait for semaphore acquisition. Default: undefined → timeout * max(1, limit - 1) */
28
30
  semaphore_timeout?: number | null;
29
31
  }
@@ -50,3 +52,4 @@ export declare class SemaphoreTimeoutError extends Error {
50
52
  /** Reset the global semaphore registry. Useful in tests. */
51
53
  export declare function clearSemaphoreRegistry(): void;
52
54
  export declare function retry(options?: RetryOptions): <T extends (...args: any[]) => any>(target: T, _context?: ClassMethodDecoratorContext) => T;
55
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abxbus",
3
- "version": "2.4.1",
3
+ "version": "2.4.15",
4
4
  "description": "Event bus library for browsers and ESM Node.js",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -46,11 +46,11 @@
46
46
  },
47
47
  "repository": {
48
48
  "type": "git",
49
- "url": "git+https://github.com/ArchiveBox/abx-bus.git",
49
+ "url": "git+https://github.com/ArchiveBox/abxbus.git",
50
50
  "directory": "abxbus-ts"
51
51
  },
52
52
  "bugs": {
53
- "url": "https://github.com/ArchiveBox/abx-bus/issues"
53
+ "url": "https://github.com/ArchiveBox/abxbus/issues"
54
54
  },
55
55
  "homepage": "https://abxbus.archivebox.io",
56
56
  "publishConfig": {