New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@galaxy-stack/orbit-event-bus

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@galaxy-stack/orbit-event-bus

In-process event bus for Orbit — @OnEvent decorators, wildcards, priorities, sync/async emission

latest
Source
npmnpm
Version
0.7.1
Version published
Maintainers
1
Created
Source

@galaxy-stack/orbit-event-bus

In-process event bus for Orbit — @OnEvent decorators, wildcard patterns, priorities, sync/async emission.

npm version License: MIT

Part of the Orbit framework — a NestJS-style backend framework for Bun.

Installation

bun add @galaxy-stack/orbit-event-bus

Usage

import { EventBusModule, EventBus, OnEvent, Injectable, Module } from '@galaxy-stack/orbit-event-bus';

@Injectable()
export class UserHandlers {
  @OnEvent('user.created')
  onCreated(payload: { id: string }) { /* ... */ }

  @OnEvent('order.**')   // any depth under order.*
  async onOrderEvent(payload: any, event: string) { /* ... */ }
}

@Module({
  imports: [EventBusModule.forRoot({ handlers: [new UserHandlers()] })],
})
export class AppModule {}

// anywhere with DI:
constructor(private bus: EventBus) {}
await this.bus.emitAsync('user.created', { id: 'u1' });

Features: exact + wildcard matching (user.* one segment, user.** any depth), priority ordering, once handlers, error isolation (or throwErrors: true).

License

MIT

FAQs

Package last updated on 26 Sep 2026

Related posts