1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-22 19:23:24 +00:00

Remove folder service from importers as it's no longer needed

This commit is contained in:
Hinton
2022-04-20 11:04:06 +02:00
parent a75962a49e
commit 0d0da32d88
5 changed files with 6 additions and 30 deletions

View File

@@ -1,4 +1,3 @@
import { FolderService } from "jslib-common/abstractions/folder.service";
import { FolderView } from "jslib-common/models/view/folderView";
import { CryptoService } from "../abstractions/crypto.service";
@@ -16,11 +15,7 @@ export class BitwardenJsonImporter extends BaseImporter implements Importer {
private results: any;
private result: ImportResult;
constructor(
protected cryptoService: CryptoService,
protected i18nService: I18nService,
private folderService: FolderService
) {
constructor(protected cryptoService: CryptoService, protected i18nService: I18nService) {
super();
}

View File

@@ -1,5 +1,3 @@
import { FolderService } from "jslib-common/abstractions/folder.service";
import { CryptoService } from "../abstractions/crypto.service";
import { I18nService } from "../abstractions/i18n.service";
import { KdfType } from "../enums/kdfType";
@@ -23,13 +21,8 @@ interface BitwardenPasswordProtectedFileFormat {
export class BitwardenPasswordProtectedImporter extends BitwardenJsonImporter implements Importer {
private key: SymmetricCryptoKey;
constructor(
cryptoService: CryptoService,
i18nService: I18nService,
folderService: FolderService,
private password: string
) {
super(cryptoService, i18nService, folderService);
constructor(cryptoService: CryptoService, i18nService: I18nService, private password: string) {
super(cryptoService, i18nService);
}
async parse(data: string): Promise<ImportResult> {

View File

@@ -163,12 +163,11 @@ export class ImportService implements ImportServiceAbstraction {
case "bitwardencsv":
return new BitwardenCsvImporter();
case "bitwardenjson":
return new BitwardenJsonImporter(this.cryptoService, this.i18nService, this.folderService);
return new BitwardenJsonImporter(this.cryptoService, this.i18nService);
case "bitwardenpasswordprotected":
return new BitwardenPasswordProtectedImporter(
this.cryptoService,
this.i18nService,
this.folderService,
password
);
case "lastpasscsv":