This repository has been archived on 2026-05-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
novarix-networks-homepage/node_modules/next/dist/build/webpack/loaders/get-module-build-info.d.ts
T
Kismet Hasanaj 34dc9aec52 .
2026-05-02 20:07:02 +02:00

63 lines
1.9 KiB
TypeScript

import type { ProxyConfig, ProxyMatcher, RSCModuleType } from '../../analysis/get-page-static-info';
import type { webpack } from 'next/dist/compiled/webpack/webpack';
export type ModuleBuildInfo = {
nextEdgeMiddleware?: EdgeMiddlewareMeta;
nextEdgeApiFunction?: EdgeMiddlewareMeta;
nextEdgeSSR?: EdgeSSRMeta;
nextWasmMiddlewareBinding?: AssetBinding;
nextAssetMiddlewareBinding?: AssetBinding;
usingIndirectEval?: boolean | Set<string>;
route?: RouteMeta;
importLocByPath?: Map<string, any>;
rootDir?: string;
rsc?: RSCMeta;
};
/**
* A getter for module build info that casts to the type it should have.
* We also expose here types to make easier to use it.
*/
export declare function getModuleBuildInfo(webpackModule: webpack.Module): ModuleBuildInfo;
/**
* Location info for a server action (1-indexed line and column)
*/
export interface ServerActionLocation {
line: number;
col: number;
}
/**
* Server action info including name and optional source location
*/
export interface ServerActionInfo {
name: string;
loc?: ServerActionLocation;
}
export interface RSCMeta {
type: RSCModuleType;
/** Map of action ID to export name (old format) or action info (new format with location) */
actionIds?: Record<string, string | ServerActionInfo>;
clientRefs?: string[];
clientEntryType?: 'cjs' | 'auto';
isClientRef?: boolean;
requests?: string[];
}
export interface RouteMeta {
page: string;
absolutePagePath: string;
preferredRegion: string | string[] | undefined;
middlewareConfig: ProxyConfig;
relatedModules?: string[];
}
export interface EdgeMiddlewareMeta {
page: string;
matchers?: ProxyMatcher[];
}
export interface EdgeSSRMeta {
isServerComponent: boolean;
isAppDir?: boolean;
page: string;
}
export interface AssetBinding {
filePath: string;
name: string;
}