(tomlText: string)
| 115 | } |
| 116 | |
| 117 | export function parseTuiConfig(tomlText: string): TuiConfig { |
| 118 | if (tomlText.trim().length === 0) { |
| 119 | return DEFAULT_TUI_CONFIG; |
| 120 | } |
| 121 | const raw = parseToml(tomlText) as Record<string, unknown>; |
| 122 | const parsed = TuiConfigFileSchema.parse(raw); |
| 123 | return normalizeTuiConfig(parsed); |
| 124 | } |
| 125 | |
| 126 | export async function saveTuiConfig( |
| 127 | config: TuiConfig, |
no test coverage detected