mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[deps] SM: Update typescript-eslint monorepo to v8 (major) (#10601)
* [deps] SM: Update typescript-eslint monorepo to v8 --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Hinton <hinton@users.noreply.github.com> Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
@@ -56,6 +56,7 @@
|
|||||||
"@typescript-eslint/no-floating-promises": "error",
|
"@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-expressions": ["error", { "allowTernary": true }],
|
||||||
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
|
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }],
|
||||||
"no-console": "error",
|
"no-console": "error",
|
||||||
"import/no-unresolved": "off", // TODO: Look into turning off once each package is an actual package.
|
"import/no-unresolved": "off", // TODO: Look into turning off once each package is an actual package.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable no-undef */
|
/* eslint-disable no-undef, @typescript-eslint/no-require-imports */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
|
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -453,12 +453,16 @@ describe("AutoSubmitLoginBackground", () => {
|
|||||||
|
|
||||||
sendMockExtensionMessage({ command: "triggerAutoSubmitLogin" }, sender);
|
sendMockExtensionMessage({ command: "triggerAutoSubmitLogin" }, sender);
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
expect(autofillService.doAutoFillOnTab).not.toHaveBeenCalled;
|
expect(autofillService.doAutoFillOnTab).not.toHaveBeenCalled;
|
||||||
});
|
});
|
||||||
|
|
||||||
it("skips acting on messages whose command does not have a registered handler", () => {
|
it("skips acting on messages whose command does not have a registered handler", () => {
|
||||||
sendMockExtensionMessage({ command: "someInvalidCommand" }, sender);
|
sendMockExtensionMessage({ command: "someInvalidCommand" }, sender);
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
expect(autofillService.doAutoFillOnTab).not.toHaveBeenCalled;
|
expect(autofillService.doAutoFillOnTab).not.toHaveBeenCalled;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ describe("AutoSubmitLogin content script", () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.useFakeTimers();
|
jest.useFakeTimers();
|
||||||
setupEnvironmentDefaults();
|
setupEnvironmentDefaults();
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./auto-submit-login");
|
require("./auto-submit-login");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ export function EditButton({
|
|||||||
title=${buttonText}
|
title=${buttonText}
|
||||||
class=${editButtonStyles({ disabled, theme })}
|
class=${editButtonStyles({ disabled, theme })}
|
||||||
@click=${(event: Event) => {
|
@click=${(event: Event) => {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
!disabled && buttonAction(event);
|
!disabled && buttonAction(event);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const CipherTypes = {
|
const CipherTypes = {
|
||||||
Login: 1,
|
Login: 1,
|
||||||
SecureNote: 2,
|
SecureNote: 2,
|
||||||
@@ -7,6 +9,8 @@ const CipherTypes = {
|
|||||||
|
|
||||||
type CipherType = (typeof CipherTypes)[keyof typeof CipherTypes];
|
type CipherType = (typeof CipherTypes)[keyof typeof CipherTypes];
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const CipherRepromptTypes = {
|
const CipherRepromptTypes = {
|
||||||
None: 0,
|
None: 0,
|
||||||
Password: 1,
|
Password: 1,
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ describe("ContentMessageHandler", () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./content-message-handler");
|
require("./content-message-handler");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ describe("TriggerAutofillScriptInjection", () => {
|
|||||||
|
|
||||||
describe("init", () => {
|
describe("init", () => {
|
||||||
it("sends a message to the extension background", () => {
|
it("sends a message to the extension background", () => {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("../content/trigger-autofill-script-injection");
|
require("../content/trigger-autofill-script-injection");
|
||||||
|
|
||||||
expect(chrome.runtime.sendMessage).toHaveBeenCalledWith({
|
expect(chrome.runtime.sendMessage).toHaveBeenCalledWith({
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"
|
|||||||
|
|
||||||
import AutofillOverlayButton from "./autofill-overlay-button.deprecated";
|
import AutofillOverlayButton from "./autofill-overlay-button.deprecated";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./legacy-button.scss");
|
require("./legacy-button.scss");
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"
|
|||||||
|
|
||||||
import AutofillOverlayList from "./autofill-overlay-list.deprecated";
|
import AutofillOverlayList from "./autofill-overlay-list.deprecated";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./legacy-list.scss");
|
require("./legacy-list.scss");
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ describe("Fido2 Content Script", () => {
|
|||||||
chrome.runtime.connect = jest.fn(() => portSpy);
|
chrome.runtime.connect = jest.fn(() => portSpy);
|
||||||
|
|
||||||
it("destroys the messenger when the port is disconnected", () => {
|
it("destroys the messenger when the port is disconnected", () => {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
triggerPortOnDisconnectEvent(portSpy);
|
triggerPortOnDisconnectEvent(portSpy);
|
||||||
@@ -75,6 +77,8 @@ describe("Fido2 Content Script", () => {
|
|||||||
const mockResult = { credentialId: "mock" } as CreateCredentialResult;
|
const mockResult = { credentialId: "mock" } as CreateCredentialResult;
|
||||||
jest.spyOn(chrome.runtime, "sendMessage").mockResolvedValue(mockResult);
|
jest.spyOn(chrome.runtime, "sendMessage").mockResolvedValue(mockResult);
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
const response = await messenger.handler!(message, new AbortController());
|
const response = await messenger.handler!(message, new AbortController());
|
||||||
@@ -99,6 +103,8 @@ describe("Fido2 Content Script", () => {
|
|||||||
data: mock<InsecureCreateCredentialParams>(),
|
data: mock<InsecureCreateCredentialParams>(),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
await messenger.handler!(message, new AbortController());
|
await messenger.handler!(message, new AbortController());
|
||||||
@@ -121,6 +127,8 @@ describe("Fido2 Content Script", () => {
|
|||||||
const abortController = new AbortController();
|
const abortController = new AbortController();
|
||||||
const abortSpy = jest.spyOn(abortController.signal, "removeEventListener");
|
const abortSpy = jest.spyOn(abortController.signal, "removeEventListener");
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
await messenger.handler!(message, abortController);
|
await messenger.handler!(message, abortController);
|
||||||
@@ -141,6 +149,8 @@ describe("Fido2 Content Script", () => {
|
|||||||
abortController.abort();
|
abortController.abort();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
await messenger.handler!(message, abortController);
|
await messenger.handler!(message, abortController);
|
||||||
@@ -161,6 +171,8 @@ describe("Fido2 Content Script", () => {
|
|||||||
const abortController = new AbortController();
|
const abortController = new AbortController();
|
||||||
jest.spyOn(chrome.runtime, "sendMessage").mockResolvedValue({ error: errorMessage });
|
jest.spyOn(chrome.runtime, "sendMessage").mockResolvedValue({ error: errorMessage });
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
const result = messenger.handler!(message, abortController);
|
const result = messenger.handler!(message, abortController);
|
||||||
|
|
||||||
@@ -175,6 +187,8 @@ describe("Fido2 Content Script", () => {
|
|||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
expect(messengerForDOMCommunicationSpy).not.toHaveBeenCalled();
|
expect(messengerForDOMCommunicationSpy).not.toHaveBeenCalled();
|
||||||
@@ -193,6 +207,8 @@ describe("Fido2 Content Script", () => {
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
expect(messengerForDOMCommunicationSpy).not.toHaveBeenCalled();
|
expect(messengerForDOMCommunicationSpy).not.toHaveBeenCalled();
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ describe("FIDO2 page-script for manifest v2", () => {
|
|||||||
it("skips appending the `page-script.js` file if the document contentType is not `text/html`", () => {
|
it("skips appending the `page-script.js` file if the document contentType is not `text/html`", () => {
|
||||||
Object.defineProperty(window.document, "contentType", { value: "text/plain", writable: true });
|
Object.defineProperty(window.document, "contentType", { value: "text/plain", writable: true });
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-page-script-append.mv2");
|
require("./fido2-page-script-append.mv2");
|
||||||
|
|
||||||
expect(window.document.createElement).not.toHaveBeenCalled();
|
expect(window.document.createElement).not.toHaveBeenCalled();
|
||||||
@@ -33,6 +35,8 @@ describe("FIDO2 page-script for manifest v2", () => {
|
|||||||
return node;
|
return node;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-page-script-append.mv2");
|
require("./fido2-page-script-append.mv2");
|
||||||
|
|
||||||
expect(window.document.createElement).toHaveBeenCalledWith("script");
|
expect(window.document.createElement).toHaveBeenCalledWith("script");
|
||||||
@@ -48,6 +52,8 @@ describe("FIDO2 page-script for manifest v2", () => {
|
|||||||
return node;
|
return node;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-page-script-append.mv2");
|
require("./fido2-page-script-append.mv2");
|
||||||
|
|
||||||
expect(window.document.createElement).toHaveBeenCalledWith("script");
|
expect(window.document.createElement).toHaveBeenCalledWith("script");
|
||||||
|
|||||||
@@ -267,6 +267,8 @@ import { Messenger } from "./messaging/messenger";
|
|||||||
|
|
||||||
clearWaitForFocus();
|
clearWaitForFocus();
|
||||||
void messenger.destroy();
|
void messenger.destroy();
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
/** empty */
|
/** empty */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ describe("Fido2 page script with native WebAuthn support", () => {
|
|||||||
setupMockedWebAuthnSupport();
|
setupMockedWebAuthnSupport();
|
||||||
|
|
||||||
beforeAll(() => {
|
beforeAll(() => {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-page-script");
|
require("./fido2-page-script");
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -166,6 +168,8 @@ describe("Fido2 page script with native WebAuthn support", () => {
|
|||||||
contentType: "json/application",
|
contentType: "json/application",
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
expect(Messenger.forDOMCommunication).not.toHaveBeenCalled();
|
expect(Messenger.forDOMCommunication).not.toHaveBeenCalled();
|
||||||
@@ -184,6 +188,8 @@ describe("Fido2 page script with native WebAuthn support", () => {
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-content-script");
|
require("./fido2-content-script");
|
||||||
|
|
||||||
expect(Messenger.forDOMCommunication).not.toHaveBeenCalled();
|
expect(Messenger.forDOMCommunication).not.toHaveBeenCalled();
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ describe("Fido2 page script without native WebAuthn support", () => {
|
|||||||
const mockCreateCredentialsResult = createCreateCredentialResultMock();
|
const mockCreateCredentialsResult = createCreateCredentialResultMock();
|
||||||
const mockCredentialRequestOptions = createCredentialRequestOptionsMock();
|
const mockCredentialRequestOptions = createCredentialRequestOptionsMock();
|
||||||
const mockCredentialAssertResult = createAssertCredentialResultMock();
|
const mockCredentialAssertResult = createAssertCredentialResultMock();
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./fido2-page-script");
|
require("./fido2-page-script");
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ import {
|
|||||||
NotificationBarIframeInitData,
|
NotificationBarIframeInitData,
|
||||||
} from "./abstractions/notification-bar";
|
} from "./abstractions/notification-bar";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./bar.scss");
|
require("./bar.scss");
|
||||||
|
|
||||||
const logService = new ConsoleLogService(false);
|
const logService = new ConsoleLogService(false);
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"
|
|||||||
|
|
||||||
import { AutofillInlineMenuButton } from "./autofill-inline-menu-button";
|
import { AutofillInlineMenuButton } from "./autofill-inline-menu-button";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./button.scss");
|
require("./button.scss");
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { AutofillOverlayElement } from "../../../../enums/autofill-overlay.enum"
|
|||||||
|
|
||||||
import { AutofillInlineMenuList } from "./autofill-inline-menu-list";
|
import { AutofillInlineMenuList } from "./autofill-inline-menu-list";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./list.scss");
|
require("./list.scss");
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./menu-container.scss");
|
require("./menu-container.scss");
|
||||||
|
|
||||||
import { AutofillInlineMenuContainer } from "./autofill-inline-menu-container";
|
import { AutofillInlineMenuContainer } from "./autofill-inline-menu-container";
|
||||||
|
|||||||
@@ -1417,6 +1417,8 @@ export class AutofillOverlayContentService implements AutofillOverlayContentServ
|
|||||||
url.origin + pathWithoutTrailingSlashAndSearch,
|
url.origin + pathWithoutTrailingSlashAndSearch,
|
||||||
url.origin + pathWithoutTrailingSlashSearchAndHash,
|
url.origin + pathWithoutTrailingSlashSearchAndHash,
|
||||||
]);
|
]);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (_error) {
|
} catch (_error) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -235,6 +235,8 @@ export class DomQueryService implements DomQueryServiceInterface {
|
|||||||
if ((chrome as any).dom?.openOrClosedShadowRoot) {
|
if ((chrome as any).dom?.openOrClosedShadowRoot) {
|
||||||
try {
|
try {
|
||||||
return (chrome as any).dom.openOrClosedShadowRoot(node);
|
return (chrome as any).dom.openOrClosedShadowRoot(node);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -342,6 +342,8 @@ export class NativeMessagingBackground {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.port.postMessage(msg);
|
this.port.postMessage(msg);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logService.info(
|
this.logService.info(
|
||||||
"[Native Messaging IPC] Disconnected from Bitwarden Desktop app because of the native port disconnecting.",
|
"[Native Messaging IPC] Disconnected from Bitwarden Desktop app because of the native port disconnecting.",
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return BiometricsStatus.Available;
|
return BiometricsStatus.Available;
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return BiometricsStatus.DesktopDisconnected;
|
return BiometricsStatus.DesktopDisconnected;
|
||||||
}
|
}
|
||||||
@@ -142,6 +144,8 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
|
|||||||
userId: id,
|
userId: id,
|
||||||
})
|
})
|
||||||
).response;
|
).response;
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return BiometricsStatus.DesktopDisconnected;
|
return BiometricsStatus.DesktopDisconnected;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,11 @@ import { GroupPolicyEnvironment } from "../admin-console/types/group-policy-envi
|
|||||||
import { BrowserApi } from "./browser/browser-api";
|
import { BrowserApi } from "./browser/browser-api";
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type Flags = {
|
export type Flags = {
|
||||||
accountSwitching?: boolean;
|
accountSwitching?: boolean;
|
||||||
} & SharedFlags;
|
} & SharedFlags;
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type DevFlags = {
|
export type DevFlags = {
|
||||||
managedEnvironment?: GroupPolicyEnvironment;
|
managedEnvironment?: GroupPolicyEnvironment;
|
||||||
} & SharedDevFlags;
|
} & SharedDevFlags;
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ describe("OffscreenDocument", () => {
|
|||||||
const browserClipboardServiceReadSpy = jest.spyOn(BrowserClipboardService, "read");
|
const browserClipboardServiceReadSpy = jest.spyOn(BrowserClipboardService, "read");
|
||||||
const consoleErrorSpy = jest.spyOn(console, "error");
|
const consoleErrorSpy = jest.spyOn(console, "error");
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("../offscreen-document/offscreen-document");
|
require("../offscreen-document/offscreen-document");
|
||||||
|
|
||||||
describe("init", () => {
|
describe("init", () => {
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ describe("LocalBackedSessionStorage", () => {
|
|||||||
localStorage.internalStore["session_test"] = encrypted.encryptedString;
|
localStorage.internalStore["session_test"] = encrypted.encryptedString;
|
||||||
encryptService.decryptToUtf8.mockResolvedValue(JSON.stringify("decrypted"));
|
encryptService.decryptToUtf8.mockResolvedValue(JSON.stringify("decrypted"));
|
||||||
const result = await sut.get("test");
|
const result = await sut.get("test");
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
|
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
|
||||||
encrypted,
|
encrypted,
|
||||||
sessionKey,
|
sessionKey,
|
||||||
@@ -69,6 +71,8 @@ describe("LocalBackedSessionStorage", () => {
|
|||||||
localStorage.internalStore["session_test"] = encrypted.encryptedString;
|
localStorage.internalStore["session_test"] = encrypted.encryptedString;
|
||||||
encryptService.decryptToUtf8.mockResolvedValue(JSON.stringify("decrypted"));
|
encryptService.decryptToUtf8.mockResolvedValue(JSON.stringify("decrypted"));
|
||||||
const result = await sut.get("test");
|
const result = await sut.get("test");
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
|
expect(encryptService.decryptToUtf8).toHaveBeenCalledWith(
|
||||||
encrypted,
|
encrypted,
|
||||||
sessionKey,
|
sessionKey,
|
||||||
|
|||||||
@@ -198,6 +198,8 @@ export class LocalBackedSessionStorageService
|
|||||||
private compareValues<T>(value1: T, value2: T): boolean {
|
private compareValues<T>(value1: T, value2: T): boolean {
|
||||||
try {
|
try {
|
||||||
return compareValues(value1, value2);
|
return compareValues(value1, value2);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logService.error(
|
this.logService.error(
|
||||||
`error comparing values\n${JSON.stringify(value1)}\n${JSON.stringify(value2)}`,
|
`error comparing values\n${JSON.stringify(value1)}\n${JSON.stringify(value2)}`,
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ const supported = (() => {
|
|||||||
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
|
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
|
|||||||
import { PopupSizeService } from "../platform/popup/layout/popup-size.service";
|
import { PopupSizeService } from "../platform/popup/layout/popup-size.service";
|
||||||
import { BrowserPlatformUtilsService } from "../platform/services/platform-utils/browser-platform-utils.service";
|
import { BrowserPlatformUtilsService } from "../platform/services/platform-utils/browser-platform-utils.service";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./scss/popup.scss");
|
require("./scss/popup.scss");
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./scss/tailwind.css");
|
require("./scss/tailwind.css");
|
||||||
|
|
||||||
import { AppModule } from "./app.module";
|
import { AppModule } from "./app.module";
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ describe("LpFilelessImporter", () => {
|
|||||||
chrome.runtime.connect = jest.fn(() => portSpy);
|
chrome.runtime.connect = jest.fn(() => portSpy);
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./lp-fileless-importer");
|
require("./lp-fileless-importer");
|
||||||
lpFilelessImporter = (globalThis as any).lpFilelessImporter;
|
lpFilelessImporter = (globalThis as any).lpFilelessImporter;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ describe("LP Suppress Import Download for Manifest v2", () => {
|
|||||||
return node;
|
return node;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./lp-suppress-import-download-script-append.mv2");
|
require("./lp-suppress-import-download-script-append.mv2");
|
||||||
|
|
||||||
expect(window.document.createElement).toHaveBeenCalledWith("script");
|
expect(window.document.createElement).toHaveBeenCalledWith("script");
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ describe("LP Suppress Import Download", () => {
|
|||||||
jest.spyOn(Element.prototype, "appendChild");
|
jest.spyOn(Element.prototype, "appendChild");
|
||||||
jest.spyOn(window, "addEventListener");
|
jest.spyOn(window, "addEventListener");
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./lp-suppress-import-download");
|
require("./lp-suppress-import-download");
|
||||||
|
|
||||||
anchor = document.createElement("a");
|
anchor = document.createElement("a");
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ export class ShareCommand {
|
|||||||
if (req == null || req.length === 0) {
|
if (req == null || req.length === 0) {
|
||||||
return Response.badRequest("You must provide at least one collection id for this item.");
|
return Response.badRequest("You must provide at least one collection id for this item.");
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Response.badRequest("Error parsing the encoded request data.");
|
return Response.badRequest("Error parsing the encoded request data.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -165,6 +165,8 @@ export class LoginCommand {
|
|||||||
if (options.method != null) {
|
if (options.method != null) {
|
||||||
twoFactorMethod = parseInt(options.method, null);
|
twoFactorMethod = parseInt(options.method, null);
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Response.error("Invalid two-step login method.");
|
return Response.error("Invalid two-step login method.");
|
||||||
}
|
}
|
||||||
@@ -240,6 +242,8 @@ export class LoginCommand {
|
|||||||
if (twoFactorMethod != null) {
|
if (twoFactorMethod != null) {
|
||||||
try {
|
try {
|
||||||
selectedProvider = twoFactorProviders.filter((p) => p.type === twoFactorMethod)[0];
|
selectedProvider = twoFactorProviders.filter((p) => p.type === twoFactorMethod)[0];
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Response.error("Invalid two-step login method.");
|
return Response.error("Invalid two-step login method.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ export class EditCommand {
|
|||||||
try {
|
try {
|
||||||
const reqJson = Buffer.from(requestJson, "base64").toString();
|
const reqJson = Buffer.from(requestJson, "base64").toString();
|
||||||
req = JSON.parse(reqJson);
|
req = JSON.parse(reqJson);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Response.badRequest("Error parsing the encoded request data.");
|
return Response.badRequest("Error parsing the encoded request data.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,11 +7,9 @@ import {
|
|||||||
} from "@bitwarden/common/platform/misc/flags";
|
} from "@bitwarden/common/platform/misc/flags";
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type Flags = {} & SharedFlags;
|
export type Flags = {} & SharedFlags;
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type DevFlags = {} & SharedDevFlags;
|
export type DevFlags = {} & SharedDevFlags;
|
||||||
|
|
||||||
export function flagEnabled(flag: keyof Flags): boolean {
|
export function flagEnabled(flag: keyof Flags): boolean {
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ export class NodeEnvSecureStorageService implements AbstractStorageService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Utils.fromBufferToB64(decValue);
|
return Utils.fromBufferToB64(decValue);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logService.info("Decrypt error.");
|
this.logService.info("Decrypt error.");
|
||||||
return null;
|
return null;
|
||||||
@@ -104,6 +106,8 @@ export class NodeEnvSecureStorageService implements AbstractStorageService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.logService.info("Session key is invalid.");
|
this.logService.info("Session key is invalid.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,6 +49,8 @@ export class SendCreateCommand {
|
|||||||
if (req == null) {
|
if (req == null) {
|
||||||
throw new Error("Null request");
|
throw new Error("Null request");
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Response.badRequest("Error parsing the encoded request data.");
|
return Response.badRequest("Error parsing the encoded request data.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ export class SendEditCommand {
|
|||||||
try {
|
try {
|
||||||
const reqJson = Buffer.from(requestJson, "base64").toString();
|
const reqJson = Buffer.from(requestJson, "base64").toString();
|
||||||
req = SendResponse.fromJson(reqJson);
|
req = SendResponse.fromJson(reqJson);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Response.badRequest("Error parsing the encoded request data.");
|
return Response.badRequest("Error parsing the encoded request data.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,8 @@ export class SendReceiveCommand extends DownloadCommand {
|
|||||||
let urlObject: URL;
|
let urlObject: URL;
|
||||||
try {
|
try {
|
||||||
urlObject = new URL(url);
|
urlObject = new URL(url);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Response.badRequest("Failed to parse the provided Send url");
|
return Response.badRequest("Failed to parse the provided Send url");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,8 @@ export class CreateCommand {
|
|||||||
try {
|
try {
|
||||||
const reqJson = Buffer.from(requestJson, "base64").toString();
|
const reqJson = Buffer.from(requestJson, "base64").toString();
|
||||||
req = JSON.parse(reqJson);
|
req = JSON.parse(reqJson);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return Response.badRequest("Error parsing the encoded request data.");
|
return Response.badRequest("Error parsing the encoded request data.");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,8 @@ function log(configObj) {
|
|||||||
|
|
||||||
function loadConfig(configName) {
|
function loadConfig(configName) {
|
||||||
try {
|
try {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
return require(`./${configName}.json`);
|
return require(`./${configName}.json`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e instanceof Error && e.code === "MODULE_NOT_FOUND") {
|
if (e instanceof Error && e.code === "MODULE_NOT_FOUND") {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable no-undef */
|
/* eslint-disable @typescript-eslint/no-require-imports, no-undef */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
|
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
|
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
|
||||||
require("dotenv").config();
|
require("dotenv").config();
|
||||||
const child_process = require("child_process");
|
const child_process = require("child_process");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
|
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
|
||||||
require("dotenv").config();
|
require("dotenv").config();
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
|
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
|
||||||
const child = require("child_process");
|
const child = require("child_process");
|
||||||
const { exit } = require("process");
|
const { exit } = require("process");
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||||
const concurrently = require("concurrently");
|
const concurrently = require("concurrently");
|
||||||
const rimraf = require("rimraf");
|
const rimraf = require("rimraf");
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-var-requires, no-console */
|
/* eslint-disable @typescript-eslint/no-require-imports, no-console */
|
||||||
|
|
||||||
exports.default = async function (configuration) {
|
exports.default = async function (configuration) {
|
||||||
if (parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 && configuration.path.slice(-4) == ".exe") {
|
if (parseInt(process.env.ELECTRON_BUILDER_SIGN) === 1 && configuration.path.slice(-4) == ".exe") {
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ import { SendComponent } from "./tools/send/send.component";
|
|||||||
/**
|
/**
|
||||||
* Data properties acceptable for use in route objects in the desktop
|
* Data properties acceptable for use in route objects in the desktop
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
||||||
export interface RouteDataProperties {
|
export interface RouteDataProperties {
|
||||||
// For any new route data properties, add them here.
|
// For any new route data properties, add them here.
|
||||||
// then assert that the data object satisfies this interface in the route object.
|
// then assert that the data object satisfies this interface in the route object.
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { enableProdMode } from "@angular/core";
|
import { enableProdMode } from "@angular/core";
|
||||||
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
|
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("../scss/styles.scss");
|
require("../scss/styles.scss");
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("../scss/tailwind.css");
|
require("../scss/tailwind.css");
|
||||||
|
|
||||||
import { AppModule } from "./app.module";
|
import { AppModule } from "./app.module";
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ export class DesktopLoginComponentService
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
await ipc.platform.localhostCallbackService.openSsoPrompt(codeChallenge, state);
|
await ipc.platform.localhostCallbackService.openSsoPrompt(codeChallenge, state);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.toastService.showToast({
|
this.toastService.showToast({
|
||||||
variant: "error",
|
variant: "error",
|
||||||
|
|||||||
@@ -249,6 +249,8 @@ export class LoginComponentV1 extends BaseLoginComponent implements OnInit, OnDe
|
|||||||
await this.ssoLoginService.setCodeVerifier(ssoCodeVerifier);
|
await this.ssoLoginService.setCodeVerifier(ssoCodeVerifier);
|
||||||
try {
|
try {
|
||||||
await ipc.platform.localhostCallbackService.openSsoPrompt(codeChallenge, state);
|
await ipc.platform.localhostCallbackService.openSsoPrompt(codeChallenge, state);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.platformUtilsService.showToast(
|
this.platformUtilsService.showToast(
|
||||||
"error",
|
"error",
|
||||||
|
|||||||
@@ -405,6 +405,8 @@ export class NativeMessagingMain {
|
|||||||
this.logService.info(`Error reading preferences: ${e}`);
|
this.logService.info(`Error reading preferences: ${e}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Browser is not installed, we can just skip it
|
// Browser is not installed, we can just skip it
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,11 +7,9 @@ import {
|
|||||||
} from "@bitwarden/common/platform/misc/flags";
|
} from "@bitwarden/common/platform/misc/flags";
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type Flags = {} & SharedFlags;
|
export type Flags = {} & SharedFlags;
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type DevFlags = {} & SharedDevFlags;
|
export type DevFlags = {} & SharedDevFlags;
|
||||||
|
|
||||||
export function flagEnabled(flag: keyof Flags): boolean {
|
export function flagEnabled(flag: keyof Flags): boolean {
|
||||||
|
|||||||
@@ -265,6 +265,8 @@ export class BiometricMessageHandlerService {
|
|||||||
} else {
|
} else {
|
||||||
await this.send({ command: "biometricUnlock", response: "canceled" }, appId);
|
await this.send({ command: "biometricUnlock", response: "canceled" }, appId);
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await this.send({ command: "biometricUnlock", response: "canceled" }, appId);
|
await this.send({ command: "biometricUnlock", response: "canceled" }, appId);
|
||||||
}
|
}
|
||||||
@@ -342,6 +344,8 @@ export class BiometricMessageHandlerService {
|
|||||||
appId,
|
appId,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
await this.send(
|
await this.send(
|
||||||
{ command: BiometricsCommands.UnlockWithBiometricsForUser, messageId, response: false },
|
{ command: BiometricsCommands.UnlockWithBiometricsForUser, messageId, response: false },
|
||||||
|
|||||||
@@ -130,6 +130,8 @@ export class DuckDuckGoMessageHandlerService {
|
|||||||
sharedKey: Utils.fromBufferToB64(encryptedSecret),
|
sharedKey: Utils.fromBufferToB64(encryptedSecret),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.sendResponse({
|
this.sendResponse({
|
||||||
messageId: messageId,
|
messageId: messageId,
|
||||||
@@ -153,6 +155,8 @@ export class DuckDuckGoMessageHandlerService {
|
|||||||
await this.encryptedMessageHandlerService.responseDataForCommand(decryptedCommandData);
|
await this.encryptedMessageHandlerService.responseDataForCommand(decryptedCommandData);
|
||||||
|
|
||||||
await this.sendEncryptedResponse(message, { command, payload: responseData });
|
await this.sendEncryptedResponse(message, { command, payload: responseData });
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
|
|||||||
@@ -178,6 +178,8 @@ export class EncryptedMessageHandlerService {
|
|||||||
await this.messagingService.send("refreshCiphers");
|
await this.messagingService.send("refreshCiphers");
|
||||||
|
|
||||||
return { status: "success" };
|
return { status: "success" };
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return { status: "failure" };
|
return { status: "failure" };
|
||||||
}
|
}
|
||||||
@@ -222,6 +224,8 @@ export class EncryptedMessageHandlerService {
|
|||||||
await this.messagingService.send("refreshCiphers");
|
await this.messagingService.send("refreshCiphers");
|
||||||
|
|
||||||
return { status: "success" };
|
return { status: "success" };
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return { status: "failure" };
|
return { status: "failure" };
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable no-undef */
|
/* eslint-disable @typescript-eslint/no-require-imports, no-undef */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
|
plugins: [require("tailwindcss"), require("autoprefixer"), require("postcss-nested")],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -167,6 +167,8 @@ export abstract class BaseEventsComponent {
|
|||||||
let dates: string[] = null;
|
let dates: string[] = null;
|
||||||
try {
|
try {
|
||||||
dates = this.eventService.formatDateFilters(this.start, this.end);
|
dates = this.eventService.formatDateFilters(this.start, this.end);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.toastService.showToast({
|
this.toastService.showToast({
|
||||||
variant: "error",
|
variant: "error",
|
||||||
|
|||||||
@@ -113,6 +113,8 @@ export class EntityEventsComponent implements OnInit {
|
|||||||
this.filterFormGroup.value.start,
|
this.filterFormGroup.value.start,
|
||||||
this.filterFormGroup.value.end,
|
this.filterFormGroup.value.end,
|
||||||
);
|
);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.toastService.showToast({
|
this.toastService.showToast({
|
||||||
variant: "error",
|
variant: "error",
|
||||||
|
|||||||
@@ -170,6 +170,8 @@ export class FamiliesForEnterpriseSetupComponent 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.
|
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
|
||||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||||
this.router.navigate(["/"]);
|
this.router.navigate(["/"]);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (this.showNewOrganization) {
|
if (this.showNewOrganization) {
|
||||||
const dialog = openDeleteOrganizationDialog(this.dialogService, {
|
const dialog = openDeleteOrganizationDialog(this.dialogService, {
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ const supported = (() => {
|
|||||||
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
|
return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ export class SendAccessFileComponent {
|
|||||||
blobData: decBuf,
|
blobData: decBuf,
|
||||||
downloadMethod: "save",
|
downloadMethod: "save",
|
||||||
});
|
});
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.toastService.showToast({
|
this.toastService.showToast({
|
||||||
variant: "error",
|
variant: "error",
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ export class FolderAddEditComponent extends BaseFolderAddEditComponent {
|
|||||||
dialogService,
|
dialogService,
|
||||||
formBuilder,
|
formBuilder,
|
||||||
);
|
);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
params?.folderId ? (this.folderId = params.folderId) : null;
|
params?.folderId ? (this.folderId = params.folderId) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,12 @@ import { b64Decode, getQsParam } from "./common";
|
|||||||
declare let hcaptcha: any;
|
declare let hcaptcha: any;
|
||||||
|
|
||||||
if (window.location.pathname.includes("mobile")) {
|
if (window.location.pathname.includes("mobile")) {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./captcha-mobile.scss");
|
require("./captcha-mobile.scss");
|
||||||
} else {
|
} else {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./captcha.scss");
|
require("./captcha.scss");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,6 +54,8 @@ async function start() {
|
|||||||
let decodedData: any;
|
let decodedData: any;
|
||||||
try {
|
try {
|
||||||
decodedData = JSON.parse(b64Decode(data, true));
|
decodedData = JSON.parse(b64Decode(data, true));
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error("Cannot parse data.");
|
error("Cannot parse data.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
import { getQsParam } from "./common";
|
import { getQsParam } from "./common";
|
||||||
import { TranslationService } from "./translation.service";
|
import { TranslationService } from "./translation.service";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./duo-redirect.scss");
|
require("./duo-redirect.scss");
|
||||||
|
|
||||||
const mobileDesktopCallback = "bitwarden://duo-callback";
|
const mobileDesktopCallback = "bitwarden://duo-callback";
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
// @ts-strict-ignore
|
// @ts-strict-ignore
|
||||||
import { getQsParam } from "./common";
|
import { getQsParam } from "./common";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./sso.scss");
|
require("./sso.scss");
|
||||||
|
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import { b64Decode, getQsParam } from "./common";
|
|||||||
import { buildDataString, parseWebauthnJson } from "./common-webauthn";
|
import { buildDataString, parseWebauthnJson } from "./common-webauthn";
|
||||||
import { TranslationService } from "./translation.service";
|
import { TranslationService } from "./translation.service";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./webauthn.scss");
|
require("./webauthn.scss");
|
||||||
|
|
||||||
let parsed = false;
|
let parsed = false;
|
||||||
@@ -52,6 +54,8 @@ function parseParametersV2() {
|
|||||||
let dataObj: { data: any; btnText: string } = null;
|
let dataObj: { data: any; btnText: string } = null;
|
||||||
try {
|
try {
|
||||||
dataObj = JSON.parse(b64Decode(getQsParam("data")));
|
dataObj = JSON.parse(b64Decode(getQsParam("data")));
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error("Cannot parse data.");
|
error("Cannot parse data.");
|
||||||
return;
|
return;
|
||||||
@@ -103,6 +107,8 @@ function start() {
|
|||||||
let json: any;
|
let json: any;
|
||||||
try {
|
try {
|
||||||
json = parseWebauthnJson(webauthnJson);
|
json = parseWebauthnJson(webauthnJson);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error("Cannot parse data.");
|
error("Cannot parse data.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
import { b64Decode, getQsParam } from "./common";
|
import { b64Decode, getQsParam } from "./common";
|
||||||
import { buildDataString, parseWebauthnJson } from "./common-webauthn";
|
import { buildDataString, parseWebauthnJson } from "./common-webauthn";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
require("./webauthn.scss");
|
require("./webauthn.scss");
|
||||||
|
|
||||||
const mobileCallbackUri = "bitwarden://webauthn-callback";
|
const mobileCallbackUri = "bitwarden://webauthn-callback";
|
||||||
@@ -88,6 +90,8 @@ function parseParametersV2() {
|
|||||||
} = null;
|
} = null;
|
||||||
try {
|
try {
|
||||||
dataObj = JSON.parse(b64Decode(getQsParam("data")));
|
dataObj = JSON.parse(b64Decode(getQsParam("data")));
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error("Cannot parse data.");
|
error("Cannot parse data.");
|
||||||
return;
|
return;
|
||||||
@@ -116,6 +120,8 @@ function start() {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
obj = parseWebauthnJson(webauthnJson);
|
obj = parseWebauthnJson(webauthnJson);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
error("Cannot parse webauthn data.");
|
error("Cannot parse webauthn data.");
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -7,11 +7,9 @@ import {
|
|||||||
} from "@bitwarden/common/platform/misc/flags";
|
} from "@bitwarden/common/platform/misc/flags";
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type Flags = {} & SharedFlags;
|
export type Flags = {} & SharedFlags;
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type DevFlags = {} & SharedDevFlags;
|
export type DevFlags = {} & SharedDevFlags;
|
||||||
|
|
||||||
export function flagEnabled(flag: keyof Flags): boolean {
|
export function flagEnabled(flag: keyof Flags): boolean {
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ export class DeviceApprovalsComponent implements OnInit, OnDestroy {
|
|||||||
title: null,
|
title: null,
|
||||||
message: this.i18nService.t("loginRequestApproved"),
|
message: this.i18nService.t("loginRequestApproved"),
|
||||||
});
|
});
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.toastService.showToast({
|
this.toastService.showToast({
|
||||||
variant: "error",
|
variant: "error",
|
||||||
|
|||||||
@@ -107,6 +107,8 @@ export class SecretsManagerPortingApiService {
|
|||||||
return secret;
|
return secret;
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -397,6 +397,8 @@ export class LoginComponentV1 extends CaptchaProtectedComponent implements OnIni
|
|||||||
email,
|
email,
|
||||||
deviceIdentifier,
|
deviceIdentifier,
|
||||||
);
|
);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.showLoginWithDevice = false;
|
this.showLoginWithDevice = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -192,6 +192,8 @@ export class AttachmentsComponent implements OnInit {
|
|||||||
title: null,
|
title: null,
|
||||||
message: this.i18nService.t("fileSavedToDevice"),
|
message: this.i18nService.t("fileSavedToDevice"),
|
||||||
});
|
});
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
|
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
|
||||||
}
|
}
|
||||||
@@ -285,6 +287,8 @@ export class AttachmentsComponent implements OnInit {
|
|||||||
this.i18nService.t("attachmentSaved"),
|
this.i18nService.t("attachmentSaved"),
|
||||||
);
|
);
|
||||||
this.onReuploadedAttachment.emit();
|
this.onReuploadedAttachment.emit();
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
|
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -466,6 +466,8 @@ export class ViewComponent implements OnDestroy, OnInit {
|
|||||||
fileName: attachment.fileName,
|
fileName: attachment.fileName,
|
||||||
blobData: decBuf,
|
blobData: decBuf,
|
||||||
});
|
});
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
|
this.platformUtilsService.showToast("error", null, this.i18nService.t("errorOccurred"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -107,6 +107,8 @@ export class LoginDecryptionOptionsComponent implements OnInit {
|
|||||||
private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,
|
private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,
|
||||||
private validationService: ValidationService,
|
private validationService: ValidationService,
|
||||||
) {
|
) {
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
this.clientType === this.platformUtilsService.getClientType();
|
this.clientType === this.platformUtilsService.getClientType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -484,6 +484,8 @@ export class LoginComponent implements OnInit, OnDestroy {
|
|||||||
try {
|
try {
|
||||||
const deviceIdentifier = await this.appIdService.getAppId();
|
const deviceIdentifier = await this.appIdService.getAppId();
|
||||||
this.isKnownDevice = await this.devicesApiService.getKnownDevice(email, deviceIdentifier);
|
this.isKnownDevice = await this.devicesApiService.getKnownDevice(email, deviceIdentifier);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.isKnownDevice = false;
|
this.isKnownDevice = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ export function decodeJwtTokenToJson(jwtToken: string): any {
|
|||||||
try {
|
try {
|
||||||
// Attempt to decode from URL-safe Base64 to UTF-8
|
// Attempt to decode from URL-safe Base64 to UTF-8
|
||||||
decodedPayloadJSON = Utils.fromUrlB64ToUtf8(encodedPayload);
|
decodedPayloadJSON = Utils.fromUrlB64ToUtf8(encodedPayload);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (decodingError) {
|
} catch (decodingError) {
|
||||||
throw new Error("Cannot decode the token");
|
throw new Error("Cannot decode the token");
|
||||||
}
|
}
|
||||||
@@ -26,6 +28,8 @@ export function decodeJwtTokenToJson(jwtToken: string): any {
|
|||||||
// Attempt to parse the JSON payload
|
// Attempt to parse the JSON payload
|
||||||
const decodedToken = JSON.parse(decodedPayloadJSON);
|
const decodedToken = JSON.parse(decodedPayloadJSON);
|
||||||
return decodedToken;
|
return decodedToken;
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (jsonError) {
|
} catch (jsonError) {
|
||||||
throw new Error("Cannot parse the token's payload into JSON");
|
throw new Error("Cannot parse the token's payload into JSON");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -337,6 +337,8 @@ export class DeviceTrustService implements DeviceTrustServiceAbstraction {
|
|||||||
);
|
);
|
||||||
|
|
||||||
return new SymmetricCryptoKey(userKey) as UserKey;
|
return new SymmetricCryptoKey(userKey) as UserKey;
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// If either decryption effort fails, we want to remove the device key
|
// If either decryption effort fails, we want to remove the device key
|
||||||
this.logService.error("Failed to decrypt using device key. Removing device key.");
|
this.logService.error("Failed to decrypt using device key. Removing device key.");
|
||||||
|
|||||||
@@ -163,6 +163,8 @@ export class UserVerificationService implements UserVerificationServiceAbstracti
|
|||||||
const request = new VerifyOTPRequest(verification.secret);
|
const request = new VerifyOTPRequest(verification.secret);
|
||||||
try {
|
try {
|
||||||
await this.userVerificationApiService.postAccountVerifyOTP(request);
|
await this.userVerificationApiService.postAccountVerifyOTP(request);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(this.i18nService.t("invalidVerificationCode"));
|
throw new Error(this.i18nService.t("invalidVerificationCode"));
|
||||||
}
|
}
|
||||||
@@ -221,6 +223,8 @@ export class UserVerificationService implements UserVerificationServiceAbstracti
|
|||||||
request.masterPasswordHash = serverKeyHash;
|
request.masterPasswordHash = serverKeyHash;
|
||||||
try {
|
try {
|
||||||
policyOptions = await this.userVerificationApiService.postAccountVerifyPassword(request);
|
policyOptions = await this.userVerificationApiService.postAccountVerifyPassword(request);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(this.i18nService.t("invalidMasterPassword"));
|
throw new Error(this.i18nService.t("invalidMasterPassword"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,12 @@
|
|||||||
// FIXME: Update this file to be type safe and remove this and next line
|
// FIXME: Update this file to be type safe and remove this and next line
|
||||||
// @ts-strict-ignore
|
// @ts-strict-ignore
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type SharedFlags = {
|
export type SharedFlags = {
|
||||||
sdk?: boolean;
|
sdk?: boolean;
|
||||||
prereleaseBuild?: boolean;
|
prereleaseBuild?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
// required to avoid linting errors when there are no flags
|
// required to avoid linting errors when there are no flags
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
||||||
export type SharedDevFlags = {
|
export type SharedDevFlags = {
|
||||||
noopNotifications: boolean;
|
noopNotifications: boolean;
|
||||||
skipWelcomeOnInstall: boolean;
|
skipWelcomeOnInstall: boolean;
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import { KeyService } from "../../../../key-management/src/abstractions/key.serv
|
|||||||
import { EncryptService } from "../abstractions/encrypt.service";
|
import { EncryptService } from "../abstractions/encrypt.service";
|
||||||
import { I18nService } from "../abstractions/i18n.service";
|
import { I18nService } from "../abstractions/i18n.service";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
||||||
const nodeURL = typeof self === "undefined" ? require("url") : null;
|
const nodeURL = typeof self === "undefined" ? require("url") : null;
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
@@ -610,6 +612,8 @@ export class Utils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return new URL(uriString);
|
return new URL(uriString);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Ignore error
|
// Ignore error
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,9 +67,13 @@ describe("DomainBase", () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// @ts-expect-error -- encString2 was not decrypted
|
// @ts-expect-error -- encString2 was not decrypted
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
decrypted as { encToString: string; encString2: string; plainText: string };
|
decrypted as { encToString: string; encString2: string; plainText: string };
|
||||||
|
|
||||||
// encString2 was not decrypted, so it's still an EncString
|
// encString2 was not decrypted, so it's still an EncString
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
decrypted as { encToString: string; encString2: EncString; plainText: string };
|
decrypted as { encToString: string; encString2: EncString; plainText: string };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { EncryptService } from "../../abstractions/encrypt.service";
|
|||||||
import { EncString } from "./enc-string";
|
import { EncString } from "./enc-string";
|
||||||
import { SymmetricCryptoKey } from "./symmetric-crypto-key";
|
import { SymmetricCryptoKey } from "./symmetric-crypto-key";
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
||||||
type EncStringKeys<T> = ConditionalKeys<ConditionalExcept<T, Function>, EncString>;
|
type EncStringKeys<T> = ConditionalKeys<ConditionalExcept<T, Function>, EncString>;
|
||||||
export type DecryptedObject<
|
export type DecryptedObject<
|
||||||
TEncryptedObject,
|
TEncryptedObject,
|
||||||
|
|||||||
@@ -125,6 +125,8 @@ export class EncString implements Encrypted {
|
|||||||
try {
|
try {
|
||||||
encType = parseInt(headerPieces[0], null);
|
encType = parseInt(headerPieces[0], null);
|
||||||
encPieces = headerPieces[1].split("|");
|
encPieces = headerPieces[1].split("|");
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return { encType: NaN, encPieces: [] };
|
return { encType: NaN, encPieces: [] };
|
||||||
}
|
}
|
||||||
@@ -186,6 +188,8 @@ export class EncString implements Encrypted {
|
|||||||
key,
|
key,
|
||||||
decryptTrace == null ? context : `${decryptTrace}${context || ""}`,
|
decryptTrace == null ? context : `${decryptTrace}${context || ""}`,
|
||||||
);
|
);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.decryptedValue = DECRYPT_ERROR;
|
this.decryptedValue = DECRYPT_ERROR;
|
||||||
}
|
}
|
||||||
@@ -203,6 +207,8 @@ export class EncString implements Encrypted {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.decryptedValue = await encryptService.decryptToUtf8(this, key, decryptTrace);
|
this.decryptedValue = await encryptService.decryptToUtf8(this, key, decryptTrace);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.decryptedValue = DECRYPT_ERROR;
|
this.decryptedValue = DECRYPT_ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
import { StateDefinitionLike, MigrationHelper } from "../migration-helper";
|
import { StateDefinitionLike, MigrationHelper } from "../migration-helper";
|
||||||
import { Migrator } from "../migrator";
|
import { Migrator } from "../migrator";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const AutofillOverlayVisibility = {
|
const AutofillOverlayVisibility = {
|
||||||
Off: 0,
|
Off: 0,
|
||||||
OnButtonClick: 1,
|
OnButtonClick: 1,
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
import { StateDefinitionLike, MigrationHelper } from "../migration-helper";
|
import { StateDefinitionLike, MigrationHelper } from "../migration-helper";
|
||||||
import { Migrator } from "../migrator";
|
import { Migrator } from "../migrator";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const ClearClipboardDelay = {
|
const ClearClipboardDelay = {
|
||||||
Never: null as null,
|
Never: null as null,
|
||||||
TenSeconds: 10,
|
TenSeconds: 10,
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
import { KeyDefinitionLike, MigrationHelper } from "../migration-helper";
|
import { KeyDefinitionLike, MigrationHelper } from "../migration-helper";
|
||||||
import { Migrator } from "../migrator";
|
import { Migrator } from "../migrator";
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const UriMatchStrategy = {
|
const UriMatchStrategy = {
|
||||||
Domain: 0,
|
Domain: 0,
|
||||||
Host: 1,
|
Host: 1,
|
||||||
|
|||||||
@@ -81,6 +81,8 @@ export class Send extends Domain {
|
|||||||
const sendKeyEncryptionKey = await keyService.getUserKey();
|
const sendKeyEncryptionKey = await keyService.getUserKey();
|
||||||
model.key = await encryptService.decryptToBytes(this.key, sendKeyEncryptionKey);
|
model.key = await encryptService.decryptToBytes(this.key, sendKeyEncryptionKey);
|
||||||
model.cryptoKey = await keyService.makeSendKey(model.key);
|
model.cryptoKey = await keyService.makeSendKey(model.key);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// TODO: error?
|
// TODO: error?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ export function buildCipherIcon(iconsServerUrl: string, cipher: CipherView, show
|
|||||||
try {
|
try {
|
||||||
image = `${iconsServerUrl}/${Utils.getHostname(hostnameUri)}/icon.png`;
|
image = `${iconsServerUrl}/${Utils.getHostname(hostnameUri)}/icon.png`;
|
||||||
fallbackImage = "images/bwi-globe.png";
|
fallbackImage = "images/bwi-globe.png";
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Ignore error since the fallback icon will be shown if image is null.
|
// Ignore error since the fallback icon will be shown if image is null.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ export class Attachment extends Domain {
|
|||||||
const encryptService = Utils.getContainerService().getEncryptService();
|
const encryptService = Utils.getContainerService().getEncryptService();
|
||||||
const decValue = await encryptService.decryptToBytes(this.key, encKey);
|
const decValue = await encryptService.decryptToBytes(this.key, encKey);
|
||||||
return new SymmetricCryptoKey(decValue);
|
return new SymmetricCryptoKey(decValue);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// TODO: error?
|
// TODO: error?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,6 +155,8 @@ export class CipherView implements View, InitializerMetadata {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
const item = this.item;
|
const item = this.item;
|
||||||
return this.item[linkedFieldOption.propertyKey as keyof typeof item];
|
return this.item[linkedFieldOption.propertyKey as keyof typeof item];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,6 +142,8 @@ export class LoginUriView implements View {
|
|||||||
try {
|
try {
|
||||||
const regex = new RegExp(this.uri, "i");
|
const regex = new RegExp(this.uri, "i");
|
||||||
return regex.test(targetUri);
|
return regex.test(targetUri);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Invalid regex
|
// Invalid regex
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ export class A11yGridDirective implements AfterViewInit {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.getActiveCellContent().tabIndex = 0;
|
this.getActiveCellContent().tabIndex = 0;
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.error("Unable to initialize grid");
|
console.error("Unable to initialize grid");
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ export class NavGroupComponent extends NavBaseComponent implements AfterContentI
|
|||||||
setOpen(isOpen: boolean) {
|
setOpen(isOpen: boolean) {
|
||||||
this.open = isOpen;
|
this.open = isOpen;
|
||||||
this.openChange.emit(this.open);
|
this.openChange.emit(this.open);
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
this.open && this.parentNavGroup?.setOpen(this.open);
|
this.open && this.parentNavGroup?.setOpen(this.open);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ describe("ImportService", () => {
|
|||||||
function createCipher(options: Partial<CipherView> = {}) {
|
function createCipher(options: Partial<CipherView> = {}) {
|
||||||
const cipher = new CipherView();
|
const cipher = new CipherView();
|
||||||
|
|
||||||
cipher.name;
|
cipher.name = options.name;
|
||||||
cipher.type = options.type;
|
cipher.type = options.type;
|
||||||
cipher.folderId = options.folderId;
|
cipher.folderId = options.folderId;
|
||||||
cipher.collectionIds = options.collectionIds;
|
cipher.collectionIds = options.collectionIds;
|
||||||
|
|||||||
@@ -683,6 +683,8 @@ export class DefaultKeyService implements KeyServiceAbstraction {
|
|||||||
// failed to decrypt
|
// failed to decrypt
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* eslint-env node */
|
/* eslint-env node */
|
||||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
||||||
const { defaultTransformerOptions } = require("jest-preset-angular/presets");
|
const { defaultTransformerOptions } = require("jest-preset-angular/presets");
|
||||||
|
|
||||||
/** @type {import('jest').Config} */
|
/** @type {import('jest').Config} */
|
||||||
|
|||||||
@@ -38,6 +38,8 @@ describe("AddEditCustomFieldDialogComponent", () => {
|
|||||||
|
|
||||||
fixture = TestBed.createComponent(AddEditCustomFieldDialogComponent);
|
fixture = TestBed.createComponent(AddEditCustomFieldDialogComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
||||||
fixture.detectChanges;
|
fixture.detectChanges;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -98,6 +98,8 @@ export class DownloadAttachmentComponent {
|
|||||||
fileName: this.attachment.fileName,
|
fileName: this.attachment.fileName,
|
||||||
blobData: decBuf,
|
blobData: decBuf,
|
||||||
});
|
});
|
||||||
|
// FIXME: Remove when updating file. Eslint update
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.toastService.showToast({
|
this.toastService.showToast({
|
||||||
variant: "error",
|
variant: "error",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user