(root: string)
| 17 | } |
| 18 | |
| 19 | function createPathProvider(root: string): PathProvider { |
| 20 | return { |
| 21 | getSystemDir: () => root, |
| 22 | getUserDataDir: () => path.join(root, 'data'), |
| 23 | getDatabaseDir: () => path.join(root, 'data', 'databases'), |
| 24 | getVectorDir: () => path.join(root, 'data', 'vector'), |
| 25 | getAiDataDir: () => path.join(root, 'ai'), |
| 26 | getSettingsDir: () => path.join(root, 'settings'), |
| 27 | getCacheDir: () => path.join(root, 'cache'), |
| 28 | getTempDir: () => path.join(root, 'temp'), |
| 29 | getLogsDir: () => path.join(root, 'logs'), |
| 30 | getDownloadsDir: () => path.join(root, 'downloads'), |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | function getIndexNames(db: Database.Database): string[] { |
| 35 | const rows = db.prepare("SELECT name FROM sqlite_master WHERE type = 'index' ORDER BY name").all() as Array<{ |
no outgoing calls
no test coverage detected