Skip to content

Commit

Permalink
Replace relative imports
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Jan 6, 2025
1 parent ec5f899 commit 9caa941
Show file tree
Hide file tree
Showing 51 changed files with 90 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
// @ts-strict-ignore
import Domain from "@bitwarden/common/platform/models/domain/domain-base";
import { OrgKey } from "@bitwarden/common/types/key";

import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { CollectionData } from "./collection.data";
import { CollectionView } from "./collection.view";
Expand Down
6 changes: 1 addition & 5 deletions libs/auth/src/common/abstractions/pin.service.abstraction.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { UserId } from "@bitwarden/common/types/guid";
import { PinKey, UserKey } from "@bitwarden/common/types/key";
import { KdfConfig } from "@bitwarden/key-management";
import { KdfConfig, EncString, EncryptedString } from "@bitwarden/key-management";

import {
EncString,
EncryptedString,
} from "../../../../key-management/src/cryptography/domain/enc-string";
import { PinLockType } from "../services";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import { WebAuthnLoginTokenRequest } from "@bitwarden/common/auth/models/request
import { IdentityTokenResponse } from "@bitwarden/common/auth/models/response/identity-token.response";
import { UserId } from "@bitwarden/common/types/guid";
import { UserKey } from "@bitwarden/common/types/key";
import { EncString, SymmetricCryptoKey } from "@bitwarden/key-management";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { SymmetricCryptoKey } from "../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import { WebAuthnLoginCredentials } from "../models/domain/login-credentials";
import { CacheData } from "../services/login-strategies/login-strategy.state";

Expand Down
3 changes: 1 addition & 2 deletions libs/auth/src/common/models/domain/login-credentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { AuthenticationType } from "@bitwarden/common/auth/enums/authentication-
import { TokenTwoFactorRequest } from "@bitwarden/common/auth/models/request/identity-token/token-two-factor.request";
import { WebAuthnLoginAssertionResponseRequest } from "@bitwarden/common/auth/services/webauthn-login/request/webauthn-login-assertion-response.request";
import { UserKey, MasterKey } from "@bitwarden/common/types/key";

import { SymmetricCryptoKey } from "../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import { SymmetricCryptoKey } from "@bitwarden/key-management";

export class PasswordLoginCredentials {
readonly type = AuthenticationType.Password;
Expand Down
4 changes: 1 addition & 3 deletions libs/auth/src/common/models/domain/rotateable-key-set.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { PrfKey } from "@bitwarden/common/types/key";

import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { SymmetricCryptoKey } from "../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import { EncString, SymmetricCryptoKey } from "@bitwarden/key-management";

declare const tag: unique symbol;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// @ts-strict-ignore
import { Observable } from "rxjs";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { UserId } from "../../types/guid";
import { DeviceKey, UserKey } from "../../types/key";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Observable } from "rxjs";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { UserId } from "../../types/guid";
import { MasterKey, UserKey } from "../../types/key";
import { ForceSetPasswordReason } from "../models/domain/force-set-password-reason";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { KdfType } from "@bitwarden/key-management";
import { KdfType, EncryptedString } from "@bitwarden/key-management";

import { EncryptedString } from "../../../../../../key-management/src/cryptography/domain/enc-string";
import { KeysRequest } from "../../../../models/request/keys.request";

export class RegisterFinishRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// @ts-strict-ignore
import { Jsonify } from "type-fest";

import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { DeviceType } from "../../../enums";
import { BaseResponse } from "../../../models/response/base.response";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { BaseResponse } from "../../../../models/response/base.response";

export interface ITrustedDeviceUserDecryptionOptionServerResponse {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../../../key-management/src/cryptography/domain/enc-string";

import { BaseResponse } from "../../../../models/response/base.response";

export interface IWebAuthnPrfDecryptionOptionServerResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import { mock } from "jest-mock-extended";
import { ReplaySubject, Observable } from "rxjs";

import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { UserId } from "../../../types/guid";
import { MasterKey, UserKey } from "../../../types/key";
import { InternalMasterPasswordServiceAbstraction } from "../../abstractions/master-password.service.abstraction";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
import { firstValueFrom, map, Observable } from "rxjs";

import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { KeyGenerationService, EncryptionType, EncryptService } from "@bitwarden/key-management";

import {
KeyGenerationService,
EncryptionType,
EncryptService,
EncryptedString,
EncString,
} from "../../../../../key-management/src/cryptography/domain/enc-string";
} from "@bitwarden/key-management";

import { SymmetricCryptoKey } from "../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import { StateService } from "../../../platform/abstractions/state.service";
import {
Expand Down
7 changes: 4 additions & 3 deletions libs/common/src/auth/services/token.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { Observable, combineLatest, firstValueFrom, map } from "rxjs";
import { Opaque } from "type-fest";

import { LogoutReason, decodeJwtTokenToJson } from "@bitwarden/auth/common";
import { KeyGenerationService, EncryptService } from "@bitwarden/key-management";

import {
KeyGenerationService,
EncryptService,
EncString,
EncryptedString,
} from "../../../../key-management/src/cryptography/domain/enc-string";
} from "@bitwarden/key-management";

import { SymmetricCryptoKey } from "../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import { VaultTimeoutAction } from "../../enums/vault-timeout-action.enum";
import { LogService } from "../../platform/abstractions/log.service";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CryptoFunctionService } from "@bitwarden/common/key-management/abstractions/crypto-function.service";
import { SymmetricCryptoKey } from "@bitwarden/key-management";

import { SymmetricCryptoKey } from "../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import { PrfKey } from "../../../types/key";
import { WebAuthnLoginPrfKeyServiceAbstraction } from "../../abstractions/webauthn/webauthn-login-prf-key.service.abstraction";

Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/card.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { Card as CardDomain } from "../../vault/models/domain/card";
import { CardView } from "../../vault/models/view/card.view";

Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/cipher.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { CipherRepromptType } from "../../vault/enums/cipher-reprompt-type";
import { CipherType } from "../../vault/enums/cipher-type";
import { Cipher as CipherDomain } from "../../vault/models/domain/cipher";
Expand Down
3 changes: 1 addition & 2 deletions libs/common/src/models/export/collection.export.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { Collection as CollectionDomain, CollectionView } from "@bitwarden/admin-console/common";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { safeGetString } from "./utils";

Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/fido2-credential.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { Fido2Credential } from "../../vault/models/domain/fido2-credential";
import { Fido2CredentialView } from "../../vault/models/view/fido2-credential.view";

Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/field.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { FieldType, LinkedIdType } from "../../vault/enums";
import { Field as FieldDomain } from "../../vault/models/domain/field";
import { FieldView } from "../../vault/models/view/field.view";
Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/folder.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { Folder as FolderDomain } from "../../vault/models/domain/folder";
import { FolderView } from "../../vault/models/view/folder.view";

Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/identity.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { Identity as IdentityDomain } from "../../vault/models/domain/identity";
import { IdentityView } from "../../vault/models/view/identity.view";

Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/login-uri.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { UriMatchStrategySetting } from "../../models/domain/domain-service";
import { LoginUri as LoginUriDomain } from "../../vault/models/domain/login-uri";
import { LoginUriView } from "../../vault/models/view/login-uri.view";
Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/login.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { Login as LoginDomain } from "../../vault/models/domain/login";
import { LoginView } from "../../vault/models/view/login.view";

Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/models/export/password-history.export.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { Password } from "../../vault/models/domain/password";
import { PasswordHistoryView } from "../../vault/models/view/password-history.view";

Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/models/export/ssh-key.export.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { SshKeyView as SshKeyView } from "@bitwarden/common/vault/models/view/ssh-key.view";
import { EncString } from "@bitwarden/key-management";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { SshKey as SshKeyDomain } from "../../vault/models/domain/ssh-key";

import { safeGetString } from "./utils";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { EncString } from "@bitwarden/key-management";

import { EncArrayBuffer } from "../../../../../key-management/src/cryptography/domain/enc-array-buffer";
import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { FileUploadType } from "../../enums";

export abstract class FileUploadService {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "@bitwarden/key-management";

import { EncArrayBuffer } from "../../../../../key-management/src/cryptography/domain/enc-array-buffer";
import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { ApiService } from "../../../abstractions/api.service";
import {
FileUploadApiMethods,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import { Jsonify } from "type-fest";

import { OrganizationId } from "@bitwarden/common/types/guid";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

/** An encryption strategy that protects a type's secrets with
* organization-specific keys. This strategy is bound to a specific organization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import { Jsonify } from "type-fest";

import { UserId } from "@bitwarden/common/types/guid";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

/** An encryption strategy that protects a type's secrets with
* user-specific keys. This strategy is bound to a specific user.
Expand Down
2 changes: 1 addition & 1 deletion libs/common/src/tools/send/models/domain/send-access.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../../../key-management/src/cryptography/domain/enc-string";

import { SymmetricCryptoKey } from "../../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import Domain from "../../../../platform/models/domain/domain-base";
import { SendType } from "../../enums/send-type";
Expand Down
1 change: 0 additions & 1 deletion libs/common/src/tools/send/models/domain/send-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// @ts-strict-ignore
import { Jsonify } from "type-fest";

import { EncString } from "../../../../../../key-management/src/cryptography/domain/enc-string";
import { SymmetricCryptoKey } from "../../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import Domain from "../../../../platform/models/domain/domain-base";
import { SendFileData } from "../data/send-file.data";
Expand Down
1 change: 0 additions & 1 deletion libs/common/src/tools/send/models/domain/send-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// @ts-strict-ignore
import { Jsonify } from "type-fest";

import { EncString } from "../../../../../../key-management/src/cryptography/domain/enc-string";
import { SymmetricCryptoKey } from "../../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import Domain from "../../../../platform/models/domain/domain-base";
import { SendTextData } from "../data/send-text.data";
Expand Down
1 change: 0 additions & 1 deletion libs/common/src/tools/send/models/domain/send.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// @ts-strict-ignore
import { Jsonify } from "type-fest";

import { EncString } from "../../../../../../key-management/src/cryptography/domain/enc-string";
import { Utils } from "../../../../platform/misc/utils";
import Domain from "../../../../platform/models/domain/domain-base";
import { SendType } from "../../enums/send-type";
Expand Down
8 changes: 6 additions & 2 deletions libs/common/src/tools/send/services/send.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import { firstValueFrom, of } from "rxjs";

import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service";
import { SelfHostedEnvironment } from "@bitwarden/common/platform/services/default-environment.service";
import { KeyService, KeyGenerationService, EncryptService } from "@bitwarden/key-management";
import {
KeyService,
KeyGenerationService,
EncryptService,
EncString,
} from "@bitwarden/key-management";

import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { SymmetricCryptoKey } from "../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import {
FakeAccountService,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "../../../../../../key-management/src/cryptography/domain/enc-string";

import { SendType } from "../../enums/send-type";
import { SendTextApi } from "../../models/api/send-text.api";
import { SendTextData } from "../../models/data/send-text.data";
Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/tools/state/secret-state.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { mock } from "jest-mock-extended";
import { BehaviorSubject, firstValueFrom, from, Observable } from "rxjs";
import { Jsonify } from "type-fest";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import {
FakeStateProvider,
makeEncString,
Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/tools/state/secret-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// @ts-strict-ignore
import { Observable, map, concatMap, share, ReplaySubject, timer, combineLatest, of } from "rxjs";

import { EncString } from "../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import {
SingleUserState,
StateProvider,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { EncString } from "@bitwarden/key-management";

import { EncArrayBuffer } from "../../../../../key-management/src/cryptography/domain/enc-array-buffer";
import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { SymmetricCryptoKey } from "../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import { Cipher } from "../../models/domain/cipher";
import { CipherResponse } from "../../models/response/cipher.response";
Expand Down
3 changes: 2 additions & 1 deletion libs/common/src/vault/models/domain/attachment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// @ts-strict-ignore
import { Jsonify } from "type-fest";

import { EncString } from "../../../../../key-management/src/cryptography/domain/enc-string";
import { EncString } from "@bitwarden/key-management";

import { SymmetricCryptoKey } from "../../../../../key-management/src/cryptography/domain/symmetric-crypto-key";
import { Utils } from "../../../platform/misc/utils";
import Domain from "../../../platform/models/domain/domain-base";
Expand Down
Loading

0 comments on commit 9caa941

Please sign in to comment.