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

Function nextProxyDir

src/resolution/frameworks/next-proxy.ts:31–37  ·  view source on GitHub ↗
(root: string, routeFiles: readonly string[])

Source from the content-addressed store, hash-verified

29 * anywhere else is an ordinary module.
30 */
31export function nextProxyDir(root: string, routeFiles: readonly string[]): string {
32 for (const dir of ['pages/', 'app/']) {
33 if (routeFiles.some((file) => file.startsWith(root + dir))) return root;
34 if (routeFiles.some((file) => file.startsWith(`${root}src/${dir}`))) return `${root}src/`;
35 }
36 return root;
37}
38
39/** Whether the app's manifest, or failing that the repository's, pins `next` below 16, where `proxy` isn't a convention yet. */
40function pinsNextBefore16(context: ResolutionContext, root: string): boolean {

Callers 2

nextProxyEdgesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected