sicua
Version:
A tool for analyzing project structure and dependencies
67 lines (66 loc) • 1.57 kB
TypeScript
export interface INodeData {
label: string;
fullPath: string;
directory: string;
fileType?: string;
isNextRoute?: boolean;
routeType?: string;
isComponent?: boolean;
hasClientDirective?: boolean;
hasServerDirective?: boolean;
}
export interface IEdgeData {
label?: string;
type?: "import" | "export" | "dynamic";
}
export interface INode {
id: string;
type?: string;
position: {
x: number;
y: number;
};
data: INodeData;
parentNode?: string;
extent?: "parent" | [[number, number], [number, number]];
}
export interface IEdge {
id: string;
source: string;
target: string;
data?: IEdgeData;
type?: string;
animated?: boolean;
style?: Record<string, string | number>;
markerEnd?: {
type: string;
color?: string;
};
}
export interface IDiagramData {
nodes: INode[];
edges: IEdge[];
version?: string;
}
export interface CircularGroupInfo {
id: string;
components: string[];
path: string[];
size: number;
isCritical: boolean;
breakSuggestions: {
component: string;
alternativeDesign: string;
}[];
}
export interface CircularDependencyAnalysisResult {
circularDependencyGraph: IDiagramData;
circularGroups: CircularGroupInfo[];
stats: {
totalCircularGroups: number;
totalComponentsInCircular: number;
maxCircularPathLength: number;
criticalCircularPaths: number;
componentsByCircularGroups: Record<string, string[]>;
};
}