MCPcopy Create free account
hub / github.com/vercel/vercel / findAppOrHandler

Function findAppOrHandler

packages/python-analysis/src/semantic/entrypoints.ts:33–45  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

31 * ```
32 */
33export async function findAppOrHandler(source: string): Promise<string | null> {
34 // Skip parsing if file doesn't contain {app|application|[Hh]andler}
35 if (
36 !source.includes('app') &&
37 !source.includes('application') &&
38 !source.includes('handler') &&
39 !source.includes('Handler')
40 ) {
41 return null;
42 }
43 const mod = await importWasmModule();
44 return mod.findAppOrHandler(source) ?? null;
45}
46
47/**
48 * Check if a top-level callable with the given name exists in Python source.

Callers 5

checkEntrypointFunction · 0.90
findEntrypointCandidatesFunction · 0.90
findValidEntrypointFunction · 0.90
isPythonEntrypointFunction · 0.90
semantic.test.tsFile · 0.90

Calls 1

importWasmModuleFunction · 0.90

Tested by

no test coverage detected