@bobmatnyc/ai-code-review
Version:
A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter
34 lines (33 loc) • 996 B
TypeScript
/**
* @fileoverview Package analyzer utility for extracting package information
*
* This module provides utilities to extract package information from
* various package management files like package.json, composer.json,
* requirements.txt, etc.
*/
/**
* Package information with name, version and optional constraint
*/
export interface PackageInfo {
name: string;
version?: string;
constraint?: string;
devDependency?: boolean;
}
/**
* Result of package analysis containing dependencies by file type
*/
export interface PackageAnalysisResult {
npm?: PackageInfo[];
composer?: PackageInfo[];
python?: PackageInfo[];
ruby?: PackageInfo[];
filename: string;
filePath: string;
}
/**
* Extract package information from package management files
* @param projectPath The path to the project directory
* @returns Array of package analysis results
*/
export declare function extractPackageInfo(projectPath: string): Promise<PackageAnalysisResult[]>;