MCPcopy Create free account
hub / github.com/deepnote/deepnote / findMarimoSessionCache

Function findMarimoSessionCache

packages/convert/src/snapshot/marimo-outputs.ts:44–55  ·  view source on GitHub ↗
(marimoFilePath: string)

Source from the content-addressed store, hash-verified

42 * @returns Path to the session cache file, or null if not found
43 */
44export 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.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected