(stateFile?: string)
| 56 | |
| 57 | // Reads resolve to the legacy `~/.context7` file if migration could not move it. |
| 58 | async function readStateFilePath(stateFile?: string): Promise<string> { |
| 59 | if (stateFile) { |
| 60 | return stateFile; |
| 61 | } |
| 62 | return resolveReadPath(UPDATE_STATE_FILE_NAME, getUpdateStateFilePath()); |
| 63 | } |
| 64 | |
| 65 | // Writes always target the XDG path; migrate the legacy file first if present. |
| 66 | async function writeStateFilePath(stateFile?: string): Promise<string> { |
no test coverage detected