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