@xemahq/biome-governance-client
v0.2.2
Published
<p align="center"> <svg width="680" height="120" viewBox="0 0 680 120" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="@xemahq/biome-governance-client"> <rect width="680" height="120" rx="14" fill="#0B1020"/> <g transform="transl
Readme
@xemahq/biome-governance-client
NestJS client for resolving biome enablement
Overview
A NestJS module and service that tell a biome-shipped service whether it is
enabled for a given organization. It exposes the effective enablement state, a
fail-fast assertEnabled guard, and typed errors and event descriptors so a
service can react when enablement or installation state changes. Enablement
reasons and states are closed enums, so callers branch on typed values rather
than strings.
When to use it
- Use it inside a biome's NestJS service to gate behaviour on whether the biome is enabled for the calling organization.
Installation
pnpm add @xemahq/biome-governance-clientUsage
import { BiomeGovernanceModule, BiomeGovernanceService } from '@xemahq/biome-governance-client';
@Module({ imports: [BiomeGovernanceModule] })
export class AppModule {}
// Then inject BiomeGovernanceService and gate on enablement:
await governance.assertEnabled({ orgId, biomeId, surface });Peer requirements
@nestjs/common>= 11@nestjs/config>= 4
License
Apache-2.0 © Xema — xema.dev
