1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

[PM-4031] Add libs/importer to browser and desktop (#6373)

* Import libs/importer and instantiate ImportService

* Create ImportApi and ImportService factories

* Add libs/importer to desktop

* [PM-4075] Setup Feature Flag for Browser Fileless Import (#6391)

* Update apps/browser/src/tools/background/service_factories/import-api-service.factory.ts

Co-authored-by:  Audrey  <ajensen@bitwarden.com>

* Created non-exported ServiceCache-type for ImportApiServiceFactory

---------

Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Cesar Gonzalez <cesar.a.gonzalezcs@gmail.com>
Co-authored-by:  Audrey  <ajensen@bitwarden.com>
This commit is contained in:
Daniel James Smith
2023-10-03 18:33:49 +02:00
committed by GitHub
parent 512af1e923
commit 0dd1aeba9f
9 changed files with 140 additions and 0 deletions

View File

@@ -150,6 +150,12 @@ import {
VaultExportService,
VaultExportServiceAbstraction,
} from "@bitwarden/exporter/vault-export";
import {
ImportApiService,
ImportApiServiceAbstraction,
ImportService,
ImportServiceAbstraction,
} from "@bitwarden/importer";
import { AuthGuard } from "../auth/guards/auth.guard";
import { UnauthGuard } from "../auth/guards/unauth.guard";
@@ -485,6 +491,23 @@ import { AbstractThemingService } from "./theming/theming.service.abstraction";
STATE_SERVICE_USE_CACHE,
],
},
{
provide: ImportApiServiceAbstraction,
useClass: ImportApiService,
deps: [ApiServiceAbstraction],
},
{
provide: ImportServiceAbstraction,
useClass: ImportService,
deps: [
CipherServiceAbstraction,
FolderServiceAbstraction,
ImportApiServiceAbstraction,
I18nServiceAbstraction,
CollectionServiceAbstraction,
CryptoServiceAbstraction,
],
},
{
provide: VaultExportServiceAbstraction,
useClass: VaultExportService,

View File

@@ -3,6 +3,7 @@ export enum FeatureFlag {
DisplayLowKdfIterationWarningFlag = "display-kdf-iteration-warning",
TrustedDeviceEncryption = "trusted-device-encryption",
AutofillV2 = "autofill-v2",
BrowserFilelessImport = "browser-fileless-import",
}
// Replace this with a type safe lookup of the feature flag values in PM-2282