build-artifact-manager.d.ts•2.06 kB
/**
* Build Analyzer Agent
* Parses and analyzes webpack/vite build artifacts for source intelligence
* Part of the WebSee Source Intelligence Layer
*/
interface BuildModule {
id: string | number;
name: string;
size: number;
chunks: (string | number)[];
source?: string;
originalSource?: string;
}
interface BuildChunk {
id: string | number;
files: string[];
size: number;
modules: BuildModule[];
entry?: boolean;
initial?: boolean;
}
export declare class BuildArtifactManager {
private manifest;
private projectRoot;
private moduleMap;
constructor(projectRoot?: string);
/**
* Load build artifacts from webpack stats or vite manifest
*/
loadBuildArtifacts(): Promise<void>;
/**
* Load and parse webpack stats.json
*/
private loadWebpackStats;
/**
* Load and parse vite manifest.json
*/
private loadViteManifest;
/**
* Parse webpack chunks
*/
private parseWebpackChunks;
/**
* Parse webpack modules
*/
private parseWebpackModules;
/**
* Process generic manifest format
*/
private processGenericManifest;
/**
* Build module lookup map
*/
private buildModuleMap;
/**
* Find module by file path
*/
findModule(filePath: string): BuildModule | undefined;
/**
* Get chunk containing a module
*/
getChunkForModule(moduleId: string | number): BuildChunk | undefined;
/**
* Get build summary
*/
getSummary(): {
type: string;
totalModules: number;
totalChunks: number;
totalSize: number;
largestModules: BuildModule[];
};
/**
* Get entrypoints
*/
getEntrypoints(): Record<string, {
chunks: (string | number)[];
assets: string[];
}>;
/**
* Check if manifest is loaded
*/
isLoaded(): boolean;
/**
* Clear loaded manifest
*/
clear(): void;
}
export {};
//# sourceMappingURL=build-artifact-manager.d.ts.map