(store: string)
| 149 | |
| 150 | /** Archive a store by renaming it to <store>.archived */ |
| 151 | export function archiveStore(store: string): void { |
| 152 | validateStoreName(store) |
| 153 | const storeDir = getStoreDir(store) |
| 154 | if (!existsSync(storeDir)) { |
| 155 | throw new Error(`Store "${store}" does not exist`) |
| 156 | } |
| 157 | const archivedDir = storeDir + '.archived' |
| 158 | renameSync(storeDir, archivedDir) |
| 159 | } |
| 160 | |
| 161 | /** Write an entry to a store. Creates the store dir if needed. */ |
| 162 | export function setEntry(store: string, key: string, value: string): void { |
no test coverage detected