slaviqueue/typeorm-pg-adjacency-list-tree

View on GitHub
lib/repository/tree-repository.ts

Summary

Maintainability
A
3 hrs
Test Coverage

Function extendTreeRepository has 88 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function extendTreeRepository<Entity extends IBaseTreeEntity>(repository: Repository<Entity>) {
  const repo = repository.extend({
    async findTrees(options?: FindTreeOptions) {
      const roots = await this.findRoots(options)
      const trees = await Promise.all(roots.map((root) => this.findDescendantsTree(root, options)))
Severity: Major
Found in lib/repository/tree-repository.ts - About 3 hrs to fix

    There are no issues that match your filters.

    Category
    Status