mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
use common/utils/singleton class for the stores
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
1 parent
d7cffeb7a8
commit
776fc4462c
14 files changed
+263
-307
No files matched your search
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user