mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 17:23:37 +00:00
[deps] Autofill: Update prettier to v3.7.3 (#17853)
* [deps] Autofill: Update prettier to v3.6.2 * fix: [PM-23425] Fix prettier issues related to dependency updte Signed-off-by: Ben Brooks <bbrooks@bitwarden.com> * [deps] Autofill: Update prettier to v3.6.2 * [deps] Autofill: Update prettier to v3.7.3 * [PM-29379] Fix prettier issues found with the updated Prettier 3.7.3 Signed-off-by: Ben Brooks <bbrooks@bitwarden.com> --------- Signed-off-by: Ben Brooks <bbrooks@bitwarden.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ben Brooks <bbrooks@bitwarden.com>
This commit is contained in:
@@ -3,9 +3,7 @@ import { DeviceManagementComponentServiceAbstraction } from "@bitwarden/angular/
|
|||||||
/**
|
/**
|
||||||
* Browser extension implementation of the device management component service
|
* Browser extension implementation of the device management component service
|
||||||
*/
|
*/
|
||||||
export class ExtensionDeviceManagementComponentService
|
export class ExtensionDeviceManagementComponentService implements DeviceManagementComponentServiceAbstraction {
|
||||||
implements DeviceManagementComponentServiceAbstraction
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Don't show header information in browser extension client
|
* Don't show header information in browser extension client
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -120,9 +120,7 @@ export type BrowserFido2ParentWindowReference = chrome.tabs.Tab;
|
|||||||
* Browser implementation of the {@link Fido2UserInterfaceService}.
|
* Browser implementation of the {@link Fido2UserInterfaceService}.
|
||||||
* The user interface is implemented as a popout and the service uses the browser's messaging API to communicate with it.
|
* The user interface is implemented as a popout and the service uses the browser's messaging API to communicate with it.
|
||||||
*/
|
*/
|
||||||
export class BrowserFido2UserInterfaceService
|
export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServiceAbstraction<BrowserFido2ParentWindowReference> {
|
||||||
implements Fido2UserInterfaceServiceAbstraction<BrowserFido2ParentWindowReference>
|
|
||||||
{
|
|
||||||
constructor(private authService: AuthService) {}
|
constructor(private authService: AuthService) {}
|
||||||
|
|
||||||
async newSession(
|
async newSession(
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ import {
|
|||||||
OverlayNotificationsExtensionMessageHandlers,
|
OverlayNotificationsExtensionMessageHandlers,
|
||||||
} from "../abstractions/overlay-notifications-content.service";
|
} from "../abstractions/overlay-notifications-content.service";
|
||||||
|
|
||||||
export class OverlayNotificationsContentService
|
export class OverlayNotificationsContentService implements OverlayNotificationsContentServiceInterface {
|
||||||
implements OverlayNotificationsContentServiceInterface
|
|
||||||
{
|
|
||||||
private notificationBarRootElement: HTMLElement | null = null;
|
private notificationBarRootElement: HTMLElement | null = null;
|
||||||
private notificationBarElement: HTMLElement | null = null;
|
private notificationBarElement: HTMLElement | null = null;
|
||||||
private notificationBarIframeElement: HTMLIFrameElement | null = null;
|
private notificationBarIframeElement: HTMLIFrameElement | null = null;
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ import {
|
|||||||
} from "./autofill-constants";
|
} from "./autofill-constants";
|
||||||
import AutofillService from "./autofill.service";
|
import AutofillService from "./autofill.service";
|
||||||
|
|
||||||
export class InlineMenuFieldQualificationService
|
export class InlineMenuFieldQualificationService implements InlineMenuFieldQualificationServiceInterface {
|
||||||
implements InlineMenuFieldQualificationServiceInterface
|
|
||||||
{
|
|
||||||
private searchFieldNamesSet = new Set(AutoFillConstants.SearchFieldNames);
|
private searchFieldNamesSet = new Set(AutoFillConstants.SearchFieldNames);
|
||||||
private excludedAutofillFieldTypesSet = new Set(AutoFillConstants.ExcludedAutofillLoginTypes);
|
private excludedAutofillFieldTypesSet = new Set(AutoFillConstants.ExcludedAutofillLoginTypes);
|
||||||
private usernameFieldTypes = new Set(["text", "email", "number", "tel"]);
|
private usernameFieldTypes = new Set(["text", "email", "number", "tel"]);
|
||||||
|
|||||||
@@ -43,9 +43,7 @@ export type NativeWindowObject = {
|
|||||||
windowXy?: { x: number; y: number };
|
windowXy?: { x: number; y: number };
|
||||||
};
|
};
|
||||||
|
|
||||||
export class DesktopFido2UserInterfaceService
|
export class DesktopFido2UserInterfaceService implements Fido2UserInterfaceServiceAbstraction<NativeWindowObject> {
|
||||||
implements Fido2UserInterfaceServiceAbstraction<NativeWindowObject>
|
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
private authService: AuthService,
|
private authService: AuthService,
|
||||||
private cipherService: CipherService,
|
private cipherService: CipherService,
|
||||||
|
|||||||
@@ -35,13 +35,10 @@ import { OrganizationUserResetPasswordEntry } from "./organization-user-reset-pa
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: "root",
|
providedIn: "root",
|
||||||
})
|
})
|
||||||
export class OrganizationUserResetPasswordService
|
export class OrganizationUserResetPasswordService implements UserKeyRotationKeyRecoveryProvider<
|
||||||
implements
|
OrganizationUserResetPasswordWithIdRequest,
|
||||||
UserKeyRotationKeyRecoveryProvider<
|
OrganizationUserResetPasswordEntry
|
||||||
OrganizationUserResetPasswordWithIdRequest,
|
> {
|
||||||
OrganizationUserResetPasswordEntry
|
|
||||||
>
|
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
private keyService: KeyService,
|
private keyService: KeyService,
|
||||||
private encryptService: EncryptService,
|
private encryptService: EncryptService,
|
||||||
|
|||||||
@@ -39,9 +39,7 @@ import { WebAuthnLoginAdminApiService } from "./webauthn-login-admin-api.service
|
|||||||
/**
|
/**
|
||||||
* Service for managing WebAuthnLogin credentials.
|
* Service for managing WebAuthnLogin credentials.
|
||||||
*/
|
*/
|
||||||
export class WebauthnLoginAdminService
|
export class WebauthnLoginAdminService implements UserKeyRotationDataProvider<WebauthnRotateCredentialRequest> {
|
||||||
implements UserKeyRotationDataProvider<WebauthnRotateCredentialRequest>
|
|
||||||
{
|
|
||||||
static readonly MaxCredentialCount = 5;
|
static readonly MaxCredentialCount = 5;
|
||||||
|
|
||||||
private navigatorCredentials: CredentialsContainer;
|
private navigatorCredentials: CredentialsContainer;
|
||||||
|
|||||||
@@ -45,13 +45,10 @@ import { EmergencyAccessGranteeDetailsResponse } from "../response/emergency-acc
|
|||||||
import { EmergencyAccessApiService } from "./emergency-access-api.service";
|
import { EmergencyAccessApiService } from "./emergency-access-api.service";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class EmergencyAccessService
|
export class EmergencyAccessService implements UserKeyRotationKeyRecoveryProvider<
|
||||||
implements
|
EmergencyAccessWithIdRequest,
|
||||||
UserKeyRotationKeyRecoveryProvider<
|
GranteeEmergencyAccessWithPublicKey
|
||||||
EmergencyAccessWithIdRequest,
|
> {
|
||||||
GranteeEmergencyAccessWithPublicKey
|
|
||||||
>
|
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
private emergencyAccessApiService: EmergencyAccessApiService,
|
private emergencyAccessApiService: EmergencyAccessApiService,
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ import { DeviceManagementComponentServiceAbstraction } from "./device-management
|
|||||||
/**
|
/**
|
||||||
* Default implementation of the device management component service
|
* Default implementation of the device management component service
|
||||||
*/
|
*/
|
||||||
export class DefaultDeviceManagementComponentService
|
export class DefaultDeviceManagementComponentService implements DeviceManagementComponentServiceAbstraction {
|
||||||
implements DeviceManagementComponentServiceAbstraction
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Show header information in web client
|
* Show header information in web client
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -3,9 +3,7 @@ import { LoginApprovalDialogComponentServiceAbstraction } from "./login-approval
|
|||||||
/**
|
/**
|
||||||
* Default implementation of the LoginApprovalDialogComponentServiceAbstraction.
|
* Default implementation of the LoginApprovalDialogComponentServiceAbstraction.
|
||||||
*/
|
*/
|
||||||
export class DefaultLoginApprovalDialogComponentService
|
export class DefaultLoginApprovalDialogComponentService implements LoginApprovalDialogComponentServiceAbstraction {
|
||||||
implements LoginApprovalDialogComponentServiceAbstraction
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* No-op implementation of the showLoginRequestedAlertIfWindowNotVisible method.
|
* No-op implementation of the showLoginRequestedAlertIfWindowNotVisible method.
|
||||||
* @returns
|
* @returns
|
||||||
|
|||||||
@@ -45,9 +45,7 @@ const VAULT_ROUTE = "/vault";
|
|||||||
* if it is required by showing a UI prompt. It is only one means of triggering migrations, in case the user stays unlocked for a while,
|
* if it is required by showing a UI prompt. It is only one means of triggering migrations, in case the user stays unlocked for a while,
|
||||||
* or regularly logs in without a master-password, when the migrations do require a master-password to run.
|
* or regularly logs in without a master-password, when the migrations do require a master-password to run.
|
||||||
*/
|
*/
|
||||||
export class DefaultEncryptedMigrationsSchedulerService
|
export class DefaultEncryptedMigrationsSchedulerService implements EncryptedMigrationsSchedulerService {
|
||||||
implements EncryptedMigrationsSchedulerService
|
|
||||||
{
|
|
||||||
isMigrating = false;
|
isMigrating = false;
|
||||||
url$: Observable<string>;
|
url$: Observable<string>;
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { NewDeviceVerificationComponentService } from "./new-device-verification-component.service";
|
import { NewDeviceVerificationComponentService } from "./new-device-verification-component.service";
|
||||||
|
|
||||||
export class DefaultNewDeviceVerificationComponentService
|
export class DefaultNewDeviceVerificationComponentService implements NewDeviceVerificationComponentService {
|
||||||
implements NewDeviceVerificationComponentService
|
|
||||||
{
|
|
||||||
showBackButton() {
|
showBackButton() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import { TwoFactorAuthWebAuthnComponentService } from "./two-factor-auth-webauthn-component.service";
|
import { TwoFactorAuthWebAuthnComponentService } from "./two-factor-auth-webauthn-component.service";
|
||||||
|
|
||||||
export class DefaultTwoFactorAuthWebAuthnComponentService
|
export class DefaultTwoFactorAuthWebAuthnComponentService implements TwoFactorAuthWebAuthnComponentService {
|
||||||
implements TwoFactorAuthWebAuthnComponentService
|
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Default implementation is to not open in a new tab.
|
* Default implementation is to not open in a new tab.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,9 +19,7 @@ export const USER_DECRYPTION_OPTIONS = new UserKeyDefinition<UserDecryptionOptio
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export class UserDecryptionOptionsService
|
export class UserDecryptionOptionsService implements InternalUserDecryptionOptionsServiceAbstraction {
|
||||||
implements InternalUserDecryptionOptionsServiceAbstraction
|
|
||||||
{
|
|
||||||
constructor(private singleUserStateProvider: SingleUserStateProvider) {}
|
constructor(private singleUserStateProvider: SingleUserStateProvider) {}
|
||||||
|
|
||||||
userDecryptionOptionsById$(userId: UserId): Observable<UserDecryptionOptions> {
|
userDecryptionOptionsById$(userId: UserId): Observable<UserDecryptionOptions> {
|
||||||
|
|||||||
@@ -27,9 +27,7 @@ function buildKeyDefinition<T>(key: string): UserKeyDefinition<T> {
|
|||||||
|
|
||||||
export const AUTO_CONFIRM_FINGERPRINTS = buildKeyDefinition<boolean>("autoConfirmFingerPrints");
|
export const AUTO_CONFIRM_FINGERPRINTS = buildKeyDefinition<boolean>("autoConfirmFingerPrints");
|
||||||
|
|
||||||
export class DefaultOrganizationManagementPreferencesService
|
export class DefaultOrganizationManagementPreferencesService implements OrganizationManagementPreferencesService {
|
||||||
implements OrganizationManagementPreferencesService
|
|
||||||
{
|
|
||||||
constructor(private stateProvider: StateProvider) {}
|
constructor(private stateProvider: StateProvider) {}
|
||||||
|
|
||||||
autoConfirmFingerPrints = this.buildOrganizationManagementPreference(
|
autoConfirmFingerPrints = this.buildOrganizationManagementPreference(
|
||||||
|
|||||||
@@ -22,9 +22,7 @@ import { UserKey } from "../../types/key";
|
|||||||
import { AccountService } from "../abstractions/account.service";
|
import { AccountService } from "../abstractions/account.service";
|
||||||
import { PasswordResetEnrollmentServiceAbstraction } from "../abstractions/password-reset-enrollment.service.abstraction";
|
import { PasswordResetEnrollmentServiceAbstraction } from "../abstractions/password-reset-enrollment.service.abstraction";
|
||||||
|
|
||||||
export class PasswordResetEnrollmentServiceImplementation
|
export class PasswordResetEnrollmentServiceImplementation implements PasswordResetEnrollmentServiceAbstraction {
|
||||||
implements PasswordResetEnrollmentServiceAbstraction
|
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
protected organizationApiService: OrganizationApiServiceAbstraction,
|
protected organizationApiService: OrganizationApiServiceAbstraction,
|
||||||
protected accountService: AccountService,
|
protected accountService: AccountService,
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import { PlatformUtilsService } from "../../../platform/abstractions/platform-ut
|
|||||||
import { OrganizationSponsorshipApiServiceAbstraction } from "../../abstractions/organizations/organization-sponsorship-api.service.abstraction";
|
import { OrganizationSponsorshipApiServiceAbstraction } from "../../abstractions/organizations/organization-sponsorship-api.service.abstraction";
|
||||||
import { OrganizationSponsorshipInvitesResponse } from "../../models/response/organization-sponsorship-invites.response";
|
import { OrganizationSponsorshipInvitesResponse } from "../../models/response/organization-sponsorship-invites.response";
|
||||||
|
|
||||||
export class OrganizationSponsorshipApiService
|
export class OrganizationSponsorshipApiService implements OrganizationSponsorshipApiServiceAbstraction {
|
||||||
implements OrganizationSponsorshipApiServiceAbstraction
|
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
private apiService: ApiService,
|
private apiService: ApiService,
|
||||||
private platformUtilsService: PlatformUtilsService,
|
private platformUtilsService: PlatformUtilsService,
|
||||||
|
|||||||
@@ -5,8 +5,10 @@ export interface IpcMessage {
|
|||||||
message: SerializedOutgoingMessage;
|
message: SerializedOutgoingMessage;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SerializedOutgoingMessage
|
export interface SerializedOutgoingMessage extends Omit<
|
||||||
extends Omit<OutgoingMessage, typeof Symbol.dispose | "free" | "payload"> {
|
OutgoingMessage,
|
||||||
|
typeof Symbol.dispose | "free" | "payload"
|
||||||
|
> {
|
||||||
payload: number[];
|
payload: number[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ const KeyUsages: KeyUsage[] = ["sign"];
|
|||||||
*
|
*
|
||||||
* It is highly recommended that the W3C specification is used a reference when reading this code.
|
* It is highly recommended that the W3C specification is used a reference when reading this code.
|
||||||
*/
|
*/
|
||||||
export class Fido2AuthenticatorService<ParentWindowReference>
|
export class Fido2AuthenticatorService<
|
||||||
implements Fido2AuthenticatorServiceAbstraction<ParentWindowReference>
|
ParentWindowReference,
|
||||||
{
|
> implements Fido2AuthenticatorServiceAbstraction<ParentWindowReference> {
|
||||||
constructor(
|
constructor(
|
||||||
private cipherService: CipherService,
|
private cipherService: CipherService,
|
||||||
private userInterface: Fido2UserInterfaceService<ParentWindowReference>,
|
private userInterface: Fido2UserInterfaceService<ParentWindowReference>,
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ import { guidToRawFormat } from "./guid-utils";
|
|||||||
*
|
*
|
||||||
* It is highly recommended that the W3C specification is used a reference when reading this code.
|
* It is highly recommended that the W3C specification is used a reference when reading this code.
|
||||||
*/
|
*/
|
||||||
export class Fido2ClientService<ParentWindowReference>
|
export class Fido2ClientService<
|
||||||
implements Fido2ClientServiceAbstraction<ParentWindowReference>
|
ParentWindowReference,
|
||||||
{
|
> implements Fido2ClientServiceAbstraction<ParentWindowReference> {
|
||||||
private timeoutAbortController: AbortController;
|
private timeoutAbortController: AbortController;
|
||||||
private readonly TIMEOUTS = {
|
private readonly TIMEOUTS = {
|
||||||
NO_VERIFICATION: {
|
NO_VERIFICATION: {
|
||||||
|
|||||||
@@ -14,9 +14,11 @@ import { Classifier } from "./classifier";
|
|||||||
* Data that cannot be serialized by JSON.stringify() should
|
* Data that cannot be serialized by JSON.stringify() should
|
||||||
* be excluded.
|
* be excluded.
|
||||||
*/
|
*/
|
||||||
export class SecretClassifier<Plaintext extends object, Disclosed, Secret>
|
export class SecretClassifier<Plaintext extends object, Disclosed, Secret> implements Classifier<
|
||||||
implements Classifier<Plaintext, Disclosed, Secret>
|
Plaintext,
|
||||||
{
|
Disclosed,
|
||||||
|
Secret
|
||||||
|
> {
|
||||||
private constructor(
|
private constructor(
|
||||||
disclosed: readonly (keyof Jsonify<Disclosed> & keyof Jsonify<Plaintext>)[],
|
disclosed: readonly (keyof Jsonify<Disclosed> & keyof Jsonify<Plaintext>)[],
|
||||||
excluded: readonly (keyof Plaintext)[],
|
excluded: readonly (keyof Plaintext)[],
|
||||||
|
|||||||
@@ -25,9 +25,13 @@ const ONE_MINUTE = 1000 * 60;
|
|||||||
*
|
*
|
||||||
* DO NOT USE THIS for synchronized data.
|
* DO NOT USE THIS for synchronized data.
|
||||||
*/
|
*/
|
||||||
export class SecretState<Outer, Id, Plaintext extends object, Disclosed, Secret>
|
export class SecretState<
|
||||||
implements SingleUserState<Outer>
|
Outer,
|
||||||
{
|
Id,
|
||||||
|
Plaintext extends object,
|
||||||
|
Disclosed,
|
||||||
|
Secret,
|
||||||
|
> implements SingleUserState<Outer> {
|
||||||
// The constructor is private to avoid creating a circular dependency when
|
// The constructor is private to avoid creating a circular dependency when
|
||||||
// wiring the derived and secret states together.
|
// wiring the derived and secret states together.
|
||||||
private constructor(
|
private constructor(
|
||||||
|
|||||||
@@ -79,11 +79,11 @@ const DEFAULT_FRAME_SIZE = 32;
|
|||||||
* @template Dependencies use-specific dependencies provided by the user.
|
* @template Dependencies use-specific dependencies provided by the user.
|
||||||
*/
|
*/
|
||||||
export class UserStateSubject<
|
export class UserStateSubject<
|
||||||
State extends object,
|
State extends object,
|
||||||
Secret = State,
|
Secret = State,
|
||||||
Disclosed = Record<string, never>,
|
Disclosed = Record<string, never>,
|
||||||
Dependencies = null,
|
Dependencies = null,
|
||||||
>
|
>
|
||||||
extends Observable<State>
|
extends Observable<State>
|
||||||
implements SubjectLike<State>
|
implements SubjectLike<State>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,9 +43,10 @@ class CustomBlockScrollStrategy implements ScrollStrategy {
|
|||||||
detach() {}
|
detach() {}
|
||||||
}
|
}
|
||||||
|
|
||||||
export abstract class DialogRef<R = unknown, C = unknown>
|
export abstract class DialogRef<R = unknown, C = unknown> implements Pick<
|
||||||
implements Pick<CdkDialogRef<R, C>, "close" | "closed" | "disableClose" | "componentInstance">
|
CdkDialogRef<R, C>,
|
||||||
{
|
"close" | "closed" | "disableClose" | "componentInstance"
|
||||||
|
> {
|
||||||
abstract readonly isDrawer?: boolean;
|
abstract readonly isDrawer?: boolean;
|
||||||
|
|
||||||
// --- From CdkDialogRef ---
|
// --- From CdkDialogRef ---
|
||||||
|
|||||||
@@ -4,9 +4,7 @@ import { EncString } from "@bitwarden/common/key-management/crypto/models/enc-st
|
|||||||
import { UserAsymmetricKeysRegenerationApiService } from "../abstractions/user-asymmetric-key-regeneration-api.service";
|
import { UserAsymmetricKeysRegenerationApiService } from "../abstractions/user-asymmetric-key-regeneration-api.service";
|
||||||
import { KeyRegenerationRequest } from "../models/requests/key-regeneration.request";
|
import { KeyRegenerationRequest } from "../models/requests/key-regeneration.request";
|
||||||
|
|
||||||
export class DefaultUserAsymmetricKeysRegenerationApiService
|
export class DefaultUserAsymmetricKeysRegenerationApiService implements UserAsymmetricKeysRegenerationApiService {
|
||||||
implements UserAsymmetricKeysRegenerationApiService
|
|
||||||
{
|
|
||||||
constructor(private apiService: ApiService) {}
|
constructor(private apiService: ApiService) {}
|
||||||
|
|
||||||
async regenerateUserAsymmetricKeys(
|
async regenerateUserAsymmetricKeys(
|
||||||
|
|||||||
@@ -15,9 +15,7 @@ import { KeyService } from "../../abstractions/key.service";
|
|||||||
import { UserAsymmetricKeysRegenerationApiService } from "../abstractions/user-asymmetric-key-regeneration-api.service";
|
import { UserAsymmetricKeysRegenerationApiService } from "../abstractions/user-asymmetric-key-regeneration-api.service";
|
||||||
import { UserAsymmetricKeysRegenerationService } from "../abstractions/user-asymmetric-key-regeneration.service";
|
import { UserAsymmetricKeysRegenerationService } from "../abstractions/user-asymmetric-key-regeneration.service";
|
||||||
|
|
||||||
export class DefaultUserAsymmetricKeysRegenerationService
|
export class DefaultUserAsymmetricKeysRegenerationService implements UserAsymmetricKeysRegenerationService {
|
||||||
implements UserAsymmetricKeysRegenerationService
|
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
private keyService: KeyService,
|
private keyService: KeyService,
|
||||||
private cipherService: CipherService,
|
private cipherService: CipherService,
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ import { DeriveDefinition, DerivedState, DerivedStateDependencies } from "@bitwa
|
|||||||
/**
|
/**
|
||||||
* Default derived state
|
* Default derived state
|
||||||
*/
|
*/
|
||||||
export class DefaultDerivedState<TFrom, TTo, TDeps extends DerivedStateDependencies>
|
export class DefaultDerivedState<
|
||||||
implements DerivedState<TTo>
|
TFrom,
|
||||||
{
|
TTo,
|
||||||
|
TDeps extends DerivedStateDependencies,
|
||||||
|
> implements DerivedState<TTo> {
|
||||||
private readonly storageKey: string;
|
private readonly storageKey: string;
|
||||||
private forcedValueSubject = new Subject<TTo>();
|
private forcedValueSubject = new Subject<TTo>();
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,11 @@ export class InlineDerivedStateProvider implements DerivedStateProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class InlineDerivedState<TFrom, TTo, TDeps extends DerivedStateDependencies>
|
export class InlineDerivedState<
|
||||||
implements DerivedState<TTo>
|
TFrom,
|
||||||
{
|
TTo,
|
||||||
|
TDeps extends DerivedStateDependencies,
|
||||||
|
> implements DerivedState<TTo> {
|
||||||
constructor(
|
constructor(
|
||||||
parentState$: Observable<TFrom>,
|
parentState$: Observable<TFrom>,
|
||||||
deriveDefinition: DeriveDefinition<TFrom, TTo, TDeps>,
|
deriveDefinition: DeriveDefinition<TFrom, TTo, TDeps>,
|
||||||
|
|||||||
@@ -236,9 +236,11 @@ export class FakeActiveUserState<T> implements ActiveUserState<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class FakeDerivedState<TFrom, TTo, TDeps extends DerivedStateDependencies>
|
export class FakeDerivedState<
|
||||||
implements DerivedState<TTo>
|
TFrom,
|
||||||
{
|
TTo,
|
||||||
|
TDeps extends DerivedStateDependencies,
|
||||||
|
> implements DerivedState<TTo> {
|
||||||
// eslint-disable-next-line rxjs/no-exposed-subjects -- exposed for testing setup
|
// eslint-disable-next-line rxjs/no-exposed-subjects -- exposed for testing setup
|
||||||
stateSubject = new ReplaySubject<TTo>(1);
|
stateSubject = new ReplaySubject<TTo>(1);
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,7 @@ import { ForwarderContext } from "../forwarder-context";
|
|||||||
export class CreateForwardingAddressRpc<
|
export class CreateForwardingAddressRpc<
|
||||||
Settings extends ApiSettings,
|
Settings extends ApiSettings,
|
||||||
Req extends IntegrationRequest = IntegrationRequest,
|
Req extends IntegrationRequest = IntegrationRequest,
|
||||||
> implements JsonRpc<Req, string>
|
> implements JsonRpc<Req, string> {
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly requestor: ForwarderConfiguration<Settings>,
|
readonly requestor: ForwarderConfiguration<Settings>,
|
||||||
readonly context: ForwarderContext<Settings>,
|
readonly context: ForwarderContext<Settings>,
|
||||||
|
|||||||
@@ -9,8 +9,7 @@ import { ForwarderContext } from "../forwarder-context";
|
|||||||
export class GetAccountIdRpc<
|
export class GetAccountIdRpc<
|
||||||
Settings extends ApiSettings,
|
Settings extends ApiSettings,
|
||||||
Req extends IntegrationRequest = IntegrationRequest,
|
Req extends IntegrationRequest = IntegrationRequest,
|
||||||
> implements JsonRpc<Req, string>
|
> implements JsonRpc<Req, string> {
|
||||||
{
|
|
||||||
constructor(
|
constructor(
|
||||||
readonly requestor: ForwarderConfiguration<Settings>,
|
readonly requestor: ForwarderConfiguration<Settings>,
|
||||||
readonly context: ForwarderContext<Settings>,
|
readonly context: ForwarderContext<Settings>,
|
||||||
|
|||||||
@@ -2,9 +2,10 @@ import { PolicyEvaluator } from "../abstractions";
|
|||||||
import { NoPolicy } from "../types";
|
import { NoPolicy } from "../types";
|
||||||
|
|
||||||
/** A policy evaluator that does not apply any policy */
|
/** A policy evaluator that does not apply any policy */
|
||||||
export class DefaultPolicyEvaluator<PolicyTarget>
|
export class DefaultPolicyEvaluator<PolicyTarget> implements PolicyEvaluator<
|
||||||
implements PolicyEvaluator<NoPolicy, PolicyTarget>
|
NoPolicy,
|
||||||
{
|
PolicyTarget
|
||||||
|
> {
|
||||||
/** {@link PolicyEvaluator.policy} */
|
/** {@link PolicyEvaluator.policy} */
|
||||||
get policy() {
|
get policy() {
|
||||||
return {};
|
return {};
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ import { atLeast, atLeastSum, maybe, readonlyTrueWhen, AtLeastOne, Zero } from "
|
|||||||
import { PasswordPolicyConstraints } from "./password-policy-constraints";
|
import { PasswordPolicyConstraints } from "./password-policy-constraints";
|
||||||
|
|
||||||
/** Creates state constraints by blending policy and password settings. */
|
/** Creates state constraints by blending policy and password settings. */
|
||||||
export class DynamicPasswordPolicyConstraints
|
export class DynamicPasswordPolicyConstraints implements DynamicStateConstraints<PasswordGeneratorSettings> {
|
||||||
implements DynamicStateConstraints<PasswordGeneratorSettings>
|
|
||||||
{
|
|
||||||
/** Instantiates the object.
|
/** Instantiates the object.
|
||||||
* @param policy the password policy to enforce. This cannot be
|
* @param policy the password policy to enforce. This cannot be
|
||||||
* `null` or `undefined`.
|
* `null` or `undefined`.
|
||||||
|
|||||||
@@ -13,9 +13,10 @@ import { observe$PerUserId, sharedStateByUserId } from "../util";
|
|||||||
import { CATCHALL_SETTINGS } from "./storage";
|
import { CATCHALL_SETTINGS } from "./storage";
|
||||||
|
|
||||||
/** Strategy for creating usernames using a catchall email address */
|
/** Strategy for creating usernames using a catchall email address */
|
||||||
export class CatchallGeneratorStrategy
|
export class CatchallGeneratorStrategy implements GeneratorStrategy<
|
||||||
implements GeneratorStrategy<CatchallGenerationOptions, NoPolicy>
|
CatchallGenerationOptions,
|
||||||
{
|
NoPolicy
|
||||||
|
> {
|
||||||
/** Instantiates the generation strategy
|
/** Instantiates the generation strategy
|
||||||
* @param usernameService generates a catchall address for a domain
|
* @param usernameService generates a catchall address for a domain
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -16,9 +16,10 @@ const UsernameDigits = Object.freeze({
|
|||||||
});
|
});
|
||||||
|
|
||||||
/** Strategy for creating usernames from the EFF wordlist */
|
/** Strategy for creating usernames from the EFF wordlist */
|
||||||
export class EffUsernameGeneratorStrategy
|
export class EffUsernameGeneratorStrategy implements GeneratorStrategy<
|
||||||
implements GeneratorStrategy<EffUsernameGenerationOptions, NoPolicy>
|
EffUsernameGenerationOptions,
|
||||||
{
|
NoPolicy
|
||||||
|
> {
|
||||||
/** Instantiates the generation strategy
|
/** Instantiates the generation strategy
|
||||||
* @param usernameService generates a username from EFF word list
|
* @param usernameService generates a username from EFF word list
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ import { Classifier } from "@bitwarden/common/tools/state/classifier";
|
|||||||
export class OptionsClassifier<
|
export class OptionsClassifier<
|
||||||
Settings,
|
Settings,
|
||||||
Options extends IntegrationRequest & Settings = IntegrationRequest & Settings,
|
Options extends IntegrationRequest & Settings = IntegrationRequest & Settings,
|
||||||
> implements Classifier<Options, Record<string, never>, Settings>
|
> implements Classifier<Options, Record<string, never>, Settings> {
|
||||||
{
|
|
||||||
/** Partitions `secret` into its disclosed properties and secret properties.
|
/** Partitions `secret` into its disclosed properties and secret properties.
|
||||||
* @param value The object to partition
|
* @param value The object to partition
|
||||||
* @returns an object that classifies secrets.
|
* @returns an object that classifies secrets.
|
||||||
|
|||||||
@@ -14,9 +14,10 @@ import { observe$PerUserId, optionsToEffWordListRequest, sharedStateByUserId } f
|
|||||||
import { PASSPHRASE_SETTINGS } from "./storage";
|
import { PASSPHRASE_SETTINGS } from "./storage";
|
||||||
|
|
||||||
/** Generates passphrases composed of random words */
|
/** Generates passphrases composed of random words */
|
||||||
export class PassphraseGeneratorStrategy
|
export class PassphraseGeneratorStrategy implements GeneratorStrategy<
|
||||||
implements GeneratorStrategy<PassphraseGenerationOptions, PassphraseGeneratorPolicy>
|
PassphraseGenerationOptions,
|
||||||
{
|
PassphraseGeneratorPolicy
|
||||||
|
> {
|
||||||
/** instantiates the password generator strategy.
|
/** instantiates the password generator strategy.
|
||||||
* @param legacy generates the passphrase
|
* @param legacy generates the passphrase
|
||||||
* @param stateProvider provides durable state
|
* @param stateProvider provides durable state
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ import { observe$PerUserId, optionsToRandomAsciiRequest, sharedStateByUserId } f
|
|||||||
import { PASSWORD_SETTINGS } from "./storage";
|
import { PASSWORD_SETTINGS } from "./storage";
|
||||||
|
|
||||||
/** Generates passwords composed of random characters */
|
/** Generates passwords composed of random characters */
|
||||||
export class PasswordGeneratorStrategy
|
export class PasswordGeneratorStrategy implements GeneratorStrategy<
|
||||||
implements GeneratorStrategy<PasswordGenerationOptions, PasswordGeneratorPolicy>
|
PasswordGenerationOptions,
|
||||||
{
|
PasswordGeneratorPolicy
|
||||||
|
> {
|
||||||
/** instantiates the password generator strategy.
|
/** instantiates the password generator strategy.
|
||||||
* @param legacy generates the password
|
* @param legacy generates the password
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ import { SUBADDRESS_SETTINGS } from "./storage";
|
|||||||
* For example, if the email address is `jd+xyz@domain.io`,
|
* For example, if the email address is `jd+xyz@domain.io`,
|
||||||
* the subaddress is `xyz`.
|
* the subaddress is `xyz`.
|
||||||
*/
|
*/
|
||||||
export class SubaddressGeneratorStrategy
|
export class SubaddressGeneratorStrategy implements GeneratorStrategy<
|
||||||
implements GeneratorStrategy<SubaddressGenerationOptions, NoPolicy>
|
SubaddressGenerationOptions,
|
||||||
{
|
NoPolicy
|
||||||
|
> {
|
||||||
/** Instantiates the generation strategy
|
/** Instantiates the generation strategy
|
||||||
* @param usernameService generates an email subaddress from an email address
|
* @param usernameService generates an email subaddress from an email address
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,9 +8,10 @@ import { GeneratorNavigationPolicy } from "./generator-navigation-policy";
|
|||||||
|
|
||||||
/** Enforces policy for generator navigation options.
|
/** Enforces policy for generator navigation options.
|
||||||
*/
|
*/
|
||||||
export class GeneratorNavigationEvaluator
|
export class GeneratorNavigationEvaluator implements PolicyEvaluator<
|
||||||
implements PolicyEvaluator<GeneratorNavigationPolicy, GeneratorNavigation>
|
GeneratorNavigationPolicy,
|
||||||
{
|
GeneratorNavigation
|
||||||
|
> {
|
||||||
/** Instantiates the evaluator.
|
/** Instantiates the evaluator.
|
||||||
* @param policy The policy applied by the evaluator. When this conflicts with
|
* @param policy The policy applied by the evaluator. When this conflicts with
|
||||||
* the defaults, the policy takes precedence.
|
* the defaults, the policy takes precedence.
|
||||||
|
|||||||
8
package-lock.json
generated
8
package-lock.json
generated
@@ -160,7 +160,7 @@
|
|||||||
"path-browserify": "1.0.1",
|
"path-browserify": "1.0.1",
|
||||||
"postcss": "8.5.6",
|
"postcss": "8.5.6",
|
||||||
"postcss-loader": "8.2.0",
|
"postcss-loader": "8.2.0",
|
||||||
"prettier": "3.6.2",
|
"prettier": "3.7.3",
|
||||||
"prettier-plugin-tailwindcss": "0.7.1",
|
"prettier-plugin-tailwindcss": "0.7.1",
|
||||||
"process": "0.11.10",
|
"process": "0.11.10",
|
||||||
"remark-gfm": "4.0.1",
|
"remark-gfm": "4.0.1",
|
||||||
@@ -35983,9 +35983,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "3.6.2",
|
"version": "3.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.3.tgz",
|
||||||
"integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
|
"integrity": "sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@
|
|||||||
"path-browserify": "1.0.1",
|
"path-browserify": "1.0.1",
|
||||||
"postcss": "8.5.6",
|
"postcss": "8.5.6",
|
||||||
"postcss-loader": "8.2.0",
|
"postcss-loader": "8.2.0",
|
||||||
"prettier": "3.6.2",
|
"prettier": "3.7.3",
|
||||||
"prettier-plugin-tailwindcss": "0.7.1",
|
"prettier-plugin-tailwindcss": "0.7.1",
|
||||||
"process": "0.11.10",
|
"process": "0.11.10",
|
||||||
"remark-gfm": "4.0.1",
|
"remark-gfm": "4.0.1",
|
||||||
|
|||||||
Reference in New Issue
Block a user