refactor: 重构ORPC模块结构与路由实现

- 更新导入路径以正确引用合约文件并重构导出结构。
- 使用 os 实例替换手动实现的 ORPC 处理函数,统一通过生成的合约接口调用并集成数据库中间件。
- 使用服务器实例的路由功能替换原有的路由定义。
- 添加ORPC服务器实现,基于合约定义并指定空上下文类型。
- 修正导入路径,将 './contracts' 更新为 './contract' 以匹配实际文件路径。
This commit is contained in:
2026-01-18 03:44:07 +08:00
parent ae36575256
commit 6092d82f34
5 changed files with 18 additions and 10 deletions

5
src/orpc/contract.ts Normal file
View File

@@ -0,0 +1,5 @@
import { todoContract } from './contracts/todo'
export const contract = {
todo: todoContract,
}