UNPKG

@bobmatnyc/ai-code-review

Version:

A TypeScript-based tool for automated code reviews using AI models from Google Gemini, Anthropic Claude, and OpenRouter

67 lines (66 loc) 2.52 kB
/** * @fileoverview Dependency registry for different tech stacks and frameworks * * This module defines the mappings for different tech stacks, their frameworks, * and the locations of their dependency files. It serves as a centralized registry * for identifying project dependencies across various technology ecosystems. */ /** * Tech stack types supported by the dependency analyzer */ export type TechStackType = 'nodejs' | 'react' | 'nextjs' | 'vue' | 'angular' | 'svelte' | 'express' | 'nestjs' | 'fastify' | 'php' | 'laravel' | 'symfony' | 'wordpress' | 'python' | 'django' | 'flask' | 'fastapi' | 'ruby' | 'rails' | 'java' | 'dotnet' | 'go' | 'rust'; /** * Package file types supported by the dependency analyzer */ export type PackageFileType = 'package.json' | 'composer.json' | 'requirements.txt' | 'Gemfile' | 'pom.xml' | 'build.gradle' | 'go.mod' | 'Cargo.toml' | 'Project.csproj'; /** * Stack-specific dependency file location */ export interface StackDependencyFile { fileType: PackageFileType; relativeLocation: string; required: boolean; } /** * Tech stack definition with dependency files */ export interface TechStackDefinition { name: TechStackType; displayName: string; dependencyFiles: StackDependencyFile[]; detectionFiles?: string[]; packagePrefix?: string; parentStack?: TechStackType; } /** * Registry of tech stacks and their dependency file locations */ export declare const TECH_STACK_REGISTRY: TechStackDefinition[]; /** * Interface for detected stack information */ export interface DetectedStack { name: TechStackType; confidence: 'high' | 'medium' | 'low'; dependencyFiles: string[]; parentStacks: TechStackType[]; } /** * Detect the tech stack(s) used in a project * @param projectPath The path to the project directory * @returns Promise with array of detected stacks */ export declare function detectTechStacks(projectPath: string): Promise<DetectedStack[]>; /** * Get all package file locations for a specific tech stack * @param stack The detected tech stack * @param projectPath The path to the project * @returns Array of package file paths */ export declare function getPackageFilesForStack(stack: DetectedStack, projectPath: string): string[]; /** * Get package file type from file path * @param filePath The path to the package file * @returns The package file type or undefined if not recognized */ export declare function getPackageFileType(filePath: string): PackageFileType | undefined;