From 7167dd3fb7f00a3384e2a83fa594e0ef4ef2fe40 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 17 May 2018 10:57:52 -0400 Subject: [PATCH] add support for export service --- jslib | 2 +- src/background/main.background.ts | 4 ++++ src/popup/services/services.module.ts | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/jslib b/jslib index cf5bce1ea9..ba10d07042 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit cf5bce1ea91ebbc1c99a550b62114a88bfeb2036 +Subproject commit ba10d0704212f2bc8fabf0d3d6ebb552fd183401 diff --git a/src/background/main.background.ts b/src/background/main.background.ts index 4b45de4761..901c31ee0f 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -19,6 +19,7 @@ import { TotpService, UserService, } from 'jslib/services'; +import { ExportService } from 'jslib/services/export.service'; import { WebCryptoFunctionService } from 'jslib/services/webCryptoFunction.service'; import { @@ -43,6 +44,7 @@ import { UserService as UserServiceAbstraction, } from 'jslib/abstractions'; import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from 'jslib/abstractions/cryptoFunction.service'; +import { ExportService as ExportServiceAbstraction } from 'jslib/abstractions/export.service'; import { Analytics } from 'jslib/misc'; @@ -88,6 +90,7 @@ export default class MainBackground { autofillService: AutofillServiceAbstraction; containerService: ContainerService; auditService: AuditServiceAbstraction; + exportService: ExportServiceAbstraction; analytics: Analytics; onUpdatedRan: boolean; @@ -146,6 +149,7 @@ export default class MainBackground { this.totpService); this.containerService = new ContainerService(this.cryptoService, this.platformUtilsService); this.auditService = new AuditService(cryptoFunctionService); + this.exportService = new ExportService(this.folderService, this.cipherService); this.analytics = new Analytics(window, () => BrowserApi.gaFilter(), this.platformUtilsService, this.storageService, this.appIdService); diff --git a/src/popup/services/services.module.ts b/src/popup/services/services.module.ts index 398520b35a..e874615df9 100644 --- a/src/popup/services/services.module.ts +++ b/src/popup/services/services.module.ts @@ -21,6 +21,7 @@ import { CipherService } from 'jslib/abstractions/cipher.service'; import { CollectionService } from 'jslib/abstractions/collection.service'; import { CryptoService } from 'jslib/abstractions/crypto.service'; import { EnvironmentService } from 'jslib/abstractions/environment.service'; +import { ExportService } from 'jslib/abstractions/export.service'; import { FolderService } from 'jslib/abstractions/folder.service'; import { I18nService } from 'jslib/abstractions/i18n.service'; import { LockService } from 'jslib/abstractions/lock.service'; @@ -131,6 +132,7 @@ export function initFactory(i18nService: I18nService, storageService: StorageSer { provide: StorageService, useFactory: getBgService('storageService'), deps: [] }, { provide: AppIdService, useFactory: getBgService('appIdService'), deps: [] }, { provide: AutofillService, useFactory: getBgService('autofillService'), deps: [] }, + { provide: ExportService, useFactory: getBgService('exportService'), deps: [] }, { provide: APP_INITIALIZER, useFactory: initFactory,