(marimoFilePath: string)
| 42 | * @returns Path to the session cache file, or null if not found |
| 43 | */ |
| 44 | export async function findMarimoSessionCache(marimoFilePath: string): Promise<string | null> { |
| 45 | const dir = dirname(marimoFilePath) |
| 46 | const filename = basename(marimoFilePath) |
| 47 | const sessionPath = join(dir, '__marimo__', 'session', `${filename}.json`) |
| 48 | |
| 49 | try { |
| 50 | await fs.access(sessionPath) |
| 51 | return sessionPath |
| 52 | } catch { |
| 53 | return null |
| 54 | } |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * Reads and parses a Marimo session cache file. |
no outgoing calls
no test coverage detected