Extension store base class + rename main/renderer-extensions -> extensions (#1107)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen authored and GitHub committed 2020-10-21 13:55:50 +03:00
1 parent 8f8dd9eb45
commit 91bef77997
31 files changed
+95 -121

No files matched your search

+5 -1
View File
@@ -56,13 +56,17 @@ export class BaseStore<T = any> extends Singleton {
...confOptions,
projectName: "lens",
projectVersion: getAppVersion(),
cwd: (app || remote.app).getPath("userData"),
cwd: this.storePath(),
});
logger.info(`[STORE]: LOADED from ${this.storeConfig.path}`);
this.fromStore(this.storeConfig.store);
this.isLoaded = true;
}
protected storePath() {
return (app || remote.app).getPath("userData")
}
protected async saveToFile(model: T) {
logger.info(`[STORE]: SAVING ${this.name}`);
// todo: update when fixed https://github.com/sindresorhus/conf/issues/114