( workPath: string )
| 260 | |
| 261 | // Legacy: kept for compatibility. Prefer tool.vercel.entrypoint. |
| 262 | export 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 | |
| 278 | interface PyprojectEntrypointResult { |
| 279 | entrypoint: PythonEntrypoint | null; |
nothing calls this directly
no test coverage detected