@drzl-enhanced/template-orpc-service
v0.0.4
Published
<div align="center">
Readme
@drzl/template-orpc-service
oRPC router template wired to the generated Service layer.
Use
Reference from the oRPC generator:
generators: [
{
kind: 'orpc',
template: '@drzl/template-orpc-service',
validation: { library: 'valibot' },
databaseInjection: {
enabled: true,
databaseType: 'Database',
databaseTypeImport: { name: 'Database', from: 'src/db/db' },
},
servicesDir: 'src/services',
},
]Hooks (template API)
- filePath(table, ctx)
- routerName(table, ctx)
- procedures(table)
- imports?(tables, ctx)
- header?(table)
When databaseInjection.enabled is true, the template emits a dbMiddleware and expects context.db to be provided by your runtime (e.g., Cloudflare Workers via D1).
