Skip to content
ContractSpec
Start here

Package manual · platform

·Workflows, jobs and automation

lib.bus

Event bus and messaging primitives

platformlibraryv5.0.4stableservernode
@lssm-tech/lib.bus
bun add @lssm-tech/lib.bus
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Builds start from the root, event-bus contract, in-memory implementation, and auditable bus. All eight existing public subpaths remain compatibility roots. Module-closure emission shares local implementations without changing publish/subscribe behavior or advertising new helper paths. Event and feature definitions use their canonical Core owners; public Bus names and exports stay compatible. bun run test checks payload identity, subscriber ordering, unsubscribe and visible failures.

Website: https://contractspec.io

Event bus and messaging primitives.

What It Provides

  • Layer: lib.
  • Consumers: personalization, bundles.
  • Related ContractSpec packages include @lssm-tech/lib.contracts-spec-core, @lssm-tech/lib.schema, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.
  • Related ContractSpec packages include @lssm-tech/lib.contracts-spec-core, @lssm-tech/lib.schema, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.

Installation

npm install @lssm-tech/lib.bus

or

bun add @lssm-tech/lib.bus

Usage

Import the root entrypoint from @lssm-tech/lib.bus, or choose a documented subpath when you only need one part of the package surface.

Architecture

  • src/auditableBus.ts is part of the package's public or composition surface.
  • src/eventBus.ts is part of the package's public or composition surface.
  • src/filtering.ts is part of the package's public or composition surface.
  • src/index.ts is the root public barrel and package entrypoint.
  • src/inMemoryBus.ts is part of the package's public or composition surface.
  • src/metadata.ts is part of the package's public or composition surface.
  • src/subscriber.ts is part of the package's public or composition surface.

Public Entry Points

  • Export . resolves through ./src/index.ts.
  • Export ./auditableBus resolves through ./src/auditableBus.ts.
  • Export ./eventBus resolves through ./src/eventBus.ts.
  • Export ./filtering resolves through ./src/filtering.ts.
  • Export ./inMemoryBus resolves through ./src/inMemoryBus.ts.
  • Export ./metadata resolves through ./src/metadata.ts.
  • Export ./subscriber resolves through ./src/subscriber.ts.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run lint — bun lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.

Notes

  • EventBus interface is a core contract; changes affect all event-driven communication.
  • Do not alter the subscriber/publish protocol without coordinating with all consumers.

Relationships

THIS PACKAGElib.bus8 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

4 declarations

Declared capabilities

Lib Bus

Event bus and messaging primitives

Scripts

  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • devcontractspec-bun-build dev
  • cleanrimraf dist .turbo
  • lintbun lint:fix
  • lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
  • lint:checknode ../../../../scripts/biome.cjs check .
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit
  • testbun test