1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

lowdb storage service

This commit is contained in:
Kyle Spearrin
2018-05-16 15:22:32 -04:00
parent 2ebacc3f0c
commit cd54aedb9f
5 changed files with 89 additions and 84 deletions

View File

@@ -1,9 +1,9 @@
import { AuthService } from 'jslib/services/auth.service';
import { I18nService } from './services/i18n.service';
import { LowdbStorageService } from './services/lowdbStorage.service';
import { NodeEnvSecureStorageService } from './services/nodeEnvSecureStorage.service';
import { NodePlatformUtilsService } from './services/nodePlatformUtils.service';
import { NodeStorageService } from './services/nodeStorage.service';
import { NoopMessagingService } from './services/noopMessaging.service';
import { AppIdService } from 'jslib/services/appId.service';
@@ -29,8 +29,8 @@ import { Program } from './program';
export class Main {
messagingService: NoopMessagingService;
storageService: NodeStorageService;
secureStorageService: NodeStorageService;
storageService: LowdbStorageService;
secureStorageService: NodeEnvSecureStorageService;
i18nService: I18nService;
platformUtilsService: NodePlatformUtilsService;
constantsService: ConstantsService;
@@ -58,7 +58,7 @@ export class Main {
this.i18nService = new I18nService('en', './locales');
this.platformUtilsService = new NodePlatformUtilsService();
this.cryptoFunctionService = new NodeCryptoFunctionService();
this.storageService = new NodeStorageService('Bitwarden CLI');
this.storageService = new LowdbStorageService('Bitwarden CLI');
this.secureStorageService = new NodeEnvSecureStorageService(this.storageService, () => this.cryptoService);
this.cryptoService = new CryptoService(this.storageService, this.secureStorageService,
this.cryptoFunctionService);