main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
import type { MiddlewareConfig, MiddlewareMatcher, RSCModuleType } from '../../analysis/get-page-static-info';
import { 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;
export interface RSCMeta {
type: RSCModuleType;
actions?: string[];
clientRefs?: string[];
clientEntryType?: 'cjs' | 'auto';
isClientRef?: boolean;
requests?: string[];
}
export interface RouteMeta {
page: string;
absolutePagePath: string;
preferredRegion: string | string[] | undefined;
middlewareConfig: MiddlewareConfig;
}
export interface EdgeMiddlewareMeta {
page: string;
matchers?: MiddlewareMatcher[];
}
export interface EdgeSSRMeta {
isServerComponent: boolean;
isAppDir?: boolean;
page: string;
}
export interface AssetBinding {
filePath: string;
name: string;
}