1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 07:13:32 +00:00

[PM-5535] Migrate Environment Service to StateProvider (#7621)

* Migrate EnvironmentService

* Move Migration Test Helper

* Claim StateDefinition

* Add State Migration

* Update StateServices

* Update EnvironmentService Abstraction

* Update DI

* Update Browser Instantiation

* Fix BrowserEnvironmentService

* Update Desktop & CLI Instantiation

* Update Usage

* Create isStringRecord helper

* Fix Old Tests

* Use Existing AccountService

* Don't Rely on Parameter Mutation

* Fix Conflicts
This commit is contained in:
Justin Baur
2024-01-24 14:21:50 -05:00
committed by GitHub
parent 842fa5153b
commit c1d5351075
26 changed files with 648 additions and 232 deletions

View File

@@ -1,5 +1,7 @@
import { Observable } from "rxjs";
import { UserId } from "../../types/guid";
export type Urls = {
base?: string;
webVault?: string;
@@ -52,6 +54,12 @@ export abstract class EnvironmentService {
* @param {Region} region - The region of the cloud web vault app.
*/
setCloudWebVaultUrl: (region: Region) => void;
/**
* Seed the environment for a given user based on the globally set defaults.
*/
seedUserEnvironment: (userId: UserId) => Promise<void>;
getSendUrl: () => string;
getIconsUrl: () => string;
getApiUrl: () => string;