faf-cli
Version:
😽 TURBO-CAT: The Rapid Catalytic Converter • Project DNA ✨ for ANY AI • Fully Integrated with React, Next.js, Svelte, TypeScript, Vite & n8n • FREE FOREVER • 10,000+ developers • Championship Edition
286 lines • 6.59 kB
TypeScript
/**
* 🏎️ Framework Detection Lookup Implementation
*
* Ready-to-use TypeScript/JSON structure for instant framework detection
* Import this directly into the .faf CLI for rapid framework identification
*/
export interface FrameworkSignature {
framework: string;
confidence: number;
versionCheck?: string;
additionalCheck?: string;
requiresCombination?: string[];
pattern?: boolean;
ecosystem?: string;
language?: string;
}
export interface DetectionResult {
framework: string;
confidence: number;
version?: string;
ecosystem?: string;
language?: string;
features: string[];
deployment?: string;
database?: string;
testing?: string;
monorepo?: string;
detectedBy: 'unique' | 'directory' | 'combination' | 'package';
detectionTime: number;
}
/**
* TIER 1: Unique File Signatures
* These files identify specific frameworks with 100% confidence
*/
export declare const UNIQUE_SIGNATURES: Record<string, FrameworkSignature>;
/**
* TIER 2: Directory Pattern Signatures
* Specific folder structures that strongly indicate frameworks
*/
export declare const DIRECTORY_PATTERNS: Record<string, FrameworkSignature>;
/**
* TIER 3: File Combination Patterns
* Multiple files that together indicate a specific framework/stack
*/
export declare const COMBINATION_PATTERNS: {
't3-stack': {
files: string[];
framework: string;
confidence: number;
features: string[];
language: string;
};
'mean-stack': {
files: string[];
checks: string[];
framework: string;
confidence: number;
features: string[];
language: string;
};
'mern-stack': {
files: string[];
checks: string[];
framework: string;
confidence: number;
features: string[];
language: string;
};
'django-drf': {
files: string[];
checks: string[];
framework: string;
confidence: number;
features: string[];
language: string;
};
'laravel-vue': {
files: string[];
checks: string[];
framework: string;
confidence: number;
features: string[];
language: string;
};
fastapi: {
files: string[];
checks: string[];
framework: string;
confidence: number;
features: string[];
language: string;
};
'nestjs-graphql': {
files: string[];
checks: string[];
framework: string;
confidence: number;
features: string[];
language: string;
};
};
/**
* TIER 4: Configuration File Indicators
* Files that indicate specific tools, features, or deployment targets
*/
export declare const CONFIG_INDICATORS: {
'jest.config.js': {
feature: string;
type: string;
};
'jest.config.ts': {
feature: string;
type: string;
};
'vitest.config.ts': {
feature: string;
type: string;
};
'cypress.config.js': {
feature: string;
type: string;
};
'playwright.config.ts': {
feature: string;
type: string;
};
'.eslintrc.js': {
feature: string;
type: string;
};
'.eslintrc.json': {
feature: string;
type: string;
};
'.prettierrc': {
feature: string;
type: string;
};
'biome.json': {
feature: string;
type: string;
};
'.github/workflows': {
feature: string;
type: string;
};
'.gitlab-ci.yml': {
feature: string;
type: string;
};
Jenkinsfile: {
feature: string;
type: string;
};
'.circleci/config.yml': {
feature: string;
type: string;
};
'vercel.json': {
feature: string;
type: string;
};
'netlify.toml': {
feature: string;
type: string;
};
'render.yaml': {
feature: string;
type: string;
};
'fly.toml': {
feature: string;
type: string;
};
'railway.json': {
feature: string;
type: string;
};
Dockerfile: {
feature: string;
type: string;
};
'docker-compose.yml': {
feature: string;
type: string;
};
'prisma/schema.prisma': {
feature: string;
type: string;
};
'drizzle.config.ts': {
feature: string;
type: string;
};
'ormconfig.js': {
feature: string;
type: string;
};
'knexfile.js': {
feature: string;
type: string;
};
'nx.json': {
feature: string;
type: string;
};
'turbo.json': {
feature: string;
type: string;
};
'lerna.json': {
feature: string;
type: string;
};
'rush.json': {
feature: string;
type: string;
};
'pnpm-workspace.yaml': {
feature: string;
type: string;
};
};
/**
* TIER 5: Package Manager Indicators
* Lock files that indicate the package manager being used
*/
export declare const PACKAGE_MANAGERS: {
'package-lock.json': string;
'yarn.lock': string;
'pnpm-lock.yaml': string;
'bun.lockb': string;
'Gemfile.lock': string;
'Pipfile.lock': string;
'poetry.lock': string;
'composer.lock': string;
'Cargo.lock': string;
'go.sum': string;
'Package.resolved': string;
'Podfile.lock': string;
};
/**
* Main Detection Class
*/
export declare class FrameworkDetector {
private projectPath;
private detectionStartTime;
constructor(projectPath: string);
/**
* Run the complete detection pipeline
*/
detect(): Promise<DetectionResult>;
/**
* Check for unique file signatures
*/
private checkUniqueSignatures;
/**
* Check directory patterns
*/
private checkDirectoryPatterns;
/**
* Check file combinations
*/
private checkCombinations;
/**
* Analyze package.json as fallback
*/
private analyzePackages;
/**
* Helper: Read package.json
*/
private readPackageJson;
/**
* Helper: Get version from package.json
*/
private getVersionFromPackageJson;
/**
* Create final detection result
*/
private createResult;
}
/**
* Export a simple detection function for CLI usage
*/
export declare function detectFramework(projectPath?: string): Promise<DetectionResult>;
//# sourceMappingURL=framework-detector.d.ts.map