(options: { stateDir: string })
| 307 | } |
| 308 | |
| 309 | export function removeCliSession(options: { stateDir: string }): boolean { |
| 310 | const filePath = resolveCliSessionPath(options.stateDir); |
| 311 | if (!fs.existsSync(filePath)) return false; |
| 312 | fs.rmSync(filePath, { force: true }); |
| 313 | return true; |
| 314 | } |
| 315 | |
| 316 | export function resolveCliSessionPath(stateDir: string): string { |
| 317 | return path.join(stateDir, 'auth', 'cli-session.json'); |
no test coverage detected