(id: string, name: string, theme: Theme)
| 167 | } |
| 168 | |
| 169 | export async function setTheme(id: string, name: string, theme: Theme): Promise<void> { |
| 170 | const file = storePath() |
| 171 | await Flock.withLock(lock(file), async () => { |
| 172 | const store = await read(file) |
| 173 | const entry = store[id] |
| 174 | if (!entry) return |
| 175 | entry.themes = { |
| 176 | ...entry.themes, |
| 177 | [name]: theme, |
| 178 | } |
| 179 | await Filesystem.writeJson(file, store) |
| 180 | }) |
| 181 | } |
| 182 | |
| 183 | export async function list(): Promise<Store> { |
| 184 | const file = storePath() |
no test coverage detected