clean up tests - remove mockRequestInfo

This commit is contained in:
Konstantin Konstantinov 2025-06-25 16:24:30 +03:00
commit 606c278668
No known key found for this signature in database

View file

@ -1,4 +1,5 @@
import { z, ZodTypeAny } from "zod";
import { AuthInfo } from "./server/auth/types.js";
export const LATEST_PROTOCOL_VERSION = "2025-06-18";
export const DEFAULT_NEGOTIATED_PROTOCOL_VERSION = "2025-03-26";
@ -1463,6 +1464,36 @@ type Flatten<T> = T extends Primitive
type Infer<Schema extends ZodTypeAny> = Flatten<z.infer<Schema>>;
/**
* Headers that are compatible with both Node.js and the browser.
*/
export type IsomorphicHeaders = Record<string, string | string[] | undefined>;
/**
* Information about the incoming request.
*/
export interface RequestInfo {
/**
* The headers of the request.
*/
headers: IsomorphicHeaders;
}
/**
* Extra information about a message.
*/
export interface MessageExtraInfo {
/**
* The request information.
*/
requestInfo?: RequestInfo;
/**
* The authentication information.
*/
authInfo?: AuthInfo;
}
/* JSON-RPC types */
export type ProgressToken = Infer<typeof ProgressTokenSchema>;
export type Cursor = Infer<typeof CursorSchema>;