1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-20 02:03:39 +00:00

[deps] Autofill: Update prettier to v3 (#7014)

* [deps] Autofill: Update prettier to v3

* prettier formatting updates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
renovate[bot]
2023-11-29 16:15:20 -05:00
committed by GitHub
parent 4ff5f38e89
commit 28de9439be
1145 changed files with 5898 additions and 5612 deletions

View File

@@ -11,7 +11,10 @@ import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.servic
export class EventService {
private policies: Policy[];
constructor(private i18nService: I18nService, policyService: PolicyService) {
constructor(
private i18nService: I18nService,
policyService: PolicyService,
) {
policyService.policies$.subscribe((policies) => {
this.policies = policies;
});
@@ -96,7 +99,7 @@ export class EventService {
msg = this.i18nService.t("permanentlyDeletedItemId", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"permanentlyDeletedItemId",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
case EventType.Cipher_SoftDeleted:
@@ -111,14 +114,14 @@ export class EventService {
msg = this.i18nService.t("createdAttachmentForItem", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"createdAttachmentForItem",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
case EventType.Cipher_AttachmentDeleted:
msg = this.i18nService.t("deletedAttachmentForItem", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"deletedAttachmentForItem",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
case EventType.Cipher_Shared:
@@ -137,28 +140,28 @@ export class EventService {
msg = this.i18nService.t("viewedHiddenFieldItemId", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"viewedHiddenFieldItemId",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
case EventType.Cipher_ClientToggledCardNumberVisible:
msg = this.i18nService.t("viewedCardNumberItemId", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"viewedCardNumberItemId",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
case EventType.Cipher_ClientToggledCardCodeVisible:
msg = this.i18nService.t("viewedSecurityCodeItemId", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"viewedSecurityCodeItemId",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
case EventType.Cipher_ClientCopiedHiddenField:
msg = this.i18nService.t("copiedHiddenFieldItemId", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"copiedHiddenFieldItemId",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
case EventType.Cipher_ClientCopiedPassword:
@@ -169,7 +172,7 @@ export class EventService {
msg = this.i18nService.t("copiedSecurityCodeItemId", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"copiedSecurityCodeItemId",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
case EventType.Cipher_ClientAutofilled:
@@ -180,7 +183,7 @@ export class EventService {
msg = this.i18nService.t("editedCollectionsForItem", this.formatCipherId(ev, options));
humanReadableMsg = this.i18nService.t(
"editedCollectionsForItem",
this.getShortId(ev.cipherId)
this.getShortId(ev.cipherId),
);
break;
// Collection
@@ -188,21 +191,21 @@ export class EventService {
msg = this.i18nService.t("createdCollectionId", this.formatCollectionId(ev));
humanReadableMsg = this.i18nService.t(
"createdCollectionId",
this.getShortId(ev.collectionId)
this.getShortId(ev.collectionId),
);
break;
case EventType.Collection_Updated:
msg = this.i18nService.t("editedCollectionId", this.formatCollectionId(ev));
humanReadableMsg = this.i18nService.t(
"editedCollectionId",
this.getShortId(ev.collectionId)
this.getShortId(ev.collectionId),
);
break;
case EventType.Collection_Deleted:
msg = this.i18nService.t("deletedCollectionId", this.formatCollectionId(ev));
humanReadableMsg = this.i18nService.t(
"deletedCollectionId",
this.getShortId(ev.collectionId)
this.getShortId(ev.collectionId),
);
break;
// Group
@@ -223,105 +226,105 @@ export class EventService {
msg = this.i18nService.t("invitedUserId", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"invitedUserId",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_Confirmed:
msg = this.i18nService.t("confirmedUserId", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"confirmedUserId",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_Updated:
msg = this.i18nService.t("editedUserId", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"editedUserId",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_Removed:
msg = this.i18nService.t("removedUserId", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"removedUserId",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_UpdatedGroups:
msg = this.i18nService.t("editedGroupsForUser", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"editedGroupsForUser",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_UnlinkedSso:
msg = this.i18nService.t("unlinkedSsoUser", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"unlinkedSsoUser",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_ResetPassword_Enroll:
msg = this.i18nService.t("eventEnrollAccountRecovery", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"eventEnrollAccountRecovery",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_ResetPassword_Withdraw:
msg = this.i18nService.t("eventWithdrawAccountRecovery", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"eventWithdrawAccountRecovery",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_AdminResetPassword:
msg = this.i18nService.t("eventAdminPasswordReset", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"eventAdminPasswordReset",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_ResetSsoLink:
msg = this.i18nService.t("eventResetSsoLink", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"eventResetSsoLink",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_FirstSsoLogin:
msg = this.i18nService.t("firstSsoLogin", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"firstSsoLogin",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_Revoked:
msg = this.i18nService.t("revokedUserId", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"revokedUserId",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_Restored:
msg = this.i18nService.t("restoredUserId", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"restoredUserId",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_ApprovedAuthRequest:
msg = this.i18nService.t("approvedAuthRequest", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"approvedAuthRequest",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
case EventType.OrganizationUser_RejectedAuthRequest:
msg = this.i18nService.t("rejectedAuthRequest", this.formatOrgUserId(ev));
humanReadableMsg = this.i18nService.t(
"rejectedAuthRequest",
this.getShortId(ev.organizationUserId)
this.getShortId(ev.organizationUserId),
);
break;
// Org
@@ -356,7 +359,7 @@ export class EventService {
msg = this.i18nService.t("modifiedCollectionManagement", this.formatOrganizationId(ev));
humanReadableMsg = this.i18nService.t(
"modifiedCollectionManagement",
this.getShortId(ev.organizationId)
this.getShortId(ev.organizationId),
);
break;
@@ -382,7 +385,7 @@ export class EventService {
msg = this.i18nService.t("confirmedUserId", this.formatProviderUserId(ev));
humanReadableMsg = this.i18nService.t(
"confirmedUserId",
this.getShortId(ev.providerUserId)
this.getShortId(ev.providerUserId),
);
break;
case EventType.ProviderUser_Updated:
@@ -397,28 +400,28 @@ export class EventService {
msg = this.i18nService.t("createdOrganizationId", this.formatProviderOrganizationId(ev));
humanReadableMsg = this.i18nService.t(
"createdOrganizationId",
this.getShortId(ev.providerOrganizationId)
this.getShortId(ev.providerOrganizationId),
);
break;
case EventType.ProviderOrganization_Added:
msg = this.i18nService.t("addedOrganizationId", this.formatProviderOrganizationId(ev));
humanReadableMsg = this.i18nService.t(
"addedOrganizationId",
this.getShortId(ev.providerOrganizationId)
this.getShortId(ev.providerOrganizationId),
);
break;
case EventType.ProviderOrganization_Removed:
msg = this.i18nService.t("removedOrganizationId", this.formatProviderOrganizationId(ev));
humanReadableMsg = this.i18nService.t(
"removedOrganizationId",
this.getShortId(ev.providerOrganizationId)
this.getShortId(ev.providerOrganizationId),
);
break;
case EventType.ProviderOrganization_VaultAccessed:
msg = this.i18nService.t("accessedClientVault", this.formatProviderOrganizationId(ev));
humanReadableMsg = this.i18nService.t(
"accessedClientVault",
this.getShortId(ev.providerOrganizationId)
this.getShortId(ev.providerOrganizationId),
);
break;
// Org Domain claiming events
@@ -518,7 +521,7 @@ export class EventService {
const a = this.makeAnchor(shortId);
a.setAttribute(
"href",
`#/organizations/${ev.organizationId}/vault?search=${shortId}&viewEvents=${ev.cipherId}&type=all`
`#/organizations/${ev.organizationId}/vault?search=${shortId}&viewEvents=${ev.cipherId}&type=all`,
);
return a.outerHTML;
}
@@ -535,7 +538,7 @@ export class EventService {
const a = this.makeAnchor(shortId);
a.setAttribute(
"href",
`#/organizations/${ev.organizationId}/vault?collectionId=${ev.collectionId}`
`#/organizations/${ev.organizationId}/vault?collectionId=${ev.collectionId}`,
);
return a.outerHTML;
}
@@ -550,7 +553,7 @@ export class EventService {
"/members?search=" +
shortId +
"&viewEvents=" +
ev.organizationUserId
ev.organizationUserId,
);
return a.outerHTML;
}
@@ -565,7 +568,7 @@ export class EventService {
"/manage/people?search=" +
shortId +
"&viewEvents=" +
ev.providerUserId
ev.providerUserId,
);
return a.outerHTML;
}
@@ -589,7 +592,7 @@ export class EventService {
const a = this.makeAnchor(shortId);
a.setAttribute(
"href",
"#/organizations/" + ev.organizationId + "/settings/policies?policyId=" + ev.policyId
"#/organizations/" + ev.organizationId + "/settings/policies?policyId=" + ev.policyId,
);
return a.outerHTML;
}

View File

@@ -11,7 +11,7 @@ export class HasPremiumGuard implements CanActivate {
constructor(
private router: Router,
private stateService: StateService,
private messagingService: MessagingService
private messagingService: MessagingService,
) {}
async canActivate(route: ActivatedRouteSnapshot, routerState: RouterStateSnapshot) {

View File

@@ -34,7 +34,7 @@ export class InitService {
private cryptoService: CryptoServiceAbstraction,
private themingService: AbstractThemingService,
private encryptService: EncryptService,
private configService: ConfigService
private configService: ConfigService,
) {}
init() {

View File

@@ -16,7 +16,7 @@ export class ModalService extends BaseModalService {
componentFactoryResolver: ComponentFactoryResolver,
applicationRef: ApplicationRef,
injector: Injector,
private messagingService: MessagingService
private messagingService: MessagingService,
) {
super(componentFactoryResolver, applicationRef, injector);
}

View File

@@ -17,7 +17,7 @@ export class RouterService {
private activatedRoute: ActivatedRoute,
private titleService: Title,
private stateService: StateService,
i18nService: I18nService
i18nService: I18nService,
) {
this.currentUrl = this.router.url;

View File

@@ -32,7 +32,7 @@ export class StateService extends BaseStateService<GlobalState, Account> {
logService: LogService,
@Inject(STATE_FACTORY) stateFactory: StateFactory<GlobalState, Account>,
accountService: AccountService,
@Inject(STATE_SERVICE_USE_CACHE) useAccountCache = true
@Inject(STATE_SERVICE_USE_CACHE) useAccountCache = true,
) {
super(
storageService,
@@ -41,7 +41,7 @@ export class StateService extends BaseStateService<GlobalState, Account> {
logService,
stateFactory,
accountService,
useAccountCache
useAccountCache,
);
}
@@ -58,14 +58,14 @@ export class StateService extends BaseStateService<GlobalState, Account> {
async setEncryptedCiphers(
value: { [id: string]: CipherData },
options?: StorageOptions
options?: StorageOptions,
): Promise<void> {
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
return await super.setEncryptedCiphers(value, options);
}
async getEncryptedCollections(
options?: StorageOptions
options?: StorageOptions,
): Promise<{ [id: string]: CollectionData }> {
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
return await super.getEncryptedCollections(options);
@@ -73,7 +73,7 @@ export class StateService extends BaseStateService<GlobalState, Account> {
async setEncryptedCollections(
value: { [id: string]: CollectionData },
options?: StorageOptions
options?: StorageOptions,
): Promise<void> {
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
return await super.setEncryptedCollections(value, options);
@@ -86,7 +86,7 @@ export class StateService extends BaseStateService<GlobalState, Account> {
async setEncryptedFolders(
value: { [id: string]: FolderData },
options?: StorageOptions
options?: StorageOptions,
): Promise<void> {
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
return await super.setEncryptedFolders(value, options);
@@ -99,7 +99,7 @@ export class StateService extends BaseStateService<GlobalState, Account> {
async setEncryptedSends(
value: { [id: string]: SendData },
options?: StorageOptions
options?: StorageOptions,
): Promise<void> {
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
return await super.setEncryptedSends(value, options);

View File

@@ -13,7 +13,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
constructor(
private i18nService: I18nService,
private messagingService: MessagingService,
private logService: LogService
private logService: LogService,
) {}
getDevice(): DeviceType {
@@ -122,7 +122,7 @@ export class WebPlatformUtilsService implements PlatformUtilsService {
type: "error" | "success" | "warning" | "info",
title: string,
text: string | string[],
options?: any
options?: any,
): void {
this.messagingService.send("showToast", {
text: text,