feat(rpc): add target policy, protocol schemas, and tagged errors
- Add normalizeLoopbackTarget() with loopback-only URL validation - Add JSON-RPC response decoder with schema validation - Define 8 tagged errors using Data.TaggedError - 20 tests covering target policy and protocol decoding - Re-export all public types from index.ts
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
export {
|
||||
InvalidTargetError,
|
||||
UnknownOperationError,
|
||||
UpstreamConnectionError,
|
||||
UpstreamTimeoutError,
|
||||
UpstreamResponseTooLargeError,
|
||||
RpcProtocolError,
|
||||
RpcRemoteError,
|
||||
RpcDecodeError,
|
||||
} from "./errors.js";
|
||||
|
||||
export { normalizeLoopbackTarget } from "./target-policy.js";
|
||||
|
||||
export { decodeRpcResponse } from "./protocol.js";
|
||||
|
||||
export type {
|
||||
JsonRpcRequest,
|
||||
JsonRpcResponse,
|
||||
JsonRpcSuccess,
|
||||
JsonRpcFailure,
|
||||
} from "./protocol.js";
|
||||
|
||||
Reference in New Issue
Block a user