mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
Add eslint rule no-floating-promises (#7789)
* add eslint rule no-floating-promises * add eslint-disable comment to offending lines
This commit is contained in:
parent
6e96964c1a
commit
cb8849c355
@ -39,6 +39,7 @@
|
||||
{ "accessibility": "no-public" }
|
||||
],
|
||||
"@typescript-eslint/no-explicit-any": "off", // TODO: This should be re-enabled
|
||||
"@typescript-eslint/no-floating-promises": "error",
|
||||
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
|
||||
"@typescript-eslint/no-this-alias": ["error", { "allowedNames": ["self"] }],
|
||||
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
|
||||
|
@ -36,6 +36,8 @@ export class BrowserPolicyService extends PolicyService {
|
||||
]),
|
||||
tap(([activated, autofillEnabled]) => {
|
||||
if (activated === undefined) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setActivateAutoFillOnPageLoadFromPolicy(!autofillEnabled);
|
||||
}
|
||||
}),
|
||||
|
@ -64,6 +64,8 @@ export class AccountSwitcherComponent implements OnInit, OnDestroy {
|
||||
async lock(userId?: string) {
|
||||
this.loading = true;
|
||||
await this.vaultTimeoutService.lock(userId ? userId : null);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["lock"]);
|
||||
}
|
||||
|
||||
@ -103,6 +105,8 @@ export class AccountSwitcherComponent implements OnInit, OnDestroy {
|
||||
this.messagingService.send("logout");
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["home"]);
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,8 @@ export class AccountComponent {
|
||||
await this.accountSwitcherService.selectAccount(id);
|
||||
|
||||
if (id === this.specialAccountAddId) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["home"]);
|
||||
} else {
|
||||
this.location.back();
|
||||
|
@ -24,6 +24,8 @@ export class CurrentAccountComponent {
|
||||
if (this.route.snapshot.data.state.includes("account-switcher")) {
|
||||
this.location.back();
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/account-switcher"]);
|
||||
}
|
||||
}
|
||||
|
@ -44,6 +44,8 @@ export class EnvironmentComponent extends BaseEnvironmentComponent implements On
|
||||
|
||||
saved() {
|
||||
super.saved();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate([""]);
|
||||
}
|
||||
}
|
||||
|
@ -25,6 +25,8 @@ export class HintComponent extends BaseHintComponent {
|
||||
super(router, i18nService, apiService, platformUtilsService, logService, loginService);
|
||||
|
||||
super.onSuccessfulSubmit = async () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate([this.successRoute]);
|
||||
};
|
||||
}
|
||||
|
@ -61,6 +61,8 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||
.pipe(takeUntil(this.destroyed$))
|
||||
.subscribe(() => {
|
||||
this.setFormValues();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["environment"]);
|
||||
});
|
||||
}
|
||||
@ -87,6 +89,8 @@ export class HomeComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.loginService.setEmail(this.formGroup.value.email);
|
||||
this.loginService.setRememberEmail(this.formGroup.value.rememberEmail);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["login"], { queryParams: { email: this.formGroup.value.email } });
|
||||
}
|
||||
|
||||
|
@ -87,8 +87,12 @@ export class LockComponent extends BaseLockComponent {
|
||||
super.onSuccessfulSubmit = async () => {
|
||||
const previousUrl = this.routerService.getPreviousUrl();
|
||||
if (previousUrl) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigateByUrl(previousUrl);
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate([this.successRoute]);
|
||||
}
|
||||
};
|
||||
|
@ -31,6 +31,8 @@ export class LoginDecryptionOptionsComponent extends BaseLoginDecryptionOptionsC
|
||||
|
||||
// doneLoggingOut already has a message handler that will navigate us
|
||||
if (command === "switchAccountFinish") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/"]);
|
||||
}
|
||||
}
|
||||
|
@ -75,11 +75,15 @@ export class LoginComponent extends BaseLoginComponent {
|
||||
if (this.showPasswordless) {
|
||||
this.formGroup.controls.email.setValue(this.loginService.getEmail());
|
||||
this.formGroup.controls.rememberEmail.setValue(this.loginService.getRememberEmail());
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.validateEmail();
|
||||
}
|
||||
}
|
||||
|
||||
settings() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["environment"]);
|
||||
}
|
||||
|
||||
|
@ -60,6 +60,8 @@ export class SsoComponent extends BaseSsoComponent {
|
||||
this.clientId = "browser";
|
||||
|
||||
super.onSuccessfulLogin = async () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
syncService.fullSync(true);
|
||||
|
||||
// If the vault is unlocked then this will clear keys from memory, which we don't want to do
|
||||
@ -71,6 +73,8 @@ export class SsoComponent extends BaseSsoComponent {
|
||||
};
|
||||
|
||||
super.onSuccessfulLoginTde = async () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
syncService.fullSync(true);
|
||||
};
|
||||
|
||||
|
@ -39,8 +39,12 @@ export class TwoFactorOptionsComponent extends BaseTwoFactorOptionsComponent {
|
||||
// Persist SSO flag back to the 2FA comp if it exists
|
||||
// in order for successful login logic to work properly for
|
||||
// SSO + 2FA in browser extension
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["2fa"], { queryParams: { sso: true } });
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["2fa"]);
|
||||
}
|
||||
}
|
||||
|
@ -70,10 +70,14 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
configService,
|
||||
);
|
||||
super.onSuccessfulLogin = async () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
syncService.fullSync(true);
|
||||
};
|
||||
|
||||
super.onSuccessfulLoginTde = async () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
syncService.fullSync(true);
|
||||
};
|
||||
|
||||
@ -92,6 +96,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
this.selectedProviderType = TwoFactorProviderType.WebAuthn;
|
||||
this.token = this.route.snapshot.paramMap.get("webAuthnResponse");
|
||||
super.onSuccessfulLogin = async () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.syncService.fullSync(true);
|
||||
this.messagingService.send("reloadPopup");
|
||||
window.close();
|
||||
@ -122,6 +128,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
type: "warning",
|
||||
});
|
||||
if (confirmed) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.openCurrentPagePopout(window);
|
||||
}
|
||||
}
|
||||
@ -133,6 +141,8 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
// This is not awaited so we don't pause the application while the sync is happening.
|
||||
// This call is executed by the service that lives in the background script so it will continue
|
||||
// the sync even if this tab closes.
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.syncService.fullSync(true);
|
||||
|
||||
// Force sidebars (FF && Opera) to reload while exempting current window
|
||||
@ -162,8 +172,12 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
|
||||
if (sso) {
|
||||
// We must persist this so when the user returns to the 2FA comp, the
|
||||
// proper onSuccessfulLogin logic is executed.
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["2fa-options"], { queryParams: { sso: true } });
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["2fa-options"]);
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ export class UpdateTempPasswordComponent extends BaseUpdateTempPasswordComponent
|
||||
|
||||
// doneLoggingOut already has a message handler that will navigate us
|
||||
if (command === "switchAccountFinish") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/"]);
|
||||
}
|
||||
}
|
||||
|
@ -21,6 +21,8 @@ async function openUnlockPopout(senderTab: chrome.tabs.Tab, skipNotification = f
|
||||
const existingPopoutWindowTabs = await BrowserApi.tabsQuery({ windowType: "popup" });
|
||||
existingPopoutWindowTabs.forEach((tab) => {
|
||||
if (extensionUnlockUrls.has(tab.url)) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.removeWindow(tab.windowId);
|
||||
}
|
||||
});
|
||||
|
@ -25,9 +25,13 @@ export default class ContextMenusBackground {
|
||||
sender: chrome.runtime.MessageSender,
|
||||
) => {
|
||||
if (msg.command === "unlockCompleted" && msg.data.target === "contextmenus.background") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.contextMenuClickedHandler
|
||||
.cipherAction(msg.data.commandToRetry.msg.data, msg.data.commandToRetry.sender.tab)
|
||||
.then(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessageData(sender.tab, "closeNotificationBar");
|
||||
});
|
||||
}
|
||||
|
@ -53,6 +53,8 @@ export default class NotificationBackground {
|
||||
BrowserApi.messageListener(
|
||||
"notification.background",
|
||||
(msg: any, sender: chrome.runtime.MessageSender) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.processMessage(msg, sender);
|
||||
},
|
||||
);
|
||||
@ -156,6 +158,8 @@ export default class NotificationBackground {
|
||||
private cleanupNotificationQueue() {
|
||||
for (let i = this.notificationQueue.length - 1; i >= 0; i--) {
|
||||
if (this.notificationQueue[i].expires < new Date()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessageData(this.notificationQueue[i].tab, "closeNotificationBar");
|
||||
this.notificationQueue.splice(i, 1);
|
||||
}
|
||||
@ -173,6 +177,8 @@ export default class NotificationBackground {
|
||||
(message) => message.tab.id === tab.id && message.domain === tabDomain,
|
||||
);
|
||||
if (queueMessage) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendNotificationQueueMessage(tab, queueMessage);
|
||||
}
|
||||
}
|
||||
@ -251,6 +257,8 @@ export default class NotificationBackground {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.pushAddLoginToQueue(loginDomain, loginInfo, tab, true);
|
||||
return;
|
||||
}
|
||||
@ -264,6 +272,8 @@ export default class NotificationBackground {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.pushAddLoginToQueue(loginDomain, loginInfo, tab);
|
||||
} else if (
|
||||
usernameMatches.length === 1 &&
|
||||
@ -274,6 +284,8 @@ export default class NotificationBackground {
|
||||
if (disabledChangePassword) {
|
||||
return;
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.pushChangePasswordToQueue(usernameMatches[0].id, loginDomain, loginInfo.password, tab);
|
||||
}
|
||||
}
|
||||
@ -307,6 +319,8 @@ export default class NotificationBackground {
|
||||
}
|
||||
|
||||
if ((await this.authService.getAuthStatus()) < AuthenticationStatus.Unlocked) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.pushChangePasswordToQueue(null, loginDomain, changeData.newPassword, tab, true);
|
||||
return;
|
||||
}
|
||||
@ -324,6 +338,8 @@ export default class NotificationBackground {
|
||||
id = ciphers[0].id;
|
||||
}
|
||||
if (id != null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.pushChangePasswordToQueue(id, loginDomain, changeData.newPassword, tab);
|
||||
}
|
||||
}
|
||||
@ -350,6 +366,8 @@ export default class NotificationBackground {
|
||||
|
||||
const loginDomain = Utils.getDomain(tab.url);
|
||||
if (loginDomain) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.pushUnlockVaultToQueue(loginDomain, tab);
|
||||
}
|
||||
}
|
||||
@ -369,6 +387,8 @@ export default class NotificationBackground {
|
||||
|
||||
const loginDomain = Utils.getDomain(tab.url);
|
||||
if (loginDomain) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.pushRequestFilelessImportToQueue(loginDomain, tab, importType);
|
||||
}
|
||||
}
|
||||
@ -448,6 +468,8 @@ export default class NotificationBackground {
|
||||
}
|
||||
|
||||
this.notificationQueue.splice(i, 1);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessageData(tab, "closeNotificationBar");
|
||||
|
||||
if (queueMessage.type === NotificationQueueMessageType.ChangePassword) {
|
||||
@ -481,6 +503,8 @@ export default class NotificationBackground {
|
||||
|
||||
const cipher = await this.cipherService.encrypt(newCipher);
|
||||
await this.cipherService.createWithServer(cipher);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessageData(tab, "addedCipher");
|
||||
}
|
||||
}
|
||||
@ -496,6 +520,8 @@ export default class NotificationBackground {
|
||||
|
||||
if (edit) {
|
||||
await this.editItem(cipherView, tab);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessage(tab, "editedCipher");
|
||||
return;
|
||||
}
|
||||
@ -548,6 +574,8 @@ export default class NotificationBackground {
|
||||
}
|
||||
|
||||
this.notificationQueue.splice(i, 1);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessageData(tab, "closeNotificationBar");
|
||||
|
||||
const hostname = Utils.getHostname(tab.url);
|
||||
|
@ -52,11 +52,15 @@ describe("OverlayBackground", () => {
|
||||
const initOverlayElementPorts = (options = { initList: true, initButton: true }) => {
|
||||
const { initList, initButton } = options;
|
||||
if (initButton) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
overlayBackground["handlePortOnConnect"](createPortSpyMock(AutofillOverlayPort.Button));
|
||||
buttonPortSpy = overlayBackground["overlayButtonPort"];
|
||||
}
|
||||
|
||||
if (initList) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
overlayBackground["handlePortOnConnect"](createPortSpyMock(AutofillOverlayPort.List));
|
||||
listPortSpy = overlayBackground["overlayListPort"];
|
||||
}
|
||||
@ -75,6 +79,8 @@ describe("OverlayBackground", () => {
|
||||
i18nService,
|
||||
platformUtilsService,
|
||||
);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
overlayBackground.init();
|
||||
});
|
||||
|
||||
@ -698,8 +704,12 @@ describe("OverlayBackground", () => {
|
||||
|
||||
describe("updateAutofillOverlayPosition message handler", () => {
|
||||
beforeEach(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
overlayBackground["handlePortOnConnect"](createPortSpyMock(AutofillOverlayPort.List));
|
||||
listPortSpy = overlayBackground["overlayListPort"];
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
overlayBackground["handlePortOnConnect"](createPortSpyMock(AutofillOverlayPort.Button));
|
||||
buttonPortSpy = overlayBackground["overlayButtonPort"];
|
||||
});
|
||||
@ -977,6 +987,8 @@ describe("OverlayBackground", () => {
|
||||
it("skips setting up the overlay port if the port connection is not for an overlay element", () => {
|
||||
const port = createPortSpyMock("not-an-overlay-element");
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
overlayBackground["handlePortOnConnect"](port);
|
||||
|
||||
expect(port.onMessage.addListener).not.toHaveBeenCalled();
|
||||
|
@ -279,6 +279,8 @@ class OverlayBackground implements OverlayBackgroundInterface {
|
||||
* @param forceCloseOverlay - Identifies whether the overlay should be force closed
|
||||
*/
|
||||
private closeOverlay({ sender }: chrome.runtime.Port, forceCloseOverlay = false) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessageData(sender.tab, "closeAutofillOverlay", { forceCloseOverlay });
|
||||
}
|
||||
|
||||
@ -514,10 +516,14 @@ class OverlayBackground implements OverlayBackgroundInterface {
|
||||
*/
|
||||
private handleOverlayButtonClicked(port: chrome.runtime.Port) {
|
||||
if (this.userAuthStatus !== AuthenticationStatus.Unlocked) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.unlockVault(port);
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.openOverlay(false, true);
|
||||
}
|
||||
|
||||
@ -624,6 +630,8 @@ class OverlayBackground implements OverlayBackgroundInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessageData(sender.tab, "redirectOverlayFocusOut", { direction });
|
||||
}
|
||||
|
||||
@ -634,6 +642,8 @@ class OverlayBackground implements OverlayBackgroundInterface {
|
||||
* @param sender - The sender of the port message
|
||||
*/
|
||||
private getNewVaultItemDetails({ sender }: chrome.runtime.Port) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessage(sender.tab, { command: "addNewVaultItemFromOverlay" });
|
||||
}
|
||||
|
||||
@ -704,6 +714,8 @@ class OverlayBackground implements OverlayBackgroundInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
Promise.resolve(messageResponse).then((response) => sendResponse(response));
|
||||
return true;
|
||||
};
|
||||
|
@ -39,6 +39,8 @@ describe("TabsBackground", () => {
|
||||
"handleWindowOnFocusChanged",
|
||||
);
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
tabsBackground.init();
|
||||
|
||||
expect(chrome.windows.onFocusChanged.addListener).toHaveBeenCalledWith(
|
||||
|
@ -20,6 +20,8 @@ export default class TabsBackground {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.updateCurrentTabData();
|
||||
this.setupTabEventListeners();
|
||||
}
|
||||
|
@ -232,6 +232,8 @@ export class ContextMenuClickedHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setLastActive(new Date().getTime());
|
||||
switch (info.parentMenuItemId) {
|
||||
case AUTOFILL_ID:
|
||||
@ -277,6 +279,8 @@ export class ContextMenuClickedHandler {
|
||||
});
|
||||
} else {
|
||||
this.copyToClipboard({ text: cipher.login.password, tab: tab });
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.eventCollectionService.collect(EventType.Cipher_ClientCopiedPassword, cipher.id);
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,8 @@ export class GeneratePasswordToClipboardCommand {
|
||||
const [options] = await this.passwordGenerationService.getOptions();
|
||||
const password = await this.passwordGenerationService.generatePassword(options);
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
copyToClipboard(tab, password);
|
||||
|
||||
const clearClipboard = await this.stateService.getClearClipboard();
|
||||
|
@ -78,6 +78,8 @@ class AutofillInit implements AutofillInitInterface {
|
||||
return pageDetails;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage({
|
||||
command: "collectPageDetailsResponse",
|
||||
tab: message.tab,
|
||||
@ -258,6 +260,8 @@ class AutofillInit implements AutofillInitInterface {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
Promise.resolve(messageResponse).then((response) => sendResponse(response));
|
||||
return true;
|
||||
};
|
||||
|
@ -22,6 +22,8 @@ function loadAutofiller() {
|
||||
};
|
||||
|
||||
setupExtensionEventListeners();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
triggerUserFillOnLoad();
|
||||
|
||||
async function triggerUserFillOnLoad() {
|
||||
@ -55,6 +57,8 @@ function loadAutofiller() {
|
||||
sender: "autofiller",
|
||||
};
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage(msg);
|
||||
}
|
||||
}
|
||||
|
@ -37,11 +37,15 @@ class ContentMessageHandler implements ContentMessageHandlerInterface {
|
||||
|
||||
if (command === "authResult") {
|
||||
const { lastpass, code, state } = data;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage({ command, code, state, lastpass, referrer });
|
||||
}
|
||||
|
||||
if (command === "webAuthnResult") {
|
||||
const { remember } = data;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage({ command, data: data.data, remember, referrer });
|
||||
}
|
||||
};
|
||||
@ -56,6 +60,8 @@ class ContentMessageHandler implements ContentMessageHandlerInterface {
|
||||
*/
|
||||
private handleExtensionMessage = (message: any) => {
|
||||
if (this.forwardCommands.includes(message.command)) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage(message);
|
||||
}
|
||||
};
|
||||
|
@ -60,6 +60,8 @@ chrome.runtime.onMessage.addListener((event, _sender, sendResponse) => {
|
||||
if (sendResponse) {
|
||||
sendResponse(identifier);
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage({
|
||||
command: "getClickedElementResponse",
|
||||
sender: "contextMenuHandler",
|
||||
|
@ -31,6 +31,8 @@ interface HTMLElementWithFormOpId extends HTMLElement {
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", loadNotificationBar);
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
loadNotificationBar();
|
||||
}
|
||||
|
||||
@ -942,6 +944,8 @@ async function loadNotificationBar() {
|
||||
|
||||
// Helper Functions
|
||||
function sendPlatformMessage(msg: any) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage(msg);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function () {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage({ command: "triggerAutofillScriptInjection" });
|
||||
})();
|
||||
|
@ -282,6 +282,8 @@ function setContent(template: HTMLTemplateElement) {
|
||||
}
|
||||
|
||||
function sendPlatformMessage(msg: Record<string, unknown>) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage(msg);
|
||||
}
|
||||
|
||||
|
@ -124,14 +124,24 @@ export class AutofillComponent implements OnInit {
|
||||
|
||||
async commandSettings() {
|
||||
if (this.platformUtilsService.isChrome()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("chrome://extensions/shortcuts");
|
||||
} else if (this.platformUtilsService.isOpera()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("opera://extensions/shortcuts");
|
||||
} else if (this.platformUtilsService.isEdge()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("edge://extensions/shortcuts");
|
||||
} else if (this.platformUtilsService.isVivaldi()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("vivaldi://extensions/shortcuts");
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("https://bitwarden.com/help/keyboard-shortcuts");
|
||||
}
|
||||
}
|
||||
@ -155,6 +165,8 @@ export class AutofillComponent implements OnInit {
|
||||
|
||||
protected openDisablePasswordManagerLink(event: Event) {
|
||||
event.preventDefault();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab(this.disablePasswordManagerLink);
|
||||
}
|
||||
|
||||
|
@ -165,6 +165,8 @@ describe("AutofillOverlayContentService", () => {
|
||||
it("ignores fields that are readonly", () => {
|
||||
autofillFieldData.readonly = true;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
|
||||
autofillFieldElement,
|
||||
autofillFieldData,
|
||||
@ -176,6 +178,8 @@ describe("AutofillOverlayContentService", () => {
|
||||
it("ignores fields that contain a disabled attribute", () => {
|
||||
autofillFieldData.disabled = true;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
|
||||
autofillFieldElement,
|
||||
autofillFieldData,
|
||||
@ -187,6 +191,8 @@ describe("AutofillOverlayContentService", () => {
|
||||
it("ignores fields that are not viewable", () => {
|
||||
autofillFieldData.viewable = false;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
|
||||
autofillFieldElement,
|
||||
autofillFieldData,
|
||||
@ -199,6 +205,8 @@ describe("AutofillOverlayContentService", () => {
|
||||
AutoFillConstants.ExcludedOverlayTypes.forEach((excludedType) => {
|
||||
autofillFieldData.type = excludedType;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
|
||||
autofillFieldElement,
|
||||
autofillFieldData,
|
||||
@ -211,6 +219,8 @@ describe("AutofillOverlayContentService", () => {
|
||||
it("ignores fields that contain the keyword `search`", () => {
|
||||
autofillFieldData.placeholder = "search";
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
|
||||
autofillFieldElement,
|
||||
autofillFieldData,
|
||||
@ -222,6 +232,8 @@ describe("AutofillOverlayContentService", () => {
|
||||
it("ignores fields that contain the keyword `captcha` ", () => {
|
||||
autofillFieldData.placeholder = "captcha";
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
|
||||
autofillFieldElement,
|
||||
autofillFieldData,
|
||||
@ -233,6 +245,8 @@ describe("AutofillOverlayContentService", () => {
|
||||
it("ignores fields that do not appear as a login field", () => {
|
||||
autofillFieldData.placeholder = "not-a-login-field";
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
|
||||
autofillFieldElement,
|
||||
autofillFieldData,
|
||||
@ -1524,6 +1538,8 @@ describe("AutofillOverlayContentService", () => {
|
||||
placeholder: "username",
|
||||
elementNumber: 1,
|
||||
});
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
|
||||
autofillFieldElement,
|
||||
autofillFieldData,
|
||||
|
@ -118,6 +118,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
}
|
||||
|
||||
if (this.pageDetailsUpdateRequired) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("bgCollectPageDetails", {
|
||||
sender: "autofillOverlayContentService",
|
||||
});
|
||||
@ -179,6 +181,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
|
||||
this.overlayButtonElement.remove();
|
||||
this.isOverlayButtonVisible = false;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("autofillOverlayElementClosed", {
|
||||
overlayElement: AutofillOverlayElement.Button,
|
||||
});
|
||||
@ -195,6 +199,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
|
||||
this.overlayListElement.remove();
|
||||
this.isOverlayListVisible = false;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("autofillOverlayElementClosed", {
|
||||
overlayElement: AutofillOverlayElement.List,
|
||||
});
|
||||
@ -216,6 +222,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
hostname: globalThis.document.location.hostname,
|
||||
};
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("autofillOverlayAddNewVaultItem", { login });
|
||||
}
|
||||
|
||||
@ -327,6 +335,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
*/
|
||||
private handleFormFieldBlurEvent = () => {
|
||||
this.isFieldCurrentlyFocused = false;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("checkAutofillOverlayFocused");
|
||||
};
|
||||
|
||||
@ -354,6 +364,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.focusOverlayList();
|
||||
}
|
||||
};
|
||||
@ -371,6 +383,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("focusAutofillOverlayList");
|
||||
}
|
||||
|
||||
@ -493,6 +507,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
}
|
||||
|
||||
if (!formElementHasValue || (!this.isOverlayCiphersPopulated && this.isUserAuthed())) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("openAutofillOverlay");
|
||||
return;
|
||||
}
|
||||
@ -583,6 +599,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
this.isOverlayButtonVisible = true;
|
||||
this.setOverlayRepositionEventListeners();
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("updateAutofillOverlayPosition", {
|
||||
overlayElement: AutofillOverlayElement.Button,
|
||||
});
|
||||
@ -601,6 +619,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
this.isOverlayListVisible = true;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("updateAutofillOverlayPosition", {
|
||||
overlayElement: AutofillOverlayElement.List,
|
||||
});
|
||||
@ -625,6 +645,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
*/
|
||||
private toggleOverlayHidden(isHidden: boolean) {
|
||||
const displayValue = isHidden ? "none" : "block";
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("updateAutofillOverlayHidden", { display: displayValue });
|
||||
|
||||
this.isOverlayButtonVisible = !isHidden;
|
||||
@ -649,6 +671,8 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
|
||||
focusedFieldRects: { width, height, top, left },
|
||||
};
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendExtensionMessage("updateFocusedFieldData", {
|
||||
focusedFieldData: this.focusedFieldData,
|
||||
});
|
||||
|
@ -122,6 +122,8 @@ describe("AutofillService", () => {
|
||||
});
|
||||
autofillService["autofillScriptPortsSet"] = new Set([port1, port2]);
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillService.reloadAutofillScripts();
|
||||
|
||||
expect(port1.disconnect).toHaveBeenCalled();
|
||||
@ -133,6 +135,8 @@ describe("AutofillService", () => {
|
||||
autofillService["autofillScriptPortsSet"] = new Set([mock<chrome.runtime.Port>()]);
|
||||
jest.spyOn(autofillService as any, "injectAutofillScriptsInAllTabs");
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
autofillService.reloadAutofillScripts();
|
||||
|
||||
expect(autofillService["injectAutofillScriptsInAllTabs"]).toHaveBeenCalled();
|
||||
|
@ -57,6 +57,8 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
async loadAutofillScriptsOnInstall() {
|
||||
BrowserApi.addListener(chrome.runtime.onConnect, this.handleInjectedScriptPortConnection);
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.injectAutofillScriptsInAllTabs();
|
||||
}
|
||||
|
||||
@ -72,6 +74,8 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
this.autofillScriptPortsSet.delete(port);
|
||||
});
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.injectAutofillScriptsInAllTabs();
|
||||
}
|
||||
|
||||
@ -243,9 +247,13 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
|
||||
didAutofill = true;
|
||||
if (!options.skipLastUsed) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.cipherService.updateLastUsedDate(options.cipher.id);
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessage(
|
||||
tab,
|
||||
{
|
||||
@ -277,6 +285,8 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
);
|
||||
|
||||
if (didAutofill) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.eventCollectionService.collect(EventType.Cipher_ClientAutofilled, options.cipher.id);
|
||||
if (totp !== null) {
|
||||
return totp;
|
||||
@ -2000,6 +2010,8 @@ export default class AutofillService implements AutofillServiceInterface {
|
||||
for (let index = 0; index < tabs.length; index++) {
|
||||
const tab = tabs[index];
|
||||
if (tab.url?.startsWith("http")) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.injectAutofillScripts(tab, 0, false);
|
||||
}
|
||||
}
|
||||
|
@ -349,6 +349,8 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
|
||||
|
||||
if (element.tagName.toLowerCase() === "span") {
|
||||
this.cacheAutofillFieldElement(index, element, autofillFieldBase);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.autofillOverlayContentService?.setupAutofillOverlayListenerOnField(
|
||||
element,
|
||||
autofillFieldBase,
|
||||
@ -393,6 +395,8 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
|
||||
};
|
||||
|
||||
this.cacheAutofillFieldElement(index, element, autofillField);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.autofillOverlayContentService?.setupAutofillOverlayListenerOnField(element, autofillField);
|
||||
return autofillField;
|
||||
};
|
||||
@ -1095,6 +1099,8 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
|
||||
) {
|
||||
// We are setting this item to a -1 index because we do not know its position in the DOM.
|
||||
// This value should be updated with the next call to collect page details.
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.buildAutofillFieldItem(node as ElementWithOpId<FormFieldElement>, -1);
|
||||
}
|
||||
}
|
||||
@ -1171,6 +1177,8 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.updateAutofillFieldElementData(
|
||||
attributeName,
|
||||
targetElement as ElementWithOpId<FormFieldElement>,
|
||||
|
@ -428,6 +428,8 @@ describe("InsertAutofillContentService", () => {
|
||||
const scriptAction: FillScript = [action, opid, value];
|
||||
jest.spyOn(insertAutofillContentService["autofillInsertActions"], action);
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
insertAutofillContentService["runFillScriptAction"](scriptAction, 0);
|
||||
jest.advanceTimersByTime(20);
|
||||
|
||||
|
@ -28,6 +28,8 @@ export default class CommandsBackground {
|
||||
async init() {
|
||||
BrowserApi.messageListener("commands.background", (msg: any) => {
|
||||
if (msg.command === "unlockCompleted" && msg.data.target === "commands.background") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.processCommand(msg.data.commandToRetry.msg.command, msg.data.commandToRetry.sender);
|
||||
}
|
||||
});
|
||||
@ -62,6 +64,8 @@ export default class CommandsBackground {
|
||||
const options = (await this.passwordGenerationService.getOptions())?.[0] ?? {};
|
||||
const password = await this.passwordGenerationService.generatePassword(options);
|
||||
this.platformUtilsService.copyToClipboard(password, { window: window });
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.passwordGenerationService.addHistory(password);
|
||||
}
|
||||
|
||||
@ -101,6 +105,8 @@ export default class CommandsBackground {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.main.openPopup();
|
||||
}
|
||||
}
|
||||
|
@ -30,8 +30,12 @@ export default class IdleBackground {
|
||||
|
||||
const idleHandler = (newState: string) => {
|
||||
if (newState === "active") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.notificationsService.reconnectFromActivity();
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.notificationsService.disconnectFromInactivity();
|
||||
}
|
||||
};
|
||||
@ -72,6 +76,8 @@ export default class IdleBackground {
|
||||
window.clearTimeout(this.idleTimer);
|
||||
this.idleTimer = null;
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.idle.queryState(IdleInterval, (state: string) => {
|
||||
if (state !== this.idleState) {
|
||||
this.idleState = state;
|
||||
|
@ -291,6 +291,8 @@ export default class MainBackground {
|
||||
// Services
|
||||
const lockedCallback = async (userId?: string) => {
|
||||
if (this.notificationsService != null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.notificationsService.updateConnection(false);
|
||||
}
|
||||
await this.refreshBadge();
|
||||
@ -378,6 +380,8 @@ export default class MainBackground {
|
||||
this.messagingService,
|
||||
(clipboardValue, clearMs) => {
|
||||
if (this.systemService != null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.systemService.clearClipboard(clipboardValue, clearMs);
|
||||
}
|
||||
},
|
||||
@ -463,6 +467,8 @@ export default class MainBackground {
|
||||
// AuthService should send the messages to the background not popup.
|
||||
send = (subscriber: string, arg: any = {}) => {
|
||||
const message = Object.assign({}, { command: subscriber }, arg);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
that.runtimeBackground.processMessage(message, that as any);
|
||||
};
|
||||
})();
|
||||
@ -795,6 +801,8 @@ export default class MainBackground {
|
||||
const options = (await this.passwordGenerationService.getOptions())?.[0] ?? {};
|
||||
const password = await this.passwordGenerationService.generatePassword(options);
|
||||
this.platformUtilsService.copyToClipboard(password, { window: window });
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.passwordGenerationService.addHistory(password);
|
||||
},
|
||||
async (tab, cipher) => {
|
||||
@ -803,6 +811,8 @@ export default class MainBackground {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessage(tab, {
|
||||
command: "collectPageDetails",
|
||||
tab: tab,
|
||||
@ -889,6 +899,8 @@ export default class MainBackground {
|
||||
await new UpdateBadge(self).setBadgeIcon("", win.id);
|
||||
});
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.onWindowCreated(async (win) => {
|
||||
if (win.incognito) {
|
||||
await new UpdateBadge(self).setBadgeIcon("", win.id);
|
||||
@ -905,6 +917,8 @@ export default class MainBackground {
|
||||
if (!this.isPrivateMode) {
|
||||
await this.refreshBadge();
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.fullSync(true);
|
||||
setTimeout(() => this.notificationsService.init(), 2500);
|
||||
resolve();
|
||||
@ -1017,10 +1031,14 @@ export default class MainBackground {
|
||||
}
|
||||
|
||||
if (BrowserApi.manifestVersion === 3) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.sendMessage("updateBadge");
|
||||
}
|
||||
await this.refreshBadge();
|
||||
await this.mainContextMenuHandler.noAccess();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.notificationsService.updateConnection(false);
|
||||
await this.systemService.clearPendingClipboard();
|
||||
await this.systemService.startProcessReload(this.authService);
|
||||
@ -1041,6 +1059,8 @@ export default class MainBackground {
|
||||
options.frameId = frameId;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessage(
|
||||
tab,
|
||||
{
|
||||
|
@ -80,6 +80,8 @@ export class NativeMessagingBackground {
|
||||
private logService: LogService,
|
||||
private authService: AuthService,
|
||||
) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setBiometricFingerprintValidated(false);
|
||||
|
||||
if (chrome?.permissions?.onAdded) {
|
||||
@ -92,6 +94,8 @@ export class NativeMessagingBackground {
|
||||
|
||||
async connect() {
|
||||
this.appId = await this.appIdService.getAppId();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setBiometricFingerprintValidated(false);
|
||||
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
@ -138,6 +142,8 @@ export class NativeMessagingBackground {
|
||||
|
||||
if (this.validatingFingerprint) {
|
||||
this.validatingFingerprint = false;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setBiometricFingerprintValidated(true);
|
||||
}
|
||||
this.sharedSecret = new SymmetricCryptoKey(decrypted);
|
||||
@ -165,6 +171,8 @@ export class NativeMessagingBackground {
|
||||
case "verifyFingerprint": {
|
||||
if (this.sharedSecret == null) {
|
||||
this.validatingFingerprint = true;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.showFingerprintDialog();
|
||||
}
|
||||
break;
|
||||
@ -178,6 +186,8 @@ export class NativeMessagingBackground {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.onMessage(message.message);
|
||||
}
|
||||
});
|
||||
@ -383,6 +393,8 @@ export class NativeMessagingBackground {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.runtimeBackground.processMessage({ command: "unlocked" }, null);
|
||||
}
|
||||
break;
|
||||
@ -402,6 +414,8 @@ export class NativeMessagingBackground {
|
||||
this.publicKey = publicKey;
|
||||
this.privateKey = privateKey;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendUnencrypted({
|
||||
command: "setupEncryption",
|
||||
publicKey: Utils.fromBufferToB64(publicKey),
|
||||
|
@ -78,6 +78,8 @@ export default class RuntimeBackground {
|
||||
return true;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.processMessage(msg, sender);
|
||||
return false;
|
||||
};
|
||||
@ -127,6 +129,8 @@ export default class RuntimeBackground {
|
||||
await this.main.refreshBadge();
|
||||
await this.main.refreshMenu();
|
||||
}, 2000);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.main.avatarUpdateService.loadColorFromState();
|
||||
this.configService.triggerServerConfigFetch();
|
||||
}
|
||||
@ -154,6 +158,8 @@ export default class RuntimeBackground {
|
||||
switch (msg.sender) {
|
||||
case "autofiller":
|
||||
case "autofill_cmd": {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setLastActive(new Date().getTime());
|
||||
const totpCode = await this.autofillService.doAutoFillActiveTab(
|
||||
[
|
||||
@ -323,10 +329,14 @@ export default class RuntimeBackground {
|
||||
|
||||
private async checkOnInstalled() {
|
||||
setTimeout(async () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.autofillService.loadAutofillScriptsOnInstall();
|
||||
|
||||
if (this.onInstalledReason != null) {
|
||||
if (this.onInstalledReason === "install") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("https://bitwarden.com/browser-start/");
|
||||
await this.settingsService.setAutoFillOverlayVisibility(
|
||||
AutofillOverlayVisibility.OnFieldFocus,
|
||||
|
@ -18,6 +18,8 @@ export const onAlarmListener = async (alarm: chrome.alarms.Alarm) => {
|
||||
|
||||
switch (key) {
|
||||
case clearClipboardAlarmName:
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
ClearClipboard.run();
|
||||
break;
|
||||
default:
|
||||
|
@ -23,6 +23,8 @@ function alarmsToBeCreated(numberOfAlarms: number): void {
|
||||
let calculatedWhen: number = Date.now() + offset;
|
||||
|
||||
for (let index = 0; index < numberOfAlarms; index++) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.alarms.create(`bw_alarm${index}`, { periodInMinutes: 1, when: calculatedWhen });
|
||||
calculatedWhen += offset;
|
||||
}
|
||||
|
@ -27,11 +27,15 @@ if (BrowserApi.manifestVersion === 3) {
|
||||
BrowserApi.messageListener(
|
||||
"runtime.background",
|
||||
(message: { command: string }, sender, sendResponse) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
runtimeMessageListener(message, sender);
|
||||
},
|
||||
);
|
||||
} else {
|
||||
const bitwardenMain = ((window as any).bitwardenMain = new MainBackground());
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
bitwardenMain.bootstrap().then(() => {
|
||||
// Finished bootstrapping
|
||||
});
|
||||
|
@ -58,6 +58,8 @@ export async function stateServiceFactory(
|
||||
opts.stateServiceOptions.useAccountCache,
|
||||
),
|
||||
);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
service.init();
|
||||
return service;
|
||||
}
|
||||
|
@ -11,6 +11,8 @@ describe("BrowserApi", () => {
|
||||
|
||||
describe("getWindow", () => {
|
||||
it("will get the current window if a window id is not provided", () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.getWindow();
|
||||
|
||||
expect(chrome.windows.getCurrent).toHaveBeenCalledWith({ populate: true }, expect.anything());
|
||||
@ -19,6 +21,8 @@ describe("BrowserApi", () => {
|
||||
it("will get the window with the provided id if one is provided", () => {
|
||||
const windowId = 1;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.getWindow(windowId);
|
||||
|
||||
expect(chrome.windows.get).toHaveBeenCalledWith(
|
||||
@ -31,6 +35,8 @@ describe("BrowserApi", () => {
|
||||
|
||||
describe("getCurrentWindow", () => {
|
||||
it("will get the current window", () => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.getCurrentWindow();
|
||||
|
||||
expect(chrome.windows.getCurrent).toHaveBeenCalledWith({ populate: true }, expect.anything());
|
||||
@ -41,6 +47,8 @@ describe("BrowserApi", () => {
|
||||
it("will get the window associated with the passed window id", () => {
|
||||
const windowId = 1;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.getWindowById(windowId);
|
||||
|
||||
expect(chrome.windows.get).toHaveBeenCalledWith(
|
||||
@ -55,6 +63,8 @@ describe("BrowserApi", () => {
|
||||
it("removes the window based on the passed window id", () => {
|
||||
const windowId = 10;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.removeWindow(windowId);
|
||||
|
||||
expect(chrome.windows.remove).toHaveBeenCalledWith(windowId, expect.anything());
|
||||
@ -68,6 +78,8 @@ describe("BrowserApi", () => {
|
||||
focused: true,
|
||||
};
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.updateWindowProperties(windowId, windowOptions);
|
||||
|
||||
expect(chrome.windows.update).toHaveBeenCalledWith(
|
||||
@ -82,6 +94,8 @@ describe("BrowserApi", () => {
|
||||
it("will focus the window with the provided window id", () => {
|
||||
const windowId = 1;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.focusWindow(windowId);
|
||||
|
||||
expect(chrome.windows.update).toHaveBeenCalledWith(
|
||||
|
@ -321,6 +321,8 @@ export class BrowserApi {
|
||||
}
|
||||
|
||||
static async focusTab(tabId: number) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.tabs.update(tabId, { active: true, highlighted: true });
|
||||
}
|
||||
|
||||
@ -329,6 +331,8 @@ export class BrowserApi {
|
||||
// Reactivating the active tab dismisses the popup tab. The promise final
|
||||
// condition is only called if the popup wasn't already dismissed (future proofing).
|
||||
// ref: https://bugzilla.mozilla.org/show_bug.cgi?id=1433604
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
browser.tabs.update({ active: true }).finally(win.close);
|
||||
} else {
|
||||
win.close();
|
||||
|
@ -41,6 +41,8 @@ export function browserSession<TCtor extends Constructor<any>>(constructor: TCto
|
||||
storageSerice,
|
||||
metadata,
|
||||
);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
syncer.init();
|
||||
return syncer;
|
||||
}
|
||||
|
@ -88,6 +88,8 @@ describe("session syncer", () => {
|
||||
// block observing the subject
|
||||
jest.spyOn(sut as any, "observe").mockImplementation();
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
sut.init();
|
||||
|
||||
expect(sut["ignoreNUpdates"]).toBe(3);
|
||||
@ -99,6 +101,8 @@ describe("session syncer", () => {
|
||||
// block observing the subject
|
||||
jest.spyOn(sut as any, "observe").mockImplementation();
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
sut.init();
|
||||
|
||||
expect(sut["ignoreNUpdates"]).toBe(1);
|
||||
@ -109,6 +113,8 @@ describe("session syncer", () => {
|
||||
//Block a call to update
|
||||
const updateSpy = jest.spyOn(sut as any, "updateFromMemory").mockImplementation();
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
sut.init();
|
||||
await awaitAsync();
|
||||
|
||||
@ -120,6 +126,8 @@ describe("session syncer", () => {
|
||||
//Block a call to update
|
||||
const updateSpy = jest.spyOn(sut as any, "update").mockImplementation();
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
sut.init();
|
||||
await awaitAsync();
|
||||
|
||||
@ -135,6 +143,8 @@ describe("session syncer", () => {
|
||||
beforeEach(() => {
|
||||
sendMessageSpy = jest.spyOn(BrowserApi, "sendMessage");
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
sut.init();
|
||||
|
||||
behaviorSubject.next(value);
|
||||
@ -160,6 +170,8 @@ describe("session syncer", () => {
|
||||
nextSpy = jest.spyOn(behaviorSubject, "next");
|
||||
sendMessageSpy = jest.spyOn(BrowserApi, "sendMessage");
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
sut.init();
|
||||
});
|
||||
|
||||
@ -222,6 +234,8 @@ describe("session syncer", () => {
|
||||
jest.spyOn(SyncedItemMetadata, "builder").mockReturnValue(builder);
|
||||
saveSpy = jest.spyOn(storageService, "save");
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
sut.init();
|
||||
await awaitAsync();
|
||||
});
|
||||
|
@ -74,6 +74,8 @@ export class SessionSyncer {
|
||||
private listenForUpdates() {
|
||||
// This is an unawaited promise, but it will be executed asynchronously in the background.
|
||||
BrowserApi.messageListener(this.updateMessageCommand, (message) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.updateFromMessage(message);
|
||||
});
|
||||
}
|
||||
|
@ -100,5 +100,7 @@ const doGeneratePasswordToClipboard = async (tab: chrome.tabs.Tab): Promise<void
|
||||
await passwordGenerationServiceFactory(cache, options),
|
||||
await stateServiceFactory(cache, options),
|
||||
);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
command.generatePasswordToClipboard(tab);
|
||||
};
|
||||
|
@ -28,6 +28,8 @@ export async function onInstallListener(details: chrome.runtime.InstalledDetails
|
||||
|
||||
setTimeout(async () => {
|
||||
if (details.reason != null && details.reason === chrome.runtime.OnInstalledReason.INSTALL) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("https://bitwarden.com/browser-start/");
|
||||
|
||||
if (await environmentService.hasManagedEnvironment()) {
|
||||
|
@ -167,6 +167,8 @@ export class UpdateBadge {
|
||||
|
||||
setBadgeBackgroundColor(color = "#294e5f") {
|
||||
if (this.badgeAction?.setBadgeBackgroundColor) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.badgeAction.setBadgeBackgroundColor({ color });
|
||||
}
|
||||
if (this.isOperaSidebar(this.sidebarAction)) {
|
||||
@ -196,6 +198,8 @@ export class UpdateBadge {
|
||||
|
||||
private setActionText(text: string, tabId?: number) {
|
||||
if (this.badgeAction?.setBadgeText) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.badgeAction.setBadgeText({ text, tabId });
|
||||
}
|
||||
}
|
||||
@ -206,6 +210,8 @@ export class UpdateBadge {
|
||||
} else if (this.sidebarAction) {
|
||||
// Firefox
|
||||
const title = `Bitwarden${Utils.isNullOrEmpty(text) ? "" : ` [${text}]`}`;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sidebarAction.setTitle({ title, tabId });
|
||||
}
|
||||
}
|
||||
@ -216,6 +222,8 @@ export class UpdateBadge {
|
||||
}
|
||||
|
||||
if (this.useSyncApiCalls) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.badgeAction.setIcon(options);
|
||||
} else {
|
||||
await new Promise<void>((resolve) => this.badgeAction.setIcon(options, () => resolve()));
|
||||
|
@ -196,6 +196,8 @@ describe("BrowserPopupUtils", () => {
|
||||
jest.spyOn(BrowserPopupUtils as any, "isSingleActionPopoutOpen").mockResolvedValueOnce(false);
|
||||
jest.spyOn(BrowserPopupUtils as any, "buildPopoutUrl");
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.openPopout(url);
|
||||
|
||||
expect(BrowserPopupUtils["buildPopoutUrl"]).not.toHaveBeenCalled();
|
||||
|
@ -19,6 +19,8 @@ export class BrowserFileDownloadService implements FileDownloadService {
|
||||
} else {
|
||||
data = Utils.fromBufferToB64(request.blobData as ArrayBuffer);
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
SafariApp.sendMessageToApp(
|
||||
"downloadFile",
|
||||
JSON.stringify({
|
||||
|
@ -174,6 +174,8 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
|
||||
}
|
||||
|
||||
launchUri(uri: string, options?: any): void {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab(uri, options && options.extensionPage === true);
|
||||
}
|
||||
|
||||
@ -228,6 +230,8 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
|
||||
const clearMs: number = options && options.clearMs ? options.clearMs : null;
|
||||
|
||||
if (this.isSafari()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
SafariApp.sendMessageToApp("copyToClipboard", text).then(() => {
|
||||
if (!clearing && this.clipboardWriteCallback != null) {
|
||||
this.clipboardWriteCallback(text, clearMs);
|
||||
|
@ -55,6 +55,8 @@ export class BackgroundDerivedState<
|
||||
const stateSubscription = this.state$.subscribe((state) => {
|
||||
// delay to allow the foreground to connect. This may just be needed for testing
|
||||
setTimeout(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendNewMessage(
|
||||
{
|
||||
action: "nextState",
|
||||
@ -96,6 +98,8 @@ export class BackgroundDerivedState<
|
||||
port: chrome.runtime.Port,
|
||||
) {
|
||||
const id = Utils.newGuid();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendMessage(
|
||||
{
|
||||
...message,
|
||||
@ -110,6 +114,8 @@ export class BackgroundDerivedState<
|
||||
response: Omit<DerivedStateMessage, "originator" | "id">,
|
||||
port: chrome.runtime.Port,
|
||||
) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.sendMessage(
|
||||
{
|
||||
...response,
|
||||
|
@ -72,6 +72,8 @@ describe("foreground background derived state interactions", () => {
|
||||
const dateString = "2020-12-12";
|
||||
const emissions = trackEmissions(background.state$);
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
foreground.forceValue(new Date(dateString));
|
||||
await awaitAsync();
|
||||
|
||||
@ -87,6 +89,8 @@ describe("foreground background derived state interactions", () => {
|
||||
|
||||
expect(foreground["port"]).toBeDefined();
|
||||
const newDate = new Date();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
foreground.forceValue(newDate);
|
||||
await awaitAsync();
|
||||
|
||||
@ -100,6 +104,8 @@ describe("foreground background derived state interactions", () => {
|
||||
|
||||
expect(foreground["port"]).toBeUndefined();
|
||||
const newDate = new Date();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
foreground.forceValue(newDate);
|
||||
await awaitAsync();
|
||||
|
||||
|
@ -93,20 +93,30 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
});
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["home"]);
|
||||
});
|
||||
this.changeDetectorRef.detectChanges();
|
||||
} else if (msg.command === "authBlocked") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["home"]);
|
||||
} else if (
|
||||
msg.command === "locked" &&
|
||||
(msg.userId == null || msg.userId == this.activeUserId)
|
||||
) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["lock"]);
|
||||
} else if (msg.command === "showDialog") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.showDialog(msg);
|
||||
} else if (msg.command === "showNativeMessagingFinterprintDialog") {
|
||||
// TODO: Should be refactored to live in another service.
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.showNativeMessagingFingerprintDialog(msg);
|
||||
} else if (msg.command === "showToast") {
|
||||
this.showToast(msg);
|
||||
@ -121,13 +131,19 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
2000,
|
||||
);
|
||||
} else if (msg.command === "reloadPopup") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/"]);
|
||||
} else if (msg.command === "convertAccountToKeyConnector") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/remove-password"]);
|
||||
} else if (msg.command === "switchAccountFinish") {
|
||||
// TODO: unset loading?
|
||||
// this.loading = false;
|
||||
} else if (msg.command == "update-temp-password") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/update-temp-password"]);
|
||||
} else {
|
||||
msg.webExtSender = sender;
|
||||
|
@ -25,6 +25,8 @@ export class PopOutComponent implements OnInit {
|
||||
}
|
||||
|
||||
expand() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.openCurrentPagePopout(window);
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ if (process.env.ENV === "production") {
|
||||
}
|
||||
|
||||
function init() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
platformBrowserDynamic().bootstrapModule(AppModule, { preserveWhitespaces: true });
|
||||
}
|
||||
|
||||
|
@ -131,6 +131,8 @@ const mainBackground: MainBackground = needsBackgroundInit
|
||||
|
||||
function createLocalBgService() {
|
||||
const localBgService = new MainBackground(isPrivateMode);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
localBgService.bootstrap();
|
||||
return localBgService;
|
||||
}
|
||||
|
@ -51,6 +51,8 @@ export class ExcludedDomainsComponent implements OnInit, OnDestroy {
|
||||
await this.loadCurrentUris();
|
||||
|
||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.ngZone.run(async () => {
|
||||
switch (message.command) {
|
||||
case "tabChanged":
|
||||
@ -106,6 +108,8 @@ export class ExcludedDomainsComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
await this.stateService.setNeverDomains(savedDomains);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/tabs/settings"]);
|
||||
}
|
||||
|
||||
|
@ -28,10 +28,14 @@ export class FoldersComponent {
|
||||
}
|
||||
|
||||
folderSelected(folder: FolderView) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/edit-folder"], { queryParams: { folderId: folder.id } });
|
||||
}
|
||||
|
||||
addFolder() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/add-folder"]);
|
||||
}
|
||||
}
|
||||
|
@ -8,13 +8,19 @@ import { BrowserApi } from "../../platform/browser/browser-api";
|
||||
})
|
||||
export class HelpAndFeedbackComponent {
|
||||
launchHelp() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("https://bitwarden.com/help/");
|
||||
}
|
||||
launchContactForm() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("https://bitwarden.com/contact/");
|
||||
}
|
||||
|
||||
launchForums() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("https://bitwarden.com/getinvolved/");
|
||||
}
|
||||
}
|
||||
|
@ -397,6 +397,8 @@ export class SettingsComponent implements OnInit {
|
||||
|
||||
const error = BiometricErrors[e as BiometricErrorTypes];
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.dialogService.openSimpleDialog({
|
||||
title: { key: error.title },
|
||||
content: { key: error.description },
|
||||
@ -444,6 +446,8 @@ export class SettingsComponent implements OnInit {
|
||||
type: "info",
|
||||
});
|
||||
if (confirmed) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab(this.environmentService.getWebVaultUrl());
|
||||
}
|
||||
}
|
||||
@ -455,6 +459,8 @@ export class SettingsComponent implements OnInit {
|
||||
type: "info",
|
||||
});
|
||||
if (confirmed) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("https://bitwarden.com/help/setup-two-step-login/");
|
||||
}
|
||||
}
|
||||
@ -466,23 +472,31 @@ export class SettingsComponent implements OnInit {
|
||||
type: "info",
|
||||
});
|
||||
if (confirmed) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab("https://bitwarden.com/help/about-organizations/");
|
||||
}
|
||||
}
|
||||
|
||||
async webVault() {
|
||||
const url = this.environmentService.getWebVaultUrl();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab(url);
|
||||
}
|
||||
|
||||
async import() {
|
||||
await this.router.navigate(["/import"]);
|
||||
if (await BrowserApi.isPopupOpen()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.openCurrentPagePopout(window);
|
||||
}
|
||||
}
|
||||
|
||||
export() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/export"]);
|
||||
}
|
||||
|
||||
@ -504,6 +518,8 @@ export class SettingsComponent implements OnInit {
|
||||
|
||||
rate() {
|
||||
const deviceType = this.platformUtilsService.getDevice();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab((RateUrls as any)[deviceType]);
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,12 @@ import { SafariApp } from "../../browser/safariApp";
|
||||
|
||||
export default class VaultTimeoutService extends BaseVaultTimeoutService {
|
||||
startCheck() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.checkVaultTimeout();
|
||||
if (this.platformUtilsService.isSafari()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.checkSafari();
|
||||
} else {
|
||||
setInterval(() => this.checkVaultTimeout(), 10 * 1000); // check every 10 seconds
|
||||
@ -20,6 +24,8 @@ export default class VaultTimeoutService extends BaseVaultTimeoutService {
|
||||
while (true) {
|
||||
try {
|
||||
await SafariApp.sendMessageToApp("sleep");
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.checkVaultTimeout();
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line
|
||||
|
@ -29,6 +29,8 @@ export class FilePopoutCalloutComponent implements OnInit {
|
||||
}
|
||||
|
||||
popOutWindow() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.openCurrentPagePopout(window);
|
||||
}
|
||||
}
|
||||
|
@ -62,6 +62,8 @@ export class GeneratorComponent extends BaseGeneratorComponent {
|
||||
this.cipherState.login.username = this.username;
|
||||
}
|
||||
this.addEditCipherInfo.cipher = this.cipherState;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setAddEditCipherInfo(this.addEditCipherInfo);
|
||||
this.close();
|
||||
}
|
||||
|
@ -67,6 +67,8 @@ export class SendAddEditComponent extends BaseAddEditComponent {
|
||||
}
|
||||
|
||||
popOutWindow() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.openCurrentPagePopout(window);
|
||||
}
|
||||
|
||||
@ -117,6 +119,8 @@ export class SendAddEditComponent extends BaseAddEditComponent {
|
||||
cancel() {
|
||||
// If true, the window was pop'd out on the add-send page. location.back will not work
|
||||
if ((window as any).previousPopupUrl.startsWith("/add-send")) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["tabs/send"]);
|
||||
} else {
|
||||
this.location.back();
|
||||
|
@ -86,25 +86,35 @@ export class SendGroupingsComponent extends BaseSendComponent {
|
||||
}
|
||||
|
||||
if (!this.syncService.syncInProgress) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
} else {
|
||||
this.loadedTimeout = window.setTimeout(() => {
|
||||
if (!this.loaded) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
if (!this.syncService.syncInProgress || restoredScopeState) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.setContentScrollY(window, this.state?.scrollY);
|
||||
}
|
||||
|
||||
// Load all sends if sync completed in background
|
||||
this.broadcasterService.subscribe(ComponentId, (message: any) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.ngZone.run(async () => {
|
||||
switch (message.command) {
|
||||
case "syncCompleted":
|
||||
window.setTimeout(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
}, 500);
|
||||
break;
|
||||
@ -123,16 +133,22 @@ export class SendGroupingsComponent extends BaseSendComponent {
|
||||
window.clearTimeout(this.loadedTimeout);
|
||||
}
|
||||
// Save state
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.saveState();
|
||||
// Unsubscribe
|
||||
this.broadcasterService.unsubscribe(ComponentId);
|
||||
}
|
||||
|
||||
async selectType(type: SendType) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/send-type"], { queryParams: { type: type } });
|
||||
}
|
||||
|
||||
async selectSend(s: SendView) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/edit-send"], { queryParams: { sendId: s.id } });
|
||||
}
|
||||
|
||||
@ -140,6 +156,8 @@ export class SendGroupingsComponent extends BaseSendComponent {
|
||||
if (this.disableSend) {
|
||||
return;
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/add-send"]);
|
||||
}
|
||||
|
||||
@ -147,6 +165,8 @@ export class SendGroupingsComponent extends BaseSendComponent {
|
||||
if (this.disableSend) {
|
||||
return;
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
super.removePassword(s);
|
||||
}
|
||||
|
||||
|
@ -101,18 +101,26 @@ export class SendTypeComponent extends BaseSendComponent {
|
||||
|
||||
// Restore state and remove reference
|
||||
if (this.applySavedState && this.state != null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.setContentScrollY(window, this.state?.scrollY);
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setBrowserSendTypeComponentState(null);
|
||||
});
|
||||
|
||||
// Refresh Send list if sync completed in background
|
||||
this.broadcasterService.subscribe(ComponentId, (message: any) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.ngZone.run(async () => {
|
||||
switch (message.command) {
|
||||
case "syncCompleted":
|
||||
if (message.successfully) {
|
||||
this.refreshTimeout = window.setTimeout(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.refresh();
|
||||
}, 500);
|
||||
}
|
||||
@ -132,12 +140,16 @@ export class SendTypeComponent extends BaseSendComponent {
|
||||
window.clearTimeout(this.refreshTimeout);
|
||||
}
|
||||
// Save state
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.saveState();
|
||||
// Unsubscribe
|
||||
this.broadcasterService.unsubscribe(ComponentId);
|
||||
}
|
||||
|
||||
async selectSend(s: SendView) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/edit-send"], { queryParams: { sendId: s.id } });
|
||||
}
|
||||
|
||||
@ -145,6 +157,8 @@ export class SendTypeComponent extends BaseSendComponent {
|
||||
if (this.disableSend) {
|
||||
return;
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/add-send"], { queryParams: { type: this.type } });
|
||||
}
|
||||
|
||||
@ -152,6 +166,8 @@ export class SendTypeComponent extends BaseSendComponent {
|
||||
if (this.disableSend) {
|
||||
return;
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
super.removePassword(s);
|
||||
}
|
||||
|
||||
|
@ -50,6 +50,8 @@ export class ExportComponent extends BaseExportComponent {
|
||||
|
||||
protected saved() {
|
||||
super.saved();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/tabs/settings"]);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,8 @@ export class ImportBrowserComponent {
|
||||
constructor(private router: Router) {}
|
||||
|
||||
protected async onSuccessfulImport(organizationId: string): Promise<void> {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/tabs/settings"]);
|
||||
}
|
||||
}
|
||||
|
@ -149,6 +149,8 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
}
|
||||
|
||||
static sendMessage(msg: BrowserFido2Message) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.sendMessage(BrowserFido2MessageName, msg);
|
||||
}
|
||||
|
||||
@ -198,6 +200,8 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
fromEvent(abortController.signal, "abort")
|
||||
.pipe(takeUntil(this.destroy$))
|
||||
.subscribe(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.close();
|
||||
BrowserFido2UserInterfaceSession.sendMessage({
|
||||
type: "AbortRequest",
|
||||
@ -214,7 +218,11 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
)
|
||||
.subscribe((msg) => {
|
||||
if (msg.type === "AbortResponse") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.close();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.abort(msg.fallbackRequested);
|
||||
}
|
||||
});
|
||||
@ -364,7 +372,11 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
takeUntil(this.destroy$),
|
||||
)
|
||||
.subscribe(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.close();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.abort(true);
|
||||
});
|
||||
|
||||
|
@ -43,6 +43,8 @@ function injectPageScript() {
|
||||
}
|
||||
|
||||
// If the page-script already exists, send a reconnect message to the page-script
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
messenger.sendReconnectCommand();
|
||||
}
|
||||
|
||||
@ -130,8 +132,12 @@ async function run() {
|
||||
const port = chrome.runtime.connect({ name: "fido2ContentScriptReady" });
|
||||
port.onDisconnect.addListener(() => {
|
||||
// Cleanup the messenger and remove the event listener
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
messenger.destroy();
|
||||
});
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
run();
|
||||
|
@ -31,6 +31,8 @@ describe("Messenger", () => {
|
||||
|
||||
it("should deliver message to B when sending request from A", () => {
|
||||
const request = createRequest();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
messengerA.request(request);
|
||||
|
||||
const received = handlerB.receive();
|
||||
@ -64,6 +66,8 @@ describe("Messenger", () => {
|
||||
|
||||
it("should deliver abort signal to B when requesting abort", () => {
|
||||
const abortController = new AbortController();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
messengerA.request(createRequest(), abortController);
|
||||
abortController.abort();
|
||||
|
||||
@ -99,9 +103,13 @@ describe("Messenger", () => {
|
||||
|
||||
it("should dispatch the destroy event on messenger destruction", async () => {
|
||||
const request = createRequest();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
messengerA.request(request);
|
||||
|
||||
const dispatchEventSpy = jest.spyOn((messengerA as any).onDestroy, "dispatchEvent");
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
messengerA.destroy();
|
||||
|
||||
expect(dispatchEventSpy).toHaveBeenCalledWith(expect.any(Event));
|
||||
@ -109,10 +117,14 @@ describe("Messenger", () => {
|
||||
|
||||
it("should trigger onDestroyListener when the destroy event is dispatched", async () => {
|
||||
const request = createRequest();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
messengerA.request(request);
|
||||
|
||||
const onDestroyListener = jest.fn();
|
||||
(messengerA as any).onDestroy.addEventListener("destroy", onDestroyListener);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
messengerA.destroy();
|
||||
|
||||
expect(onDestroyListener).toHaveBeenCalled();
|
||||
|
@ -34,6 +34,8 @@ if (!browserNativeWebauthnSupport) {
|
||||
}
|
||||
|
||||
if (browserNativeWebauthnSupport) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable().then((available) => {
|
||||
browserNativeWebauthnPlatformAuthenticatorSupport = available;
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
(function () {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
chrome.runtime.sendMessage({ command: "triggerFido2ContentScriptInjection" });
|
||||
})();
|
||||
|
@ -68,10 +68,16 @@ export class ActionButtonsComponent {
|
||||
);
|
||||
|
||||
if (typeI18nKey === "password") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.eventCollectionService.collect(EventType.Cipher_ClientCopiedPassword, cipher.id);
|
||||
} else if (typeI18nKey === "verificationCodeTotp") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.eventCollectionService.collect(EventType.Cipher_ClientCopiedHiddenField, cipher.id);
|
||||
} else if (typeI18nKey === "securityCode") {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.eventCollectionService.collect(EventType.Cipher_ClientCopiedCardCode, cipher.id);
|
||||
}
|
||||
}
|
||||
|
@ -99,6 +99,8 @@ export class Fido2UseBrowserLinkComponent {
|
||||
};
|
||||
savedDomains[validDomain] = null;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.stateService.setNeverDomains(savedDomains);
|
||||
|
||||
this.platformUtilsService.showToast(
|
||||
|
@ -272,6 +272,8 @@ export class Fido2Component implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
viewPasskey() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/view-cipher"], {
|
||||
queryParams: {
|
||||
cipherId: this.cipher.id,
|
||||
@ -290,6 +292,8 @@ export class Fido2Component implements OnInit, OnDestroy {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/add-cipher"], {
|
||||
queryParams: {
|
||||
name: Utils.getHostname(this.url),
|
||||
|
@ -198,6 +198,8 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
}
|
||||
|
||||
if (this.cloneMode) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/tabs/vault"]);
|
||||
} else {
|
||||
this.location.back();
|
||||
@ -213,8 +215,12 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
.createUrlTree(["/attachments"], { queryParams: { cipherId: this.cipher.id } })
|
||||
.toString();
|
||||
const currentBaseUrl = window.location.href.replace(this.router.url, "");
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.openCurrentPagePopout(window, currentBaseUrl + destinationUrl);
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/attachments"], { queryParams: { cipherId: this.cipher.id } });
|
||||
}
|
||||
}
|
||||
@ -222,6 +228,8 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
editCollections() {
|
||||
super.editCollections();
|
||||
if (this.cipher.organizationId != null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/collections"], { queryParams: { cipherId: this.cipher.id } });
|
||||
}
|
||||
}
|
||||
@ -237,6 +245,8 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
}
|
||||
|
||||
if (this.inAddEditPopoutWindow()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
closeAddEditVaultItemPopout();
|
||||
return;
|
||||
}
|
||||
@ -248,6 +258,8 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
const confirmed = await super.generateUsername();
|
||||
if (confirmed) {
|
||||
await this.saveCipherState();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["generator"], { queryParams: { type: "username" } });
|
||||
}
|
||||
return confirmed;
|
||||
@ -257,6 +269,8 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
const confirmed = await super.generatePassword();
|
||||
if (confirmed) {
|
||||
await this.saveCipherState();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["generator"], { queryParams: { type: "password" } });
|
||||
}
|
||||
return confirmed;
|
||||
@ -265,6 +279,8 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
async delete(): Promise<boolean> {
|
||||
const confirmed = await super.delete();
|
||||
if (confirmed) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/tabs/vault"]);
|
||||
}
|
||||
return confirmed;
|
||||
|
@ -75,11 +75,15 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
this.inSidebar = BrowserPopupUtils.inSidebar(window);
|
||||
|
||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.ngZone.run(async () => {
|
||||
switch (message.command) {
|
||||
case "syncCompleted":
|
||||
if (this.isLoading) {
|
||||
window.setTimeout(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
}, 500);
|
||||
}
|
||||
@ -142,6 +146,8 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
addCipher() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/add-cipher"], {
|
||||
queryParams: {
|
||||
name: this.hostname,
|
||||
@ -152,6 +158,8 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
viewCipher(cipher: CipherView) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/view-cipher"], { queryParams: { cipherId: cipher.id } });
|
||||
}
|
||||
|
||||
@ -210,6 +218,8 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/tabs/vault"], { queryParams: { searchText: this.searchText } });
|
||||
}
|
||||
|
||||
@ -233,6 +243,8 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.hostname = Utils.getHostname(this.url);
|
||||
this.pageDetails = [];
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessage(this.tab, {
|
||||
command: "collectPageDetails",
|
||||
tab: this.tab,
|
||||
@ -284,6 +296,8 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async goToSettings() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["autofill"]);
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,8 @@ export class ShareComponent extends BaseShareComponent {
|
||||
async ngOnInit() {
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
||||
this.onSharedCipher.subscribe(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["view-cipher", { cipherId: this.cipherId }]);
|
||||
});
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
|
||||
@ -57,6 +59,8 @@ export class ShareComponent extends BaseShareComponent {
|
||||
}
|
||||
|
||||
cancel() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/view-cipher"], {
|
||||
replaceUrl: true,
|
||||
queryParams: { cipherId: this.cipher.id },
|
||||
|
@ -98,10 +98,14 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
||||
await this.browserStateService.setBrowserVaultItemsComponentState(null);
|
||||
|
||||
this.broadcasterService.subscribe(ComponentId, (message: any) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.ngZone.run(async () => {
|
||||
switch (message.command) {
|
||||
case "syncCompleted":
|
||||
window.setTimeout(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
}, 500);
|
||||
break;
|
||||
@ -125,16 +129,22 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
if (!this.syncService.syncInProgress) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
} else {
|
||||
this.loadedTimeout = window.setTimeout(() => {
|
||||
if (!this.loaded) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.load();
|
||||
}
|
||||
}, 5000);
|
||||
}
|
||||
|
||||
if (!this.syncService.syncInProgress || restoredScopeState) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.setContentScrollY(window, this.state?.scrollY);
|
||||
}
|
||||
});
|
||||
@ -147,6 +157,8 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
||||
if (this.selectedTimeout != null) {
|
||||
window.clearTimeout(this.selectedTimeout);
|
||||
}
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.saveState();
|
||||
this.broadcasterService.unsubscribe(ComponentId);
|
||||
}
|
||||
@ -229,24 +241,34 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async selectType(type: CipherType) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/ciphers"], { queryParams: { type: type } });
|
||||
}
|
||||
|
||||
async selectFolder(folder: FolderView) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/ciphers"], { queryParams: { folderId: folder.id || "none" } });
|
||||
}
|
||||
|
||||
async selectCollection(collection: CollectionView) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/ciphers"], { queryParams: { collectionId: collection.id } });
|
||||
}
|
||||
|
||||
async selectTrash() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/ciphers"], { queryParams: { deleted: true } });
|
||||
}
|
||||
|
||||
async selectCipher(cipher: CipherView) {
|
||||
this.selectedTimeout = window.setTimeout(() => {
|
||||
if (!this.preventSelected) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/view-cipher"], { queryParams: { cipherId: cipher.id } });
|
||||
}
|
||||
this.preventSelected = false;
|
||||
@ -263,6 +285,8 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
this.preventSelected = true;
|
||||
await this.cipherService.updateLastLaunchedDate(cipher.id);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab(cipher.login.launchUri);
|
||||
if (BrowserPopupUtils.inPopup(window)) {
|
||||
BrowserApi.closePopup(window);
|
||||
@ -270,6 +294,8 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
async addCipher() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/add-cipher"], {
|
||||
queryParams: { selectedVault: this.vaultFilter.selectedOrganizationId },
|
||||
});
|
||||
|
@ -152,6 +152,8 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
|
||||
}
|
||||
|
||||
if (this.applySavedState && this.state != null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserPopupUtils.setContentScrollY(window, this.state.scrollY, {
|
||||
delay: 0,
|
||||
containerSelector: this.scrollingContainer,
|
||||
@ -161,11 +163,15 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
|
||||
});
|
||||
|
||||
this.broadcasterService.subscribe(ComponentId, (message: any) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.ngZone.run(async () => {
|
||||
switch (message.command) {
|
||||
case "syncCompleted":
|
||||
if (message.successfully) {
|
||||
window.setTimeout(() => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.refresh();
|
||||
}, 500);
|
||||
}
|
||||
@ -180,6 +186,8 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.saveState();
|
||||
this.broadcasterService.unsubscribe(ComponentId);
|
||||
}
|
||||
@ -188,6 +196,8 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
|
||||
this.selectedTimeout = window.setTimeout(() => {
|
||||
if (!this.preventSelected) {
|
||||
super.selectCipher(cipher);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/view-cipher"], { queryParams: { cipherId: cipher.id } });
|
||||
}
|
||||
this.preventSelected = false;
|
||||
@ -196,11 +206,15 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
|
||||
|
||||
selectFolder(folder: FolderView) {
|
||||
if (folder.id != null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/ciphers"], { queryParams: { folderId: folder.id } });
|
||||
}
|
||||
}
|
||||
|
||||
selectCollection(collection: CollectionView) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/ciphers"], { queryParams: { collectionId: collection.id } });
|
||||
}
|
||||
|
||||
@ -214,6 +228,8 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
|
||||
}
|
||||
this.preventSelected = true;
|
||||
await this.cipherService.updateLastLaunchedDate(cipher.id);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.createNewTab(cipher.login.launchUri);
|
||||
if (BrowserPopupUtils.inPopup(window)) {
|
||||
BrowserApi.closePopup(window);
|
||||
@ -225,6 +241,8 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
|
||||
return false;
|
||||
}
|
||||
super.addCipher();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/add-cipher"], {
|
||||
queryParams: {
|
||||
folderId: this.folderId,
|
||||
|
@ -136,6 +136,8 @@ export class ViewComponent extends BaseViewComponent {
|
||||
if (params.cipherId) {
|
||||
this.cipherId = params.cipherId;
|
||||
} else {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.close();
|
||||
}
|
||||
|
||||
@ -145,6 +147,8 @@ export class ViewComponent extends BaseViewComponent {
|
||||
super.ngOnInit();
|
||||
|
||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.ngZone.run(async () => {
|
||||
switch (message.command) {
|
||||
case "collectPageDetailsResponse":
|
||||
@ -191,6 +195,8 @@ export class ViewComponent extends BaseViewComponent {
|
||||
return false;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/edit-cipher"], { queryParams: { cipherId: this.cipher.id } });
|
||||
return true;
|
||||
}
|
||||
@ -204,6 +210,8 @@ export class ViewComponent extends BaseViewComponent {
|
||||
return false;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/clone-cipher"], {
|
||||
queryParams: {
|
||||
cloneMode: true,
|
||||
@ -219,6 +227,8 @@ export class ViewComponent extends BaseViewComponent {
|
||||
}
|
||||
|
||||
if (this.cipher.organizationId == null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/share-cipher"], {
|
||||
replaceUrl: true,
|
||||
queryParams: { cipherId: this.cipher.id },
|
||||
@ -281,6 +291,8 @@ export class ViewComponent extends BaseViewComponent {
|
||||
return false;
|
||||
}
|
||||
if (await super.restore()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.close();
|
||||
return true;
|
||||
}
|
||||
@ -290,6 +302,8 @@ export class ViewComponent extends BaseViewComponent {
|
||||
async delete() {
|
||||
if (await super.delete()) {
|
||||
this.messagingService.send("deletedCipher");
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.close();
|
||||
return true;
|
||||
}
|
||||
@ -307,7 +321,11 @@ export class ViewComponent extends BaseViewComponent {
|
||||
BrowserPopupUtils.inSingleActionPopout(window, VaultPopoutType.viewVaultItem) &&
|
||||
this.senderTabId
|
||||
) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.focusTab(this.senderTabId);
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
closeViewVaultItemPopout(`${VaultPopoutType.viewVaultItem}_${this.cipher.id}`);
|
||||
return;
|
||||
}
|
||||
@ -325,6 +343,8 @@ export class ViewComponent extends BaseViewComponent {
|
||||
return;
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
BrowserApi.tabSendMessage(this.tab, {
|
||||
command: "collectPageDetails",
|
||||
tab: this.tab,
|
||||
|
@ -51,6 +51,8 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
|
||||
|
||||
async submit(): Promise<boolean> {
|
||||
if (await super.submit()) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/folders"]);
|
||||
return true;
|
||||
}
|
||||
@ -61,6 +63,8 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
|
||||
async delete(): Promise<boolean> {
|
||||
const confirmed = await super.delete();
|
||||
if (confirmed) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.router.navigate(["/folders"]);
|
||||
}
|
||||
return confirmed;
|
||||
|
@ -7,6 +7,8 @@ export default class Fido2Service implements Fido2ServiceInterface {
|
||||
const tabs = await BrowserApi.tabsQuery({});
|
||||
tabs.forEach((tab) => {
|
||||
if (tab.url?.startsWith("https")) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.injectFido2ContentScripts({ tab } as chrome.runtime.MessageSender);
|
||||
}
|
||||
});
|
||||
|
@ -616,4 +616,6 @@ export class Main {
|
||||
}
|
||||
|
||||
const main = new Main();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
main.run();
|
||||
|
@ -141,6 +141,8 @@ export class GetCommand extends DownloadCommand {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.eventCollectionService.collect(
|
||||
EventType.Cipher_ClientViewed,
|
||||
id,
|
||||
|
@ -98,6 +98,8 @@ export class LowdbStorageService implements AbstractStorageService {
|
||||
}
|
||||
|
||||
if (this.defaults != null) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.lockDbFile(() => {
|
||||
this.logService.info("Writing defaults.");
|
||||
this.readForNoCache();
|
||||
@ -134,6 +136,8 @@ export class LowdbStorageService implements AbstractStorageService {
|
||||
await this.waitForReady();
|
||||
return this.lockDbFile(() => {
|
||||
this.readForNoCache();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.db.set(key, obj).write();
|
||||
this.updatesSubject.next({ key, updateType: "save" });
|
||||
this.logService.debug(`Successfully wrote ${key} to db`);
|
||||
@ -145,6 +149,8 @@ export class LowdbStorageService implements AbstractStorageService {
|
||||
await this.waitForReady();
|
||||
return this.lockDbFile(() => {
|
||||
this.readForNoCache();
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.db.unset(key).write();
|
||||
this.updatesSubject.next({ key, updateType: "remove" });
|
||||
this.logService.debug(`Successfully removed ${key} from db`);
|
||||
@ -159,6 +165,8 @@ export class LowdbStorageService implements AbstractStorageService {
|
||||
try {
|
||||
return action();
|
||||
} finally {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
release();
|
||||
}
|
||||
});
|
||||
|
@ -70,6 +70,8 @@ export class ExportCommand {
|
||||
const eventType = options.organizationid
|
||||
? EventType.Organization_ClientExportedVault
|
||||
: EventType.User_ClientExportedVault;
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.eventCollectionService.collect(eventType, null, true, options.organizationid);
|
||||
} catch (e) {
|
||||
return Response.error(e);
|
||||
|
@ -76,6 +76,8 @@ export class ImportCommand {
|
||||
|
||||
const response = await this.importService.import(importer, contents, organizationId);
|
||||
if (response.success) {
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
this.syncService.fullSync(true);
|
||||
return Response.success(new MessageResponse("Imported " + filepath, null));
|
||||
}
|
||||
|
@ -19,6 +19,8 @@ const argv: any = yargs(hideBin(process.argv)).option("name", {
|
||||
|
||||
const { name } = argv;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
(async () => {
|
||||
const nativeMessageService = new NativeMessageService(NativeMessagingVersion.One);
|
||||
// Handshake
|
||||
|
@ -18,6 +18,8 @@ const argv: any = yargs(hideBin(process.argv)).option("uri", {
|
||||
|
||||
const { uri } = argv;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
(async () => {
|
||||
const nativeMessageService = new NativeMessageService(NativeMessagingVersion.One);
|
||||
// Handshake
|
||||
|
@ -43,6 +43,8 @@ const argv: any = yargs(hideBin(process.argv))
|
||||
|
||||
const { name, username, password, uri, credentialId } = argv;
|
||||
|
||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
(async () => {
|
||||
const nativeMessageService = new NativeMessageService(NativeMessagingVersion.One);
|
||||
// Handshake
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user