mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-11 13:53:22 +00:00
replace electron store with lowdb
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { remote } from 'electron';
|
||||
|
||||
import {
|
||||
APP_INITIALIZER,
|
||||
NgModule,
|
||||
@@ -9,7 +11,6 @@ import { ElectronLogService } from 'jslib/electron/services/electronLog.service'
|
||||
import { ElectronPlatformUtilsService } from 'jslib/electron/services/electronPlatformUtils.service';
|
||||
import { ElectronRendererMessagingService } from 'jslib/electron/services/electronRendererMessaging.service';
|
||||
import { ElectronRendererSecureStorageService } from 'jslib/electron/services/electronRendererSecureStorage.service';
|
||||
import { ElectronStorageService } from 'jslib/electron/services/electronStorage.service';
|
||||
import { isDev } from 'jslib/electron/utils';
|
||||
|
||||
import { AuthGuardService } from './auth-guard.service';
|
||||
@@ -31,6 +32,7 @@ import { ConstantsService } from 'jslib/services/constants.service';
|
||||
import { ContainerService } from 'jslib/services/container.service';
|
||||
import { CryptoService } from 'jslib/services/crypto.service';
|
||||
import { EnvironmentService } from 'jslib/services/environment.service';
|
||||
import { LowdbStorageService } from 'jslib/services/lowdbStorage.service';
|
||||
import { NodeCryptoFunctionService } from 'jslib/services/nodeCryptoFunction.service';
|
||||
import { StateService } from 'jslib/services/state.service';
|
||||
import { TokenService } from 'jslib/services/token.service';
|
||||
@@ -57,7 +59,7 @@ const stateService = new StateService();
|
||||
const platformUtilsService = new ElectronPlatformUtilsService(i18nService, true);
|
||||
const broadcasterService = new BroadcasterService();
|
||||
const messagingService = new ElectronRendererMessagingService(broadcasterService);
|
||||
const storageService: StorageServiceAbstraction = new ElectronStorageService();
|
||||
const storageService: StorageServiceAbstraction = new LowdbStorageService(null, remote.app.getPath('userData'));
|
||||
const secureStorageService: StorageServiceAbstraction = new ElectronRendererSecureStorageService();
|
||||
const cryptoFunctionService: CryptoFunctionServiceAbstraction = new NodeCryptoFunctionService();
|
||||
const cryptoService = new CryptoService(storageService, secureStorageService, cryptoFunctionService);
|
||||
|
||||
Reference in New Issue
Block a user