evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a command-line tool that analyzes project dependencies in an Nx workspace and provides insights about the dependency structure.
Your tool should:
The tool should accept a project name as a command-line argument and output:
workspace-graph.jsonProvides workspace analysis and project graph utilities.
/**
* Analyzes dependencies for a given project in the Nx workspace
* @param projectName - The name of the project to analyze
* @returns Analysis results including dependents, circular dependencies, and dependency count
*/
export async function analyzeProject(projectName: string): Promise<{
dependents: string[];
hasCircularDependency: boolean;
directDependencyCount: number;
}>;
/**
* Exports the full project graph to a JSON file
* @param outputPath - Path where the graph JSON should be written
* @returns Promise that resolves when export is complete
*/
export async function exportProjectGraph(outputPath: string): Promise<void>;
/**
* Main entry point for the CLI tool
* @param args - Command line arguments
*/
export async function main(args: string[]): Promise<void>;