(json: string)
| 171 | * Import settings from JSON |
| 172 | */ |
| 173 | export async function importSettings(json: string): Promise<void> { |
| 174 | try { |
| 175 | const settings = JSON.parse(json); |
| 176 | const store = await getSettingsStore(); |
| 177 | store.set(settings); |
| 178 | } catch { |
| 179 | throw new Error('Invalid settings JSON'); |
| 180 | } |
| 181 | } |
nothing calls this directly
no test coverage detected