@bunizao/contracts
Shared TypeScript contracts used by the buxx.me site and API Worker.
The package is published from packages/contracts in the
bunizao/site repository. Consumers should
depend on an exact version so the public site and private API Worker upgrade
the contract deliberately together.
bun add @bunizao/[email protected]
# or
npm install @bunizao/[email protected]
The package exports the complete contract from @bunizao/contracts and the
feature modules from @bunizao/contracts/{analytics,admin,content,listening,mood,notify,routes,telegram-ops}.
@bunizao/contracts/runtime is the one subpath that ships code rather than
types: the env readers (createEnvReaders, readRuntimeValue,
setRuntimeEnvSource), the JSON response helpers and the query parsers both
Workers run. Bind the env readers to the bundle's own import.meta.env once,
in a local module, since bundlers only replace it in application source.
The package is source-available but not licensed for redistribution. See
LICENSE for the applicable terms.