(source: string)
| 31 | * ``` |
| 32 | */ |
| 33 | export 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. |
no test coverage detected