mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 14:23:32 +00:00
[PM-7837] Move SyncService to Platform Ownership (#9055)
* Move * Update References In Unowned Files * Update References In Vault Files * Update Web AppComponent * Add Import
This commit is contained in:
@@ -187,6 +187,9 @@ import { DefaultStateProvider } from "@bitwarden/common/platform/state/implement
|
||||
import { StateEventRegistrarService } from "@bitwarden/common/platform/state/state-event-registrar.service";
|
||||
import { StateEventRunnerService } from "@bitwarden/common/platform/state/state-event-runner.service";
|
||||
/* eslint-enable import/no-restricted-paths */
|
||||
import { SyncService } from "@bitwarden/common/platform/sync";
|
||||
// eslint-disable-next-line no-restricted-imports -- Needed for DI
|
||||
import { DefaultSyncService } from "@bitwarden/common/platform/sync/internal";
|
||||
import {
|
||||
DefaultThemeStateService,
|
||||
ThemeStateService,
|
||||
@@ -226,8 +229,6 @@ import {
|
||||
FolderService as FolderServiceAbstraction,
|
||||
InternalFolderService,
|
||||
} from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
|
||||
import { SyncNotifierService as SyncNotifierServiceAbstraction } from "@bitwarden/common/vault/abstractions/sync/sync-notifier.service.abstraction";
|
||||
import { SyncService as SyncServiceAbstraction } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction";
|
||||
import { TotpService as TotpServiceAbstraction } from "@bitwarden/common/vault/abstractions/totp.service";
|
||||
import { VaultSettingsService as VaultSettingsServiceAbstraction } from "@bitwarden/common/vault/abstractions/vault-settings/vault-settings.service";
|
||||
import { CipherService } from "@bitwarden/common/vault/services/cipher.service";
|
||||
@@ -235,8 +236,6 @@ import { CollectionService } from "@bitwarden/common/vault/services/collection.s
|
||||
import { CipherFileUploadService } from "@bitwarden/common/vault/services/file-upload/cipher-file-upload.service";
|
||||
import { FolderApiService } from "@bitwarden/common/vault/services/folder/folder-api.service";
|
||||
import { FolderService } from "@bitwarden/common/vault/services/folder/folder.service";
|
||||
import { SyncNotifierService } from "@bitwarden/common/vault/services/sync/sync-notifier.service";
|
||||
import { SyncService } from "@bitwarden/common/vault/services/sync/sync.service";
|
||||
import { TotpService } from "@bitwarden/common/vault/services/totp.service";
|
||||
import { VaultSettingsService } from "@bitwarden/common/vault/services/vault-settings/vault-settings.service";
|
||||
import { ToastService } from "@bitwarden/components";
|
||||
@@ -644,8 +643,8 @@ const safeProviders: SafeProvider[] = [
|
||||
deps: [ApiServiceAbstraction, FileUploadServiceAbstraction, InternalSendService],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: SyncServiceAbstraction,
|
||||
useClass: SyncService,
|
||||
provide: SyncService,
|
||||
useClass: DefaultSyncService,
|
||||
deps: [
|
||||
InternalMasterPasswordServiceAbstraction,
|
||||
AccountServiceAbstraction,
|
||||
@@ -796,7 +795,7 @@ const safeProviders: SafeProvider[] = [
|
||||
useClass: devFlagEnabled("noopNotifications") ? NoopNotificationsService : NotificationsService,
|
||||
deps: [
|
||||
LogService,
|
||||
SyncServiceAbstraction,
|
||||
SyncService,
|
||||
AppIdServiceAbstraction,
|
||||
ApiServiceAbstraction,
|
||||
EnvironmentService,
|
||||
@@ -942,12 +941,7 @@ const safeProviders: SafeProvider[] = [
|
||||
// it depends on SyncService so that new data can be retrieved through the sync
|
||||
// rather than updating the OrganizationService directly. Instead OrganizationService
|
||||
// subscribes to sync notifications and will update itself based on that.
|
||||
deps: [ApiServiceAbstraction, SyncServiceAbstraction],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: SyncNotifierServiceAbstraction,
|
||||
useClass: SyncNotifierService,
|
||||
deps: [],
|
||||
deps: [ApiServiceAbstraction, SyncService],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: DefaultConfigService,
|
||||
@@ -1122,7 +1116,7 @@ const safeProviders: SafeProvider[] = [
|
||||
EncryptService,
|
||||
I18nServiceAbstraction,
|
||||
OrganizationApiServiceAbstraction,
|
||||
SyncServiceAbstraction,
|
||||
SyncService,
|
||||
],
|
||||
}),
|
||||
safeProvider({
|
||||
|
||||
Reference in New Issue
Block a user