1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

Migrate provider service to state provider (#8173)

* Migrate existing provider data to StateProvider

Migrate existing provider data to StateProvider

* Rework the ProviderService to call StateProvider

* Unit test the ProviderService

* Update DI to reflect ProviderService's new args

* Add ProviderService to logout chains across products

* Remove provider related stateService methods

* Update libs/common/src/state-migrations/migrations/28-move-provider-state-to-state-provider.spec.ts

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>

* Cover up a copy/paste job

* Compare equality over entire array in a test

---------

Co-authored-by: Justin Baur <19896123+justindbaur@users.noreply.github.com>
This commit is contained in:
Addison Beck
2024-03-05 13:35:12 -06:00
committed by GitHub
parent 5cd53c3a7d
commit 101e1a4f2b
13 changed files with 378 additions and 65 deletions

View File

@@ -388,7 +388,7 @@ export class Main {
this.stateProvider,
);
this.providerService = new ProviderService(this.stateService);
this.providerService = new ProviderService(this.stateProvider);
this.organizationService = new OrganizationService(this.stateService, this.stateProvider);
@@ -655,6 +655,7 @@ export class Main {
this.collectionService.clear(userId as UserId),
this.policyService.clear(userId),
this.passwordGenerationService.clear(),
this.providerService.save(null, userId as UserId),
]);
await this.stateEventRunnerService.handleEvent("logout", userId as UserId);