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:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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> {
|
||||
|
||||
@@ -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":
|
||||
|
||||
Reference in New Issue
Block a user