Skip to content

dependabit / detector/src / DetectorOptions

Interface: DetectorOptions

Defined in: packages/detector/src/detector.ts:60

Configuration options for the Detector orchestrator.

Remarks

All options except repoPath and llmProvider have safe defaults. The detector respects .gitignore files and git's global excludes file by default; set useGitExcludes to false to disable that behaviour.

Config

Use When

You want to scan a local repository clone for informational dependencies that package managers do not track.

Avoid When

The repository has not been cloned to disk — the detector reads files from the filesystem and cannot operate on a bare Git remote.

Pitfalls

  • ignorePatterns performs substring matching on path segments; overly broad patterns (e.g. "src") will silently exclude large parts of the repository.
  • repoOwner / repoName are used to filter self-referential URLs from results. Omitting them causes the repo's own URLs to appear as dependencies.
  • Token budgets: the LLM provider is called once per README (up to 5) and once per unclassified URL. Large repositories with many READMEs can exhaust the provider's context window mid-run; truncation at 5 000 characters per document is intentional but may miss late-appearing URLs.

Properties

PropertyTypeDefault valueDescriptionDefined in
ignorePatterns?string[]['node_modules', 'dist', 'build', 'target', 'vendor', 'venv', '__pycache__', 'coverage']Path segments to exclude during directory traversal.packages/detector/src/detector.ts:69
llmProviderLLMProviderundefinedLLM provider used for document analysis and dependency classification.packages/detector/src/detector.ts:64
repoName?stringundefinedGitHub repository name used to filter self-referential URLs.packages/detector/src/detector.ts:79
repoOwner?stringundefinedGitHub owner used to filter self-referential URLs.packages/detector/src/detector.ts:77
repoPathstringundefinedAbsolute path to the root of the repository on disk.packages/detector/src/detector.ts:62
useGitExcludes?booleantrueWhen true, .gitignore files and git's global excludes are loaded and applied during traversal.packages/detector/src/detector.ts:75

Released under the MIT License.