(target: Node)
| 591 | |
| 592 | /** A method the walk cannot enter (an interface's, an ORM's) on a repository-shaped container. */ |
| 593 | const repositoryMethod = (target: Node): boolean => { |
| 594 | if (target.kind !== 'method' && target.kind !== 'function') return false; |
| 595 | if (isTestPath(target.filePath)) return false; |
| 596 | const container = target.qualifiedName.replace(/[.:]+[^.:]*$/, '').split(/[.:]+/).pop() ?? ''; |
| 597 | if (!REPOSITORY_CONTAINER.test(container) && !/(?:^|\/)(?:repositories|repository|dao|daos|mappers)\//i.test(posix(target.filePath))) return false; |
| 598 | return cg.getOutgoingEdgesFrom([target.id], WALK_KINDS).length === 0; |
| 599 | }; |
| 600 | |
| 601 | /** What runs before a route's handler: the middleware arguments at the registration, or the guard decorators on it. */ |
| 602 | const chainFor = async (route: Node, root: Node | null): Promise<string[]> => { |
no test coverage detected