PHP 7.4.33
Preview: request-meta.d.ts Size: 6.28 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/next/dist/server/request-meta.d.ts
import type { IncomingMessage } from 'http';
import type { ParsedUrlQuery } from 'querystring';
import type { UrlWithParsedQuery } from 'url';
import type { BaseNextRequest } from './base-http';
import type { CloneableBody } from './body-streams';
import type { RouteMatch } from './route-matches/route-match';
import type { NEXT_RSC_UNION_QUERY } from '../client/components/app-router-headers';
import type { ServerComponentsHmrCache } from './response-cache';
export declare const NEXT_REQUEST_META: unique symbol;
export type NextIncomingMessage = (BaseNextRequest | IncomingMessage) & {
    [NEXT_REQUEST_META]?: RequestMeta;
};
export interface RequestMeta {
    /**
     * The query that was used to make the request.
     */
    initQuery?: ParsedUrlQuery;
    /**
     * The URL that was used to make the request.
     */
    initURL?: string;
    /**
     * The protocol that was used to make the request.
     */
    initProtocol?: string;
    /**
     * The body that was read from the request. This is used to allow the body to
     * be read multiple times.
     */
    clonableBody?: CloneableBody;
    /**
     * True when the request matched a locale domain that was configured in the
     * next.config.js file.
     */
    isLocaleDomain?: boolean;
    /**
     * True when the request had locale information stripped from the pathname
     * part of the URL.
     */
    didStripLocale?: boolean;
    /**
     * If the request had it's URL rewritten, this is the URL it was rewritten to.
     */
    rewroteURL?: string;
    /**
     * The cookies that were added by middleware and were added to the response.
     */
    middlewareCookie?: string[];
    /**
     * The match on the request for a given route.
     */
    match?: RouteMatch;
    /**
     * The incremental cache to use for the request.
     */
    incrementalCache?: any;
    /**
     * The server components HMR cache, only for dev.
     */
    serverComponentsHmrCache?: ServerComponentsHmrCache;
    /**
     * Equals the segment path that was used for the prefetch RSC request.
     */
    segmentPrefetchRSCRequest?: string;
    /**
     * True when the request is for the prefetch flight data.
     */
    isPrefetchRSCRequest?: true;
    /**
     * True when the request is for the flight data.
     */
    isRSCRequest?: true;
    /**
     * True when the request is for the `/_next/data` route using the pages
     * router.
     */
    isNextDataReq?: true;
    /**
     * Postponed state to use for resumption. If present it's assumed that the
     * request is for a page that has postponed (there are no guarantees that the
     * page actually has postponed though as it would incur an additional cache
     * lookup).
     */
    postponed?: string;
    /**
     * If provided, this will be called when a response cache entry was generated
     * or looked up in the cache.
     */
    onCacheEntry?: (cacheEntry: any, requestMeta: any) => Promise<boolean | void> | boolean | void;
    /**
     * The previous revalidate before rendering 404 page for notFound: true
     */
    notFoundRevalidate?: number | false;
    /**
     * In development, the original source page that returned a 404.
     */
    developmentNotFoundSourcePage?: string;
    /**
     * The path we routed to and should be invoked
     */
    invokePath?: string;
    /**
     * The specific page output we should be matching
     */
    invokeOutput?: string;
    /**
     * The status we are invoking the request with from routing
     */
    invokeStatus?: number;
    /**
     * The routing error we are invoking with
     */
    invokeError?: Error;
    /**
     * The query parsed for the invocation
     */
    invokeQuery?: Record<string, undefined | string | string[]>;
    /**
     * Whether the request is a middleware invocation
     */
    middlewareInvoke?: boolean;
    /**
     * Whether the default route matches were set on the request during routing.
     */
    didSetDefaultRouteMatches?: boolean;
    /**
     * Whether the request is for the custom error page.
     */
    customErrorRender?: true;
    /**
     * Whether to bubble up the NoFallbackError to the caller when a 404 is
     * returned.
     */
    bubbleNoFallback?: true;
    /**
     * True when the request had locale information inferred from the default
     * locale.
     */
    localeInferredFromDefault?: true;
    /**
     * The locale that was inferred or explicitly set for the request.
     */
    locale?: string;
    /**
     * The default locale that was inferred or explicitly set for the request.
     */
    defaultLocale?: string;
}
/**
 * Gets the request metadata. If no key is provided, the entire metadata object
 * is returned.
 *
 * @param req the request to get the metadata from
 * @param key the key to get from the metadata (optional)
 * @returns the value for the key or the entire metadata object
 */
export declare function getRequestMeta(req: NextIncomingMessage, key?: undefined): RequestMeta;
export declare function getRequestMeta<K extends keyof RequestMeta>(req: NextIncomingMessage, key: K): RequestMeta[K];
/**
 * Sets the request metadata.
 *
 * @param req the request to set the metadata on
 * @param meta the metadata to set
 * @returns the mutated request metadata
 */
export declare function setRequestMeta(req: NextIncomingMessage, meta: RequestMeta): RequestMeta;
/**
 * Adds a value to the request metadata.
 *
 * @param request the request to mutate
 * @param key the key to set
 * @param value the value to set
 * @returns the mutated request metadata
 */
export declare function addRequestMeta<K extends keyof RequestMeta>(request: NextIncomingMessage, key: K, value: RequestMeta[K]): RequestMeta;
/**
 * Removes a key from the request metadata.
 *
 * @param request the request to mutate
 * @param key the key to remove
 * @returns the mutated request metadata
 */
export declare function removeRequestMeta<K extends keyof RequestMeta>(request: NextIncomingMessage, key: K): RequestMeta;
type NextQueryMetadata = {
    /**
     * The `_rsc` query parameter used for cache busting to ensure that the RSC
     * requests do not get cached by the browser explicitly.
     */
    [NEXT_RSC_UNION_QUERY]?: string;
};
export type NextParsedUrlQuery = ParsedUrlQuery & NextQueryMetadata & {
    amp?: '1';
};
export interface NextUrlWithParsedQuery extends UrlWithParsedQuery {
    query: NextParsedUrlQuery;
}
export {};

Directory Contents

Dirs: 24 × Files: 148
Name Size Perms Modified Actions
after DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
api-utils DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
base-http DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
dev DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
lib DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
og DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
request DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
use-cache DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
web DIR
- drwxr-xr-x 2025-03-28 11:04:45
Edit Download
98 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
3.97 KB lrw-r--r-- 2025-03-28 11:04:38
Edit Download
6.31 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
14.54 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
148.61 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
224.25 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
454 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
2.41 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
3.75 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
82 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
757 B lrw-r--r-- 2025-03-28 11:04:39
Edit Download
686 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
4.10 MB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
124 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
1.12 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
1.27 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
405 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
2.23 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
2.95 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
151 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
24.83 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
46.98 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
32.14 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
6.79 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
45.46 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
49 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
5.87 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
6.34 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
1.27 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
57.73 KB lrw-r--r-- 2025-03-28 11:04:39
Edit Download
72.38 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
591 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
3.49 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
3.55 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
171 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
2.96 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
4.25 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
300 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.97 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
2.76 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
177 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.73 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
2.97 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
85 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
832 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
848 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
536 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
807 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
1.64 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
97 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.22 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
1.37 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
110 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
986 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
983 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
4.52 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
29.99 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
44.16 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
223 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.10 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.30 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
2.92 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
6.55 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
12.47 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
1.32 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.66 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
3.51 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
1.34 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
2.10 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
4.04 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
82 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
686 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
701 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
11.39 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
63.23 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
101.13 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
47 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
318 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
205 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
3.24 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
13.81 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
23.57 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
0 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
890 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
1.40 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
287 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
542 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
782 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
0 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
490 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
871 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
78 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
549 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
747 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
897 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
18.14 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
26.26 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
291 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
5.47 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
7.48 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
372 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.88 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
3.66 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
38 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
534 B lrw-r--r-- 2025-03-28 11:04:42
Edit Download
864 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
4.78 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
7.34 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
12.40 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
4.77 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
54.23 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
82.17 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
6.28 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.43 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
7.69 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
263 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
2.71 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
4.18 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
377 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
4.10 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
6.34 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
720 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.00 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
920 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
638 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
2.90 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
4.36 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
420 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
2.99 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
4.44 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
403 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.98 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.51 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
197 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.10 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.87 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
2.57 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
11.99 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
19.48 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
172 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.03 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
1.36 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
332 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
3.13 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
4.07 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
4.66 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
12.40 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
19.96 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).