@alien-rpc/generator
v0.4.1
Published
Code generator for alien-rpc
Readme
@alien-rpc/generator
Programmatic generator for alien-rpc client and server manifests.
Installation
npm install -D @alien-rpc/generator typescript @sinclair/[email protected]Use TypeBox v0.34.x with the generator.
Minimal Use
import generate from '@alien-rpc/generator'
const run = generate({
include: 'src/api/**/*.ts',
outDir: 'src/generated',
})
await run({
root: process.cwd(),
watch: false,
})Most applications should use the alien-rpc CLI. Import this package directly
when you need to embed generation into another tool.
Documentation
- Concepts and lifecycle: docs/context.md
- Runnable example: examples/generate-manifests.ts
- Exact public signatures: generated
dist/generator.d.ts - Source-owned API behavior:
src/generator.tsandsrc/generator-types.ts
Public Entry Points
import generate from '@alien-rpc/generator'
import type { Options } from '@alien-rpc/generator'