(sourceId: string, env?: NodeJS.ProcessEnv)
| 453 | * (mirrors `probeSource`/`sourcePageCount` in lib/gbrain-sources.ts). |
| 454 | */ |
| 455 | export function sourceLocalPath(sourceId: string, env?: NodeJS.ProcessEnv): string | null { |
| 456 | const raw = execGbrainJson<unknown>( |
| 457 | ["sources", "list", "--json"], |
| 458 | { baseEnv: env }, |
| 459 | ); |
| 460 | if (!raw) return null; |
| 461 | const found = parseSourcesList(raw).find((s) => s.id === sourceId); |
| 462 | return found?.local_path ?? null; |
| 463 | } |
| 464 | |
| 465 | /** Result of `planHostnameFoldMigration` — informs `runCodeImport` of next steps. */ |
| 466 | export type HostnameFoldMigration = |
no test coverage detected