forked from ChaiHao/BPOS-MVP
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
12 lines
524 B
TypeScript
12 lines
524 B
TypeScript
/**
|
|
* Hono 的请求上下文变量 —— 单独成文件,避免 server 与 routes 互相 import 成环(§0.1 第 3 条)。
|
|
*/
|
|
import type { Session } from '@contracts';
|
|
|
|
/**
|
|
* 请求上下文(ADR-010)。
|
|
* `session` 由鉴权中间件从**服务端会话表**解出 —— 不再有「cookie 里写谁就是谁」的明文身份;
|
|
* `account` 保留为便捷读法,值恒取自已核验的会话,免鉴权路由上为空串。
|
|
*/
|
|
export type AppEnv = { Variables: { account: string; session: Session | undefined } };
|