(questionId: string, preference: string)
| 45 | }); |
| 46 | |
| 47 | function writeProjectPref(questionId: string, preference: string): void { |
| 48 | const f = path.join(stateRoot, 'projects', cwdSlug, 'question-preferences.json'); |
| 49 | let prefs: Record<string, string> = {}; |
| 50 | if (fs.existsSync(f)) prefs = JSON.parse(fs.readFileSync(f, 'utf-8')); |
| 51 | prefs[questionId] = preference; |
| 52 | fs.writeFileSync(f, JSON.stringify(prefs, null, 2)); |
| 53 | } |
| 54 | |
| 55 | function writeGlobalPref(questionId: string, preference: string): void { |
| 56 | const f = path.join(stateRoot, 'global-question-preferences.json'); |
no outgoing calls
no test coverage detected