@contractspec/lib.source-extractors
v2.7.10
Published
Extract contract candidates from TypeScript source code across multiple frameworks (NestJS, Express, Fastify, Hono, Elysia, tRPC, Next.js)
Maintainers
Readme
@contractspec/lib.source-extractors
Website: https://contractspec.io
Extract contract candidates from TypeScript source code across multiple frameworks (NestJS, Express, Fastify, Hono, Elysia, tRPC, Next.js).
What It Provides
- Layer: lib.
- Consumers: CLI, bundles.
- 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.source-extractors
or
bun add @contractspec/lib.source-extractors
Usage
Import the root entrypoint from @contractspec/lib.source-extractors, or choose a documented subpath when you only need one part of the package surface.
Architecture
src/__fixtures__is part of the package's public or composition surface.src/__snapshots__is part of the package's public or composition surface.src/codegenis part of the package's public or composition surface.src/codegen.test.tsis part of the package's public or composition surface.src/detect.test.tsis part of the package's public or composition surface.src/detect.tsis part of the package's public or composition surface.src/edge-cases.test.tsis part of the package's public or composition surface.src/index.tsis the root public barrel and package entrypoint.src/types.tsis shared public type definitions.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./codegenresolves through./src/codegen/index.ts. - Export
./extractorsresolves through./src/extractors/index.ts. - Export
./typesresolves through./src/types.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
- Extractor interface must support multiple frameworks — keep it generic.
- Codegen output must stay deterministic (same input → same output, always).
