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

Function find

src/resolution/frameworks/next-proxy.ts:74–75  ·  view source on GitHub ↗
(base: string)

Source from the content-addressed store, hash-verified

72 */
73export function nextProxyFor(context: ResolutionContext, dir: string, root: string): NextProxy | null {
74 const find = (base: string): string | undefined =>
75 PROXY_EXTENSIONS.map((ext) => `${dir}${base}.${ext}`).find((file) => context.fileExists(file));
76 const middleware = find('middleware');
77 const proxy = middleware ? undefined : find('proxy');
78 const file = middleware ?? (proxy && !pinsNextBefore16(context, root) ? proxy : undefined);

Callers 1

nextProxyForFunction · 0.70

Calls 2

mapMethod · 0.80
fileExistsMethod · 0.80

Tested by

no test coverage detected