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

Function getPyprojectScriptsEntrypoint

packages/python/src/entrypoint.ts:262–276  ·  view source on GitHub ↗
(
  workPath: string
)

Source from the content-addressed store, hash-verified

260
261// Legacy: kept for compatibility. Prefer tool.vercel.entrypoint.
262export async function getPyprojectScriptsEntrypoint(
263 workPath: string
264): Promise<PythonEntrypoint | null> {
265 const pyprojectData = await readConfigFile<{
266 project?: { scripts?: Record<string, unknown> };
267 }>(join(workPath, 'pyproject.toml'));
268 if (!pyprojectData) return null;
269
270 const scripts = pyprojectData.project?.scripts as
271 | Record<string, unknown>
272 | undefined;
273 const appScript = scripts?.app;
274 if (typeof appScript !== 'string') return null;
275 return resolveModuleAttrEntrypoint(workPath, appScript);
276}
277
278interface PyprojectEntrypointResult {
279 entrypoint: PythonEntrypoint | null;

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected