mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
Resolve state <-> state-test-utils circular dependency (#16093)
* Resolve state <-> state-test-utils circular dependency * Fix type errors
This commit is contained in:
@@ -93,10 +93,7 @@ import { DefaultSdkClientFactory } from "@bitwarden/common/platform/services/sdk
|
||||
import { NoopSdkClientFactory } from "@bitwarden/common/platform/services/sdk/noop-sdk-client-factory";
|
||||
import { NoopSdkLoadService } from "@bitwarden/common/platform/services/sdk/noop-sdk-load.service";
|
||||
import { StorageServiceProvider } from "@bitwarden/common/platform/services/storage-service.provider";
|
||||
/* eslint-disable import/no-restricted-paths -- Implementation for memory storage */
|
||||
import { GlobalStateProvider, StateProvider } from "@bitwarden/common/platform/state";
|
||||
import { MemoryStorageService as MemoryStorageServiceForStateProviders } from "@bitwarden/common/platform/state/storage/memory-storage.service";
|
||||
/* eslint-enable import/no-restricted-paths -- Implementation for memory storage */
|
||||
import { WindowStorageService } from "@bitwarden/common/platform/storage/window-storage.service";
|
||||
import {
|
||||
DefaultThemeStateService,
|
||||
@@ -110,6 +107,7 @@ import {
|
||||
BiometricsService,
|
||||
} from "@bitwarden/key-management";
|
||||
import { LockComponentService } from "@bitwarden/key-management-ui";
|
||||
import { SerializedMemoryStorageService } from "@bitwarden/storage-core";
|
||||
import { DefaultSshImportPromptService, SshImportPromptService } from "@bitwarden/vault";
|
||||
import { WebOrganizationInviteService } from "@bitwarden/web-vault/app/auth/core/services/organization-invite/web-organization-invite.service";
|
||||
|
||||
@@ -186,7 +184,7 @@ const safeProviders: SafeProvider[] = [
|
||||
}),
|
||||
safeProvider({
|
||||
provide: OBSERVABLE_MEMORY_STORAGE,
|
||||
useClass: MemoryStorageServiceForStateProviders,
|
||||
useClass: SerializedMemoryStorageService,
|
||||
deps: [],
|
||||
}),
|
||||
safeProvider({
|
||||
|
||||
@@ -2,14 +2,11 @@ import { mock } from "jest-mock-extended";
|
||||
|
||||
import {
|
||||
AbstractStorageService,
|
||||
ObservableStorageService,
|
||||
} from "@bitwarden/common/platform/abstractions/storage.service";
|
||||
import { PossibleLocation } from "@bitwarden/common/platform/services/storage-service.provider";
|
||||
import {
|
||||
ClientLocations,
|
||||
ObservableStorageService,
|
||||
PossibleLocation,
|
||||
StorageLocation,
|
||||
// eslint-disable-next-line import/no-restricted-paths
|
||||
} from "@bitwarden/common/platform/state/state-definition";
|
||||
} from "@bitwarden/storage-core";
|
||||
|
||||
import { WebStorageServiceProvider } from "./web-storage-service.provider";
|
||||
|
||||
|
||||
@@ -1,15 +1,10 @@
|
||||
import {
|
||||
AbstractStorageService,
|
||||
ClientLocations,
|
||||
ObservableStorageService,
|
||||
} from "@bitwarden/common/platform/abstractions/storage.service";
|
||||
import {
|
||||
PossibleLocation,
|
||||
StorageServiceProvider,
|
||||
} from "@bitwarden/common/platform/services/storage-service.provider";
|
||||
import {
|
||||
ClientLocations,
|
||||
// eslint-disable-next-line import/no-restricted-paths
|
||||
} from "@bitwarden/common/platform/state/state-definition";
|
||||
} from "@bitwarden/storage-core";
|
||||
|
||||
export class WebStorageServiceProvider extends StorageServiceProvider {
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user