@contractspec/lib.contracts-library
v3.7.29
Published
**Contract definitions for library templates and local runtime.**
Readme
@contractspec/lib.contracts-library
Contract definitions for library templates and local runtime.
What It Provides
- Layer: lib.
- Consumers:
bundle.library. - Related ContractSpec packages include
@contractspec/lib.contracts-spec,@contractspec/lib.schema,@contractspec/tool.bun,@contractspec/tool.typescript. - Related ContractSpec packages include
@contractspec/lib.contracts-spec,@contractspec/lib.schema,@contractspec/tool.bun,@contractspec/tool.typescript.
Installation
npm install @contractspec/lib.contracts-library
or
bun add @contractspec/lib.contracts-library
Usage
Import the root entrypoint from @contractspec/lib.contracts-library, or choose a documented subpath when you only need one part of the package surface.
Architecture
src/index.tsis the root public barrel and package entrypoint.src/templatesis part of the package's public or composition surface.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./templatesresolves through./src/templates/index.ts. - Export
./templates/messagingresolves through./src/templates/messaging.ts. - Export
./templates/recipesresolves through./src/templates/recipes.ts. - Export
./templates/todosresolves through./src/templates/todos.ts.
Local Commands
bun run dev— contractspec-bun-build devbun run build— bun run prebuild && bun run build:bundle && bun run build:typesbun run lint— bun run lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsc --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rm -rf distbun 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
- Template contracts define the shape consumed by bundle.library — breaking changes cascade to all template renderers.
- Keep contract schemas additive; avoid removing or renaming fields without a migration path.
