(dbPath: string)
| 58 | * Initialize SqliteSaver with the database path |
| 59 | */ |
| 60 | export function initializeSqliteSaver(dbPath: string): SqliteSaver { |
| 61 | // Ensure the directory exists |
| 62 | const dbDir = path.dirname(dbPath); |
| 63 | if (!fs.existsSync(dbDir)) { |
| 64 | fs.mkdirSync(dbDir, { recursive: true }); |
| 65 | } |
| 66 | |
| 67 | // SqliteSaver.fromConnString already sets up the database |
| 68 | const checkpointer = SqliteSaver.fromConnString(dbPath); |
| 69 | return checkpointer; |
| 70 | } |
no outgoing calls
no test coverage detected