/// /// import { OutgoingHttpHeaders } from "node:http"; import type { IncomingMessage, StreamCreator } from "../../http/index.js"; import { OpenNextNodeResponse } from "../../http/openNextResponse.js"; import type { MiddlewareManifest } from "../../types/next-types"; import { InternalEvent, InternalResult } from "../../types/open-next.js"; /** * * @__PURE__ */ export declare function isExternal(url?: string, host?: string): boolean; export declare function convertFromQueryString(query: string): Record; /** * * @__PURE__ */ export declare function getUrlParts(url: string, isExternal: boolean): { hostname: string; pathname: string; protocol: string; queryString: string; }; /** * * @__PURE__ */ export declare function convertRes(res: OpenNextNodeResponse): InternalResult; /** * Make sure that multi-value query parameters are transformed to * ?key=value1&key=value2&... so that Next converts those parameters * to an array when reading the query parameters * @__PURE__ */ export declare function convertToQueryString(query: Record): string; /** * Given a raw query string, returns a record with key value-array pairs * similar to how multiValueQueryStringParameters are structured * @__PURE__ */ export declare function convertToQuery(querystring: string): Record; /** * * @__PURE__ */ export declare function getMiddlewareMatch(middlewareManifest: MiddlewareManifest): RegExp[]; /** * * @__PURE__ */ export declare function escapeRegex(str: string): string; /** * * @__PURE__ */ export declare function unescapeRegex(str: string): string; /** * @__PURE__ */ export declare function convertBodyToReadableStream(method: string, body?: string | Buffer): ReadableStream | undefined; /** * * @__PURE__ */ export declare function proxyRequest(internalEvent: InternalEvent, res: OpenNextNodeResponse): Promise; declare global { var openNextDebug: boolean; var openNextVersion: string; var lastModified: Record; } /** * * @__PURE__ */ export declare function fixCacheHeaderForHtmlPages(rawPath: string, headers: OutgoingHttpHeaders): void; /** * * @__PURE__ */ export declare function fixSWRCacheHeader(headers: OutgoingHttpHeaders): void; /** * * @__PURE__ */ export declare function addOpenNextHeader(headers: OutgoingHttpHeaders): void; /** * * @__PURE__ */ export declare function revalidateIfRequired(host: string, rawPath: string, headers: OutgoingHttpHeaders, req?: IncomingMessage): Promise; export declare function generateMessageGroupId(rawPath: string): string; /** * * @__PURE__ */ export declare function fixISRHeaders(headers: OutgoingHttpHeaders): void; /** * * @param internalEvent * @param headers * @param responseStream * @returns * @__PURE__ */ export declare function createServerResponse(internalEvent: InternalEvent, headers: Record, responseStream?: StreamCreator): OpenNextNodeResponse;