mirror of
https://github.com/bitwarden/browser
synced 2026-02-24 08:33:29 +00:00
Move into @bitwarden/key-management
This commit is contained in:
@@ -9,8 +9,12 @@ import {
|
||||
import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { KeyService, BiometricsService } from "@bitwarden/key-management";
|
||||
import { BiometricsDisableReason, UnlockOptions } from "@bitwarden/key-management/angular";
|
||||
import {
|
||||
KeyService,
|
||||
BiometricsService,
|
||||
BiometricsDisableReason,
|
||||
UnlockOptions,
|
||||
} from "@bitwarden/key-management";
|
||||
|
||||
import { BrowserRouterService } from "../../../platform/popup/services/browser-router.service";
|
||||
|
||||
|
||||
@@ -11,12 +11,13 @@ import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaul
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { KeySuffixOptions } from "@bitwarden/common/platform/enums";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { KeyService, BiometricsService } from "@bitwarden/key-management";
|
||||
import {
|
||||
KeyService,
|
||||
BiometricsService,
|
||||
LockComponentService,
|
||||
BiometricsDisableReason,
|
||||
UnlockOptions,
|
||||
} from "@bitwarden/key-management/angular";
|
||||
} from "@bitwarden/key-management";
|
||||
|
||||
import { BiometricErrors, BiometricErrorTypes } from "../../../models/biometricErrors";
|
||||
import { BrowserRouterService } from "../../../platform/popup/services/browser-router.service";
|
||||
|
||||
@@ -42,7 +42,7 @@ import {
|
||||
TwoFactorTimeoutIcon,
|
||||
} from "@bitwarden/auth/angular";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { LockV2Component } from "@bitwarden/key-management/angular";
|
||||
import { LockV2Component } from "@bitwarden/key-management";
|
||||
|
||||
import { twofactorRefactorSwap } from "../../../../libs/angular/src/utils/two-factor-component-refactor-route-swap";
|
||||
import { fido2AuthGuard } from "../auth/guards/fido2-auth.guard";
|
||||
|
||||
@@ -113,8 +113,8 @@ import {
|
||||
KeyService,
|
||||
BiometricStateService,
|
||||
BiometricsService,
|
||||
LockComponentService,
|
||||
} from "@bitwarden/key-management";
|
||||
import { LockComponentService } from "@bitwarden/key-management/angular";
|
||||
import { PasswordRepromptService } from "@bitwarden/vault";
|
||||
|
||||
import { ForegroundLockService } from "../../auth/popup/accounts/foreground-lock.service";
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
"@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"],
|
||||
"@bitwarden/tools-card": ["../../libs/tools/card/src"],
|
||||
"@bitwarden/key-management": ["../../libs/key-management/src"],
|
||||
"@bitwarden/key-management/angular": ["../../libs/key-management/src/angular"],
|
||||
"@bitwarden/vault": ["../../libs/vault/src"]
|
||||
},
|
||||
"plugins": [
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
"../../libs/tools/export/vault-export/vault-export-core/src"
|
||||
],
|
||||
"@bitwarden/key-management": ["../../libs/key-management/src"],
|
||||
"@bitwarden/key-management/angular": ["../../libs/key-management/src/angular"],
|
||||
"@bitwarden/node/*": ["../../libs/node/src/*"]
|
||||
},
|
||||
"plugins": [
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
TwoFactorTimeoutIcon,
|
||||
} from "@bitwarden/auth/angular";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { LockV2Component } from "@bitwarden/key-management/angular";
|
||||
import { LockV2Component } from "@bitwarden/key-management";
|
||||
|
||||
import { twofactorRefactorSwap } from "../../../../libs/angular/src/utils/two-factor-component-refactor-route-swap";
|
||||
import { AccessibilityCookieComponent } from "../auth/accessibility-cookie.component";
|
||||
|
||||
@@ -90,8 +90,8 @@ import {
|
||||
KeyService as KeyServiceAbstraction,
|
||||
BiometricStateService,
|
||||
BiometricsService,
|
||||
LockComponentService,
|
||||
} from "@bitwarden/key-management";
|
||||
import { LockComponentService } from "@bitwarden/key-management/angular";
|
||||
|
||||
import { DesktopLoginApprovalComponentService } from "../../auth/login/desktop-login-approval-component.service";
|
||||
import { DesktopLoginComponentService } from "../../auth/login/desktop-login-component.service";
|
||||
|
||||
@@ -10,8 +10,12 @@ import { VaultTimeoutSettingsService } from "@bitwarden/common/abstractions/vaul
|
||||
import { DeviceType } from "@bitwarden/common/enums";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { KeyService, BiometricsService } from "@bitwarden/key-management";
|
||||
import { BiometricsDisableReason, UnlockOptions } from "@bitwarden/key-management/angular";
|
||||
import {
|
||||
KeyService,
|
||||
BiometricsService,
|
||||
BiometricsDisableReason,
|
||||
UnlockOptions,
|
||||
} from "@bitwarden/key-management";
|
||||
|
||||
import { DesktopLockComponentService } from "./desktop-lock-component.service";
|
||||
|
||||
|
||||
@@ -10,12 +10,13 @@ import { DeviceType } from "@bitwarden/common/enums";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { KeySuffixOptions } from "@bitwarden/common/platform/enums";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { KeyService, BiometricsService } from "@bitwarden/key-management";
|
||||
import {
|
||||
KeyService,
|
||||
BiometricsService,
|
||||
BiometricsDisableReason,
|
||||
LockComponentService,
|
||||
UnlockOptions,
|
||||
} from "@bitwarden/key-management/angular";
|
||||
} from "@bitwarden/key-management";
|
||||
|
||||
export class DesktopLockComponentService implements LockComponentService {
|
||||
private readonly userDecryptionOptionsService = inject(UserDecryptionOptionsServiceAbstraction);
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
"@bitwarden/importer/core": ["../../libs/importer/src"],
|
||||
"@bitwarden/importer/ui": ["../../libs/importer/src/components"],
|
||||
"@bitwarden/key-management": ["../../libs/key-management/src"],
|
||||
"@bitwarden/key-management/angular": ["../../libs/key-management/src/angular"],
|
||||
"@bitwarden/node/*": ["../../libs/node/src/*"],
|
||||
"@bitwarden/platform": ["../../libs/platform/src"],
|
||||
"@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"],
|
||||
|
||||
@@ -90,8 +90,8 @@ import {
|
||||
KdfConfigService,
|
||||
KeyService as KeyServiceAbstraction,
|
||||
BiometricsService,
|
||||
LockComponentService,
|
||||
} from "@bitwarden/key-management";
|
||||
import { LockComponentService } from "@bitwarden/key-management/angular";
|
||||
|
||||
import { flagEnabled } from "../../utils/flags";
|
||||
import { PolicyListService } from "../admin-console/core/policy-list.service";
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
UserDecryptionOptionsServiceAbstraction,
|
||||
} from "@bitwarden/auth/common";
|
||||
import { UserId } from "@bitwarden/common/types/guid";
|
||||
import { LockComponentService, UnlockOptions } from "@bitwarden/key-management/angular";
|
||||
import { LockComponentService, UnlockOptions } from "@bitwarden/key-management";
|
||||
|
||||
export class WebLockComponentService implements LockComponentService {
|
||||
private readonly userDecryptionOptionsService = inject(UserDecryptionOptionsServiceAbstraction);
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
LoginDecryptionOptionsComponent,
|
||||
} from "@bitwarden/auth/angular";
|
||||
import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum";
|
||||
import { LockV2Component } from "@bitwarden/key-management/angular";
|
||||
import { LockV2Component } from "@bitwarden/key-management";
|
||||
|
||||
import { twofactorRefactorSwap } from "../../../../libs/angular/src/utils/two-factor-component-refactor-route-swap";
|
||||
import { flagEnabled, Flags } from "../utils/flags";
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
"@bitwarden/importer/core": ["../../libs/importer/src"],
|
||||
"@bitwarden/importer/ui": ["../../libs/importer/src/components"],
|
||||
"@bitwarden/key-management": ["../../libs/key-management/src"],
|
||||
"@bitwarden/key-management/angular": ["../../libs/key-management/src/angular"],
|
||||
"@bitwarden/platform": ["../../libs/platform/src"],
|
||||
"@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"],
|
||||
"@bitwarden/tools-card": ["../../libs/tools/card/src"],
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
"@bitwarden/generator-history": ["../../libs/tools/generator/extensions/history/src"],
|
||||
"@bitwarden/generator-navigation": ["../../libs/tools/generator/extensions/navigation/src"],
|
||||
"@bitwarden/key-management": ["../../libs/key-management/src"],
|
||||
"@bitwarden/key-management/angular": ["../../libs/key-management/src/angular"],
|
||||
"@bitwarden/vault-export-core": [
|
||||
"../../libs/tools/export/vault-export/vault-export-core/src"
|
||||
],
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"],
|
||||
"@bitwarden/tools-card": ["../../libs/tools/card/src"],
|
||||
"@bitwarden/key-management": ["../../libs/key-management/src"],
|
||||
"@bitwarden/key-management/angular": ["../../libs/key-management/src/angular"],
|
||||
"@bitwarden/platform": ["../../libs/platform/src"],
|
||||
"@bitwarden/vault": ["../../libs/vault/src"],
|
||||
"@bitwarden/web-vault/*": ["../../apps/web/src/*"],
|
||||
|
||||
@@ -17,7 +17,7 @@ import { LogService } from "@bitwarden/common/platform/abstractions/log.service"
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service";
|
||||
import { TableDataSource, NoItemsModule, ToastService } from "@bitwarden/components";
|
||||
import { KeyService } from "@bitwarden/key-management";
|
||||
import { KeyManagementPipesModule, KeyService } from "@bitwarden/key-management";
|
||||
import { Devices } from "@bitwarden/web-vault/app/admin-console/icons";
|
||||
import { LooseComponentsModule } from "@bitwarden/web-vault/app/shared";
|
||||
import { SharedModule } from "@bitwarden/web-vault/app/shared/shared.module";
|
||||
@@ -41,7 +41,7 @@ import { SharedModule } from "@bitwarden/web-vault/app/shared/shared.module";
|
||||
],
|
||||
}),
|
||||
] satisfies SafeProvider[],
|
||||
imports: [SharedModule, NoItemsModule, LooseComponentsModule],
|
||||
imports: [SharedModule, NoItemsModule, LooseComponentsModule, KeyManagementPipesModule],
|
||||
})
|
||||
export class DeviceApprovalsComponent implements OnInit, OnDestroy {
|
||||
tableDataSource = new TableDataSource<PendingAuthRequestView>();
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
"@bitwarden/importer/core": ["../../libs/importer/src"],
|
||||
"@bitwarden/importer/ui": ["../../libs/importer/src/components"],
|
||||
"@bitwarden/key-management": ["../../libs/key-management/src"],
|
||||
"@bitwarden/key-management/angular": ["../../libs/key-management/src/angular"],
|
||||
"@bitwarden/platform": ["../../libs/platform/src"],
|
||||
"@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"],
|
||||
"@bitwarden/tools-card": ["../../libs/tools/card/src"],
|
||||
|
||||
@@ -52,7 +52,6 @@ import { SearchPipe } from "./pipes/search.pipe";
|
||||
import { UserNamePipe } from "./pipes/user-name.pipe";
|
||||
import { UserTypePipe } from "./pipes/user-type.pipe";
|
||||
import { EllipsisPipe } from "./platform/pipes/ellipsis.pipe";
|
||||
import { FingerprintPipe } from "./platform/pipes/fingerprint.pipe";
|
||||
import { I18nPipe } from "./platform/pipes/i18n.pipe";
|
||||
import { PasswordStrengthComponent } from "./tools/password-strength/password-strength.component";
|
||||
import { IconComponent } from "./vault/components/icon.component";
|
||||
@@ -111,7 +110,6 @@ import { IconComponent } from "./vault/components/icon.component";
|
||||
PasswordStrengthComponent,
|
||||
UserTypePipe,
|
||||
IfFeatureDirective,
|
||||
FingerprintPipe,
|
||||
AddAccountCreditDialogComponent,
|
||||
InvoicesComponent,
|
||||
NoInvoicesComponent,
|
||||
@@ -146,7 +144,6 @@ import { IconComponent } from "./vault/components/icon.component";
|
||||
PasswordStrengthComponent,
|
||||
UserTypePipe,
|
||||
IfFeatureDirective,
|
||||
FingerprintPipe,
|
||||
AddAccountCreditDialogComponent,
|
||||
InvoicesComponent,
|
||||
NoInvoicesComponent,
|
||||
@@ -161,7 +158,6 @@ import { IconComponent } from "./vault/components/icon.component";
|
||||
SearchPipe,
|
||||
UserNamePipe,
|
||||
UserTypePipe,
|
||||
FingerprintPipe,
|
||||
PluralizePipe,
|
||||
],
|
||||
})
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* This barrel file should only contain Angular exports
|
||||
*/
|
||||
|
||||
export { LockV2Component } from "./lock/components/lock.component";
|
||||
export {
|
||||
LockComponentService,
|
||||
BiometricsDisableReason,
|
||||
UnlockOptions,
|
||||
} from "./lock/services/lock-component.service";
|
||||
@@ -19,3 +19,13 @@ export { DefaultKdfConfigService } from "./kdf-config.service";
|
||||
export { KdfType } from "./enums/kdf-type.enum";
|
||||
|
||||
export * from "./user-asymmetric-key-regeneration";
|
||||
|
||||
export { LockV2Component } from "./lock/components/lock.component";
|
||||
export {
|
||||
LockComponentService,
|
||||
BiometricsDisableReason,
|
||||
UnlockOptions,
|
||||
} from "./lock/services/lock-component.service";
|
||||
|
||||
export { FingerprintPipe } from "./pipes/fingerprint.pipe";
|
||||
export { KeyManagementPipesModule } from "./pipes/key-management-pipes.module";
|
||||
|
||||
@@ -39,12 +39,10 @@ import {
|
||||
IconButtonModule,
|
||||
ToastService,
|
||||
} from "@bitwarden/components";
|
||||
import {
|
||||
KeyService,
|
||||
BiometricStateService,
|
||||
UserAsymmetricKeysRegenerationService,
|
||||
} from "@bitwarden/key-management";
|
||||
|
||||
import { KeyService } from "../../abstractions/key.service";
|
||||
import { BiometricStateService } from "../../biometrics/biometric-state.service";
|
||||
import { UserAsymmetricKeysRegenerationService } from "../../user-asymmetric-key-regeneration/abstractions/user-asymmetric-key-regeneration.service";
|
||||
import {
|
||||
UnlockOption,
|
||||
LockComponentService,
|
||||
@@ -66,8 +64,8 @@ const clientTypeToSuccessRouteRecord: Partial<Record<ClientType, string>> = {
|
||||
standalone: true,
|
||||
imports: [
|
||||
CommonModule,
|
||||
JslibModule,
|
||||
ReactiveFormsModule,
|
||||
JslibModule,
|
||||
ButtonModule,
|
||||
FormFieldModule,
|
||||
AsyncActionsModule,
|
||||
@@ -1,7 +1,8 @@
|
||||
import { Pipe } from "@angular/core";
|
||||
|
||||
import { Utils } from "@bitwarden/common/platform/misc/utils";
|
||||
import { KeyService } from "@bitwarden/key-management";
|
||||
|
||||
import { KeyService } from "../abstractions/key.service";
|
||||
|
||||
@Pipe({
|
||||
name: "fingerprint",
|
||||
11
libs/key-management/src/pipes/key-management-pipes.module.ts
Normal file
11
libs/key-management/src/pipes/key-management-pipes.module.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
|
||||
import { FingerprintPipe } from "./fingerprint.pipe";
|
||||
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [FingerprintPipe],
|
||||
providers: [],
|
||||
exports: [FingerprintPipe],
|
||||
})
|
||||
export class KeyManagementPipesModule {}
|
||||
@@ -33,7 +33,6 @@
|
||||
"@bitwarden/importer/core": ["./libs/importer/src"],
|
||||
"@bitwarden/importer/ui": ["./libs/importer/src/components"],
|
||||
"@bitwarden/key-management": ["./libs/key-management/src"],
|
||||
"@bitwarden/key-management/angular": ["./libs/key-management/src/angular"],
|
||||
"@bitwarden/platform": ["./libs/platform/src"],
|
||||
"@bitwarden/send-ui": ["./libs/tools/send/send-ui/src"],
|
||||
"@bitwarden/tools-card": ["./libs/tools/card/src"],
|
||||
|
||||
Reference in New Issue
Block a user