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

Function detectEntrypoint

packages/python/src/entrypoint.ts:606–621  ·  view source on GitHub ↗
({
  workPath,
  framework,
})

Source from the content-addressed store, hash-verified

604 * Django framework hook resolves the WSGI/ASGI entrypoint at build time).
605 */
606export const detectEntrypoint: DetectEntrypointFn = async ({
607 workPath,
608 framework,
609}) => {
610 if (!isPythonFramework(framework)) return null;
611 const detected = await detectPythonEntrypoint(
612 framework as PythonFramework,
613 workPath
614 );
615 if (!detected?.entrypoint) return null;
616 const { entrypoint, variableName } = detected.entrypoint;
617 return {
618 kind: 'py-module:attr',
619 entrypoint: `${entrypointToModule(entrypoint)}:${variableName}`,
620 };
621};

Callers 1

unit.test.tsFile · 0.50

Calls 3

isPythonFrameworkFunction · 0.90
detectPythonEntrypointFunction · 0.85
entrypointToModuleFunction · 0.85

Tested by

no test coverage detected