| 6 | import { RpcContextMap } from "../src/rpc.js" |
| 7 | |
| 8 | export class RequestContextMap extends RpcContextMap.makeMap({ |
| 9 | allowAnonymous: RpcContextMap.makeInverted()(NotLoggedInError), |
| 10 | requireRoles: RpcContextMap.makeCustom()(UnauthorizedError, Array<string>()), |
| 11 | test: RpcContextMap.make()(S.Never) |
| 12 | }) {} |
| 13 | |
| 14 | const stubMiddleware = { |
| 15 | requestContextMap: RequestContextMap.config, |