mirror of
https://github.com/bitwarden/browser
synced 2025-12-24 04:04:24 +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 "./device-management
|
||||
/**
|
||||
* Default implementation of the device management component service
|
||||
*/
|
||||
export class DefaultDeviceManagementComponentService
|
||||
implements DeviceManagementComponentServiceAbstraction
|
||||
{
|
||||
export class DefaultDeviceManagementComponentService implements DeviceManagementComponentServiceAbstraction {
|
||||
/**
|
||||
* Show header information in web client
|
||||
*/
|
||||
|
||||
@@ -3,9 +3,7 @@ import { LoginApprovalDialogComponentServiceAbstraction } from "./login-approval
|
||||
/**
|
||||
* Default implementation of the LoginApprovalDialogComponentServiceAbstraction.
|
||||
*/
|
||||
export class DefaultLoginApprovalDialogComponentService
|
||||
implements LoginApprovalDialogComponentServiceAbstraction
|
||||
{
|
||||
export class DefaultLoginApprovalDialogComponentService implements LoginApprovalDialogComponentServiceAbstraction {
|
||||
/**
|
||||
* No-op implementation of the showLoginRequestedAlertIfWindowNotVisible method.
|
||||
* @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,
|
||||
* or regularly logs in without a master-password, when the migrations do require a master-password to run.
|
||||
*/
|
||||
export class DefaultEncryptedMigrationsSchedulerService
|
||||
implements EncryptedMigrationsSchedulerService
|
||||
{
|
||||
export class DefaultEncryptedMigrationsSchedulerService implements EncryptedMigrationsSchedulerService {
|
||||
isMigrating = false;
|
||||
url$: Observable<string>;
|
||||
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { NewDeviceVerificationComponentService } from "./new-device-verification-component.service";
|
||||
|
||||
export class DefaultNewDeviceVerificationComponentService
|
||||
implements NewDeviceVerificationComponentService
|
||||
{
|
||||
export class DefaultNewDeviceVerificationComponentService implements NewDeviceVerificationComponentService {
|
||||
showBackButton() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { TwoFactorAuthWebAuthnComponentService } from "./two-factor-auth-webauthn-component.service";
|
||||
|
||||
export class DefaultTwoFactorAuthWebAuthnComponentService
|
||||
implements TwoFactorAuthWebAuthnComponentService
|
||||
{
|
||||
export class DefaultTwoFactorAuthWebAuthnComponentService implements TwoFactorAuthWebAuthnComponentService {
|
||||
/**
|
||||
* 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
|
||||
implements InternalUserDecryptionOptionsServiceAbstraction
|
||||
{
|
||||
export class UserDecryptionOptionsService implements InternalUserDecryptionOptionsServiceAbstraction {
|
||||
constructor(private singleUserStateProvider: SingleUserStateProvider) {}
|
||||
|
||||
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 class DefaultOrganizationManagementPreferencesService
|
||||
implements OrganizationManagementPreferencesService
|
||||
{
|
||||
export class DefaultOrganizationManagementPreferencesService implements OrganizationManagementPreferencesService {
|
||||
constructor(private stateProvider: StateProvider) {}
|
||||
|
||||
autoConfirmFingerPrints = this.buildOrganizationManagementPreference(
|
||||
|
||||
@@ -22,9 +22,7 @@ import { UserKey } from "../../types/key";
|
||||
import { AccountService } from "../abstractions/account.service";
|
||||
import { PasswordResetEnrollmentServiceAbstraction } from "../abstractions/password-reset-enrollment.service.abstraction";
|
||||
|
||||
export class PasswordResetEnrollmentServiceImplementation
|
||||
implements PasswordResetEnrollmentServiceAbstraction
|
||||
{
|
||||
export class PasswordResetEnrollmentServiceImplementation implements PasswordResetEnrollmentServiceAbstraction {
|
||||
constructor(
|
||||
protected organizationApiService: OrganizationApiServiceAbstraction,
|
||||
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 { OrganizationSponsorshipInvitesResponse } from "../../models/response/organization-sponsorship-invites.response";
|
||||
|
||||
export class OrganizationSponsorshipApiService
|
||||
implements OrganizationSponsorshipApiServiceAbstraction
|
||||
{
|
||||
export class OrganizationSponsorshipApiService implements OrganizationSponsorshipApiServiceAbstraction {
|
||||
constructor(
|
||||
private apiService: ApiService,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
|
||||
@@ -5,8 +5,10 @@ export interface IpcMessage {
|
||||
message: SerializedOutgoingMessage;
|
||||
}
|
||||
|
||||
export interface SerializedOutgoingMessage
|
||||
extends Omit<OutgoingMessage, typeof Symbol.dispose | "free" | "payload"> {
|
||||
export interface SerializedOutgoingMessage extends Omit<
|
||||
OutgoingMessage,
|
||||
typeof Symbol.dispose | "free" | "payload"
|
||||
> {
|
||||
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.
|
||||
*/
|
||||
export class Fido2AuthenticatorService<ParentWindowReference>
|
||||
implements Fido2AuthenticatorServiceAbstraction<ParentWindowReference>
|
||||
{
|
||||
export class Fido2AuthenticatorService<
|
||||
ParentWindowReference,
|
||||
> implements Fido2AuthenticatorServiceAbstraction<ParentWindowReference> {
|
||||
constructor(
|
||||
private cipherService: CipherService,
|
||||
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.
|
||||
*/
|
||||
export class Fido2ClientService<ParentWindowReference>
|
||||
implements Fido2ClientServiceAbstraction<ParentWindowReference>
|
||||
{
|
||||
export class Fido2ClientService<
|
||||
ParentWindowReference,
|
||||
> implements Fido2ClientServiceAbstraction<ParentWindowReference> {
|
||||
private timeoutAbortController: AbortController;
|
||||
private readonly TIMEOUTS = {
|
||||
NO_VERIFICATION: {
|
||||
|
||||
@@ -14,9 +14,11 @@ import { Classifier } from "./classifier";
|
||||
* Data that cannot be serialized by JSON.stringify() should
|
||||
* be excluded.
|
||||
*/
|
||||
export class SecretClassifier<Plaintext extends object, Disclosed, Secret>
|
||||
implements Classifier<Plaintext, Disclosed, Secret>
|
||||
{
|
||||
export class SecretClassifier<Plaintext extends object, Disclosed, Secret> implements Classifier<
|
||||
Plaintext,
|
||||
Disclosed,
|
||||
Secret
|
||||
> {
|
||||
private constructor(
|
||||
disclosed: readonly (keyof Jsonify<Disclosed> & keyof Jsonify<Plaintext>)[],
|
||||
excluded: readonly (keyof Plaintext)[],
|
||||
|
||||
@@ -25,9 +25,13 @@ const ONE_MINUTE = 1000 * 60;
|
||||
*
|
||||
* DO NOT USE THIS for synchronized data.
|
||||
*/
|
||||
export class SecretState<Outer, Id, Plaintext extends object, Disclosed, Secret>
|
||||
implements SingleUserState<Outer>
|
||||
{
|
||||
export class SecretState<
|
||||
Outer,
|
||||
Id,
|
||||
Plaintext extends object,
|
||||
Disclosed,
|
||||
Secret,
|
||||
> implements SingleUserState<Outer> {
|
||||
// The constructor is private to avoid creating a circular dependency when
|
||||
// wiring the derived and secret states together.
|
||||
private constructor(
|
||||
|
||||
@@ -79,11 +79,11 @@ const DEFAULT_FRAME_SIZE = 32;
|
||||
* @template Dependencies use-specific dependencies provided by the user.
|
||||
*/
|
||||
export class UserStateSubject<
|
||||
State extends object,
|
||||
Secret = State,
|
||||
Disclosed = Record<string, never>,
|
||||
Dependencies = null,
|
||||
>
|
||||
State extends object,
|
||||
Secret = State,
|
||||
Disclosed = Record<string, never>,
|
||||
Dependencies = null,
|
||||
>
|
||||
extends Observable<State>
|
||||
implements SubjectLike<State>
|
||||
{
|
||||
|
||||
@@ -43,9 +43,10 @@ class CustomBlockScrollStrategy implements ScrollStrategy {
|
||||
detach() {}
|
||||
}
|
||||
|
||||
export abstract class DialogRef<R = unknown, C = unknown>
|
||||
implements Pick<CdkDialogRef<R, C>, "close" | "closed" | "disableClose" | "componentInstance">
|
||||
{
|
||||
export abstract class DialogRef<R = unknown, C = unknown> implements Pick<
|
||||
CdkDialogRef<R, C>,
|
||||
"close" | "closed" | "disableClose" | "componentInstance"
|
||||
> {
|
||||
abstract readonly isDrawer?: boolean;
|
||||
|
||||
// --- 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 { KeyRegenerationRequest } from "../models/requests/key-regeneration.request";
|
||||
|
||||
export class DefaultUserAsymmetricKeysRegenerationApiService
|
||||
implements UserAsymmetricKeysRegenerationApiService
|
||||
{
|
||||
export class DefaultUserAsymmetricKeysRegenerationApiService implements UserAsymmetricKeysRegenerationApiService {
|
||||
constructor(private apiService: ApiService) {}
|
||||
|
||||
async regenerateUserAsymmetricKeys(
|
||||
|
||||
@@ -15,9 +15,7 @@ import { KeyService } from "../../abstractions/key.service";
|
||||
import { UserAsymmetricKeysRegenerationApiService } from "../abstractions/user-asymmetric-key-regeneration-api.service";
|
||||
import { UserAsymmetricKeysRegenerationService } from "../abstractions/user-asymmetric-key-regeneration.service";
|
||||
|
||||
export class DefaultUserAsymmetricKeysRegenerationService
|
||||
implements UserAsymmetricKeysRegenerationService
|
||||
{
|
||||
export class DefaultUserAsymmetricKeysRegenerationService implements UserAsymmetricKeysRegenerationService {
|
||||
constructor(
|
||||
private keyService: KeyService,
|
||||
private cipherService: CipherService,
|
||||
|
||||
@@ -5,9 +5,11 @@ import { DeriveDefinition, DerivedState, DerivedStateDependencies } from "@bitwa
|
||||
/**
|
||||
* Default derived state
|
||||
*/
|
||||
export class DefaultDerivedState<TFrom, TTo, TDeps extends DerivedStateDependencies>
|
||||
implements DerivedState<TTo>
|
||||
{
|
||||
export class DefaultDerivedState<
|
||||
TFrom,
|
||||
TTo,
|
||||
TDeps extends DerivedStateDependencies,
|
||||
> implements DerivedState<TTo> {
|
||||
private readonly storageKey: string;
|
||||
private forcedValueSubject = new Subject<TTo>();
|
||||
|
||||
|
||||
@@ -17,9 +17,11 @@ export class InlineDerivedStateProvider implements DerivedStateProvider {
|
||||
}
|
||||
}
|
||||
|
||||
export class InlineDerivedState<TFrom, TTo, TDeps extends DerivedStateDependencies>
|
||||
implements DerivedState<TTo>
|
||||
{
|
||||
export class InlineDerivedState<
|
||||
TFrom,
|
||||
TTo,
|
||||
TDeps extends DerivedStateDependencies,
|
||||
> implements DerivedState<TTo> {
|
||||
constructor(
|
||||
parentState$: Observable<TFrom>,
|
||||
deriveDefinition: DeriveDefinition<TFrom, TTo, TDeps>,
|
||||
|
||||
@@ -236,9 +236,11 @@ export class FakeActiveUserState<T> implements ActiveUserState<T> {
|
||||
}
|
||||
}
|
||||
|
||||
export class FakeDerivedState<TFrom, TTo, TDeps extends DerivedStateDependencies>
|
||||
implements DerivedState<TTo>
|
||||
{
|
||||
export class FakeDerivedState<
|
||||
TFrom,
|
||||
TTo,
|
||||
TDeps extends DerivedStateDependencies,
|
||||
> implements DerivedState<TTo> {
|
||||
// eslint-disable-next-line rxjs/no-exposed-subjects -- exposed for testing setup
|
||||
stateSubject = new ReplaySubject<TTo>(1);
|
||||
|
||||
|
||||
@@ -7,8 +7,7 @@ import { ForwarderContext } from "../forwarder-context";
|
||||
export class CreateForwardingAddressRpc<
|
||||
Settings extends ApiSettings,
|
||||
Req extends IntegrationRequest = IntegrationRequest,
|
||||
> implements JsonRpc<Req, string>
|
||||
{
|
||||
> implements JsonRpc<Req, string> {
|
||||
constructor(
|
||||
readonly requestor: ForwarderConfiguration<Settings>,
|
||||
readonly context: ForwarderContext<Settings>,
|
||||
|
||||
@@ -9,8 +9,7 @@ import { ForwarderContext } from "../forwarder-context";
|
||||
export class GetAccountIdRpc<
|
||||
Settings extends ApiSettings,
|
||||
Req extends IntegrationRequest = IntegrationRequest,
|
||||
> implements JsonRpc<Req, string>
|
||||
{
|
||||
> implements JsonRpc<Req, string> {
|
||||
constructor(
|
||||
readonly requestor: ForwarderConfiguration<Settings>,
|
||||
readonly context: ForwarderContext<Settings>,
|
||||
|
||||
@@ -2,9 +2,10 @@ import { PolicyEvaluator } from "../abstractions";
|
||||
import { NoPolicy } from "../types";
|
||||
|
||||
/** A policy evaluator that does not apply any policy */
|
||||
export class DefaultPolicyEvaluator<PolicyTarget>
|
||||
implements PolicyEvaluator<NoPolicy, PolicyTarget>
|
||||
{
|
||||
export class DefaultPolicyEvaluator<PolicyTarget> implements PolicyEvaluator<
|
||||
NoPolicy,
|
||||
PolicyTarget
|
||||
> {
|
||||
/** {@link PolicyEvaluator.policy} */
|
||||
get policy() {
|
||||
return {};
|
||||
|
||||
@@ -13,9 +13,7 @@ import { atLeast, atLeastSum, maybe, readonlyTrueWhen, AtLeastOne, Zero } from "
|
||||
import { PasswordPolicyConstraints } from "./password-policy-constraints";
|
||||
|
||||
/** Creates state constraints by blending policy and password settings. */
|
||||
export class DynamicPasswordPolicyConstraints
|
||||
implements DynamicStateConstraints<PasswordGeneratorSettings>
|
||||
{
|
||||
export class DynamicPasswordPolicyConstraints implements DynamicStateConstraints<PasswordGeneratorSettings> {
|
||||
/** Instantiates the object.
|
||||
* @param policy the password policy to enforce. This cannot be
|
||||
* `null` or `undefined`.
|
||||
|
||||
@@ -13,9 +13,10 @@ import { observe$PerUserId, sharedStateByUserId } from "../util";
|
||||
import { CATCHALL_SETTINGS } from "./storage";
|
||||
|
||||
/** Strategy for creating usernames using a catchall email address */
|
||||
export class CatchallGeneratorStrategy
|
||||
implements GeneratorStrategy<CatchallGenerationOptions, NoPolicy>
|
||||
{
|
||||
export class CatchallGeneratorStrategy implements GeneratorStrategy<
|
||||
CatchallGenerationOptions,
|
||||
NoPolicy
|
||||
> {
|
||||
/** Instantiates the generation strategy
|
||||
* @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 */
|
||||
export class EffUsernameGeneratorStrategy
|
||||
implements GeneratorStrategy<EffUsernameGenerationOptions, NoPolicy>
|
||||
{
|
||||
export class EffUsernameGeneratorStrategy implements GeneratorStrategy<
|
||||
EffUsernameGenerationOptions,
|
||||
NoPolicy
|
||||
> {
|
||||
/** Instantiates the generation strategy
|
||||
* @param usernameService generates a username from EFF word list
|
||||
*/
|
||||
|
||||
@@ -10,8 +10,7 @@ import { Classifier } from "@bitwarden/common/tools/state/classifier";
|
||||
export class OptionsClassifier<
|
||||
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.
|
||||
* @param value The object to partition
|
||||
* @returns an object that classifies secrets.
|
||||
|
||||
@@ -14,9 +14,10 @@ import { observe$PerUserId, optionsToEffWordListRequest, sharedStateByUserId } f
|
||||
import { PASSPHRASE_SETTINGS } from "./storage";
|
||||
|
||||
/** Generates passphrases composed of random words */
|
||||
export class PassphraseGeneratorStrategy
|
||||
implements GeneratorStrategy<PassphraseGenerationOptions, PassphraseGeneratorPolicy>
|
||||
{
|
||||
export class PassphraseGeneratorStrategy implements GeneratorStrategy<
|
||||
PassphraseGenerationOptions,
|
||||
PassphraseGeneratorPolicy
|
||||
> {
|
||||
/** instantiates the password generator strategy.
|
||||
* @param legacy generates the passphrase
|
||||
* @param stateProvider provides durable state
|
||||
|
||||
@@ -12,9 +12,10 @@ import { observe$PerUserId, optionsToRandomAsciiRequest, sharedStateByUserId } f
|
||||
import { PASSWORD_SETTINGS } from "./storage";
|
||||
|
||||
/** Generates passwords composed of random characters */
|
||||
export class PasswordGeneratorStrategy
|
||||
implements GeneratorStrategy<PasswordGenerationOptions, PasswordGeneratorPolicy>
|
||||
{
|
||||
export class PasswordGeneratorStrategy implements GeneratorStrategy<
|
||||
PasswordGenerationOptions,
|
||||
PasswordGeneratorPolicy
|
||||
> {
|
||||
/** instantiates the password generator strategy.
|
||||
* @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`,
|
||||
* the subaddress is `xyz`.
|
||||
*/
|
||||
export class SubaddressGeneratorStrategy
|
||||
implements GeneratorStrategy<SubaddressGenerationOptions, NoPolicy>
|
||||
{
|
||||
export class SubaddressGeneratorStrategy implements GeneratorStrategy<
|
||||
SubaddressGenerationOptions,
|
||||
NoPolicy
|
||||
> {
|
||||
/** Instantiates the generation strategy
|
||||
* @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.
|
||||
*/
|
||||
export class GeneratorNavigationEvaluator
|
||||
implements PolicyEvaluator<GeneratorNavigationPolicy, GeneratorNavigation>
|
||||
{
|
||||
export class GeneratorNavigationEvaluator implements PolicyEvaluator<
|
||||
GeneratorNavigationPolicy,
|
||||
GeneratorNavigation
|
||||
> {
|
||||
/** Instantiates the evaluator.
|
||||
* @param policy The policy applied by the evaluator. When this conflicts with
|
||||
* the defaults, the policy takes precedence.
|
||||
|
||||
Reference in New Issue
Block a user