refactor(orpc): simplify architecture following KISS principle

- Fix NotFount.tsx typo -> NotFound.tsx
- Restructure ORPC: server -> middlewares -> procedures -> handlers
- Remove std-env dependency and over-engineered ephemeral detection
- Add procedures.ts as middleware composition layer
- Use globalThis for DB singleton (survives HMR)
- Preserve context in middleware (fix context merge bug)
- Remove unused ORPCContextWithDb type
This commit is contained in:
2026-02-07 03:13:29 +08:00
parent 5cc476cedc
commit f7f86e4462
9 changed files with 138 additions and 164 deletions

View File

@@ -5,7 +5,7 @@
"scripts": {
"build": "turbo build:tauri",
"build:compile": "bun build.ts",
"build:tauri": "tauri build",
"build:tauri": "NO_STRIP=1 tauri build",
"build:vite": "vite build",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
@@ -57,5 +57,8 @@
"typescript": "^5.9.3",
"vite": "^8.0.0-beta.13",
"vite-tsconfig-paths": "^6.0.5"
},
"overrides": {
"@tanstack/query-core": "^5.90.20"
}
}