@contractspec/lib.contracts-transformers
v3.7.17
Published
Contract format transformations: import/export between ContractSpec and external formats (OpenAPI, AsyncAPI, etc.)
Maintainers
Readme
@contractspec/lib.contracts-transformers
Website: https://contractspec.io
Contract format transformations: import/export between ContractSpec and external formats (OpenAPI, AsyncAPI, etc.).
What It Provides
- Layer: lib.
- Consumers:
lib.contracts-spec, bundles, CLI. - 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-transformers
or
bun add @contractspec/lib.contracts-transformers
Usage
Import the root entrypoint from @contractspec/lib.contracts-transformers, or choose a documented subpath when you only need one part of the package surface.
Architecture
src/commonis part of the package's public or composition surface.src/index.tsis the root public barrel and package entrypoint.src/openapiis part of the package's public or composition surface.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./commonresolves through./src/common/index.ts. - Export
./openapiresolves through./src/openapi/index.ts.
Local Commands
bun run dev— contractspec-bun-build devbun run build— bun run prebuild && bun run build:bundle && bun run build:typesbun run test— bun testbun 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— tsc --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
- Core logic must be pure functions with no I/O.
- Preserve original transport metadata (path/query/header params) for accurate round-trips.
- Track provenance — where specs came from — for sync operations.
@contractspec/lib.contracts-specre-exports this library for existing consumers; avoid breaking that contract.
