use common/utils/singleton class for the stores

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2020-07-03 16:57:31 +03:00
1 parent d7cffeb7a8
commit 776fc4462c
14 files changed
+263 -307

No files matched your search

+3 -1
View File
@@ -1,3 +1,4 @@
import path from "path";
import ElectronStore from "electron-store";
import { isTestEnv } from "../common/vars";
@@ -14,7 +15,8 @@ function infoLog(...args: any[]) {
export function migration({ version, run }: MigrationOpts) {
return {
[version]: (store: ElectronStore) => {
infoLog(`CLUSTER STORE, MIGRATION: ${version}`);
const storeName = path.dirname(store.path);
infoLog(`STORE MIGRATION (${storeName}): ${version}`, );
run(store, infoLog);
}
};