Skip to content

FrameworkDetector

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/packages/doc-automation/src/v2/stages/stage-01-parse/framework-detector.ts

Framework Detector - Identifies project tech stack

Methods

MethodSignatureReturns
detectdetect(repoPath: string)Promise<FrameworkDetectionResult>

Where it refuses work

  • FrameworkDetector stops the work with an early return when dependencies.has(dep), in 4 places.
  • FrameworkDetector stops the work with an early return when score >= 40, in 2 places.
  • FrameworkDetector stops the work with an early return when pattern.test(sample), in 2 places.
  • FrameworkDetector stops the work with an early return when !packageJson.
  • FrameworkDetector stops the work with an early return when depth > 3 || samples.length >= 50.
  • FrameworkDetector stops the work with an early return when dependencies.has(lib).

When something fails

  • FrameworkDetector handles failure in 7 places: it discards it silently in 6, and turns it into a return value in 1.

Was this page helpful?

Download as PDF