MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / repositoryMethod

Function repositoryMethod

src/ui-server/api/steps.ts:593–599  ·  view source on GitHub ↗
(target: Node)

Source from the content-addressed store, hash-verified

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[]> => {

Callers 1

buildStepsFunction · 0.85

Calls 3

isTestPathFunction · 0.90
posixFunction · 0.85
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected