( workPath: string )
| 246 | } |
| 247 | |
| 248 | export async function getVercelToolsEntrypoint( |
| 249 | workPath: string |
| 250 | ): Promise<PythonEntrypoint | null> { |
| 251 | const pyprojectData = await readConfigFile<{ |
| 252 | tool?: { vercel?: { entrypoint?: unknown } }; |
| 253 | }>(join(workPath, 'pyproject.toml')); |
| 254 | if (!pyprojectData) return null; |
| 255 | |
| 256 | const vercelEntrypoint = pyprojectData.tool?.vercel?.entrypoint; |
| 257 | if (typeof vercelEntrypoint !== 'string') return null; |
| 258 | return resolveModuleAttrEntrypoint(workPath, vercelEntrypoint); |
| 259 | } |
| 260 | |
| 261 | // Legacy: kept for compatibility. Prefer tool.vercel.entrypoint. |
| 262 | export async function getPyprojectScriptsEntrypoint( |
no test coverage detected