lib.bus
Event bus and messaging primitives
@lssm-tech/lib.busbun add @lssm-tech/lib.busManifest 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.tsis part of the package's public or composition surface.src/eventBus.tsis part of the package's public or composition surface.src/filtering.tsis part of the package's public or composition surface.src/index.tsis the root public barrel and package entrypoint.src/inMemoryBus.tsis part of the package's public or composition surface.src/metadata.tsis part of the package's public or composition surface.src/subscriber.tsis part of the package's public or composition surface.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./auditableBusresolves through./src/auditableBus.ts. - Export
./eventBusresolves through./src/eventBus.ts. - Export
./filteringresolves through./src/filtering.ts. - Export
./inMemoryBusresolves through./src/inMemoryBus.ts. - Export
./metadataresolves through./src/metadata.ts. - Export
./subscriberresolves through./src/subscriber.ts.
Local Commands
bun run dev— contractspec-bun-build devbun run build— contractspec-bun-build buildbun run lint— bun lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsgo --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rimraf dist .turbobun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun run prebuild— contractspec-bun-build prebuild
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
Notes
EventBusinterface is a core contract; changes affect all event-driven communication.- Do not alter the subscriber/publish protocol without coordinating with all consumers.
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
4 declarations
@lssm-tech/lib.crypto-utilsworkspace:^
Read the package manual ↗@lssm-tech/lib.schemaworkspace:^
Read the package manual ↗compare-versionscatalog:data
@lssm-tech/lib.contracts-spec-coreworkspace:^
Read the package manual ↗
Declared capabilities
Event bus and messaging primitives
Scripts
publish:pkgbun publish --tolerate-republish --ignore-scripts --verbosepublish:pkg:canarybun publish:pkg --tag canarybuildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typesdevcontractspec-bun-build devcleanrimraf dist .turbolintbun lint:fixlint: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 prebuildtypechecktsgo --noEmittestbun test