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

@@ -7,7 +7,7 @@ import {
} from '@tanstack/react-router'
import type { ReactNode } from 'react'
import { ErrorComponent } from '@/components/Error'
import { NotFoundComponent } from '@/components/NotFount'
import { NotFoundComponent } from '@/components/NotFound'
import { devtools as queryDevtools } from '@/integrations/tanstack-query'
import { devtools as routerDevtools } from '@/integrations/tanstack-router'
import appCss from '@/styles.css?url'