From 3397ae4ede0cc31032ae17ed0b8e204e773c22c9 Mon Sep 17 00:00:00 2001
From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
Date: Tue, 28 Nov 2023 17:00:41 +0100
Subject: [PATCH 01/46] Remove node-gyp from workflows (#6964)
Co-authored-by: Daniel James Smith
---
.github/workflows/build-browser.yml | 6 -----
.github/workflows/build-cli.yml | 10 --------
.github/workflows/build-desktop.yml | 30 ----------------------
.github/workflows/release-desktop-beta.yml | 25 ------------------
4 files changed, 71 deletions(-)
diff --git a/.github/workflows/build-browser.yml b/.github/workflows/build-browser.yml
index 2a84a29006e..f16021570a9 100644
--- a/.github/workflows/build-browser.yml
+++ b/.github/workflows/build-browser.yml
@@ -136,16 +136,10 @@ jobs:
cache-dependency-path: '**/package-lock.json'
node-version: ${{ env._NODE_VERSION }}
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Print environment
run: |
node --version
npm --version
- node-gyp --version
- name: Build sources for reviewers
run: |
diff --git a/.github/workflows/build-cli.yml b/.github/workflows/build-cli.yml
index ca706eb6420..e5e2aeaa88f 100644
--- a/.github/workflows/build-cli.yml
+++ b/.github/workflows/build-cli.yml
@@ -104,11 +104,6 @@ jobs:
cache-dependency-path: '**/package-lock.json'
node-version: ${{ env._NODE_VERSION }}
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Install
run: npm ci
working-directory: ./
@@ -179,11 +174,6 @@ jobs:
cache-dependency-path: '**/package-lock.json'
node-version: ${{ env._NODE_VERSION }}
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Get pkg-fetch
shell: pwsh
run: |
diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml
index d26646cffd7..b75e8457ea9 100644
--- a/.github/workflows/build-desktop.yml
+++ b/.github/workflows/build-desktop.yml
@@ -162,11 +162,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Set up environment
run: |
sudo apt-get update
@@ -279,11 +274,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Install AST
run: dotnet tool install --global AzureSignTool --version 4.0.1
@@ -493,11 +483,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Rust
shell: pwsh
run: rustup target install aarch64-apple-darwin
@@ -646,11 +631,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Rust
shell: pwsh
run: rustup target install aarch64-apple-darwin
@@ -844,11 +824,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Rust
shell: pwsh
run: rustup target install aarch64-apple-darwin
@@ -1034,11 +1009,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Print environment
run: |
node --version
diff --git a/.github/workflows/release-desktop-beta.yml b/.github/workflows/release-desktop-beta.yml
index 33bb5965798..fb9c710a5f8 100644
--- a/.github/workflows/release-desktop-beta.yml
+++ b/.github/workflows/release-desktop-beta.yml
@@ -138,11 +138,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Set up environment
run: |
sudo apt-get update
@@ -235,11 +230,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Install AST
run: dotnet tool install --global AzureSignTool --version 4.0.1
@@ -431,11 +421,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Print environment
run: |
node --version
@@ -561,11 +546,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Print environment
run: |
node --version
@@ -764,11 +744,6 @@ jobs:
- name: Set Node options
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- - name: Install node-gyp
- run: |
- npm install -g node-gyp
- node-gyp install $(node -v)
-
- name: Print environment
run: |
node --version
From 9f81f66e2cc6c697f97f4b745cc85f446b925ce1 Mon Sep 17 00:00:00 2001
From: Shane Melton
Date: Tue, 28 Nov 2023 09:03:45 -0800
Subject: [PATCH 02/46] Move purge-vault.component.ts to Vault code ownership
(#6992)
---
.../admin-console/organizations/settings/account.component.ts | 2 +-
apps/web/src/app/settings/account.component.ts | 2 +-
apps/web/src/app/shared/loose-components.module.ts | 2 +-
.../web/src/app/{ => vault}/settings/purge-vault.component.html | 0
apps/web/src/app/{ => vault}/settings/purge-vault.component.ts | 0
5 files changed, 3 insertions(+), 3 deletions(-)
rename apps/web/src/app/{ => vault}/settings/purge-vault.component.html (100%)
rename apps/web/src/app/{ => vault}/settings/purge-vault.component.ts (100%)
diff --git a/apps/web/src/app/admin-console/organizations/settings/account.component.ts b/apps/web/src/app/admin-console/organizations/settings/account.component.ts
index 3bd76aa8128..5682a423d62 100644
--- a/apps/web/src/app/admin-console/organizations/settings/account.component.ts
+++ b/apps/web/src/app/admin-console/organizations/settings/account.component.ts
@@ -19,7 +19,7 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
import { DialogService } from "@bitwarden/components";
import { ApiKeyComponent } from "../../../settings/api-key.component";
-import { PurgeVaultComponent } from "../../../settings/purge-vault.component";
+import { PurgeVaultComponent } from "../../../vault/settings/purge-vault.component";
import { DeleteOrganizationDialogResult, openDeleteOrganizationDialog } from "./components";
diff --git a/apps/web/src/app/settings/account.component.ts b/apps/web/src/app/settings/account.component.ts
index 45f5375654d..42199144ae4 100644
--- a/apps/web/src/app/settings/account.component.ts
+++ b/apps/web/src/app/settings/account.component.ts
@@ -4,9 +4,9 @@ import { ModalService } from "@bitwarden/angular/services/modal.service";
import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
import { DeauthorizeSessionsComponent } from "../auth/settings/deauthorize-sessions.component";
+import { PurgeVaultComponent } from "../vault/settings/purge-vault.component";
import { DeleteAccountComponent } from "./delete-account.component";
-import { PurgeVaultComponent } from "./purge-vault.component";
@Component({
selector: "app-account",
diff --git a/apps/web/src/app/shared/loose-components.module.ts b/apps/web/src/app/shared/loose-components.module.ts
index c96e1227c8c..2944f88473b 100644
--- a/apps/web/src/app/shared/loose-components.module.ts
+++ b/apps/web/src/app/shared/loose-components.module.ts
@@ -66,7 +66,6 @@ import { DomainRulesComponent } from "../settings/domain-rules.component";
import { LowKdfComponent } from "../settings/low-kdf.component";
import { PreferencesComponent } from "../settings/preferences.component";
import { ProfileComponent } from "../settings/profile.component";
-import { PurgeVaultComponent } from "../settings/purge-vault.component";
import { SecurityKeysComponent } from "../settings/security-keys.component";
import { SecurityComponent } from "../settings/security.component";
import { SettingsComponent } from "../settings/settings.component";
@@ -87,6 +86,7 @@ import { ShareComponent } from "../vault/individual-vault/share.component";
import { AddEditComponent as OrgAddEditComponent } from "../vault/org-vault/add-edit.component";
import { AttachmentsComponent as OrgAttachmentsComponent } from "../vault/org-vault/attachments.component";
import { CollectionsComponent as OrgCollectionsComponent } from "../vault/org-vault/collections.component";
+import { PurgeVaultComponent } from "../vault/settings/purge-vault.component";
import { EnvironmentSelectorModule } from "./../components/environment-selector/environment-selector.module";
import { AccountFingerprintComponent } from "./components/account-fingerprint/account-fingerprint.component";
diff --git a/apps/web/src/app/settings/purge-vault.component.html b/apps/web/src/app/vault/settings/purge-vault.component.html
similarity index 100%
rename from apps/web/src/app/settings/purge-vault.component.html
rename to apps/web/src/app/vault/settings/purge-vault.component.html
diff --git a/apps/web/src/app/settings/purge-vault.component.ts b/apps/web/src/app/vault/settings/purge-vault.component.ts
similarity index 100%
rename from apps/web/src/app/settings/purge-vault.component.ts
rename to apps/web/src/app/vault/settings/purge-vault.component.ts
From a342ce5d9a535e06cc801fee6fc8ad72f778530f Mon Sep 17 00:00:00 2001
From: Ike <137194738+ike-kottlowski@users.noreply.github.com>
Date: Tue, 28 Nov 2023 09:45:13 -0800
Subject: [PATCH 03/46] updated bit_lic/app-routing module (#6995)
---
bitwarden_license/bit-web/src/app/app-routing.module.ts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/bitwarden_license/bit-web/src/app/app-routing.module.ts b/bitwarden_license/bit-web/src/app/app-routing.module.ts
index c32fe78cb6a..0f10da154b9 100644
--- a/bitwarden_license/bit-web/src/app/app-routing.module.ts
+++ b/bitwarden_license/bit-web/src/app/app-routing.module.ts
@@ -1,11 +1,14 @@
import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
+import { deepLinkGuard } from "@bitwarden/web-vault/app/auth/guards/deep-link.guard";
+
import { ProvidersModule } from "./admin-console/providers/providers.module";
const routes: Routes = [
{
path: "providers",
+ canActivate: [deepLinkGuard()],
loadChildren: () => ProvidersModule,
},
{
From ed865a67470c70a0a968810eb24e173c09f839ed Mon Sep 17 00:00:00 2001
From: ttalty <144813356+ttalty@users.noreply.github.com>
Date: Tue, 28 Nov 2023 14:44:06 -0500
Subject: [PATCH 04/46] =?UTF-8?q?[PM-3560]=20Adding=20the=20password=20com?=
=?UTF-8?q?plexity=20component=20to=20the=20password=20protected=20va?=
=?UTF-8?q?=E2=80=A6=20(#6936)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* Adding the password complexity component to the password protected valut export
* Removing the zxcvbn import as the component handles the strength check
---
.../tools/vault-export/export.component.html | 41 +++++++++++--------
.../export/components/export.component.ts | 6 ++-
2 files changed, 28 insertions(+), 19 deletions(-)
diff --git a/apps/web/src/app/tools/vault-export/export.component.html b/apps/web/src/app/tools/vault-export/export.component.html
index 159f9290845..9d885ba3985 100644
--- a/apps/web/src/app/tools/vault-export/export.component.html
+++ b/apps/web/src/app/tools/vault-export/export.component.html
@@ -86,24 +86,29 @@
-
- {{ "filePassword" | i18n }}
-
-
- {{ "exportPasswordDescription" | i18n }}
-
+
+
+ {{ "filePassword" | i18n }}
+
+
+ {{ "exportPasswordDescription" | i18n }}
+
+
+
+
+
{{ "confirmFilePassword" | i18n }}
;
private _disabledByPolicy = false;
From 10ef3a5cc04214e3e06dbbb1b448b53c0ac74bfc Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 28 Nov 2023 15:36:53 -0500
Subject: [PATCH 05/46] [deps] Autofill: Update rimraf to v5.0.5 (#7012)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 44 ++++++++++++++++++++++----------------------
package.json | 2 +-
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index fa7475aa670..707b3042eb2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -165,7 +165,7 @@
"react-dom": "18.2.0",
"regedit": "^3.0.3",
"remark-gfm": "3.0.1",
- "rimraf": "5.0.1",
+ "rimraf": "5.0.5",
"sass": "1.65.1",
"sass-loader": "13.3.2",
"storybook": "7.3.0",
@@ -26202,9 +26202,9 @@
}
},
"node_modules/jackspeak": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.2.1.tgz",
- "integrity": "sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw==",
+ "version": "2.3.6",
+ "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",
+ "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==",
"dev": true,
"dependencies": {
"@isaacs/cliui": "^8.0.2"
@@ -35060,15 +35060,15 @@
"dev": true
},
"node_modules/rimraf": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.1.tgz",
- "integrity": "sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg==",
+ "version": "5.0.5",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz",
+ "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==",
"dev": true,
"dependencies": {
- "glob": "^10.2.5"
+ "glob": "^10.3.7"
},
"bin": {
- "rimraf": "dist/cjs/src/bin.js"
+ "rimraf": "dist/esm/bin.mjs"
},
"engines": {
"node": ">=14"
@@ -35087,19 +35087,19 @@
}
},
"node_modules/rimraf/node_modules/glob": {
- "version": "10.2.6",
- "resolved": "https://registry.npmjs.org/glob/-/glob-10.2.6.tgz",
- "integrity": "sha512-U/rnDpXJGF414QQQZv5uVsabTVxMSwzS5CH0p3DRCIV6ownl4f7PzGnkGmvlum2wB+9RlJWJZ6ACU1INnBqiPA==",
+ "version": "10.3.10",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
+ "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
"dev": true,
"dependencies": {
"foreground-child": "^3.1.0",
- "jackspeak": "^2.0.3",
+ "jackspeak": "^2.3.5",
"minimatch": "^9.0.1",
- "minipass": "^5.0.0 || ^6.0.2",
- "path-scurry": "^1.7.0"
+ "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
+ "path-scurry": "^1.10.1"
},
"bin": {
- "glob": "dist/cjs/src/bin.js"
+ "glob": "dist/esm/bin.mjs"
},
"engines": {
"node": ">=16 || 14 >=14.17"
@@ -35109,9 +35109,9 @@
}
},
"node_modules/rimraf/node_modules/minimatch": {
- "version": "9.0.1",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
- "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==",
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
"dev": true,
"dependencies": {
"brace-expansion": "^2.0.1"
@@ -35124,9 +35124,9 @@
}
},
"node_modules/rimraf/node_modules/minipass": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/minipass/-/minipass-6.0.2.tgz",
- "integrity": "sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w==",
+ "version": "7.0.4",
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",
+ "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==",
"dev": true,
"engines": {
"node": ">=16 || 14 >=14.17"
diff --git a/package.json b/package.json
index dc09b5029cb..68ed9c83def 100644
--- a/package.json
+++ b/package.json
@@ -128,7 +128,7 @@
"react-dom": "18.2.0",
"regedit": "^3.0.3",
"remark-gfm": "3.0.1",
- "rimraf": "5.0.1",
+ "rimraf": "5.0.5",
"sass": "1.65.1",
"sass-loader": "13.3.2",
"storybook": "7.3.0",
From 203f615e7519b296f256077836539813975ac362 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 28 Nov 2023 15:55:29 -0500
Subject: [PATCH 06/46] [deps] Autofill: Update prettier-plugin-tailwindcss to
v0.4.1 (#7002)
* [deps] Autofill: Update prettier-plugin-tailwindcss to v0.5.7
* downgrade to v0.4.1
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik
---
package-lock.json | 10 +++++-----
package.json | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 707b3042eb2..d5d40d8c9a5 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -159,7 +159,7 @@
"postcss": "8.4.31",
"postcss-loader": "7.3.3",
"prettier": "2.8.8",
- "prettier-plugin-tailwindcss": "0.3.0",
+ "prettier-plugin-tailwindcss": "0.4.1",
"process": "0.11.10",
"react": "18.2.0",
"react-dom": "18.2.0",
@@ -33236,9 +33236,9 @@
}
},
"node_modules/prettier-plugin-tailwindcss": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.3.0.tgz",
- "integrity": "sha512-009/Xqdy7UmkcTBpwlq7jsViDqXAYSOMLDrHAdTMlVZOrKfM2o9Ci7EMWTMZ7SkKBFTG04UM9F9iM2+4i6boDA==",
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.4.1.tgz",
+ "integrity": "sha512-hwn2EiJmv8M+AW4YDkbjJ6HlZCTzLyz1QlySn9sMuKV/Px0fjwldlB7tol8GzdgqtkdPtzT3iJ4UzdnYXP25Ag==",
"dev": true,
"engines": {
"node": ">=12.17.0"
@@ -33249,7 +33249,7 @@
"@shopify/prettier-plugin-liquid": "*",
"@shufo/prettier-plugin-blade": "*",
"@trivago/prettier-plugin-sort-imports": "*",
- "prettier": ">=2.2.0",
+ "prettier": "^2.2 || ^3.0",
"prettier-plugin-astro": "*",
"prettier-plugin-css-order": "*",
"prettier-plugin-import-sort": "*",
diff --git a/package.json b/package.json
index 68ed9c83def..6a8bb459b63 100644
--- a/package.json
+++ b/package.json
@@ -122,7 +122,7 @@
"postcss": "8.4.31",
"postcss-loader": "7.3.3",
"prettier": "2.8.8",
- "prettier-plugin-tailwindcss": "0.3.0",
+ "prettier-plugin-tailwindcss": "0.4.1",
"process": "0.11.10",
"react": "18.2.0",
"react-dom": "18.2.0",
From 1bff0529109e914bfc6a329b730ed1cde04d08b7 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 28 Nov 2023 17:16:14 -0500
Subject: [PATCH 07/46] [deps] Autofill: Update concurrently to v8.2.2 (#6980)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 8 ++++----
package.json | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index d5d40d8c9a5..7f0e22aab8c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -120,7 +120,7 @@
"buffer": "6.0.3",
"chromatic": "6.22.0",
"clean-webpack-plugin": "4.0.0",
- "concurrently": "8.2.0",
+ "concurrently": "8.2.2",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
@@ -18474,9 +18474,9 @@
}
},
"node_modules/concurrently": {
- "version": "8.2.0",
- "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.0.tgz",
- "integrity": "sha512-nnLMxO2LU492mTUj9qX/az/lESonSZu81UznYDoXtz1IQf996ixVqPAgHXwvHiHCAef/7S8HIK+fTFK7Ifk8YA==",
+ "version": "8.2.2",
+ "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz",
+ "integrity": "sha512-1dP4gpXFhei8IOtlXRE/T/4H88ElHgTiUzh71YUmtjTEHMSRS2Z/fgOxHSxxusGHogsRfxNq1vyAwxSC+EVyDg==",
"dev": true,
"dependencies": {
"chalk": "^4.1.2",
diff --git a/package.json b/package.json
index 6a8bb459b63..4e7934f24e8 100644
--- a/package.json
+++ b/package.json
@@ -83,7 +83,7 @@
"buffer": "6.0.3",
"chromatic": "6.22.0",
"clean-webpack-plugin": "4.0.0",
- "concurrently": "8.2.0",
+ "concurrently": "8.2.2",
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
From ac4bb762e3f65d94d5a0c14fb899e14f2cea762d Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 28 Nov 2023 17:16:40 -0500
Subject: [PATCH 08/46] [deps] Autofill: Update wait-on to v7.2.0 (#7003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 33 +++++++++++++++++----------------
package.json | 2 +-
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 7f0e22aab8c..b208b3ce923 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -178,7 +178,7 @@
"typescript": "4.9.5",
"url": "0.11.1",
"util": "0.12.5",
- "wait-on": "7.0.1",
+ "wait-on": "7.2.0",
"webpack": "5.88.2",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
@@ -16527,13 +16527,14 @@
}
},
"node_modules/axios": {
- "version": "0.27.2",
- "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz",
- "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==",
+ "version": "1.6.2",
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz",
+ "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==",
"dev": true,
"dependencies": {
- "follow-redirects": "^1.14.9",
- "form-data": "^4.0.0"
+ "follow-redirects": "^1.15.0",
+ "form-data": "^4.0.0",
+ "proxy-from-env": "^1.1.0"
}
},
"node_modules/axobject-query": {
@@ -27186,9 +27187,9 @@
}
},
"node_modules/joi": {
- "version": "17.9.2",
- "resolved": "https://registry.npmjs.org/joi/-/joi-17.9.2.tgz",
- "integrity": "sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw==",
+ "version": "17.11.0",
+ "resolved": "https://registry.npmjs.org/joi/-/joi-17.11.0.tgz",
+ "integrity": "sha512-NgB+lZLNoqISVy1rZocE9PZI36bL/77ie924Ri43yEvi9GUUMPeyVIr8KdFTMUlby1p0PBYMk9spIxEUQYqrJQ==",
"dev": true,
"dependencies": {
"@hapi/hoek": "^9.0.0",
@@ -39500,16 +39501,16 @@
}
},
"node_modules/wait-on": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-7.0.1.tgz",
- "integrity": "sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==",
+ "version": "7.2.0",
+ "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-7.2.0.tgz",
+ "integrity": "sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==",
"dev": true,
"dependencies": {
- "axios": "^0.27.2",
- "joi": "^17.7.0",
+ "axios": "^1.6.1",
+ "joi": "^17.11.0",
"lodash": "^4.17.21",
- "minimist": "^1.2.7",
- "rxjs": "^7.8.0"
+ "minimist": "^1.2.8",
+ "rxjs": "^7.8.1"
},
"bin": {
"wait-on": "bin/wait-on"
diff --git a/package.json b/package.json
index 4e7934f24e8..13dcfae824e 100644
--- a/package.json
+++ b/package.json
@@ -141,7 +141,7 @@
"typescript": "4.9.5",
"url": "0.11.1",
"util": "0.12.5",
- "wait-on": "7.0.1",
+ "wait-on": "7.2.0",
"webpack": "5.88.2",
"webpack-cli": "5.1.4",
"webpack-dev-server": "4.15.1",
From c0a650460e8dc931f6c489ab11f4b78f59ee8b55 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Tue, 28 Nov 2023 17:17:00 -0500
Subject: [PATCH 09/46] [deps] Autofill: Update patch-package to v8 (#7013)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 328 ++++++++++++----------------------------------
package.json | 2 +-
2 files changed, 86 insertions(+), 244 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index b208b3ce923..8a7b3c547fa 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -59,7 +59,7 @@
"oidc-client-ts": "2.3.0",
"open": "8.4.2",
"papaparse": "5.4.1",
- "patch-package": "6.5.1",
+ "patch-package": "8.0.0",
"popper.js": "1.16.1",
"proper-lockfile": "4.1.2",
"qrious": "4.0.2",
@@ -5019,18 +5019,6 @@
"js-yaml": "bin/js-yaml.js"
}
},
- "node_modules/@compodoc/compodoc/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/@compodoc/compodoc/node_modules/magic-string": {
"version": "0.30.0",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz",
@@ -5081,21 +5069,6 @@
}
}
},
- "node_modules/@compodoc/compodoc/node_modules/semver": {
- "version": "7.5.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.1.tgz",
- "integrity": "sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/@compodoc/compodoc/node_modules/uuid": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz",
@@ -5105,12 +5078,6 @@
"uuid": "dist/bin/uuid"
}
},
- "node_modules/@compodoc/compodoc/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
"node_modules/@compodoc/live-server": {
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/@compodoc/live-server/-/live-server-1.2.3.tgz",
@@ -11570,33 +11537,6 @@
"node": ">=14.14"
}
},
- "node_modules/@storybook/cli/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@storybook/cli/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/@storybook/cli/node_modules/simple-update-notifier": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
@@ -11609,12 +11549,6 @@
"node": ">=10"
}
},
- "node_modules/@storybook/cli/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
"node_modules/@storybook/client-logger": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-7.2.2.tgz",
@@ -17581,12 +17515,13 @@
}
},
"node_modules/call-bind": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",
+ "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
"dependencies": {
- "function-bind": "^1.1.1",
- "get-intrinsic": "^1.0.2"
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.1",
+ "set-function-length": "^1.1.1"
},
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -17833,7 +17768,6 @@
"version": "3.8.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz",
"integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==",
- "dev": true,
"funding": [
{
"type": "github",
@@ -19045,7 +18979,6 @@
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
- "dev": true,
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
@@ -19450,6 +19383,19 @@
"node": ">=10"
}
},
+ "node_modules/define-data-property": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
+ "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
+ "dependencies": {
+ "get-intrinsic": "^1.2.1",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/define-lazy-prop": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
@@ -20106,18 +20052,6 @@
"node": ">=14"
}
},
- "node_modules/editorconfig/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
"node_modules/editorconfig/node_modules/minimatch": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz",
@@ -20133,27 +20067,6 @@
"url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/editorconfig/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/editorconfig/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
@@ -22974,9 +22887,12 @@
}
},
"node_modules/function-bind": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
},
"node_modules/function.prototype.name": {
"version": "1.1.5",
@@ -23706,7 +23622,6 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
"integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
- "dev": true,
"dependencies": {
"get-intrinsic": "^1.1.3"
},
@@ -24335,7 +24250,6 @@
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",
"integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",
- "dev": true,
"dependencies": {
"get-intrinsic": "^1.1.1"
},
@@ -26069,8 +25983,7 @@
"node_modules/isarray": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
- "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
- "dev": true
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="
},
"node_modules/isbinaryfile": {
"version": "4.0.10",
@@ -27454,6 +27367,23 @@
"integrity": "sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A==",
"dev": true
},
+ "node_modules/json-stable-stringify": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.1.0.tgz",
+ "integrity": "sha512-zfA+5SuwYN2VWqN1/5HZaDzQKLJHaBVMZIIM+wuYjdptkaQsqzDdqjqf+lZZJUuJq1aanHiY8LhH8LmH+qBYJA==",
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "isarray": "^2.0.5",
+ "jsonify": "^0.0.1",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/json-stable-stringify-without-jsonify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
@@ -27493,6 +27423,14 @@
"graceful-fs": "^4.1.6"
}
},
+ "node_modules/jsonify": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.1.tgz",
+ "integrity": "sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==",
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/jsonparse": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz",
@@ -30807,11 +30745,6 @@
"dev": true,
"optional": true
},
- "node_modules/nice-try": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
- "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
- },
"node_modules/no-case": {
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
@@ -31545,7 +31478,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
- "dev": true,
"engines": {
"node": ">= 0.4"
}
@@ -32154,53 +32086,34 @@
}
},
"node_modules/patch-package": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-6.5.1.tgz",
- "integrity": "sha512-I/4Zsalfhc6bphmJTlrLoOcAF87jcxko4q0qsv4bGcurbr8IskEOtdnt9iCmsQVGL1B+iUhSQqweyTLJfCF9rA==",
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/patch-package/-/patch-package-8.0.0.tgz",
+ "integrity": "sha512-da8BVIhzjtgScwDJ2TtKsfT5JFWz1hYoBl9rUQ1f38MC2HwnEIkK8VN3dKMKcP7P7bvvgzNDbfNHtx3MsQb5vA==",
"dependencies": {
"@yarnpkg/lockfile": "^1.1.0",
"chalk": "^4.1.2",
- "cross-spawn": "^6.0.5",
+ "ci-info": "^3.7.0",
+ "cross-spawn": "^7.0.3",
"find-yarn-workspace-root": "^2.0.0",
"fs-extra": "^9.0.0",
- "is-ci": "^2.0.0",
+ "json-stable-stringify": "^1.0.2",
"klaw-sync": "^6.0.0",
"minimist": "^1.2.6",
"open": "^7.4.2",
"rimraf": "^2.6.3",
- "semver": "^5.6.0",
+ "semver": "^7.5.3",
"slash": "^2.0.0",
"tmp": "^0.0.33",
- "yaml": "^1.10.2"
+ "yaml": "^2.2.2"
},
"bin": {
"patch-package": "index.js"
},
"engines": {
- "node": ">=10",
+ "node": ">=14",
"npm": ">5"
}
},
- "node_modules/patch-package/node_modules/ci-info": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz",
- "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ=="
- },
- "node_modules/patch-package/node_modules/cross-spawn": {
- "version": "6.0.5",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
- "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
- "dependencies": {
- "nice-try": "^1.0.4",
- "path-key": "^2.0.1",
- "semver": "^5.5.0",
- "shebang-command": "^1.2.0",
- "which": "^1.2.9"
- },
- "engines": {
- "node": ">=4.8"
- }
- },
"node_modules/patch-package/node_modules/fs-extra": {
"version": "9.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
@@ -32234,17 +32147,6 @@
"url": "https://github.com/sponsors/isaacs"
}
},
- "node_modules/patch-package/node_modules/is-ci": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz",
- "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==",
- "dependencies": {
- "ci-info": "^2.0.0"
- },
- "bin": {
- "is-ci": "bin.js"
- }
- },
"node_modules/patch-package/node_modules/open": {
"version": "7.4.2",
"resolved": "https://registry.npmjs.org/open/-/open-7.4.2.tgz",
@@ -32260,14 +32162,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/patch-package/node_modules/path-key": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
- "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
- "engines": {
- "node": ">=4"
- }
- },
"node_modules/patch-package/node_modules/rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
@@ -32279,33 +32173,6 @@
"rimraf": "bin.js"
}
},
- "node_modules/patch-package/node_modules/semver": {
- "version": "5.7.1",
- "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
- "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
- "bin": {
- "semver": "bin/semver"
- }
- },
- "node_modules/patch-package/node_modules/shebang-command": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
- "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
- "dependencies": {
- "shebang-regex": "^1.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/patch-package/node_modules/shebang-regex": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
- "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
"node_modules/patch-package/node_modules/slash": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
@@ -32314,15 +32181,12 @@
"node": ">=6"
}
},
- "node_modules/patch-package/node_modules/which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "which": "bin/which"
+ "node_modules/patch-package/node_modules/yaml": {
+ "version": "2.3.4",
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz",
+ "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==",
+ "engines": {
+ "node": ">= 14"
}
},
"node_modules/path-browserify": {
@@ -32364,7 +32228,6 @@
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "dev": true,
"engines": {
"node": ">=8"
}
@@ -35427,9 +35290,9 @@
}
},
"node_modules/semver": {
- "version": "7.3.8",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz",
- "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==",
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
"dependencies": {
"lru-cache": "^6.0.0"
},
@@ -35712,6 +35575,20 @@
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
},
+ "node_modules/set-function-length": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz",
+ "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==",
+ "dependencies": {
+ "define-data-property": "^1.1.1",
+ "get-intrinsic": "^1.2.1",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/set-value": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
@@ -35801,7 +35678,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dev": true,
"dependencies": {
"shebang-regex": "^3.0.0"
},
@@ -35813,7 +35689,6 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "dev": true,
"engines": {
"node": ">=8"
}
@@ -38278,39 +38153,6 @@
}
}
},
- "node_modules/ts-jest/node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dev": true,
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/ts-jest/node_modules/semver": {
- "version": "7.5.4",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
- "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
- "dev": true,
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/ts-jest/node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
- "dev": true
- },
"node_modules/ts-loader": {
"version": "9.4.4",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.4.4.tgz",
@@ -40078,7 +39920,6 @@
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dev": true,
"dependencies": {
"isexe": "^2.0.0"
},
@@ -40373,6 +40214,7 @@
"version": "1.10.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
"integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
+ "dev": true,
"engines": {
"node": ">= 6"
}
diff --git a/package.json b/package.json
index 13dcfae824e..38c4f12a839 100644
--- a/package.json
+++ b/package.json
@@ -192,7 +192,7 @@
"oidc-client-ts": "2.3.0",
"open": "8.4.2",
"papaparse": "5.4.1",
- "patch-package": "6.5.1",
+ "patch-package": "8.0.0",
"popper.js": "1.16.1",
"proper-lockfile": "4.1.2",
"qrious": "4.0.2",
From 48c60337924d22adefae0f34077a2b8580b9dff0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20Ch=C4=99ci=C5=84ski?=
Date: Wed, 29 Nov 2023 09:41:22 +0100
Subject: [PATCH 10/46] [DEVOPS-1651] Update the QA deployment alert at the
start (#6998)
* Update the QA deployment alert at the start
* Change in non prod web
---
.github/workflows/deploy-eu-qa-web.yml | 18 +++++++++++++++++-
.github/workflows/deploy-non-prod-web.yml | 18 +++++++++++++++++-
2 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/deploy-eu-qa-web.yml b/.github/workflows/deploy-eu-qa-web.yml
index b647894653c..9fa50f3ba3c 100644
--- a/.github/workflows/deploy-eu-qa-web.yml
+++ b/.github/workflows/deploy-eu-qa-web.yml
@@ -11,6 +11,21 @@ on:
default: master
jobs:
+ notify-start:
+ name: Notify Slack with start message
+ runs-on: ubuntu-22.04
+ if: always()
+ steps:
+ - uses: bitwarden/gh-actions/report-deployment-status-to-slack@main
+ with:
+ project: Web
+ environment: EU QA Cloud
+ tag: ${{ github.ref_name }}
+ slack-channel: team-eng-qa-devops
+ event: 'start'
+ url: https://github.com/bitwarden/clients/actions/runs/${{ github.run_id }}
+ AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
+
azure-deploy:
name: Deploy to Azure
runs-on: ubuntu-22.04
@@ -71,5 +86,6 @@ jobs:
environment: EU QA Cloud
tag: ${{ github.event.inputs.tag }}
slack-channel: team-eng-qa-devops
- failure: ${{ needs.azure-deploy.result == 'failure' }}
+ event: ${{ needs.azure-deploy.result }}
+ url: https://github.com/bitwarden/devops/actions/runs/${{ github.run_id }}
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
diff --git a/.github/workflows/deploy-non-prod-web.yml b/.github/workflows/deploy-non-prod-web.yml
index 296a77e581d..2a92a4d401e 100644
--- a/.github/workflows/deploy-non-prod-web.yml
+++ b/.github/workflows/deploy-non-prod-web.yml
@@ -57,6 +57,21 @@ jobs:
echo "environment-artifact=web-*-cloud-COMMERCIAL.zip" >> $GITHUB_OUTPUT
fi
+ notify-start:
+ name: Notify Slack with start message
+ runs-on: ubuntu-22.04
+ if: always()
+ steps:
+ - uses: bitwarden/gh-actions/report-deployment-status-to-slack@main
+ with:
+ project: Web
+ environment: US ${{ inputs.environment }} Cloud
+ tag: ${{ github.ref_name }}
+ slack-channel: team-eng-qa-devops
+ event: 'start'
+ url: https://github.com/bitwarden/clients/actions/runs/${{ github.run_id }}
+ AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
+
artifact-check:
name: Check if Web artifact is present
runs-on: ubuntu-22.04
@@ -253,5 +268,6 @@ jobs:
environment: US ${{ inputs.environment }} Cloud
tag: ${{ github.ref_name }}
slack-channel: team-eng-qa-devops
- failure: ${{ needs.cfpages-deploy.result == 'failure' }}
+ event: ${{ needs.cfpages-deploy.result }}
+ url: https://github.com/bitwarden/clients/actions/runs/${{ github.run_id }}
AZURE_KV_CI_SERVICE_PRINCIPAL: ${{ secrets.AZURE_KV_CI_SERVICE_PRINCIPAL }}
From 3451ee81337cb6c75d651ce7557bfa2768de0719 Mon Sep 17 00:00:00 2001
From: Justin Baur <19896123+justindbaur@users.noreply.github.com>
Date: Wed, 29 Nov 2023 09:31:18 -0500
Subject: [PATCH 11/46] Vault Timeout Service Tests & Bug Fix (#7021)
* Add Tests to VaultTimeoutService
* Fix Bug
Get availableTimeoutActions for the user actually locking
instead of getting the timeout actions for the active user.
---
.../vault-timeout.service.spec.ts | 313 ++++++++++++++++++
.../vault-timeout/vault-timeout.service.ts | 2 +-
2 files changed, 314 insertions(+), 1 deletion(-)
create mode 100644 libs/common/src/services/vault-timeout/vault-timeout.service.spec.ts
diff --git a/libs/common/src/services/vault-timeout/vault-timeout.service.spec.ts b/libs/common/src/services/vault-timeout/vault-timeout.service.spec.ts
new file mode 100644
index 00000000000..8d4e8c8d416
--- /dev/null
+++ b/libs/common/src/services/vault-timeout/vault-timeout.service.spec.ts
@@ -0,0 +1,313 @@
+import { MockProxy, any, mock } from "jest-mock-extended";
+import { BehaviorSubject } from "rxjs";
+
+import { SearchService } from "../../abstractions/search.service";
+import { VaultTimeoutSettingsService } from "../../abstractions/vault-timeout/vault-timeout-settings.service";
+import { AuthService } from "../../auth/abstractions/auth.service";
+import { AuthenticationStatus } from "../../auth/enums/authentication-status";
+import { VaultTimeoutAction } from "../../enums/vault-timeout-action.enum";
+import { CryptoService } from "../../platform/abstractions/crypto.service";
+import { MessagingService } from "../../platform/abstractions/messaging.service";
+import { PlatformUtilsService } from "../../platform/abstractions/platform-utils.service";
+import { StateService } from "../../platform/abstractions/state.service";
+import { Account } from "../../platform/models/domain/account";
+import { CipherService } from "../../vault/abstractions/cipher.service";
+import { CollectionService } from "../../vault/abstractions/collection.service";
+import { FolderService } from "../../vault/abstractions/folder/folder.service.abstraction";
+
+import { VaultTimeoutService } from "./vault-timeout.service";
+
+describe("VaultTimeoutService", () => {
+ let cipherService: MockProxy;
+ let folderService: MockProxy;
+ let collectionService: MockProxy;
+ let cryptoService: MockProxy;
+ let platformUtilsService: MockProxy;
+ let messagingService: MockProxy;
+ let searchService: MockProxy;
+ let stateService: MockProxy;
+ let authService: MockProxy;
+ let vaultTimeoutSettingsService: MockProxy;
+ let lockedCallback: jest.Mock, [userId: string]>;
+ let loggedOutCallback: jest.Mock, [expired: boolean, userId?: string]>;
+
+ let accountsSubject: BehaviorSubject>;
+ let vaultTimeoutActionSubject: BehaviorSubject;
+ let availableVaultTimeoutActionsSubject: BehaviorSubject;
+
+ let vaultTimeoutService: VaultTimeoutService;
+
+ beforeEach(() => {
+ cipherService = mock();
+ folderService = mock();
+ collectionService = mock();
+ cryptoService = mock();
+ platformUtilsService = mock();
+ messagingService = mock();
+ searchService = mock();
+ stateService = mock();
+ authService = mock();
+ vaultTimeoutSettingsService = mock();
+
+ lockedCallback = jest.fn();
+ loggedOutCallback = jest.fn();
+
+ accountsSubject = new BehaviorSubject(null);
+
+ stateService.accounts$ = accountsSubject;
+
+ vaultTimeoutActionSubject = new BehaviorSubject(VaultTimeoutAction.Lock);
+
+ vaultTimeoutSettingsService.vaultTimeoutAction$.mockReturnValue(vaultTimeoutActionSubject);
+
+ availableVaultTimeoutActionsSubject = new BehaviorSubject([]);
+
+ vaultTimeoutService = new VaultTimeoutService(
+ cipherService,
+ folderService,
+ collectionService,
+ cryptoService,
+ platformUtilsService,
+ messagingService,
+ searchService,
+ stateService,
+ authService,
+ vaultTimeoutSettingsService,
+ lockedCallback,
+ loggedOutCallback
+ );
+ });
+
+ // Helper for setting up mocks for multiple users
+ const setupAccounts = (
+ accounts: Record<
+ string,
+ {
+ authStatus?: AuthenticationStatus;
+ isAuthenticated?: boolean;
+ lastActive?: number;
+ vaultTimeout?: number;
+ timeoutAction?: VaultTimeoutAction;
+ availableTimeoutActions?: VaultTimeoutAction[];
+ }
+ >,
+ userId?: string
+ ) => {
+ // Both are available by default and the specific test can change this per test
+ availableVaultTimeoutActionsSubject.next([VaultTimeoutAction.Lock, VaultTimeoutAction.LogOut]);
+
+ authService.getAuthStatus.mockImplementation((userId) => {
+ return Promise.resolve(accounts[userId]?.authStatus);
+ });
+ stateService.getIsAuthenticated.mockImplementation((options) => {
+ return Promise.resolve(accounts[options.userId]?.isAuthenticated);
+ });
+
+ vaultTimeoutSettingsService.getVaultTimeout.mockImplementation((userId) => {
+ return Promise.resolve(accounts[userId]?.vaultTimeout);
+ });
+
+ stateService.getLastActive.mockImplementation((options) => {
+ return Promise.resolve(accounts[options.userId]?.lastActive);
+ });
+
+ stateService.getUserId.mockResolvedValue(userId);
+
+ vaultTimeoutSettingsService.vaultTimeoutAction$.mockImplementation((userId) => {
+ return new BehaviorSubject(accounts[userId]?.timeoutAction);
+ });
+
+ vaultTimeoutSettingsService.availableVaultTimeoutActions$.mockImplementation((userId) => {
+ return new BehaviorSubject(
+ // Default to both options if it wasn't supplied at all
+ accounts[userId]?.availableTimeoutActions ?? [
+ VaultTimeoutAction.Lock,
+ VaultTimeoutAction.LogOut,
+ ]
+ );
+ });
+
+ const accountsSubjectValue: Record = Object.keys(accounts).reduce(
+ (agg, key) => {
+ const newPartial: Record = {};
+ newPartial[key] = null; // No values actually matter on this other than the key
+ return Object.assign(agg, newPartial);
+ },
+ {} as Record
+ );
+ accountsSubject.next(accountsSubjectValue);
+ };
+
+ const expectUserToHaveLocked = (userId: string) => {
+ // This does NOT assert all the things that the lock process does
+ expect(stateService.getIsAuthenticated).toHaveBeenCalledWith({ userId: userId });
+ expect(vaultTimeoutSettingsService.availableVaultTimeoutActions$).toHaveBeenCalledWith(userId);
+ expect(stateService.setEverBeenUnlocked).toHaveBeenCalledWith(true, { userId: userId });
+ expect(stateService.setUserKeyAutoUnlock).toHaveBeenCalledWith(null, { userId: userId });
+ expect(cryptoService.clearUserKey).toHaveBeenCalledWith(false, userId);
+ expect(cryptoService.clearMasterKey).toHaveBeenCalledWith(userId);
+ expect(cipherService.clearCache).toHaveBeenCalledWith(userId);
+ expect(lockedCallback).toHaveBeenCalledWith(userId);
+ };
+
+ const expectUserToHaveLoggedOut = (userId: string) => {
+ expect(loggedOutCallback).toHaveBeenCalledWith(false, userId);
+ };
+
+ const expectNoAction = (userId: string) => {
+ expect(lockedCallback).not.toHaveBeenCalledWith(userId);
+ expect(loggedOutCallback).not.toHaveBeenCalledWith(any(), userId);
+ };
+
+ describe("checkVaultTimeout", () => {
+ it.each([AuthenticationStatus.Locked, AuthenticationStatus.LoggedOut])(
+ "should not try to log out or lock any user that has authStatus === %s.",
+ async (authStatus) => {
+ platformUtilsService.isViewOpen.mockResolvedValue(false);
+ setupAccounts({
+ 1: {
+ authStatus: authStatus,
+ isAuthenticated: true,
+ },
+ });
+
+ expectNoAction("1");
+ }
+ );
+
+ it.each([
+ null, // never
+ -1, // onRestart
+ -2, // onLocked
+ -3, // onSleep
+ -4, // onIdle
+ ])(
+ "does not log out or lock a user who has %s as their vault timeout",
+ async (vaultTimeout) => {
+ setupAccounts({
+ 1: {
+ authStatus: AuthenticationStatus.Unlocked,
+ vaultTimeout: vaultTimeout,
+ isAuthenticated: true,
+ },
+ });
+
+ await vaultTimeoutService.checkVaultTimeout();
+
+ expectNoAction("1");
+ }
+ );
+
+ it.each([undefined, null])(
+ "should not log out or lock a user who has %s lastActive value",
+ async (lastActive) => {
+ setupAccounts({
+ 1: {
+ authStatus: AuthenticationStatus.Unlocked,
+ vaultTimeout: 1, // One minute
+ lastActive: lastActive,
+ },
+ });
+
+ await vaultTimeoutService.checkVaultTimeout();
+
+ expectNoAction("1");
+ }
+ );
+
+ it("should lock an account that isn't active and has immediate as their timeout when view is not open", async () => {
+ // Arrange
+ platformUtilsService.isViewOpen.mockResolvedValue(false);
+
+ setupAccounts({
+ 1: {
+ authStatus: AuthenticationStatus.Unlocked,
+ isAuthenticated: true,
+ vaultTimeout: 0, // Immediately
+ lastActive: new Date().getTime() - 10 * 1000, // Last active 10 seconds ago
+ },
+ 2: {
+ authStatus: AuthenticationStatus.Unlocked,
+ isAuthenticated: true,
+ vaultTimeout: 1, // One minute
+ lastActive: new Date().getTime() - 10 * 1000, // Last active 10 seconds ago
+ },
+ });
+
+ // Act
+ await vaultTimeoutService.checkVaultTimeout();
+
+ // Assert
+ expectUserToHaveLocked("1");
+ expectNoAction("2");
+ });
+
+ it("should run action on an account that hasn't been active for greater than 1 minute and has a vault timeout for 1 minutes", async () => {
+ platformUtilsService.isViewOpen.mockResolvedValue(false);
+
+ setupAccounts(
+ {
+ 1: {
+ authStatus: AuthenticationStatus.Unlocked,
+ isAuthenticated: true,
+ vaultTimeout: 1, // One minute
+ lastActive: new Date().getTime() - 10 * 1000,
+ },
+ 2: {
+ authStatus: AuthenticationStatus.Unlocked,
+ isAuthenticated: true,
+ vaultTimeout: 1, // One minute
+ lastActive: new Date().getTime() - 61 * 1000, // Last active 61 seconds ago
+ },
+ 3: {
+ authStatus: AuthenticationStatus.Unlocked,
+ isAuthenticated: true,
+ vaultTimeout: 1, // One minute
+ lastActive: new Date().getTime() - 120 * 1000, // Last active 2 minutes ago
+ timeoutAction: VaultTimeoutAction.LogOut,
+ availableTimeoutActions: [VaultTimeoutAction.Lock, VaultTimeoutAction.LogOut],
+ },
+ 4: {
+ authStatus: AuthenticationStatus.Unlocked,
+ isAuthenticated: true,
+ vaultTimeout: 1, // One minute
+ lastActive: new Date().getTime() - 100 * 1000, // Last active 100 seconds ago
+ timeoutAction: VaultTimeoutAction.Lock,
+ availableTimeoutActions: [VaultTimeoutAction.LogOut],
+ },
+ },
+ "2" // Treat user 2 as the active user
+ );
+
+ await vaultTimeoutService.checkVaultTimeout();
+
+ expectNoAction("1");
+ expectUserToHaveLocked("2");
+
+ // Active users should have additional steps ran
+ expect(searchService.clearIndex).toHaveBeenCalled();
+ expect(folderService.clearCache).toHaveBeenCalled();
+
+ expectUserToHaveLoggedOut("3"); // They have chosen logout as their action and it's available, log them out
+ expectUserToHaveLoggedOut("4"); // They may have had lock as their chosen action but it's not available to them so logout
+ });
+
+ it("should not lock any accounts as long as a view is known to be open, no matter if they haven't been active since before their timeout", async () => {
+ platformUtilsService.isViewOpen.mockResolvedValue(true);
+
+ setupAccounts({
+ 1: {
+ // Neither of these setup values ever get called
+ authStatus: AuthenticationStatus.Unlocked,
+ isAuthenticated: true,
+ lastActive: new Date().getTime() - 80 * 1000, // Last active 80 seconds ago
+ vaultTimeout: 1, // Vault timeout of 1 minute ago
+ },
+ });
+
+ await vaultTimeoutService.checkVaultTimeout();
+
+ expectNoAction("1");
+ });
+ });
+});
diff --git a/libs/common/src/services/vault-timeout/vault-timeout.service.ts b/libs/common/src/services/vault-timeout/vault-timeout.service.ts
index 9e5a78834f7..2ce1416fcde 100644
--- a/libs/common/src/services/vault-timeout/vault-timeout.service.ts
+++ b/libs/common/src/services/vault-timeout/vault-timeout.service.ts
@@ -71,7 +71,7 @@ export class VaultTimeoutService implements VaultTimeoutServiceAbstraction {
}
const availableActions = await firstValueFrom(
- this.vaultTimeoutSettingsService.availableVaultTimeoutActions$()
+ this.vaultTimeoutSettingsService.availableVaultTimeoutActions$(userId)
);
const supportsLock = availableActions.includes(VaultTimeoutAction.Lock);
if (!supportsLock) {
From 7a7fe08a32fe0a39085c447f5fd08e89a6bf03a8 Mon Sep 17 00:00:00 2001
From: Matt Gibson
Date: Wed, 29 Nov 2023 09:59:50 -0500
Subject: [PATCH 12/46] Ps/pm 2910/handle switch messaging (#6823)
* Handle switch messaging
TODO: handle loading state for account switcher
* Async updates required for state
* Fallback to email for current account avatar
* Await un-awaited promises
* Remove unnecessary Prune
Prune was getting confused in browser and deleting memory in browser on
account switch. This method isn't needed since logout already removes
memory data, which is the condition for pruning
* Fix temp password in browser
* Use direct memory access until data is serializable
Safari uses a different message object extraction than firefox/chrome
and is removing `UInt8Array`s. Until all data passed into StorageService
is guaranteed serializable, we need to use direct access in state
service
* Reload badge and context menu on switch
* Gracefully switch account as they log out.
* Maintain location on account switch
* Remove unused state definitions
* Prefer null for state
undefined can be misinterpreted to indicate a value has not been set.
* Hack: structured clone in memory storage
We are currently getting dead objects on account switch due to updating
the object in the foreground state service. However, the storage service
is owned by the background. This structured clone hack ensures that all
objects stored in memory are owned by the appropriate context
* Null check nullable values
active account can be null, so we should include null safety in the
equality
* Correct background->foreground switch command
* Already providing background memory storage
* Handle connection and clipboard on switch account
* Prefer strict equal
* Ensure structuredClone is available to jsdom
This is a deficiency in jsdom --
https://github.com/jsdom/jsdom/issues/3363 -- structured clone is well
supported.
* Fixup types in faker class
---
.../account-switcher.component.ts | 9 +-
.../current-account.component.html | 2 +-
.../current-account.component.ts | 14 +-
.../services/account-switcher.service.ts | 2 +-
.../browser/src/background/main.background.ts | 38 +++-
.../src/background/runtime.background.ts | 3 +
.../background-memory-storage.service.ts | 2 +-
.../foreground-memory-storage.service.ts | 2 +-
...emory-storage-service-interactions.spec.ts | 5 +
apps/browser/src/popup/app-routing.module.ts | 2 +-
apps/browser/src/popup/app.component.ts | 10 +-
.../app/layout/account-switcher.component.ts | 2 +-
libs/common/spec/fake-state-provider.ts | 49 ++++++
libs/common/spec/fake-state.ts | 99 +++++++++++
.../src/auth/abstractions/account.service.ts | 12 +-
.../src/auth/services/account.service.spec.ts | 165 ++++++++----------
.../src/auth/services/account.service.ts | 53 +++---
.../platform/abstractions/state.service.ts | 3 +-
.../services/memory-storage.service.ts | 3 +
.../src/platform/services/state.service.ts | 48 +++--
libs/common/src/platform/state/index.ts | 3 +-
.../src/platform/state/key-definitions.ts | 18 --
.../src/platform/state/state-definitions.ts | 3 +
23 files changed, 365 insertions(+), 182 deletions(-)
create mode 100644 libs/common/spec/fake-state-provider.ts
create mode 100644 libs/common/spec/fake-state.ts
delete mode 100644 libs/common/src/platform/state/key-definitions.ts
create mode 100644 libs/common/src/platform/state/state-definitions.ts
diff --git a/apps/browser/src/auth/popup/account-switching/account-switcher.component.ts b/apps/browser/src/auth/popup/account-switching/account-switcher.component.ts
index 8d4777c30d8..ec035d2a3c1 100644
--- a/apps/browser/src/auth/popup/account-switching/account-switcher.component.ts
+++ b/apps/browser/src/auth/popup/account-switching/account-switcher.component.ts
@@ -1,13 +1,18 @@
import { Component } from "@angular/core";
import { Router } from "@angular/router";
+import { BrowserRouterService } from "../../../platform/popup/services/browser-router.service";
import { AccountSwitcherService } from "../services/account-switcher.service";
@Component({
templateUrl: "account-switcher.component.html",
})
export class AccountSwitcherComponent {
- constructor(private accountSwitcherService: AccountSwitcherService, private router: Router) {}
+ constructor(
+ private accountSwitcherService: AccountSwitcherService,
+ private router: Router,
+ private routerService: BrowserRouterService
+ ) {}
get accountOptions$() {
return this.accountSwitcherService.accountOptions$;
@@ -15,6 +20,6 @@ export class AccountSwitcherComponent {
async selectAccount(id: string) {
await this.accountSwitcherService.selectAccount(id);
- this.router.navigate(["/home"]);
+ this.router.navigate([this.routerService.getPreviousUrl() ?? "/home"]);
}
}
diff --git a/apps/browser/src/auth/popup/account-switching/current-account.component.html b/apps/browser/src/auth/popup/account-switching/current-account.component.html
index bb482347e72..189ea4c736f 100644
--- a/apps/browser/src/auth/popup/account-switching/current-account.component.html
+++ b/apps/browser/src/auth/popup/account-switching/current-account.component.html
@@ -1,5 +1,5 @@
diff --git a/apps/browser/src/auth/popup/account-switching/current-account.component.ts b/apps/browser/src/auth/popup/account-switching/current-account.component.ts
index cf50ab2798d..902c80c79e6 100644
--- a/apps/browser/src/auth/popup/account-switching/current-account.component.ts
+++ b/apps/browser/src/auth/popup/account-switching/current-account.component.ts
@@ -1,7 +1,9 @@
import { Component } from "@angular/core";
import { Router } from "@angular/router";
+import { map } from "rxjs";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
+import { Utils } from "@bitwarden/common/platform/misc/utils";
@Component({
selector: "app-current-account",
@@ -14,7 +16,15 @@ export class CurrentAccountComponent {
return this.accountService.activeAccount$;
}
- currentAccountClicked() {
- this.router.navigate(["/account-switcher"]);
+ get currentAccountName$() {
+ return this.currentAccount$.pipe(
+ map((a) => {
+ return Utils.isNullOrWhitespace(a.name) ? a.email : a.name;
+ })
+ );
+ }
+
+ async currentAccountClicked() {
+ await this.router.navigate(["/account-switcher"]);
}
}
diff --git a/apps/browser/src/auth/popup/services/account-switcher.service.ts b/apps/browser/src/auth/popup/services/account-switcher.service.ts
index 6614ccec1d5..f5a3cbed7a4 100644
--- a/apps/browser/src/auth/popup/services/account-switcher.service.ts
+++ b/apps/browser/src/auth/popup/services/account-switcher.service.ts
@@ -54,7 +54,7 @@ export class AccountSwitcherService {
return;
}
- this.accountService.switchAccount(id as UserId);
+ await this.accountService.switchAccount(id as UserId);
this.messagingService.send("switchAccount", { userId: id });
}
}
diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts
index bb61bb64658..faf399aa34f 100644
--- a/apps/browser/src/background/main.background.ts
+++ b/apps/browser/src/background/main.background.ts
@@ -24,6 +24,8 @@ import { TokenService as TokenServiceAbstraction } from "@bitwarden/common/auth/
import { TwoFactorService as TwoFactorServiceAbstraction } from "@bitwarden/common/auth/abstractions/two-factor.service";
import { UserVerificationApiServiceAbstraction } from "@bitwarden/common/auth/abstractions/user-verification/user-verification-api.service.abstraction";
import { UserVerificationService as UserVerificationServiceAbstraction } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction";
+import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status";
+import { ForceSetPasswordReason } from "@bitwarden/common/auth/models/domain/force-set-password-reason";
import { AccountServiceImplementation } from "@bitwarden/common/auth/services/account.service";
import { AuthRequestCryptoServiceImplementation } from "@bitwarden/common/auth/services/auth-request-crypto.service.implementation";
import { AuthService } from "@bitwarden/common/auth/services/auth.service";
@@ -87,6 +89,7 @@ import {
import { SendApiService } from "@bitwarden/common/tools/send/services/send-api.service";
import { SendApiService as SendApiServiceAbstraction } from "@bitwarden/common/tools/send/services/send-api.service.abstraction";
import { InternalSendService as InternalSendServiceAbstraction } from "@bitwarden/common/tools/send/services/send.service.abstraction";
+import { UserId } from "@bitwarden/common/types/guid";
import { CipherService as CipherServiceAbstraction } from "@bitwarden/common/vault/abstractions/cipher.service";
import { CollectionService as CollectionServiceAbstraction } from "@bitwarden/common/vault/abstractions/collection.service";
import { Fido2AuthenticatorService as Fido2AuthenticatorServiceAbstraction } from "@bitwarden/common/vault/abstractions/fido2/fido2-authenticator.service.abstraction";
@@ -829,6 +832,32 @@ export default class MainBackground {
}
}
+ async switchAccount(userId: UserId) {
+ if (userId != null) {
+ await this.stateService.setActiveUser(userId);
+ }
+
+ const status = await this.authService.getAuthStatus(userId);
+ const forcePasswordReset =
+ (await this.stateService.getForceSetPasswordReason({ userId: userId })) !=
+ ForceSetPasswordReason.None;
+
+ await this.systemService.clearPendingClipboard();
+ await this.notificationsService.updateConnection(false);
+
+ if (status === AuthenticationStatus.Locked) {
+ this.messagingService.send("locked", { userId: userId });
+ } else if (forcePasswordReset) {
+ this.messagingService.send("update-temp-password", { userId: userId });
+ } else {
+ this.messagingService.send("unlocked", { userId: userId });
+ await this.refreshBadge();
+ await this.refreshMenu();
+ await this.syncService.fullSync(false);
+ this.messagingService.send("switchAccountFinish", { userId: userId });
+ }
+ }
+
async logout(expired: boolean, userId?: string) {
await this.eventUploadService.uploadEvents(userId);
@@ -849,7 +878,14 @@ export default class MainBackground {
//Needs to be checked before state is cleaned
const needStorageReseed = await this.needsStorageReseed();
- await this.stateService.clean({ userId: userId });
+ const newActiveUser = await this.stateService.clean({ userId: userId });
+
+ if (newActiveUser != null) {
+ // we have a new active user, do not continue tearing down application
+ this.switchAccount(newActiveUser as UserId);
+ this.messagingService.send("switchAccountFinish");
+ return;
+ }
if (userId == null || userId === (await this.stateService.getUserId())) {
this.searchService.clearIndex();
diff --git a/apps/browser/src/background/runtime.background.ts b/apps/browser/src/background/runtime.background.ts
index a5c101fa969..cc932a4d923 100644
--- a/apps/browser/src/background/runtime.background.ts
+++ b/apps/browser/src/background/runtime.background.ts
@@ -294,6 +294,9 @@ export default class RuntimeBackground {
}
}
);
+ case "switchAccount": {
+ await this.main.switchAccount(msg.userId);
+ }
}
}
diff --git a/apps/browser/src/platform/storage/background-memory-storage.service.ts b/apps/browser/src/platform/storage/background-memory-storage.service.ts
index 14dadf225ee..9fb8cb71627 100644
--- a/apps/browser/src/platform/storage/background-memory-storage.service.ts
+++ b/apps/browser/src/platform/storage/background-memory-storage.service.ts
@@ -53,7 +53,7 @@ export class BackgroundMemoryStorageService extends MemoryStorageService {
break;
}
case "save":
- await this.save(message.key, JSON.parse(message.data as string) as unknown);
+ await this.save(message.key, JSON.parse((message.data as string) ?? null) as unknown);
break;
case "remove":
await this.remove(message.key);
diff --git a/apps/browser/src/platform/storage/foreground-memory-storage.service.ts b/apps/browser/src/platform/storage/foreground-memory-storage.service.ts
index ea36c322082..25c59798877 100644
--- a/apps/browser/src/platform/storage/foreground-memory-storage.service.ts
+++ b/apps/browser/src/platform/storage/foreground-memory-storage.service.ts
@@ -78,7 +78,7 @@ export class ForegroundMemoryStorageService extends AbstractMemoryStorageService
const response = firstValueFrom(
this._backgroundResponses$.pipe(
filter((message) => message.id === id),
- map((message) => JSON.parse(message.data as string) as T)
+ map((message) => JSON.parse((message.data as string) ?? null) as T)
)
);
diff --git a/apps/browser/src/platform/storage/memory-storage-service-interactions.spec.ts b/apps/browser/src/platform/storage/memory-storage-service-interactions.spec.ts
index a09d733c6d3..f9d59b8962a 100644
--- a/apps/browser/src/platform/storage/memory-storage-service-interactions.spec.ts
+++ b/apps/browser/src/platform/storage/memory-storage-service-interactions.spec.ts
@@ -1,3 +1,8 @@
+/**
+ * need to update test environment so structuredClone works appropriately
+ * @jest-environment ../../libs/shared/test.environment.ts
+ */
+
import { trackEmissions } from "@bitwarden/common/../spec/utils";
import { BackgroundMemoryStorageService } from "./background-memory-storage.service";
diff --git a/apps/browser/src/popup/app-routing.module.ts b/apps/browser/src/popup/app-routing.module.ts
index 33ac4558eca..68a7a6316da 100644
--- a/apps/browser/src/popup/app-routing.module.ts
+++ b/apps/browser/src/popup/app-routing.module.ts
@@ -366,7 +366,7 @@ const routes: Routes = [
{
path: "account-switcher",
component: AccountSwitcherComponent,
- data: { state: "account-switcher" },
+ data: { state: "account-switcher", doNotSaveUrl: true },
},
];
diff --git a/apps/browser/src/popup/app.component.ts b/apps/browser/src/popup/app.component.ts
index 9d91bef0ba3..0a402f7c370 100644
--- a/apps/browser/src/popup/app.component.ts
+++ b/apps/browser/src/popup/app.component.ts
@@ -100,7 +100,10 @@ export class AppComponent implements OnInit, OnDestroy {
this.changeDetectorRef.detectChanges();
} else if (msg.command === "authBlocked") {
this.router.navigate(["home"]);
- } else if (msg.command === "locked" && msg.userId == null) {
+ } else if (
+ msg.command === "locked" &&
+ (msg.userId === null || msg.userId == this.activeUserId)
+ ) {
this.router.navigate(["lock"]);
} else if (msg.command === "showDialog") {
this.showDialog(msg);
@@ -123,6 +126,11 @@ export class AppComponent implements OnInit, OnDestroy {
this.router.navigate(["/"]);
} else if (msg.command === "convertAccountToKeyConnector") {
this.router.navigate(["/remove-password"]);
+ } else if (msg.command === "switchAccountFinish") {
+ // TODO: unset loading?
+ // this.loading = false;
+ } else if (msg.command == "update-temp-password") {
+ this.router.navigate(["/update-temp-password"]);
} else {
msg.webExtSender = sender;
this.broadcasterService.send(msg);
diff --git a/apps/desktop/src/app/layout/account-switcher.component.ts b/apps/desktop/src/app/layout/account-switcher.component.ts
index b603fde14e7..ec81b86e90c 100644
--- a/apps/desktop/src/app/layout/account-switcher.component.ts
+++ b/apps/desktop/src/app/layout/account-switcher.component.ts
@@ -136,7 +136,7 @@ export class AccountSwitcherComponent implements OnInit, OnDestroy {
this.close();
await this.stateService.setActiveUser(null);
await this.stateService.setRememberedEmail(null);
- this.router.navigate(["/login"]);
+ await this.router.navigate(["/login"]);
}
private async createInactiveAccounts(baseAccounts: {
diff --git a/libs/common/spec/fake-state-provider.ts b/libs/common/spec/fake-state-provider.ts
new file mode 100644
index 00000000000..821210d1917
--- /dev/null
+++ b/libs/common/spec/fake-state-provider.ts
@@ -0,0 +1,49 @@
+import {
+ GlobalState,
+ GlobalStateProvider,
+ KeyDefinition,
+ UserState,
+ UserStateProvider,
+} from "../src/platform/state";
+
+import { FakeGlobalState, FakeUserState } from "./fake-state";
+
+export class FakeGlobalStateProvider implements GlobalStateProvider {
+ states: Map, GlobalState> = new Map();
+ get(keyDefinition: KeyDefinition): GlobalState {
+ let result = this.states.get(keyDefinition) as GlobalState;
+
+ if (result == null) {
+ result = new FakeGlobalState();
+ this.states.set(keyDefinition, result);
+ }
+ return result;
+ }
+
+ getFake(keyDefinition: KeyDefinition): FakeGlobalState {
+ const key = Array.from(this.states.keys()).find(
+ (k) => k.stateDefinition === keyDefinition.stateDefinition && k.key === keyDefinition.key
+ );
+ return this.get(key) as FakeGlobalState;
+ }
+}
+
+export class FakeUserStateProvider implements UserStateProvider {
+ states: Map, UserState> = new Map();
+ get(keyDefinition: KeyDefinition): UserState {
+ let result = this.states.get(keyDefinition) as UserState;
+
+ if (result == null) {
+ result = new FakeUserState();
+ this.states.set(keyDefinition, result);
+ }
+ return result;
+ }
+
+ getFake(keyDefinition: KeyDefinition): FakeUserState {
+ const key = Array.from(this.states.keys()).find(
+ (k) => k.stateDefinition === keyDefinition.stateDefinition && k.key === keyDefinition.key
+ );
+ return this.get(key) as FakeUserState;
+ }
+}
diff --git a/libs/common/spec/fake-state.ts b/libs/common/spec/fake-state.ts
new file mode 100644
index 00000000000..24a16721444
--- /dev/null
+++ b/libs/common/spec/fake-state.ts
@@ -0,0 +1,99 @@
+import { ReplaySubject, firstValueFrom, timeout } from "rxjs";
+
+import { DerivedUserState, GlobalState, UserState } from "../src/platform/state";
+// eslint-disable-next-line import/no-restricted-paths -- using unexposed options for clean typing in test class
+import { StateUpdateOptions } from "../src/platform/state/state-update-options";
+import { UserId } from "../src/types/guid";
+
+const DEFAULT_TEST_OPTIONS: StateUpdateOptions = {
+ shouldUpdate: () => true,
+ combineLatestWith: null,
+ msTimeout: 10,
+};
+
+function populateOptionsWithDefault(
+ options: StateUpdateOptions
+): StateUpdateOptions {
+ return {
+ ...DEFAULT_TEST_OPTIONS,
+ ...options,
+ };
+}
+
+export class FakeGlobalState implements GlobalState {
+ // eslint-disable-next-line rxjs/no-exposed-subjects -- exposed for testing setup
+ stateSubject = new ReplaySubject(1);
+
+ update: (
+ configureState: (state: T, dependency: TCombine) => T,
+ options?: StateUpdateOptions
+ ) => Promise = jest.fn(async (configureState, options) => {
+ options = populateOptionsWithDefault(options);
+ if (this.stateSubject["_buffer"].length == 0) {
+ // throw a more helpful not initialized error
+ throw new Error(
+ "You must initialize the state with a value before calling update. Try calling `stateSubject.next(initialState)` before calling update"
+ );
+ }
+ const current = await firstValueFrom(this.state$.pipe(timeout(100)));
+ const combinedDependencies =
+ options.combineLatestWith != null
+ ? await firstValueFrom(options.combineLatestWith.pipe(timeout(options.msTimeout)))
+ : null;
+ if (!options.shouldUpdate(current, combinedDependencies)) {
+ return;
+ }
+ const newState = configureState(current, combinedDependencies);
+ this.stateSubject.next(newState);
+ return newState;
+ });
+
+ updateMock = this.update as jest.MockedFunction;
+
+ get state$() {
+ return this.stateSubject.asObservable();
+ }
+}
+
+export class FakeUserState implements UserState {
+ // eslint-disable-next-line rxjs/no-exposed-subjects -- exposed for testing setup
+ stateSubject = new ReplaySubject(1);
+
+ update: (
+ configureState: (state: T, dependency: TCombine) => T,
+ options?: StateUpdateOptions
+ ) => Promise = jest.fn(async (configureState, options) => {
+ options = populateOptionsWithDefault(options);
+ const current = await firstValueFrom(this.state$.pipe(timeout(options.msTimeout)));
+ const combinedDependencies =
+ options.combineLatestWith != null
+ ? await firstValueFrom(options.combineLatestWith.pipe(timeout(options.msTimeout)))
+ : null;
+ if (!options.shouldUpdate(current, combinedDependencies)) {
+ return;
+ }
+ const newState = configureState(current, combinedDependencies);
+ this.stateSubject.next(newState);
+ return newState;
+ });
+
+ updateMock = this.update as jest.MockedFunction;
+
+ updateFor: (
+ userId: UserId,
+ configureState: (state: T, dependency: TCombine) => T,
+ options?: StateUpdateOptions
+ ) => Promise = jest.fn();
+
+ createDerived: (
+ converter: (data: T, context: any) => Promise
+ ) => DerivedUserState = jest.fn();
+
+ getFromState: () => Promise = jest.fn(async () => {
+ return await firstValueFrom(this.state$.pipe(timeout(10)));
+ });
+
+ get state$() {
+ return this.stateSubject.asObservable();
+ }
+}
diff --git a/libs/common/src/auth/abstractions/account.service.ts b/libs/common/src/auth/abstractions/account.service.ts
index 2fdbfb7830f..ca9e82335f0 100644
--- a/libs/common/src/auth/abstractions/account.service.ts
+++ b/libs/common/src/auth/abstractions/account.service.ts
@@ -14,7 +14,7 @@ export type AccountInfo = {
};
export function accountInfoEqual(a: AccountInfo, b: AccountInfo) {
- return a.status == b.status && a.email == b.email && a.name == b.name;
+ return a?.status === b?.status && a?.email === b?.email && a?.name === b?.name;
}
export abstract class AccountService {
@@ -27,31 +27,31 @@ export abstract class AccountService {
* @param userId
* @param accountData
*/
- abstract addAccount(userId: UserId, accountData: AccountInfo): void;
+ abstract addAccount(userId: UserId, accountData: AccountInfo): Promise;
/**
* updates the `accounts$` observable with the new preferred name for the account.
* @param userId
* @param name
*/
- abstract setAccountName(userId: UserId, name: string): void;
+ abstract setAccountName(userId: UserId, name: string): Promise;
/**
* updates the `accounts$` observable with the new email for the account.
* @param userId
* @param email
*/
- abstract setAccountEmail(userId: UserId, email: string): void;
+ abstract setAccountEmail(userId: UserId, email: string): Promise;
/**
* Updates the `accounts$` observable with the new account status.
* Also emits the `accountLock$` or `accountLogout$` observable if the status is `Locked` or `LoggedOut` respectively.
* @param userId
* @param status
*/
- abstract setAccountStatus(userId: UserId, status: AuthenticationStatus): void;
+ abstract setAccountStatus(userId: UserId, status: AuthenticationStatus): Promise;
/**
* Updates the `activeAccount$` observable with the new active account.
* @param userId
*/
- abstract switchAccount(userId: UserId): void;
+ abstract switchAccount(userId: UserId): Promise;
}
export abstract class InternalAccountService extends AccountService {
diff --git a/libs/common/src/auth/services/account.service.spec.ts b/libs/common/src/auth/services/account.service.spec.ts
index d6aabef4eed..0f611f83457 100644
--- a/libs/common/src/auth/services/account.service.spec.ts
+++ b/libs/common/src/auth/services/account.service.spec.ts
@@ -1,30 +1,28 @@
import { MockProxy, mock } from "jest-mock-extended";
-import { BehaviorSubject, firstValueFrom } from "rxjs";
+import { firstValueFrom } from "rxjs";
+import { FakeGlobalState } from "../../../spec/fake-state";
+import { FakeGlobalStateProvider } from "../../../spec/fake-state-provider";
import { trackEmissions } from "../../../spec/utils";
import { LogService } from "../../platform/abstractions/log.service";
import { MessagingService } from "../../platform/abstractions/messaging.service";
-import {
- ACCOUNT_ACCOUNTS,
- ACCOUNT_ACTIVE_ACCOUNT_ID,
- GlobalState,
- GlobalStateProvider,
-} from "../../platform/state";
import { UserId } from "../../types/guid";
import { AccountInfo } from "../abstractions/account.service";
import { AuthenticationStatus } from "../enums/authentication-status";
-import { AccountServiceImplementation } from "./account.service";
+import {
+ ACCOUNT_ACCOUNTS,
+ ACCOUNT_ACTIVE_ACCOUNT_ID,
+ AccountServiceImplementation,
+} from "./account.service";
describe("accountService", () => {
let messagingService: MockProxy;
let logService: MockProxy;
- let globalStateProvider: MockProxy;
- let accountsState: MockProxy>>;
- let accountsSubject: BehaviorSubject>;
- let activeAccountIdState: MockProxy>;
- let activeAccountIdSubject: BehaviorSubject;
+ let globalStateProvider: FakeGlobalStateProvider;
let sut: AccountServiceImplementation;
+ let accountsState: FakeGlobalState>;
+ let activeAccountIdState: FakeGlobalState;
const userId = "userId" as UserId;
function userInfo(status: AuthenticationStatus): AccountInfo {
return { status, email: "email", name: "name" };
@@ -33,27 +31,14 @@ describe("accountService", () => {
beforeEach(() => {
messagingService = mock();
logService = mock();
- globalStateProvider = mock();
- accountsState = mock();
- activeAccountIdState = mock();
-
- accountsSubject = new BehaviorSubject>(null);
- accountsState.state$ = accountsSubject.asObservable();
- activeAccountIdSubject = new BehaviorSubject(null);
- activeAccountIdState.state$ = activeAccountIdSubject.asObservable();
-
- globalStateProvider.get.mockImplementation((keyDefinition) => {
- switch (keyDefinition) {
- case ACCOUNT_ACCOUNTS:
- return accountsState;
- case ACCOUNT_ACTIVE_ACCOUNT_ID:
- return activeAccountIdState;
- default:
- throw new Error("Unknown key definition");
- }
- });
+ globalStateProvider = new FakeGlobalStateProvider();
sut = new AccountServiceImplementation(messagingService, logService, globalStateProvider);
+
+ accountsState = globalStateProvider.getFake(ACCOUNT_ACCOUNTS);
+ // initialize to empty
+ accountsState.stateSubject.next({});
+ activeAccountIdState = globalStateProvider.getFake(ACCOUNT_ACTIVE_ACCOUNT_ID);
});
afterEach(() => {
@@ -69,20 +54,17 @@ describe("accountService", () => {
it("should emit the active account and status", async () => {
const emissions = trackEmissions(sut.activeAccount$);
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
- activeAccountIdSubject.next(userId);
+ accountsState.stateSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ activeAccountIdState.stateSubject.next(userId);
- expect(emissions).toEqual([
- undefined, // initial value
- { id: userId, ...userInfo(AuthenticationStatus.Unlocked) },
- ]);
+ expect(emissions).toEqual([{ id: userId, ...userInfo(AuthenticationStatus.Unlocked) }]);
});
it("should update the status if the account status changes", async () => {
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
- activeAccountIdSubject.next(userId);
+ accountsState.stateSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ activeAccountIdState.stateSubject.next(userId);
const emissions = trackEmissions(sut.activeAccount$);
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Locked) });
+ accountsState.stateSubject.next({ [userId]: userInfo(AuthenticationStatus.Locked) });
expect(emissions).toEqual([
{ id: userId, ...userInfo(AuthenticationStatus.Unlocked) },
@@ -91,8 +73,8 @@ describe("accountService", () => {
});
it("should remember the last emitted value", async () => {
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
- activeAccountIdSubject.next(userId);
+ accountsState.stateSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ activeAccountIdState.stateSubject.next(userId);
expect(await firstValueFrom(sut.activeAccount$)).toEqual({
id: userId,
@@ -103,83 +85,80 @@ describe("accountService", () => {
describe("accounts$", () => {
it("should maintain an accounts cache", async () => {
- expect(await firstValueFrom(sut.accounts$)).toEqual({});
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ accountsState.stateSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ accountsState.stateSubject.next({ [userId]: userInfo(AuthenticationStatus.Locked) });
expect(await firstValueFrom(sut.accounts$)).toEqual({
- [userId]: userInfo(AuthenticationStatus.Unlocked),
+ [userId]: userInfo(AuthenticationStatus.Locked),
});
});
});
describe("addAccount", () => {
- it("should emit the new account", () => {
- sut.addAccount(userId, userInfo(AuthenticationStatus.Unlocked));
+ it("should emit the new account", async () => {
+ await sut.addAccount(userId, userInfo(AuthenticationStatus.Unlocked));
+ const currentValue = await firstValueFrom(sut.accounts$);
- expect(accountsState.update).toHaveBeenCalledTimes(1);
- const callback = accountsState.update.mock.calls[0][0];
- expect(callback({}, null)).toEqual({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ expect(currentValue).toEqual({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
});
});
describe("setAccountName", () => {
+ const initialState = { [userId]: userInfo(AuthenticationStatus.Unlocked) };
beforeEach(() => {
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ accountsState.stateSubject.next(initialState);
});
it("should update the account", async () => {
- sut.setAccountName(userId, "new name");
+ await sut.setAccountName(userId, "new name");
+ const currentState = await firstValueFrom(accountsState.state$);
- const callback = accountsState.update.mock.calls[0][0];
-
- expect(callback(accountsSubject.value, null)).toEqual({
+ expect(currentState).toEqual({
[userId]: { ...userInfo(AuthenticationStatus.Unlocked), name: "new name" },
});
});
it("should not update if the name is the same", async () => {
- sut.setAccountName(userId, "name");
+ await sut.setAccountName(userId, "name");
+ const currentState = await firstValueFrom(accountsState.state$);
- const callback = accountsState.update.mock.calls[0][1].shouldUpdate;
-
- expect(callback(accountsSubject.value, null)).toBe(false);
+ expect(currentState).toEqual(initialState);
});
});
describe("setAccountEmail", () => {
+ const initialState = { [userId]: userInfo(AuthenticationStatus.Unlocked) };
beforeEach(() => {
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ accountsState.stateSubject.next(initialState);
});
- it("should update the account", () => {
- sut.setAccountEmail(userId, "new email");
+ it("should update the account", async () => {
+ await sut.setAccountEmail(userId, "new email");
+ const currentState = await firstValueFrom(accountsState.state$);
- const callback = accountsState.update.mock.calls[0][0];
-
- expect(callback(accountsSubject.value, null)).toEqual({
+ expect(currentState).toEqual({
[userId]: { ...userInfo(AuthenticationStatus.Unlocked), email: "new email" },
});
});
- it("should not update if the email is the same", () => {
- sut.setAccountEmail(userId, "email");
+ it("should not update if the email is the same", async () => {
+ await sut.setAccountEmail(userId, "email");
+ const currentState = await firstValueFrom(accountsState.state$);
- const callback = accountsState.update.mock.calls[0][1].shouldUpdate;
-
- expect(callback(accountsSubject.value, null)).toBe(false);
+ expect(currentState).toEqual(initialState);
});
});
describe("setAccountStatus", () => {
+ const initialState = { [userId]: userInfo(AuthenticationStatus.Unlocked) };
beforeEach(() => {
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ accountsState.stateSubject.next(initialState);
});
- it("should update the account", () => {
- sut.setAccountStatus(userId, AuthenticationStatus.Locked);
+ it("should update the account", async () => {
+ await sut.setAccountStatus(userId, AuthenticationStatus.Locked);
+ const currentState = await firstValueFrom(accountsState.state$);
- const callback = accountsState.update.mock.calls[0][0];
-
- expect(callback(accountsSubject.value, null)).toEqual({
+ expect(currentState).toEqual({
[userId]: {
...userInfo(AuthenticationStatus.Unlocked),
status: AuthenticationStatus.Locked,
@@ -187,24 +166,23 @@ describe("accountService", () => {
});
});
- it("should not update if the status is the same", () => {
- sut.setAccountStatus(userId, AuthenticationStatus.Unlocked);
+ it("should not update if the status is the same", async () => {
+ await sut.setAccountStatus(userId, AuthenticationStatus.Unlocked);
+ const currentState = await firstValueFrom(accountsState.state$);
- const callback = accountsState.update.mock.calls[0][1].shouldUpdate;
-
- expect(callback(accountsSubject.value, null)).toBe(false);
+ expect(currentState).toEqual(initialState);
});
- it("should emit logout if the status is logged out", () => {
+ it("should emit logout if the status is logged out", async () => {
const emissions = trackEmissions(sut.accountLogout$);
- sut.setAccountStatus(userId, AuthenticationStatus.LoggedOut);
+ await sut.setAccountStatus(userId, AuthenticationStatus.LoggedOut);
expect(emissions).toEqual([userId]);
});
- it("should emit lock if the status is locked", () => {
+ it("should emit lock if the status is locked", async () => {
const emissions = trackEmissions(sut.accountLock$);
- sut.setAccountStatus(userId, AuthenticationStatus.Locked);
+ await sut.setAccountStatus(userId, AuthenticationStatus.Locked);
expect(emissions).toEqual([userId]);
});
@@ -212,19 +190,18 @@ describe("accountService", () => {
describe("switchAccount", () => {
beforeEach(() => {
- accountsSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ accountsState.stateSubject.next({ [userId]: userInfo(AuthenticationStatus.Unlocked) });
+ activeAccountIdState.stateSubject.next(userId);
});
- it("should emit undefined if no account is provided", () => {
- sut.switchAccount(null);
- const callback = activeAccountIdState.update.mock.calls[0][0];
- expect(callback(userId, accountsSubject.value)).toBeUndefined();
+ it("should emit undefined if no account is provided", async () => {
+ await sut.switchAccount(null);
+ const currentState = await firstValueFrom(sut.activeAccount$);
+ expect(currentState).toBeUndefined();
});
it("should throw if the account does not exist", () => {
- sut.switchAccount("unknown" as UserId);
- const callback = activeAccountIdState.update.mock.calls[0][0];
- expect(() => callback(userId, accountsSubject.value)).toThrowError("Account does not exist");
+ expect(sut.switchAccount("unknown" as UserId)).rejects.toThrowError("Account does not exist");
});
});
});
diff --git a/libs/common/src/auth/services/account.service.ts b/libs/common/src/auth/services/account.service.ts
index 5164d9cf22a..1ea9ca7bd4a 100644
--- a/libs/common/src/auth/services/account.service.ts
+++ b/libs/common/src/auth/services/account.service.ts
@@ -1,5 +1,4 @@
import { Subject, combineLatestWith, map, distinctUntilChanged, shareReplay } from "rxjs";
-import { Jsonify } from "type-fest";
import {
AccountInfo,
@@ -9,23 +8,25 @@ import {
import { LogService } from "../../platform/abstractions/log.service";
import { MessagingService } from "../../platform/abstractions/messaging.service";
import {
- ACCOUNT_ACCOUNTS,
- ACCOUNT_ACTIVE_ACCOUNT_ID,
+ ACCOUNT_MEMORY,
GlobalState,
GlobalStateProvider,
+ KeyDefinition,
} from "../../platform/state";
import { UserId } from "../../types/guid";
import { AuthenticationStatus } from "../enums/authentication-status";
-export function AccountsDeserializer(
- accounts: Jsonify | null>
-): Record {
- if (accounts == null) {
- return {};
+export const ACCOUNT_ACCOUNTS = KeyDefinition.record(
+ ACCOUNT_MEMORY,
+ "accounts",
+ {
+ deserializer: (accountInfo) => accountInfo,
}
+);
- return accounts;
-}
+export const ACCOUNT_ACTIVE_ACCOUNT_ID = new KeyDefinition(ACCOUNT_MEMORY, "activeAccountId", {
+ deserializer: (id: UserId) => id,
+});
export class AccountServiceImplementation implements InternalAccountService {
private lock = new Subject();
@@ -52,29 +53,29 @@ export class AccountServiceImplementation implements InternalAccountService {
this.activeAccount$ = this.activeAccountIdState.state$.pipe(
combineLatestWith(this.accounts$),
map(([id, accounts]) => (id ? { id, ...accounts[id] } : undefined)),
- distinctUntilChanged(),
+ distinctUntilChanged((a, b) => a?.id === b?.id && accountInfoEqual(a, b)),
shareReplay({ bufferSize: 1, refCount: false })
);
}
- addAccount(userId: UserId, accountData: AccountInfo): void {
- this.accountsState.update((accounts) => {
+ async addAccount(userId: UserId, accountData: AccountInfo): Promise {
+ await this.accountsState.update((accounts) => {
accounts ||= {};
accounts[userId] = accountData;
return accounts;
});
}
- setAccountName(userId: UserId, name: string): void {
- this.setAccountInfo(userId, { name });
+ async setAccountName(userId: UserId, name: string): Promise {
+ await this.setAccountInfo(userId, { name });
}
- setAccountEmail(userId: UserId, email: string): void {
- this.setAccountInfo(userId, { email });
+ async setAccountEmail(userId: UserId, email: string): Promise {
+ await this.setAccountInfo(userId, { email });
}
- setAccountStatus(userId: UserId, status: AuthenticationStatus): void {
- this.setAccountInfo(userId, { status });
+ async setAccountStatus(userId: UserId, status: AuthenticationStatus): Promise {
+ await this.setAccountInfo(userId, { status });
if (status === AuthenticationStatus.LoggedOut) {
this.logout.next(userId);
@@ -83,12 +84,12 @@ export class AccountServiceImplementation implements InternalAccountService {
}
}
- switchAccount(userId: UserId) {
- this.activeAccountIdState.update(
+ async switchAccount(userId: UserId): Promise {
+ await this.activeAccountIdState.update(
(_, accounts) => {
if (userId == null) {
// indicates no account is active
- return undefined;
+ return null;
}
if (accounts?.[userId] == null) {
@@ -98,6 +99,10 @@ export class AccountServiceImplementation implements InternalAccountService {
},
{
combineLatestWith: this.accounts$,
+ shouldUpdate: (id) => {
+ // update only if userId changes
+ return id !== userId;
+ },
}
);
}
@@ -112,11 +117,11 @@ export class AccountServiceImplementation implements InternalAccountService {
}
}
- private setAccountInfo(userId: UserId, update: Partial) {
+ private async setAccountInfo(userId: UserId, update: Partial): Promise {
function newAccountInfo(oldAccountInfo: AccountInfo): AccountInfo {
return { ...oldAccountInfo, ...update };
}
- this.accountsState.update(
+ await this.accountsState.update(
(accounts) => {
accounts[userId] = newAccountInfo(accounts[userId]);
return accounts;
diff --git a/libs/common/src/platform/abstractions/state.service.ts b/libs/common/src/platform/abstractions/state.service.ts
index 61e361ad6de..872daea7d83 100644
--- a/libs/common/src/platform/abstractions/state.service.ts
+++ b/libs/common/src/platform/abstractions/state.service.ts
@@ -17,6 +17,7 @@ import { GeneratedPasswordHistory, PasswordGeneratorOptions } from "../../tools/
import { UsernameGeneratorOptions } from "../../tools/generator/username";
import { SendData } from "../../tools/send/models/data/send.data";
import { SendView } from "../../tools/send/models/view/send.view";
+import { UserId } from "../../types/guid";
import { UriMatchType } from "../../vault/enums";
import { CipherData } from "../../vault/models/data/cipher.data";
import { CollectionData } from "../../vault/models/data/collection.data";
@@ -48,7 +49,7 @@ export abstract class StateService {
addAccount: (account: T) => Promise;
setActiveUser: (userId: string) => Promise;
- clean: (options?: StorageOptions) => Promise;
+ clean: (options?: StorageOptions) => Promise;
init: () => Promise;
getAccessToken: (options?: StorageOptions) => Promise;
diff --git a/libs/common/src/platform/services/memory-storage.service.ts b/libs/common/src/platform/services/memory-storage.service.ts
index 233cb6e7cb3..7a6b9971eca 100644
--- a/libs/common/src/platform/services/memory-storage.service.ts
+++ b/libs/common/src/platform/services/memory-storage.service.ts
@@ -29,6 +29,9 @@ export class MemoryStorageService extends AbstractMemoryStorageService {
if (obj == null) {
return this.remove(key);
}
+ // TODO: Remove once foreground/background contexts are separated in browser
+ // Needed to ensure ownership of all memory by the context running the storage service
+ obj = structuredClone(obj);
this.store.set(key, obj);
this.updatesSubject.next({ key, updateType: "save" });
return Promise.resolve();
diff --git a/libs/common/src/platform/services/state.service.ts b/libs/common/src/platform/services/state.service.ts
index 7baaabec5f4..caea67f84e0 100644
--- a/libs/common/src/platform/services/state.service.ts
+++ b/libs/common/src/platform/services/state.service.ts
@@ -173,13 +173,13 @@ export class StateService<
// if it's not in the accounts list.
if (state.activeUserId != null && this.accountsSubject.value[state.activeUserId] == null) {
const activeDiskAccount = await this.getAccountFromDisk({ userId: state.activeUserId });
- this.accountService.addAccount(state.activeUserId as UserId, {
+ await this.accountService.addAccount(state.activeUserId as UserId, {
name: activeDiskAccount.profile.name,
email: activeDiskAccount.profile.email,
status: AuthenticationStatus.LoggedOut,
});
}
- this.accountService.switchAccount(state.activeUserId as UserId);
+ await this.accountService.switchAccount(state.activeUserId as UserId);
// End TODO
return state;
@@ -198,7 +198,7 @@ export class StateService<
const diskAccount = await this.getAccountFromDisk({ userId: userId });
state.accounts[userId].profile = diskAccount.profile;
// TODO: Temporary update to avoid routing all account status changes through account service for now.
- this.accountService.addAccount(userId as UserId, {
+ await this.accountService.addAccount(userId as UserId, {
status: AuthenticationStatus.Locked,
name: diskAccount.profile.name,
email: diskAccount.profile.email,
@@ -218,7 +218,7 @@ export class StateService<
await this.scaffoldNewAccountStorage(account);
await this.setLastActive(new Date().getTime(), { userId: account.profile.userId });
// TODO: Temporary update to avoid routing all account status changes through account service for now.
- this.accountService.addAccount(account.profile.userId as UserId, {
+ await this.accountService.addAccount(account.profile.userId as UserId, {
status: AuthenticationStatus.Locked,
name: account.profile.name,
email: account.profile.email,
@@ -228,13 +228,13 @@ export class StateService<
}
async setActiveUser(userId: string): Promise {
- this.clearDecryptedDataForActiveUser();
+ await this.clearDecryptedDataForActiveUser();
await this.updateState(async (state) => {
state.activeUserId = userId;
await this.storageService.save(keys.activeUserId, userId);
this.activeAccountSubject.next(state.activeUserId);
// TODO: temporary update to avoid routing all account status changes through account service for now.
- this.accountService.switchAccount(userId as UserId);
+ await this.accountService.switchAccount(userId as UserId);
return state;
});
@@ -242,16 +242,18 @@ export class StateService<
await this.pushAccounts();
}
- async clean(options?: StorageOptions): Promise {
+ async clean(options?: StorageOptions): Promise {
options = this.reconcileOptions(options, await this.defaultInMemoryOptions());
await this.deAuthenticateAccount(options.userId);
- if (options.userId === (await this.state())?.activeUserId) {
- await this.dynamicallySetActiveUser();
+ let currentUser = (await this.state())?.activeUserId;
+ if (options.userId === currentUser) {
+ currentUser = await this.dynamicallySetActiveUser();
}
await this.removeAccountFromDisk(options?.userId);
- this.removeAccountFromMemory(options?.userId);
+ await this.removeAccountFromMemory(options?.userId);
await this.pushAccounts();
+ return currentUser as UserId;
}
async getAccessToken(options?: StorageOptions): Promise {
@@ -577,7 +579,7 @@ export class StateService<
);
const nextStatus = value != null ? AuthenticationStatus.Unlocked : AuthenticationStatus.Locked;
- this.accountService.setAccountStatus(options.userId as UserId, nextStatus);
+ await this.accountService.setAccountStatus(options.userId as UserId, nextStatus);
if (options.userId == this.activeAccountSubject.getValue()) {
const nextValue = value != null;
@@ -613,7 +615,7 @@ export class StateService<
);
const nextStatus = value != null ? AuthenticationStatus.Unlocked : AuthenticationStatus.Locked;
- this.accountService.setAccountStatus(options.userId as UserId, nextStatus);
+ await this.accountService.setAccountStatus(options.userId as UserId, nextStatus);
if (options?.userId == this.activeAccountSubject.getValue()) {
const nextValue = value != null;
@@ -3137,7 +3139,6 @@ export class StateService<
}
protected async pushAccounts(): Promise {
- await this.pruneInMemoryAccounts();
await this.state().then((state) => {
if (state.accounts == null || Object.keys(state.accounts).length < 1) {
this.accountsSubject.next({});
@@ -3253,16 +3254,7 @@ export class StateService<
return state;
});
// TODO: Invert this logic, we should remove accounts based on logged out emit
- this.accountService.setAccountStatus(userId as UserId, AuthenticationStatus.LoggedOut);
- }
-
- protected async pruneInMemoryAccounts() {
- // We preserve settings for logged out accounts, but we don't want to consider them when thinking about active account state
- for (const userId in (await this.state())?.accounts) {
- if (!(await this.getIsAuthenticated({ userId: userId }))) {
- await this.removeAccountFromMemory(userId);
- }
- }
+ await this.accountService.setAccountStatus(userId as UserId, AuthenticationStatus.LoggedOut);
}
// settings persist even on reset, and are not affected by this method
@@ -3333,18 +3325,22 @@ export class StateService<
const accounts = (await this.state())?.accounts;
if (accounts == null || Object.keys(accounts).length < 1) {
await this.setActiveUser(null);
- return;
+ return null;
}
+
+ let newActiveUser;
for (const userId in accounts) {
if (userId == null) {
continue;
}
if (await this.getIsAuthenticated({ userId: userId })) {
- await this.setActiveUser(userId);
+ newActiveUser = userId;
break;
}
- await this.setActiveUser(null);
+ newActiveUser = null;
}
+ await this.setActiveUser(newActiveUser);
+ return newActiveUser;
}
private async getTimeoutBasedStorageOptions(options?: StorageOptions): Promise {
diff --git a/libs/common/src/platform/state/index.ts b/libs/common/src/platform/state/index.ts
index bab0bec90f3..178c21e0b6b 100644
--- a/libs/common/src/platform/state/index.ts
+++ b/libs/common/src/platform/state/index.ts
@@ -3,5 +3,6 @@ export { GlobalState } from "./global-state";
export { GlobalStateProvider } from "./global-state.provider";
export { UserState } from "./user-state";
export { UserStateProvider } from "./user-state.provider";
+export { KeyDefinition } from "./key-definition";
-export * from "./key-definitions";
+export * from "./state-definitions";
diff --git a/libs/common/src/platform/state/key-definitions.ts b/libs/common/src/platform/state/key-definitions.ts
deleted file mode 100644
index 50112137e58..00000000000
--- a/libs/common/src/platform/state/key-definitions.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { AccountInfo } from "../../auth/abstractions/account.service";
-import { AccountsDeserializer } from "../../auth/services/account.service";
-import { UserId } from "../../types/guid";
-
-import { KeyDefinition } from "./key-definition";
-import { StateDefinition } from "./state-definition";
-
-const ACCOUNT_MEMORY = new StateDefinition("account", "memory");
-export const ACCOUNT_ACCOUNTS = new KeyDefinition>(
- ACCOUNT_MEMORY,
- "accounts",
- {
- deserializer: (obj) => AccountsDeserializer(obj),
- }
-);
-export const ACCOUNT_ACTIVE_ACCOUNT_ID = new KeyDefinition(ACCOUNT_MEMORY, "activeAccountId", {
- deserializer: (id: UserId) => id,
-});
diff --git a/libs/common/src/platform/state/state-definitions.ts b/libs/common/src/platform/state/state-definitions.ts
new file mode 100644
index 00000000000..4ec1a6a87fd
--- /dev/null
+++ b/libs/common/src/platform/state/state-definitions.ts
@@ -0,0 +1,3 @@
+import { StateDefinition } from "./state-definition";
+
+export const ACCOUNT_MEMORY = new StateDefinition("account", "memory");
From 2d18b31d4676330e474351d658c8fe7e19333945 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 29 Nov 2023 17:01:06 +0100
Subject: [PATCH 13/46] [deps] Tools: Update utf-8-validate to v6 (#6987)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
---
package-lock.json | 8 ++++----
package.json | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 8a7b3c547fa..06139db538a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -66,7 +66,7 @@
"rxjs": "7.8.1",
"tabbable": "6.2.0",
"tldts": "6.0.22",
- "utf-8-validate": "5.0.10",
+ "utf-8-validate": "6.0.3",
"zone.js": "0.12.0",
"zxcvbn": "4.4.2"
},
@@ -39024,9 +39024,9 @@
}
},
"node_modules/utf-8-validate": {
- "version": "5.0.10",
- "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz",
- "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==",
+ "version": "6.0.3",
+ "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.3.tgz",
+ "integrity": "sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==",
"hasInstallScript": true,
"dependencies": {
"node-gyp-build": "^4.3.0"
diff --git a/package.json b/package.json
index 38c4f12a839..f77065d59be 100644
--- a/package.json
+++ b/package.json
@@ -199,7 +199,7 @@
"rxjs": "7.8.1",
"tabbable": "6.2.0",
"tldts": "6.0.22",
- "utf-8-validate": "5.0.10",
+ "utf-8-validate": "6.0.3",
"zone.js": "0.12.0",
"zxcvbn": "4.4.2"
},
From c945f08a5daee9ffe5ac8fb4113ab1a412b4f328 Mon Sep 17 00:00:00 2001
From: Jonathan Prusik
Date: Wed, 29 Nov 2023 13:44:22 -0500
Subject: [PATCH 14/46] update gulp-zip and gulp-filter to latest versions
(#7026)
---
apps/browser/gulpfile.js | 20 ++-
package-lock.json | 300 +++++++++++++++++++++++++++------------
package.json | 4 +-
3 files changed, 229 insertions(+), 95 deletions(-)
diff --git a/apps/browser/gulpfile.js b/apps/browser/gulpfile.js
index af1a2d8c7db..fa18584e049 100644
--- a/apps/browser/gulpfile.js
+++ b/apps/browser/gulpfile.js
@@ -3,11 +3,9 @@ const fs = require("fs");
const del = require("del");
const gulp = require("gulp");
-const filter = require("gulp-filter");
const gulpif = require("gulp-if");
const jeditor = require("gulp-json-editor");
const replace = require("gulp-replace");
-const zip = require("gulp-zip");
const manifest = require("./src/manifest.json");
@@ -47,7 +45,10 @@ function distFileName(browserName, ext) {
return `dist-${browserName}${buildString()}.${ext}`;
}
-function dist(browserName, manifest) {
+async function dist(browserName, manifest) {
+ const { default: zip } = await import("gulp-zip");
+ const { default: filter } = await import("gulp-filter");
+
return gulp
.src(paths.build + "**/*")
.pipe(filter(["**"].concat(filters.fonts).concat(filters.safari)))
@@ -144,7 +145,9 @@ function distSafariApp(cb, subBuildPath) {
stdOutProc(proc);
return new Promise((resolve) => proc.on("close", resolve));
})
- .then(() => {
+ .then(async () => {
+ const { default: filter } = await import("gulp-filter");
+
const libs = fs
.readdirSync(builtAppexFrameworkPath)
.filter((p) => p.endsWith(".dylib"))
@@ -187,7 +190,9 @@ function safariCopyAssets(source, dest) {
});
}
-function safariCopyBuild(source, dest) {
+async function safariCopyBuild(source, dest) {
+ const { default: filter } = await import("gulp-filter");
+
return new Promise((resolve, reject) => {
gulp
.src(source)
@@ -216,7 +221,10 @@ function stdOutProc(proc) {
proc.stderr.on("data", (data) => console.error(data.toString()));
}
-function ciCoverage(cb) {
+async function ciCoverage(cb) {
+ const { default: zip } = await import("gulp-zip");
+ const { default: filter } = await import("gulp-filter");
+
return gulp
.src(paths.coverage + "**/*")
.pipe(filter(["**", "!coverage/coverage*.zip"]))
diff --git a/package-lock.json b/package-lock.json
index 06139db538a..1246b6e60aa 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -140,11 +140,11 @@
"eslint-plugin-storybook": "0.6.13",
"eslint-plugin-tailwindcss": "3.13.0",
"gulp": "4.0.2",
- "gulp-filter": "7.0.0",
+ "gulp-filter": "9.0.1",
"gulp-if": "3.0.0",
"gulp-json-editor": "2.5.7",
"gulp-replace": "1.1.4",
- "gulp-zip": "5.1.0",
+ "gulp-zip": "6.0.0",
"html-loader": "4.2.0",
"html-webpack-injector": "1.1.4",
"html-webpack-plugin": "5.5.3",
@@ -14376,9 +14376,9 @@
"optional": true
},
"node_modules/@types/vinyl": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.7.tgz",
- "integrity": "sha512-4UqPv+2567NhMQuMLdKAyK4yzrfCqwaTt6bLhHEs8PFcxbHILsrxaY63n4wgE/BRLDWDQeI+WcTmkXKExh9hQg==",
+ "version": "2.0.11",
+ "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.11.tgz",
+ "integrity": "sha512-vPXzCLmRp74e9LsP8oltnWKTH+jBwt86WgRUb4Pc9Lf3pkMVGyvIo2gm9bODeGfCay2DBB/hAWDuvf07JcK4rw==",
"dev": true,
"dependencies": {
"@types/expect": "^1.20.4",
@@ -15946,12 +15946,15 @@
}
},
"node_modules/array-differ": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz",
- "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==",
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-4.0.0.tgz",
+ "integrity": "sha512-Q6VPTLMsmXZ47ENG3V+wQyZS1ZxXMxFyYzA+Z/GMrJ6yIutAIEf9wTyroTzmGjNfox9/h3GdGBCVh43GVFx4Uw==",
"dev": true,
"engines": {
- "node": ">=8"
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/array-each": {
@@ -16142,15 +16145,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
- "node_modules/arrify": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz",
- "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==",
- "dev": true,
- "engines": {
- "node": ">=8"
- }
- },
"node_modules/asar": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/asar/-/asar-3.2.0.tgz",
@@ -20016,6 +20010,18 @@
"node": ">=6.0.0"
}
},
+ "node_modules/easy-transform-stream": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/easy-transform-stream/-/easy-transform-stream-1.0.1.tgz",
+ "integrity": "sha512-ktkaa6XR7COAR3oj02CF3IOgz2m1hCaY3SfzvKT4Svt2MhHw9XCt+ncJNWfe2TGz31iqzNGZ8spdKQflj+Rlog==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/editorconfig": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz",
@@ -21919,6 +21925,12 @@
"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
"dev": true
},
+ "node_modules/fast-fifo": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz",
+ "integrity": "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==",
+ "dev": true
+ },
"node_modules/fast-glob": {
"version": "3.2.12",
"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz",
@@ -23983,18 +23995,19 @@
}
},
"node_modules/gulp-filter": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-7.0.0.tgz",
- "integrity": "sha512-ZGWtJo0j1mHfP77tVuhyqem4MRA5NfNRjoVe6VAkLGeQQ/QGo2VsFwp7zfPTGDsd1rwzBmoDHhxpE6f5B3Zuaw==",
+ "version": "9.0.1",
+ "resolved": "https://registry.npmjs.org/gulp-filter/-/gulp-filter-9.0.1.tgz",
+ "integrity": "sha512-knVYL8h9bfYIeft3VokVTkuaWJkQJMrFCS3yVjZQC6BGg+1dZFoeUY++B9D2X4eFpeNTx9StWK0qnDby3NO3PA==",
"dev": true,
"dependencies": {
- "multimatch": "^5.0.0",
- "plugin-error": "^1.0.1",
+ "multimatch": "^7.0.0",
+ "plugin-error": "^2.0.1",
+ "slash": "^5.1.0",
"streamfilter": "^3.0.0",
- "to-absolute-glob": "^2.0.2"
+ "to-absolute-glob": "^3.0.0"
},
"engines": {
- "node": ">=12"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@@ -24008,6 +24021,31 @@
}
}
},
+ "node_modules/gulp-filter/node_modules/slash": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz",
+ "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/gulp-filter/node_modules/to-absolute-glob": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-3.0.0.tgz",
+ "integrity": "sha512-loO/XEWTRqpfcpI7+Jr2RR2Umaaozx1t6OSVWtMi0oy5F/Fxg3IC+D/TToDnxyAGs7uZBGT/6XmyDUxgsObJXA==",
+ "dev": true,
+ "dependencies": {
+ "is-absolute": "^1.0.0",
+ "is-negated-glob": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/gulp-if": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/gulp-if/-/gulp-if-3.0.0.tgz",
@@ -24032,30 +24070,6 @@
"through2": "^4.0.2"
}
},
- "node_modules/gulp-json-editor/node_modules/ansi-colors": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
- "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
- "dev": true,
- "dependencies": {
- "ansi-wrap": "^0.1.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/gulp-json-editor/node_modules/plugin-error": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-2.0.1.tgz",
- "integrity": "sha512-zMakqvIDyY40xHOvzXka0kUvf40nYIuwRE8dWhti2WtjQZ31xAgBZBhxsK7vK3QbRXS1Xms/LO7B5cuAsfB2Gg==",
- "dev": true,
- "dependencies": {
- "ansi-colors": "^1.0.1"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
"node_modules/gulp-json-editor/node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
@@ -24088,6 +24102,35 @@
"minimatch": "^3.0.3"
}
},
+ "node_modules/gulp-plugin-extras": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/gulp-plugin-extras/-/gulp-plugin-extras-0.3.0.tgz",
+ "integrity": "sha512-I/kOBSpo61QsGQZcqozZYEnDseKvpudUafVVWDLYgBFAUJ37kW5R8Sjw9cMYzpGyPUfEYOeoY4p+dkfLqgyJUQ==",
+ "dev": true,
+ "dependencies": {
+ "@types/vinyl": "^2.0.9",
+ "chalk": "^5.3.0",
+ "easy-transform-stream": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/gulp-plugin-extras/node_modules/chalk": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz",
+ "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==",
+ "dev": true,
+ "engines": {
+ "node": "^12.17.0 || ^14.13 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
"node_modules/gulp-replace": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.1.4.tgz",
@@ -24105,19 +24148,21 @@
}
},
"node_modules/gulp-zip": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/gulp-zip/-/gulp-zip-5.1.0.tgz",
- "integrity": "sha512-XZr/y91IliK/SpR74g3TkZejGkGEmK7CSDjSghT1jXshgO+dFvpLIz9w9fpuwkew6i7k4F+G24TubNgq1ISzEw==",
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/gulp-zip/-/gulp-zip-6.0.0.tgz",
+ "integrity": "sha512-fPGvNve2dBoZxGKcviTU7mOa77eQibyhwgGLTxnF+ZCKX8RFaTZKkPbdPnmw0r4TNPRjPCkQB/0VuP+MzgkEYg==",
"dev": true,
"dependencies": {
- "get-stream": "^5.2.0",
- "plugin-error": "^1.0.1",
- "through2": "^3.0.1",
- "vinyl": "^2.1.0",
+ "get-stream": "^8.0.1",
+ "gulp-plugin-extras": "^0.3.0",
+ "vinyl": "^3.0.0",
"yazl": "^2.5.1"
},
"engines": {
- "node": ">=8"
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
},
"peerDependencies": {
"gulp": ">=4"
@@ -24128,21 +24173,52 @@
}
}
},
- "node_modules/gulp-zip/node_modules/get-stream": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz",
- "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==",
+ "node_modules/gulp-zip/node_modules/clone": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
+ "integrity": "sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==",
"dev": true,
- "dependencies": {
- "pump": "^3.0.0"
- },
"engines": {
- "node": ">=8"
+ "node": ">=0.8"
+ }
+ },
+ "node_modules/gulp-zip/node_modules/get-stream": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz",
+ "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==",
+ "dev": true,
+ "engines": {
+ "node": ">=16"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/gulp-zip/node_modules/replace-ext": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-2.0.0.tgz",
+ "integrity": "sha512-UszKE5KVK6JvyD92nzMn9cDapSk6w/CaFZ96CnmDMUqH9oowfxF/ZjRITD25H4DnOQClLA4/j7jLGXXLVKxAug==",
+ "dev": true,
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/gulp-zip/node_modules/vinyl": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-3.0.0.tgz",
+ "integrity": "sha512-rC2VRfAVVCGEgjnxHUnpIVh3AGuk62rP3tqVrn+yab0YH7UULisC085+NYH+mnqf3Wx4SpSi1RQMwudL89N03g==",
+ "dev": true,
+ "dependencies": {
+ "clone": "^2.1.2",
+ "clone-stats": "^1.0.0",
+ "remove-trailing-separator": "^1.1.0",
+ "replace-ext": "^2.0.0",
+ "teex": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
"node_modules/gulplog": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
@@ -30489,29 +30565,57 @@
}
},
"node_modules/multimatch": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-5.0.0.tgz",
- "integrity": "sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA==",
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-7.0.0.tgz",
+ "integrity": "sha512-SYU3HBAdF4psHEL/+jXDKHO95/m5P2RvboHT2Y0WtTttvJLP4H/2WS9WlQPFvF6C8d6SpLw8vjCnQOnVIVOSJQ==",
"dev": true,
"dependencies": {
- "@types/minimatch": "^3.0.3",
- "array-differ": "^3.0.0",
- "array-union": "^2.1.0",
- "arrify": "^2.0.1",
- "minimatch": "^3.0.4"
+ "array-differ": "^4.0.0",
+ "array-union": "^3.0.1",
+ "minimatch": "^9.0.3"
},
"engines": {
- "node": ">=10"
+ "node": ">=18"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
- "node_modules/multimatch/node_modules/@types/minimatch": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",
- "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==",
- "dev": true
+ "node_modules/multimatch/node_modules/array-union": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/array-union/-/array-union-3.0.1.tgz",
+ "integrity": "sha512-1OvF9IbWwaeiM9VhzYXVQacMibxpXOMYVNIvMtKRyX9SImBXpKcFr8XvFDeEslCyuH/t6KRt7HEO94AlP8Iatw==",
+ "dev": true,
+ "engines": {
+ "node": ">=12"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/multimatch/node_modules/brace-expansion": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0"
+ }
+ },
+ "node_modules/multimatch/node_modules/minimatch": {
+ "version": "9.0.3",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=16 || 14 >=14.17"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
},
"node_modules/multistream": {
"version": "4.1.0",
@@ -32729,18 +32833,15 @@
}
},
"node_modules/plugin-error": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz",
- "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==",
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-2.0.1.tgz",
+ "integrity": "sha512-zMakqvIDyY40xHOvzXka0kUvf40nYIuwRE8dWhti2WtjQZ31xAgBZBhxsK7vK3QbRXS1Xms/LO7B5cuAsfB2Gg==",
"dev": true,
"dependencies": {
- "ansi-colors": "^1.0.1",
- "arr-diff": "^4.0.0",
- "arr-union": "^3.1.0",
- "extend-shallow": "^3.0.2"
+ "ansi-colors": "^1.0.1"
},
"engines": {
- "node": ">= 0.10"
+ "node": ">=10.13.0"
}
},
"node_modules/plugin-error/node_modules/ansi-colors": {
@@ -33598,6 +33699,12 @@
}
]
},
+ "node_modules/queue-tick": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/queue-tick/-/queue-tick-1.0.1.tgz",
+ "integrity": "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag==",
+ "dev": true
+ },
"node_modules/quick-lru": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
@@ -36878,6 +36985,16 @@
"node": ">=10.0.0"
}
},
+ "node_modules/streamx": {
+ "version": "2.15.5",
+ "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.5.tgz",
+ "integrity": "sha512-9thPGMkKC2GctCzyCUjME3yR03x2xNo0GPKGkRw2UMYN+gqWa9uqpyNWhmsNCutU5zHmkUum0LsCRQTXUgUCAg==",
+ "dev": true,
+ "dependencies": {
+ "fast-fifo": "^1.1.0",
+ "queue-tick": "^1.0.1"
+ }
+ },
"node_modules/string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
@@ -37372,6 +37489,15 @@
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
},
+ "node_modules/teex": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz",
+ "integrity": "sha512-eYE6iEI62Ni1H8oIa7KlDU6uQBtqr4Eajni3wX7rpfXD8ysFx8z0+dri+KWEPWpBsxXfxu58x/0jvTVT1ekOSg==",
+ "dev": true,
+ "dependencies": {
+ "streamx": "^2.12.5"
+ }
+ },
"node_modules/telejson": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/telejson/-/telejson-7.1.0.tgz",
diff --git a/package.json b/package.json
index f77065d59be..319b2f452c1 100644
--- a/package.json
+++ b/package.json
@@ -103,11 +103,11 @@
"eslint-plugin-storybook": "0.6.13",
"eslint-plugin-tailwindcss": "3.13.0",
"gulp": "4.0.2",
- "gulp-filter": "7.0.0",
+ "gulp-filter": "9.0.1",
"gulp-if": "3.0.0",
"gulp-json-editor": "2.5.7",
"gulp-replace": "1.1.4",
- "gulp-zip": "5.1.0",
+ "gulp-zip": "6.0.0",
"html-loader": "4.2.0",
"html-webpack-injector": "1.1.4",
"html-webpack-plugin": "5.5.3",
From 4ff5f38e894475b0c2ebc42e26df55a3a26dd91d Mon Sep 17 00:00:00 2001
From: Jonathan Prusik
Date: Wed, 29 Nov 2023 13:53:48 -0500
Subject: [PATCH 15/46] replace del with rimraf (#7024)
---
apps/browser/gulpfile.js | 4 ++--
package-lock.json | 1 -
package.json | 1 -
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/apps/browser/gulpfile.js b/apps/browser/gulpfile.js
index fa18584e049..78c2ab8a588 100644
--- a/apps/browser/gulpfile.js
+++ b/apps/browser/gulpfile.js
@@ -1,7 +1,7 @@
const child = require("child_process");
const fs = require("fs");
-const del = require("del");
+const { rimraf } = require("rimraf");
const gulp = require("gulp");
const gulpif = require("gulp-if");
const jeditor = require("gulp-json-editor");
@@ -131,7 +131,7 @@ function distSafariApp(cb, subBuildPath) {
];
}
- return del([buildPath + "**/*"])
+ return rimraf([buildPath + "**/*"], { glob: true })
.then(() => safariCopyAssets(paths.safari + "**/*", buildPath))
.then(() => safariCopyBuild(paths.build + "**/*", buildPath + "safari/app"))
.then(() => {
diff --git a/package-lock.json b/package-lock.json
index 1246b6e60aa..75c72a0ab65 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -124,7 +124,6 @@
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
- "del": "6.1.1",
"electron": "25.9.1",
"electron-builder": "23.6.0",
"electron-log": "5.0.1",
diff --git a/package.json b/package.json
index 319b2f452c1..228b86c19a2 100644
--- a/package.json
+++ b/package.json
@@ -87,7 +87,6 @@
"copy-webpack-plugin": "11.0.0",
"cross-env": "7.0.3",
"css-loader": "6.8.1",
- "del": "6.1.1",
"electron": "25.9.1",
"electron-builder": "23.6.0",
"electron-log": "5.0.1",
From 28de9439beb87133c8683434df952a0c0be94100 Mon Sep 17 00:00:00 2001
From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com>
Date: Wed, 29 Nov 2023 16:15:20 -0500
Subject: [PATCH 16/46] [deps] Autofill: Update prettier to v3 (#7014)
* [deps] Autofill: Update prettier to v3
* prettier formatting updates
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik
---
.storybook/preview.tsx | 2 +-
apps/browser/gulpfile.js | 8 +-
.../organization-service.factory.ts | 4 +-
.../policy-service.factory.ts | 6 +-
.../services/browser-policy.service.ts | 2 +-
.../account-service.factory.ts | 6 +-
.../auth-request-crypto-service.factory.ts | 4 +-
.../service-factories/auth-service.factory.ts | 6 +-
.../device-trust-crypto-service.factory.ts | 6 +-
.../key-connector-service.factory.ts | 6 +-
.../token-service.factory.ts | 4 +-
.../two-factor-service.factory.ts | 6 +-
.../user-verification-api-service.factory.ts | 4 +-
.../user-verification-service.factory.ts | 6 +-
.../src/auth/guards/fido2-auth.guard.ts | 2 +-
.../account-switcher.component.ts | 2 +-
.../current-account.component.ts | 7 +-
.../src/auth/popup/environment.component.ts | 2 +-
apps/browser/src/auth/popup/hint.component.ts | 2 +-
apps/browser/src/auth/popup/home.component.ts | 4 +-
.../src/auth/popup/lock.component.html | 2 +-
apps/browser/src/auth/popup/lock.component.ts | 4 +-
.../popup/login-via-auth-request.component.ts | 4 +-
.../browser/src/auth/popup/login.component.ts | 6 +-
.../src/auth/popup/register.component.ts | 4 +-
.../auth/popup/remove-password.component.html | 2 +-
.../services/account-switcher.service.spec.ts | 10 +-
.../services/account-switcher.service.ts | 6 +-
.../src/auth/popup/set-password.component.ts | 4 +-
apps/browser/src/auth/popup/sso.component.ts | 4 +-
.../popup/two-factor-options.component.ts | 2 +-
.../src/auth/popup/two-factor.component.html | 2 +-
.../src/auth/popup/two-factor.component.ts | 4 +-
.../popup/utils/auth-popout-window.spec.ts | 2 +-
.../auth/popup/utils/auth-popout-window.ts | 2 +-
.../background/context-menus.background.ts | 6 +-
.../notification.background.spec.ts | 2 +-
.../background/notification.background.ts | 26 +-
.../background/overlay.background.spec.ts | 44 +-
.../autofill/background/overlay.background.ts | 20 +-
.../autofill-service.factory.ts | 6 +-
.../background/tabs.background.spec.ts | 4 +-
.../autofill/background/tabs.background.ts | 4 +-
.../cipher-context-menu-handler.spec.ts | 6 +-
.../browser/cipher-context-menu-handler.ts | 14 +-
.../context-menu-clicked-handler.spec.ts | 6 +-
.../browser/context-menu-clicked-handler.ts | 34 +-
.../browser/main-context-menu-handler.spec.ts | 4 +-
.../browser/main-context-menu-handler.ts | 6 +-
.../generate-password-to-clipboard-command.ts | 2 +-
.../autofill/commands/autofill-tab-command.ts | 4 +-
.../autofill/content/autofill-init.spec.ts | 40 +-
.../src/autofill/content/autofill-init.ts | 10 +-
.../src/autofill/content/message_handler.ts | 2 +-
.../src/autofill/content/misc-utils.ts | 2 +-
.../src/autofill/content/notification-bar.ts | 14 +-
.../src/autofill/jest/autofill-mocks.ts | 6 +-
.../src/autofill/jest/testing-utils.ts | 12 +-
.../src/autofill/notification/bar.html | 2 +-
.../autofill-overlay-button-iframe.ts | 2 +-
.../autofill-overlay-iframe-element.ts | 4 +-
.../autofill-overlay-iframe.service.spec.ts | 24 +-
.../autofill-overlay-iframe.service.ts | 10 +-
.../autofill-overlay-list-iframe.ts | 2 +-
.../button/autofill-overlay-button.spec.ts | 10 +-
.../pages/button/autofill-overlay-button.ts | 2 +-
.../autofill/overlay/pages/button/button.html | 2 +-
.../pages/list/autofill-overlay-list.spec.ts | 20 +-
.../pages/list/autofill-overlay-list.ts | 22 +-
.../src/autofill/overlay/pages/list/list.html | 2 +-
.../autofill-overlay-page-element.spec.ts | 46 +-
.../shared/autofill-overlay-page-element.ts | 4 +-
.../autofill-overlay-content.service.ts | 2 +-
.../services/abstractions/autofill.service.ts | 6 +-
.../collect-autofill-content.service.ts | 2 +-
.../autofill-overlay-content.service.spec.ts | 196 ++---
.../autofill-overlay-content.service.ts | 44 +-
.../services/autofill.service.spec.ts | 384 +++++-----
.../src/autofill/services/autofill.service.ts | 84 +--
.../collect-autofill-content.service.spec.ts | 142 ++--
.../collect-autofill-content.service.ts | 60 +-
.../dom-element-visibility.service.spec.ts | 48 +-
.../dom-element-visibility.service.ts | 8 +-
.../insert-autofill-content.service.spec.ts | 140 ++--
.../insert-autofill-content.service.ts | 14 +-
apps/browser/src/autofill/utils/utils.spec.ts | 8 +-
apps/browser/src/autofill/utils/utils.ts | 6 +-
.../src/background/commands.background.ts | 4 +-
.../browser/src/background/idle.background.ts | 2 +-
.../browser/src/background/main.background.ts | 94 +--
.../background/nativeMessaging.background.ts | 14 +-
.../src/background/runtime.background.ts | 24 +-
.../cipher-file-upload-service.factory.ts | 6 +-
.../cipher-file-upload.service.factory.ts | 6 +-
.../devices-api-service.factory.ts | 4 +-
.../event-collection-service.factory.ts | 6 +-
.../event-upload-service.factory.ts | 6 +-
.../password-generation-service.factory.ts | 6 +-
.../search-service.factory.ts | 7 +-
.../service-factories/send-service.factory.ts | 6 +-
.../settings-service.factory.ts | 4 +-
.../vault-timeout-service.factory.ts | 6 +-
.../vault-timeout-settings-service.factory.ts | 6 +-
.../src/background/webRequest.background.ts | 8 +-
apps/browser/src/browser/safariApp.ts | 2 +-
apps/browser/src/platform/background.ts | 2 +-
.../service-factories/api-service.factory.ts | 6 +-
.../app-id-service.factory.ts | 4 +-
.../config-api.service.factory.ts | 6 +-
.../config-service.factory.ts | 6 +-
.../crypto-function-service.factory.ts | 4 +-
.../crypto-service.factory.ts | 6 +-
.../encrypt-service.factory.ts | 6 +-
.../environment-service.factory.ts | 6 +-
.../service-factories/factory-options.ts | 4 +-
.../file-upload-service.factory.ts | 4 +-
.../global-state-provider.factory.ts | 6 +-
.../service-factories/i18n-service.factory.ts | 4 +-
.../key-generation-service.factory.ts | 4 +-
.../service-factories/log-service.factory.ts | 4 +-
.../messaging-service.factory.ts | 2 +-
.../platform-utils-service.factory.ts | 6 +-
.../state-service.factory.ts | 6 +-
.../storage-service.factory.ts | 12 +-
.../src/platform/browser/browser-api.spec.ts | 12 +-
.../src/platform/browser/browser-api.ts | 40 +-
.../src/platform/browser/from-chrome-event.ts | 2 +-
.../browser/zoned-message-listener.service.ts | 4 +-
.../platform/decorators/dev-flag.decorator.ts | 2 +-
.../browser-session.decorator.spec.ts | 2 +-
.../browser-session.decorator.ts | 11 +-
.../session-syncer.spec.ts | 4 +-
.../session-sync-observable/session-syncer.ts | 4 +-
apps/browser/src/platform/globals.d.ts | 6 +-
.../browser/src/platform/listeners/combine.ts | 2 +-
.../platform/listeners/on-command-listener.ts | 2 +-
.../src/platform/listeners/update-badge.ts | 16 +-
.../popup/browser-popup-utils.spec.ts | 8 +-
.../src/platform/popup/browser-popup-utils.ts | 18 +-
.../src/platform/popup/header.component.ts | 2 +-
.../abstract-chrome-storage-api.service.ts | 2 +-
.../abstractions/browser-state.service.ts | 10 +-
.../services/browser-config.service.ts | 2 +-
.../services/browser-environment.service.ts | 5 +-
.../services/browser-file-download.service.ts | 2 +-
.../platform/services/browser-i18n.service.ts | 5 +-
.../browser-platform-utils.service.ts | 10 +-
.../services/browser-state.service.spec.ts | 2 +-
.../services/browser-state.service.ts | 34 +-
.../services/key-generation.service.ts | 2 +-
.../local-backed-session-storage.service.ts | 2 +-
.../foreground-memory-storage.service.ts | 12 +-
...emory-storage-service-interactions.spec.ts | 2 +-
.../src/popup/app-routing.animations.ts | 12 +-
apps/browser/src/popup/app.component.ts | 8 +-
apps/browser/src/popup/index.html | 2 +-
apps/browser/src/popup/scss/environment.scss | 4 +-
.../services/debounceNavigationService.ts | 4 +-
.../src/popup/services/init.service.ts | 2 +-
.../services/popup-close-warning.service.ts | 2 +-
.../popup/services/popup-search.service.ts | 2 +-
.../src/popup/services/services.module.ts | 26 +-
.../src/popup/settings/about.component.html | 8 +-
.../src/popup/settings/about.component.ts | 2 +-
.../src/popup/settings/autofill.component.ts | 4 +-
.../settings/excluded-domains.component.html | 2 +-
.../settings/excluded-domains.component.ts | 8 +-
.../src/popup/settings/folders.component.ts | 7 +-
.../src/popup/settings/options.component.ts | 4 +-
.../src/popup/settings/premium.component.ts | 4 +-
.../popup/settings/settings.component.html | 6 +-
.../src/popup/settings/settings.component.ts | 36 +-
.../src/popup/settings/sync.component.ts | 2 +-
.../import-api-service.factory.ts | 4 +-
.../import-service.factory.ts | 6 +-
.../password-generation-service.factory.ts | 6 +-
.../password-strength-service.factory.ts | 2 +-
.../popup/generator/generator.component.ts | 4 +-
.../password-generator-history.component.html | 2 +-
.../password-generator-history.component.ts | 2 +-
.../send/components/send-list.component.html | 2 +-
.../popup/send/send-add-edit.component.ts | 4 +-
.../popup/send/send-groupings.component.ts | 4 +-
.../tools/popup/send/send-type.component.ts | 4 +-
.../tools/popup/settings/export.component.ts | 4 +-
.../cipher-service.factory.ts | 6 +-
.../collection-service.factory.ts | 6 +-
.../folder-service.factory.ts | 6 +-
.../sync-notifier-service.factory.ts | 4 +-
.../service_factories/totp-service.factory.ts | 6 +-
.../browser-fido2-user-interface.service.ts | 34 +-
.../src/vault/fido2/content/content-script.ts | 8 +-
.../fido2/content/messaging/messenger.spec.ts | 4 +-
.../fido2/content/messaging/messenger.ts | 2 +-
.../src/vault/fido2/content/page-script.ts | 14 +-
.../browser/src/vault/fido2/webauthn-utils.ts | 4 +-
.../components/action-buttons.component.ts | 4 +-
.../popup/components/fido2/fido2.component.ts | 26 +-
.../components/vault/add-edit.component.html | 8 +-
.../components/vault/add-edit.component.ts | 14 +-
.../components/vault/attachments.component.ts | 4 +-
.../components/vault/collections.component.ts | 2 +-
.../components/vault/current-tab.component.ts | 8 +-
.../vault/password-history.component.html | 2 +-
.../vault/password-history.component.ts | 2 +-
.../popup/components/vault/share.component.ts | 4 +-
.../vault/vault-filter.component.ts | 16 +-
.../components/vault/vault-items.component.ts | 4 +-
.../vault/vault-select.component.ts | 16 +-
.../components/vault/view.component.html | 12 +-
.../popup/components/vault/view.component.ts | 8 +-
.../settings/folder-add-edit.component.ts | 4 +-
.../popup/utils/vault-popout-window.spec.ts | 20 +-
.../vault/popup/utils/vault-popout-window.ts | 8 +-
.../vault/services/vault-filter.service.ts | 4 +-
apps/browser/webpack.config.js | 2 +-
.../admin-console/commands/confirm.command.ts | 6 +-
.../admin-console/commands/share.command.ts | 4 +-
apps/cli/src/auth/commands/login.command.ts | 66 +-
apps/cli/src/auth/commands/logout.command.ts | 2 +-
apps/cli/src/auth/commands/unlock.command.ts | 10 +-
apps/cli/src/bw.ts | 56 +-
apps/cli/src/commands/completion.command.ts | 6 +-
apps/cli/src/commands/config.command.ts | 2 +-
.../convert-to-key-connector.command.ts | 6 +-
apps/cli/src/commands/download.command.ts | 4 +-
apps/cli/src/commands/edit.command.ts | 16 +-
apps/cli/src/commands/get.command.ts | 24 +-
apps/cli/src/commands/list.command.ts | 6 +-
apps/cli/src/commands/serve.command.ts | 46 +-
apps/cli/src/commands/status.command.ts | 4 +-
apps/cli/src/models/response.ts | 4 +-
.../services/cli-platform-utils.service.ts | 7 +-
.../cli/src/platform/services/i18n.service.ts | 2 +-
.../services/lowdb-storage.service.ts | 8 +-
.../src/platform/services/node-api.service.ts | 4 +-
.../node-env-secure-storage.service.ts | 6 +-
apps/cli/src/program.ts | 38 +-
apps/cli/src/tools/export.command.ts | 10 +-
apps/cli/src/tools/generate.command.ts | 2 +-
apps/cli/src/tools/import.command.ts | 10 +-
.../src/tools/send/commands/create.command.ts | 10 +-
.../src/tools/send/commands/delete.command.ts | 5 +-
.../src/tools/send/commands/edit.command.ts | 2 +-
.../src/tools/send/commands/get.command.ts | 2 +-
.../src/tools/send/commands/list.command.ts | 2 +-
.../tools/send/commands/receive.command.ts | 12 +-
.../send/commands/remove-password.command.ts | 5 +-
apps/cli/src/tools/send/send.program.ts | 32 +-
apps/cli/src/utils.ts | 6 +-
apps/cli/src/vault.program.ts | 58 +-
apps/cli/src/vault/create.command.ts | 14 +-
apps/cli/src/vault/delete.command.ts | 2 +-
.../src/commands/bw-credential-create.ts | 2 +-
.../src/commands/bw-credential-retrieval.ts | 2 +-
.../src/commands/bw-credential-update.ts | 2 +-
.../src/commands/bw-generate-password.ts | 2 +-
.../src/commands/bw-handshake.ts | 2 +-
.../src/commands/bw-status.ts | 2 +-
.../src/ipc.service.ts | 9 +-
.../src/native-message.service.ts | 30 +-
apps/desktop/scripts/after-sign.js | 4 +-
apps/desktop/scripts/start.js | 4 +-
apps/desktop/sign.js | 2 +-
.../src/app/accounts/settings.component.html | 11 +-
.../src/app/accounts/settings.component.ts | 36 +-
apps/desktop/src/app/app.component.ts | 26 +-
.../src/app/components/avatar.component.ts | 4 +-
...ify-native-messaging-dialog.component.html | 2 +-
.../app/layout/account-switcher.component.ts | 10 +-
.../src/app/layout/search/search.component.ts | 5 +-
apps/desktop/src/app/services/init.service.ts | 2 +-
.../src/app/tools/export/export.component.ts | 4 +-
.../src/app/tools/generator.component.ts | 4 +-
.../password-generator-history.component.html | 2 +-
.../password-generator-history.component.ts | 2 +-
.../src/app/tools/send/add-edit.component.ts | 6 +-
.../src/app/tools/send/send.component.ts | 4 +-
.../auth/accessibility-cookie.component.ts | 8 +-
.../src/auth/delete-account.component.ts | 4 +-
.../desktop/src/auth/environment.component.ts | 2 +-
apps/desktop/src/auth/guards/login.guard.ts | 2 +-
apps/desktop/src/auth/hint.component.ts | 2 +-
apps/desktop/src/auth/lock.component.html | 2 +-
apps/desktop/src/auth/lock.component.ts | 4 +-
.../auth/login/login-approval.component.html | 2 +-
.../auth/login/login-approval.component.ts | 22 +-
.../login/login-via-auth-request.component.ts | 6 +-
.../desktop/src/auth/login/login.component.ts | 8 +-
apps/desktop/src/auth/register.component.ts | 4 +-
.../src/auth/remove-password.component.html | 2 +-
.../src/auth/set-password.component.ts | 6 +-
apps/desktop/src/auth/sso.component.ts | 4 +-
.../src/auth/two-factor-options.component.ts | 2 +-
.../src/auth/two-factor.component.html | 2 +-
apps/desktop/src/auth/two-factor.component.ts | 6 +-
apps/desktop/src/index.html | 2 +-
apps/desktop/src/main.ts | 18 +-
apps/desktop/src/main/menu/menu.about.ts | 2 +-
apps/desktop/src/main/menu/menu.account.ts | 2 +-
apps/desktop/src/main/menu/menu.bitwarden.ts | 2 +-
apps/desktop/src/main/menu/menu.file.ts | 2 +-
apps/desktop/src/main/menu/menu.first.ts | 2 +-
apps/desktop/src/main/menu/menu.help.ts | 12 +-
apps/desktop/src/main/menu/menu.main.ts | 6 +-
apps/desktop/src/main/menu/menu.window.ts | 2 +-
apps/desktop/src/main/menu/menubar.ts | 10 +-
apps/desktop/src/main/messaging.main.ts | 5 +-
.../desktop/src/main/native-messaging.main.ts | 28 +-
apps/desktop/src/main/tray.main.ts | 4 +-
apps/desktop/src/main/updater.main.ts | 7 +-
apps/desktop/src/main/window.main.ts | 6 +-
.../main/biometric/biometric.darwin.main.ts | 5 +-
.../main/biometric/biometric.windows.main.ts | 20 +-
.../biometrics.service.abstraction.ts | 4 +-
.../main/biometric/biometrics.service.spec.ts | 8 +-
.../main/biometric/biometrics.service.ts | 12 +-
.../desktop-credential-storage-listener.ts | 2 +-
apps/desktop/src/platform/preload.ts | 2 +-
.../services/electron-crypto.service.spec.ts | 4 +-
.../services/electron-crypto.service.ts | 6 +-
.../platform/services/electron-log.service.ts | 2 +-
.../electron-platform-utils.service.ts | 7 +-
...lectron-renderer-secure-storage.service.ts | 2 +-
.../electron-state.service.abstraction.ts | 2 +-
.../services/electron-state.service.ts | 24 +-
.../platform/services/i18n.main.service.ts | 4 +-
apps/desktop/src/scss/box.scss | 4 +-
apps/desktop/src/scss/environment.scss | 4 +-
apps/desktop/src/scss/header.scss | 4 +-
.../electron-main-messaging.service.ts | 9 +-
.../encrypted-message-handler.service.ts | 14 +-
.../native-message-handler.service.ts | 19 +-
.../src/services/native-messaging.service.ts | 21 +-
.../vault/app/accounts/premium.component.html | 2 +-
.../vault/app/accounts/premium.component.ts | 4 +-
.../vault/app/vault/add-edit.component.html | 8 +-
.../src/vault/app/vault/add-edit.component.ts | 6 +-
.../vault/app/vault/attachments.component.ts | 4 +-
.../vault/app/vault/collections.component.ts | 2 +-
.../app/vault/folder-add-edit.component.ts | 4 +-
.../app/vault/password-history.component.html | 2 +-
.../app/vault/password-history.component.ts | 2 +-
.../src/vault/app/vault/share.component.ts | 4 +-
.../filters/organization-filter.component.ts | 4 +-
.../vault/app/vault/vault-items.component.ts | 2 +-
.../src/vault/app/vault/vault.component.ts | 22 +-
.../src/vault/app/vault/view.component.html | 12 +-
.../src/vault/app/vault/view.component.ts | 4 +-
apps/desktop/webpack.renderer.js | 2 +-
apps/web/scripts/optimize.js | 6 +-
apps/web/src/404.html | 2 +-
apps/web/src/404/styles.css | 7 +-
.../common/base.events.component.ts | 12 +-
.../common/base.people.component.ts | 24 +-
.../organization-switcher.component.html | 2 +-
.../organization-switcher.component.ts | 7 +-
.../core/services/group/group.service.ts | 16 +-
.../core/services/user-admin.service.ts | 6 +-
.../organizations/guards/is-paid-org.guard.ts | 2 +-
.../guards/org-permissions.guard.spec.ts | 4 +-
.../guards/org-permissions.guard.ts | 4 +-
.../guards/org-redirect.guard.ts | 5 +-
.../layouts/organization-layout.component.ts | 7 +-
.../manage/entity-events.component.html | 2 +-
.../manage/entity-events.component.ts | 16 +-
.../manage/events.component.html | 2 +-
.../organizations/manage/events.component.ts | 10 +-
.../manage/group-add-edit.component.html | 2 +-
.../manage/group-add-edit.component.ts | 30 +-
.../organizations/manage/groups.component.ts | 26 +-
.../manage/user-confirm.component.ts | 2 +-
.../components/bulk/bulk-confirm.component.ts | 6 +-
.../bulk/bulk-enable-sm-dialog.component.ts | 8 +-
.../components/bulk/bulk-remove.component.ts | 4 +-
.../bulk/bulk-restore-revoke.component.ts | 6 +-
.../member-dialog.component.html | 2 +-
.../member-dialog/member-dialog.component.ts | 52 +-
.../nested-checkbox.component.ts | 2 +-
...eached-with-upgrade-path.validator.spec.ts | 16 +-
...mit-reached-with-upgrade-path.validator.ts | 10 +-
...-reached-without-upgrade-path.validator.ts | 10 +-
.../components/reset-password.component.html | 2 +-
.../components/reset-password.component.ts | 26 +-
.../members/people.component.html | 2 +-
.../organizations/members/people.component.ts | 44 +-
.../organization-routing.module.ts | 6 +-
.../policies/master-password.component.ts | 2 +-
.../policies/password-generator.component.ts | 5 +-
.../policies/policies.component.ts | 4 +-
.../policies/policy-edit.component.ts | 8 +-
.../policies/reset-password.component.ts | 5 +-
.../policies/single-org.component.ts | 7 +-
.../reporting/reporting.component.ts | 9 +-
.../reporting/reports-home.component.ts | 6 +-
.../settings/account.component.ts | 18 +-
.../delete-organization-dialog.component.html | 4 +-
.../delete-organization-dialog.component.ts | 12 +-
.../organization-settings-routing.module.ts | 4 +-
.../settings/settings.component.ts | 7 +-
.../settings/two-factor-setup.component.ts | 4 +-
.../access-selector.component.html | 2 +-
.../access-selector.component.spec.ts | 4 +-
.../access-selector.component.ts | 8 +-
.../access-selector/access-selector.models.ts | 65 +-
.../access-selector.stories.ts | 6 +-
...families-for-enterprise-setup.component.ts | 8 +-
.../exposed-passwords-report.component.ts | 2 +-
.../inactive-two-factor-report.component.ts | 2 +-
.../reused-passwords-report.component.ts | 2 +-
.../organizations/tools/tools.component.ts | 2 +-
.../unsecured-websites-report.component.ts | 2 +-
.../org-vault-export.component.ts | 6 +-
.../tools/weak-passwords-report.component.ts | 4 +-
.../enroll-master-password-reset.component.ts | 6 +-
.../providers/providers.component.ts | 5 +-
.../settings/sponsored-families.component.ts | 8 +-
.../sponsoring-org-row.component.html | 4 +-
.../settings/sponsoring-org-row.component.ts | 8 +-
apps/web/src/app/app.component.ts | 8 +-
.../app/auth/accept-organization.component.ts | 22 +-
.../rotateable-key-set.service.spec.ts | 2 +-
.../services/rotateable-key-set.service.ts | 2 +-
.../webauthn-login-admin-api.service.ts | 2 +-
.../webauthn-login-admin.service.spec.ts | 2 +-
.../webauthn-login-admin.service.ts | 25 +-
.../views/credential-create-options.view.ts | 5 +-
.../pending-webauthn-login-credential.view.ts | 2 +-
.../views/webauthn-login-credential.view.ts | 2 +-
.../accept/accept-emergency.component.ts | 4 +-
.../services/emergency-access-api.service.ts | 14 +-
.../services/emergency-access.service.spec.ts | 18 +-
.../services/emergency-access.service.ts | 12 +-
apps/web/src/app/auth/hint.component.ts | 2 +-
apps/web/src/app/auth/lock.component.html | 2 +-
apps/web/src/app/auth/lock.component.ts | 4 +-
.../login/login-via-auth-request.component.ts | 4 +-
.../web/src/app/auth/login/login.component.ts | 12 +-
.../migrate-legacy-encryption.component.ts | 11 +-
.../migrate-legacy-encryption.service.spec.ts | 42 +-
.../migrate-legacy-encryption.service.ts | 18 +-
.../src/app/auth/recover-delete.component.ts | 4 +-
.../app/auth/recover-two-factor.component.ts | 4 +-
.../register-form/register-form.component.ts | 8 +-
.../app/auth/remove-password.component.html | 2 +-
.../src/app/auth/set-password.component.ts | 4 +-
.../settings/change-password.component.ts | 22 +-
.../deauthorize-sessions.component.ts | 4 +-
.../emergency-access-attachments.component.ts | 4 +-
.../emergency-access-confirm.component.ts | 2 +-
.../emergency-access-add-edit.component.ts | 6 +-
.../emergency-access.component.ts | 26 +-
.../emergency-access-takeover.component.ts | 8 +-
.../view/emergency-access-view.component.ts | 6 +-
.../emergency-add-edit-cipher.component.ts | 4 +-
.../two-factor-authenticator.component.ts | 4 +-
.../settings/two-factor-base.component.ts | 6 +-
.../auth/settings/two-factor-duo.component.ts | 6 +-
.../settings/two-factor-email.component.html | 2 +-
.../settings/two-factor-email.component.ts | 4 +-
.../settings/two-factor-recovery.component.ts | 2 +-
.../settings/two-factor-setup.component.ts | 6 +-
.../settings/two-factor-verify.component.ts | 2 +-
.../two-factor-webauthn.component.html | 2 +-
.../settings/two-factor-webauthn.component.ts | 4 +-
.../two-factor-yubikey.component.html | 2 +-
.../settings/two-factor-yubikey.component.ts | 4 +-
.../auth/settings/verify-email.component.ts | 4 +-
.../create-credential-dialog.component.html | 2 +-
.../create-credential-dialog.component.ts | 16 +-
.../delete-credential-dialog.component.ts | 6 +-
.../webauthn-login-settings.component.ts | 2 +-
.../user-verification-prompt.component.ts | 8 +-
apps/web/src/app/auth/sso.component.ts | 4 +-
.../confirmation-details.component.html | 4 +-
.../trial-initiation.component.html | 2 +-
.../trial-initiation.component.spec.ts | 6 +-
.../trial-initiation.component.ts | 4 +-
.../app/auth/two-factor-options.component.ts | 2 +-
.../src/app/auth/two-factor.component.html | 2 +-
apps/web/src/app/auth/two-factor.component.ts | 6 +-
.../src/app/auth/update-password.component.ts | 4 +-
.../app/auth/verify-email-token.component.ts | 4 +-
.../auth/verify-recover-delete.component.ts | 4 +-
.../trial-initiation/billing.component.html | 8 +-
.../billing-history-view.component.ts | 2 +-
.../billing/individual/premium.component.html | 18 +-
.../billing/individual/premium.component.ts | 8 +-
.../individual/subscription.component.ts | 2 +-
.../user-subscription.component.html | 12 +-
.../individual/user-subscription.component.ts | 4 +-
.../adjust-subscription.component.html | 4 +-
.../adjust-subscription.component.ts | 8 +-
.../billing-sync-api-key.component.html | 4 +-
.../billing-sync-api-key.component.ts | 4 +-
.../billing-sync-key.component.ts | 8 +-
.../download-license.component.ts | 4 +-
...nization-billing-history-view.component.ts | 4 +-
.../organization-billing-tab.component.ts | 6 +-
.../organization-plans.component.html | 70 +-
.../organization-plans.component.ts | 26 +-
...nization-subscription-cloud.component.html | 12 +-
...ganization-subscription-cloud.component.ts | 20 +-
...ation-subscription-selfhost.component.html | 6 +-
...ization-subscription-selfhost.component.ts | 8 +-
.../sm-adjust-subscription.component.html | 22 +-
.../sm-adjust-subscription.component.ts | 8 +-
.../sm-subscribe-standalone.component.ts | 6 +-
.../subscription-hidden.component.ts | 2 +-
.../billing/shared/add-credit.component.ts | 2 +-
.../shared/adjust-payment.component.ts | 4 +-
.../shared/adjust-storage.component.html | 2 +-
.../shared/adjust-storage.component.ts | 10 +-
.../shared/billing-history.component.html | 12 +-
.../shared/payment-method.component.html | 6 +-
.../shared/payment-method.component.ts | 6 +-
.../app/billing/shared/payment.component.ts | 10 +-
.../shared/sm-subscribe.component.html | 17 +-
.../billing/shared/sm-subscribe.component.ts | 2 +-
.../app/billing/shared/tax-info.component.ts | 6 +-
.../shared/update-license.component.ts | 6 +-
.../src/app/common/base.accept.component.ts | 6 +-
.../environment-selector.component.ts | 5 +-
.../components/selectable-avatar.component.ts | 2 +-
apps/web/src/app/core/event.service.ts | 81 ++-
.../src/app/core/guards/has-premium.guard.ts | 2 +-
apps/web/src/app/core/init.service.ts | 2 +-
apps/web/src/app/core/modal.service.ts | 2 +-
apps/web/src/app/core/router.service.ts | 2 +-
apps/web/src/app/core/state/state.service.ts | 14 +-
.../app/core/web-platform-utils.service.ts | 4 +-
.../web/src/app/layouts/footer.component.html | 2 +-
.../layouts/frontend-layout.component.html | 2 +-
.../web/src/app/layouts/navbar.component.html | 2 +-
apps/web/src/app/layouts/navbar.component.ts | 4 +-
.../product-switcher-content.component.ts | 4 +-
.../product-switcher.stories.ts | 4 +-
apps/web/src/app/oss-routing.module.ts | 6 +-
.../pages/breach-report.component.html | 8 +-
.../reports/pages/breach-report.component.ts | 5 +-
.../reports/pages/cipher-report.component.ts | 4 +-
.../exposed-passwords-report.component.html | 6 +-
.../exposed-passwords-report.component.ts | 2 +-
.../inactive-two-factor-report.component.html | 4 +-
...active-two-factor-report.component.spec.ts | 4 +-
.../inactive-two-factor-report.component.ts | 2 +-
.../reused-passwords-report.component.html | 6 +-
.../reused-passwords-report.component.ts | 4 +-
.../unsecured-websites-report.component.html | 4 +-
.../unsecured-websites-report.component.ts | 4 +-
.../weak-passwords-report.component.html | 4 +-
.../pages/weak-passwords-report.component.ts | 6 +-
.../web/src/app/settings/account.component.ts | 2 +-
.../web/src/app/settings/api-key.component.ts | 2 +-
.../app/settings/change-avatar.component.ts | 2 +-
.../app/settings/change-email.component.html | 2 +-
.../app/settings/change-email.component.ts | 14 +-
.../change-kdf-confirmation.component.ts | 8 +-
.../change-kdf/change-kdf.component.html | 4 +-
.../change-kdf/change-kdf.component.ts | 7 +-
.../app/settings/delete-account.component.ts | 4 +-
.../app/settings/domain-rules.component.html | 2 +-
.../app/settings/domain-rules.component.ts | 2 +-
.../app/settings/preferences.component.html | 6 +-
.../src/app/settings/preferences.component.ts | 14 +-
.../web/src/app/settings/profile.component.ts | 4 +-
.../app/settings/security-keys.component.ts | 2 +-
.../src/app/settings/settings.component.ts | 2 +-
.../account-fingerprint.component.ts | 2 +-
apps/web/src/app/tools/generator.component.ts | 4 +-
.../app/tools/import/import-web.component.ts | 2 +-
.../password-generator-history.component.html | 2 +-
.../password-generator-history.component.ts | 2 +-
.../src/app/tools/send/access.component.html | 4 +-
.../src/app/tools/send/access.component.ts | 6 +-
.../src/app/tools/send/add-edit.component.ts | 4 +-
.../tools/send/send-access-file.component.ts | 4 +-
.../tools/send/send-access-text.component.ts | 6 +-
.../src/app/tools/send/send.component.html | 4 +-
apps/web/src/app/tools/send/send.component.ts | 4 +-
apps/web/src/app/tools/tools.component.ts | 5 +-
.../tools/vault-export/export.component.ts | 8 +-
.../collection-dialog.component.ts | 37 +-
.../vault-cipher-row.component.html | 4 +-
.../vault-items/vault-cipher-row.component.ts | 5 +-
.../vault-collection-row.component.html | 4 +-
.../vault-collection-row.component.ts | 5 +-
.../vault-items/vault-items.component.ts | 4 +-
.../vault/core/collection-admin.service.ts | 32 +-
.../individual-vault/add-edit.component.html | 12 +-
.../individual-vault/add-edit.component.ts | 12 +-
.../individual-vault/attachments.component.ts | 4 +-
.../bulk-delete-dialog.component.html | 6 +-
.../bulk-delete-dialog.component.ts | 16 +-
.../bulk-move-dialog.component.html | 2 +-
.../bulk-move-dialog.component.ts | 6 +-
.../bulk-share-dialog.component.html | 2 +-
.../bulk-share-dialog.component.ts | 14 +-
.../individual-vault/collections.component.ts | 2 +-
.../folder-add-edit.component.ts | 10 +-
.../organization-name-badge.component.html | 2 +-
.../organization-name-badge.component.ts | 2 +-
.../vault/individual-vault/share.component.ts | 4 +-
.../components/link-sso.directive.ts | 4 +-
.../organization-options.component.ts | 10 +-
.../components/vault-filter.component.ts | 10 +-
.../abstractions/vault-filter.service.ts | 2 +-
.../routed-vault-filter-bridge.service.ts | 34 +-
.../services/routed-vault-filter.service.ts | 2 +-
.../services/vault-filter.service.spec.ts | 4 +-
.../services/vault-filter.service.ts | 26 +-
.../vault-filter-section.component.ts | 7 +-
.../routed-vault-filter-bridge.model.ts | 2 +-
.../shared/models/vault-filter.model.spec.ts | 12 +-
.../vault-header/vault-header.component.html | 2 +-
.../vault-header/vault-header.component.ts | 11 +-
.../vault/individual-vault/vault.component.ts | 68 +-
.../app/vault/org-vault/add-edit.component.ts | 4 +-
.../vault/org-vault/attachments.component.ts | 6 +-
.../bulk-collections-dialog.component.ts | 12 +-
.../collection-name-badge.component.html | 2 +-
.../vault/org-vault/collections.component.ts | 2 +-
.../vault-filter/vault-filter.service.ts | 6 +-
.../vault-header/vault-header.component.ts | 6 +-
.../app/vault/org-vault/vault.component.ts | 82 +--
.../vault/settings/purge-vault.component.ts | 2 +-
.../src/app/vault/utils/collection-utils.ts | 6 +-
apps/web/src/connectors/captcha-mobile.html | 2 +-
apps/web/src/connectors/captcha.html | 2 +-
apps/web/src/connectors/captcha.ts | 2 +-
apps/web/src/connectors/common.ts | 2 +-
apps/web/src/connectors/duo.html | 2 +-
apps/web/src/connectors/sso.html | 2 +-
.../web/src/connectors/webauthn-fallback.html | 2 +-
apps/web/src/connectors/webauthn-mobile.html | 2 +-
apps/web/src/connectors/webauthn.html | 2 +-
apps/web/src/connectors/webauthn.ts | 2 +-
apps/web/src/index.html | 2 +-
.../admin-auth-request-update.request.ts | 5 +-
.../organization-auth-request.service.ts | 8 +-
.../device-approvals.component.html | 4 +-
.../device-approvals.component.ts | 26 +-
.../domain-add-edit-dialog.component.ts | 14 +-
.../domain-verification.component.html | 2 +-
.../domain-verification.component.ts | 10 +-
.../organizations/manage/scim.component.ts | 10 +-
.../maximum-vault-timeout.component.ts | 5 +-
.../clients/add-organization.component.ts | 6 +-
.../providers/clients/clients.component.html | 2 +-
.../providers/clients/clients.component.ts | 14 +-
.../guards/provider-permissions.guard.spec.ts | 4 +-
.../guards/provider-permissions.guard.ts | 2 +-
.../manage/accept-provider.component.ts | 6 +-
.../providers/manage/events.component.html | 2 +-
.../providers/manage/events.component.ts | 6 +-
.../providers/manage/manage.component.ts | 5 +-
.../providers/manage/people.component.html | 2 +-
.../providers/manage/people.component.ts | 18 +-
.../manage/user-add-edit.component.html | 2 +-
.../manage/user-add-edit.component.ts | 8 +-
.../providers/providers-layout.component.ts | 5 +-
.../services/web-provider.service.ts | 2 +-
.../providers/settings/account.component.ts | 2 +-
.../providers/settings/settings.component.ts | 5 +-
.../providers/setup/setup.component.ts | 4 +-
.../bit-web/src/app/auth/sso/sso.component.ts | 14 +-
.../app/secrets-manager/guards/sm.guard.ts | 2 +-
.../layout/navigation.component.ts | 7 +-
.../layout/org-switcher.component.ts | 9 +-
.../overview/onboarding.component.html | 2 +-
.../overview/overview.component.html | 4 +-
.../overview/overview.component.ts | 26 +-
.../dialog/project-delete-dialog.component.ts | 4 +-
.../dialog/project-dialog.component.ts | 4 +-
.../projects/project.service.ts | 16 +-
.../project/project-people.component.ts | 18 +-
.../project/project-secrets.component.ts | 10 +-
.../project-service-accounts.component.ts | 14 +-
.../projects/project/project.component.ts | 8 +-
.../projects/projects/projects.component.ts | 6 +-
.../secrets/dialog/secret-delete.component.ts | 2 +-
.../secrets/dialog/secret-dialog.component.ts | 6 +-
.../secrets-manager/secrets/secret.service.ts | 32 +-
.../secrets/secrets.component.ts | 6 +-
.../access/access-list.component.html | 4 +-
.../access/access-tokens.component.ts | 18 +-
.../service-accounts/access/access.service.ts | 24 +-
.../access-token-create-dialog.component.ts | 12 +-
.../access-token-dialog.component.html | 6 +-
.../dialogs/access-token-dialog.component.ts | 4 +-
.../dialogs/expiration-options.component.html | 4 +-
.../dialogs/expiration-options.component.ts | 5 +-
...service-account-delete-dialog.component.ts | 4 +-
.../service-account-dialog.component.ts | 10 +-
.../service-account-event-log-api.service.ts | 4 +-
.../service-accounts-events.component.html | 2 +-
.../service-accounts-events.component.ts | 6 +-
.../guards/service-account-access.guard.ts | 2 +-
.../service-account-people.component.ts | 10 +-
.../service-account-projects.component.ts | 10 +-
.../service-account.component.ts | 14 +-
.../service-account.service.ts | 32 +-
.../service-accounts-list.component.html | 2 +-
.../service-accounts-list.component.ts | 6 +-
.../service-accounts.component.ts | 6 +-
.../sm-import-error-dialog.component.ts | 2 +-
.../settings/porting/sm-export.component.html | 2 +-
.../settings/porting/sm-export.component.ts | 4 +-
.../settings/porting/sm-import.component.ts | 16 +-
.../services/sm-porting-api.service.ts | 22 +-
.../access-policy-selector.component.ts | 4 +-
.../access-policy-selector.service.spec.ts | 4 +-
.../access-policy-selector.service.ts | 6 +-
.../models/ap-item-value.type.ts | 2 +-
.../models/ap-item-view.type.ts | 45 +-
.../access-policies/access-policy.service.ts | 104 +--
.../access-selector.component.ts | 11 +-
.../access-removal-dialog.component.ts | 6 +-
.../project-access-policies.response.ts | 6 +-
...project-people-access-policies.response.ts | 4 +-
...rvice-accounts-access-policies.response.ts | 4 +-
.../bulk-confirmation-dialog.component.ts | 4 +-
.../dialogs/bulk-status-dialog.component.ts | 7 +-
.../shared/header.component.ts | 6 +-
.../secrets-manager/shared/header.stories.ts | 6 +-
.../shared/new-menu.component.ts | 2 +-
.../shared/org-suspended.component.ts | 7 +-
.../shared/projects-list.component.html | 2 +-
.../shared/projects-list.component.ts | 10 +-
.../shared/secrets-list.component.html | 4 +-
.../shared/secrets-list.component.ts | 22 +-
.../dialog/secret-hard-delete.component.ts | 2 +-
.../trash/dialog/secret-restore.component.ts | 2 +-
.../secrets-manager/trash/trash.component.ts | 4 +-
.../components/collections.component.ts | 8 +-
.../not-allowed-value-async.validator.ts | 2 +-
...base-login-decryption-options.component.ts | 18 +-
.../base-login-via-webauthn.component.ts | 4 +-
.../components/captcha-protected.component.ts | 4 +-
.../components/change-password.component.ts | 20 +-
.../environment-selector.component.ts | 8 +-
.../auth/components/environment.component.ts | 2 +-
.../src/auth/components/hint.component.ts | 6 +-
.../src/auth/components/lock.component.ts | 36 +-
.../login-via-auth-request.component.ts | 30 +-
.../src/auth/components/login.component.ts | 10 +-
.../src/auth/components/register.component.ts | 26 +-
.../components/remove-password.component.ts | 4 +-
.../auth/components/set-password.component.ts | 20 +-
.../src/auth/components/set-pin.component.ts | 4 +-
.../src/auth/components/sso.component.spec.ts | 24 +-
.../src/auth/components/sso.component.ts | 34 +-
.../two-factor-options.component.ts | 2 +-
.../components/two-factor.component.spec.ts | 22 +-
.../auth/components/two-factor.component.ts | 28 +-
.../components/update-password.component.ts | 12 +-
.../update-temp-password.component.ts | 16 +-
.../user-verification-prompt.component.ts | 2 +-
.../components/user-verification.component.ts | 2 +-
libs/angular/src/auth/guards/auth.guard.ts | 2 +-
libs/angular/src/auth/guards/lock.guard.ts | 2 +-
libs/angular/src/auth/guards/unauth.guard.ts | 5 +-
.../src/components/callout.component.html | 6 +-
.../modal/dynamic-modal.component.ts | 4 +-
.../src/components/modal/modal-injector.ts | 7 +-
.../settings/vault-timeout-input.component.ts | 10 +-
.../angular/src/components/share.component.ts | 14 +-
.../src/components/toastr.component.ts | 5 +-
.../src/directives/a11y-invalid.directive.ts | 5 +-
.../src/directives/a11y-title.directive.ts | 5 +-
.../src/directives/api-action.directive.ts | 4 +-
.../src/directives/autofocus.directive.ts | 5 +-
.../src/directives/box-row.directive.ts | 6 +-
.../cipherListVirtualScroll.directive.ts | 8 +-
.../src/directives/copy-text.directive.ts | 5 +-
.../directives/if-feature.directive.spec.ts | 2 +-
.../src/directives/if-feature.directive.ts | 2 +-
.../directives/input-verbatim.directive.ts | 5 +-
.../src/directives/not-premium.directive.ts | 2 +-
.../src/directives/premium.directive.ts | 2 +-
.../directives/true-false-value.directive.ts | 5 +-
libs/angular/src/pipes/color-password.pipe.ts | 2 +-
libs/angular/src/pipes/search.pipe.ts | 6 +-
.../platform/guard/feature-flag.guard.spec.ts | 8 +-
.../src/platform/guard/feature-flag.guard.ts | 2 +-
.../services/theming/theme-builder.ts | 5 +-
.../services/theming/theming.service.ts | 8 +-
.../src/scss/bwicons/styles/style.scss | 3 +-
libs/angular/src/services/injection-tokens.ts | 2 +-
.../src/services/jslib-services.module.ts | 6 +-
libs/angular/src/services/modal.service.ts | 10 +-
.../password-strength.component.ts | 4 +-
.../export-scope-callout.component.html | 2 +-
.../export-scope-callout.component.ts | 2 +-
.../export/components/export.component.ts | 6 +-
.../components/generator.component.ts | 10 +-
.../password-generator-history.component.ts | 4 +-
.../src/tools/send/add-edit.component.ts | 20 +-
libs/angular/src/tools/send/send.component.ts | 4 +-
.../src/utils/form-selection-list.spec.ts | 10 +-
libs/angular/src/utils/form-selection-list.ts | 8 +-
.../add-edit-custom-fields.component.ts | 6 +-
.../vault/components/add-edit.component.ts | 26 +-
.../vault/components/attachments.component.ts | 20 +-
.../components/folder-add-edit.component.ts | 6 +-
.../src/vault/components/icon.component.ts | 2 +-
.../components/password-history.component.ts | 6 +-
.../src/vault/components/premium.component.ts | 2 +-
.../vault/components/vault-items.component.ts | 7 +-
.../view-custom-fields.component.ts | 2 +-
.../src/vault/components/view.component.ts | 20 +-
.../services/vault-filter.service.ts | 12 +-
.../src/models/domain/rotateable-key-set.ts | 2 +-
.../password-callout.component.html | 6 +-
libs/common/spec/fake-state-provider.ts | 4 +-
libs/common/spec/fake-state.ts | 12 +-
libs/common/spec/matchers/to-equal-buffer.ts | 2 +-
libs/common/spec/utils.ts | 2 +-
libs/common/src/abstractions/api.service.ts | 94 +--
.../event/event-collection.service.ts | 2 +-
.../common/src/abstractions/search.service.ts | 2 +-
.../vault-timeout-settings.service.ts | 2 +-
.../org-domain-api.service.abstraction.ts | 4 +-
.../organization-user.service.ts | 36 +-
.../organization-api.service.abstraction.ts | 10 +-
.../organization.service.abstraction.ts | 6 +-
.../policy/policy-api.service.abstraction.ts | 2 +-
.../policy/policy.service.abstraction.ts | 8 +-
.../models/data/organization.data.ts | 2 +-
.../domain/encrypted-organization-key.ts | 5 +-
.../organization-connection.request.ts | 2 +-
.../provider-organization-create.request.ts | 2 +-
.../models/request/scim-config.request.ts | 5 +-
.../organization-connection.response.ts | 2 +-
.../models/response/organization.response.ts | 4 +-
.../response/profile-organization.response.ts | 8 +-
.../org-domain-api.service.spec.ts | 4 +-
.../org-domain-api.service.ts | 20 +-
.../org-domain.service.spec.ts | 12 +-
.../organization-domain/org-domain.service.ts | 8 +-
...rganization-user.service.implementation.ts | 82 +--
.../organization/organization-api.service.ts | 57 +-
.../organization/organization.service.spec.ts | 2 +-
.../organization/organization.service.ts | 4 +-
.../services/policy/policy-api.service.ts | 27 +-
.../services/policy/policy.service.ts | 26 +-
...auth-request-crypto.service.abstraction.ts | 8 +-
.../src/auth/abstractions/auth.service.ts | 6 +-
...device-trust-crypto.service.abstraction.ts | 2 +-
.../devices-api.service.abstraction.ts | 4 +-
.../devices/devices.service.abstraction.ts | 2 +-
.../abstractions/key-connector.service.ts | 2 +-
.../src/auth/abstractions/token.service.ts | 2 +-
.../user-verification.service.abstraction.ts | 2 +-
.../webauthn-login.service.abstraction.ts | 2 +-
libs/common/src/auth/captcha-iframe.ts | 6 +-
libs/common/src/auth/iframe-component.ts | 4 +-
.../auth-request-login.strategy.spec.ts | 8 +-
.../auth-request-login.strategy.ts | 10 +-
.../login-strategies/login.strategy.spec.ts | 28 +-
.../auth/login-strategies/login.strategy.ts | 8 +-
.../password-login.strategy.spec.ts | 16 +-
.../password-login.strategy.ts | 26 +-
.../sso-login.strategy.spec.ts | 22 +-
.../login-strategies/sso-login.strategy.ts | 14 +-
.../user-api-login.strategy.spec.ts | 4 +-
.../user-api-login.strategy.ts | 8 +-
.../webauthn-login.strategy.spec.ts | 20 +-
.../webauthn-login.strategy.ts | 8 +-
.../src/auth/models/api/sso-config.api.ts | 4 +-
.../auth/models/domain/login-credentials.ts | 13 +-
.../trusted-device-user-decryption-option.ts | 2 +-
.../models/request/create-auth.request.ts | 2 +-
.../identity-token/password-token.request.ts | 2 +-
.../identity-token/sso-token.request.ts | 2 +-
.../token-two-factor.request.ts | 2 +-
.../request/identity-token/token.request.ts | 5 +-
.../identity-token/user-api-token.request.ts | 2 +-
.../webauthn-login-token.request.ts | 2 +-
.../request/passwordless-auth.request.ts | 2 +-
.../request/set-key-connector-key.request.ts | 2 +-
.../models/request/set-password.request.ts | 2 +-
.../models/response/auth-request.response.ts | 4 +-
.../response/device-verification.response.ts | 4 +-
.../response/identity-token.response.ts | 4 +-
.../response/identity-two-factor.response.ts | 2 +-
...-device-user-decryption-option.response.ts | 2 +-
.../user-decryption-options.response.ts | 6 +-
...login-credential-assertion-options.view.ts | 5 +-
...ebauthn-login-credential-assertion.view.ts | 2 +-
.../src/auth/services/account-api.service.ts | 2 +-
.../src/auth/services/account.service.ts | 12 +-
.../auth/services/anonymous-hub.service.ts | 4 +-
...h-request-crypto.service.implementation.ts | 18 +-
.../auth-request-crypto.service.spec.ts | 18 +-
libs/common/src/auth/services/auth.service.ts | 28 +-
...ice-trust-crypto.service.implementation.ts | 23 +-
.../device-trust-crypto.service.spec.ts | 44 +-
.../devices-api.service.implementation.ts | 16 +-
.../devices/devices.service.implementation.ts | 10 +-
.../requests/trusted-device-keys.request.ts | 2 +-
.../auth/services/key-connector.service.ts | 10 +-
...-enrollment.service.implementation.spec.ts | 10 +-
...reset-enrollment.service.implementation.ts | 9 +-
.../common/src/auth/services/token.service.ts | 2 +-
.../src/auth/services/two-factor.service.ts | 2 +-
.../user-verification.service.ts | 10 +-
.../webauthn-login-api.service.ts | 7 +-
.../webauthn-login-prf-crypto.service.spec.ts | 2 +-
.../webauthn-login.service.spec.ts | 16 +-
.../webauthn-login/webauthn-login.service.ts | 13 +-
libs/common/src/auth/webauthn-iframe.ts | 6 +-
.../billing/models/response/plan.response.ts | 4 +-
.../request/organization-import.request.ts | 2 +-
.../src/models/request/register.request.ts | 2 +-
.../src/models/response/base.response.ts | 2 +-
.../src/models/response/domains.response.ts | 2 +-
.../src/models/response/profile.response.ts | 2 +-
.../config/config.service.abstraction.ts | 6 +-
.../abstractions/crypto-function.service.ts | 24 +-
.../platform/abstractions/crypto.service.ts | 14 +-
.../platform/abstractions/encrypt.service.ts | 4 +-
.../file-upload/file-upload.service.ts | 2 +-
.../abstractions/platform-utils.service.ts | 2 +-
.../platform/abstractions/state.service.ts | 58 +-
.../src/platform/factories/state-factory.ts | 4 +-
libs/common/src/platform/misc/flags.ts | 2 +-
libs/common/src/platform/misc/throttle.ts | 2 +-
libs/common/src/platform/misc/utils.spec.ts | 42 +-
libs/common/src/platform/misc/utils.ts | 14 +-
.../models/domain/account-keys.spec.ts | 2 +-
.../src/platform/models/domain/account.ts | 18 +-
.../src/platform/models/domain/domain-base.ts | 6 +-
.../models/domain/enc-array-buffer.ts | 4 +-
.../platform/models/domain/enc-string.spec.ts | 8 +-
.../src/platform/models/domain/enc-string.ts | 2 +-
.../src/platform/models/domain/state.spec.ts | 2 +-
.../src/platform/models/domain/state.ts | 6 +-
.../services/config/config-api.service.ts | 5 +-
.../services/config/config.service.spec.ts | 8 +-
.../services/config/config.service.ts | 14 +-
.../platform/services/console-log.service.ts | 2 +-
.../platform/services/container.service.ts | 5 +-
.../platform/services/crypto.service.spec.ts | 10 +-
.../src/platform/services/crypto.service.ts | 50 +-
.../encrypt.service.implementation.ts | 10 +-
.../cryptography/get-class-initializer.ts | 2 +-
...tithread-encrypt.service.implementation.ts | 12 +-
.../platform/services/encrypt.service.spec.ts | 16 +-
.../platform/services/environment.service.ts | 4 +-
.../file-upload/azure-file-upload.service.ts | 14 +-
.../bitwarden-file-upload.service.ts | 4 +-
.../file-upload/file-upload.service.ts | 6 +-
.../src/platform/services/i18n.service.ts | 2 +-
.../services/noop-notifications.service.ts | 2 +-
.../src/platform/services/state.service.ts | 672 +++++++++---------
.../src/platform/services/system.service.ts | 2 +-
.../platform/services/translation.service.ts | 4 +-
.../platform/services/validation.service.ts | 2 +-
.../web-crypto-function.service.spec.ts | 34 +-
.../services/web-crypto-function.service.ts | 28 +-
.../common/src/platform/state/global-state.ts | 2 +-
.../implementations/default-derived-state.ts | 4 +-
.../default-global-state.provider.ts | 4 +-
.../default-global-state.spec.ts | 4 +-
.../implementations/default-global-state.ts | 14 +-
.../default-user-state.provider.ts | 4 +-
.../default-user-state.spec.ts | 14 +-
.../implementations/default-user-state.ts | 24 +-
.../platform/state/implementations/util.ts | 2 +-
.../src/platform/state/key-definition.spec.ts | 4 +-
.../src/platform/state/key-definition.ts | 8 +-
.../src/platform/state/state-definition.ts | 5 +-
.../platform/state/state-update-options.ts | 2 +-
libs/common/src/platform/state/user-state.ts | 9 +-
.../services/account/avatar-update.service.ts | 5 +-
libs/common/src/services/api.service.ts | 238 +++----
libs/common/src/services/audit.service.ts | 2 +-
.../event/event-collection.service.ts | 4 +-
.../services/event/event-upload.service.ts | 2 +-
.../src/services/notifications.service.ts | 10 +-
.../src/services/policy.service.spec.ts | 34 +-
libs/common/src/services/search.service.ts | 7 +-
libs/common/src/services/settings.service.ts | 2 +-
.../vault-timeout-settings.service.spec.ts | 10 +-
.../vault-timeout-settings.service.ts | 2 +-
.../vault-timeout.service.spec.ts | 16 +-
.../vault-timeout/vault-timeout.service.ts | 6 +-
libs/common/src/state-migrations/migrate.ts | 6 +-
.../migration-builder.spec.ts | 2 +-
.../src/state-migrations/migration-builder.ts | 20 +-
.../state-migrations/migration-helper.spec.ts | 2 +-
.../src/state-migrations/migration-helper.ts | 4 +-
...e-biometric-auto-prompt-to-account.spec.ts | 4 +-
.../migrations/8-move-state-version.spec.ts | 2 +-
.../9-move-browser-settings-to-global.spec.ts | 2 +-
.../9-move-browser-settings-to-global.ts | 10 +-
libs/common/src/state-migrations/migrator.ts | 5 +-
...password-generation.service.abstraction.ts | 4 +-
.../password/password-generation.service.ts | 10 +-
.../username/username-generation.service.ts | 2 +-
.../password-strength.service.ts | 2 +-
.../tools/send/models/domain/send-access.ts | 4 +-
.../src/tools/send/models/domain/send-file.ts | 4 +-
.../src/tools/send/models/domain/send-text.ts | 4 +-
.../src/tools/send/models/domain/send.ts | 4 +-
.../src/tools/send/models/view/send.view.ts | 2 +-
.../services/send-api.service.abstraction.ts | 4 +-
.../tools/send/services/send-api.service.ts | 24 +-
.../send/services/send.service.abstraction.ts | 2 +-
.../src/tools/send/services/send.service.ts | 14 +-
.../src/vault/abstractions/cipher.service.ts | 16 +-
...fido2-authenticator.service.abstraction.ts | 4 +-
.../fido2/fido2-client.service.abstraction.ts | 4 +-
...ido2-user-interface.service.abstraction.ts | 6 +-
.../file-upload/cipher-file-upload.service.ts | 2 +-
.../src/vault/icon/build-cipher-icon.ts | 2 +-
.../vault/linked-field-option.decorator.ts | 5 +-
libs/common/src/vault/models/api/login.api.ts | 2 +-
.../vault/models/domain/attachment.spec.ts | 2 +-
.../src/vault/models/domain/attachment.ts | 6 +-
libs/common/src/vault/models/domain/card.ts | 4 +-
.../src/vault/models/domain/cipher.spec.ts | 16 +-
libs/common/src/vault/models/domain/cipher.ts | 4 +-
.../src/vault/models/domain/collection.ts | 4 +-
.../vault/models/domain/fido2-credential.ts | 8 +-
libs/common/src/vault/models/domain/field.ts | 6 +-
libs/common/src/vault/models/domain/folder.ts | 4 +-
.../src/vault/models/domain/identity.ts | 4 +-
.../src/vault/models/domain/login-uri.ts | 6 +-
libs/common/src/vault/models/domain/login.ts | 6 +-
.../src/vault/models/domain/password.ts | 2 +-
.../models/domain/sorted-ciphers-cache.ts | 4 +-
.../common/src/vault/models/view/card.view.ts | 4 +-
.../src/vault/models/view/collection.view.ts | 4 +-
.../vault/models/view/login-uri-view.spec.ts | 8 +-
.../src/vault/models/view/login-uri.view.ts | 2 +-
.../src/vault/models/view/login.view.ts | 2 +-
libs/common/src/vault/service-utils.spec.ts | 4 +-
libs/common/src/vault/service-utils.ts | 10 +-
.../src/vault/services/cipher.service.spec.ts | 8 +-
.../src/vault/services/cipher.service.ts | 107 +--
.../src/vault/services/collection.service.ts | 2 +-
libs/common/src/vault/services/fido2/cbor.ts | 4 +-
.../src/vault/services/fido2/ecdsa-utils.ts | 2 +-
.../fido2/fido2-authenticator.service.spec.ts | 42 +-
.../fido2/fido2-authenticator.service.ts | 74 +-
.../fido2/fido2-client.service.spec.ts | 10 +-
.../services/fido2/fido2-client.service.ts | 36 +-
.../file-upload/cipher-file-upload.service.ts | 23 +-
.../services/folder/folder-api.service.ts | 5 +-
.../services/folder/folder.service.spec.ts | 2 +-
.../vault/services/folder/folder.service.ts | 4 +-
.../src/vault/services/sync/sync.service.ts | 6 +-
.../common/src/vault/services/totp.service.ts | 4 +-
.../common/src/vault/types/sync-event-args.ts | 2 +-
.../src/async-actions/bit-action.directive.ts | 4 +-
.../src/async-actions/bit-submit.directive.ts | 6 +-
.../async-actions/form-button.directive.ts | 2 +-
.../components/src/avatar/avatar.component.ts | 4 +-
.../src/badge-list/badge-list.component.html | 2 +-
.../src/breadcrumbs/breadcrumbs.stories.ts | 2 +-
.../src/button/button.component.spec.ts | 8 +-
.../src/checkbox/checkbox.component.ts | 6 +-
.../src/dialog/dialog.service.stories.ts | 5 +-
libs/components/src/dialog/dialog.service.ts | 6 +-
.../src/dialog/dialog/dialog.component.ts | 2 +-
.../simple-configurable-dialog.component.ts | 4 +-
...ple-configurable-dialog.service.stories.ts | 5 +-
.../simple-dialog.service.stories.ts | 5 +-
.../form-control/form-control.component.ts | 2 +-
.../src/form-field/error-summary.component.ts | 2 +-
.../password-input-toggle.directive.ts | 2 +-
libs/components/src/index.html | 2 +-
libs/components/src/input/input.directive.ts | 2 +-
libs/components/src/layout/layout.stories.ts | 7 +-
.../src/menu/menu-trigger-for.directive.ts | 4 +-
.../multi-select/multi-select.component.ts | 5 +-
.../src/navigation/nav-item.component.ts | 2 +-
.../popover/popover-trigger-for.directive.ts | 2 +-
.../src/progress/progress.component.ts | 2 +-
.../components/src/select/select.component.ts | 5 +-
.../components/src/table/table-data-source.ts | 4 +-
libs/components/src/tabs/tabs.stories.ts | 4 +-
libs/components/src/test.setup.ts | 2 +-
libs/components/tailwind.config.base.js | 2 +-
.../services/vault-export.service.spec.ts | 12 +-
.../services/vault-export.service.ts | 24 +-
libs/importer/spec/base-importer.spec.ts | 12 +-
...warden-password-protected-importer.spec.ts | 2 +-
.../spec/enpass-json-importer.spec.ts | 2 +-
.../importer/spec/keeper-csv-importer.spec.ts | 2 +-
.../spec/keeper-json-importer.spec.ts | 2 +-
libs/importer/spec/myki-csv-importer.spec.ts | 2 +-
.../spec/nordpass-csv-importer.spec.ts | 2 +-
.../spec/onepassword-1pux-importer.spec.ts | 8 +-
.../spec/onepassword-mac-csv-importer.spec.ts | 4 +-
.../spec/onepassword-win-csv-importer.spec.ts | 6 +-
.../importer/spec/psono-json-importer.spec.ts | 6 +-
.../spec/securesafe-csv-importer.spec.ts | 2 +-
.../dialog/file-password-prompt.component.ts | 5 +-
.../dialog/import-error-dialog.component.ts | 5 +-
.../import-success-dialog.component.html | 2 +-
.../dialog/import-success-dialog.component.ts | 5 +-
.../src/components/import.component.html | 3 +-
.../src/components/import.component.ts | 28 +-
.../lastpass-multifactor-prompt.component.ts | 2 +-
.../lastpass/import-lastpass.component.ts | 6 +-
.../lastpass-direct-import.service.ts | 10 +-
.../src/importers/avira-csv-importer.ts | 2 +-
libs/importer/src/importers/base-importer.ts | 4 +-
.../bitwarden/bitwarden-csv-importer.ts | 2 +-
.../bitwarden/bitwarden-json-importer.ts | 14 +-
.../bitwarden-password-protected-importer.ts | 8 +-
.../src/importers/blur-csv-importer.ts | 2 +-
.../dashlane/dashlane-json-importer.ts | 2 +-
.../importers/enpass/enpass-json-importer.ts | 10 +-
.../lastpass/access/models/oob-result.ts | 2 +-
.../lastpass/access/models/otp-result.ts | 5 +-
.../lastpass/access/services/client.ts | 45 +-
.../lastpass/access/services/crypto-utils.ts | 8 +-
.../lastpass/access/services/parser.ts | 24 +-
.../lastpass/access/services/rest-client.ts | 10 +-
.../src/importers/lastpass/access/vault.ts | 14 +-
.../src/importers/myki-csv-importer.ts | 6 +-
.../onepassword/cipher-import-context.ts | 6 +-
.../onepassword/onepassword-1pif-importer.ts | 2 +-
.../onepassword/onepassword-1pux-importer.ts | 2 +-
.../onepassword/onepassword-csv-importer.ts | 6 +-
.../protonpass/protonpass-json-importer.ts | 2 +-
.../importers/psono/psono-json-importer.ts | 6 +-
.../importers/stickypassword-xml-importer.ts | 2 +-
.../src/importers/zohovault-csv-importer.ts | 4 +-
.../import-api.service.abstraction.ts | 2 +-
.../src/services/import-api.service.ts | 4 +-
.../services/import.service.abstraction.ts | 4 +-
.../src/services/import.service.spec.ts | 6 +-
libs/importer/src/services/import.service.ts | 18 +-
.../node-crypto-function.service.spec.ts | 28 +-
.../services/node-crypto-function.service.ts | 26 +-
.../components/password-reprompt.component.ts | 8 +-
.../src/services/password-reprompt.service.ts | 2 +-
package-lock.json | 42 +-
package.json | 2 +-
scripts/test-types.js | 2 +-
1145 files changed, 5898 insertions(+), 5612 deletions(-)
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 0bc9fc5bacb..af20dcad74e 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -48,7 +48,7 @@ const decorator = componentWrapperDecorator(
},
({ globals }) => {
return { theme: `${globals["theme"]}` };
- }
+ },
);
const preview: Preview = {
diff --git a/apps/browser/gulpfile.js b/apps/browser/gulpfile.js
index 78c2ab8a588..a8f55cdee80 100644
--- a/apps/browser/gulpfile.js
+++ b/apps/browser/gulpfile.js
@@ -171,7 +171,7 @@ function distSafariApp(cb, subBuildPath) {
},
() => {
return cb;
- }
+ },
);
}
@@ -182,7 +182,7 @@ function safariCopyAssets(source, dest) {
.on("error", reject)
.pipe(gulpif("safari/Info.plist", replace("0.0.1", manifest.version)))
.pipe(
- gulpif("safari/Info.plist", replace("0.0.2", process.env.BUILD_NUMBER || manifest.version))
+ gulpif("safari/Info.plist", replace("0.0.2", process.env.BUILD_NUMBER || manifest.version)),
)
.pipe(gulpif("desktop.xcodeproj/project.pbxproj", replace("../../../build", "../safari/app")))
.pipe(gulp.dest(dest))
@@ -208,8 +208,8 @@ async function safariCopyBuild(source, dest) {
delete manifest.optional_permissions;
manifest.permissions.push("nativeMessaging");
return manifest;
- })
- )
+ }),
+ ),
)
.pipe(gulp.dest(dest))
.on("end", resolve);
diff --git a/apps/browser/src/admin-console/background/service-factories/organization-service.factory.ts b/apps/browser/src/admin-console/background/service-factories/organization-service.factory.ts
index a050dc22ecc..0b9dc08ad2c 100644
--- a/apps/browser/src/admin-console/background/service-factories/organization-service.factory.ts
+++ b/apps/browser/src/admin-console/background/service-factories/organization-service.factory.ts
@@ -18,12 +18,12 @@ export type OrganizationServiceInitOptions = OrganizationServiceFactoryOptions &
export function organizationServiceFactory(
cache: { organizationService?: AbstractOrganizationService } & CachedServices,
- opts: OrganizationServiceInitOptions
+ opts: OrganizationServiceInitOptions,
): Promise {
return factory(
cache,
"organizationService",
opts,
- async () => new BrowserOrganizationService(await stateServiceFactory(cache, opts))
+ async () => new BrowserOrganizationService(await stateServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/admin-console/background/service-factories/policy-service.factory.ts b/apps/browser/src/admin-console/background/service-factories/policy-service.factory.ts
index 89f4a667f8d..6d4e8995942 100644
--- a/apps/browser/src/admin-console/background/service-factories/policy-service.factory.ts
+++ b/apps/browser/src/admin-console/background/service-factories/policy-service.factory.ts
@@ -24,7 +24,7 @@ export type PolicyServiceInitOptions = PolicyServiceFactoryOptions &
export function policyServiceFactory(
cache: { policyService?: AbstractPolicyService } & CachedServices,
- opts: PolicyServiceInitOptions
+ opts: PolicyServiceInitOptions,
): Promise {
return factory(
cache,
@@ -33,7 +33,7 @@ export function policyServiceFactory(
async () =>
new BrowserPolicyService(
await stateServiceFactory(cache, opts),
- await organizationServiceFactory(cache, opts)
- )
+ await organizationServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/admin-console/services/browser-policy.service.ts b/apps/browser/src/admin-console/services/browser-policy.service.ts
index 74aa0f546af..0fc924fc243 100644
--- a/apps/browser/src/admin-console/services/browser-policy.service.ts
+++ b/apps/browser/src/admin-console/services/browser-policy.service.ts
@@ -38,7 +38,7 @@ export class BrowserPolicyService extends PolicyService {
if (activated === undefined) {
this.stateService.setActivateAutoFillOnPageLoadFromPolicy(!autofillEnabled);
}
- })
+ }),
);
}
}
diff --git a/apps/browser/src/auth/background/service-factories/account-service.factory.ts b/apps/browser/src/auth/background/service-factories/account-service.factory.ts
index 3a180df1564..9b7ad05ec49 100644
--- a/apps/browser/src/auth/background/service-factories/account-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/account-service.factory.ts
@@ -28,7 +28,7 @@ export type AccountServiceInitOptions = AccountServiceFactoryOptions &
export function accountServiceFactory(
cache: { accountService?: AccountService } & CachedServices,
- opts: AccountServiceInitOptions
+ opts: AccountServiceInitOptions,
): Promise {
return factory(
cache,
@@ -38,7 +38,7 @@ export function accountServiceFactory(
new AccountServiceImplementation(
await messagingServiceFactory(cache, opts),
await logServiceFactory(cache, opts),
- await globalStateProviderFactory(cache, opts)
- )
+ await globalStateProviderFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/auth/background/service-factories/auth-request-crypto-service.factory.ts b/apps/browser/src/auth/background/service-factories/auth-request-crypto-service.factory.ts
index e1757f98129..ce6c0d78f03 100644
--- a/apps/browser/src/auth/background/service-factories/auth-request-crypto-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/auth-request-crypto-service.factory.ts
@@ -18,12 +18,12 @@ export type AuthRequestCryptoServiceInitOptions = AuthRequestCryptoServiceFactor
export function authRequestCryptoServiceFactory(
cache: { authRequestCryptoService?: AuthRequestCryptoServiceAbstraction } & CachedServices,
- opts: AuthRequestCryptoServiceInitOptions
+ opts: AuthRequestCryptoServiceInitOptions,
): Promise {
return factory(
cache,
"authRequestCryptoService",
opts,
- async () => new AuthRequestCryptoServiceImplementation(await cryptoServiceFactory(cache, opts))
+ async () => new AuthRequestCryptoServiceImplementation(await cryptoServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/auth/background/service-factories/auth-service.factory.ts b/apps/browser/src/auth/background/service-factories/auth-service.factory.ts
index 6aaeb476369..31d338fecc7 100644
--- a/apps/browser/src/auth/background/service-factories/auth-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/auth-service.factory.ts
@@ -89,7 +89,7 @@ export type AuthServiceInitOptions = AuthServiceFactoyOptions &
export function authServiceFactory(
cache: { authService?: AbstractAuthService } & CachedServices,
- opts: AuthServiceInitOptions
+ opts: AuthServiceInitOptions,
): Promise {
return factory(
cache,
@@ -113,7 +113,7 @@ export function authServiceFactory(
await passwordStrengthServiceFactory(cache, opts),
await policyServiceFactory(cache, opts),
await deviceTrustCryptoServiceFactory(cache, opts),
- await authRequestCryptoServiceFactory(cache, opts)
- )
+ await authRequestCryptoServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/auth/background/service-factories/device-trust-crypto-service.factory.ts b/apps/browser/src/auth/background/service-factories/device-trust-crypto-service.factory.ts
index 430d50fea75..8458c40b9bb 100644
--- a/apps/browser/src/auth/background/service-factories/device-trust-crypto-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/device-trust-crypto-service.factory.ts
@@ -53,7 +53,7 @@ export type DeviceTrustCryptoServiceInitOptions = DeviceTrustCryptoServiceFactor
export function deviceTrustCryptoServiceFactory(
cache: { deviceTrustCryptoService?: DeviceTrustCryptoServiceAbstraction } & CachedServices,
- opts: DeviceTrustCryptoServiceInitOptions
+ opts: DeviceTrustCryptoServiceInitOptions,
): Promise {
return factory(
cache,
@@ -68,7 +68,7 @@ export function deviceTrustCryptoServiceFactory(
await appIdServiceFactory(cache, opts),
await devicesApiServiceFactory(cache, opts),
await i18nServiceFactory(cache, opts),
- await platformUtilsServiceFactory(cache, opts)
- )
+ await platformUtilsServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/auth/background/service-factories/key-connector-service.factory.ts b/apps/browser/src/auth/background/service-factories/key-connector-service.factory.ts
index 25eb85e5568..625a14e30ea 100644
--- a/apps/browser/src/auth/background/service-factories/key-connector-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/key-connector-service.factory.ts
@@ -50,7 +50,7 @@ export type KeyConnectorServiceInitOptions = KeyConnectorServiceFactoryOptions &
export function keyConnectorServiceFactory(
cache: { keyConnectorService?: AbstractKeyConnectorService } & CachedServices,
- opts: KeyConnectorServiceInitOptions
+ opts: KeyConnectorServiceInitOptions,
): Promise {
return factory(
cache,
@@ -65,7 +65,7 @@ export function keyConnectorServiceFactory(
await logServiceFactory(cache, opts),
await organizationServiceFactory(cache, opts),
await cryptoFunctionServiceFactory(cache, opts),
- opts.keyConnectorServiceOptions.logoutCallback
- )
+ opts.keyConnectorServiceOptions.logoutCallback,
+ ),
);
}
diff --git a/apps/browser/src/auth/background/service-factories/token-service.factory.ts b/apps/browser/src/auth/background/service-factories/token-service.factory.ts
index 389f8d1541a..476b8e2d785 100644
--- a/apps/browser/src/auth/background/service-factories/token-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/token-service.factory.ts
@@ -17,12 +17,12 @@ export type TokenServiceInitOptions = TokenServiceFactoryOptions & StateServiceI
export function tokenServiceFactory(
cache: { tokenService?: AbstractTokenService } & CachedServices,
- opts: TokenServiceInitOptions
+ opts: TokenServiceInitOptions,
): Promise {
return factory(
cache,
"tokenService",
opts,
- async () => new TokenService(await stateServiceFactory(cache, opts))
+ async () => new TokenService(await stateServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/auth/background/service-factories/two-factor-service.factory.ts b/apps/browser/src/auth/background/service-factories/two-factor-service.factory.ts
index 040a5edfb4a..1d79bbbaf1d 100644
--- a/apps/browser/src/auth/background/service-factories/two-factor-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/two-factor-service.factory.ts
@@ -23,7 +23,7 @@ export type TwoFactorServiceInitOptions = TwoFactorServiceFactoryOptions &
export async function twoFactorServiceFactory(
cache: { twoFactorService?: AbstractTwoFactorService } & CachedServices,
- opts: TwoFactorServiceInitOptions
+ opts: TwoFactorServiceInitOptions,
): Promise {
const service = await factory(
cache,
@@ -32,8 +32,8 @@ export async function twoFactorServiceFactory(
async () =>
new TwoFactorService(
await i18nServiceFactory(cache, opts),
- await platformUtilsServiceFactory(cache, opts)
- )
+ await platformUtilsServiceFactory(cache, opts),
+ ),
);
service.init();
return service;
diff --git a/apps/browser/src/auth/background/service-factories/user-verification-api-service.factory.ts b/apps/browser/src/auth/background/service-factories/user-verification-api-service.factory.ts
index 01bfb0f13cb..f8d43877632 100644
--- a/apps/browser/src/auth/background/service-factories/user-verification-api-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/user-verification-api-service.factory.ts
@@ -18,12 +18,12 @@ export type UserVerificationApiServiceInitOptions = UserVerificationApiServiceFa
export function userVerificationApiServiceFactory(
cache: { userVerificationApiService?: UserVerificationApiServiceAbstraction } & CachedServices,
- opts: UserVerificationApiServiceInitOptions
+ opts: UserVerificationApiServiceInitOptions,
): Promise {
return factory(
cache,
"userVerificationApiService",
opts,
- async () => new UserVerificationApiService(await apiServiceFactory(cache, opts))
+ async () => new UserVerificationApiService(await apiServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/auth/background/service-factories/user-verification-service.factory.ts b/apps/browser/src/auth/background/service-factories/user-verification-service.factory.ts
index 79d327c9485..d0cdfff9932 100644
--- a/apps/browser/src/auth/background/service-factories/user-verification-service.factory.ts
+++ b/apps/browser/src/auth/background/service-factories/user-verification-service.factory.ts
@@ -34,7 +34,7 @@ export type UserVerificationServiceInitOptions = UserVerificationServiceFactoryO
export function userVerificationServiceFactory(
cache: { userVerificationService?: AbstractUserVerificationService } & CachedServices,
- opts: UserVerificationServiceInitOptions
+ opts: UserVerificationServiceInitOptions,
): Promise {
return factory(
cache,
@@ -45,7 +45,7 @@ export function userVerificationServiceFactory(
await stateServiceFactory(cache, opts),
await cryptoServiceFactory(cache, opts),
await i18nServiceFactory(cache, opts),
- await userVerificationApiServiceFactory(cache, opts)
- )
+ await userVerificationApiServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/auth/guards/fido2-auth.guard.ts b/apps/browser/src/auth/guards/fido2-auth.guard.ts
index 7ff0060663d..f6b560c71d6 100644
--- a/apps/browser/src/auth/guards/fido2-auth.guard.ts
+++ b/apps/browser/src/auth/guards/fido2-auth.guard.ts
@@ -17,7 +17,7 @@ import { BrowserRouterService } from "../../platform/popup/services/browser-rout
*/
export const fido2AuthGuard: CanActivateFn = async (
route: ActivatedRouteSnapshot,
- state: RouterStateSnapshot
+ state: RouterStateSnapshot,
) => {
const routerService = inject(BrowserRouterService);
const authService = inject(AuthService);
diff --git a/apps/browser/src/auth/popup/account-switching/account-switcher.component.ts b/apps/browser/src/auth/popup/account-switching/account-switcher.component.ts
index ec035d2a3c1..8b6b660cd70 100644
--- a/apps/browser/src/auth/popup/account-switching/account-switcher.component.ts
+++ b/apps/browser/src/auth/popup/account-switching/account-switcher.component.ts
@@ -11,7 +11,7 @@ export class AccountSwitcherComponent {
constructor(
private accountSwitcherService: AccountSwitcherService,
private router: Router,
- private routerService: BrowserRouterService
+ private routerService: BrowserRouterService,
) {}
get accountOptions$() {
diff --git a/apps/browser/src/auth/popup/account-switching/current-account.component.ts b/apps/browser/src/auth/popup/account-switching/current-account.component.ts
index 902c80c79e6..480a3a6a10a 100644
--- a/apps/browser/src/auth/popup/account-switching/current-account.component.ts
+++ b/apps/browser/src/auth/popup/account-switching/current-account.component.ts
@@ -10,7 +10,10 @@ import { Utils } from "@bitwarden/common/platform/misc/utils";
templateUrl: "current-account.component.html",
})
export class CurrentAccountComponent {
- constructor(private accountService: AccountService, private router: Router) {}
+ constructor(
+ private accountService: AccountService,
+ private router: Router,
+ ) {}
get currentAccount$() {
return this.accountService.activeAccount$;
@@ -20,7 +23,7 @@ export class CurrentAccountComponent {
return this.currentAccount$.pipe(
map((a) => {
return Utils.isNullOrWhitespace(a.name) ? a.email : a.name;
- })
+ }),
);
}
diff --git a/apps/browser/src/auth/popup/environment.component.ts b/apps/browser/src/auth/popup/environment.component.ts
index a5cbfe7c34b..6246aaf5db1 100644
--- a/apps/browser/src/auth/popup/environment.component.ts
+++ b/apps/browser/src/auth/popup/environment.component.ts
@@ -20,7 +20,7 @@ export class EnvironmentComponent extends BaseEnvironmentComponent implements On
public environmentService: BrowserEnvironmentService,
i18nService: I18nService,
private router: Router,
- modalService: ModalService
+ modalService: ModalService,
) {
super(platformUtilsService, environmentService, i18nService, modalService);
this.showCustom = true;
diff --git a/apps/browser/src/auth/popup/hint.component.ts b/apps/browser/src/auth/popup/hint.component.ts
index a743dc7da24..6de2c35301f 100644
--- a/apps/browser/src/auth/popup/hint.component.ts
+++ b/apps/browser/src/auth/popup/hint.component.ts
@@ -20,7 +20,7 @@ export class HintComponent extends BaseHintComponent {
apiService: ApiService,
logService: LogService,
private route: ActivatedRoute,
- loginService: LoginService
+ loginService: LoginService,
) {
super(router, i18nService, apiService, platformUtilsService, logService, loginService);
diff --git a/apps/browser/src/auth/popup/home.component.ts b/apps/browser/src/auth/popup/home.component.ts
index 5dd3bdd641a..aaceb723afa 100644
--- a/apps/browser/src/auth/popup/home.component.ts
+++ b/apps/browser/src/auth/popup/home.component.ts
@@ -32,7 +32,7 @@ export class HomeComponent implements OnInit, OnDestroy {
private router: Router,
private i18nService: I18nService,
private environmentService: EnvironmentService,
- private loginService: LoginService
+ private loginService: LoginService,
) {}
async ngOnInit(): Promise {
@@ -73,7 +73,7 @@ export class HomeComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorOccured"),
- this.i18nService.t("invalidEmail")
+ this.i18nService.t("invalidEmail"),
);
return;
}
diff --git a/apps/browser/src/auth/popup/lock.component.html b/apps/browser/src/auth/popup/lock.component.html
index 08063edfeb2..9892503a7bb 100644
--- a/apps/browser/src/auth/popup/lock.component.html
+++ b/apps/browser/src/auth/popup/lock.component.html
@@ -70,7 +70,7 @@
: ("yourVaultIsLocked" | i18n)
}}
- {{ "loggedInAsOn" | i18n : email : webVaultHostname }}
+ {{ "loggedInAsOn" | i18n: email : webVaultHostname }}
diff --git a/apps/browser/src/auth/popup/lock.component.ts b/apps/browser/src/auth/popup/lock.component.ts
index 4a0c752a5d2..0379886bc24 100644
--- a/apps/browser/src/auth/popup/lock.component.ts
+++ b/apps/browser/src/auth/popup/lock.component.ts
@@ -56,7 +56,7 @@ export class LockComponent extends BaseLockComponent {
dialogService: DialogService,
deviceTrustCryptoService: DeviceTrustCryptoServiceAbstraction,
userVerificationService: UserVerificationService,
- private routerService: BrowserRouterService
+ private routerService: BrowserRouterService,
) {
super(
router,
@@ -76,7 +76,7 @@ export class LockComponent extends BaseLockComponent {
passwordStrengthService,
dialogService,
deviceTrustCryptoService,
- userVerificationService
+ userVerificationService,
);
this.successRoute = "/tabs/current";
this.isInitialLockScreen = (window as any).previousPopupUrl == null;
diff --git a/apps/browser/src/auth/popup/login-via-auth-request.component.ts b/apps/browser/src/auth/popup/login-via-auth-request.component.ts
index b041f3fdd62..b5ff436f14a 100644
--- a/apps/browser/src/auth/popup/login-via-auth-request.component.ts
+++ b/apps/browser/src/auth/popup/login-via-auth-request.component.ts
@@ -48,7 +48,7 @@ export class LoginViaAuthRequestComponent
syncService: SyncService,
deviceTrustCryptoService: DeviceTrustCryptoServiceAbstraction,
authReqCryptoService: AuthRequestCryptoServiceAbstraction,
- private location: Location
+ private location: Location,
) {
super(
router,
@@ -67,7 +67,7 @@ export class LoginViaAuthRequestComponent
stateService,
loginService,
deviceTrustCryptoService,
- authReqCryptoService
+ authReqCryptoService,
);
super.onSuccessfulLogin = async () => {
await syncService.fullSync(true);
diff --git a/apps/browser/src/auth/popup/login.component.ts b/apps/browser/src/auth/popup/login.component.ts
index b930f2747de..0d191c3bc49 100644
--- a/apps/browser/src/auth/popup/login.component.ts
+++ b/apps/browser/src/auth/popup/login.component.ts
@@ -45,7 +45,7 @@ export class LoginComponent extends BaseLoginComponent {
formValidationErrorService: FormValidationErrorsService,
route: ActivatedRoute,
loginService: LoginService,
- webAuthnLoginService: WebAuthnLoginServiceAbstraction
+ webAuthnLoginService: WebAuthnLoginServiceAbstraction,
) {
super(
devicesApiService,
@@ -64,7 +64,7 @@ export class LoginComponent extends BaseLoginComponent {
formValidationErrorService,
route,
loginService,
- webAuthnLoginService
+ webAuthnLoginService,
);
super.onSuccessfulLogin = async () => {
await syncService.fullSync(true);
@@ -123,7 +123,7 @@ export class LoginComponent extends BaseLoginComponent {
"&codeChallenge=" +
codeChallenge +
"&email=" +
- encodeURIComponent(this.formGroup.controls.email.value)
+ encodeURIComponent(this.formGroup.controls.email.value),
);
}
}
diff --git a/apps/browser/src/auth/popup/register.component.ts b/apps/browser/src/auth/popup/register.component.ts
index 837fcb2160f..4752c885728 100644
--- a/apps/browser/src/auth/popup/register.component.ts
+++ b/apps/browser/src/auth/popup/register.component.ts
@@ -38,7 +38,7 @@ export class RegisterComponent extends BaseRegisterComponent {
environmentService: EnvironmentService,
logService: LogService,
auditService: AuditService,
- dialogService: DialogService
+ dialogService: DialogService,
) {
super(
formValidationErrorService,
@@ -54,7 +54,7 @@ export class RegisterComponent extends BaseRegisterComponent {
environmentService,
logService,
auditService,
- dialogService
+ dialogService,
);
}
}
diff --git a/apps/browser/src/auth/popup/remove-password.component.html b/apps/browser/src/auth/popup/remove-password.component.html
index 8024023976f..793bcff3e09 100644
--- a/apps/browser/src/auth/popup/remove-password.component.html
+++ b/apps/browser/src/auth/popup/remove-password.component.html
@@ -10,7 +10,7 @@
-
{{ "convertOrganizationEncryptionDesc" | i18n : organization.name }}
+
{{ "convertOrganizationEncryptionDesc" | i18n: organization.name }}
diff --git a/apps/browser/src/auth/popup/two-factor.component.ts b/apps/browser/src/auth/popup/two-factor.component.ts
index a78f3d3de58..fde6f4ffc99 100644
--- a/apps/browser/src/auth/popup/two-factor.component.ts
+++ b/apps/browser/src/auth/popup/two-factor.component.ts
@@ -51,7 +51,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
loginService: LoginService,
configService: ConfigServiceAbstraction,
private dialogService: DialogService,
- @Inject(WINDOW) protected win: Window
+ @Inject(WINDOW) protected win: Window,
) {
super(
authService,
@@ -67,7 +67,7 @@ export class TwoFactorComponent extends BaseTwoFactorComponent {
twoFactorService,
appIdService,
loginService,
- configService
+ configService,
);
super.onSuccessfulLogin = async () => {
syncService.fullSync(true);
diff --git a/apps/browser/src/auth/popup/utils/auth-popout-window.spec.ts b/apps/browser/src/auth/popup/utils/auth-popout-window.spec.ts
index e682181454e..673e9d5c335 100644
--- a/apps/browser/src/auth/popup/utils/auth-popout-window.spec.ts
+++ b/apps/browser/src/auth/popup/utils/auth-popout-window.spec.ts
@@ -103,7 +103,7 @@ describe("AuthPopoutWindow", () => {
expect(openPopoutSpy).toHaveBeenCalledWith(
"popup/index.html#/2fa;webAuthnResponse=data;remember=remember",
- { singleActionKey: AuthPopoutType.twoFactorAuth }
+ { singleActionKey: AuthPopoutType.twoFactorAuth },
);
});
});
diff --git a/apps/browser/src/auth/popup/utils/auth-popout-window.ts b/apps/browser/src/auth/popup/utils/auth-popout-window.ts
index d436aeb73eb..d01f9ad25e8 100644
--- a/apps/browser/src/auth/popup/utils/auth-popout-window.ts
+++ b/apps/browser/src/auth/popup/utils/auth-popout-window.ts
@@ -47,7 +47,7 @@ async function closeUnlockPopout() {
async function openSsoAuthResultPopout(resultData: { code: string; state: string }) {
const { code, state } = resultData;
const authResultUrl = `popup/index.html#/sso?code=${encodeURIComponent(
- code
+ code,
)}&state=${encodeURIComponent(state)}`;
await BrowserPopupUtils.openPopout(authResultUrl, {
diff --git a/apps/browser/src/autofill/background/context-menus.background.ts b/apps/browser/src/autofill/background/context-menus.background.ts
index add392f3293..719f39a78dd 100644
--- a/apps/browser/src/autofill/background/context-menus.background.ts
+++ b/apps/browser/src/autofill/background/context-menus.background.ts
@@ -15,14 +15,14 @@ export default class ContextMenusBackground {
}
this.contextMenus.onClicked.addListener((info, tab) =>
- this.contextMenuClickedHandler.run(info, tab)
+ this.contextMenuClickedHandler.run(info, tab),
);
BrowserApi.messageListener(
"contextmenus.background",
(
msg: { command: string; data: LockedVaultPendingNotificationsItem },
- sender: chrome.runtime.MessageSender
+ sender: chrome.runtime.MessageSender,
) => {
if (msg.command === "unlockCompleted" && msg.data.target === "contextmenus.background") {
this.contextMenuClickedHandler
@@ -31,7 +31,7 @@ export default class ContextMenusBackground {
BrowserApi.tabSendMessageData(sender.tab, "closeNotificationBar");
});
}
- }
+ },
);
}
}
diff --git a/apps/browser/src/autofill/background/notification.background.spec.ts b/apps/browser/src/autofill/background/notification.background.spec.ts
index 6a0a4a7345a..1a898666794 100644
--- a/apps/browser/src/autofill/background/notification.background.spec.ts
+++ b/apps/browser/src/autofill/background/notification.background.spec.ts
@@ -30,7 +30,7 @@ describe("NotificationBackground", () => {
policyService,
folderService,
stateService,
- environmentService
+ environmentService,
);
});
diff --git a/apps/browser/src/autofill/background/notification.background.ts b/apps/browser/src/autofill/background/notification.background.ts
index b4768e10e78..f45abf4bc9f 100644
--- a/apps/browser/src/autofill/background/notification.background.ts
+++ b/apps/browser/src/autofill/background/notification.background.ts
@@ -40,7 +40,7 @@ export default class NotificationBackground {
private policyService: PolicyService,
private folderService: FolderService,
private stateService: BrowserStateService,
- private environmentService: EnvironmentService
+ private environmentService: EnvironmentService,
) {}
async init() {
@@ -52,7 +52,7 @@ export default class NotificationBackground {
"notification.background",
(msg: any, sender: chrome.runtime.MessageSender) => {
this.processMessage(msg, sender);
- }
+ },
);
this.cleanupNotificationQueue();
@@ -97,7 +97,7 @@ export default class NotificationBackground {
await BrowserApi.tabSendMessageData(
sender.tab,
"addToLockedVaultPendingNotifications",
- retryMessage
+ retryMessage,
);
await openUnlockPopout(sender.tab);
return;
@@ -259,7 +259,7 @@ export default class NotificationBackground {
const ciphers = await this.cipherService.getAllDecryptedForUrl(loginInfo.url);
const usernameMatches = ciphers.filter(
- (c) => c.login.username != null && c.login.username.toLowerCase() === normalizedUsername
+ (c) => c.login.username != null && c.login.username.toLowerCase() === normalizedUsername,
);
if (usernameMatches.length === 0) {
if (disabledAddLogin) {
@@ -284,7 +284,7 @@ export default class NotificationBackground {
loginDomain: string,
loginInfo: AddLoginRuntimeMessage,
tab: chrome.tabs.Tab,
- isVaultLocked = false
+ isVaultLocked = false,
) {
// remove any old messages for this tab
this.removeTabFromNotificationQueue(tab);
@@ -317,7 +317,7 @@ export default class NotificationBackground {
const ciphers = await this.cipherService.getAllDecryptedForUrl(changeData.url);
if (changeData.currentPassword != null) {
const passwordMatches = ciphers.filter(
- (c) => c.login.password === changeData.currentPassword
+ (c) => c.login.password === changeData.currentPassword,
);
if (passwordMatches.length === 1) {
id = passwordMatches[0].id;
@@ -339,7 +339,7 @@ export default class NotificationBackground {
*/
private async unlockVault(
message: { data?: { skipNotification?: boolean } },
- tab: chrome.tabs.Tab
+ tab: chrome.tabs.Tab,
) {
if (message.data?.skipNotification) {
return;
@@ -363,7 +363,7 @@ export default class NotificationBackground {
loginDomain: string,
newPassword: string,
tab: chrome.tabs.Tab,
- isVaultLocked = false
+ isVaultLocked = false,
) {
// remove any old messages for this tab
this.removeTabFromNotificationQueue(tab);
@@ -421,7 +421,7 @@ export default class NotificationBackground {
const allCiphers = await this.cipherService.getAllDecryptedForUrl(queueMessage.uri);
const existingCipher = allCiphers.find(
(c) =>
- c.login.username != null && c.login.username.toLowerCase() === queueMessage.username
+ c.login.username != null && c.login.username.toLowerCase() === queueMessage.username,
);
if (existingCipher != null) {
@@ -449,7 +449,7 @@ export default class NotificationBackground {
cipherView: CipherView,
newPassword: string,
edit: boolean,
- tab: chrome.tabs.Tab
+ tab: chrome.tabs.Tab,
) {
cipherView.login.password = newPassword;
@@ -525,13 +525,13 @@ export default class NotificationBackground {
private async removeIndividualVault(): Promise
{
return await firstValueFrom(
- this.policyService.policyAppliesToActiveUser$(PolicyType.PersonalOwnership)
+ this.policyService.policyAppliesToActiveUser$(PolicyType.PersonalOwnership),
);
}
private async handleUnlockCompleted(
messageData: LockedVaultPendingNotificationsItem,
- sender: chrome.runtime.MessageSender
+ sender: chrome.runtime.MessageSender,
): Promise {
if (messageData.commandToRetry.msg.command === "autofill_login") {
await BrowserApi.tabSendMessageData(sender.tab, "closeNotificationBar");
@@ -543,7 +543,7 @@ export default class NotificationBackground {
await this.processMessage(
messageData.commandToRetry.msg.command,
- messageData.commandToRetry.sender
+ messageData.commandToRetry.sender,
);
}
}
diff --git a/apps/browser/src/autofill/background/overlay.background.spec.ts b/apps/browser/src/autofill/background/overlay.background.spec.ts
index bc9c2374d56..ad6b89cd665 100644
--- a/apps/browser/src/autofill/background/overlay.background.spec.ts
+++ b/apps/browser/src/autofill/background/overlay.background.spec.ts
@@ -70,7 +70,7 @@ describe("OverlayBackground", () => {
environmentService,
settingsService,
stateService,
- i18nService
+ i18nService,
);
overlayBackground.init();
});
@@ -163,7 +163,7 @@ describe("OverlayBackground", () => {
new Map([
["overlay-cipher-0", cipher2],
["overlay-cipher-1", cipher1],
- ])
+ ]),
);
expect(overlayBackground["getOverlayCipherData"]).toHaveBeenCalled();
});
@@ -219,7 +219,7 @@ describe("OverlayBackground", () => {
expect(BrowserApi.tabSendMessageData).toHaveBeenCalledWith(
tab,
"updateIsOverlayCiphersPopulated",
- { isOverlayCiphersPopulated: true }
+ { isOverlayCiphersPopulated: true },
);
});
});
@@ -489,7 +489,7 @@ describe("OverlayBackground", () => {
const returnValue = overlayBackground["handleExtensionMessage"](
message,
sender,
- sendResponse
+ sendResponse,
);
expect(returnValue).toBe(undefined);
@@ -507,7 +507,7 @@ describe("OverlayBackground", () => {
const returnValue = overlayBackground["handleExtensionMessage"](
message,
sender,
- sendResponse
+ sendResponse,
);
expect(returnValue).toBe(undefined);
@@ -526,7 +526,7 @@ describe("OverlayBackground", () => {
const returnValue = overlayBackground["handleExtensionMessage"](
message,
sender,
- sendResponse
+ sendResponse,
);
expect(returnValue).toBe(true);
@@ -555,7 +555,7 @@ describe("OverlayBackground", () => {
isFocusingFieldElement: false,
isOpeningFullOverlay: false,
authStatus: AuthenticationStatus.Unlocked,
- }
+ },
);
});
});
@@ -614,7 +614,7 @@ describe("OverlayBackground", () => {
password: "password",
},
},
- sender
+ sender,
);
await flushPromises();
@@ -635,7 +635,7 @@ describe("OverlayBackground", () => {
await flushPromises();
expect(overlayBackground["overlayVisibility"]).toBe(
- AutofillOverlayVisibility.OnFieldFocus
+ AutofillOverlayVisibility.OnFieldFocus,
);
});
@@ -645,7 +645,7 @@ describe("OverlayBackground", () => {
sendExtensionRuntimeMessage(
{ command: "getAutofillOverlayVisibility" },
undefined,
- sendMessageSpy
+ sendMessageSpy,
);
await flushPromises();
@@ -851,7 +851,7 @@ describe("OverlayBackground", () => {
it("stores the page details provided by the message by the tab id of the sender", () => {
sendExtensionRuntimeMessage(
{ command: "collectPageDetailsResponse", details: pageDetails1 },
- sender
+ sender,
);
expect(overlayBackground["pageDetailsForTab"][sender.tab.id]).toStrictEqual([
@@ -870,7 +870,7 @@ describe("OverlayBackground", () => {
sendExtensionRuntimeMessage(
{ command: "collectPageDetailsResponse", details: pageDetails2 },
- sender
+ sender,
);
expect(overlayBackground["pageDetailsForTab"][sender.tab.id]).toStrictEqual([
@@ -930,7 +930,7 @@ describe("OverlayBackground", () => {
isFocusingFieldElement: true,
isOpeningFullOverlay: false,
authStatus: AuthenticationStatus.Unlocked,
- }
+ },
);
});
});
@@ -1096,7 +1096,7 @@ describe("OverlayBackground", () => {
expect(BrowserApi.tabSendMessageData).toHaveBeenCalledWith(
buttonPortSpy.sender.tab,
"redirectOverlayFocusOut",
- { direction: RedirectFocusDirection.Next }
+ { direction: RedirectFocusDirection.Next },
);
});
});
@@ -1142,11 +1142,11 @@ describe("OverlayBackground", () => {
sender: listPortSpy.sender,
},
target: "overlay.background",
- }
+ },
);
expect(overlayBackground["openUnlockPopout"]).toHaveBeenCalledWith(
listPortSpy.sender.tab,
- true
+ true,
);
});
});
@@ -1160,7 +1160,7 @@ describe("OverlayBackground", () => {
getLoginCiphersSpy = jest.spyOn(overlayBackground["overlayLoginCiphers"], "get");
isPasswordRepromptRequiredSpy = jest.spyOn(
overlayBackground["autofillService"],
- "isPasswordRepromptRequired"
+ "isPasswordRepromptRequired",
);
doAutoFillSpy = jest.spyOn(overlayBackground["autofillService"], "doAutoFill");
});
@@ -1192,7 +1192,7 @@ describe("OverlayBackground", () => {
expect(getLoginCiphersSpy).toHaveBeenCalled();
expect(isPasswordRepromptRequiredSpy).toHaveBeenCalledWith(
cipher,
- listPortSpy.sender.tab
+ listPortSpy.sender.tab,
);
expect(doAutoFillSpy).not.toHaveBeenCalled();
});
@@ -1216,7 +1216,7 @@ describe("OverlayBackground", () => {
expect(isPasswordRepromptRequiredSpy).toHaveBeenCalledWith(
cipher2,
- listPortSpy.sender.tab
+ listPortSpy.sender.tab,
);
expect(doAutoFillSpy).toHaveBeenCalledWith({
tab: listPortSpy.sender.tab,
@@ -1230,7 +1230,7 @@ describe("OverlayBackground", () => {
["overlay-cipher-2", cipher2],
["overlay-cipher-1", cipher1],
["overlay-cipher-3", cipher3],
- ]).entries()
+ ]).entries(),
);
});
});
@@ -1289,7 +1289,7 @@ describe("OverlayBackground", () => {
{
cipherId: cipher.id,
action: SHOW_AUTOFILL_BUTTON,
- }
+ },
);
});
});
@@ -1302,7 +1302,7 @@ describe("OverlayBackground", () => {
};
const redirectOverlayFocusOutSpy = jest.spyOn(
overlayBackground as any,
- "redirectOverlayFocusOut"
+ "redirectOverlayFocusOut",
);
sendPortMessage(listPortSpy, message);
diff --git a/apps/browser/src/autofill/background/overlay.background.ts b/apps/browser/src/autofill/background/overlay.background.ts
index 38554ee8aca..7187d5ad136 100644
--- a/apps/browser/src/autofill/background/overlay.background.ts
+++ b/apps/browser/src/autofill/background/overlay.background.ts
@@ -88,7 +88,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
private environmentService: EnvironmentService,
private settingsService: SettingsService,
private stateService: StateService,
- private i18nService: I18nService
+ private i18nService: I18nService,
) {
this.iconsServerUrl = this.environmentService.getIconsUrl();
}
@@ -130,7 +130,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
this.overlayLoginCiphers = new Map();
const ciphersViews = (await this.cipherService.getAllDecryptedForUrl(currentTab.url)).sort(
- (a, b) => this.cipherService.sortCiphersByLastUsedThenName(a, b)
+ (a, b) => this.cipherService.sortCiphersByLastUsedThenName(a, b),
);
for (let cipherIndex = 0; cipherIndex < ciphersViews.length; cipherIndex++) {
this.overlayLoginCiphers.set(`overlay-cipher-${cipherIndex}`, ciphersViews[cipherIndex]);
@@ -189,7 +189,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
*/
private storePageDetails(
message: OverlayBackgroundExtensionMessage,
- sender: chrome.runtime.MessageSender
+ sender: chrome.runtime.MessageSender,
) {
const pageDetails = {
frameId: sender.frameId,
@@ -214,7 +214,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
*/
private async fillSelectedOverlayListItem(
{ overlayCipherId }: OverlayPortMessage,
- { sender }: chrome.runtime.Port
+ { sender }: chrome.runtime.Port,
) {
if (!overlayCipherId) {
return;
@@ -528,7 +528,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
await BrowserApi.tabSendMessageData(
sender.tab,
"addToLockedVaultPendingNotifications",
- retryMessage
+ retryMessage,
);
await this.openUnlockPopout(sender.tab, true);
}
@@ -541,7 +541,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
*/
private async viewSelectedCipher(
{ overlayCipherId }: OverlayPortMessage,
- { sender }: chrome.runtime.Port
+ { sender }: chrome.runtime.Port,
) {
const cipher = this.overlayLoginCiphers.get(overlayCipherId);
if (!cipher) {
@@ -609,7 +609,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
*/
private redirectOverlayFocusOut(
{ direction }: OverlayPortMessage,
- { sender }: chrome.runtime.Port
+ { sender }: chrome.runtime.Port,
) {
if (!direction) {
return;
@@ -637,7 +637,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
*/
private async addNewVaultItem(
{ login }: OverlayAddNewItemMessage,
- sender: chrome.runtime.MessageSender
+ sender: chrome.runtime.MessageSender,
) {
if (!login) {
return;
@@ -683,7 +683,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
private handleExtensionMessage = (
message: OverlayBackgroundExtensionMessage,
sender: chrome.runtime.MessageSender,
- sendResponse: (response?: any) => void
+ sendResponse: (response?: any) => void,
) => {
const handler: CallableFunction | undefined = this.extensionMessageHandlers[message?.command];
if (!handler) {
@@ -742,7 +742,7 @@ class OverlayBackground implements OverlayBackgroundInterface {
*/
private handleOverlayElementPortMessage = (
message: OverlayBackgroundExtensionMessage,
- port: chrome.runtime.Port
+ port: chrome.runtime.Port,
) => {
const command = message?.command;
let handler: CallableFunction | undefined;
diff --git a/apps/browser/src/autofill/background/service_factories/autofill-service.factory.ts b/apps/browser/src/autofill/background/service_factories/autofill-service.factory.ts
index 4050d000817..acd9be2a8ea 100644
--- a/apps/browser/src/autofill/background/service_factories/autofill-service.factory.ts
+++ b/apps/browser/src/autofill/background/service_factories/autofill-service.factory.ts
@@ -47,7 +47,7 @@ export type AutoFillServiceInitOptions = AutoFillServiceOptions &
export function autofillServiceFactory(
cache: { autofillService?: AbstractAutoFillService } & CachedServices,
- opts: AutoFillServiceInitOptions
+ opts: AutoFillServiceInitOptions,
): Promise {
return factory(
cache,
@@ -61,7 +61,7 @@ export function autofillServiceFactory(
await eventCollectionServiceFactory(cache, opts),
await logServiceFactory(cache, opts),
await settingsServiceFactory(cache, opts),
- await userVerificationServiceFactory(cache, opts)
- )
+ await userVerificationServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/autofill/background/tabs.background.spec.ts b/apps/browser/src/autofill/background/tabs.background.spec.ts
index e320f22248e..b3de1e96ce3 100644
--- a/apps/browser/src/autofill/background/tabs.background.spec.ts
+++ b/apps/browser/src/autofill/background/tabs.background.spec.ts
@@ -36,13 +36,13 @@ describe("TabsBackground", () => {
it("sets up a window on focusChanged listener", () => {
const handleWindowOnFocusChangedSpy = jest.spyOn(
tabsBackgorund as any,
- "handleWindowOnFocusChanged"
+ "handleWindowOnFocusChanged",
);
tabsBackgorund.init();
expect(chrome.windows.onFocusChanged.addListener).toHaveBeenCalledWith(
- handleWindowOnFocusChangedSpy
+ handleWindowOnFocusChangedSpy,
);
});
});
diff --git a/apps/browser/src/autofill/background/tabs.background.ts b/apps/browser/src/autofill/background/tabs.background.ts
index c47ef76f665..b095f99ce20 100644
--- a/apps/browser/src/autofill/background/tabs.background.ts
+++ b/apps/browser/src/autofill/background/tabs.background.ts
@@ -7,7 +7,7 @@ export default class TabsBackground {
constructor(
private main: MainBackground,
private notificationBackground: NotificationBackground,
- private overlayBackground: OverlayBackground
+ private overlayBackground: OverlayBackground,
) {}
private focusedWindowId: number;
@@ -74,7 +74,7 @@ export default class TabsBackground {
private handleTabOnUpdated = async (
tabId: number,
changeInfo: chrome.tabs.TabChangeInfo,
- tab: chrome.tabs.Tab
+ tab: chrome.tabs.Tab,
) => {
const removePageDetailsStatus = new Set(["loading", "unloaded"]);
if (removePageDetailsStatus.has(changeInfo.status)) {
diff --git a/apps/browser/src/autofill/browser/cipher-context-menu-handler.spec.ts b/apps/browser/src/autofill/browser/cipher-context-menu-handler.spec.ts
index 70820f23ce4..ceec27a34e3 100644
--- a/apps/browser/src/autofill/browser/cipher-context-menu-handler.spec.ts
+++ b/apps/browser/src/autofill/browser/cipher-context-menu-handler.spec.ts
@@ -120,19 +120,19 @@ describe("CipherContextMenuHandler", () => {
expect(mainContextMenuHandler.loadOptions).toHaveBeenCalledWith(
"Test Cipher (Test Username)",
"5",
- loginCipher
+ loginCipher,
);
expect(mainContextMenuHandler.loadOptions).toHaveBeenCalledWith(
"Test Reprompt Cipher (Test Username)",
"6",
- repromptLoginCipher
+ repromptLoginCipher,
);
expect(mainContextMenuHandler.loadOptions).toHaveBeenCalledWith(
"Test Card Cipher",
"7",
- cardCipher
+ cardCipher,
);
});
});
diff --git a/apps/browser/src/autofill/browser/cipher-context-menu-handler.ts b/apps/browser/src/autofill/browser/cipher-context-menu-handler.ts
index ae2f22e244c..cfb966f87ec 100644
--- a/apps/browser/src/autofill/browser/cipher-context-menu-handler.ts
+++ b/apps/browser/src/autofill/browser/cipher-context-menu-handler.ts
@@ -38,7 +38,7 @@ export class CipherContextMenuHandler {
constructor(
private mainContextMenuHandler: MainContextMenuHandler,
private authService: AuthService,
- private cipherService: CipherService
+ private cipherService: CipherService,
) {}
static async create(cachedServices: CachedServices) {
@@ -74,7 +74,7 @@ export class CipherContextMenuHandler {
return new CipherContextMenuHandler(
await MainContextMenuHandler.mv3Create(cachedServices),
await authServiceFactory(cachedServices, serviceOptions),
- await cipherServiceFactory(cachedServices, serviceOptions)
+ await cipherServiceFactory(cachedServices, serviceOptions),
);
}
@@ -86,7 +86,7 @@ export class CipherContextMenuHandler {
static async tabsOnActivatedListener(
activeInfo: chrome.tabs.TabActiveInfo,
- serviceCache: CachedServices
+ serviceCache: CachedServices,
) {
const cipherContextMenuHandler = await CipherContextMenuHandler.create(serviceCache);
const tab = await BrowserApi.getTab(activeInfo.tabId);
@@ -96,7 +96,7 @@ export class CipherContextMenuHandler {
static async tabsOnReplacedListener(
addedTabId: number,
removedTabId: number,
- serviceCache: CachedServices
+ serviceCache: CachedServices,
) {
const cipherContextMenuHandler = await CipherContextMenuHandler.create(serviceCache);
const tab = await BrowserApi.getTab(addedTabId);
@@ -107,7 +107,7 @@ export class CipherContextMenuHandler {
tabId: number,
changeInfo: chrome.tabs.TabChangeInfo,
tab: chrome.tabs.Tab,
- serviceCache: CachedServices
+ serviceCache: CachedServices,
) {
if (changeInfo.status !== "complete") {
return;
@@ -119,7 +119,7 @@ export class CipherContextMenuHandler {
static async messageListener(
message: { command: string },
sender: chrome.runtime.MessageSender,
- cachedServices: CachedServices
+ cachedServices: CachedServices,
) {
if (!CipherContextMenuHandler.shouldListen(message)) {
return;
@@ -183,7 +183,7 @@ export class CipherContextMenuHandler {
[CipherType.Login]: [],
[CipherType.Card]: [],
[CipherType.Identity]: [],
- }
+ },
);
if (groupedCiphers[CipherType.Login].length === 0) {
diff --git a/apps/browser/src/autofill/browser/context-menu-clicked-handler.spec.ts b/apps/browser/src/autofill/browser/context-menu-clicked-handler.spec.ts
index ae5436f71a2..f2312a0d665 100644
--- a/apps/browser/src/autofill/browser/context-menu-clicked-handler.spec.ts
+++ b/apps/browser/src/autofill/browser/context-menu-clicked-handler.spec.ts
@@ -31,7 +31,7 @@ import {
describe("ContextMenuClickedHandler", () => {
const createData = (
menuItemId: chrome.contextMenus.OnClickData["menuItemId"],
- parentMenuItemId?: chrome.contextMenus.OnClickData["parentMenuItemId"]
+ parentMenuItemId?: chrome.contextMenus.OnClickData["parentMenuItemId"],
): chrome.contextMenus.OnClickData => {
return {
menuItemId: menuItemId,
@@ -52,7 +52,7 @@ describe("ContextMenuClickedHandler", () => {
new Cipher({
id: id ?? "1",
type: CipherType.Login,
- } as any)
+ } as any),
);
cipherView.login.username = username ?? "USERNAME";
@@ -92,7 +92,7 @@ describe("ContextMenuClickedHandler", () => {
stateService,
totpService,
eventCollectionService,
- userVerificationService
+ userVerificationService,
);
});
diff --git a/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts b/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts
index 19643eb5e5f..f3c979744c6 100644
--- a/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts
+++ b/apps/browser/src/autofill/browser/context-menu-clicked-handler.ts
@@ -72,7 +72,7 @@ export class ContextMenuClickedHandler {
private stateService: StateService,
private totpService: TotpService,
private eventCollectionService: EventCollectionService,
- private userVerificationService: UserVerificationService
+ private userVerificationService: UserVerificationService,
) {}
static async mv3Create(cachedServices: CachedServices) {
@@ -108,11 +108,11 @@ export class ContextMenuClickedHandler {
const generatePasswordToClipboardCommand = new GeneratePasswordToClipboardCommand(
await passwordGenerationServiceFactory(cachedServices, serviceOptions),
- await stateServiceFactory(cachedServices, serviceOptions)
+ await stateServiceFactory(cachedServices, serviceOptions),
);
const autofillCommand = new AutofillTabCommand(
- await autofillServiceFactory(cachedServices, serviceOptions)
+ await autofillServiceFactory(cachedServices, serviceOptions),
);
return new ContextMenuClickedHandler(
@@ -124,14 +124,14 @@ export class ContextMenuClickedHandler {
await stateServiceFactory(cachedServices, serviceOptions),
await totpServiceFactory(cachedServices, serviceOptions),
await eventCollectionServiceFactory(cachedServices, serviceOptions),
- await userVerificationServiceFactory(cachedServices, serviceOptions)
+ await userVerificationServiceFactory(cachedServices, serviceOptions),
);
}
static async onClickedListener(
info: chrome.contextMenus.OnClickData,
tab?: chrome.tabs.Tab,
- cachedServices: CachedServices = {}
+ cachedServices: CachedServices = {},
) {
const contextMenuClickedHandler = await ContextMenuClickedHandler.mv3Create(cachedServices);
await contextMenuClickedHandler.run(info, tab);
@@ -140,7 +140,7 @@ export class ContextMenuClickedHandler {
static async messageListener(
message: { command: string; data: LockedVaultPendingNotificationsItem },
sender: chrome.runtime.MessageSender,
- cachedServices: CachedServices
+ cachedServices: CachedServices,
) {
if (
message.command !== "unlockCompleted" ||
@@ -152,7 +152,7 @@ export class ContextMenuClickedHandler {
const contextMenuClickedHandler = await ContextMenuClickedHandler.mv3Create(cachedServices);
await contextMenuClickedHandler.run(
message.data.commandToRetry.msg.data,
- message.data.commandToRetry.sender.tab
+ message.data.commandToRetry.sender.tab,
);
}
@@ -189,7 +189,7 @@ export class ContextMenuClickedHandler {
await BrowserApi.tabSendMessageData(
tab,
"addToLockedVaultPendingNotifications",
- retryMessage
+ retryMessage,
);
await openUnlockPopout(tab);
@@ -201,7 +201,7 @@ export class ContextMenuClickedHandler {
const menuItemId = (info.menuItemId as string).split("_")[1]; // We create all the ids, we can guarantee they are strings
let cipher: CipherView | undefined;
const isCreateCipherAction = [CREATE_LOGIN_ID, CREATE_IDENTITY_ID, CREATE_CARD_ID].includes(
- menuItemId as string
+ menuItemId as string,
);
if (isCreateCipherAction) {
@@ -211,15 +211,15 @@ export class ContextMenuClickedHandler {
info.parentMenuItemId === AUTOFILL_IDENTITY_ID
? [CipherType.Identity]
: info.parentMenuItemId === AUTOFILL_CARD_ID
- ? [CipherType.Card]
- : [];
+ ? [CipherType.Card]
+ : [];
// This NOOP item has come through which is generally only for no access state but since we got here
// we are actually unlocked we will do our best to find a good match of an item to autofill this is useful
// in scenarios like unlock on autofill
const ciphers = await this.cipherService.getAllDecryptedForUrl(
tab.url,
- additionalCiphersToGet
+ additionalCiphersToGet,
);
cipher = ciphers[0];
@@ -314,10 +314,10 @@ export class ContextMenuClickedHandler {
return menuItemId === CREATE_IDENTITY_ID
? CipherType.Identity
: menuItemId === CREATE_CARD_ID
- ? CipherType.Card
- : menuItemId === CREATE_LOGIN_ID
- ? CipherType.Login
- : null;
+ ? CipherType.Card
+ : menuItemId === CREATE_LOGIN_ID
+ ? CipherType.Login
+ : null;
}
private async getIdentifier(tab: chrome.tabs.Tab, info: chrome.contextMenus.OnClickData) {
@@ -333,7 +333,7 @@ export class ContextMenuClickedHandler {
}
resolve(identifier);
- }
+ },
);
});
}
diff --git a/apps/browser/src/autofill/browser/main-context-menu-handler.spec.ts b/apps/browser/src/autofill/browser/main-context-menu-handler.spec.ts
index aa5f43fbc94..8617d657e83 100644
--- a/apps/browser/src/autofill/browser/main-context-menu-handler.spec.ts
+++ b/apps/browser/src/autofill/browser/main-context-menu-handler.spec.ts
@@ -88,7 +88,7 @@ describe("context-menu", () => {
id: id ?? "1",
type: CipherType.Login,
viewPassword: viewPassword ?? true,
- } as any)
+ } as any),
);
cipherView.login.username = username ?? "USERNAME";
cipherView.login.password = password ?? "PASSWORD";
@@ -113,7 +113,7 @@ describe("context-menu", () => {
username: "",
totp: "",
viewPassword: false,
- })
+ }),
);
expect(createSpy).toHaveBeenCalledTimes(1);
diff --git a/apps/browser/src/autofill/browser/main-context-menu-handler.ts b/apps/browser/src/autofill/browser/main-context-menu-handler.ts
index 1e90e90d0d1..f1686452ac4 100644
--- a/apps/browser/src/autofill/browser/main-context-menu-handler.ts
+++ b/apps/browser/src/autofill/browser/main-context-menu-handler.ts
@@ -46,7 +46,7 @@ export class MainContextMenuHandler {
constructor(
private stateService: BrowserStateService,
private i18nService: I18nService,
- private logService: LogService
+ private logService: LogService,
) {
if (chrome.contextMenus) {
this.create = (options) => {
@@ -89,7 +89,7 @@ export class MainContextMenuHandler {
return new MainContextMenuHandler(
await stateServiceFactory(cachedServices, serviceOptions),
await i18nServiceFactory(cachedServices, serviceOptions),
- await logServiceFactory(cachedServices, serviceOptions)
+ await logServiceFactory(cachedServices, serviceOptions),
);
}
@@ -274,7 +274,7 @@ export class MainContextMenuHandler {
const authed = await this.stateService.getIsAuthenticated();
await this.loadOptions(
this.i18nService.t(authed ? "unlockVaultMenu" : "loginToVaultMenu"),
- NOOP_COMMAND_SUFFIX
+ NOOP_COMMAND_SUFFIX,
);
}
}
diff --git a/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.ts b/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.ts
index 62110166658..5094f6701ab 100644
--- a/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.ts
+++ b/apps/browser/src/autofill/clipboard/generate-password-to-clipboard-command.ts
@@ -9,7 +9,7 @@ import { copyToClipboard } from "./copy-to-clipboard-command";
export class GeneratePasswordToClipboardCommand {
constructor(
private passwordGenerationService: PasswordGenerationServiceAbstraction,
- private stateService: BrowserStateService
+ private stateService: BrowserStateService,
) {}
async generatePasswordToClipboard(tab: chrome.tabs.Tab) {
diff --git a/apps/browser/src/autofill/commands/autofill-tab-command.ts b/apps/browser/src/autofill/commands/autofill-tab-command.ts
index b51edd929ee..16ce40ff3d7 100644
--- a/apps/browser/src/autofill/commands/autofill-tab-command.ts
+++ b/apps/browser/src/autofill/commands/autofill-tab-command.ts
@@ -21,7 +21,7 @@ export class AutofillTabCommand {
},
],
tab,
- true
+ true,
);
}
@@ -64,7 +64,7 @@ export class AutofillTabCommand {
}
resolve(response);
- }
+ },
);
});
}
diff --git a/apps/browser/src/autofill/content/autofill-init.spec.ts b/apps/browser/src/autofill/content/autofill-init.spec.ts
index 93614970ec5..211a6ee03c0 100644
--- a/apps/browser/src/autofill/content/autofill-init.spec.ts
+++ b/apps/browser/src/autofill/content/autofill-init.spec.ts
@@ -41,7 +41,7 @@ describe("AutofillInit", () => {
autofillInit["setupExtensionMessageListeners"]();
expect(chrome.runtime.onMessage.addListener).toHaveBeenCalledWith(
- autofillInit["handleExtensionMessage"]
+ autofillInit["handleExtensionMessage"],
);
});
});
@@ -157,7 +157,7 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage(
{ command: "collectPageDetailsImmediately" },
sender,
- sendResponse
+ sendResponse,
);
await flushPromises();
@@ -186,7 +186,7 @@ describe("AutofillInit", () => {
await flushPromises();
expect(autofillInit["insertAutofillContentService"].fillForm).not.toHaveBeenCalledWith(
- fillScript
+ fillScript,
);
});
@@ -199,7 +199,7 @@ describe("AutofillInit", () => {
await flushPromises();
expect(autofillInit["insertAutofillContentService"].fillForm).toHaveBeenCalledWith(
- fillScript
+ fillScript,
);
});
@@ -220,11 +220,11 @@ describe("AutofillInit", () => {
expect(autofillInit["updateOverlayIsCurrentlyFilling"]).toHaveBeenNthCalledWith(1, true);
expect(autofillInit["insertAutofillContentService"].fillForm).toHaveBeenCalledWith(
- fillScript
+ fillScript,
);
expect(autofillInit["updateOverlayIsCurrentlyFilling"]).toHaveBeenNthCalledWith(2, false);
expect(
- autofillInit["autofillOverlayContentService"].focusMostRecentOverlayField
+ autofillInit["autofillOverlayContentService"].focusMostRecentOverlayField,
).toHaveBeenCalled();
});
@@ -247,14 +247,14 @@ describe("AutofillInit", () => {
expect(newAutofillInit["updateOverlayIsCurrentlyFilling"]).toHaveBeenNthCalledWith(
1,
- true
+ true,
);
expect(newAutofillInit["insertAutofillContentService"].fillForm).toHaveBeenCalledWith(
- fillScript
+ fillScript,
);
expect(newAutofillInit["updateOverlayIsCurrentlyFilling"]).not.toHaveBeenNthCalledWith(
2,
- false
+ false,
);
});
});
@@ -282,7 +282,7 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage(message);
expect(
- autofillInit["autofillOverlayContentService"].openAutofillOverlay
+ autofillInit["autofillOverlayContentService"].openAutofillOverlay,
).toHaveBeenCalledWith({
isFocusingFieldElement: message.data.isFocusingFieldElement,
isOpeningFullOverlay: message.data.isOpeningFullOverlay,
@@ -303,10 +303,10 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage({ command: "closeAutofillOverlay" });
expect(
- autofillInit["autofillOverlayContentService"].removeAutofillOverlayList
+ autofillInit["autofillOverlayContentService"].removeAutofillOverlayList,
).not.toHaveBeenCalled();
expect(
- autofillInit["autofillOverlayContentService"].removeAutofillOverlay
+ autofillInit["autofillOverlayContentService"].removeAutofillOverlay,
).not.toHaveBeenCalled();
});
@@ -316,10 +316,10 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage({ command: "closeAutofillOverlay" });
expect(
- autofillInit["autofillOverlayContentService"].removeAutofillOverlayList
+ autofillInit["autofillOverlayContentService"].removeAutofillOverlayList,
).toHaveBeenCalled();
expect(
- autofillInit["autofillOverlayContentService"].removeAutofillOverlay
+ autofillInit["autofillOverlayContentService"].removeAutofillOverlay,
).not.toHaveBeenCalled();
});
@@ -327,10 +327,10 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage({ command: "closeAutofillOverlay" });
expect(
- autofillInit["autofillOverlayContentService"].removeAutofillOverlayList
+ autofillInit["autofillOverlayContentService"].removeAutofillOverlayList,
).not.toHaveBeenCalled();
expect(
- autofillInit["autofillOverlayContentService"].removeAutofillOverlay
+ autofillInit["autofillOverlayContentService"].removeAutofillOverlay,
).toHaveBeenCalled();
});
});
@@ -373,7 +373,7 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage(message);
expect(
- autofillInit["autofillOverlayContentService"].redirectOverlayFocusOut
+ autofillInit["autofillOverlayContentService"].redirectOverlayFocusOut,
).toHaveBeenCalledWith(message.data.direction);
});
});
@@ -399,7 +399,7 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage(message);
expect(autofillInit["autofillOverlayContentService"].isOverlayCiphersPopulated).toEqual(
- message.data.isOverlayCiphersPopulated
+ message.data.isOverlayCiphersPopulated,
);
});
});
@@ -423,7 +423,7 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage({ command: "bgUnlockPopoutOpened" });
expect(
- autofillInit["autofillOverlayContentService"].blurMostRecentOverlayField
+ autofillInit["autofillOverlayContentService"].blurMostRecentOverlayField,
).toHaveBeenCalled();
expect(autofillInit["removeAutofillOverlay"]).toHaveBeenCalled();
});
@@ -448,7 +448,7 @@ describe("AutofillInit", () => {
sendExtensionRuntimeMessage({ command: "bgVaultItemRepromptPopoutOpened" });
expect(
- autofillInit["autofillOverlayContentService"].blurMostRecentOverlayField
+ autofillInit["autofillOverlayContentService"].blurMostRecentOverlayField,
).toHaveBeenCalled();
expect(autofillInit["removeAutofillOverlay"]).toHaveBeenCalled();
});
diff --git a/apps/browser/src/autofill/content/autofill-init.ts b/apps/browser/src/autofill/content/autofill-init.ts
index 0bd04edee4b..c2c5a815ef3 100644
--- a/apps/browser/src/autofill/content/autofill-init.ts
+++ b/apps/browser/src/autofill/content/autofill-init.ts
@@ -39,11 +39,11 @@ class AutofillInit implements AutofillInitInterface {
this.domElementVisibilityService = new DomElementVisibilityService();
this.collectAutofillContentService = new CollectAutofillContentService(
this.domElementVisibilityService,
- this.autofillOverlayContentService
+ this.autofillOverlayContentService,
);
this.insertAutofillContentService = new InsertAutofillContentService(
this.domElementVisibilityService,
- this.collectAutofillContentService
+ this.collectAutofillContentService,
);
}
@@ -69,7 +69,7 @@ class AutofillInit implements AutofillInitInterface {
*/
private async collectPageDetails(
message: AutofillExtensionMessage,
- sendDetailsInResponse = false
+ sendDetailsInResponse = false,
): Promise {
const pageDetails: AutofillPageDetails =
await this.collectAutofillContentService.getPageDetails();
@@ -205,7 +205,7 @@ class AutofillInit implements AutofillInitInterface {
}
this.autofillOverlayContentService.isOverlayCiphersPopulated = Boolean(
- data?.isOverlayCiphersPopulated
+ data?.isOverlayCiphersPopulated,
);
}
@@ -226,7 +226,7 @@ class AutofillInit implements AutofillInitInterface {
private handleExtensionMessage = (
message: AutofillExtensionMessage,
sender: chrome.runtime.MessageSender,
- sendResponse: (response?: any) => void
+ sendResponse: (response?: any) => void,
): boolean => {
const command: string = message.command;
const handler: CallableFunction | undefined = this.extensionMessageHandlers[command];
diff --git a/apps/browser/src/autofill/content/message_handler.ts b/apps/browser/src/autofill/content/message_handler.ts
index c2c5c4d3196..9bf48e3b17d 100644
--- a/apps/browser/src/autofill/content/message_handler.ts
+++ b/apps/browser/src/autofill/content/message_handler.ts
@@ -24,7 +24,7 @@ window.addEventListener(
});
}
},
- false
+ false,
);
const forwardCommands = [
diff --git a/apps/browser/src/autofill/content/misc-utils.ts b/apps/browser/src/autofill/content/misc-utils.ts
index b34a27a30a5..7fe884f1d51 100644
--- a/apps/browser/src/autofill/content/misc-utils.ts
+++ b/apps/browser/src/autofill/content/misc-utils.ts
@@ -7,7 +7,7 @@ async function copyText(text: string) {
async function onMessageListener(
msg: TabMessage,
sender: chrome.runtime.MessageSender,
- responseCallback: (response: unknown) => void
+ responseCallback: (response: unknown) => void,
) {
switch (msg.command) {
case "copyText":
diff --git a/apps/browser/src/autofill/content/notification-bar.ts b/apps/browser/src/autofill/content/notification-bar.ts
index 223d6ab1ddf..264d64741ba 100644
--- a/apps/browser/src/autofill/content/notification-bar.ts
+++ b/apps/browser/src/autofill/content/notification-bar.ts
@@ -445,7 +445,7 @@ async function loadNotificationBar() {
// know what type of form we are watching
const submitButton = getSubmitButton(
form,
- unionSets(logInButtonNames, changePasswordButtonNames)
+ unionSets(logInButtonNames, changePasswordButtonNames),
);
if (submitButton != null) {
@@ -475,7 +475,7 @@ async function loadNotificationBar() {
watchedForm.formEl,
watchedForm.data.password,
inputs,
- true // Only do fallback if we have expect to find a single password field
+ true, // Only do fallback if we have expect to find a single password field
);
} else if (watchedForm.data.passwords != null) {
// if we didn't find a username field, try to locate multiple password fields
@@ -499,7 +499,7 @@ async function loadNotificationBar() {
form: HTMLFormElement,
passwordData: AutofillField,
inputs: HTMLInputElement[],
- doLastFallback: boolean
+ doLastFallback: boolean,
): HTMLInputElement {
let el = locateField(form, passwordData, inputs);
if (el != null && el.type !== "password") {
@@ -521,7 +521,7 @@ async function loadNotificationBar() {
function locateField(
form: HTMLFormElement,
fieldData: AutofillField,
- inputs: HTMLInputElement[]
+ inputs: HTMLInputElement[],
): HTMLInputElement | null {
// If we have no field data, we cannot locate the field
if (fieldData == null) {
@@ -667,7 +667,7 @@ async function loadNotificationBar() {
// Check if the submit button contains any of the change password button names as a safeguard
const buttonText = getButtonText(getSubmitButton(form, changePasswordButtonNames));
const matches = Array.from(changePasswordButtonContainsNames).filter(
- (n) => buttonText.indexOf(n) > -1
+ (n) => buttonText.indexOf(n) > -1,
);
if (matches.length > 0) {
@@ -744,8 +744,8 @@ async function loadNotificationBar() {
if (submitButton == null) {
const possibleSubmitButtons = Array.from(
wrappingEl.querySelectorAll(
- 'a, span, button[type="button"], ' + 'input[type="button"], button:not([type])'
- )
+ 'a, span, button[type="button"], ' + 'input[type="button"], button:not([type])',
+ ),
) as HTMLElement[];
let typelessButton: HTMLElement = null;
// Loop through all possible submit buttons and find the first one that matches a submit button name
diff --git a/apps/browser/src/autofill/jest/autofill-mocks.ts b/apps/browser/src/autofill/jest/autofill-mocks.ts
index 6d8c727dd51..de84cef2494 100644
--- a/apps/browser/src/autofill/jest/autofill-mocks.ts
+++ b/apps/browser/src/autofill/jest/autofill-mocks.ts
@@ -106,7 +106,7 @@ function createGenerateFillScriptOptionsMock(customFields = {}): GenerateFillScr
function createAutofillScriptMock(
customFields = {},
- scriptTypes?: Record
+ scriptTypes?: Record,
): AutofillScript {
let script: FillScript[] = [
["click_on_opid", "default-field"],
@@ -152,7 +152,7 @@ const overlayPagesTranslations = {
addNewVaultItem: "addNewVaultItem",
};
function createInitAutofillOverlayButtonMessageMock(
- customFields = {}
+ customFields = {},
): InitAutofillOverlayButtonMessage {
return {
command: "initAutofillOverlayButton",
@@ -181,7 +181,7 @@ function createAutofillOverlayCipherDataMock(index: number, customFields = {}):
}
function createInitAutofillOverlayListMessageMock(
- customFields = {}
+ customFields = {},
): InitAutofillOverlayListMessage {
return {
command: "initAutofillOverlayList",
diff --git a/apps/browser/src/autofill/jest/testing-utils.ts b/apps/browser/src/autofill/jest/testing-utils.ts
index c3fe951a8ee..e0972e3d90d 100644
--- a/apps/browser/src/autofill/jest/testing-utils.ts
+++ b/apps/browser/src/autofill/jest/testing-utils.ts
@@ -18,7 +18,7 @@ function postWindowMessage(data: any, origin = "https://localhost/") {
function sendExtensionRuntimeMessage(
message: any,
sender?: chrome.runtime.MessageSender,
- sendResponse?: CallableFunction
+ sendResponse?: CallableFunction,
) {
(chrome.runtime.onMessage.addListener as unknown as jest.SpyInstance).mock.calls.forEach(
(call) => {
@@ -26,9 +26,9 @@ function sendExtensionRuntimeMessage(
callback(
message || {},
sender || mock(),
- sendResponse || jest.fn()
+ sendResponse || jest.fn(),
);
- }
+ },
);
}
@@ -51,7 +51,7 @@ function triggerWindowOnFocusedChangedEvent(windowId: number) {
(call) => {
const callback = call[0];
callback(windowId);
- }
+ },
);
}
@@ -60,7 +60,7 @@ function triggerTabOnActivatedEvent(activeInfo: chrome.tabs.TabActiveInfo) {
(call) => {
const callback = call[0];
callback(activeInfo);
- }
+ },
);
}
@@ -74,7 +74,7 @@ function triggerTabOnReplacedEvent(addedTabId: number, removedTabId: number) {
function triggerTabOnUpdatedEvent(
tabId: number,
changeInfo: chrome.tabs.TabChangeInfo,
- tab: chrome.tabs.Tab
+ tab: chrome.tabs.Tab,
) {
(chrome.tabs.onUpdated.addListener as unknown as jest.SpyInstance).mock.calls.forEach((call) => {
const callback = call[0];
diff --git a/apps/browser/src/autofill/notification/bar.html b/apps/browser/src/autofill/notification/bar.html
index a6be58de70a..0b7e4c8e0ec 100644
--- a/apps/browser/src/autofill/notification/bar.html
+++ b/apps/browser/src/autofill/notification/bar.html
@@ -1,4 +1,4 @@
-
+
Bitwarden
diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.ts b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.ts
index 125a53c01de..813d8054704 100644
--- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.ts
+++ b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-button-iframe.ts
@@ -12,7 +12,7 @@ class AutofillOverlayButtonIframe extends AutofillOverlayIframeElement {
border: "none",
},
chrome.i18n.getMessage("bitwardenOverlayButton"),
- chrome.i18n.getMessage("bitwardenOverlayMenuAvailable")
+ chrome.i18n.getMessage("bitwardenOverlayMenuAvailable"),
);
}
}
diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.ts b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.ts
index 7f84c07870d..209834410f9 100644
--- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.ts
+++ b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe-element.ts
@@ -6,7 +6,7 @@ class AutofillOverlayIframeElement extends HTMLElement {
portName: string,
initStyles: Partial,
iframeTitle: string,
- ariaAlert?: string
+ ariaAlert?: string,
) {
super();
@@ -14,7 +14,7 @@ class AutofillOverlayIframeElement extends HTMLElement {
const autofillOverlayIframeService = new AutofillOverlayIframeService(
iframePath,
portName,
- shadow
+ shadow,
);
autofillOverlayIframeService.initOverlayIframe(initStyles, iframeTitle, ariaAlert);
}
diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.spec.ts b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.spec.ts
index 432f1a548ab..a9e4ca81cb6 100644
--- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.spec.ts
+++ b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.spec.ts
@@ -23,17 +23,17 @@ describe("AutofillOverlayIframeService", () => {
autofillOverlayIframeService = new AutofillOverlayIframeService(
iframePath,
AutofillOverlayPort.Button,
- shadow
+ shadow,
);
shadowAppendSpy = jest.spyOn(shadow, "appendChild");
handlePortDisconnectSpy = jest.spyOn(
autofillOverlayIframeService as any,
- "handlePortDisconnect"
+ "handlePortDisconnect",
);
handlePortMessageSpy = jest.spyOn(autofillOverlayIframeService as any, "handlePortMessage");
handleWindowMessageSpy = jest.spyOn(autofillOverlayIframeService as any, "handleWindowMessage");
chrome.runtime.connect = jest.fn((connectInfo: chrome.runtime.ConnectInfo) =>
- createPortSpyMock(connectInfo.name)
+ createPortSpyMock(connectInfo.name),
) as unknown as typeof chrome.runtime.connect;
});
@@ -54,7 +54,7 @@ describe("AutofillOverlayIframeService", () => {
autofillOverlayIframeService.initOverlayIframe({}, "title");
expect(autofillOverlayIframeService["shadow"].appendChild).toBeCalledWith(
- autofillOverlayIframeService["iframe"]
+ autofillOverlayIframeService["iframe"],
);
});
@@ -147,7 +147,7 @@ describe("AutofillOverlayIframeService", () => {
expect(globalThis.removeEventListener).toBeCalledWith(
EVENTS.MESSAGE,
- handleWindowMessageSpy
+ handleWindowMessageSpy,
);
});
@@ -186,7 +186,7 @@ describe("AutofillOverlayIframeService", () => {
expect(autofillOverlayIframeService["iframe"].contentWindow.postMessage).toBeCalledWith(
message,
- "*"
+ "*",
);
});
@@ -204,7 +204,7 @@ describe("AutofillOverlayIframeService", () => {
beforeEach(() => {
updateElementStylesSpy = jest.spyOn(
autofillOverlayIframeService as any,
- "updateElementStyles"
+ "updateElementStyles",
);
});
@@ -219,7 +219,7 @@ describe("AutofillOverlayIframeService", () => {
expect(updateElementStylesSpy).not.toBeCalled();
expect(autofillOverlayIframeService["iframe"].contentWindow.postMessage).toBeCalledWith(
message,
- "*"
+ "*",
);
});
@@ -344,7 +344,7 @@ describe("AutofillOverlayIframeService", () => {
new MessageEvent("message", {
data: {},
source: window,
- })
+ }),
);
expect(portSpy.postMessage).not.toBeCalled();
@@ -356,7 +356,7 @@ describe("AutofillOverlayIframeService", () => {
data: {},
source: autofillOverlayIframeService["iframe"].contentWindow,
origin: "https://www.google.com",
- })
+ }),
);
expect(portSpy.postMessage).not.toBeCalled();
@@ -368,7 +368,7 @@ describe("AutofillOverlayIframeService", () => {
data: { command: "not-a-handled-command" },
source: autofillOverlayIframeService["iframe"].contentWindow,
origin: "chrome-extension://id",
- })
+ }),
);
expect(portSpy.postMessage).toBeCalledWith({ command: "not-a-handled-command" });
@@ -380,7 +380,7 @@ describe("AutofillOverlayIframeService", () => {
data: { command: "updateAutofillOverlayListHeight", styles: { height: "300px" } },
source: autofillOverlayIframeService["iframe"].contentWindow,
origin: "chrome-extension://id",
- })
+ }),
);
expect(autofillOverlayIframeService["iframe"].style.height).toBe("300px");
diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.ts b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.ts
index 2ec2bc0aa3b..dad1e1908e6 100644
--- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.ts
+++ b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-iframe.service.ts
@@ -40,7 +40,11 @@ class AutofillOverlayIframeService implements AutofillOverlayIframeServiceInterf
updateOverlayHidden: ({ message }) => this.updateElementStyles(this.iframe, message.styles),
};
- constructor(private iframePath: string, private portName: string, private shadow: ShadowRoot) {
+ constructor(
+ private iframePath: string,
+ private portName: string,
+ private shadow: ShadowRoot,
+ ) {
this.extensionOriginsSet = new Set([
chrome.runtime.getURL("").slice(0, -1).toLowerCase(), // Remove the trailing slash and normalize the extension url to lowercase
"null",
@@ -65,7 +69,7 @@ class AutofillOverlayIframeService implements AutofillOverlayIframeServiceInterf
initOverlayIframe(
initStyles: Partial,
iframeTitle: string,
- ariaAlert?: string
+ ariaAlert?: string,
) {
this.iframe = globalThis.document.createElement("iframe");
this.iframe.src = chrome.runtime.getURL(this.iframePath);
@@ -167,7 +171,7 @@ class AutofillOverlayIframeService implements AutofillOverlayIframeServiceInterf
*/
private handlePortMessage = (
message: AutofillOverlayIframeExtensionMessage,
- port: chrome.runtime.Port
+ port: chrome.runtime.Port,
) => {
if (port.name !== this.portName) {
return;
diff --git a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.ts b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.ts
index 26a0ed2765e..b60b618e4e7 100644
--- a/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.ts
+++ b/apps/browser/src/autofill/overlay/iframe-content/autofill-overlay-list-iframe.ts
@@ -17,7 +17,7 @@ class AutofillOverlayListIframe extends AutofillOverlayIframeElement {
borderStyle: "solid",
borderColor: "rgb(206, 212, 220)",
},
- chrome.i18n.getMessage("bitwardenVault")
+ chrome.i18n.getMessage("bitwardenVault"),
);
}
}
diff --git a/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.spec.ts b/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.spec.ts
index a4d0b336225..c4927f4a971 100644
--- a/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.spec.ts
+++ b/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.spec.ts
@@ -25,12 +25,12 @@ describe("AutofillOverlayButton", () => {
describe("initAutofillOverlayButton", () => {
it("creates the button element with the locked icon when the user's auth status is not Unlocked", () => {
postWindowMessage(
- createInitAutofillOverlayButtonMessageMock({ authStatus: AuthenticationStatus.Locked })
+ createInitAutofillOverlayButtonMessageMock({ authStatus: AuthenticationStatus.Locked }),
);
expect(autofillOverlayButton["buttonElement"]).toMatchSnapshot();
expect(autofillOverlayButton["buttonElement"].querySelector("svg")).toBe(
- autofillOverlayButton["logoLockedIconElement"]
+ autofillOverlayButton["logoLockedIconElement"],
);
});
@@ -39,7 +39,7 @@ describe("AutofillOverlayButton", () => {
expect(autofillOverlayButton["buttonElement"]).toMatchSnapshot();
expect(autofillOverlayButton["buttonElement"].querySelector("svg")).toBe(
- autofillOverlayButton["logoIconElement"]
+ autofillOverlayButton["logoIconElement"],
);
});
@@ -49,7 +49,7 @@ describe("AutofillOverlayButton", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "overlayButtonClicked" },
- "https://localhost/"
+ "https://localhost/",
);
});
});
@@ -74,7 +74,7 @@ describe("AutofillOverlayButton", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "closeAutofillOverlay" },
- "https://localhost/"
+ "https://localhost/",
);
});
diff --git a/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.ts b/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.ts
index 7b3acdac9e5..94c0772fd2b 100644
--- a/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.ts
+++ b/apps/browser/src/autofill/overlay/pages/button/autofill-overlay-button.ts
@@ -58,7 +58,7 @@ class AutofillOverlayButton extends AutofillOverlayPageElement {
this.buttonElement.classList.add("overlay-button");
this.buttonElement.setAttribute(
"aria-label",
- this.getTranslation("toggleBitwardenVaultOverlay")
+ this.getTranslation("toggleBitwardenVaultOverlay"),
);
this.buttonElement.addEventListener(EVENTS.CLICK, this.handleButtonElementClick);
diff --git a/apps/browser/src/autofill/overlay/pages/button/button.html b/apps/browser/src/autofill/overlay/pages/button/button.html
index de553e008d9..6cbd1332743 100644
--- a/apps/browser/src/autofill/overlay/pages/button/button.html
+++ b/apps/browser/src/autofill/overlay/pages/button/button.html
@@ -1,4 +1,4 @@
-
+
Bitwarden overlay button
diff --git a/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.spec.ts b/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.spec.ts
index 358b003401d..f26dc2bab0f 100644
--- a/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.spec.ts
+++ b/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.spec.ts
@@ -36,7 +36,7 @@ describe("AutofillOverlayList", () => {
createInitAutofillOverlayListMessageMock({
authStatus: AuthenticationStatus.Locked,
cipherList: [],
- })
+ }),
);
});
@@ -52,7 +52,7 @@ describe("AutofillOverlayList", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "unlockVault" },
- "https://localhost/"
+ "https://localhost/",
);
});
});
@@ -63,7 +63,7 @@ describe("AutofillOverlayList", () => {
createInitAutofillOverlayListMessageMock({
authStatus: AuthenticationStatus.Unlocked,
ciphers: [],
- })
+ }),
);
});
@@ -79,7 +79,7 @@ describe("AutofillOverlayList", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "addNewVaultItem" },
- "https://localhost/"
+ "https://localhost/",
);
});
});
@@ -113,7 +113,7 @@ describe("AutofillOverlayList", () => {
autofillOverlayList["cipherListScrollDebounceTimeout"] = setTimeout(jest.fn, 0);
const handleDebouncedScrollEventSpy = jest.spyOn(
autofillOverlayList as any,
- "handleDebouncedScrollEvent"
+ "handleDebouncedScrollEvent",
);
autofillOverlayList["handleCiphersListScrollEvent"]();
@@ -139,7 +139,7 @@ describe("AutofillOverlayList", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "fillSelectedListItem", overlayCipherId: "1" },
- "https://localhost/"
+ "https://localhost/",
);
});
@@ -227,7 +227,7 @@ describe("AutofillOverlayList", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "viewSelectedCipher", overlayCipherId: "1" },
- "https://localhost/"
+ "https://localhost/",
);
});
@@ -298,7 +298,7 @@ describe("AutofillOverlayList", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "checkAutofillOverlayButtonFocused" },
- "https://localhost/"
+ "https://localhost/",
);
});
@@ -317,7 +317,7 @@ describe("AutofillOverlayList", () => {
createInitAutofillOverlayListMessageMock({
authStatus: AuthenticationStatus.Locked,
cipherList: [],
- })
+ }),
);
const unlockButton =
autofillOverlayList["overlayListContainer"].querySelector("#unlock-button");
@@ -382,7 +382,7 @@ describe("AutofillOverlayList", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "updateAutofillOverlayListHeight", styles: { height: "300px" } },
- "https://localhost/"
+ "https://localhost/",
);
});
});
diff --git a/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.ts b/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.ts
index 77ddd56b34d..b3c20d1edce 100644
--- a/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.ts
+++ b/apps/browser/src/autofill/overlay/pages/list/autofill-overlay-list.ts
@@ -89,7 +89,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
unlockButtonElement.textContent = this.getTranslation("unlockAccount");
unlockButtonElement.setAttribute(
"aria-label",
- `${this.getTranslation("unlockAccount")}, ${this.getTranslation("opensInANewWindow")}`
+ `${this.getTranslation("unlockAccount")}, ${this.getTranslation("opensInANewWindow")}`,
);
unlockButtonElement.prepend(buildSvgDomElement(lockIcon));
unlockButtonElement.addEventListener(EVENTS.CLICK, this.handleUnlockButtonClick);
@@ -151,7 +151,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
newItemButton.textContent = this.getTranslation("newItem");
newItemButton.setAttribute(
"aria-label",
- `${this.getTranslation("addNewVaultItem")}, ${this.getTranslation("opensInANewWindow")}`
+ `${this.getTranslation("addNewVaultItem")}, ${this.getTranslation("opensInANewWindow")}`,
);
newItemButton.prepend(buildSvgDomElement(plusIcon));
newItemButton.addEventListener(EVENTS.CLICK, this.handeNewItemButtonClick);
@@ -177,7 +177,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
private loadPageOfCiphers() {
const lastIndex = Math.min(
this.currentCipherIndex + this.showCiphersPerPage,
- this.ciphers.length
+ this.ciphers.length,
);
for (let cipherIndex = this.currentCipherIndex; cipherIndex < lastIndex; cipherIndex++) {
this.ciphersList.appendChild(this.buildOverlayActionsListItem(this.ciphers[cipherIndex]));
@@ -253,11 +253,11 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
fillCipherElement.classList.add("fill-cipher-button");
fillCipherElement.setAttribute(
"aria-label",
- `${this.getTranslation("fillCredentialsFor")} ${cipher.name}`
+ `${this.getTranslation("fillCredentialsFor")} ${cipher.name}`,
);
fillCipherElement.setAttribute(
"aria-description",
- `${this.getTranslation("partialUsername")}, ${cipher.login.username}`
+ `${this.getTranslation("partialUsername")}, ${cipher.login.username}`,
);
fillCipherElement.append(cipherIcon, cipherDetailsElement);
fillCipherElement.addEventListener(EVENTS.CLICK, this.handleFillCipherClickEvent(cipher));
@@ -279,7 +279,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
command: "fillSelectedListItem",
overlayCipherId: cipher.id,
}),
- `${cipher.id}-fill-cipher-button-click-handler`
+ `${cipher.id}-fill-cipher-button-click-handler`,
);
};
@@ -323,7 +323,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
viewCipherElement.classList.add("view-cipher-button");
viewCipherElement.setAttribute(
"aria-label",
- `${this.getTranslation("view")} ${cipher.name}, ${this.getTranslation("opensInANewWindow")}`
+ `${this.getTranslation("view")} ${cipher.name}, ${this.getTranslation("opensInANewWindow")}`,
);
viewCipherElement.append(buildSvgDomElement(viewCipherIcon));
viewCipherElement.addEventListener(EVENTS.CLICK, this.handleViewCipherClickEvent(cipher));
@@ -341,7 +341,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
private handleViewCipherClickEvent = (cipher: OverlayCipherData) => {
return this.useEventHandlersMemo(
() => this.postMessageToParent({ command: "viewSelectedCipher", overlayCipherId: cipher.id }),
- `${cipher.id}-view-cipher-button-click-handler`
+ `${cipher.id}-view-cipher-button-click-handler`,
);
};
@@ -485,7 +485,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
*/
private focusOverlayList() {
const unlockButtonElement = this.overlayListContainer.querySelector(
- "#unlock-button"
+ "#unlock-button",
) as HTMLElement;
if (unlockButtonElement) {
unlockButtonElement.focus();
@@ -493,7 +493,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
}
const newItemButtonElement = this.overlayListContainer.querySelector(
- "#new-item-button"
+ "#new-item-button",
) as HTMLElement;
if (newItemButtonElement) {
newItemButtonElement.focus();
@@ -501,7 +501,7 @@ class AutofillOverlayList extends AutofillOverlayPageElement {
}
const firstCipherElement = this.overlayListContainer.querySelector(
- ".fill-cipher-button"
+ ".fill-cipher-button",
) as HTMLElement;
firstCipherElement?.focus();
}
diff --git a/apps/browser/src/autofill/overlay/pages/list/list.html b/apps/browser/src/autofill/overlay/pages/list/list.html
index 5678a3e4f38..8e63de67374 100644
--- a/apps/browser/src/autofill/overlay/pages/list/list.html
+++ b/apps/browser/src/autofill/overlay/pages/list/list.html
@@ -1,4 +1,4 @@
-
+
Bitwarden vault
diff --git a/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.spec.ts b/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.spec.ts
index 1c0587ce861..c70892cfcad 100644
--- a/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.spec.ts
+++ b/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.spec.ts
@@ -35,12 +35,12 @@ describe("AutofillOverlayPageElement", () => {
const linkElement = autofillOverlayPageElement["initOverlayPage"](
"button",
"https://jest-testing-website.com",
- translations
+ translations,
);
expect(globalThis.document.documentElement.setAttribute).toHaveBeenCalledWith(
"lang",
- translations.locale
+ translations.locale,
);
expect(globalThis.document.head.title).toEqual(translations.buttonPageTitle);
expect(globalThis.document.createElement).toHaveBeenCalledWith("link");
@@ -62,7 +62,7 @@ describe("AutofillOverlayPageElement", () => {
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "test" },
- "https://jest-testing-website.com"
+ "https://jest-testing-website.com",
);
});
});
@@ -79,25 +79,25 @@ describe("AutofillOverlayPageElement", () => {
it("sets up global event listeners", () => {
const handleWindowMessageSpy = jest.spyOn(
autofillOverlayPageElement as any,
- "handleWindowMessage"
+ "handleWindowMessage",
);
const handleWindowBlurEventSpy = jest.spyOn(
autofillOverlayPageElement as any,
- "handleWindowBlurEvent"
+ "handleWindowBlurEvent",
);
const handleDocumentKeyDownEventSpy = jest.spyOn(
autofillOverlayPageElement as any,
- "handleDocumentKeyDownEvent"
+ "handleDocumentKeyDownEvent",
);
autofillOverlayPageElement["setupGlobalListeners"](
- mock()
+ mock(),
);
expect(globalThis.addEventListener).toHaveBeenCalledWith("message", handleWindowMessageSpy);
expect(globalThis.addEventListener).toHaveBeenCalledWith("blur", handleWindowBlurEventSpy);
expect(globalThis.document.addEventListener).toHaveBeenCalledWith(
"keydown",
- handleDocumentKeyDownEventSpy
+ handleDocumentKeyDownEventSpy,
);
});
@@ -106,18 +106,18 @@ describe("AutofillOverlayPageElement", () => {
autofillOverlayPageElement["setupGlobalListeners"](
mock({
initAutofillOverlayButton: initAutofillOverlayButtonSpy,
- })
+ }),
);
globalThis.dispatchEvent(
new MessageEvent("message", {
data: { command: "initAutofillOverlayButton" },
origin: "https://jest-testing-website.com",
- })
+ }),
);
expect(autofillOverlayPageElement["messageOrigin"]).toEqual(
- "https://jest-testing-website.com"
+ "https://jest-testing-website.com",
);
});
@@ -126,7 +126,7 @@ describe("AutofillOverlayPageElement", () => {
autofillOverlayPageElement["setupGlobalListeners"](
mock({
initAutofillOverlayButton: initAutofillOverlayButtonSpy,
- })
+ }),
);
const data = { command: "initAutofillOverlayButton" };
@@ -140,7 +140,7 @@ describe("AutofillOverlayPageElement", () => {
autofillOverlayPageElement["setupGlobalListeners"](
mock({
initAutofillOverlayButton: initAutofillOverlayButtonSpy,
- })
+ }),
);
globalThis.dispatchEvent(new MessageEvent("message", { data: { command: "test" } }));
@@ -151,20 +151,20 @@ describe("AutofillOverlayPageElement", () => {
it("posts a message to the parent when the window is blurred", () => {
autofillOverlayPageElement["messageOrigin"] = "https://jest-testing-website.com";
autofillOverlayPageElement["setupGlobalListeners"](
- mock()
+ mock(),
);
globalThis.dispatchEvent(new Event("blur"));
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "overlayPageBlurred" },
- "https://jest-testing-website.com"
+ "https://jest-testing-website.com",
);
});
it("skips redirecting keyboard focus when a KeyDown event triggers and the key is not a `Tab` or `Escape` key", () => {
autofillOverlayPageElement["setupGlobalListeners"](
- mock()
+ mock(),
);
globalThis.document.dispatchEvent(new KeyboardEvent("keydown", { code: "test" }));
@@ -175,44 +175,44 @@ describe("AutofillOverlayPageElement", () => {
it("redirects the overlay focus out to the previous element on KeyDown of the `Tab+Shift` keys", () => {
autofillOverlayPageElement["messageOrigin"] = "https://jest-testing-website.com";
autofillOverlayPageElement["setupGlobalListeners"](
- mock()
+ mock(),
);
globalThis.document.dispatchEvent(
- new KeyboardEvent("keydown", { code: "Tab", shiftKey: true })
+ new KeyboardEvent("keydown", { code: "Tab", shiftKey: true }),
);
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "redirectOverlayFocusOut", direction: "previous" },
- "https://jest-testing-website.com"
+ "https://jest-testing-website.com",
);
});
it("redirects the overlay focus out to the next element on KeyDown of the `Tab` key", () => {
autofillOverlayPageElement["messageOrigin"] = "https://jest-testing-website.com";
autofillOverlayPageElement["setupGlobalListeners"](
- mock()
+ mock(),
);
globalThis.document.dispatchEvent(new KeyboardEvent("keydown", { code: "Tab" }));
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "redirectOverlayFocusOut", direction: "next" },
- "https://jest-testing-website.com"
+ "https://jest-testing-website.com",
);
});
it("redirects the overlay focus out to the current element on KeyDown of the `Escape` key", () => {
autofillOverlayPageElement["messageOrigin"] = "https://jest-testing-website.com";
autofillOverlayPageElement["setupGlobalListeners"](
- mock()
+ mock(),
);
globalThis.document.dispatchEvent(new KeyboardEvent("keydown", { code: "Escape" }));
expect(globalThis.parent.postMessage).toHaveBeenCalledWith(
{ command: "redirectOverlayFocusOut", direction: "current" },
- "https://jest-testing-website.com"
+ "https://jest-testing-website.com",
);
});
});
diff --git a/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.ts b/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.ts
index 692803a7529..cca96555b2a 100644
--- a/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.ts
+++ b/apps/browser/src/autofill/overlay/pages/shared/autofill-overlay-page-element.ts
@@ -28,7 +28,7 @@ class AutofillOverlayPageElement extends HTMLElement {
protected initOverlayPage(
elementName: "button" | "list",
styleSheetUrl: string,
- translations: Record
+ translations: Record,
): HTMLLinkElement {
this.translations = translations;
globalThis.document.documentElement.setAttribute("lang", this.getTranslation("locale"));
@@ -127,7 +127,7 @@ class AutofillOverlayPageElement extends HTMLElement {
if (event.code === "Tab") {
this.redirectOverlayFocusOutMessage(
- event.shiftKey ? RedirectFocusDirection.Previous : RedirectFocusDirection.Next
+ event.shiftKey ? RedirectFocusDirection.Previous : RedirectFocusDirection.Next,
);
return;
}
diff --git a/apps/browser/src/autofill/services/abstractions/autofill-overlay-content.service.ts b/apps/browser/src/autofill/services/abstractions/autofill-overlay-content.service.ts
index 1cfde6e6274..ac7d55a54d4 100644
--- a/apps/browser/src/autofill/services/abstractions/autofill-overlay-content.service.ts
+++ b/apps/browser/src/autofill/services/abstractions/autofill-overlay-content.service.ts
@@ -17,7 +17,7 @@ interface AutofillOverlayContentService {
init(): void;
setupAutofillOverlayListenerOnField(
autofillFieldElement: ElementWithOpId,
- autofillFieldData: AutofillField
+ autofillFieldData: AutofillField,
): Promise;
openAutofillOverlay(options: OpenAutofillOverlayOptions): void;
removeAutofillOverlay(): void;
diff --git a/apps/browser/src/autofill/services/abstractions/autofill.service.ts b/apps/browser/src/autofill/services/abstractions/autofill.service.ts
index 3e8472f2c1a..a0959db72cb 100644
--- a/apps/browser/src/autofill/services/abstractions/autofill.service.ts
+++ b/apps/browser/src/autofill/services/abstractions/autofill.service.ts
@@ -47,19 +47,19 @@ export abstract class AutofillService {
injectAutofillScripts: (
sender: chrome.runtime.MessageSender,
autofillV2?: boolean,
- autofillOverlay?: boolean
+ autofillOverlay?: boolean,
) => Promise;
getFormsWithPasswordFields: (pageDetails: AutofillPageDetails) => FormData[];
doAutoFill: (options: AutoFillOptions) => Promise;
doAutoFillOnTab: (
pageDetails: PageDetail[],
tab: chrome.tabs.Tab,
- fromCommand: boolean
+ fromCommand: boolean,
) => Promise;
doAutoFillActiveTab: (
pageDetails: PageDetail[],
fromCommand: boolean,
- cipherType?: CipherType
+ cipherType?: CipherType,
) => Promise;
isPasswordRepromptRequired: (cipher: CipherView, tab: chrome.tabs.Tab) => Promise;
}
diff --git a/apps/browser/src/autofill/services/abstractions/collect-autofill-content.service.ts b/apps/browser/src/autofill/services/abstractions/collect-autofill-content.service.ts
index e4a409eb599..78befa7bc61 100644
--- a/apps/browser/src/autofill/services/abstractions/collect-autofill-content.service.ts
+++ b/apps/browser/src/autofill/services/abstractions/collect-autofill-content.service.ts
@@ -20,7 +20,7 @@ interface CollectAutofillContentService {
queryAllTreeWalkerNodes(
rootNode: Node,
filterCallback: CallableFunction,
- isObservingShadowRoot?: boolean
+ isObservingShadowRoot?: boolean,
): Node[];
}
diff --git a/apps/browser/src/autofill/services/autofill-overlay-content.service.spec.ts b/apps/browser/src/autofill/services/autofill-overlay-content.service.spec.ts
index 12b9f19e030..7753a4b2672 100644
--- a/apps/browser/src/autofill/services/autofill-overlay-content.service.spec.ts
+++ b/apps/browser/src/autofill/services/autofill-overlay-content.service.spec.ts
@@ -58,11 +58,11 @@ describe("AutofillOverlayContentService", () => {
jest.spyOn(window, "addEventListener");
setupGlobalEventListenersSpy = jest.spyOn(
autofillOverlayContentService as any,
- "setupGlobalEventListeners"
+ "setupGlobalEventListeners",
);
setupMutationObserverSpy = jest.spyOn(
autofillOverlayContentService as any,
- "setupMutationObserver"
+ "setupMutationObserver",
);
});
@@ -76,7 +76,7 @@ describe("AutofillOverlayContentService", () => {
expect(document.addEventListener).toHaveBeenCalledWith(
"DOMContentLoaded",
- setupGlobalEventListenersSpy
+ setupGlobalEventListenersSpy,
);
expect(setupGlobalEventListenersSpy).not.toHaveBeenCalled();
});
@@ -84,21 +84,21 @@ describe("AutofillOverlayContentService", () => {
it("sets up a visibility change listener for the DOM", () => {
const handleVisibilityChangeEventSpy = jest.spyOn(
autofillOverlayContentService as any,
- "handleVisibilityChangeEvent"
+ "handleVisibilityChangeEvent",
);
autofillOverlayContentService.init();
expect(document.addEventListener).toHaveBeenCalledWith(
"visibilitychange",
- handleVisibilityChangeEventSpy
+ handleVisibilityChangeEventSpy,
);
});
it("sets up a focus out listener for the window", () => {
const handleFormFieldBlurEventSpy = jest.spyOn(
autofillOverlayContentService as any,
- "handleFormFieldBlurEvent"
+ "handleFormFieldBlurEvent",
);
autofillOverlayContentService.init();
@@ -112,15 +112,15 @@ describe("AutofillOverlayContentService", () => {
.mockImplementation(() => mock({ observe: jest.fn() }));
const handleOverlayElementMutationObserverUpdateSpy = jest.spyOn(
autofillOverlayContentService as any,
- "handleOverlayElementMutationObserverUpdate"
+ "handleOverlayElementMutationObserverUpdate",
);
const handleBodyElementMutationObserverUpdateSpy = jest.spyOn(
autofillOverlayContentService as any,
- "handleBodyElementMutationObserverUpdate"
+ "handleBodyElementMutationObserverUpdate",
);
const handleDocumentElementMutationObserverUpdateSpy = jest.spyOn(
autofillOverlayContentService as any,
- "handleDocumentElementMutationObserverUpdate"
+ "handleDocumentElementMutationObserverUpdate",
);
autofillOverlayContentService.init();
@@ -128,15 +128,15 @@ describe("AutofillOverlayContentService", () => {
expect(setupMutationObserverSpy).toHaveBeenCalledTimes(1);
expect(globalThis.MutationObserver).toHaveBeenNthCalledWith(
1,
- handleOverlayElementMutationObserverUpdateSpy
+ handleOverlayElementMutationObserverUpdateSpy,
);
expect(globalThis.MutationObserver).toHaveBeenNthCalledWith(
2,
- handleBodyElementMutationObserverUpdateSpy
+ handleBodyElementMutationObserverUpdateSpy,
);
expect(globalThis.MutationObserver).toHaveBeenNthCalledWith(
3,
- handleDocumentElementMutationObserverUpdateSpy
+ handleDocumentElementMutationObserverUpdateSpy,
);
});
});
@@ -154,7 +154,7 @@ describe("AutofillOverlayContentService", () => {
`;
autofillFieldElement = document.getElementById(
- "username-field"
+ "username-field",
) as ElementWithOpId;
autofillFieldElement.opid = "op-1";
jest.spyOn(autofillFieldElement, "addEventListener");
@@ -176,7 +176,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillFieldElement.addEventListener).not.toHaveBeenCalled();
@@ -187,7 +187,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillFieldElement.addEventListener).not.toHaveBeenCalled();
@@ -198,7 +198,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillFieldElement.addEventListener).not.toHaveBeenCalled();
@@ -210,7 +210,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillFieldElement.addEventListener).not.toHaveBeenCalled();
@@ -222,7 +222,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillFieldElement.addEventListener).not.toHaveBeenCalled();
@@ -233,7 +233,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillFieldElement.addEventListener).not.toHaveBeenCalled();
@@ -244,7 +244,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillFieldElement.addEventListener).not.toHaveBeenCalled();
@@ -258,12 +258,12 @@ describe("AutofillOverlayContentService", () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(sendExtensionMessageSpy).toHaveBeenCalledWith("getAutofillOverlayVisibility");
expect(autofillOverlayContentService["autofillOverlayVisibility"]).toEqual(
- AutofillOverlayVisibility.OnFieldFocus
+ AutofillOverlayVisibility.OnFieldFocus,
);
});
@@ -273,11 +273,11 @@ describe("AutofillOverlayContentService", () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillOverlayContentService["autofillOverlayVisibility"]).toEqual(
- AutofillOverlayVisibility.OnFieldFocus
+ AutofillOverlayVisibility.OnFieldFocus,
);
});
});
@@ -296,23 +296,23 @@ describe("AutofillOverlayContentService", () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillFieldElement.removeEventListener).toHaveBeenNthCalledWith(
1,
"input",
- inputHandler
+ inputHandler,
);
expect(autofillFieldElement.removeEventListener).toHaveBeenNthCalledWith(
2,
"click",
- clickHandler
+ clickHandler,
);
expect(autofillFieldElement.removeEventListener).toHaveBeenNthCalledWith(
3,
"focus",
- focusHandler
+ focusHandler,
);
});
@@ -320,7 +320,7 @@ describe("AutofillOverlayContentService", () => {
beforeEach(async () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
});
@@ -343,7 +343,7 @@ describe("AutofillOverlayContentService", () => {
beforeEach(async () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
jest.spyOn(globalThis.customElements, "define").mockImplementation();
});
@@ -359,7 +359,7 @@ describe("AutofillOverlayContentService", () => {
it("repositions the overlay if autofill is not currently filling when the `Enter` key is pressed", () => {
const handleOverlayRepositionEventSpy = jest.spyOn(
autofillOverlayContentService as any,
- "handleOverlayRepositionEvent"
+ "handleOverlayRepositionEvent",
);
autofillOverlayContentService["isCurrentlyFilling"] = false;
@@ -371,7 +371,7 @@ describe("AutofillOverlayContentService", () => {
it("skips repositioning the overlay if autofill is currently filling when the `Enter` key is pressed", () => {
const handleOverlayRepositionEventSpy = jest.spyOn(
autofillOverlayContentService as any,
- "handleOverlayRepositionEvent"
+ "handleOverlayRepositionEvent",
);
autofillOverlayContentService["isCurrentlyFilling"] = true;
@@ -384,11 +384,11 @@ describe("AutofillOverlayContentService", () => {
jest.useFakeTimers();
const updateMostRecentlyFocusedFieldSpy = jest.spyOn(
autofillOverlayContentService as any,
- "updateMostRecentlyFocusedField"
+ "updateMostRecentlyFocusedField",
);
const openAutofillOverlaySpy = jest.spyOn(
autofillOverlayContentService as any,
- "openAutofillOverlay"
+ "openAutofillOverlay",
);
autofillOverlayContentService["isOverlayListVisible"] = false;
@@ -420,13 +420,13 @@ describe("AutofillOverlayContentService", () => {
it("ignores span elements that trigger the listener", async () => {
const spanAutofillFieldElement = document.createElement(
- "span"
+ "span",
) as ElementWithOpId;
jest.spyOn(autofillOverlayContentService as any, "storeModifiedFormElement");
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
spanAutofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
spanAutofillFieldElement.dispatchEvent(new Event("input"));
@@ -437,28 +437,28 @@ describe("AutofillOverlayContentService", () => {
it("stores the field as a user filled field if the form field data indicates that it is for a username", async () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("input"));
expect(autofillOverlayContentService["userFilledFields"].username).toEqual(
- autofillFieldElement
+ autofillFieldElement,
);
});
it("stores the field as a user filled field if the form field is of type password", async () => {
const passwordFieldElement = document.getElementById(
- "password-field"
+ "password-field",
) as ElementWithOpId;
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
passwordFieldElement,
- autofillFieldData
+ autofillFieldData,
);
passwordFieldElement.dispatchEvent(new Event("input"));
expect(autofillOverlayContentService["userFilledFields"].password).toEqual(
- passwordFieldElement
+ passwordFieldElement,
);
});
@@ -466,13 +466,13 @@ describe("AutofillOverlayContentService", () => {
jest.spyOn(autofillOverlayContentService as any, "isUserAuthed").mockReturnValue(false);
const removeAutofillOverlayListSpy = jest.spyOn(
autofillOverlayContentService as any,
- "removeAutofillOverlayList"
+ "removeAutofillOverlayList",
);
(autofillFieldElement as HTMLInputElement).value = "test";
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("input"));
@@ -484,13 +484,13 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService["isOverlayCiphersPopulated"] = true;
const removeAutofillOverlayListSpy = jest.spyOn(
autofillOverlayContentService as any,
- "removeAutofillOverlayList"
+ "removeAutofillOverlayList",
);
(autofillFieldElement as HTMLInputElement).value = "test";
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("input"));
@@ -503,7 +503,7 @@ describe("AutofillOverlayContentService", () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("input"));
@@ -517,7 +517,7 @@ describe("AutofillOverlayContentService", () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("input"));
@@ -532,7 +532,7 @@ describe("AutofillOverlayContentService", () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("input"));
@@ -549,7 +549,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService["isOverlayListVisible"] = false;
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
});
@@ -565,7 +565,7 @@ describe("AutofillOverlayContentService", () => {
autofillFieldElement.dispatchEvent(new Event("click"));
expect(
- autofillOverlayContentService["triggerFormFieldFocusedAction"]
+ autofillOverlayContentService["triggerFormFieldFocusedAction"],
).not.toHaveBeenCalled();
});
@@ -575,7 +575,7 @@ describe("AutofillOverlayContentService", () => {
autofillFieldElement.dispatchEvent(new Event("click"));
expect(
- autofillOverlayContentService["triggerFormFieldFocusedAction"]
+ autofillOverlayContentService["triggerFormFieldFocusedAction"],
).not.toHaveBeenCalled();
});
});
@@ -587,7 +587,7 @@ describe("AutofillOverlayContentService", () => {
jest.spyOn(globalThis.customElements, "define").mockImplementation();
updateMostRecentlyFocusedFieldSpy = jest.spyOn(
autofillOverlayContentService as any,
- "updateMostRecentlyFocusedField"
+ "updateMostRecentlyFocusedField",
);
autofillOverlayContentService["isCurrentlyFilling"] = false;
});
@@ -599,7 +599,7 @@ describe("AutofillOverlayContentService", () => {
AutofillOverlayVisibility.OnFieldFocus;
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("focus"));
@@ -610,14 +610,14 @@ describe("AutofillOverlayContentService", () => {
it("updates the most recently focused field", async () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("focus"));
expect(updateMostRecentlyFocusedFieldSpy).toHaveBeenCalledWith(autofillFieldElement);
expect(autofillOverlayContentService["mostRecentlyFocusedField"]).toEqual(
- autofillFieldElement
+ autofillFieldElement,
);
});
@@ -627,7 +627,7 @@ describe("AutofillOverlayContentService", () => {
AutofillOverlayVisibility.OnButtonClick;
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("focus"));
@@ -641,12 +641,12 @@ describe("AutofillOverlayContentService", () => {
it("removes the overlay list if the form element has a value and the focused field is newly focused", async () => {
autofillOverlayContentService["overlayListElement"] = document.createElement("div");
autofillOverlayContentService["mostRecentlyFocusedField"] = document.createElement(
- "input"
+ "input",
) as ElementWithOpId;
(autofillFieldElement as HTMLInputElement).value = "test";
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("focus"));
@@ -664,7 +664,7 @@ describe("AutofillOverlayContentService", () => {
AutofillOverlayVisibility.OnFieldFocus;
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("focus"));
@@ -681,7 +681,7 @@ describe("AutofillOverlayContentService", () => {
jest.spyOn(autofillOverlayContentService as any, "isUserAuthed").mockReturnValue(true);
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("focus"));
@@ -697,7 +697,7 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService["isOverlayCiphersPopulated"] = true;
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
autofillFieldElement.dispatchEvent(new Event("focus"));
@@ -719,12 +719,12 @@ describe("AutofillOverlayContentService", () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(sendExtensionMessageSpy).toHaveBeenCalledWith("openAutofillOverlay");
expect(autofillOverlayContentService["mostRecentlyFocusedField"]).toEqual(
- autofillFieldElement
+ autofillFieldElement,
);
});
@@ -733,11 +733,11 @@ describe("AutofillOverlayContentService", () => {
await autofillOverlayContentService.setupAutofillOverlayListenerOnField(
autofillFieldElement,
- autofillFieldData
+ autofillFieldData,
);
expect(autofillOverlayContentService["mostRecentlyFocusedField"]).toEqual(
- autofillFieldElement
+ autofillFieldElement,
);
});
});
@@ -754,7 +754,7 @@ describe("AutofillOverlayContentService", () => {
`;
autofillFieldElement = document.getElementById(
- "username-field"
+ "username-field",
) as ElementWithOpId;
autofillFieldElement.opid = "op-1";
autofillOverlayContentService["mostRecentlyFocusedField"] = autofillFieldElement;
@@ -776,7 +776,7 @@ describe("AutofillOverlayContentService", () => {
});
const focusMostRecentOverlayFieldSpy = jest.spyOn(
autofillOverlayContentService as any,
- "focusMostRecentOverlayField"
+ "focusMostRecentOverlayField",
);
autofillOverlayContentService["openAutofillOverlay"]({ isFocusingFieldElement: true });
@@ -792,7 +792,7 @@ describe("AutofillOverlayContentService", () => {
});
const focusMostRecentOverlayFieldSpy = jest.spyOn(
autofillOverlayContentService as any,
- "focusMostRecentOverlayField"
+ "focusMostRecentOverlayField",
);
autofillOverlayContentService["openAutofillOverlay"]({ isFocusingFieldElement: true });
@@ -866,7 +866,7 @@ describe("AutofillOverlayContentService", () => {
describe("focusMostRecentOverlayField", () => {
it("focuses the most recently focused overlay field", () => {
const mostRecentlyFocusedField = document.createElement(
- "input"
+ "input",
) as ElementWithOpId;
autofillOverlayContentService["mostRecentlyFocusedField"] = mostRecentlyFocusedField;
jest.spyOn(mostRecentlyFocusedField, "focus");
@@ -880,7 +880,7 @@ describe("AutofillOverlayContentService", () => {
describe("blurMostRecentOverlayField", () => {
it("removes focus from the most recently focused overlay field", () => {
const mostRecentlyFocusedField = document.createElement(
- "input"
+ "input",
) as ElementWithOpId;
autofillOverlayContentService["mostRecentlyFocusedField"] = mostRecentlyFocusedField;
jest.spyOn(mostRecentlyFocusedField, "blur");
@@ -906,7 +906,7 @@ describe("AutofillOverlayContentService", () => {
beforeEach(() => {
document.body.innerHTML = ``;
autofillOverlayContentService["overlayButtonElement"] = document.querySelector(
- ".overlay-button"
+ ".overlay-button",
) as HTMLElement;
});
@@ -933,7 +933,7 @@ describe("AutofillOverlayContentService", () => {
jest.spyOn(globalThis, "removeEventListener");
const handleOverlayRepositionEventSpy = jest.spyOn(
autofillOverlayContentService as any,
- "handleOverlayRepositionEvent"
+ "handleOverlayRepositionEvent",
);
autofillOverlayContentService.removeAutofillOverlay();
@@ -943,11 +943,11 @@ describe("AutofillOverlayContentService", () => {
handleOverlayRepositionEventSpy,
{
capture: true,
- }
+ },
);
expect(globalThis.removeEventListener).toHaveBeenCalledWith(
EVENTS.RESIZE,
- handleOverlayRepositionEventSpy
+ handleOverlayRepositionEventSpy,
);
});
});
@@ -956,7 +956,7 @@ describe("AutofillOverlayContentService", () => {
beforeEach(() => {
document.body.innerHTML = ``;
autofillOverlayContentService["overlayListElement"] = document.querySelector(
- ".overlay-list"
+ ".overlay-list",
) as HTMLElement;
});
@@ -1011,10 +1011,10 @@ describe("AutofillOverlayContentService", () => {
`;
const usernameField = document.getElementById(
- "username-field"
+ "username-field",
) as ElementWithOpId;
const passwordField = document.getElementById(
- "password-field"
+ "password-field",
) as ElementWithOpId;
usernameField.value = "test-username";
passwordField.value = "test-password";
@@ -1054,11 +1054,11 @@ describe("AutofillOverlayContentService", () => {
`;
autofillFieldElement = document.getElementById(
- "username-field"
+ "username-field",
) as ElementWithOpId;
autofillFieldElement.opid = "op-1";
previousFocusableElement = document.querySelector(
- ".previous-focusable-element"
+ ".previous-focusable-element",
) as HTMLElement;
nextFocusableElement = document.querySelector(".next-focusable-element") as HTMLElement;
autofillFieldFocusSpy = jest.spyOn(autofillFieldElement, "focus");
@@ -1099,7 +1099,7 @@ describe("AutofillOverlayContentService", () => {
jest.useFakeTimers();
const removeAutofillOverlaySpy = jest.spyOn(
autofillOverlayContentService as any,
- "removeAutofillOverlay"
+ "removeAutofillOverlay",
);
autofillOverlayContentService.redirectOverlayFocusOut(RedirectFocusDirection.Current);
@@ -1149,7 +1149,7 @@ describe("AutofillOverlayContentService", () => {
`;
const usernameField = document.getElementById(
- "username-field"
+ "username-field",
) as ElementWithOpId;
autofillOverlayContentService["mostRecentlyFocusedField"] = usernameField;
autofillOverlayContentService["setOverlayRepositionEventListeners"]();
@@ -1196,7 +1196,7 @@ describe("AutofillOverlayContentService", () => {
.mockReturnValue(false);
const removeAutofillOverlaySpy = jest.spyOn(
autofillOverlayContentService as any,
- "removeAutofillOverlay"
+ "removeAutofillOverlay",
);
autofillOverlayContentService["mostRecentlyFocusedField"] = undefined;
@@ -1225,7 +1225,7 @@ describe("AutofillOverlayContentService", () => {
});
const clearUserInteractionEventTimeoutSpy = jest.spyOn(
autofillOverlayContentService as any,
- "clearUserInteractionEventTimeout"
+ "clearUserInteractionEventTimeout",
);
globalThis.dispatchEvent(new Event(EVENTS.SCROLL));
@@ -1255,7 +1255,7 @@ describe("AutofillOverlayContentService", () => {
});
const removeAutofillOverlaySpy = jest.spyOn(
autofillOverlayContentService as any,
- "removeAutofillOverlay"
+ "removeAutofillOverlay",
);
globalThis.dispatchEvent(new Event(EVENTS.SCROLL));
@@ -1277,7 +1277,7 @@ describe("AutofillOverlayContentService", () => {
`;
usernameField = document.getElementById(
- "username-field"
+ "username-field",
) as ElementWithOpId;
usernameField.style.setProperty("display", "block", "important");
jest.spyOn(usernameField, "removeAttribute");
@@ -1285,7 +1285,7 @@ describe("AutofillOverlayContentService", () => {
jest
.spyOn(
autofillOverlayContentService as any,
- "isTriggeringExcessiveMutationObserverIterations"
+ "isTriggeringExcessiveMutationObserverIterations",
)
.mockReturnValue(false);
});
@@ -1294,7 +1294,7 @@ describe("AutofillOverlayContentService", () => {
jest
.spyOn(
autofillOverlayContentService as any,
- "isTriggeringExcessiveMutationObserverIterations"
+ "isTriggeringExcessiveMutationObserverIterations",
)
.mockReturnValue(true);
@@ -1344,7 +1344,7 @@ describe("AutofillOverlayContentService", () => {
expect(usernameField.style.setProperty).toHaveBeenCalledWith(
"position",
"fixed",
- "important"
+ "important",
);
expect(usernameField.style.setProperty).toHaveBeenCalledWith("display", "block", "important");
});
@@ -1368,7 +1368,7 @@ describe("AutofillOverlayContentService", () => {
jest
.spyOn(
autofillOverlayContentService as any,
- "isTriggeringExcessiveMutationObserverIterations"
+ "isTriggeringExcessiveMutationObserverIterations",
)
.mockReturnValue(false);
});
@@ -1386,7 +1386,7 @@ describe("AutofillOverlayContentService", () => {
jest
.spyOn(
autofillOverlayContentService as any,
- "isTriggeringExcessiveMutationObserverIterations"
+ "isTriggeringExcessiveMutationObserverIterations",
)
.mockReturnValue(true);
@@ -1418,7 +1418,7 @@ describe("AutofillOverlayContentService", () => {
expect(globalThis.document.body.insertBefore).toHaveBeenCalledWith(
overlayButtonElement,
- overlayListElement
+ overlayListElement,
);
});
@@ -1429,7 +1429,7 @@ describe("AutofillOverlayContentService", () => {
expect(globalThis.document.body.insertBefore).toHaveBeenCalledWith(
overlayButtonElement,
- overlayListElement
+ overlayListElement,
);
});
@@ -1441,7 +1441,7 @@ describe("AutofillOverlayContentService", () => {
expect(globalThis.document.body.insertBefore).toHaveBeenCalledWith(
injectedElement,
- overlayButtonElement
+ overlayButtonElement,
);
});
});
@@ -1465,7 +1465,7 @@ describe("AutofillOverlayContentService", () => {
jest
.spyOn(
autofillOverlayContentService as any,
- "isTriggeringExcessiveMutationObserverIterations"
+ "isTriggeringExcessiveMutationObserverIterations",
)
.mockReturnValue(false);
});
@@ -1485,7 +1485,7 @@ describe("AutofillOverlayContentService", () => {
jest
.spyOn(
autofillOverlayContentService as any,
- "isTriggeringExcessiveMutationObserverIterations"
+ "isTriggeringExcessiveMutationObserverIterations",
)
.mockReturnValue(true);
@@ -1551,7 +1551,7 @@ describe("AutofillOverlayContentService", () => {
const clearTimeoutSpy = jest.spyOn(globalThis, "clearTimeout");
autofillOverlayContentService["mutationObserverIterationsResetTimeout"] = setTimeout(
jest.fn(),
- 123
+ 123,
);
autofillOverlayContentService["isTriggeringExcessiveMutationObserverIterations"]();
@@ -1573,11 +1573,11 @@ describe("AutofillOverlayContentService", () => {
autofillOverlayContentService["mutationObserverIterations"] = 101;
const blurMostRecentOverlayFieldSpy = jest.spyOn(
autofillOverlayContentService as any,
- "blurMostRecentOverlayField"
+ "blurMostRecentOverlayField",
);
const removeAutofillOverlaySpy = jest.spyOn(
autofillOverlayContentService as any,
- "removeAutofillOverlay"
+ "removeAutofillOverlay",
);
autofillOverlayContentService["isTriggeringExcessiveMutationObserverIterations"]();
diff --git a/apps/browser/src/autofill/services/autofill-overlay-content.service.ts b/apps/browser/src/autofill/services/autofill-overlay-content.service.ts
index fc1136a368b..9e5acae887c 100644
--- a/apps/browser/src/autofill/services/autofill-overlay-content.service.ts
+++ b/apps/browser/src/autofill/services/autofill-overlay-content.service.ts
@@ -80,7 +80,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
*/
async setupAutofillOverlayListenerOnField(
formFieldElement: ElementWithOpId,
- autofillFieldData: AutofillField
+ autofillFieldData: AutofillField,
) {
if (this.isIgnoredField(autofillFieldData)) {
return;
@@ -241,7 +241,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
}
const focusedElementIndex = this.focusableElements.findIndex(
- (element) => element === this.mostRecentlyFocusedField
+ (element) => element === this.mostRecentlyFocusedField,
);
const indexOffset = direction === RedirectFocusDirection.Previous ? -1 : 1;
@@ -263,15 +263,15 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
formFieldElement.addEventListener(EVENTS.KEYUP, this.handleFormFieldKeyupEvent);
formFieldElement.addEventListener(
EVENTS.INPUT,
- this.handleFormFieldInputEvent(formFieldElement)
+ this.handleFormFieldInputEvent(formFieldElement),
);
formFieldElement.addEventListener(
EVENTS.CLICK,
- this.handleFormFieldClickEvent(formFieldElement)
+ this.handleFormFieldClickEvent(formFieldElement),
);
formFieldElement.addEventListener(
EVENTS.FOCUS,
- this.handleFormFieldFocusEvent(formFieldElement)
+ this.handleFormFieldFocusEvent(formFieldElement),
);
}
@@ -314,7 +314,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
*/
private getFormFieldHandlerMemoIndex(
formFieldElement: ElementWithOpId,
- event: string
+ event: string,
) {
return `${formFieldElement.opid}-${formFieldElement.id}-${event}-handler`;
}
@@ -381,7 +381,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
private handleFormFieldInputEvent = (formFieldElement: ElementWithOpId) => {
return this.useEventHandlersMemo(
() => this.triggerFormFieldInput(formFieldElement),
- this.getFormFieldHandlerMemoIndex(formFieldElement, EVENTS.INPUT)
+ this.getFormFieldHandlerMemoIndex(formFieldElement, EVENTS.INPUT),
);
};
@@ -436,7 +436,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
private handleFormFieldClickEvent = (formFieldElement: ElementWithOpId) => {
return this.useEventHandlersMemo(
() => this.triggerFormFieldClickedAction(formFieldElement),
- this.getFormFieldHandlerMemoIndex(formFieldElement, EVENTS.CLICK)
+ this.getFormFieldHandlerMemoIndex(formFieldElement, EVENTS.CLICK),
);
};
@@ -462,7 +462,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
private handleFormFieldFocusEvent = (formFieldElement: ElementWithOpId) => {
return this.useEventHandlersMemo(
() => this.triggerFormFieldFocusedAction(formFieldElement),
- this.getFormFieldHandlerMemoIndex(formFieldElement, EVENTS.FOCUS)
+ this.getFormFieldHandlerMemoIndex(formFieldElement, EVENTS.FOCUS),
);
};
@@ -637,13 +637,12 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
* @param formFieldElement - The form field element that triggered the focus event.
*/
private async updateMostRecentlyFocusedField(
- formFieldElement: ElementWithOpId
+ formFieldElement: ElementWithOpId,
) {
this.mostRecentlyFocusedField = formFieldElement;
const { paddingRight, paddingLeft } = globalThis.getComputedStyle(formFieldElement);
- const { width, height, top, left } = await this.getMostRecentlyFocusedFieldRects(
- formFieldElement
- );
+ const { width, height, top, left } =
+ await this.getMostRecentlyFocusedFieldRects(formFieldElement);
this.focusedFieldData = {
focusedFieldStyles: { paddingRight, paddingLeft },
focusedFieldRects: { width, height, top, left },
@@ -664,11 +663,10 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
* @param formFieldElement - The form field element that triggered the focus event.
*/
private async getMostRecentlyFocusedFieldRects(
- formFieldElement: ElementWithOpId
+ formFieldElement: ElementWithOpId,
) {
- const focusedFieldRects = await this.getBoundingClientRectFromIntersectionObserver(
- formFieldElement
- );
+ const focusedFieldRects =
+ await this.getBoundingClientRectFromIntersectionObserver(formFieldElement);
if (focusedFieldRects) {
return focusedFieldRects;
}
@@ -682,7 +680,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
* @param formFieldElement - The form field element that triggered the focus event.
*/
private async getBoundingClientRectFromIntersectionObserver(
- formFieldElement: ElementWithOpId
+ formFieldElement: ElementWithOpId,
): Promise {
if (!("IntersectionObserver" in window) && !("IntersectionObserverEntry" in window)) {
return null;
@@ -703,7 +701,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
root: globalThis.document.body,
rootMargin: "0px",
threshold: 0.9999, // Safari doesn't seem to function properly with a threshold of 1
- }
+ },
);
intersectionObserver.observe(formFieldElement);
});
@@ -896,15 +894,15 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
*/
private setupMutationObserver = () => {
this.overlayElementsMutationObserver = new MutationObserver(
- this.handleOverlayElementMutationObserverUpdate
+ this.handleOverlayElementMutationObserverUpdate,
);
this.bodyElementMutationObserver = new MutationObserver(
- this.handleBodyElementMutationObserverUpdate
+ this.handleBodyElementMutationObserverUpdate,
);
const documentElementMutationObserver = new MutationObserver(
- this.handleDocumentElementMutationObserverUpdate
+ this.handleDocumentElementMutationObserverUpdate,
);
documentElementMutationObserver.observe(globalThis.document.documentElement, {
childList: true,
@@ -1095,7 +1093,7 @@ class AutofillOverlayContentService implements AutofillOverlayContentServiceInte
this.mutationObserverIterations++;
this.mutationObserverIterationsResetTimeout = setTimeout(
() => (this.mutationObserverIterations = 0),
- 2000
+ 2000,
);
if (this.mutationObserverIterations > 100) {
diff --git a/apps/browser/src/autofill/services/autofill.service.spec.ts b/apps/browser/src/autofill/services/autofill.service.spec.ts
index c4bea144d2b..aa9232c791f 100644
--- a/apps/browser/src/autofill/services/autofill.service.spec.ts
+++ b/apps/browser/src/autofill/services/autofill.service.spec.ts
@@ -63,7 +63,7 @@ describe("AutofillService", () => {
eventCollectionService,
logService,
settingsService,
- userVerificationService
+ userVerificationService,
);
});
@@ -178,7 +178,7 @@ describe("AutofillService", () => {
true,
true,
false,
- true
+ true,
);
expect(formData).toStrictEqual([]);
});
@@ -280,7 +280,7 @@ describe("AutofillService", () => {
passwordInputField,
true,
true,
- false
+ false,
);
expect(formData).toStrictEqual([
{
@@ -415,7 +415,7 @@ describe("AutofillService", () => {
cipher: autofillOptions.cipher,
tabUrl: autofillOptions.tab.url,
defaultUriMatch: 0,
- }
+ },
);
expect(autofillService["generateLoginFillScript"]).toHaveBeenCalled();
expect(logService.info).not.toHaveBeenCalled();
@@ -448,11 +448,11 @@ describe("AutofillService", () => {
{
frameId: currentAutofillPageDetails.frameId,
},
- expect.any(Function)
+ expect.any(Function),
);
expect(eventCollectionService.collect).toHaveBeenCalledWith(
EventType.Cipher_ClientAutofilled,
- autofillOptions.cipher.id
+ autofillOptions.cipher.id,
);
expect(autofillResult).toBeNull();
});
@@ -479,7 +479,7 @@ describe("AutofillService", () => {
expect(chrome.tabs.sendMessage).toHaveBeenCalled();
expect(eventCollectionService.collect).toHaveBeenCalledWith(
EventType.Cipher_ClientAutofilled,
- autofillOptions.cipher.id
+ autofillOptions.cipher.id,
);
});
@@ -507,7 +507,7 @@ describe("AutofillService", () => {
expect(chrome.tabs.sendMessage).toHaveBeenCalled();
expect(eventCollectionService.collect).toHaveBeenCalledWith(
EventType.Cipher_ClientAutofilled,
- autofillOptions.cipher.id
+ autofillOptions.cipher.id,
);
});
@@ -521,7 +521,7 @@ describe("AutofillService", () => {
triggerTestFailure();
} catch (error) {
expect(logService.info).toHaveBeenCalledWith(
- "Auto-fill on page load was blocked due to an untrusted iframe."
+ "Auto-fill on page load was blocked due to an untrusted iframe.",
);
expect(error.message).toBe(didNotAutofillError);
}
@@ -535,7 +535,7 @@ describe("AutofillService", () => {
await autofillService.doAutoFill(autofillOptions);
expect(logService.info).not.toHaveBeenCalledWith(
- "Auto-fill on page load was blocked due to an untrusted iframe."
+ "Auto-fill on page load was blocked due to an untrusted iframe.",
);
});
@@ -891,7 +891,7 @@ describe("AutofillService", () => {
const result = await autofillService.doAutoFillActiveTab(
pageDetails,
fromCommand,
- CipherType.Login
+ CipherType.Login,
);
expect(autofillService["getActiveTab"]).toHaveBeenCalled();
@@ -981,7 +981,7 @@ describe("AutofillService", () => {
await autofillService.doAutoFillActiveTab(
identityFormPageDetails,
false,
- CipherType.Identity
+ CipherType.Identity,
);
expect(autofillService["cipherService"].getAllDecryptedForUrl).toHaveBeenCalled();
@@ -1066,7 +1066,7 @@ describe("AutofillService", () => {
it("returns null if the page details are not provided", async () => {
const value = await autofillService["generateFillScript"](
undefined,
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(value).toBeNull();
@@ -1077,7 +1077,7 @@ describe("AutofillService", () => {
const value = await autofillService["generateFillScript"](
pageDetail,
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(value).toBeNull();
@@ -1101,7 +1101,7 @@ describe("AutofillService", () => {
expect(AutofillService.fillByOpid).not.toHaveBeenCalledWith(
expect.anything(),
duplicateUsernameField,
- duplicateUsernameField.value
+ duplicateUsernameField.value,
);
});
@@ -1114,7 +1114,7 @@ describe("AutofillService", () => {
expect(AutofillService.fillByOpid).not.toHaveBeenCalledWith(
expect.anything(),
defaultUsernameField,
- defaultUsernameField.value
+ defaultUsernameField.value,
);
});
@@ -1129,7 +1129,7 @@ describe("AutofillService", () => {
1,
expect.anything(),
defaultUsernameField,
- defaultUsernameField.value
+ defaultUsernameField.value,
);
});
@@ -1142,7 +1142,7 @@ describe("AutofillService", () => {
expect(AutofillService.fillByOpid).not.toHaveBeenCalledWith(
expect.anything(),
defaultUsernameField,
- defaultUsernameField.value
+ defaultUsernameField.value,
);
});
@@ -1159,13 +1159,13 @@ describe("AutofillService", () => {
1,
expect.anything(),
defaultUsernameField,
- defaultUsernameField.value
+ defaultUsernameField.value,
);
expect(AutofillService.fillByOpid).toHaveBeenNthCalledWith(
2,
expect.anything(),
defaultPasswordField,
- defaultPasswordField.value
+ defaultPasswordField.value,
);
});
@@ -1183,19 +1183,19 @@ describe("AutofillService", () => {
expect(generateFillScriptOptions.cipher.linkedFieldValue).toHaveBeenCalledTimes(1);
expect(generateFillScriptOptions.cipher.linkedFieldValue).toHaveBeenCalledWith(
- fieldLinkedId
+ fieldLinkedId,
);
expect(AutofillService.fillByOpid).toHaveBeenNthCalledWith(
1,
expect.anything(),
defaultUsernameField,
- linkedFieldValue
+ linkedFieldValue,
);
expect(AutofillService.fillByOpid).toHaveBeenNthCalledWith(
2,
expect.anything(),
defaultPasswordField,
- defaultPasswordField.value
+ defaultPasswordField.value,
);
});
@@ -1212,7 +1212,7 @@ describe("AutofillService", () => {
1,
expect.anything(),
defaultUsernameField,
- defaultUsernameFieldView.value
+ defaultUsernameFieldView.value,
);
});
@@ -1227,7 +1227,7 @@ describe("AutofillService", () => {
1,
expect.anything(),
defaultUsernameField,
- "false"
+ "false",
);
});
});
@@ -1235,7 +1235,7 @@ describe("AutofillService", () => {
it("returns a fill script generated for a login autofill", async () => {
const fillScriptMock = createAutofillScriptMock(
{},
- { "username-field": "username-value", "password-value": "password-value" }
+ { "username-field": "username-value", "password-value": "password-value" },
);
generateFillScriptOptions.cipher.type = CipherType.Login;
jest
@@ -1244,7 +1244,7 @@ describe("AutofillService", () => {
const value = await autofillService["generateFillScript"](
pageDetail,
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(autofillService["generateLoginFillScript"]).toHaveBeenCalledWith(
@@ -1266,7 +1266,7 @@ describe("AutofillService", () => {
"password-field": defaultPasswordField,
"username-field": defaultUsernameField,
},
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(value).toBe(fillScriptMock);
});
@@ -1274,7 +1274,7 @@ describe("AutofillService", () => {
it("returns a fill script generated for a card autofill", async () => {
const fillScriptMock = createAutofillScriptMock(
{},
- { "first-name-field": "first-name-value", "last-name-value": "last-name-value" }
+ { "first-name-field": "first-name-value", "last-name-value": "last-name-value" },
);
generateFillScriptOptions.cipher.type = CipherType.Card;
jest
@@ -1283,7 +1283,7 @@ describe("AutofillService", () => {
const value = await autofillService["generateFillScript"](
pageDetail,
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(autofillService["generateCardFillScript"]).toHaveBeenCalledWith(
@@ -1305,7 +1305,7 @@ describe("AutofillService", () => {
"password-field": defaultPasswordField,
"username-field": defaultUsernameField,
},
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(value).toBe(fillScriptMock);
});
@@ -1313,7 +1313,7 @@ describe("AutofillService", () => {
it("returns a fill script generated for an identity autofill", async () => {
const fillScriptMock = createAutofillScriptMock(
{},
- { "first-name-field": "first-name-value", "last-name-value": "last-name-value" }
+ { "first-name-field": "first-name-value", "last-name-value": "last-name-value" },
);
generateFillScriptOptions.cipher.type = CipherType.Identity;
jest
@@ -1322,7 +1322,7 @@ describe("AutofillService", () => {
const value = await autofillService["generateFillScript"](
pageDetail,
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(autofillService["generateIdentityFillScript"]).toHaveBeenCalledWith(
@@ -1344,7 +1344,7 @@ describe("AutofillService", () => {
"password-field": defaultPasswordField,
"username-field": defaultUsernameField,
},
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(value).toBe(fillScriptMock);
});
@@ -1354,7 +1354,7 @@ describe("AutofillService", () => {
const value = await autofillService["generateFillScript"](
pageDetail,
- generateFillScriptOptions
+ generateFillScriptOptions,
);
expect(value).toBeNull();
@@ -1412,7 +1412,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["inUntrustedIframe"]).not.toHaveBeenCalled();
@@ -1432,7 +1432,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.savedUrls).toStrictEqual([]);
@@ -1451,7 +1451,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.savedUrls).toStrictEqual([
@@ -1475,7 +1475,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.savedUrls).toStrictEqual([defaultLoginUriView.uri, secondUriView.uri]);
@@ -1542,7 +1542,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.loadPasswordFields).toHaveBeenCalledTimes(2);
@@ -1552,7 +1552,7 @@ describe("AutofillService", () => {
false,
false,
options.onlyEmptyFields,
- options.fillNewPassword
+ options.fillNewPassword,
);
expect(AutofillService.loadPasswordFields).toHaveBeenNthCalledWith(
2,
@@ -1560,7 +1560,7 @@ describe("AutofillService", () => {
true,
true,
options.onlyEmptyFields,
- options.fillNewPassword
+ options.fillNewPassword,
);
});
@@ -1579,7 +1579,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findUsernameField"]).toHaveBeenCalledTimes(2);
@@ -1589,7 +1589,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(autofillService["findUsernameField"]).toHaveBeenNthCalledWith(
2,
@@ -1597,7 +1597,7 @@ describe("AutofillService", () => {
passwordField,
true,
true,
- false
+ false,
);
});
@@ -1608,7 +1608,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findUsernameField"]).toHaveBeenCalledTimes(1);
@@ -1618,7 +1618,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(autofillService["findUsernameField"]).not.toHaveBeenNthCalledWith(
2,
@@ -1626,7 +1626,7 @@ describe("AutofillService", () => {
passwordField,
true,
true,
- false
+ false,
);
});
@@ -1636,7 +1636,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findTotpField"]).toHaveBeenCalledTimes(2);
@@ -1646,7 +1646,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(autofillService["findTotpField"]).toHaveBeenNthCalledWith(
2,
@@ -1654,7 +1654,7 @@ describe("AutofillService", () => {
passwordField,
true,
true,
- false
+ false,
);
});
@@ -1666,7 +1666,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findTotpField"]).toHaveBeenCalledTimes(1);
@@ -1676,7 +1676,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(autofillService["findTotpField"]).not.toHaveBeenNthCalledWith(
2,
@@ -1684,7 +1684,7 @@ describe("AutofillService", () => {
passwordField,
true,
true,
- false
+ false,
);
});
@@ -1695,7 +1695,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findTotpField"]).not.toHaveBeenCalled();
@@ -1714,7 +1714,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findUsernameField"]).toHaveBeenCalledTimes(1);
@@ -1723,7 +1723,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- true
+ true,
);
});
@@ -1735,7 +1735,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findUsernameField"]).toHaveBeenCalledTimes(2);
@@ -1745,7 +1745,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- true
+ true,
);
expect(autofillService["findUsernameField"]).toHaveBeenNthCalledWith(
2,
@@ -1753,7 +1753,7 @@ describe("AutofillService", () => {
passwordField,
true,
true,
- true
+ true,
);
});
@@ -1766,7 +1766,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findUsernameField"]).toHaveBeenCalledTimes(1);
@@ -1776,7 +1776,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- true
+ true,
);
expect(autofillService["findUsernameField"]).not.toHaveBeenNthCalledWith(
2,
@@ -1784,7 +1784,7 @@ describe("AutofillService", () => {
passwordField,
true,
true,
- true
+ true,
);
});
@@ -1795,7 +1795,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findTotpField"]).toHaveBeenCalledTimes(1);
@@ -1804,7 +1804,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- true
+ true,
);
});
@@ -1818,7 +1818,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["findTotpField"]).toHaveBeenCalledTimes(2);
@@ -1828,7 +1828,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- true
+ true,
);
expect(autofillService["findTotpField"]).toHaveBeenNthCalledWith(
2,
@@ -1836,7 +1836,7 @@ describe("AutofillService", () => {
passwordField,
true,
true,
- true
+ true,
);
});
});
@@ -1913,40 +1913,40 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.fieldIsFuzzyMatch).toHaveBeenCalledTimes(4);
expect(AutofillService.fieldIsFuzzyMatch).toHaveBeenNthCalledWith(
1,
usernameField,
- AutoFillConstants.UsernameFieldNames
+ AutoFillConstants.UsernameFieldNames,
);
expect(AutofillService.fieldIsFuzzyMatch).toHaveBeenNthCalledWith(
2,
emailField,
- AutoFillConstants.UsernameFieldNames
+ AutoFillConstants.UsernameFieldNames,
);
expect(AutofillService.fieldIsFuzzyMatch).toHaveBeenNthCalledWith(
3,
telephoneField,
- AutoFillConstants.UsernameFieldNames
+ AutoFillConstants.UsernameFieldNames,
);
expect(AutofillService.fieldIsFuzzyMatch).toHaveBeenNthCalledWith(
4,
totpField,
- AutoFillConstants.UsernameFieldNames
+ AutoFillConstants.UsernameFieldNames,
);
expect(AutofillService.fieldIsFuzzyMatch).not.toHaveBeenNthCalledWith(
5,
nonViewableField,
- AutoFillConstants.UsernameFieldNames
+ AutoFillConstants.UsernameFieldNames,
);
expect(AutofillService.fillByOpid).toHaveBeenCalledTimes(1);
expect(AutofillService.fillByOpid).toHaveBeenCalledWith(
fillScript,
usernameField,
- options.cipher.login.username
+ options.cipher.login.username,
);
});
@@ -1957,12 +1957,12 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.fieldIsFuzzyMatch).not.toHaveBeenCalledWith(
expect.anything(),
- AutoFillConstants.UsernameFieldNames
+ AutoFillConstants.UsernameFieldNames,
);
});
@@ -1973,12 +1973,12 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.fieldIsFuzzyMatch).toHaveBeenCalledWith(
expect.anything(),
- AutoFillConstants.TotpFieldNames
+ AutoFillConstants.TotpFieldNames,
);
});
@@ -1989,12 +1989,12 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.fieldIsFuzzyMatch).not.toHaveBeenCalledWith(
expect.anything(),
- AutoFillConstants.TotpFieldNames
+ AutoFillConstants.TotpFieldNames,
);
});
});
@@ -2006,7 +2006,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.untrustedIframe).toBe(true);
@@ -2024,7 +2024,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["inUntrustedIframe"]).toHaveBeenCalledWith(pageDetails.url, options);
@@ -2033,14 +2033,14 @@ describe("AutofillService", () => {
false,
false,
options.onlyEmptyFields,
- options.fillNewPassword
+ options.fillNewPassword,
);
expect(autofillService["findUsernameField"]).toHaveBeenCalledWith(
pageDetails,
passwordField,
false,
false,
- false
+ false,
);
expect(AutofillService.fieldIsFuzzyMatch).not.toHaveBeenCalled();
expect(AutofillService.fillByOpid).toHaveBeenCalledTimes(2);
@@ -2048,17 +2048,17 @@ describe("AutofillService", () => {
1,
fillScript,
usernameField,
- options.cipher.login.username
+ options.cipher.login.username,
);
expect(AutofillService.fillByOpid).toHaveBeenNthCalledWith(
2,
fillScript,
passwordField,
- options.cipher.login.password
+ options.cipher.login.password,
);
expect(AutofillService.setFillScriptForFocus).toHaveBeenCalledWith(
filledFields,
- fillScript
+ fillScript,
);
expect(value).toStrictEqual({
autosubmit: null,
@@ -2138,7 +2138,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value).toBeNull();
@@ -2171,7 +2171,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.forCustomFieldsOnly).toHaveBeenCalledWith(spanField);
@@ -2196,13 +2196,13 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.forCustomFieldsOnly).toHaveBeenCalledWith(invalidField);
expect(autofillService["isExcludedType"]).toHaveBeenCalledWith(
invalidField.type,
- AutoFillConstants.ExcludedAutofillTypes
+ AutoFillConstants.ExcludedAutofillTypes,
);
expect(value).toStrictEqual(unmodifiedFillScriptValues);
});
@@ -2225,7 +2225,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.forCustomFieldsOnly).toHaveBeenCalledWith(notViewableField);
@@ -2328,7 +2328,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.forCustomFieldsOnly).toHaveBeenCalledTimes(6);
@@ -2413,7 +2413,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", expMonthField.opid, testValue]);
@@ -2428,7 +2428,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", expMonthField.opid, testValue]);
@@ -2443,7 +2443,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", expMonthField.opid, testValue]);
@@ -2459,7 +2459,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", expMonthField.opid, "05"]);
@@ -2499,7 +2499,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", expYearField.opid, someTestValue]);
@@ -2510,7 +2510,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", expYearField.opid, someTestValue]);
@@ -2525,7 +2525,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", expYearField.opid, yearValue]);
@@ -2541,7 +2541,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual([
@@ -2562,7 +2562,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual([
@@ -2583,7 +2583,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", expYearField.opid, yearValue]);
@@ -2637,7 +2637,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", "expirationDate", dateFormat[1]]);
@@ -2649,7 +2649,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", "expirationDate", "2024-05"]);
@@ -2686,7 +2686,7 @@ describe("AutofillService", () => {
expect(generateFillScriptOptions.cipher.login.matchesUri).toHaveBeenCalledWith(
pageUrl,
equivalentDomains,
- generateFillScriptOptions.defaultUriMatch
+ generateFillScriptOptions.defaultUriMatch,
);
expect(result).toBe(false);
});
@@ -2705,7 +2705,7 @@ describe("AutofillService", () => {
expect(generateFillScriptOptions.cipher.login.matchesUri).toHaveBeenCalledWith(
pageUrl,
equivalentDomains,
- generateFillScriptOptions.defaultUriMatch
+ generateFillScriptOptions.defaultUriMatch,
);
expect(result).toBe(true);
});
@@ -2765,7 +2765,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(value).toBeNull();
@@ -2795,7 +2795,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.forCustomFieldsOnly).toHaveBeenCalledWith(customField);
@@ -2812,13 +2812,13 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.forCustomFieldsOnly).toHaveBeenCalledWith(excludedField);
expect(autofillService["isExcludedType"]).toHaveBeenCalledWith(
excludedField.type,
- AutoFillConstants.ExcludedAutofillTypes
+ AutoFillConstants.ExcludedAutofillTypes,
);
expect(AutofillService["isFieldMatch"]).not.toHaveBeenCalled();
expect(value.script).toStrictEqual([]);
@@ -2832,7 +2832,7 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService.forCustomFieldsOnly).toHaveBeenCalledWith(viewableField);
@@ -2852,19 +2852,19 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
fullNameField.htmlName,
IdentityAutoFillConstants.FullNameFieldNames,
- IdentityAutoFillConstants.FullNameFieldNameValues
+ IdentityAutoFillConstants.FullNameFieldNameValues,
);
expect(autofillService["makeScriptActionWithValue"]).toHaveBeenCalledWith(
fillScript,
`${firstName} ${middleName} ${lastName}`,
fullNameField,
- filledFields
+ filledFields,
);
expect(value.script[2]).toStrictEqual([
"fill_by_opid",
@@ -2884,19 +2884,19 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
fullNameField.htmlName,
IdentityAutoFillConstants.FullNameFieldNames,
- IdentityAutoFillConstants.FullNameFieldNameValues
+ IdentityAutoFillConstants.FullNameFieldNameValues,
);
expect(autofillService["makeScriptActionWithValue"]).toHaveBeenCalledWith(
fillScript,
lastName,
fullNameField,
- filledFields
+ filledFields,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", fullNameField.opid, lastName]);
});
@@ -2920,41 +2920,41 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
firstNameField.htmlName,
- IdentityAutoFillConstants.FirstnameFieldNames
+ IdentityAutoFillConstants.FirstnameFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
middleNameField.htmlName,
- IdentityAutoFillConstants.MiddlenameFieldNames
+ IdentityAutoFillConstants.MiddlenameFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
lastNameField.htmlName,
- IdentityAutoFillConstants.LastnameFieldNames
+ IdentityAutoFillConstants.LastnameFieldNames,
);
expect(autofillService["makeScriptAction"]).toHaveBeenCalledWith(
fillScript,
options.cipher.identity,
expect.anything(),
filledFields,
- firstNameField.opid
+ firstNameField.opid,
);
expect(autofillService["makeScriptAction"]).toHaveBeenCalledWith(
fillScript,
options.cipher.identity,
expect.anything(),
filledFields,
- middleNameField.opid
+ middleNameField.opid,
);
expect(autofillService["makeScriptAction"]).toHaveBeenCalledWith(
fillScript,
options.cipher.identity,
expect.anything(),
filledFields,
- lastNameField.opid
+ lastNameField.opid,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", firstNameField.opid, firstName]);
expect(value.script[5]).toStrictEqual(["fill_by_opid", middleNameField.opid, middleName]);
@@ -2974,30 +2974,30 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
titleField.htmlName,
- IdentityAutoFillConstants.TitleFieldNames
+ IdentityAutoFillConstants.TitleFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
emailField.htmlName,
- IdentityAutoFillConstants.EmailFieldNames
+ IdentityAutoFillConstants.EmailFieldNames,
);
expect(autofillService["makeScriptAction"]).toHaveBeenCalledWith(
fillScript,
options.cipher.identity,
expect.anything(),
filledFields,
- titleField.opid
+ titleField.opid,
);
expect(autofillService["makeScriptAction"]).toHaveBeenCalledWith(
fillScript,
options.cipher.identity,
expect.anything(),
filledFields,
- emailField.opid
+ emailField.opid,
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", titleField.opid, title]);
expect(value.script[5]).toStrictEqual(["fill_by_opid", emailField.opid, email]);
@@ -3020,19 +3020,19 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
fullAddressField.htmlName,
IdentityAutoFillConstants.AddressFieldNames,
- IdentityAutoFillConstants.AddressFieldNameValues
+ IdentityAutoFillConstants.AddressFieldNameValues,
);
expect(autofillService["makeScriptActionWithValue"]).toHaveBeenCalledWith(
fillScript,
`${address1}, ${address2}, ${address3}`,
fullAddressField,
- filledFields
+ filledFields,
);
expect(value.script[2]).toStrictEqual([
"fill_by_opid",
@@ -3092,48 +3092,48 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
address1Field.htmlName,
- IdentityAutoFillConstants.Address1FieldNames
+ IdentityAutoFillConstants.Address1FieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
address2Field.htmlName,
- IdentityAutoFillConstants.Address2FieldNames
+ IdentityAutoFillConstants.Address2FieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
address3Field.htmlName,
- IdentityAutoFillConstants.Address3FieldNames
+ IdentityAutoFillConstants.Address3FieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
postalCodeField.htmlName,
- IdentityAutoFillConstants.PostalCodeFieldNames
+ IdentityAutoFillConstants.PostalCodeFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
cityField.htmlName,
- IdentityAutoFillConstants.CityFieldNames
+ IdentityAutoFillConstants.CityFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
stateField.htmlName,
- IdentityAutoFillConstants.StateFieldNames
+ IdentityAutoFillConstants.StateFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
countryField.htmlName,
- IdentityAutoFillConstants.CountryFieldNames
+ IdentityAutoFillConstants.CountryFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
phoneField.htmlName,
- IdentityAutoFillConstants.PhoneFieldNames
+ IdentityAutoFillConstants.PhoneFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
usernameField.htmlName,
- IdentityAutoFillConstants.UserNameFieldNames
+ IdentityAutoFillConstants.UserNameFieldNames,
);
expect(AutofillService["isFieldMatch"]).toHaveBeenCalledWith(
companyField.htmlName,
- IdentityAutoFillConstants.CompanyFieldNames
+ IdentityAutoFillConstants.CompanyFieldNames,
);
expect(autofillService["makeScriptAction"]).toHaveBeenCalled();
expect(value.script[2]).toStrictEqual(["fill_by_opid", address1Field.opid, address1]);
@@ -3158,14 +3158,14 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["makeScriptActionWithValue"]).toHaveBeenCalledWith(
fillScript,
"CA",
expect.anything(),
- expect.anything()
+ expect.anything(),
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", stateField.opid, "CA"]);
});
@@ -3180,14 +3180,14 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["makeScriptActionWithValue"]).toHaveBeenCalledWith(
fillScript,
"ON",
expect.anything(),
- expect.anything()
+ expect.anything(),
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", stateField.opid, "ON"]);
});
@@ -3202,14 +3202,14 @@ describe("AutofillService", () => {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
expect(autofillService["makeScriptActionWithValue"]).toHaveBeenCalledWith(
fillScript,
"SO",
expect.anything(),
- expect.anything()
+ expect.anything(),
);
expect(value.script[2]).toStrictEqual(["fill_by_opid", countryField.opid, "SO"]);
});
@@ -3220,7 +3220,7 @@ describe("AutofillService", () => {
it("returns true if the passed type is within the excluded type list", () => {
const value = autofillService["isExcludedType"](
"hidden",
- AutoFillConstants.ExcludedAutofillTypes
+ AutoFillConstants.ExcludedAutofillTypes,
);
expect(value).toBe(true);
@@ -3229,7 +3229,7 @@ describe("AutofillService", () => {
it("returns true if the passed type is within the excluded type list", () => {
const value = autofillService["isExcludedType"](
"text",
- AutoFillConstants.ExcludedAutofillTypes
+ AutoFillConstants.ExcludedAutofillTypes,
);
expect(value).toBe(false);
@@ -3254,7 +3254,7 @@ describe("AutofillService", () => {
const value = AutofillService["isFieldMatch"](
passedAttribute,
passedOptions,
- containsOptions
+ containsOptions,
);
expect(value).toBe(true);
@@ -3268,7 +3268,7 @@ describe("AutofillService", () => {
const value = AutofillService["isFieldMatch"](
passedAttribute,
passedOptions,
- containsOptions
+ containsOptions,
);
expect(value).toBe(false);
@@ -3301,14 +3301,14 @@ describe("AutofillService", () => {
options.cipher.login,
fillFields,
filledFields,
- dataProp
+ dataProp,
);
expect(autofillService["makeScriptActionWithValue"]).toHaveBeenCalledWith(
fillScript,
mockLoginView[dataProp],
fillFields[dataProp],
- filledFields
+ filledFields,
);
});
@@ -3322,14 +3322,14 @@ describe("AutofillService", () => {
fillFields,
filledFields,
dataProp,
- fieldProp
+ fieldProp,
);
expect(autofillService["makeScriptActionWithValue"]).toHaveBeenCalledWith(
fillScript,
mockLoginView[dataProp],
fillFields[fieldProp],
- filledFields
+ filledFields,
);
});
});
@@ -3361,7 +3361,7 @@ describe("AutofillService", () => {
fillScript,
dataValue,
fillFields["username-field"],
- filledFields
+ filledFields,
);
expect(AutofillService.hasValue).toHaveBeenCalledWith(dataValue);
@@ -3384,14 +3384,14 @@ describe("AutofillService", () => {
fillScript,
dataValue,
fillFields["username-field"],
- filledFields
+ filledFields,
);
expect(AutofillService.hasValue).toHaveBeenCalledWith(dataValue);
expect(AutofillService.fillByOpid).toHaveBeenCalledWith(
fillScript,
fillFields["username-field"],
- dataValue
+ dataValue,
);
});
@@ -3411,7 +3411,7 @@ describe("AutofillService", () => {
fillScript,
dataValue,
selectField,
- filledFields
+ filledFields,
);
expect(AutofillService.hasValue).toHaveBeenCalledWith(dataValue);
@@ -3433,14 +3433,14 @@ describe("AutofillService", () => {
fillScript,
dataValue,
selectField,
- filledFields
+ filledFields,
);
expect(AutofillService.hasValue).toHaveBeenCalledWith(dataValue);
expect(AutofillService.fillByOpid).toHaveBeenCalledWith(
fillScript,
selectField,
- "Some Other Username Value"
+ "Some Other Username Value",
);
});
});
@@ -3681,7 +3681,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3695,7 +3695,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3712,7 +3712,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3724,7 +3724,7 @@ describe("AutofillService", () => {
passwordField,
false,
true,
- false
+ false,
);
expect(result).toBe(usernameField);
@@ -3743,7 +3743,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3755,7 +3755,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- true
+ true,
);
expect(result).toBe(usernameField);
@@ -3774,7 +3774,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3786,7 +3786,7 @@ describe("AutofillService", () => {
passwordField,
true,
false,
- false
+ false,
);
expect(result).toBe(usernameField);
@@ -3801,7 +3801,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3829,14 +3829,14 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(usernameField2);
expect(autofillService["findMatchingFieldIndex"]).toHaveBeenCalledTimes(2);
expect(autofillService["findMatchingFieldIndex"]).not.toHaveBeenCalledWith(
usernameField3,
- AutoFillConstants.UsernameFieldNames
+ AutoFillConstants.UsernameFieldNames,
);
});
});
@@ -3885,7 +3885,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3902,7 +3902,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3914,7 +3914,7 @@ describe("AutofillService", () => {
passwordField,
false,
true,
- false
+ false,
);
expect(result).toBe(totpField);
@@ -3932,7 +3932,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3944,7 +3944,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- true
+ true,
);
expect(result).toBe(totpField);
@@ -3963,7 +3963,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -3975,7 +3975,7 @@ describe("AutofillService", () => {
passwordField,
true,
false,
- false
+ false,
);
expect(result).toBe(totpField);
@@ -3990,7 +3990,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(null);
@@ -4005,7 +4005,7 @@ describe("AutofillService", () => {
passwordField,
false,
false,
- false
+ false,
);
expect(result).toBe(totpField);
@@ -4039,7 +4039,7 @@ describe("AutofillService", () => {
expect(autofillService["fieldPropertyIsMatch"]).toHaveBeenCalledWith(
field,
attribute[0],
- value
+ value,
);
expect(result).toBe(0);
});
@@ -4075,7 +4075,7 @@ describe("AutofillService", () => {
field,
"htmlID",
"id=username",
- "id"
+ "id",
);
expect(result).toBe(true);
@@ -4088,7 +4088,7 @@ describe("AutofillService", () => {
field,
"htmlID",
"id=some-othername",
- "id"
+ "id",
);
expect(result).toBe(false);
@@ -4164,7 +4164,7 @@ describe("AutofillService", () => {
const result = autofillService["fieldPropertyIsMatch"](
field,
"htmlID",
- "csv=some-value,some-other-value,some-third-value"
+ "csv=some-value,some-other-value,some-third-value",
);
expect(result).toBe(false);
@@ -4176,7 +4176,7 @@ describe("AutofillService", () => {
const result = autofillService["fieldPropertyIsMatch"](
field,
"htmlID",
- "csv=some-value,some-other-value,some-third-value"
+ "csv=some-value,some-other-value,some-third-value",
);
expect(result).toBe(true);
@@ -4223,7 +4223,7 @@ describe("AutofillService", () => {
expect(AutofillService.hasValue).toHaveBeenCalled();
expect(AutofillService["fuzzyMatch"]).toHaveBeenCalledWith(
["some-value"],
- "some-false-value"
+ "some-false-value",
);
expect(result).toBe(false);
@@ -4280,7 +4280,7 @@ describe("AutofillService", () => {
it("returns true if the passed value is within the options array", () => {
const result = AutofillService["fuzzyMatch"](
["some-other-value", "some-value"],
- "some-value"
+ "some-value",
);
expect(result).toBe(true);
diff --git a/apps/browser/src/autofill/services/autofill.service.ts b/apps/browser/src/autofill/services/autofill.service.ts
index b2672e86762..a1ef5a47a1c 100644
--- a/apps/browser/src/autofill/services/autofill.service.ts
+++ b/apps/browser/src/autofill/services/autofill.service.ts
@@ -43,7 +43,7 @@ export default class AutofillService implements AutofillServiceInterface {
private eventCollectionService: EventCollectionService,
private logService: LogService,
private settingsService: SettingsService,
- private userVerificationService: UserVerificationService
+ private userVerificationService: UserVerificationService,
) {}
/**
@@ -59,7 +59,7 @@ export default class AutofillService implements AutofillServiceInterface {
async injectAutofillScripts(
sender: chrome.runtime.MessageSender,
autofillV2 = false,
- autofillOverlay = false
+ autofillOverlay = false,
) {
let mainAutofillScript = "autofill.js";
@@ -226,7 +226,7 @@ export default class AutofillService implements AutofillServiceInterface {
url: tab.url,
pageDetailsUrl: pd.details.url,
},
- { frameId: pd.frameId }
+ { frameId: pd.frameId },
);
// Skip getting the TOTP code for clipboard in these cases
@@ -245,7 +245,7 @@ export default class AutofillService implements AutofillServiceInterface {
}
return null;
});
- })
+ }),
);
if (didAutofill) {
@@ -270,7 +270,7 @@ export default class AutofillService implements AutofillServiceInterface {
async doAutoFillOnTab(
pageDetails: PageDetail[],
tab: chrome.tabs.Tab,
- fromCommand: boolean
+ fromCommand: boolean,
): Promise {
let cipher: CipherView;
if (fromCommand) {
@@ -347,7 +347,7 @@ export default class AutofillService implements AutofillServiceInterface {
async doAutoFillActiveTab(
pageDetails: PageDetail[],
fromCommand: boolean,
- cipherType?: CipherType
+ cipherType?: CipherType,
): Promise {
if (!pageDetails[0]?.details?.fields?.length) {
return null;
@@ -410,7 +410,7 @@ export default class AutofillService implements AutofillServiceInterface {
*/
private async generateFillScript(
pageDetails: AutofillPageDetails,
- options: GenerateFillScriptOptions
+ options: GenerateFillScriptOptions,
): Promise {
if (!pageDetails || !options.cipher) {
return null;
@@ -465,7 +465,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
break;
case CipherType.Card:
@@ -476,7 +476,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillScript,
pageDetails,
filledFields,
- options
+ options,
);
break;
default:
@@ -499,7 +499,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillScript: AutofillScript,
pageDetails: AutofillPageDetails,
filledFields: { [id: string]: AutofillField },
- options: GenerateFillScriptOptions
+ options: GenerateFillScriptOptions,
): Promise {
if (!options.cipher.login) {
return null;
@@ -522,7 +522,7 @@ export default class AutofillService implements AutofillServiceInterface {
false,
false,
options.onlyEmptyFields,
- options.fillNewPassword
+ options.fillNewPassword,
);
if (!passwordFields.length && !options.onlyVisibleFields) {
// not able to find any viewable password fields. maybe there are some "hidden" ones?
@@ -531,7 +531,7 @@ export default class AutofillService implements AutofillServiceInterface {
true,
true,
options.onlyEmptyFields,
- options.fillNewPassword
+ options.fillNewPassword,
);
}
@@ -661,7 +661,7 @@ export default class AutofillService implements AutofillServiceInterface {
filledFields[t.opid] = t;
const totpValue = await this.totpService.getCode(login.totp);
AutofillService.fillByOpid(fillScript, t, totpValue);
- })
+ }),
);
}
@@ -682,7 +682,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillScript: AutofillScript,
pageDetails: AutofillPageDetails,
filledFields: { [id: string]: AutofillField },
- options: GenerateFillScriptOptions
+ options: GenerateFillScriptOptions,
): AutofillScript | null {
if (!options.cipher.card) {
return null;
@@ -713,7 +713,7 @@ export default class AutofillService implements AutofillServiceInterface {
AutofillService.isFieldMatch(
f[attr],
CreditCardAutoFillConstants.CardHolderFieldNames,
- CreditCardAutoFillConstants.CardHolderFieldNameValues
+ CreditCardAutoFillConstants.CardHolderFieldNameValues,
)
) {
fillFields.cardholderName = f;
@@ -723,7 +723,7 @@ export default class AutofillService implements AutofillServiceInterface {
AutofillService.isFieldMatch(
f[attr],
CreditCardAutoFillConstants.CardNumberFieldNames,
- CreditCardAutoFillConstants.CardNumberFieldNameValues
+ CreditCardAutoFillConstants.CardNumberFieldNameValues,
)
) {
fillFields.number = f;
@@ -733,7 +733,7 @@ export default class AutofillService implements AutofillServiceInterface {
AutofillService.isFieldMatch(
f[attr],
CreditCardAutoFillConstants.CardExpiryFieldNames,
- CreditCardAutoFillConstants.CardExpiryFieldNameValues
+ CreditCardAutoFillConstants.CardExpiryFieldNameValues,
)
) {
fillFields.exp = f;
@@ -879,7 +879,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.exp,
CreditCardAutoFillConstants.MonthAbbr[i] +
"/" +
- CreditCardAutoFillConstants.YearAbbrLong[i]
+ CreditCardAutoFillConstants.YearAbbrLong[i],
)
) {
exp = fullMonth + "/" + fullYear;
@@ -888,7 +888,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.exp,
CreditCardAutoFillConstants.MonthAbbr[i] +
"/" +
- CreditCardAutoFillConstants.YearAbbrShort[i]
+ CreditCardAutoFillConstants.YearAbbrShort[i],
) &&
partYear != null
) {
@@ -898,7 +898,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.exp,
CreditCardAutoFillConstants.YearAbbrLong[i] +
"/" +
- CreditCardAutoFillConstants.MonthAbbr[i]
+ CreditCardAutoFillConstants.MonthAbbr[i],
)
) {
exp = fullYear + "/" + fullMonth;
@@ -907,7 +907,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.exp,
CreditCardAutoFillConstants.YearAbbrShort[i] +
"/" +
- CreditCardAutoFillConstants.MonthAbbr[i]
+ CreditCardAutoFillConstants.MonthAbbr[i],
) &&
partYear != null
) {
@@ -917,7 +917,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.exp,
CreditCardAutoFillConstants.MonthAbbr[i] +
"-" +
- CreditCardAutoFillConstants.YearAbbrLong[i]
+ CreditCardAutoFillConstants.YearAbbrLong[i],
)
) {
exp = fullMonth + "-" + fullYear;
@@ -926,7 +926,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.exp,
CreditCardAutoFillConstants.MonthAbbr[i] +
"-" +
- CreditCardAutoFillConstants.YearAbbrShort[i]
+ CreditCardAutoFillConstants.YearAbbrShort[i],
) &&
partYear != null
) {
@@ -936,7 +936,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.exp,
CreditCardAutoFillConstants.YearAbbrLong[i] +
"-" +
- CreditCardAutoFillConstants.MonthAbbr[i]
+ CreditCardAutoFillConstants.MonthAbbr[i],
)
) {
exp = fullYear + "-" + fullMonth;
@@ -945,7 +945,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields.exp,
CreditCardAutoFillConstants.YearAbbrShort[i] +
"-" +
- CreditCardAutoFillConstants.MonthAbbr[i]
+ CreditCardAutoFillConstants.MonthAbbr[i],
) &&
partYear != null
) {
@@ -953,14 +953,14 @@ export default class AutofillService implements AutofillServiceInterface {
} else if (
this.fieldAttrsContain(
fillFields.exp,
- CreditCardAutoFillConstants.YearAbbrLong[i] + CreditCardAutoFillConstants.MonthAbbr[i]
+ CreditCardAutoFillConstants.YearAbbrLong[i] + CreditCardAutoFillConstants.MonthAbbr[i],
)
) {
exp = fullYear + fullMonth;
} else if (
this.fieldAttrsContain(
fillFields.exp,
- CreditCardAutoFillConstants.YearAbbrShort[i] + CreditCardAutoFillConstants.MonthAbbr[i]
+ CreditCardAutoFillConstants.YearAbbrShort[i] + CreditCardAutoFillConstants.MonthAbbr[i],
) &&
partYear != null
) {
@@ -968,14 +968,14 @@ export default class AutofillService implements AutofillServiceInterface {
} else if (
this.fieldAttrsContain(
fillFields.exp,
- CreditCardAutoFillConstants.MonthAbbr[i] + CreditCardAutoFillConstants.YearAbbrLong[i]
+ CreditCardAutoFillConstants.MonthAbbr[i] + CreditCardAutoFillConstants.YearAbbrLong[i],
)
) {
exp = fullMonth + fullYear;
} else if (
this.fieldAttrsContain(
fillFields.exp,
- CreditCardAutoFillConstants.MonthAbbr[i] + CreditCardAutoFillConstants.YearAbbrShort[i]
+ CreditCardAutoFillConstants.MonthAbbr[i] + CreditCardAutoFillConstants.YearAbbrShort[i],
) &&
partYear != null
) {
@@ -1018,7 +1018,7 @@ export default class AutofillService implements AutofillServiceInterface {
const matchesUri = options.cipher.login.matchesUri(
pageUrl,
equivalentDomains,
- options.defaultUriMatch
+ options.defaultUriMatch,
);
return !matchesUri;
}
@@ -1064,7 +1064,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillScript: AutofillScript,
pageDetails: AutofillPageDetails,
filledFields: { [id: string]: AutofillField },
- options: GenerateFillScriptOptions
+ options: GenerateFillScriptOptions,
): AutofillScript {
if (!options.cipher.identity) {
return null;
@@ -1095,7 +1095,7 @@ export default class AutofillService implements AutofillServiceInterface {
AutofillService.isFieldMatch(
f[attr],
IdentityAutoFillConstants.FullNameFieldNames,
- IdentityAutoFillConstants.FullNameFieldNameValues
+ IdentityAutoFillConstants.FullNameFieldNameValues,
)
) {
fillFields.name = f;
@@ -1135,7 +1135,7 @@ export default class AutofillService implements AutofillServiceInterface {
AutofillService.isFieldMatch(
f[attr],
IdentityAutoFillConstants.AddressFieldNames,
- IdentityAutoFillConstants.AddressFieldNameValues
+ IdentityAutoFillConstants.AddressFieldNameValues,
)
) {
fillFields.address = f;
@@ -1320,7 +1320,7 @@ export default class AutofillService implements AutofillServiceInterface {
private static isFieldMatch(
value: string,
options: string[],
- containsOptions?: string[]
+ containsOptions?: string[],
): boolean {
value = value
.trim()
@@ -1355,14 +1355,14 @@ export default class AutofillService implements AutofillServiceInterface {
fillFields: { [id: string]: AutofillField },
filledFields: { [id: string]: AutofillField },
dataProp: string,
- fieldProp?: string
+ fieldProp?: string,
) {
fieldProp = fieldProp || dataProp;
this.makeScriptActionWithValue(
fillScript,
cipherData[dataProp],
fillFields[fieldProp],
- filledFields
+ filledFields,
);
}
@@ -1381,7 +1381,7 @@ export default class AutofillService implements AutofillServiceInterface {
fillScript: AutofillScript,
dataValue: any,
field: AutofillField,
- filledFields: { [id: string]: AutofillField }
+ filledFields: { [id: string]: AutofillField },
) {
let doFill = false;
if (AutofillService.hasValue(dataValue) && field) {
@@ -1431,7 +1431,7 @@ export default class AutofillService implements AutofillServiceInterface {
canBeHidden: boolean,
canBeReadOnly: boolean,
mustBeEmpty: boolean,
- fillNewPassword: boolean
+ fillNewPassword: boolean,
) {
const arr: AutofillField[] = [];
pageDetails.fields.forEach((f) => {
@@ -1503,7 +1503,7 @@ export default class AutofillService implements AutofillServiceInterface {
passwordField: AutofillField,
canBeHidden: boolean,
canBeReadOnly: boolean,
- withoutForm: boolean
+ withoutForm: boolean,
): AutofillField | null {
let usernameField: AutofillField = null;
for (let i = 0; i < pageDetails.fields.length; i++) {
@@ -1551,7 +1551,7 @@ export default class AutofillService implements AutofillServiceInterface {
passwordField: AutofillField,
canBeHidden: boolean,
canBeReadOnly: boolean,
- withoutForm: boolean
+ withoutForm: boolean,
): AutofillField | null {
let totpField: AutofillField = null;
for (let i = 0; i < pageDetails.fields.length; i++) {
@@ -1659,7 +1659,7 @@ export default class AutofillService implements AutofillServiceInterface {
property: string,
name: string,
prefix: string,
- separator = "="
+ separator = "=",
): boolean {
if (name.indexOf(prefix + separator) === 0) {
const sepIndex = name.indexOf(separator);
@@ -1806,7 +1806,7 @@ export default class AutofillService implements AutofillServiceInterface {
*/
static setFillScriptForFocus(
filledFields: { [id: string]: AutofillField },
- fillScript: AutofillScript
+ fillScript: AutofillScript,
): AutofillScript {
let lastField: AutofillField = null;
let lastPasswordField: AutofillField = null;
diff --git a/apps/browser/src/autofill/services/collect-autofill-content.service.spec.ts b/apps/browser/src/autofill/services/collect-autofill-content.service.spec.ts
index b58f31507ba..8bb252d1c57 100644
--- a/apps/browser/src/autofill/services/collect-autofill-content.service.spec.ts
+++ b/apps/browser/src/autofill/services/collect-autofill-content.service.spec.ts
@@ -31,7 +31,7 @@ describe("CollectAutofillContentService", () => {
document.body.innerHTML = mockLoginForm;
collectAutofillContentService = new CollectAutofillContentService(
domElementVisibilityService,
- autofillOverlayContentService
+ autofillOverlayContentService,
);
});
@@ -68,7 +68,7 @@ describe("CollectAutofillContentService", () => {
expect(collectAutofillContentService["getFormattedPageDetails"]).toHaveBeenCalledWith({}, []);
expect(
- collectAutofillContentService["queryAutofillFormAndFieldElements"]
+ collectAutofillContentService["queryAutofillFormAndFieldElements"],
).not.toHaveBeenCalled();
expect(collectAutofillContentService["buildAutofillFormsData"]).not.toHaveBeenCalled();
expect(collectAutofillContentService["buildAutofillFieldsData"]).not.toHaveBeenCalled();
@@ -102,7 +102,7 @@ describe("CollectAutofillContentService", () => {
htmlMethod: formMethod,
};
const fieldElement = document.getElementById(
- usernameFieldId
+ usernameFieldId,
) as ElementWithOpId;
const autofillField: AutofillField = {
opid: "__0",
@@ -156,7 +156,7 @@ describe("CollectAutofillContentService", () => {
expect(collectAutofillContentService["getFormattedAutofillFormsData"]).toHaveBeenCalled();
expect(collectAutofillContentService["getFormattedAutofillFieldsData"]).toHaveBeenCalled();
expect(
- collectAutofillContentService["queryAutofillFormAndFieldElements"]
+ collectAutofillContentService["queryAutofillFormAndFieldElements"],
).not.toHaveBeenCalled();
expect(collectAutofillContentService["buildAutofillFormsData"]).not.toHaveBeenCalled();
expect(collectAutofillContentService["buildAutofillFieldsData"]).not.toHaveBeenCalled();
@@ -294,7 +294,7 @@ describe("CollectAutofillContentService", () => {
it("returns the element with the opid property value matching the passed value", () => {
const textInput = document.querySelector('input[type="text"]') as FormElementWithAttribute;
const passwordInput = document.querySelector(
- 'input[type="password"]'
+ 'input[type="password"]',
) as FormElementWithAttribute;
textInput.opid = "__0";
passwordInput.opid = "__1";
@@ -311,7 +311,7 @@ describe("CollectAutofillContentService", () => {
it("returns the first of the element with an `opid` value matching the passed value and emits a console warning if multiple fields contain the same `opid`", () => {
const textInput = document.querySelector('input[type="text"]') as FormElementWithAttribute;
const passwordInput = document.querySelector(
- 'input[type="password"]'
+ 'input[type="password"]',
) as FormElementWithAttribute;
jest.spyOn(console, "warn").mockImplementationOnce(jest.fn());
textInput.opid = "__1";
@@ -330,7 +330,7 @@ describe("CollectAutofillContentService", () => {
it("returns the element at the index position (parsed from passed opid) of all AutofillField elements when the passed opid value cannot be found", () => {
const textInput = document.querySelector('input[type="text"]') as FormElementWithAttribute;
const passwordInput = document.querySelector(
- 'input[type="password"]'
+ 'input[type="password"]',
) as FormElementWithAttribute;
textInput.opid = undefined;
passwordInput.opid = "__1";
@@ -387,7 +387,7 @@ describe("CollectAutofillContentService", () => {
jest.spyOn(collectAutofillContentService as any, "getFormActionAttribute");
const autofillFormsData = collectAutofillContentService["buildAutofillFormsData"](
- formElements as Node[]
+ formElements as Node[],
);
expect(collectAutofillContentService["getFormActionAttribute"]).not.toHaveBeenCalled();
@@ -452,13 +452,13 @@ describe("CollectAutofillContentService", () => {
const { formFieldElements } =
collectAutofillContentService["queryAutofillFormAndFieldElements"]();
const autofillFieldsPromise = collectAutofillContentService["buildAutofillFieldsData"](
- formFieldElements as FormFieldElement[]
+ formFieldElements as FormFieldElement[],
);
const autofillFieldsData = await Promise.resolve(autofillFieldsPromise);
expect(collectAutofillContentService["getAutofillFieldElements"]).toHaveBeenCalledWith(
100,
- formFieldElements
+ formFieldElements,
);
expect(collectAutofillContentService["buildAutofillFieldItem"]).toHaveBeenCalledTimes(2);
expect(autofillFieldsPromise).toBeInstanceOf(Promise);
@@ -595,12 +595,12 @@ describe("CollectAutofillContentService", () => {
expect(collectAutofillContentService["getPropertyOrAttribute"]).toHaveBeenNthCalledWith(
1,
spanElement,
- "type"
+ "type",
);
expect(collectAutofillContentService["getPropertyOrAttribute"]).toHaveBeenNthCalledWith(
2,
textAreaInput,
- "type"
+ "type",
);
expect(formElements).toEqual([spanElement, textAreaInput]);
});
@@ -799,7 +799,7 @@ describe("CollectAutofillContentService", () => {
viewable: true,
};
const usernameInput = document.getElementById(
- usernameField.id
+ usernameField.id,
) as ElementWithOpId;
usernameInput.opid = "__0";
collectAutofillContentService["autofillFieldElements"].set(usernameInput, existingFieldData);
@@ -812,12 +812,12 @@ describe("CollectAutofillContentService", () => {
const autofillFieldItem = await collectAutofillContentService["buildAutofillFieldItem"](
usernameInput,
- 0
+ 0,
);
expect(collectAutofillContentService["getAutofillFieldMaxLength"]).not.toHaveBeenCalled();
expect(
- collectAutofillContentService["domElementVisibilityService"].isFormFieldViewable
+ collectAutofillContentService["domElementVisibilityService"].isFormFieldViewable,
).not.toHaveBeenCalled();
expect(collectAutofillContentService["getPropertyOrAttribute"]).not.toHaveBeenCalled();
expect(collectAutofillContentService["getElementValue"]).not.toHaveBeenCalled();
@@ -834,7 +834,7 @@ describe("CollectAutofillContentService", () => {
Span Element
`;
const spanElement = document.getElementById(
- spanElementId
+ spanElementId,
) as ElementWithOpId;
jest.spyOn(collectAutofillContentService as any, "getAutofillFieldMaxLength");
jest
@@ -845,44 +845,44 @@ describe("CollectAutofillContentService", () => {
const autofillFieldItem = await collectAutofillContentService["buildAutofillFieldItem"](
spanElement,
- index
+ index,
);
expect(collectAutofillContentService["getAutofillFieldMaxLength"]).toHaveBeenCalledWith(
- spanElement
+ spanElement,
);
expect(
- collectAutofillContentService["domElementVisibilityService"].isFormFieldViewable
+ collectAutofillContentService["domElementVisibilityService"].isFormFieldViewable,
).toHaveBeenCalledWith(spanElement);
expect(collectAutofillContentService["getPropertyOrAttribute"]).toHaveBeenNthCalledWith(
1,
spanElement,
- "id"
+ "id",
);
expect(collectAutofillContentService["getPropertyOrAttribute"]).toHaveBeenNthCalledWith(
2,
spanElement,
- "name"
+ "name",
);
expect(collectAutofillContentService["getPropertyOrAttribute"]).toHaveBeenNthCalledWith(
3,
spanElement,
- "class"
+ "class",
);
expect(collectAutofillContentService["getPropertyOrAttribute"]).toHaveBeenNthCalledWith(
4,
spanElement,
- "tabindex"
+ "tabindex",
);
expect(collectAutofillContentService["getPropertyOrAttribute"]).toHaveBeenNthCalledWith(
5,
spanElement,
- "title"
+ "title",
);
expect(collectAutofillContentService["getPropertyOrAttribute"]).toHaveBeenNthCalledWith(
6,
spanElement,
- "tagName"
+ "tagName",
);
expect(collectAutofillContentService["getElementValue"]).not.toHaveBeenCalled();
expect(autofillFieldItem).toEqual({
@@ -942,7 +942,7 @@ describe("CollectAutofillContentService", () => {
const formElement = document.querySelector("form");
formElement.opid = "form-opid";
const usernameInput = document.getElementById(
- usernameField.id
+ usernameField.id,
) as ElementWithOpId;
jest.spyOn(collectAutofillContentService as any, "getAutofillFieldMaxLength");
jest
@@ -953,7 +953,7 @@ describe("CollectAutofillContentService", () => {
const autofillFieldItem = await collectAutofillContentService["buildAutofillFieldItem"](
usernameInput,
- index
+ index,
);
expect(autofillFieldItem).toEqual({
@@ -1027,7 +1027,7 @@ describe("CollectAutofillContentService", () => {
const formElement = document.querySelector("form");
formElement.opid = "form-opid";
const hiddenInput = document.getElementById(
- hiddenField.id
+ hiddenField.id,
) as ElementWithOpId;
jest.spyOn(collectAutofillContentService as any, "getAutofillFieldMaxLength");
jest
@@ -1038,7 +1038,7 @@ describe("CollectAutofillContentService", () => {
const autofillFieldItem = await collectAutofillContentService["buildAutofillFieldItem"](
hiddenInput,
- index
+ index,
);
expect(autofillFieldItem).toEqual({
@@ -1086,7 +1086,7 @@ describe("CollectAutofillContentService", () => {
const labelTag = collectAutofillContentService["createAutofillFieldLabelTag"](element);
expect(collectAutofillContentService["createLabelElementsTag"]).toHaveBeenCalledWith(
- new Set(element.labels)
+ new Set(element.labels),
);
expect(document.querySelectorAll).not.toHaveBeenCalled();
expect(labelTag).toEqual("Username");
@@ -1104,7 +1104,7 @@ describe("CollectAutofillContentService", () => {
expect(document.querySelectorAll).toHaveBeenCalledWith(`label[for="${element.id}"]`);
expect(collectAutofillContentService["createLabelElementsTag"]).toHaveBeenCalledWith(
- new Set([elementLabel])
+ new Set([elementLabel]),
);
expect(labelTag).toEqual("Country");
});
@@ -1122,7 +1122,7 @@ describe("CollectAutofillContentService", () => {
expect(document.querySelectorAll).not.toHaveBeenCalledWith(`label[for="${element.id}"]`);
expect(document.querySelectorAll).toHaveBeenCalledWith(`label[for="${element.name}"]`);
expect(collectAutofillContentService["createLabelElementsTag"]).toHaveBeenCalledWith(
- new Set([elementLabel])
+ new Set([elementLabel]),
);
expect(labelTag).toEqual("Country");
});
@@ -1139,10 +1139,10 @@ describe("CollectAutofillContentService", () => {
const labelTag = collectAutofillContentService["createAutofillFieldLabelTag"](element);
expect(document.querySelectorAll).toHaveBeenCalledWith(
- `label[for="${element.id}"], label[for="${element.name}"]`
+ `label[for="${element.id}"], label[for="${element.name}"]`,
);
expect(collectAutofillContentService["createLabelElementsTag"]).toHaveBeenCalledWith(
- new Set([elementLabel])
+ new Set([elementLabel]),
);
expect(labelTag).toEqual("Country");
});
@@ -1158,7 +1158,7 @@ describe("CollectAutofillContentService", () => {
const labelTag = collectAutofillContentService["createAutofillFieldLabelTag"](element);
expect(collectAutofillContentService["createLabelElementsTag"]).toHaveBeenCalledWith(
- new Set([elementLabel])
+ new Set([elementLabel]),
);
expect(labelTag).toEqual("Username");
});
@@ -1178,7 +1178,7 @@ describe("CollectAutofillContentService", () => {
const labelTag = collectAutofillContentService["createAutofillFieldLabelTag"](element);
expect(collectAutofillContentService["createLabelElementsTag"]).toHaveBeenCalledWith(
- new Set([elementLabel])
+ new Set([elementLabel]),
);
expect(labelTag).toEqual("Username");
});
@@ -1275,10 +1275,10 @@ describe("CollectAutofillContentService", () => {
const labelTag = collectAutofillContentService["createLabelElementsTag"](new Set(labels));
expect(
- collectAutofillContentService["trimAndRemoveNonPrintableText"]
+ collectAutofillContentService["trimAndRemoveNonPrintableText"],
).toHaveBeenNthCalledWith(1, firstLabelText);
expect(
- collectAutofillContentService["trimAndRemoveNonPrintableText"]
+ collectAutofillContentService["trimAndRemoveNonPrintableText"],
).toHaveBeenNthCalledWith(2, secondLabelText);
expect(labelTag).toEqual(`${firstLabelText}${secondLabelText}`);
});
@@ -1406,7 +1406,7 @@ describe("CollectAutofillContentService", () => {
`;
const targetTableCellInput = document.querySelector(
- 'input[name="password"]'
+ 'input[name="password"]',
) as HTMLInputElement;
const targetTableCellLabel =
@@ -1433,7 +1433,7 @@ describe("CollectAutofillContentService", () => {
`;
const targetTableCellInput = document.querySelector(
- 'input[name="auth-code"]'
+ 'input[name="auth-code"]',
) as HTMLInputElement;
const targetTableCellLabel =
@@ -1455,7 +1455,7 @@ describe("CollectAutofillContentService", () => {
`;
const targetTableCellInput = document.querySelector(
- 'input[name="password"]'
+ 'input[name="password"]',
) as HTMLInputElement;
const targetTableCellLabel =
@@ -1482,7 +1482,7 @@ describe("CollectAutofillContentService", () => {
`;
const targetTableCellInput = document.querySelector(
- 'input[name="password"]'
+ 'input[name="password"]',
) as HTMLInputElement;
const targetTableCellLabel =
@@ -1508,7 +1508,7 @@ describe("CollectAutofillContentService", () => {
`;
const targetTableCellInput = document.querySelector(
- 'input[name="auth-code"]'
+ 'input[name="auth-code"]',
) as HTMLInputElement;
const targetTableCellLabel =
@@ -1573,7 +1573,7 @@ describe("CollectAutofillContentService", () => {
const element = document.querySelector("#username-id");
const textNode = element.previousSibling;
const parsedTextContent = collectAutofillContentService["trimAndRemoveNonPrintableText"](
- textNode.nodeValue
+ textNode.nodeValue,
);
jest.spyOn(collectAutofillContentService as any, "trimAndRemoveNonPrintableText");
@@ -1581,7 +1581,7 @@ describe("CollectAutofillContentService", () => {
expect(textNode.nodeType).toEqual(Node.TEXT_NODE);
expect(collectAutofillContentService["trimAndRemoveNonPrintableText"]).toHaveBeenCalledWith(
- textNode.nodeValue
+ textNode.nodeValue,
);
expect(textContent).toEqual(parsedTextContent);
});
@@ -1600,7 +1600,7 @@ describe("CollectAutofillContentService", () => {
expect(element.nodeType).toEqual(Node.ELEMENT_NODE);
expect(collectAutofillContentService["trimAndRemoveNonPrintableText"]).toHaveBeenCalledWith(
- element.textContent
+ element.textContent,
);
expect(textContent).toEqual(element.textContent);
});
@@ -1735,20 +1735,20 @@ describe("CollectAutofillContentService", () => {
const textInputValue = collectAutofillContentService["getPropertyOrAttribute"](
textInput,
- "value"
+ "value",
);
const textInputId = collectAutofillContentService["getPropertyOrAttribute"](textInput, "id");
const textInputBaseURI = collectAutofillContentService["getPropertyOrAttribute"](
textInput,
- "baseURI"
+ "baseURI",
);
const textInputAutofocus = collectAutofillContentService["getPropertyOrAttribute"](
textInput,
- "autofocus"
+ "autofocus",
);
const checkboxInputChecked = collectAutofillContentService["getPropertyOrAttribute"](
checkboxInput,
- "checked"
+ "checked",
);
expect(textInput.getAttribute).not.toHaveBeenCalled();
@@ -1767,7 +1767,7 @@ describe("CollectAutofillContentService", () => {
const textInputUniqueAttribute = collectAutofillContentService["getPropertyOrAttribute"](
textInput,
- "data-unique-attribute"
+ "data-unique-attribute",
);
expect(textInputUniqueAttribute).toEqual("unique-value");
@@ -1780,7 +1780,7 @@ describe("CollectAutofillContentService", () => {
const textInputNonExistentAttribute = collectAutofillContentService["getPropertyOrAttribute"](
textInput,
- "non-existent-attribute"
+ "non-existent-attribute",
);
expect(textInputNonExistentAttribute).toEqual(null);
@@ -1841,14 +1841,14 @@ describe("CollectAutofillContentService", () => {
`;
const longValueHiddenInput = document.querySelector(
- "#long-value-hidden-input"
+ "#long-value-hidden-input",
) as HTMLInputElement;
const longHiddenValue =
collectAutofillContentService["getElementValue"](longValueHiddenInput);
expect(longHiddenValue).toEqual(
- "’Twas brillig, and the slithy toves | Did gyre and gimble in the wabe: | All mimsy were the borogoves, | And the mome raths outgrabe. | “Beware the Jabberwock, my son! | The jaws that bite, the claws that catch! | Beware the Jubjub bird, and shun | The f...SNIPPED"
+ "’Twas brillig, and the slithy toves | Did gyre and gimble in the wabe: | All mimsy were the borogoves, | And the mome raths outgrabe. | “Beware the Jabberwock, my son! | The jaws that bite, the claws that catch! | Beware the Jubjub bird, and shun | The f...SNIPPED",
);
});
});
@@ -1866,7 +1866,7 @@ describe("CollectAutofillContentService", () => {
`;
const selectWithOptions = document.querySelector("#select-with-options") as HTMLSelectElement;
const selectWithoutOptions = document.querySelector(
- "#select-without-options"
+ "#select-without-options",
) as HTMLSelectElement;
const selectWithOptionsOptions =
@@ -1925,7 +1925,7 @@ describe("CollectAutofillContentService", () => {
document.body,
[],
callbackFilter,
- true
+ true,
);
expect(collectAutofillContentService["buildTreeWalkerNodesQueryResults"]).toBeCalledTimes(2);
@@ -1946,7 +1946,7 @@ describe("CollectAutofillContentService", () => {
document.body,
[],
callbackFilter,
- false
+ false,
);
expect(collectAutofillContentService["mutationObserver"].observe).not.toBeCalled();
@@ -1993,10 +1993,10 @@ describe("CollectAutofillContentService", () => {
expect(collectAutofillContentService["noFieldsFound"]).toEqual(false);
expect(collectAutofillContentService["isAutofillElementNodeMutated"]).toBeCalledWith(
removedNodes,
- true
+ true,
);
expect(collectAutofillContentService["isAutofillElementNodeMutated"]).toBeCalledWith(
- addedNodes
+ addedNodes,
);
});
@@ -2048,7 +2048,7 @@ describe("CollectAutofillContentService", () => {
expect(collectAutofillContentService["handleWindowLocationMutation"]).toBeCalled();
expect(collectAutofillContentService["isAutofillElementNodeMutated"]).not.toBeCalled();
expect(
- collectAutofillContentService["handleAutofillElementAttributeMutation"]
+ collectAutofillContentService["handleAutofillElementAttributeMutation"],
).not.toBeCalled();
});
});
@@ -2170,7 +2170,7 @@ describe("CollectAutofillContentService", () => {
expect(collectAutofillContentService["updateAutofillFormElementData"]).toBeCalledWith(
mutationRecord.attributeName,
mutationRecord.target,
- autofillForm
+ autofillForm,
);
});
@@ -2217,7 +2217,7 @@ describe("CollectAutofillContentService", () => {
expect(collectAutofillContentService["updateAutofillFieldElementData"]).toBeCalledWith(
mutationRecord.attributeName,
mutationRecord.target,
- autofillField
+ autofillField,
);
});
});
@@ -2240,12 +2240,12 @@ describe("CollectAutofillContentService", () => {
collectAutofillContentService["updateAutofillFormElementData"](
attribute,
formElement,
- autofillForm
+ autofillForm,
);
expect(collectAutofillContentService["autofillFormElements"].set).toBeCalledWith(
formElement,
- autofillForm
+ autofillForm,
);
});
});
@@ -2256,7 +2256,7 @@ describe("CollectAutofillContentService", () => {
collectAutofillContentService["updateAutofillFormElementData"](
"aria-label",
formElement,
- autofillForm
+ autofillForm,
);
expect(collectAutofillContentService["autofillFormElements"].set).not.toBeCalled();
@@ -2305,12 +2305,12 @@ describe("CollectAutofillContentService", () => {
await collectAutofillContentService["updateAutofillFieldElementData"](
attribute,
fieldElement,
- autofillField
+ autofillField,
);
expect(collectAutofillContentService["autofillFieldElements"].set).toBeCalledWith(
fieldElement,
- autofillField
+ autofillField,
);
});
});
@@ -2318,7 +2318,7 @@ describe("CollectAutofillContentService", () => {
it("will check the dom element's visibility if the `style` or `class` attribute has updated ", async () => {
jest.spyOn(
collectAutofillContentService["domElementVisibilityService"],
- "isFormFieldViewable"
+ "isFormFieldViewable",
);
const attributes = ["class", "style"];
@@ -2326,11 +2326,11 @@ describe("CollectAutofillContentService", () => {
await collectAutofillContentService["updateAutofillFieldElementData"](
attribute,
fieldElement,
- autofillField
+ autofillField,
);
expect(
- collectAutofillContentService["domElementVisibilityService"].isFormFieldViewable
+ collectAutofillContentService["domElementVisibilityService"].isFormFieldViewable,
).toBeCalledWith(fieldElement);
}
});
@@ -2341,7 +2341,7 @@ describe("CollectAutofillContentService", () => {
await collectAutofillContentService["updateAutofillFieldElementData"](
"random-attribute",
fieldElement,
- autofillField
+ autofillField,
);
expect(collectAutofillContentService["autofillFieldElements"].set).not.toBeCalled();
diff --git a/apps/browser/src/autofill/services/collect-autofill-content.service.ts b/apps/browser/src/autofill/services/collect-autofill-content.service.ts
index 20f1c2b5921..66a699618ee 100644
--- a/apps/browser/src/autofill/services/collect-autofill-content.service.ts
+++ b/apps/browser/src/autofill/services/collect-autofill-content.service.ts
@@ -31,7 +31,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
constructor(
domElementVisibilityService: DomElementVisibilityService,
- autofillOverlayContentService?: AutofillOverlayContentService
+ autofillOverlayContentService?: AutofillOverlayContentService,
) {
this.domElementVisibilityService = domElementVisibilityService;
this.autofillOverlayContentService = autofillOverlayContentService;
@@ -56,7 +56,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
if (!this.domRecentlyMutated && this.autofillFieldElements.size) {
return this.getFormattedPageDetails(
this.getFormattedAutofillFormsData(),
- this.getFormattedAutofillFieldsData()
+ this.getFormattedAutofillFieldsData(),
);
}
@@ -64,7 +64,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
const autofillFormsData: Record =
this.buildAutofillFormsData(formElements);
const autofillFieldsData: AutofillField[] = await this.buildAutofillFieldsData(
- formFieldElements as FormFieldElement[]
+ formFieldElements as FormFieldElement[],
);
this.sortAutofillFieldElementsMap();
@@ -89,7 +89,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
? cachedFormFieldElements
: this.getAutofillFieldElements();
const fieldElementsWithOpid = formFieldElements.filter(
- (fieldElement) => (fieldElement as ElementWithOpId).opid === opid
+ (fieldElement) => (fieldElement as ElementWithOpId).opid === opid,
) as ElementWithOpId[];
if (!fieldElementsWithOpid.length) {
@@ -117,7 +117,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
queryAllTreeWalkerNodes(
rootNode: Node,
filterCallback: CallableFunction,
- isObservingShadowRoot = true
+ isObservingShadowRoot = true,
): Node[] {
const treeWalkerQueryResults: Node[] = [];
@@ -125,7 +125,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
rootNode,
treeWalkerQueryResults,
filterCallback,
- isObservingShadowRoot
+ isObservingShadowRoot,
);
return treeWalkerQueryResults;
@@ -141,7 +141,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
}
this.autofillFieldElements = new Map(
- [...this.autofillFieldElements].sort((a, b) => a[1].elementNumber - b[1].elementNumber)
+ [...this.autofillFieldElements].sort((a, b) => a[1].elementNumber - b[1].elementNumber),
);
}
@@ -154,7 +154,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
*/
private getFormattedPageDetails(
autofillFormsData: Record,
- autofillFieldsData: AutofillField[]
+ autofillFieldsData: AutofillField[],
): AutofillPageDetails {
return {
title: document.title,
@@ -231,7 +231,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
* @private
*/
private async buildAutofillFieldsData(
- formFieldElements: FormFieldElement[]
+ formFieldElements: FormFieldElement[],
): Promise {
const autofillFieldElements = this.getAutofillFieldElements(100, formFieldElements);
const autofillFieldDataPromises = autofillFieldElements.map(this.buildAutofillFieldItem);
@@ -250,12 +250,12 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
*/
private getAutofillFieldElements(
fieldsLimit?: number,
- previouslyFoundFormFieldElements?: FormFieldElement[]
+ previouslyFoundFormFieldElements?: FormFieldElement[],
): FormFieldElement[] {
const formFieldElements =
previouslyFoundFormFieldElements ||
(this.queryAllTreeWalkerNodes(document.documentElement, (node: Node) =>
- this.isNodeFormFieldElement(node)
+ this.isNodeFormFieldElement(node),
) as FormFieldElement[]);
if (!fieldsLimit || formFieldElements.length <= fieldsLimit) {
@@ -298,7 +298,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
*/
private buildAutofillFieldItem = async (
element: ElementWithOpId,
- index: number
+ index: number,
): Promise => {
element.opid = `__${index}`;
@@ -328,7 +328,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
this.autofillFieldElements.set(element, autofillFieldBase);
this.autofillOverlayContentService?.setupAutofillOverlayListenerOnField(
element,
- autofillFieldBase
+ autofillFieldBase,
);
return autofillFieldBase;
}
@@ -397,7 +397,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
private getAttributeBoolean(
element: ElementWithOpId,
attributeName: string,
- checkString = false
+ checkString = false,
): boolean {
if (checkString) {
return this.getPropertyOrAttribute(element, attributeName) === "true";
@@ -415,7 +415,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
*/
private getAttributeLowerCase(
element: ElementWithOpId,
- attributeName: string
+ attributeName: string,
): string {
return this.getPropertyOrAttribute(element, attributeName)?.toLowerCase();
}
@@ -479,7 +479,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
* @private
*/
private queryElementLabels(
- element: FillableFormFieldElement
+ element: FillableFormFieldElement,
): NodeListOf | null {
let labelQuerySelectors = element.id ? `label[for="${element.id}"]` : "";
if (element.name) {
@@ -494,7 +494,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
}
return (element.getRootNode() as Document | ShadowRoot).querySelectorAll(
- labelQuerySelectors.replace(/\n/g, "")
+ labelQuerySelectors.replace(/\n/g, ""),
);
}
@@ -645,7 +645,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
}
return this.trimAndRemoveNonPrintableText(
- element.textContent || (element as HTMLElement).innerText
+ element.textContent || (element as HTMLElement).innerText,
);
}
@@ -869,7 +869,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
rootNode: Node,
treeWalkerQueryResults: Node[],
filterCallback: CallableFunction,
- isObservingShadowRoot: boolean
+ isObservingShadowRoot: boolean,
) {
const treeWalker = document?.createTreeWalker(rootNode, NodeFilter.SHOW_ELEMENT);
let currentNode = treeWalker?.currentNode;
@@ -893,7 +893,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
nodeShadowRoot,
treeWalkerQueryResults,
filterCallback,
- isObservingShadowRoot
+ isObservingShadowRoot,
);
}
@@ -1002,7 +1002,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
const childNodes = this.queryAllTreeWalkerNodes(
node,
- (node: Node) => node instanceof HTMLFormElement || this.isNodeFormFieldElement(node)
+ (node: Node) => node instanceof HTMLFormElement || this.isNodeFormFieldElement(node),
) as HTMLElement[];
if (childNodes.length) {
isElementMutated = true;
@@ -1014,7 +1014,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
const node = mutatedElements[elementIndex];
if (isRemovingNodes) {
this.deleteCachedAutofillElement(
- node as ElementWithOpId | ElementWithOpId
+ node as ElementWithOpId | ElementWithOpId,
);
continue;
}
@@ -1040,7 +1040,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
* @private
*/
private deleteCachedAutofillElement(
- element: ElementWithOpId | ElementWithOpId
+ element: ElementWithOpId | ElementWithOpId,
) {
if (element instanceof HTMLFormElement && this.autofillFormElements.has(element)) {
this.autofillFormElements.delete(element);
@@ -1064,7 +1064,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
this.updateAutofillElementsAfterMutationTimeout = setTimeout(
this.getPageDetails.bind(this),
- this.updateAfterMutationTimeoutDelay
+ this.updateAfterMutationTimeoutDelay,
);
}
@@ -1081,21 +1081,21 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
const attributeName = mutation.attributeName?.toLowerCase();
const autofillForm = this.autofillFormElements.get(
- targetElement as ElementWithOpId
+ targetElement as ElementWithOpId,
);
if (autofillForm) {
this.updateAutofillFormElementData(
attributeName,
targetElement as ElementWithOpId,
- autofillForm
+ autofillForm,
);
return;
}
const autofillField = this.autofillFieldElements.get(
- targetElement as ElementWithOpId
+ targetElement as ElementWithOpId,
);
if (!autofillField) {
return;
@@ -1104,7 +1104,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
this.updateAutofillFieldElementData(
attributeName,
targetElement as ElementWithOpId,
- autofillField
+ autofillField,
);
}
@@ -1118,7 +1118,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
private updateAutofillFormElementData(
attributeName: string,
element: ElementWithOpId,
- dataTarget: AutofillForm
+ dataTarget: AutofillForm,
) {
const updateAttribute = (dataTargetKey: string) => {
this.updateAutofillDataAttribute({ element, attributeName, dataTarget, dataTargetKey });
@@ -1149,7 +1149,7 @@ class CollectAutofillContentService implements CollectAutofillContentServiceInte
private async updateAutofillFieldElementData(
attributeName: string,
element: ElementWithOpId,
- dataTarget: AutofillField
+ dataTarget: AutofillField,
) {
const updateAttribute = (dataTargetKey: string) => {
this.updateAutofillDataAttribute({ element, attributeName, dataTarget, dataTargetKey });
diff --git a/apps/browser/src/autofill/services/dom-element-visibility.service.spec.ts b/apps/browser/src/autofill/services/dom-element-visibility.service.spec.ts
index e17783b7a65..1fb1f969b53 100644
--- a/apps/browser/src/autofill/services/dom-element-visibility.service.spec.ts
+++ b/apps/browser/src/autofill/services/dom-element-visibility.service.spec.ts
@@ -47,19 +47,18 @@ describe("DomElementVisibilityService", () => {
jest.spyOn(domElementVisibilityService, "isElementHiddenByCss");
jest.spyOn(domElementVisibilityService as any, "formFieldIsNotHiddenBehindAnotherElement");
- const isFormFieldViewable = await domElementVisibilityService.isFormFieldViewable(
- usernameElement
- );
+ const isFormFieldViewable =
+ await domElementVisibilityService.isFormFieldViewable(usernameElement);
expect(isFormFieldViewable).toEqual(false);
expect(usernameElement.getBoundingClientRect).toHaveBeenCalled();
expect(domElementVisibilityService["isElementOutsideViewportBounds"]).toHaveBeenCalledWith(
usernameElement,
- usernameElement.getBoundingClientRect()
+ usernameElement.getBoundingClientRect(),
);
expect(domElementVisibilityService["isElementHiddenByCss"]).not.toHaveBeenCalled();
expect(
- domElementVisibilityService["formFieldIsNotHiddenBehindAnotherElement"]
+ domElementVisibilityService["formFieldIsNotHiddenBehindAnotherElement"],
).not.toHaveBeenCalled();
});
@@ -72,21 +71,20 @@ describe("DomElementVisibilityService", () => {
jest.spyOn(domElementVisibilityService, "isElementHiddenByCss").mockReturnValueOnce(true);
jest.spyOn(domElementVisibilityService as any, "formFieldIsNotHiddenBehindAnotherElement");
- const isFormFieldViewable = await domElementVisibilityService.isFormFieldViewable(
- usernameElement
- );
+ const isFormFieldViewable =
+ await domElementVisibilityService.isFormFieldViewable(usernameElement);
expect(isFormFieldViewable).toEqual(false);
expect(usernameElement.getBoundingClientRect).toHaveBeenCalled();
expect(domElementVisibilityService["isElementOutsideViewportBounds"]).toHaveBeenCalledWith(
usernameElement,
- usernameElement.getBoundingClientRect()
+ usernameElement.getBoundingClientRect(),
);
expect(domElementVisibilityService["isElementHiddenByCss"]).toHaveBeenCalledWith(
- usernameElement
+ usernameElement,
);
expect(
- domElementVisibilityService["formFieldIsNotHiddenBehindAnotherElement"]
+ domElementVisibilityService["formFieldIsNotHiddenBehindAnotherElement"],
).not.toHaveBeenCalled();
});
@@ -101,21 +99,20 @@ describe("DomElementVisibilityService", () => {
.spyOn(domElementVisibilityService as any, "formFieldIsNotHiddenBehindAnotherElement")
.mockReturnValueOnce(false);
- const isFormFieldViewable = await domElementVisibilityService.isFormFieldViewable(
- usernameElement
- );
+ const isFormFieldViewable =
+ await domElementVisibilityService.isFormFieldViewable(usernameElement);
expect(isFormFieldViewable).toEqual(false);
expect(usernameElement.getBoundingClientRect).toHaveBeenCalled();
expect(domElementVisibilityService["isElementOutsideViewportBounds"]).toHaveBeenCalledWith(
usernameElement,
- usernameElement.getBoundingClientRect()
+ usernameElement.getBoundingClientRect(),
);
expect(domElementVisibilityService["isElementHiddenByCss"]).toHaveBeenCalledWith(
- usernameElement
+ usernameElement,
);
expect(
- domElementVisibilityService["formFieldIsNotHiddenBehindAnotherElement"]
+ domElementVisibilityService["formFieldIsNotHiddenBehindAnotherElement"],
).toHaveBeenCalledWith(usernameElement, usernameElement.getBoundingClientRect());
});
@@ -130,21 +127,20 @@ describe("DomElementVisibilityService", () => {
.spyOn(domElementVisibilityService as any, "formFieldIsNotHiddenBehindAnotherElement")
.mockReturnValueOnce(true);
- const isFormFieldViewable = await domElementVisibilityService.isFormFieldViewable(
- usernameElement
- );
+ const isFormFieldViewable =
+ await domElementVisibilityService.isFormFieldViewable(usernameElement);
expect(isFormFieldViewable).toEqual(true);
expect(usernameElement.getBoundingClientRect).toHaveBeenCalled();
expect(domElementVisibilityService["isElementOutsideViewportBounds"]).toHaveBeenCalledWith(
usernameElement,
- usernameElement.getBoundingClientRect()
+ usernameElement.getBoundingClientRect(),
);
expect(domElementVisibilityService["isElementHiddenByCss"]).toHaveBeenCalledWith(
- usernameElement
+ usernameElement,
);
expect(
- domElementVisibilityService["formFieldIsNotHiddenBehindAnotherElement"]
+ domElementVisibilityService["formFieldIsNotHiddenBehindAnotherElement"],
).toHaveBeenCalledWith(usernameElement, usernameElement.getBoundingClientRect());
});
});
@@ -186,12 +182,12 @@ describe("DomElementVisibilityService", () => {
expect(isUsernameElementHidden).toEqual(true);
expect(usernameElement.style.getPropertyValue).toHaveBeenCalled();
expect(usernameElement.ownerDocument.defaultView.getComputedStyle).toHaveBeenCalledWith(
- usernameElement
+ usernameElement,
);
expect(isPasswordElementHidden).toEqual(true);
expect(passwordElement.style.getPropertyValue).toHaveBeenCalled();
expect(passwordElement.ownerDocument.defaultView.getComputedStyle).toHaveBeenCalledWith(
- passwordElement
+ passwordElement,
);
});
@@ -391,7 +387,7 @@ describe("DomElementVisibilityService", () => {
expect(formFieldIsNotHiddenBehindAnotherElement).toEqual(true);
expect(document.elementFromPoint).toHaveBeenCalledWith(
mockBoundingRect.left + mockBoundingRect.width / 2,
- mockBoundingRect.top + mockBoundingRect.height / 2
+ mockBoundingRect.top + mockBoundingRect.height / 2,
);
expect(usernameElement.getBoundingClientRect).not.toHaveBeenCalled();
});
diff --git a/apps/browser/src/autofill/services/dom-element-visibility.service.ts b/apps/browser/src/autofill/services/dom-element-visibility.service.ts
index 2797ee0eb3d..acc5b120596 100644
--- a/apps/browser/src/autofill/services/dom-element-visibility.service.ts
+++ b/apps/browser/src/autofill/services/dom-element-visibility.service.ts
@@ -67,7 +67,7 @@ class DomElementVisibilityService implements domElementVisibilityServiceInterfac
private getElementStyle(element: HTMLElement, styleProperty: string): string {
if (!this.cachedComputedStyle) {
this.cachedComputedStyle = (element.ownerDocument.defaultView || window).getComputedStyle(
- element
+ element,
);
}
@@ -132,7 +132,7 @@ class DomElementVisibilityService implements domElementVisibilityServiceInterfac
*/
private isElementOutsideViewportBounds(
targetElement: HTMLElement,
- targetElementBoundingClientRect: DOMRectReadOnly | null = null
+ targetElementBoundingClientRect: DOMRectReadOnly | null = null,
): boolean {
const documentElement = targetElement.ownerDocument.documentElement;
const documentElementWidth = documentElement.scrollWidth;
@@ -171,7 +171,7 @@ class DomElementVisibilityService implements domElementVisibilityServiceInterfac
*/
private formFieldIsNotHiddenBehindAnotherElement(
targetElement: FormFieldElement,
- targetElementBoundingClientRect: DOMRectReadOnly | null = null
+ targetElementBoundingClientRect: DOMRectReadOnly | null = null,
): boolean {
const elementBoundingClientRect =
targetElementBoundingClientRect || targetElement.getBoundingClientRect();
@@ -180,7 +180,7 @@ class DomElementVisibilityService implements domElementVisibilityServiceInterfac
elementRootNode instanceof ShadowRoot ? elementRootNode : targetElement.ownerDocument;
const elementAtCenterPoint = rootElement.elementFromPoint(
elementBoundingClientRect.left + elementBoundingClientRect.width / 2,
- elementBoundingClientRect.top + elementBoundingClientRect.height / 2
+ elementBoundingClientRect.top + elementBoundingClientRect.height / 2,
);
if (elementAtCenterPoint === targetElement) {
diff --git a/apps/browser/src/autofill/services/insert-autofill-content.service.spec.ts b/apps/browser/src/autofill/services/insert-autofill-content.service.spec.ts
index b6739db36a2..a3173204c97 100644
--- a/apps/browser/src/autofill/services/insert-autofill-content.service.spec.ts
+++ b/apps/browser/src/autofill/services/insert-autofill-content.service.spec.ts
@@ -41,8 +41,8 @@ const initEventCount = Object.freeze(
...eventCounts,
[eventName]: 0,
}),
- {}
- )
+ {},
+ ),
);
let confirmSpy: jest.SpyInstance;
@@ -68,7 +68,7 @@ describe("InsertAutofillContentService", () => {
const autofillOverlayContentService = new AutofillOverlayContentService();
const collectAutofillContentService = new CollectAutofillContentService(
domElementVisibilityService,
- autofillOverlayContentService
+ autofillOverlayContentService,
);
let insertAutofillContentService: InsertAutofillContentService;
let fillScript: AutofillScript;
@@ -79,7 +79,7 @@ describe("InsertAutofillContentService", () => {
windowSpy = jest.spyOn(window, "window", "get");
insertAutofillContentService = new InsertAutofillContentService(
domElementVisibilityService,
- collectAutofillContentService
+ collectAutofillContentService,
);
fillScript = {
script: [
@@ -117,10 +117,10 @@ describe("InsertAutofillContentService", () => {
expect(insertAutofillContentService["fillingWithinSandboxedIframe"]).not.toHaveBeenCalled();
expect(
- insertAutofillContentService["userCancelledInsecureUrlAutofill"]
+ insertAutofillContentService["userCancelledInsecureUrlAutofill"],
).not.toHaveBeenCalled();
expect(
- insertAutofillContentService["userCancelledUntrustedIframeAutofill"]
+ insertAutofillContentService["userCancelledUntrustedIframeAutofill"],
).not.toHaveBeenCalled();
expect(insertAutofillContentService["runFillScriptAction"]).not.toHaveBeenCalled();
});
@@ -137,10 +137,10 @@ describe("InsertAutofillContentService", () => {
expect(insertAutofillContentService["fillingWithinSandboxedIframe"]).toHaveBeenCalled();
expect(
- insertAutofillContentService["userCancelledInsecureUrlAutofill"]
+ insertAutofillContentService["userCancelledInsecureUrlAutofill"],
).not.toHaveBeenCalled();
expect(
- insertAutofillContentService["userCancelledUntrustedIframeAutofill"]
+ insertAutofillContentService["userCancelledUntrustedIframeAutofill"],
).not.toHaveBeenCalled();
expect(insertAutofillContentService["runFillScriptAction"]).not.toHaveBeenCalled();
});
@@ -160,7 +160,7 @@ describe("InsertAutofillContentService", () => {
expect(insertAutofillContentService["fillingWithinSandboxedIframe"]).toHaveBeenCalled();
expect(insertAutofillContentService["userCancelledInsecureUrlAutofill"]).toHaveBeenCalled();
expect(
- insertAutofillContentService["userCancelledUntrustedIframeAutofill"]
+ insertAutofillContentService["userCancelledUntrustedIframeAutofill"],
).not.toHaveBeenCalled();
expect(insertAutofillContentService["runFillScriptAction"]).not.toHaveBeenCalled();
});
@@ -182,7 +182,7 @@ describe("InsertAutofillContentService", () => {
expect(insertAutofillContentService["fillingWithinSandboxedIframe"]).toHaveBeenCalled();
expect(insertAutofillContentService["userCancelledInsecureUrlAutofill"]).toHaveBeenCalled();
expect(
- insertAutofillContentService["userCancelledUntrustedIframeAutofill"]
+ insertAutofillContentService["userCancelledUntrustedIframeAutofill"],
).toHaveBeenCalled();
expect(insertAutofillContentService["runFillScriptAction"]).not.toHaveBeenCalled();
});
@@ -204,26 +204,26 @@ describe("InsertAutofillContentService", () => {
expect(insertAutofillContentService["fillingWithinSandboxedIframe"]).toHaveBeenCalled();
expect(insertAutofillContentService["userCancelledInsecureUrlAutofill"]).toHaveBeenCalled();
expect(
- insertAutofillContentService["userCancelledUntrustedIframeAutofill"]
+ insertAutofillContentService["userCancelledUntrustedIframeAutofill"],
).toHaveBeenCalled();
expect(insertAutofillContentService["runFillScriptAction"]).toHaveBeenCalledTimes(3);
expect(insertAutofillContentService["runFillScriptAction"]).toHaveBeenNthCalledWith(
1,
fillScript.script[0],
0,
- fillScript.script
+ fillScript.script,
);
expect(insertAutofillContentService["runFillScriptAction"]).toHaveBeenNthCalledWith(
2,
fillScript.script[1],
1,
- fillScript.script
+ fillScript.script,
);
expect(insertAutofillContentService["runFillScriptAction"]).toHaveBeenNthCalledWith(
3,
fillScript.script[2],
2,
- fillScript.script
+ fillScript.script,
);
});
});
@@ -432,7 +432,7 @@ describe("InsertAutofillContentService", () => {
jest.advanceTimersByTime(20);
expect(
- insertAutofillContentService["autofillInsertActions"][action]
+ insertAutofillContentService["autofillInsertActions"][action],
).toHaveBeenCalledWith({
opid,
value,
@@ -451,18 +451,18 @@ describe("InsertAutofillContentService", () => {
textInput.value = value;
jest.spyOn(
insertAutofillContentService["collectAutofillContentService"],
- "getAutofillFieldElementByOpid"
+ "getAutofillFieldElementByOpid",
);
jest.spyOn(insertAutofillContentService as any, "insertValueIntoField");
insertAutofillContentService["handleFillFieldByOpidAction"](opid, value);
expect(
- insertAutofillContentService["collectAutofillContentService"].getAutofillFieldElementByOpid
+ insertAutofillContentService["collectAutofillContentService"].getAutofillFieldElementByOpid,
).toHaveBeenCalledWith(opid);
expect(insertAutofillContentService["insertValueIntoField"]).toHaveBeenCalledWith(
textInput,
- value
+ value,
);
});
});
@@ -483,17 +483,17 @@ describe("InsertAutofillContentService", () => {
textInput.addEventListener("click", clickEventHandler);
jest.spyOn(
insertAutofillContentService["collectAutofillContentService"],
- "getAutofillFieldElementByOpid"
+ "getAutofillFieldElementByOpid",
);
jest.spyOn(insertAutofillContentService as any, "triggerClickOnElement");
insertAutofillContentService["handleClickOnFieldByOpidAction"]("__1");
expect(
- insertAutofillContentService["collectAutofillContentService"].getAutofillFieldElementByOpid
+ insertAutofillContentService["collectAutofillContentService"].getAutofillFieldElementByOpid,
).toBeCalledWith("__1");
expect((insertAutofillContentService as any)["triggerClickOnElement"]).toHaveBeenCalledWith(
- textInput
+ textInput,
);
expect(clickEventCount).toBe(expectedClickEventCount);
@@ -544,20 +544,20 @@ describe("InsertAutofillContentService", () => {
});
jest.spyOn(
insertAutofillContentService["collectAutofillContentService"],
- "getAutofillFieldElementByOpid"
+ "getAutofillFieldElementByOpid",
);
jest.spyOn(
insertAutofillContentService as any,
- "simulateUserMouseClickAndFocusEventInteractions"
+ "simulateUserMouseClickAndFocusEventInteractions",
);
insertAutofillContentService["handleFocusOnFieldByOpidAction"]("__0");
expect(
- insertAutofillContentService["collectAutofillContentService"].getAutofillFieldElementByOpid
+ insertAutofillContentService["collectAutofillContentService"].getAutofillFieldElementByOpid,
).toBeCalledWith("__0");
expect(
- insertAutofillContentService["simulateUserMouseClickAndFocusEventInteractions"]
+ insertAutofillContentService["simulateUserMouseClickAndFocusEventInteractions"],
).toHaveBeenCalledWith(targetInput, true);
expect(elementEventCount).toEqual(expectedElementEventCount);
});
@@ -572,7 +572,7 @@ describe("InsertAutofillContentService", () => {
insertAutofillContentService["insertValueIntoField"](element, value);
expect(
- insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"]
+ insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"],
).not.toHaveBeenCalled();
});
@@ -584,7 +584,7 @@ describe("InsertAutofillContentService", () => {
insertAutofillContentService["insertValueIntoField"](element, value);
expect(
- insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"]
+ insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"],
).not.toHaveBeenCalled();
});
@@ -598,7 +598,7 @@ describe("InsertAutofillContentService", () => {
expect(element.innerText).toBe(value);
expect(
- insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"]
+ insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"],
).toHaveBeenCalledWith(element, expect.any(Function));
});
@@ -616,10 +616,10 @@ describe("InsertAutofillContentService", () => {
expect(checkboxElement.checked).toBe(true);
expect(radioElement.checked).toBe(true);
expect(
- insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"]
+ insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"],
).toHaveBeenCalledWith(checkboxElement, expect.any(Function));
expect(
- insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"]
+ insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"],
).toHaveBeenCalledWith(radioElement, expect.any(Function));
checkboxElement.checked = false;
@@ -641,14 +641,14 @@ describe("InsertAutofillContentService", () => {
expect(textInputElement.value).toBe(value1);
expect(
- insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"]
+ insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"],
).toHaveBeenCalledWith(textInputElement, expect.any(Function));
insertAutofillContentService["insertValueIntoField"](textareaElement, value2);
expect(textareaElement.value).toBe(value2);
expect(
- insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"]
+ insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"],
).toHaveBeenCalledWith(textareaElement, expect.any(Function));
});
});
@@ -661,23 +661,23 @@ describe("InsertAutofillContentService", () => {
jest.spyOn(insertAutofillContentService as any, "triggerPostInsertEventsOnElement");
jest.spyOn(insertAutofillContentService as any, "triggerFillAnimationOnElement");
const valueChangeCallback = jest.fn(
- () => ((element as FillableFormFieldElement).value = value)
+ () => ((element as FillableFormFieldElement).value = value),
);
insertAutofillContentService["handleInsertValueAndTriggerSimulatedEvents"](
element,
- valueChangeCallback
+ valueChangeCallback,
);
expect(insertAutofillContentService["triggerPreInsertEventsOnElement"]).toHaveBeenCalledWith(
- element
+ element,
);
expect(valueChangeCallback).toHaveBeenCalled();
expect(insertAutofillContentService["triggerPostInsertEventsOnElement"]).toHaveBeenCalledWith(
- element
+ element,
);
expect(insertAutofillContentService["triggerFillAnimationOnElement"]).toHaveBeenCalledWith(
- element
+ element,
);
expect((element as FillableFormFieldElement).value).toBe(value);
});
@@ -690,17 +690,17 @@ describe("InsertAutofillContentService", () => {
const element = document.getElementById("username") as FillableFormFieldElement;
jest.spyOn(
insertAutofillContentService as any,
- "simulateUserMouseClickAndFocusEventInteractions"
+ "simulateUserMouseClickAndFocusEventInteractions",
);
jest.spyOn(insertAutofillContentService as any, "simulateUserKeyboardEventInteractions");
insertAutofillContentService["triggerPreInsertEventsOnElement"](element);
expect(
- insertAutofillContentService["simulateUserMouseClickAndFocusEventInteractions"]
+ insertAutofillContentService["simulateUserMouseClickAndFocusEventInteractions"],
).toHaveBeenCalledWith(element);
expect(
- insertAutofillContentService["simulateUserKeyboardEventInteractions"]
+ insertAutofillContentService["simulateUserKeyboardEventInteractions"],
).toHaveBeenCalledWith(element);
expect(element.value).toBe(initialElementValue);
});
@@ -718,10 +718,10 @@ describe("InsertAutofillContentService", () => {
insertAutofillContentService["triggerPostInsertEventsOnElement"](element);
expect(
- insertAutofillContentService["simulateUserKeyboardEventInteractions"]
+ insertAutofillContentService["simulateUserKeyboardEventInteractions"],
).toHaveBeenCalledWith(element);
expect(insertAutofillContentService["simulateInputElementChangedEvent"]).toHaveBeenCalledWith(
- element
+ element,
);
expect(element.blur).toHaveBeenCalled();
expect(element.value).toBe(elementValue);
@@ -738,7 +738,7 @@ describe("InsertAutofillContentService", () => {
it("the element is a non-hidden hidden input type", async () => {
document.body.innerHTML = mockLoginForm + '';
const testElement = document.querySelector(
- 'input[type="hidden"]'
+ 'input[type="hidden"]',
) as FillableFormFieldElement;
jest.spyOn(testElement.classList, "add");
jest.spyOn(testElement.classList, "remove");
@@ -778,7 +778,7 @@ describe("InsertAutofillContentService", () => {
it("the element has a `visibility: hidden;` CSS rule applied to it", () => {
const testElement = document.querySelector(
- 'input[type="password"]'
+ 'input[type="password"]',
) as FillableFormFieldElement;
testElement.style.visibility = "hidden";
jest.spyOn(testElement.classList, "add");
@@ -793,7 +793,7 @@ describe("InsertAutofillContentService", () => {
it("the element has a `display: none;` CSS rule applied to it", () => {
const testElement = document.querySelector(
- 'input[type="password"]'
+ 'input[type="password"]',
) as FillableFormFieldElement;
testElement.style.display = "none";
jest.spyOn(testElement.classList, "add");
@@ -810,7 +810,7 @@ describe("InsertAutofillContentService", () => {
document.body.innerHTML =
mockLoginForm + '';
const testElement = document.querySelector(
- 'input[type="email"]'
+ 'input[type="email"]',
) as FillableFormFieldElement;
jest.spyOn(testElement.classList, "add");
jest.spyOn(testElement.classList, "remove");
@@ -826,11 +826,11 @@ describe("InsertAutofillContentService", () => {
describe("will trigger the animation when...", () => {
it("the element is a non-hidden password field", () => {
const testElement = document.querySelector(
- 'input[type="password"]'
+ 'input[type="password"]',
) as FillableFormFieldElement;
jest.spyOn(
insertAutofillContentService["domElementVisibilityService"],
- "isElementHiddenByCss"
+ "isElementHiddenByCss",
);
jest.spyOn(testElement.classList, "add");
jest.spyOn(testElement.classList, "remove");
@@ -839,20 +839,20 @@ describe("InsertAutofillContentService", () => {
jest.advanceTimersByTime(200);
expect(
- insertAutofillContentService["domElementVisibilityService"].isElementHiddenByCss
+ insertAutofillContentService["domElementVisibilityService"].isElementHiddenByCss,
).toHaveBeenCalledWith(testElement);
expect(testElement.classList.add).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
expect(testElement.classList.remove).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
});
it("the element is a non-hidden email input", () => {
document.body.innerHTML = mockLoginForm + '';
const testElement = document.querySelector(
- 'input[type="email"]'
+ 'input[type="email"]',
) as FillableFormFieldElement;
jest.spyOn(testElement.classList, "add");
jest.spyOn(testElement.classList, "remove");
@@ -861,17 +861,17 @@ describe("InsertAutofillContentService", () => {
jest.advanceTimersByTime(200);
expect(testElement.classList.add).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
expect(testElement.classList.remove).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
});
it("the element is a non-hidden text input", () => {
document.body.innerHTML = mockLoginForm + '';
const testElement = document.querySelector(
- 'input[type="text"]'
+ 'input[type="text"]',
) as FillableFormFieldElement;
jest.spyOn(testElement.classList, "add");
jest.spyOn(testElement.classList, "remove");
@@ -880,17 +880,17 @@ describe("InsertAutofillContentService", () => {
jest.advanceTimersByTime(200);
expect(testElement.classList.add).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
expect(testElement.classList.remove).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
});
it("the element is a non-hidden number input", () => {
document.body.innerHTML = mockLoginForm + '';
const testElement = document.querySelector(
- 'input[type="number"]'
+ 'input[type="number"]',
) as FillableFormFieldElement;
jest.spyOn(testElement.classList, "add");
jest.spyOn(testElement.classList, "remove");
@@ -899,10 +899,10 @@ describe("InsertAutofillContentService", () => {
jest.advanceTimersByTime(200);
expect(testElement.classList.add).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
expect(testElement.classList.remove).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
});
@@ -916,10 +916,10 @@ describe("InsertAutofillContentService", () => {
jest.advanceTimersByTime(200);
expect(testElement.classList.add).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
expect(testElement.classList.remove).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
});
@@ -933,10 +933,10 @@ describe("InsertAutofillContentService", () => {
jest.advanceTimersByTime(200);
expect(testElement.classList.add).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
expect(testElement.classList.remove).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
});
@@ -950,10 +950,10 @@ describe("InsertAutofillContentService", () => {
jest.advanceTimersByTime(200);
expect(testElement.classList.add).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
expect(testElement.classList.remove).toHaveBeenCalledWith(
- "com-bitwarden-browser-animated-fill"
+ "com-bitwarden-browser-animated-fill",
);
});
});
@@ -1009,11 +1009,11 @@ describe("InsertAutofillContentService", () => {
insertAutofillContentService["simulateUserMouseClickAndFocusEventInteractions"](inputElement);
expect(insertAutofillContentService["triggerClickOnElement"]).toHaveBeenCalledWith(
- inputElement
+ inputElement,
);
expect(insertAutofillContentService["triggerFocusOnElement"]).toHaveBeenCalledWith(
inputElement,
- false
+ false,
);
});
});
@@ -1027,7 +1027,7 @@ describe("InsertAutofillContentService", () => {
[EVENTS.KEYDOWN, EVENTS.KEYPRESS, EVENTS.KEYUP].forEach((eventName) => {
expect(inputElement.dispatchEvent).toHaveBeenCalledWith(
- new KeyboardEvent(eventName, { bubbles: true })
+ new KeyboardEvent(eventName, { bubbles: true }),
);
});
});
@@ -1042,7 +1042,7 @@ describe("InsertAutofillContentService", () => {
[EVENTS.INPUT, EVENTS.CHANGE].forEach((eventName) => {
expect(inputElement.dispatchEvent).toHaveBeenCalledWith(
- new Event(eventName, { bubbles: true })
+ new Event(eventName, { bubbles: true }),
);
});
});
diff --git a/apps/browser/src/autofill/services/insert-autofill-content.service.ts b/apps/browser/src/autofill/services/insert-autofill-content.service.ts
index 11a2d7fc71e..3d95de0767c 100644
--- a/apps/browser/src/autofill/services/insert-autofill-content.service.ts
+++ b/apps/browser/src/autofill/services/insert-autofill-content.service.ts
@@ -21,7 +21,7 @@ class InsertAutofillContentService implements InsertAutofillContentServiceInterf
*/
constructor(
domElementVisibilityService: DomElementVisibilityService,
- collectAutofillContentService: CollectAutofillContentService
+ collectAutofillContentService: CollectAutofillContentService,
) {
this.domElementVisibilityService = domElementVisibilityService;
this.collectAutofillContentService = collectAutofillContentService;
@@ -97,8 +97,8 @@ class InsertAutofillContentService implements InsertAutofillContentServiceInterf
this.collectAutofillContentService.queryAllTreeWalkerNodes(
document.documentElement,
(node: Node) => node instanceof HTMLInputElement && node.type === "password",
- false
- )?.length
+ false,
+ )?.length,
);
}
@@ -139,7 +139,7 @@ class InsertAutofillContentService implements InsertAutofillContentServiceInterf
*/
private runFillScriptAction = (
[action, opid, value]: FillScript,
- actionIndex: number
+ actionIndex: number,
): Promise => {
if (!opid || !this.autofillInsertActions[action]) {
return;
@@ -150,7 +150,7 @@ class InsertAutofillContentService implements InsertAutofillContentServiceInterf
setTimeout(() => {
this.autofillInsertActions[action]({ opid, value });
resolve();
- }, delayActionsInMilliseconds * actionIndex)
+ }, delayActionsInMilliseconds * actionIndex),
);
};
@@ -233,7 +233,7 @@ class InsertAutofillContentService implements InsertAutofillContentServiceInterf
*/
private handleInsertValueAndTriggerSimulatedEvents(
element: FormFieldElement,
- valueChangeCallback: CallableFunction
+ valueChangeCallback: CallableFunction,
): void {
this.triggerPreInsertEventsOnElement(element);
valueChangeCallback();
@@ -341,7 +341,7 @@ class InsertAutofillContentService implements InsertAutofillContentServiceInterf
*/
private simulateUserMouseClickAndFocusEventInteractions(
element: FormFieldElement,
- shouldResetValue = false
+ shouldResetValue = false,
): void {
this.triggerClickOnElement(element);
this.triggerFocusOnElement(element, shouldResetValue);
diff --git a/apps/browser/src/autofill/utils/utils.spec.ts b/apps/browser/src/autofill/utils/utils.spec.ts
index 43c3ef03ae5..1da83fef242 100644
--- a/apps/browser/src/autofill/utils/utils.spec.ts
+++ b/apps/browser/src/autofill/utils/utils.spec.ts
@@ -52,7 +52,7 @@ describe("setElementStyles", () => {
const domParser = new DOMParser();
const testDivDOM = domParser.parseFromString(
"This is an unexciting div.
",
- "text/html"
+ "text/html",
);
const testDiv = testDivDOM.querySelector("div");
@@ -67,7 +67,7 @@ describe("setElementStyles", () => {
const domParser = new DOMParser();
const testDivDOM = domParser.parseFromString(
"This is an unexciting div.
",
- "text/html"
+ "text/html",
);
const testDiv = testDivDOM.querySelector("div");
@@ -82,7 +82,7 @@ describe("setElementStyles", () => {
const domParser = new DOMParser();
const testDivDOM = domParser.parseFromString(
"This is an unexciting div.
",
- "text/html"
+ "text/html",
);
const testDiv = testDivDOM.querySelector("div");
@@ -101,7 +101,7 @@ describe("setElementStyles", () => {
const domParser = new DOMParser();
const testDivDOM = domParser.parseFromString(
"This is an unexciting div.
",
- "text/html"
+ "text/html",
);
const testDiv = testDivDOM.querySelector("div");
diff --git a/apps/browser/src/autofill/utils/utils.ts b/apps/browser/src/autofill/utils/utils.ts
index 8f953fb01b9..73e133da32c 100644
--- a/apps/browser/src/autofill/utils/utils.ts
+++ b/apps/browser/src/autofill/utils/utils.ts
@@ -65,7 +65,7 @@ function buildSvgDomElement(svgString: string, ariaHidden = true): HTMLElement {
*/
async function sendExtensionMessage(
command: string,
- options: Record = {}
+ options: Record = {},
): Promise {
return new Promise((resolve) => {
chrome.runtime.sendMessage(Object.assign({ command }, options), (response) => {
@@ -88,7 +88,7 @@ async function sendExtensionMessage(
function setElementStyles(
element: HTMLElement,
styles: Partial,
- priority?: boolean
+ priority?: boolean,
) {
if (!element || !styles || !Object.keys(styles).length) {
return;
@@ -98,7 +98,7 @@ function setElementStyles(
element.style.setProperty(
styleProperty.replace(/([a-z])([A-Z])/g, "$1-$2"), // Convert camelCase to kebab-case
styles[styleProperty],
- priority ? "important" : undefined
+ priority ? "important" : undefined,
);
}
}
diff --git a/apps/browser/src/background/commands.background.ts b/apps/browser/src/background/commands.background.ts
index 210119aa5f2..0ea662048ca 100644
--- a/apps/browser/src/background/commands.background.ts
+++ b/apps/browser/src/background/commands.background.ts
@@ -19,7 +19,7 @@ export default class CommandsBackground {
private passwordGenerationService: PasswordGenerationServiceAbstraction,
private platformUtilsService: PlatformUtilsService,
private vaultTimeoutService: VaultTimeoutService,
- private authService: AuthService
+ private authService: AuthService,
) {
this.isSafari = this.platformUtilsService.isSafari();
this.isVivaldi = this.platformUtilsService.isVivaldi();
@@ -85,7 +85,7 @@ export default class CommandsBackground {
await BrowserApi.tabSendMessageData(
tab,
"addToLockedVaultPendingNotifications",
- retryMessage
+ retryMessage,
);
await openUnlockPopout(tab);
diff --git a/apps/browser/src/background/idle.background.ts b/apps/browser/src/background/idle.background.ts
index 7200301c795..ccc76883b11 100644
--- a/apps/browser/src/background/idle.background.ts
+++ b/apps/browser/src/background/idle.background.ts
@@ -14,7 +14,7 @@ export default class IdleBackground {
constructor(
private vaultTimeoutService: VaultTimeoutService,
private stateService: BrowserStateService,
- private notificationsService: NotificationsService
+ private notificationsService: NotificationsService,
) {
this.idle = chrome.idle || (browser != null ? browser.idle : null);
}
diff --git a/apps/browser/src/background/main.background.ts b/apps/browser/src/background/main.background.ts
index faf399aa34f..2b7b2b3f097 100644
--- a/apps/browser/src/background/main.background.ts
+++ b/apps/browser/src/background/main.background.ts
@@ -284,17 +284,17 @@ export default class MainBackground {
BrowserApi.manifestVersion === 3
? new LocalBackedSessionStorageService(
new EncryptServiceImplementation(this.cryptoFunctionService, this.logService, false),
- new KeyGenerationService(this.cryptoFunctionService)
+ new KeyGenerationService(this.cryptoFunctionService),
)
: new BackgroundMemoryStorageService();
this.globalStateProvider = new DefaultGlobalStateProvider(
this.memoryStorageService as BackgroundMemoryStorageService,
- this.storageService as BrowserLocalStorageService
+ this.storageService as BrowserLocalStorageService,
);
this.accountService = new AccountServiceImplementation(
this.messagingService,
this.logService,
- this.globalStateProvider
+ this.globalStateProvider,
);
this.stateService = new BrowserStateService(
this.storageService,
@@ -302,7 +302,7 @@ export default class MainBackground {
this.memoryStorageService,
this.logService,
new StateFactory(GlobalState, Account),
- this.accountService
+ this.accountService,
);
this.platformUtilsService = new BrowserPlatformUtilsService(
this.messagingService,
@@ -324,14 +324,14 @@ export default class MainBackground {
return promise.then((result) => result.response === "unlocked");
}
},
- window
+ window,
);
this.i18nService = new BrowserI18nService(BrowserApi.getUILanguage(), this.stateService);
this.encryptService = flagEnabled("multithreadDecryption")
? new MultithreadEncryptServiceImplementation(
this.cryptoFunctionService,
this.logService,
- true
+ true,
)
: new EncryptServiceImplementation(this.cryptoFunctionService, this.logService, true);
this.cryptoService = new BrowserCryptoService(
@@ -339,7 +339,7 @@ export default class MainBackground {
this.encryptService,
this.platformUtilsService,
this.logService,
- this.stateService
+ this.stateService,
);
this.tokenService = new TokenService(this.stateService);
this.appIdService = new AppIdService(this.storageService);
@@ -349,20 +349,20 @@ export default class MainBackground {
this.platformUtilsService,
this.environmentService,
this.appIdService,
- (expired: boolean) => this.logout(expired)
+ (expired: boolean) => this.logout(expired),
);
this.settingsService = new BrowserSettingsService(this.stateService);
this.fileUploadService = new FileUploadService(this.logService);
this.cipherFileUploadService = new CipherFileUploadService(
this.apiService,
- this.fileUploadService
+ this.fileUploadService,
);
this.searchService = new SearchService(this.logService, this.i18nService);
this.collectionService = new CollectionService(
this.cryptoService,
this.i18nService,
- this.stateService
+ this.stateService,
);
this.syncNotifierService = new SyncNotifierService();
this.organizationService = new BrowserOrganizationService(this.stateService);
@@ -370,7 +370,7 @@ export default class MainBackground {
this.policyApiService = new PolicyApiService(
this.policyService,
this.apiService,
- this.stateService
+ this.stateService,
);
this.keyConnectorService = new KeyConnectorService(
this.stateService,
@@ -380,7 +380,7 @@ export default class MainBackground {
this.logService,
this.organizationService,
this.cryptoFunctionService,
- logoutCallback
+ logoutCallback,
);
this.passwordStrengthService = new PasswordStrengthService();
@@ -388,7 +388,7 @@ export default class MainBackground {
this.passwordGenerationService = new PasswordGenerationService(
this.cryptoService,
this.policyService,
- this.stateService
+ this.stateService,
);
this.twoFactorService = new TwoFactorService(this.i18nService, this.platformUtilsService);
@@ -412,7 +412,7 @@ export default class MainBackground {
this.appIdService,
this.devicesApiService,
this.i18nService,
- this.platformUtilsService
+ this.platformUtilsService,
);
this.devicesService = new DevicesServiceImplementation(this.devicesApiService);
@@ -436,7 +436,7 @@ export default class MainBackground {
this.passwordStrengthService,
this.policyService,
this.deviceTrustCryptoService,
- this.authRequestCryptoService
+ this.authRequestCryptoService,
);
this.userVerificationApiService = new UserVerificationApiService(this.apiService);
@@ -445,7 +445,7 @@ export default class MainBackground {
this.stateService,
this.cryptoService,
this.i18nService,
- this.userVerificationApiService
+ this.userVerificationApiService,
);
this.configApiService = new ConfigApiService(this.apiService, this.authService);
@@ -456,7 +456,7 @@ export default class MainBackground {
this.authService,
this.environmentService,
this.logService,
- true
+ true,
);
this.cipherService = new CipherService(
@@ -468,13 +468,13 @@ export default class MainBackground {
this.stateService,
this.encryptService,
this.cipherFileUploadService,
- this.configService
+ this.configService,
);
this.folderService = new BrowserFolderService(
this.cryptoService,
this.i18nService,
this.cipherService,
- this.stateService
+ this.stateService,
);
this.folderApiService = new FolderApiService(this.folderService, this.apiService);
@@ -483,7 +483,7 @@ export default class MainBackground {
this.tokenService,
this.policyService,
this.stateService,
- this.userVerificationService
+ this.userVerificationService,
);
this.vaultFilterService = new VaultFilterService(
@@ -492,7 +492,7 @@ export default class MainBackground {
this.folderService,
this.cipherService,
this.collectionService,
- this.policyService
+ this.policyService,
);
this.vaultTimeoutService = new VaultTimeoutService(
@@ -507,19 +507,19 @@ export default class MainBackground {
this.authService,
this.vaultTimeoutSettingsService,
lockedCallback,
- logoutCallback
+ logoutCallback,
);
this.containerService = new ContainerService(this.cryptoService, this.encryptService);
this.sendService = new BrowserSendService(
this.cryptoService,
this.i18nService,
this.cryptoFunctionService,
- this.stateService
+ this.stateService,
);
this.sendApiService = new SendApiService(
this.apiService,
this.fileUploadService,
- this.sendService
+ this.sendService,
);
this.providerService = new ProviderService(this.stateService);
this.syncService = new SyncService(
@@ -539,18 +539,18 @@ export default class MainBackground {
this.folderApiService,
this.organizationService,
this.sendApiService,
- logoutCallback
+ logoutCallback,
);
this.eventUploadService = new EventUploadService(
this.apiService,
this.stateService,
- this.logService
+ this.logService,
);
this.eventCollectionService = new EventCollectionService(
this.cipherService,
this.stateService,
this.organizationService,
- this.eventUploadService
+ this.eventUploadService,
);
this.totpService = new TotpService(this.cryptoFunctionService, this.logService);
@@ -561,7 +561,7 @@ export default class MainBackground {
this.eventCollectionService,
this.logService,
this.settingsService,
- this.userVerificationService
+ this.userVerificationService,
);
this.auditService = new AuditService(this.cryptoFunctionService, this.apiService);
@@ -573,7 +573,7 @@ export default class MainBackground {
this.importApiService,
this.i18nService,
this.collectionService,
- this.cryptoService
+ this.cryptoService,
);
this.exportService = new VaultExportService(
@@ -582,7 +582,7 @@ export default class MainBackground {
this.apiService,
this.cryptoService,
this.cryptoFunctionService,
- this.stateService
+ this.stateService,
);
this.notificationsService = new NotificationsService(
this.logService,
@@ -593,7 +593,7 @@ export default class MainBackground {
logoutCallback,
this.stateService,
this.authService,
- this.messagingService
+ this.messagingService,
);
this.fido2UserInterfaceService = new BrowserFido2UserInterfaceService(this.authService);
@@ -601,14 +601,14 @@ export default class MainBackground {
this.cipherService,
this.fido2UserInterfaceService,
this.syncService,
- this.logService
+ this.logService,
);
this.fido2ClientService = new Fido2ClientService(
this.fido2AuthenticatorService,
this.configService,
this.authService,
this.stateService,
- this.logService
+ this.logService,
);
const systemUtilsServiceReloadCallback = () => {
@@ -624,7 +624,7 @@ export default class MainBackground {
this.messagingService,
this.platformUtilsService,
systemUtilsServiceReloadCallback,
- this.stateService
+ this.stateService,
);
// Other fields
@@ -642,7 +642,7 @@ export default class MainBackground {
this.environmentService,
this.messagingService,
this.logService,
- this.configService
+ this.configService,
);
this.nativeMessagingBackground = new NativeMessagingBackground(
this.cryptoService,
@@ -654,14 +654,14 @@ export default class MainBackground {
this.platformUtilsService,
this.stateService,
this.logService,
- this.authService
+ this.authService,
);
this.commandsBackground = new CommandsBackground(
this,
this.passwordGenerationService,
this.platformUtilsService,
this.vaultTimeoutService,
- this.authService
+ this.authService,
);
this.notificationBackground = new NotificationBackground(
this.autofillService,
@@ -670,7 +670,7 @@ export default class MainBackground {
this.policyService,
this.folderService,
this.stateService,
- this.environmentService
+ this.environmentService,
);
this.overlayBackground = new OverlayBackground(
this.cipherService,
@@ -679,12 +679,12 @@ export default class MainBackground {
this.environmentService,
this.settingsService,
this.stateService,
- this.i18nService
+ this.i18nService,
);
this.tabsBackground = new TabsBackground(
this,
this.notificationBackground,
- this.overlayBackground
+ this.overlayBackground,
);
if (!this.popupOnlyContext) {
const contextMenuClickedHandler = new ContextMenuClickedHandler(
@@ -712,7 +712,7 @@ export default class MainBackground {
this.stateService,
this.totpService,
this.eventCollectionService,
- this.userVerificationService
+ this.userVerificationService,
);
this.contextMenusBackground = new ContextMenusBackground(contextMenuClickedHandler);
@@ -721,18 +721,18 @@ export default class MainBackground {
this.idleBackground = new IdleBackground(
this.vaultTimeoutService,
this.stateService,
- this.notificationsService
+ this.notificationsService,
);
this.webRequestBackground = new WebRequestBackground(
this.platformUtilsService,
this.cipherService,
- this.authService
+ this.authService,
);
this.usernameGenerationService = new UsernameGenerationService(
this.cryptoService,
this.stateService,
- this.apiService
+ this.apiService,
);
this.avatarUpdateService = new AvatarUpdateService(this.apiService, this.stateService);
@@ -741,13 +741,13 @@ export default class MainBackground {
this.mainContextMenuHandler = new MainContextMenuHandler(
this.stateService,
this.i18nService,
- this.logService
+ this.logService,
);
this.cipherContextMenuHandler = new CipherContextMenuHandler(
this.mainContextMenuHandler,
this.authService,
- this.cipherService
+ this.cipherService,
);
}
}
@@ -928,7 +928,7 @@ export default class MainBackground {
tab: tab,
sender: sender,
},
- options
+ options,
);
}
diff --git a/apps/browser/src/background/nativeMessaging.background.ts b/apps/browser/src/background/nativeMessaging.background.ts
index f4eed16823a..308f40aeb4c 100644
--- a/apps/browser/src/background/nativeMessaging.background.ts
+++ b/apps/browser/src/background/nativeMessaging.background.ts
@@ -81,7 +81,7 @@ export class NativeMessagingBackground {
private platformUtilsService: PlatformUtilsService,
private stateService: StateService,
private logService: LogService,
- private authService: AuthService
+ private authService: AuthService,
) {
this.stateService.setBiometricFingerprintValidated(false);
@@ -136,7 +136,7 @@ export class NativeMessagingBackground {
const decrypted = await this.cryptoFunctionService.rsaDecrypt(
encrypted,
this.privateKey,
- EncryptionAlgorithm
+ EncryptionAlgorithm,
);
if (this.validatingFingerprint) {
@@ -278,7 +278,7 @@ export class NativeMessagingBackground {
let message = rawMessage as ReceiveMessage;
if (!this.platformUtilsService.isSafari()) {
message = JSON.parse(
- await this.cryptoService.decryptToUtf8(rawMessage as EncString, this.sharedSecret)
+ await this.cryptoService.decryptToUtf8(rawMessage as EncString, this.sharedSecret),
);
}
@@ -328,7 +328,7 @@ export class NativeMessagingBackground {
try {
if (message.userKeyB64) {
const userKey = new SymmetricCryptoKey(
- Utils.fromB64ToArray(message.userKeyB64)
+ Utils.fromB64ToArray(message.userKeyB64),
) as UserKey;
await this.cryptoService.setUserKey(userKey);
} else if (message.keyB64) {
@@ -340,11 +340,11 @@ export class NativeMessagingBackground {
throw new Error("No encrypted user key found");
}
const masterKey = new SymmetricCryptoKey(
- Utils.fromB64ToArray(message.keyB64)
+ Utils.fromB64ToArray(message.keyB64),
) as MasterKey;
const userKey = await this.cryptoService.decryptUserKeyWithMasterKey(
masterKey,
- new EncString(encUserKey)
+ new EncString(encUserKey),
);
await this.cryptoService.setMasterKey(masterKey);
await this.cryptoService.setUserKey(userKey);
@@ -424,7 +424,7 @@ export class NativeMessagingBackground {
private async showFingerprintDialog() {
const fingerprint = await this.cryptoService.getFingerprint(
await this.stateService.getUserId(),
- this.publicKey
+ this.publicKey,
);
this.messagingService.send("showNativeMessagingFinterprintDialog", {
diff --git a/apps/browser/src/background/runtime.background.ts b/apps/browser/src/background/runtime.background.ts
index cc932a4d923..b1fddf3eab9 100644
--- a/apps/browser/src/background/runtime.background.ts
+++ b/apps/browser/src/background/runtime.background.ts
@@ -41,7 +41,7 @@ export default class RuntimeBackground {
private environmentService: BrowserEnvironmentService,
private messagingService: MessagingService,
private logService: LogService,
- private configService: ConfigServiceAbstraction
+ private configService: ConfigServiceAbstraction,
) {
// onInstalled listener must be wired up before anything else, so we do it in the ctor
chrome.runtime.onInstalled.addListener((details: any) => {
@@ -58,7 +58,7 @@ export default class RuntimeBackground {
const backgroundMessageListener = (
msg: any,
sender: chrome.runtime.MessageSender,
- sendResponse: any
+ sendResponse: any,
) => {
const messagesWithResponse = [
"checkFido2FeatureEnabled",
@@ -69,7 +69,7 @@ export default class RuntimeBackground {
if (messagesWithResponse.includes(msg.command)) {
this.processMessage(msg, sender).then(
(value) => sendResponse({ result: value }),
- (error) => sendResponse({ error: { ...error, message: error.message } })
+ (error) => sendResponse({ error: { ...error, message: error.message } }),
);
return true;
}
@@ -106,7 +106,7 @@ export default class RuntimeBackground {
await BrowserApi.tabSendMessageData(
item.commandToRetry.sender.tab,
"unlockCompleted",
- item
+ item,
);
}
break;
@@ -134,7 +134,7 @@ export default class RuntimeBackground {
await this.autofillService.injectAutofillScripts(
sender,
await this.configService.getFeatureFlag(FeatureFlag.AutofillV2),
- await this.configService.getFeatureFlag(FeatureFlag.AutofillOverlay)
+ await this.configService.getFeatureFlag(FeatureFlag.AutofillOverlay),
);
break;
case "bgCollectPageDetails":
@@ -163,7 +163,7 @@ export default class RuntimeBackground {
details: msg.details,
},
],
- msg.sender === "autofill_cmd"
+ msg.sender === "autofill_cmd",
);
if (totpCode != null) {
this.platformUtilsService.copyToClipboard(totpCode, { window: window });
@@ -180,7 +180,7 @@ export default class RuntimeBackground {
},
],
false,
- CipherType.Card
+ CipherType.Card,
);
break;
}
@@ -194,7 +194,7 @@ export default class RuntimeBackground {
},
],
false,
- CipherType.Identity
+ CipherType.Identity,
);
break;
}
@@ -270,13 +270,13 @@ export default class RuntimeBackground {
return await this.main.fido2ClientService.createCredential(
msg.data,
sender.tab,
- abortController
+ abortController,
);
} finally {
await BrowserApi.focusTab(sender.tab.id);
await BrowserApi.focusWindow(sender.tab.windowId);
}
- }
+ },
);
case "fido2GetCredentialRequest":
return await this.abortManager.runWithAbortController(
@@ -286,13 +286,13 @@ export default class RuntimeBackground {
return await this.main.fido2ClientService.assertCredential(
msg.data,
sender.tab,
- abortController
+ abortController,
);
} finally {
await BrowserApi.focusTab(sender.tab.id);
await BrowserApi.focusWindow(sender.tab.windowId);
}
- }
+ },
);
case "switchAccount": {
await this.main.switchAccount(msg.userId);
diff --git a/apps/browser/src/background/service-factories/cipher-file-upload-service.factory.ts b/apps/browser/src/background/service-factories/cipher-file-upload-service.factory.ts
index 7c83958927f..4127ff5acf4 100644
--- a/apps/browser/src/background/service-factories/cipher-file-upload-service.factory.ts
+++ b/apps/browser/src/background/service-factories/cipher-file-upload-service.factory.ts
@@ -23,7 +23,7 @@ export type CipherFileUploadServiceInitOptions = CipherFileUploadServiceFactoyOp
export function cipherFileUploadServiceFactory(
cache: { cipherFileUploadService?: CipherFileUploadServiceAbstraction } & CachedServices,
- opts: CipherFileUploadServiceInitOptions
+ opts: CipherFileUploadServiceInitOptions,
): Promise {
return factory(
cache,
@@ -32,7 +32,7 @@ export function cipherFileUploadServiceFactory(
async () =>
new CipherFileUploadService(
await apiServiceFactory(cache, opts),
- await fileUploadServiceFactory(cache, opts)
- )
+ await fileUploadServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/background/service-factories/cipher-file-upload.service.factory.ts b/apps/browser/src/background/service-factories/cipher-file-upload.service.factory.ts
index 7c83958927f..4127ff5acf4 100644
--- a/apps/browser/src/background/service-factories/cipher-file-upload.service.factory.ts
+++ b/apps/browser/src/background/service-factories/cipher-file-upload.service.factory.ts
@@ -23,7 +23,7 @@ export type CipherFileUploadServiceInitOptions = CipherFileUploadServiceFactoyOp
export function cipherFileUploadServiceFactory(
cache: { cipherFileUploadService?: CipherFileUploadServiceAbstraction } & CachedServices,
- opts: CipherFileUploadServiceInitOptions
+ opts: CipherFileUploadServiceInitOptions,
): Promise {
return factory(
cache,
@@ -32,7 +32,7 @@ export function cipherFileUploadServiceFactory(
async () =>
new CipherFileUploadService(
await apiServiceFactory(cache, opts),
- await fileUploadServiceFactory(cache, opts)
- )
+ await fileUploadServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/background/service-factories/devices-api-service.factory.ts b/apps/browser/src/background/service-factories/devices-api-service.factory.ts
index 8999b7c2c72..117b82777ae 100644
--- a/apps/browser/src/background/service-factories/devices-api-service.factory.ts
+++ b/apps/browser/src/background/service-factories/devices-api-service.factory.ts
@@ -17,12 +17,12 @@ export type DevicesApiServiceInitOptions = DevicesApiServiceFactoryOptions & Api
export function devicesApiServiceFactory(
cache: { devicesApiService?: DevicesApiServiceAbstraction } & CachedServices,
- opts: DevicesApiServiceInitOptions
+ opts: DevicesApiServiceInitOptions,
): Promise {
return factory(
cache,
"devicesApiService",
opts,
- async () => new DevicesApiServiceImplementation(await apiServiceFactory(cache, opts))
+ async () => new DevicesApiServiceImplementation(await apiServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/background/service-factories/event-collection-service.factory.ts b/apps/browser/src/background/service-factories/event-collection-service.factory.ts
index 5ed6c24ca4b..7ce77da045b 100644
--- a/apps/browser/src/background/service-factories/event-collection-service.factory.ts
+++ b/apps/browser/src/background/service-factories/event-collection-service.factory.ts
@@ -34,7 +34,7 @@ export type EventCollectionServiceInitOptions = EventCollectionServiceOptions &
export function eventCollectionServiceFactory(
cache: { eventCollectionService?: AbstractEventCollectionService } & CachedServices,
- opts: EventCollectionServiceInitOptions
+ opts: EventCollectionServiceInitOptions,
): Promise {
return factory(
cache,
@@ -45,7 +45,7 @@ export function eventCollectionServiceFactory(
await cipherServiceFactory(cache, opts),
await stateServiceFactory(cache, opts),
await organizationServiceFactory(cache, opts),
- await eventUploadServiceFactory(cache, opts)
- )
+ await eventUploadServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/background/service-factories/event-upload-service.factory.ts b/apps/browser/src/background/service-factories/event-upload-service.factory.ts
index f9e72395a74..fcaec459c0d 100644
--- a/apps/browser/src/background/service-factories/event-upload-service.factory.ts
+++ b/apps/browser/src/background/service-factories/event-upload-service.factory.ts
@@ -28,7 +28,7 @@ export type EventUploadServiceInitOptions = EventUploadServiceOptions &
export function eventUploadServiceFactory(
cache: { eventUploadService?: AbstractEventUploadService } & CachedServices,
- opts: EventUploadServiceInitOptions
+ opts: EventUploadServiceInitOptions,
): Promise {
return factory(
cache,
@@ -38,7 +38,7 @@ export function eventUploadServiceFactory(
new EventUploadService(
await apiServiceFactory(cache, opts),
await stateServiceFactory(cache, opts),
- await logServiceFactory(cache, opts)
- )
+ await logServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/background/service-factories/password-generation-service.factory.ts b/apps/browser/src/background/service-factories/password-generation-service.factory.ts
index d97e8ce98a6..ec7ca50ec46 100644
--- a/apps/browser/src/background/service-factories/password-generation-service.factory.ts
+++ b/apps/browser/src/background/service-factories/password-generation-service.factory.ts
@@ -30,7 +30,7 @@ export type PasswordGenerationServiceInitOptions = PasswordGenerationServiceFact
export function passwordGenerationServiceFactory(
cache: { passwordGenerationService?: PasswordGenerationServiceAbstraction } & CachedServices,
- opts: PasswordGenerationServiceInitOptions
+ opts: PasswordGenerationServiceInitOptions,
): Promise {
return factory(
cache,
@@ -40,7 +40,7 @@ export function passwordGenerationServiceFactory(
new PasswordGenerationService(
await cryptoServiceFactory(cache, opts),
await policyServiceFactory(cache, opts),
- await stateServiceFactory(cache, opts)
- )
+ await stateServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/background/service-factories/search-service.factory.ts b/apps/browser/src/background/service-factories/search-service.factory.ts
index 6ff9691c524..38c7620b5aa 100644
--- a/apps/browser/src/background/service-factories/search-service.factory.ts
+++ b/apps/browser/src/background/service-factories/search-service.factory.ts
@@ -23,13 +23,16 @@ export type SearchServiceInitOptions = SearchServiceFactoryOptions &
export function searchServiceFactory(
cache: { searchService?: AbstractSearchService } & CachedServices,
- opts: SearchServiceInitOptions
+ opts: SearchServiceInitOptions,
): Promise {
return factory(
cache,
"searchService",
opts,
async () =>
- new SearchService(await logServiceFactory(cache, opts), await i18nServiceFactory(cache, opts))
+ new SearchService(
+ await logServiceFactory(cache, opts),
+ await i18nServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/background/service-factories/send-service.factory.ts b/apps/browser/src/background/service-factories/send-service.factory.ts
index bc0f83787fd..bb5ef1fa37f 100644
--- a/apps/browser/src/background/service-factories/send-service.factory.ts
+++ b/apps/browser/src/background/service-factories/send-service.factory.ts
@@ -29,7 +29,7 @@ export type SendServiceInitOptions = SendServiceFactoryOptions &
export function sendServiceFactory(
cache: { sendService?: InternalSendService } & CachedServices,
- opts: SendServiceInitOptions
+ opts: SendServiceInitOptions,
): Promise {
return factory(
cache,
@@ -40,7 +40,7 @@ export function sendServiceFactory(
await cryptoServiceFactory(cache, opts),
await i18nServiceFactory(cache, opts),
await cryptoFunctionServiceFactory(cache, opts),
- await stateServiceFactory(cache, opts)
- )
+ await stateServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/background/service-factories/settings-service.factory.ts b/apps/browser/src/background/service-factories/settings-service.factory.ts
index 17e22a6678d..28e97de51fa 100644
--- a/apps/browser/src/background/service-factories/settings-service.factory.ts
+++ b/apps/browser/src/background/service-factories/settings-service.factory.ts
@@ -17,12 +17,12 @@ export type SettingsServiceInitOptions = SettingsServiceFactoryOptions & StateSe
export function settingsServiceFactory(
cache: { settingsService?: AbstractSettingsService } & CachedServices,
- opts: SettingsServiceInitOptions
+ opts: SettingsServiceInitOptions,
): Promise {
return factory(
cache,
"settingsService",
opts,
- async () => new BrowserSettingsService(await stateServiceFactory(cache, opts))
+ async () => new BrowserSettingsService(await stateServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts b/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts
index b019db3297d..7a34b6b4b14 100644
--- a/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts
+++ b/apps/browser/src/background/service-factories/vault-timeout-service.factory.ts
@@ -66,7 +66,7 @@ export type VaultTimeoutServiceInitOptions = VaultTimeoutServiceFactoryOptions &
export function vaultTimeoutServiceFactory(
cache: { vaultTimeoutService?: AbstractVaultTimeoutService } & CachedServices,
- opts: VaultTimeoutServiceInitOptions
+ opts: VaultTimeoutServiceInitOptions,
): Promise {
return factory(
cache,
@@ -85,7 +85,7 @@ export function vaultTimeoutServiceFactory(
await authServiceFactory(cache, opts),
await vaultTimeoutSettingsServiceFactory(cache, opts),
opts.vaultTimeoutServiceOptions.lockedCallback,
- opts.vaultTimeoutServiceOptions.loggedOutCallback
- )
+ opts.vaultTimeoutServiceOptions.loggedOutCallback,
+ ),
);
}
diff --git a/apps/browser/src/background/service-factories/vault-timeout-settings-service.factory.ts b/apps/browser/src/background/service-factories/vault-timeout-settings-service.factory.ts
index eda86c0a156..b2dfd96f5b0 100644
--- a/apps/browser/src/background/service-factories/vault-timeout-settings-service.factory.ts
+++ b/apps/browser/src/background/service-factories/vault-timeout-settings-service.factory.ts
@@ -38,7 +38,7 @@ export type VaultTimeoutSettingsServiceInitOptions = VaultTimeoutSettingsService
export function vaultTimeoutSettingsServiceFactory(
cache: { vaultTimeoutSettingsService?: AbstractVaultTimeoutSettingsService } & CachedServices,
- opts: VaultTimeoutSettingsServiceInitOptions
+ opts: VaultTimeoutSettingsServiceInitOptions,
): Promise {
return factory(
cache,
@@ -50,7 +50,7 @@ export function vaultTimeoutSettingsServiceFactory(
await tokenServiceFactory(cache, opts),
await policyServiceFactory(cache, opts),
await stateServiceFactory(cache, opts),
- await userVerificationServiceFactory(cache, opts)
- )
+ await userVerificationServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/background/webRequest.background.ts b/apps/browser/src/background/webRequest.background.ts
index a4ad0d37dc0..2fbb3d948bf 100644
--- a/apps/browser/src/background/webRequest.background.ts
+++ b/apps/browser/src/background/webRequest.background.ts
@@ -14,7 +14,7 @@ export default class WebRequestBackground {
constructor(
platformUtilsService: PlatformUtilsService,
private cipherService: CipherService,
- private authService: AuthService
+ private authService: AuthService,
) {
if (BrowserApi.manifestVersion === 2) {
this.webRequest = (window as any).chrome.webRequest;
@@ -48,7 +48,7 @@ export default class WebRequestBackground {
}
},
{ urls: ["http://*/*", "https://*/*"] },
- [this.isFirefox ? "blocking" : "asyncBlocking"]
+ [this.isFirefox ? "blocking" : "asyncBlocking"],
);
this.webRequest.onCompleted.addListener((details: any) => this.completeAuthRequest(details), {
@@ -58,7 +58,7 @@ export default class WebRequestBackground {
(details: any) => this.completeAuthRequest(details),
{
urls: ["http://*/*"],
- }
+ },
);
}
@@ -73,7 +73,7 @@ export default class WebRequestBackground {
const ciphers = await this.cipherService.getAllDecryptedForUrl(
domain,
null,
- UriMatchType.Host
+ UriMatchType.Host,
);
if (ciphers == null || ciphers.length !== 1) {
error();
diff --git a/apps/browser/src/browser/safariApp.ts b/apps/browser/src/browser/safariApp.ts
index 683c9ef08a0..f96a560e3f1 100644
--- a/apps/browser/src/browser/safariApp.ts
+++ b/apps/browser/src/browser/safariApp.ts
@@ -19,7 +19,7 @@ export class SafariApp {
},
(response: any) => {
resolve(response);
- }
+ },
);
});
}
diff --git a/apps/browser/src/platform/background.ts b/apps/browser/src/platform/background.ts
index f7913dade9f..148ec8280b6 100644
--- a/apps/browser/src/platform/background.ts
+++ b/apps/browser/src/platform/background.ts
@@ -28,7 +28,7 @@ if (BrowserApi.manifestVersion === 3) {
"runtime.background",
(message: { command: string }, sender, sendResponse) => {
runtimeMessageListener(message, sender);
- }
+ },
);
} else {
const bitwardenMain = ((window as any).bitwardenMain = new MainBackground());
diff --git a/apps/browser/src/platform/background/service-factories/api-service.factory.ts b/apps/browser/src/platform/background/service-factories/api-service.factory.ts
index bcde07fbb20..649fe1f7fe6 100644
--- a/apps/browser/src/platform/background/service-factories/api-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/api-service.factory.ts
@@ -36,7 +36,7 @@ export type ApiServiceInitOptions = ApiServiceFactoryOptions &
export function apiServiceFactory(
cache: { apiService?: AbstractApiService } & CachedServices,
- opts: ApiServiceInitOptions
+ opts: ApiServiceInitOptions,
): Promise {
return factory(
cache,
@@ -49,7 +49,7 @@ export function apiServiceFactory(
await environmentServiceFactory(cache, opts),
await appIdServiceFactory(cache, opts),
opts.apiServiceOptions.logoutCallback,
- opts.apiServiceOptions.customUserAgent
- )
+ opts.apiServiceOptions.customUserAgent,
+ ),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/app-id-service.factory.ts b/apps/browser/src/platform/background/service-factories/app-id-service.factory.ts
index 30397d737ef..af5012798b8 100644
--- a/apps/browser/src/platform/background/service-factories/app-id-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/app-id-service.factory.ts
@@ -12,12 +12,12 @@ export type AppIdServiceInitOptions = AppIdServiceFactoryOptions & DiskStorageOp
export function appIdServiceFactory(
cache: { appIdService?: AbstractAppIdService } & CachedServices,
- opts: AppIdServiceInitOptions
+ opts: AppIdServiceInitOptions,
): Promise {
return factory(
cache,
"appIdService",
opts,
- async () => new AppIdService(await diskStorageServiceFactory(cache, opts))
+ async () => new AppIdService(await diskStorageServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/config-api.service.factory.ts b/apps/browser/src/platform/background/service-factories/config-api.service.factory.ts
index e9e1b86488a..c0dbf1f475d 100644
--- a/apps/browser/src/platform/background/service-factories/config-api.service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/config-api.service.factory.ts
@@ -17,7 +17,7 @@ export type ConfigApiServiceInitOptions = ConfigApiServiceFactoyOptions &
export function configApiServiceFactory(
cache: { configApiService?: ConfigApiServiceAbstraction } & CachedServices,
- opts: ConfigApiServiceInitOptions
+ opts: ConfigApiServiceInitOptions,
): Promise {
return factory(
cache,
@@ -26,7 +26,7 @@ export function configApiServiceFactory(
async () =>
new ConfigApiService(
await apiServiceFactory(cache, opts),
- await authServiceFactory(cache, opts)
- )
+ await authServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/config-service.factory.ts b/apps/browser/src/platform/background/service-factories/config-service.factory.ts
index a5dc6016c65..9c8b485c2a7 100644
--- a/apps/browser/src/platform/background/service-factories/config-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/config-service.factory.ts
@@ -30,7 +30,7 @@ export type ConfigServiceInitOptions = ConfigServiceFactoryOptions &
export function configServiceFactory(
cache: { configService?: ConfigServiceAbstraction } & CachedServices,
- opts: ConfigServiceInitOptions
+ opts: ConfigServiceInitOptions,
): Promise {
return factory(
cache,
@@ -43,7 +43,7 @@ export function configServiceFactory(
await authServiceFactory(cache, opts),
await environmentServiceFactory(cache, opts),
await logServiceFactory(cache, opts),
- opts.configServiceOptions?.subscribe ?? true
- )
+ opts.configServiceOptions?.subscribe ?? true,
+ ),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/crypto-function-service.factory.ts b/apps/browser/src/platform/background/service-factories/crypto-function-service.factory.ts
index bcfffb6bd08..b9a9cc66483 100644
--- a/apps/browser/src/platform/background/service-factories/crypto-function-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/crypto-function-service.factory.ts
@@ -13,12 +13,12 @@ export type CryptoFunctionServiceInitOptions = CryptoFunctionServiceFactoryOptio
export function cryptoFunctionServiceFactory(
cache: { cryptoFunctionService?: CryptoFunctionService } & CachedServices,
- opts: CryptoFunctionServiceFactoryOptions
+ opts: CryptoFunctionServiceFactoryOptions,
): Promise {
return factory(
cache,
"cryptoFunctionService",
opts,
- () => new WebCryptoFunctionService(opts.cryptoFunctionServiceOptions.win)
+ () => new WebCryptoFunctionService(opts.cryptoFunctionServiceOptions.win),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/crypto-service.factory.ts b/apps/browser/src/platform/background/service-factories/crypto-service.factory.ts
index 7f66a4f6fe7..3922f3d435e 100644
--- a/apps/browser/src/platform/background/service-factories/crypto-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/crypto-service.factory.ts
@@ -32,7 +32,7 @@ export type CryptoServiceInitOptions = CryptoServiceFactoryOptions &
export function cryptoServiceFactory(
cache: { cryptoService?: AbstractCryptoService } & CachedServices,
- opts: CryptoServiceInitOptions
+ opts: CryptoServiceInitOptions,
): Promise {
return factory(
cache,
@@ -44,7 +44,7 @@ export function cryptoServiceFactory(
await encryptServiceFactory(cache, opts),
await platformUtilsServiceFactory(cache, opts),
await logServiceFactory(cache, opts),
- await stateServiceFactory(cache, opts)
- )
+ await stateServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/encrypt-service.factory.ts b/apps/browser/src/platform/background/service-factories/encrypt-service.factory.ts
index 75e8c1974e2..055e5235914 100644
--- a/apps/browser/src/platform/background/service-factories/encrypt-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/encrypt-service.factory.ts
@@ -23,7 +23,7 @@ export type EncryptServiceInitOptions = EncryptServiceFactoryOptions &
export function encryptServiceFactory(
cache: { encryptService?: EncryptServiceImplementation } & CachedServices,
- opts: EncryptServiceInitOptions
+ opts: EncryptServiceInitOptions,
): Promise {
return factory(
cache,
@@ -33,7 +33,7 @@ export function encryptServiceFactory(
new EncryptServiceImplementation(
await cryptoFunctionServiceFactory(cache, opts),
await logServiceFactory(cache, opts),
- opts.encryptServiceOptions.logMacFailures
- )
+ opts.encryptServiceOptions.logMacFailures,
+ ),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/environment-service.factory.ts b/apps/browser/src/platform/background/service-factories/environment-service.factory.ts
index 5150c7bd4a0..4ea7dac225c 100644
--- a/apps/browser/src/platform/background/service-factories/environment-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/environment-service.factory.ts
@@ -15,7 +15,7 @@ export type EnvironmentServiceInitOptions = EnvironmentServiceFactoryOptions &
export function environmentServiceFactory(
cache: { environmentService?: BrowserEnvironmentService } & CachedServices,
- opts: EnvironmentServiceInitOptions
+ opts: EnvironmentServiceInitOptions,
): Promise {
return factory(
cache,
@@ -24,7 +24,7 @@ export function environmentServiceFactory(
async () =>
new BrowserEnvironmentService(
await stateServiceFactory(cache, opts),
- await logServiceFactory(cache, opts)
- )
+ await logServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/factory-options.ts b/apps/browser/src/platform/background/service-factories/factory-options.ts
index 7dde09204ef..4219a67181e 100644
--- a/apps/browser/src/platform/background/service-factories/factory-options.ts
+++ b/apps/browser/src/platform/background/service-factories/factory-options.ts
@@ -9,12 +9,12 @@ export type FactoryOptions = {
export async function factory<
TCache extends CachedServices,
TName extends keyof TCache,
- TOpts extends FactoryOptions
+ TOpts extends FactoryOptions,
>(
cachedServices: TCache,
name: TName,
opts: TOpts,
- factory: () => TCache[TName] | Promise
+ factory: () => TCache[TName] | Promise,
): Promise {
let instance = cachedServices[name];
if (opts.alwaysInitializeNewService || !instance) {
diff --git a/apps/browser/src/platform/background/service-factories/file-upload-service.factory.ts b/apps/browser/src/platform/background/service-factories/file-upload-service.factory.ts
index d890a3b37a7..77b5703619b 100644
--- a/apps/browser/src/platform/background/service-factories/file-upload-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/file-upload-service.factory.ts
@@ -15,12 +15,12 @@ export type FileUploadServiceInitOptions = FileUploadServiceFactoryOptions & Log
export function fileUploadServiceFactory(
cache: { fileUploadService?: FileUploadServiceAbstraction } & CachedServices,
- opts: FileUploadServiceInitOptions
+ opts: FileUploadServiceInitOptions,
): Promise {
return factory(
cache,
"fileUploadService",
opts,
- async () => new FileUploadService(await logServiceFactory(cache, opts))
+ async () => new FileUploadService(await logServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/global-state-provider.factory.ts b/apps/browser/src/platform/background/service-factories/global-state-provider.factory.ts
index d20b7a72ade..3615b2b060d 100644
--- a/apps/browser/src/platform/background/service-factories/global-state-provider.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/global-state-provider.factory.ts
@@ -18,7 +18,7 @@ export type GlobalStateProviderInitOptions = GlobalStateProviderFactoryOptions &
export async function globalStateProviderFactory(
cache: { globalStateProvider?: GlobalStateProvider } & CachedServices,
- opts: GlobalStateProviderInitOptions
+ opts: GlobalStateProviderInitOptions,
): Promise {
return factory(
cache,
@@ -27,7 +27,7 @@ export async function globalStateProviderFactory(
async () =>
new DefaultGlobalStateProvider(
await observableMemoryStorageServiceFactory(cache, opts),
- await observableDiskStorageServiceFactory(cache, opts)
- )
+ await observableDiskStorageServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/i18n-service.factory.ts b/apps/browser/src/platform/background/service-factories/i18n-service.factory.ts
index 3dd7e1814ff..86ec82784b1 100644
--- a/apps/browser/src/platform/background/service-factories/i18n-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/i18n-service.factory.ts
@@ -15,13 +15,13 @@ export type I18nServiceInitOptions = I18nServiceFactoryOptions;
export async function i18nServiceFactory(
cache: { i18nService?: AbstractI18nService } & CachedServices,
- opts: I18nServiceInitOptions
+ opts: I18nServiceInitOptions,
): Promise {
const service = await factory(
cache,
"i18nService",
opts,
- () => new I18nService(opts.i18nServiceOptions.systemLanguage)
+ () => new I18nService(opts.i18nServiceOptions.systemLanguage),
);
if (!(service as BaseI18nService as any).inited) {
await (service as BaseI18nService).init();
diff --git a/apps/browser/src/platform/background/service-factories/key-generation-service.factory.ts b/apps/browser/src/platform/background/service-factories/key-generation-service.factory.ts
index 7dbcf3fa79e..d4f6d52738f 100644
--- a/apps/browser/src/platform/background/service-factories/key-generation-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/key-generation-service.factory.ts
@@ -13,12 +13,12 @@ export type KeyGenerationServiceInitOptions = KeyGenerationServiceFactoryOptions
export function keyGenerationServiceFactory(
cache: { keyGenerationService?: KeyGenerationService } & CachedServices,
- opts: KeyGenerationServiceInitOptions
+ opts: KeyGenerationServiceInitOptions,
): Promise {
return factory(
cache,
"keyGenerationService",
opts,
- async () => new KeyGenerationService(await cryptoFunctionServiceFactory(cache, opts))
+ async () => new KeyGenerationService(await cryptoFunctionServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/log-service.factory.ts b/apps/browser/src/platform/background/service-factories/log-service.factory.ts
index 4dd5f7dd782..7e171ee3104 100644
--- a/apps/browser/src/platform/background/service-factories/log-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/log-service.factory.ts
@@ -15,12 +15,12 @@ export type LogServiceInitOptions = LogServiceFactoryOptions;
export function logServiceFactory(
cache: { logService?: LogService } & CachedServices,
- opts: LogServiceInitOptions
+ opts: LogServiceInitOptions,
): Promise {
return factory(
cache,
"logService",
opts,
- () => new ConsoleLogService(opts.logServiceOptions.isDev, opts.logServiceOptions.filter)
+ () => new ConsoleLogService(opts.logServiceOptions.isDev, opts.logServiceOptions.filter),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/messaging-service.factory.ts b/apps/browser/src/platform/background/service-factories/messaging-service.factory.ts
index 0d0c797056e..46852712aa8 100644
--- a/apps/browser/src/platform/background/service-factories/messaging-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/messaging-service.factory.ts
@@ -13,7 +13,7 @@ export type MessagingServiceInitOptions = MessagingServiceFactoryOptions;
export function messagingServiceFactory(
cache: { messagingService?: AbstractMessagingService } & CachedServices,
- opts: MessagingServiceInitOptions
+ opts: MessagingServiceInitOptions,
): Promise {
return factory(cache, "messagingService", opts, () => new BrowserMessagingService());
}
diff --git a/apps/browser/src/platform/background/service-factories/platform-utils-service.factory.ts b/apps/browser/src/platform/background/service-factories/platform-utils-service.factory.ts
index 5748c523f70..d3ac465e4c9 100644
--- a/apps/browser/src/platform/background/service-factories/platform-utils-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/platform-utils-service.factory.ts
@@ -18,7 +18,7 @@ export type PlatformUtilsServiceInitOptions = PlatformUtilsServiceFactoryOptions
export function platformUtilsServiceFactory(
cache: { platformUtilsService?: PlatformUtilsService } & CachedServices,
- opts: PlatformUtilsServiceInitOptions
+ opts: PlatformUtilsServiceInitOptions,
): Promise {
return factory(
cache,
@@ -29,7 +29,7 @@ export function platformUtilsServiceFactory(
await messagingServiceFactory(cache, opts),
opts.platformUtilsServiceOptions.clipboardWriteCallback,
opts.platformUtilsServiceOptions.biometricCallback,
- opts.platformUtilsServiceOptions.win
- )
+ opts.platformUtilsServiceOptions.win,
+ ),
);
}
diff --git a/apps/browser/src/platform/background/service-factories/state-service.factory.ts b/apps/browser/src/platform/background/service-factories/state-service.factory.ts
index 31a0316c09a..3fc5aedefb7 100644
--- a/apps/browser/src/platform/background/service-factories/state-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/state-service.factory.ts
@@ -35,7 +35,7 @@ export type StateServiceInitOptions = StateServiceFactoryOptions &
export async function stateServiceFactory(
cache: { stateService?: BrowserStateService } & CachedServices,
- opts: StateServiceInitOptions
+ opts: StateServiceInitOptions,
): Promise {
const service = await factory(
cache,
@@ -49,8 +49,8 @@ export async function stateServiceFactory(
await logServiceFactory(cache, opts),
opts.stateServiceOptions.stateFactory,
await accountServiceFactory(cache, opts),
- opts.stateServiceOptions.useAccountCache
- )
+ opts.stateServiceOptions.useAccountCache,
+ ),
);
service.init();
return service;
diff --git a/apps/browser/src/platform/background/service-factories/storage-service.factory.ts b/apps/browser/src/platform/background/service-factories/storage-service.factory.ts
index b83ec742782..226025c1f61 100644
--- a/apps/browser/src/platform/background/service-factories/storage-service.factory.ts
+++ b/apps/browser/src/platform/background/service-factories/storage-service.factory.ts
@@ -27,7 +27,7 @@ export type MemoryStorageServiceInitOptions = StorageServiceFactoryOptions &
export function diskStorageServiceFactory(
cache: { diskStorageService?: AbstractStorageService } & CachedServices,
- opts: DiskStorageServiceInitOptions
+ opts: DiskStorageServiceInitOptions,
): Promise {
return factory(cache, "diskStorageService", opts, () => new BrowserLocalStorageService());
}
@@ -35,27 +35,27 @@ export function observableDiskStorageServiceFactory(
cache: {
diskStorageService?: AbstractStorageService & ObservableStorageService;
} & CachedServices,
- opts: DiskStorageServiceInitOptions
+ opts: DiskStorageServiceInitOptions,
): Promise {
return factory(cache, "diskStorageService", opts, () => new BrowserLocalStorageService());
}
export function secureStorageServiceFactory(
cache: { secureStorageService?: AbstractStorageService } & CachedServices,
- opts: SecureStorageServiceInitOptions
+ opts: SecureStorageServiceInitOptions,
): Promise {
return factory(cache, "secureStorageService", opts, () => new BrowserLocalStorageService());
}
export function memoryStorageServiceFactory(
cache: { memoryStorageService?: AbstractMemoryStorageService } & CachedServices,
- opts: MemoryStorageServiceInitOptions
+ opts: MemoryStorageServiceInitOptions,
): Promise {
return factory(cache, "memoryStorageService", opts, async () => {
if (BrowserApi.manifestVersion === 3) {
return new LocalBackedSessionStorageService(
await encryptServiceFactory(cache, opts),
- await keyGenerationServiceFactory(cache, opts)
+ await keyGenerationServiceFactory(cache, opts),
);
}
return new MemoryStorageService();
@@ -66,7 +66,7 @@ export function observableMemoryStorageServiceFactory(
cache: {
memoryStorageService?: AbstractMemoryStorageService & ObservableStorageService;
} & CachedServices,
- opts: MemoryStorageServiceInitOptions
+ opts: MemoryStorageServiceInitOptions,
): Promise {
return factory(cache, "memoryStorageService", opts, async () => {
return new BackgroundMemoryStorageService();
diff --git a/apps/browser/src/platform/browser/browser-api.spec.ts b/apps/browser/src/platform/browser/browser-api.spec.ts
index 057ae0a1010..887c1284a01 100644
--- a/apps/browser/src/platform/browser/browser-api.spec.ts
+++ b/apps/browser/src/platform/browser/browser-api.spec.ts
@@ -24,7 +24,7 @@ describe("BrowserApi", () => {
expect(chrome.windows.get).toHaveBeenCalledWith(
windowId,
{ populate: true },
- expect.anything()
+ expect.anything(),
);
});
});
@@ -46,7 +46,7 @@ describe("BrowserApi", () => {
expect(chrome.windows.get).toHaveBeenCalledWith(
windowId,
{ populate: true },
- expect.anything()
+ expect.anything(),
);
});
});
@@ -73,7 +73,7 @@ describe("BrowserApi", () => {
expect(chrome.windows.update).toHaveBeenCalledWith(
windowId,
windowOptions,
- expect.anything()
+ expect.anything(),
);
});
});
@@ -87,7 +87,7 @@ describe("BrowserApi", () => {
expect(chrome.windows.update).toHaveBeenCalledWith(
windowId,
{ focused: true },
- expect.anything()
+ expect.anything(),
);
});
});
@@ -98,7 +98,7 @@ describe("BrowserApi", () => {
const injectDetails = mock();
jest.spyOn(BrowserApi, "manifestVersion", "get").mockReturnValue(2);
(chrome.tabs.executeScript as jest.Mock).mockImplementation(
- (tabId, injectDetails, callback) => callback(executeScriptResult)
+ (tabId, injectDetails, callback) => callback(executeScriptResult),
);
const result = await BrowserApi.executeScriptInTab(tabId, injectDetails);
@@ -106,7 +106,7 @@ describe("BrowserApi", () => {
expect(chrome.tabs.executeScript).toHaveBeenCalledWith(
tabId,
injectDetails,
- expect.any(Function)
+ expect.any(Function),
);
expect(result).toEqual(executeScriptResult);
});
diff --git a/apps/browser/src/platform/browser/browser-api.ts b/apps/browser/src/platform/browser/browser-api.ts
index 19815b1cf53..05866af9de7 100644
--- a/apps/browser/src/platform/browser/browser-api.ts
+++ b/apps/browser/src/platform/browser/browser-api.ts
@@ -52,7 +52,7 @@ export class BrowserApi {
return new Promise((resolve) =>
chrome.windows.create(options, (window) => {
resolve(window);
- })
+ }),
);
}
@@ -73,12 +73,12 @@ export class BrowserApi {
*/
static async updateWindowProperties(
windowId: number,
- options: chrome.windows.UpdateInfo
+ options: chrome.windows.UpdateInfo,
): Promise {
return new Promise((resolve) =>
chrome.windows.update(windowId, options, () => {
resolve();
- })
+ }),
);
}
@@ -110,7 +110,7 @@ export class BrowserApi {
return new Promise((resolve) =>
chrome.tabs.get(tabId, (tab) => {
resolve(tab);
- })
+ }),
);
}
@@ -147,7 +147,7 @@ export class BrowserApi {
static tabSendMessageData(
tab: chrome.tabs.Tab,
command: string,
- data: any = null
+ data: any = null,
): Promise {
const obj: any = {
command: command,
@@ -163,7 +163,7 @@ export class BrowserApi {
static async tabSendMessage(
tab: chrome.tabs.Tab,
obj: T,
- options: chrome.tabs.MessageSendOptions = null
+ options: chrome.tabs.MessageSendOptions = null,
): Promise {
if (!tab || !tab.id) {
return;
@@ -183,7 +183,7 @@ export class BrowserApi {
tabId: number,
message: TabMessage,
options?: chrome.tabs.MessageSendOptions,
- responseCallback?: (response: T) => void
+ responseCallback?: (response: T) => void,
) {
chrome.tabs.sendMessage(tabId, message, options, responseCallback);
}
@@ -217,7 +217,7 @@ export class BrowserApi {
static createNewTab(url: string, active = true): Promise {
return new Promise((resolve) =>
- chrome.tabs.create({ url: url, active: active }, (tab) => resolve(tab))
+ chrome.tabs.create({ url: url, active: active }, (tab) => resolve(tab)),
);
}
@@ -225,7 +225,7 @@ export class BrowserApi {
// them when the popup gets unloaded, otherwise we cause a memory leak
private static trackedChromeEventListeners: [
event: chrome.events.Event<(...args: unknown[]) => unknown>,
- callback: (...args: unknown[]) => unknown
+ callback: (...args: unknown[]) => unknown,
][] = [];
static messageListener(
@@ -233,8 +233,8 @@ export class BrowserApi {
callback: (
message: any,
sender: chrome.runtime.MessageSender,
- sendResponse: any
- ) => boolean | void
+ sendResponse: any,
+ ) => boolean | void,
) {
BrowserApi.addListener(chrome.runtime.onMessage, callback);
}
@@ -252,7 +252,7 @@ export class BrowserApi {
}
static storageChangeListener(
- callback: Parameters[0]
+ callback: Parameters[0],
) {
BrowserApi.addListener(chrome.storage.onChanged, callback);
}
@@ -268,7 +268,7 @@ export class BrowserApi {
*/
static addListener unknown>(
event: chrome.events.Event,
- callback: T
+ callback: T,
) {
event.addListener(callback);
@@ -285,7 +285,7 @@ export class BrowserApi {
*/
static removeListener unknown>(
event: chrome.events.Event,
- callback: T
+ callback: T,
) {
event.removeListener(callback);
@@ -381,7 +381,7 @@ export class BrowserApi {
*/
static async permissionsGranted(permissions: string[]): Promise {
return new Promise((resolve) =>
- chrome.permissions.contains({ permissions }, (result) => resolve(result))
+ chrome.permissions.contains({ permissions }, (result) => resolve(result)),
);
}
@@ -399,7 +399,7 @@ export class BrowserApi {
}
static getSidebarAction(
- win: Window & typeof globalThis
+ win: Window & typeof globalThis,
): OperaSidebarAction | FirefoxSidebarAction | null {
const deviceType = BrowserPlatformUtilsService.getDevice(win);
if (deviceType !== DeviceType.FirefoxExtension && deviceType !== DeviceType.OperaExtension) {
@@ -441,14 +441,14 @@ export class BrowserApi {
static async browserAutofillSettingsOverridden(): Promise {
const autofillAddressOverridden: boolean = await new Promise((resolve) =>
chrome.privacy.services.autofillAddressEnabled.get({}, (details) =>
- resolve(details.levelOfControl === "controlled_by_this_extension" && !details.value)
- )
+ resolve(details.levelOfControl === "controlled_by_this_extension" && !details.value),
+ ),
);
const autofillCreditCardOverridden: boolean = await new Promise((resolve) =>
chrome.privacy.services.autofillCreditCardEnabled.get({}, (details) =>
- resolve(details.levelOfControl === "controlled_by_this_extension" && !details.value)
- )
+ resolve(details.levelOfControl === "controlled_by_this_extension" && !details.value),
+ ),
);
return autofillAddressOverridden && autofillCreditCardOverridden;
diff --git a/apps/browser/src/platform/browser/from-chrome-event.ts b/apps/browser/src/platform/browser/from-chrome-event.ts
index 5217d8e7021..e45dcdcd082 100644
--- a/apps/browser/src/platform/browser/from-chrome-event.ts
+++ b/apps/browser/src/platform/browser/from-chrome-event.ts
@@ -21,7 +21,7 @@ import { BrowserApi } from "./browser-api";
* ```
*/
export function fromChromeEvent(
- event: chrome.events.Event<(...args: T) => void>
+ event: chrome.events.Event<(...args: T) => void>,
): Observable {
return new Observable((subscriber) => {
const handler = (...args: T) => {
diff --git a/apps/browser/src/platform/browser/zoned-message-listener.service.ts b/apps/browser/src/platform/browser/zoned-message-listener.service.ts
index 4f8d740d231..ce9f7e2021e 100644
--- a/apps/browser/src/platform/browser/zoned-message-listener.service.ts
+++ b/apps/browser/src/platform/browser/zoned-message-listener.service.ts
@@ -19,8 +19,8 @@ export class ZonedMessageListenerService {
callback: (
message: any,
sender: chrome.runtime.MessageSender,
- sendResponse: any
- ) => boolean | void
+ sendResponse: any,
+ ) => boolean | void,
) {
BrowserApi.messageListener(name, (message, sender, sendResponse) => {
return this.ngZone.run(() => callback(message, sender, sendResponse));
diff --git a/apps/browser/src/platform/decorators/dev-flag.decorator.ts b/apps/browser/src/platform/decorators/dev-flag.decorator.ts
index 4a67d6239e6..a31cdbc9924 100644
--- a/apps/browser/src/platform/decorators/dev-flag.decorator.ts
+++ b/apps/browser/src/platform/decorators/dev-flag.decorator.ts
@@ -6,7 +6,7 @@ export function devFlag(flag: keyof DevFlags) {
descriptor.value = function (...args: any[]) {
if (!devFlagEnabled(flag)) {
throw new Error(
- `This method should not be called, it is protected by a disabled dev flag.`
+ `This method should not be called, it is protected by a disabled dev flag.`,
);
}
return originalMethod.apply(this, args);
diff --git a/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.spec.ts b/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.spec.ts
index 5ddc3f8e07e..4b0226d54e9 100644
--- a/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.spec.ts
+++ b/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.spec.ts
@@ -20,7 +20,7 @@ describe("browserSession decorator", () => {
expect(() => {
new TestClass();
}).toThrowError(
- "Cannot decorate TestClass with browserSession, Browser's AbstractMemoryStorageService must be accessible through the observed classes parameters"
+ "Cannot decorate TestClass with browserSession, Browser's AbstractMemoryStorageService must be accessible through the observed classes parameters",
);
});
diff --git a/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.ts b/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.ts
index b325f6b9a56..47fb5d7e085 100644
--- a/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.ts
+++ b/apps/browser/src/platform/decorators/session-sync-observable/browser-session.decorator.ts
@@ -23,7 +23,7 @@ export function browserSession>(constructor: TCto
// Require state service to be injected
const storageService: AbstractMemoryStorageService = this.findStorageService(
- [this as any].concat(args)
+ [this as any].concat(args),
);
if (this.__syncedItemMetadata == null || !(this.__syncedItemMetadata instanceof Array)) {
@@ -31,7 +31,7 @@ export function browserSession>(constructor: TCto
}
this.__sessionSyncers = this.__syncedItemMetadata.map((metadata) =>
- this.buildSyncer(metadata, storageService)
+ this.buildSyncer(metadata, storageService),
);
}
@@ -39,7 +39,7 @@ export function browserSession>(constructor: TCto
const syncer = new SessionSyncer(
(this as any)[metadata.propertyKey],
storageSerice,
- metadata
+ metadata,
);
syncer.init();
return syncer;
@@ -54,14 +54,15 @@ export function browserSession>(constructor: TCto
const stateService = args.find(
(arg) =>
- arg?.memoryStorageService != null && this.isMemoryStorageService(arg.memoryStorageService)
+ arg?.memoryStorageService != null &&
+ this.isMemoryStorageService(arg.memoryStorageService),
);
if (stateService) {
return stateService.memoryStorageService;
}
throw new Error(
- `Cannot decorate ${constructor.name} with browserSession, Browser's AbstractMemoryStorageService must be accessible through the observed classes parameters`
+ `Cannot decorate ${constructor.name} with browserSession, Browser's AbstractMemoryStorageService must be accessible through the observed classes parameters`,
);
}
diff --git a/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.spec.ts b/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.spec.ts
index 96c5a4eea55..f163cf495a9 100644
--- a/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.spec.ts
+++ b/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.spec.ts
@@ -55,7 +55,7 @@ describe("session syncer", () => {
sessionKey,
initializeAs: "object",
initializer: () => null,
- })
+ }),
).toBeDefined();
expect(
new SessionSyncer(behaviorSubject, storageService, {
@@ -63,7 +63,7 @@ describe("session syncer", () => {
sessionKey,
initializer: (s: any) => s,
initializeAs: "object",
- })
+ }),
).toBeDefined();
});
it("should throw if neither ctor or initializer is provided", () => {
diff --git a/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.ts b/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.ts
index 120c4b8b58c..7f57e6431e2 100644
--- a/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.ts
+++ b/apps/browser/src/platform/decorators/session-sync-observable/session-syncer.ts
@@ -17,7 +17,7 @@ export class SessionSyncer {
constructor(
private subject: Subject,
private memoryStorageService: AbstractMemoryStorageService,
- private metaData: SyncedItemMetadata
+ private metaData: SyncedItemMetadata,
) {
if (!(subject instanceof Subject)) {
throw new Error("subject must inherit from Subject");
@@ -66,7 +66,7 @@ export class SessionSyncer {
return;
}
await this.updateSession(next);
- })
+ }),
)
.subscribe();
}
diff --git a/apps/browser/src/platform/globals.d.ts b/apps/browser/src/platform/globals.d.ts
index 9c7be016b0b..9e53d898027 100644
--- a/apps/browser/src/platform/globals.d.ts
+++ b/apps/browser/src/platform/globals.d.ts
@@ -10,7 +10,7 @@ type OperaAddons = {
installExtension: (
id: string,
success_callback: () => void,
- error_callback: (errorMessage: string) => void
+ error_callback: (errorMessage: string) => void,
) => void;
};
@@ -49,7 +49,7 @@ type OperaSidebarAction = {
path?: string | Record;
tabId?: number;
},
- callback?: () => void
+ callback?: () => void,
) => void;
/**
* @link https://dev.opera.com/extensions/sidebar-action-api/#method-setpanel
@@ -84,7 +84,7 @@ type OperaSidebarAction = {
*/
getBadgeBackgroundColor: (
details: { tabId?: number },
- callback: (result: ColorArray) => void
+ callback: (result: ColorArray) => void,
) => void;
/**
* *Not supported on mac*
diff --git a/apps/browser/src/platform/listeners/combine.ts b/apps/browser/src/platform/listeners/combine.ts
index 91d2af7ba55..4737da2cbf7 100644
--- a/apps/browser/src/platform/listeners/combine.ts
+++ b/apps/browser/src/platform/listeners/combine.ts
@@ -4,7 +4,7 @@ type Listener = (...args: [...T, CachedServices]) => Promis
export const combine = (
listeners: Listener[],
- startingServices: CachedServices = {}
+ startingServices: CachedServices = {},
) => {
return async (...args: T) => {
const cachedServices = { ...startingServices };
diff --git a/apps/browser/src/platform/listeners/on-command-listener.ts b/apps/browser/src/platform/listeners/on-command-listener.ts
index 04f8b72dbfb..893136205a0 100644
--- a/apps/browser/src/platform/listeners/on-command-listener.ts
+++ b/apps/browser/src/platform/listeners/on-command-listener.ts
@@ -98,7 +98,7 @@ const doGeneratePasswordToClipboard = async (tab: chrome.tabs.Tab): Promise
+ serviceCache: Record,
) {
await new UpdateBadge(self).run({ windowId, existingServices: serviceCache });
}
static async tabsOnActivatedListener(
activeInfo: chrome.tabs.TabActiveInfo,
- serviceCache: Record
+ serviceCache: Record,
) {
await new UpdateBadge(self).run({
tabId: activeInfo.tabId,
@@ -63,7 +63,7 @@ export class UpdateBadge {
static async tabsOnReplacedListener(
addedTabId: number,
removedTabId: number,
- serviceCache: Record
+ serviceCache: Record,
) {
await new UpdateBadge(self).run({ tabId: addedTabId, existingServices: serviceCache });
}
@@ -72,7 +72,7 @@ export class UpdateBadge {
tabId: number,
changeInfo: chrome.tabs.TabChangeInfo,
tab: chrome.tabs.Tab,
- serviceCache: Record
+ serviceCache: Record,
) {
await new UpdateBadge(self).run({
tabId,
@@ -83,7 +83,7 @@ export class UpdateBadge {
static async messageListener(
message: { command: string; tabId: number },
- serviceCache: Record
+ serviceCache: Record,
) {
if (!UpdateBadge.listenedToCommands.includes(message.command)) {
return;
@@ -229,7 +229,7 @@ export class UpdateBadge {
if (this.isOperaSidebar(this.sidebarAction)) {
await new Promise((resolve) =>
- (this.sidebarAction as OperaSidebarAction).setIcon(options, () => resolve())
+ (this.sidebarAction as OperaSidebarAction).setIcon(options, () => resolve()),
);
} else {
await this.sidebarAction.setIcon(options);
@@ -290,7 +290,7 @@ export class UpdateBadge {
if (!self.bitwardenContainerService) {
new ContainerService(
serviceCache.cryptoService as CryptoService,
- serviceCache.encryptService as EncryptService
+ serviceCache.encryptService as EncryptService,
).attachToGlobal(self);
}
@@ -300,7 +300,7 @@ export class UpdateBadge {
}
private isOperaSidebar(
- action: OperaSidebarAction | FirefoxSidebarAction
+ action: OperaSidebarAction | FirefoxSidebarAction,
): action is OperaSidebarAction {
return action != null && (action as OperaSidebarAction).setBadgeText != null;
}
diff --git a/apps/browser/src/platform/popup/browser-popup-utils.spec.ts b/apps/browser/src/platform/popup/browser-popup-utils.spec.ts
index 7a9136ff9eb..6db22a10cab 100644
--- a/apps/browser/src/platform/popup/browser-popup-utils.spec.ts
+++ b/apps/browser/src/platform/popup/browser-popup-utils.spec.ts
@@ -383,7 +383,7 @@ describe("BrowserPopupUtils", () => {
it("returns false if the popoutKey is not provided", async () => {
await expect(BrowserPopupUtils["isSingleActionPopoutOpen"](undefined, {})).resolves.toBe(
- false
+ false,
);
});
@@ -391,7 +391,7 @@ describe("BrowserPopupUtils", () => {
jest.spyOn(BrowserApi, "tabsQuery").mockResolvedValueOnce([]);
await expect(
- BrowserPopupUtils["isSingleActionPopoutOpen"]("123", windowOptions)
+ BrowserPopupUtils["isSingleActionPopoutOpen"]("123", windowOptions),
).resolves.toBe(false);
});
@@ -412,7 +412,7 @@ describe("BrowserPopupUtils", () => {
]);
await expect(
- BrowserPopupUtils["isSingleActionPopoutOpen"]("789", windowOptions)
+ BrowserPopupUtils["isSingleActionPopoutOpen"]("789", windowOptions),
).resolves.toBe(false);
});
@@ -433,7 +433,7 @@ describe("BrowserPopupUtils", () => {
]);
await expect(
- BrowserPopupUtils["isSingleActionPopoutOpen"]("123", windowOptions)
+ BrowserPopupUtils["isSingleActionPopoutOpen"]("123", windowOptions),
).resolves.toBe(true);
expect(BrowserApi.updateWindowProperties).toHaveBeenCalledWith(2, {
focused: true,
diff --git a/apps/browser/src/platform/popup/browser-popup-utils.ts b/apps/browser/src/platform/popup/browser-popup-utils.ts
index 3e687fa0815..3872c6b9ca8 100644
--- a/apps/browser/src/platform/popup/browser-popup-utils.ts
+++ b/apps/browser/src/platform/popup/browser-popup-utils.ts
@@ -67,7 +67,7 @@ class BrowserPopupUtils {
options: ScrollOptions = {
delay: 0,
containerSelector: "main",
- }
+ },
) {
const { delay, containerSelector } = options;
return new Promise((resolve) =>
@@ -78,7 +78,7 @@ class BrowserPopupUtils {
}
resolve();
- }, delay)
+ }, delay),
);
}
@@ -109,7 +109,7 @@ class BrowserPopupUtils {
singleActionKey?: string;
forceCloseExistingWindows?: boolean;
windowOptions?: Partial;
- } = {}
+ } = {},
) {
const { senderWindowId, singleActionKey, forceCloseExistingWindows, windowOptions } = options;
const defaultPopoutWindowOptions: chrome.windows.CreateData = {
@@ -128,7 +128,7 @@ class BrowserPopupUtils {
...defaultPopoutWindowOptions,
...windowOptions,
url: chrome.runtime.getURL(
- BrowserPopupUtils.buildPopoutUrlPath(extensionUrlPath, singleActionKey)
+ BrowserPopupUtils.buildPopoutUrlPath(extensionUrlPath, singleActionKey),
),
};
@@ -136,7 +136,7 @@ class BrowserPopupUtils {
(await BrowserPopupUtils.isSingleActionPopoutOpen(
singleActionKey,
popoutWindowOptions,
- forceCloseExistingWindows
+ forceCloseExistingWindows,
)) &&
!forceCloseExistingWindows
) {
@@ -199,7 +199,7 @@ class BrowserPopupUtils {
private static async isSingleActionPopoutOpen(
popoutKey: string | undefined,
windowInfo: chrome.windows.CreateData,
- forceCloseExistingWindows = false
+ forceCloseExistingWindows = false,
) {
if (!popoutKey) {
return false;
@@ -207,7 +207,7 @@ class BrowserPopupUtils {
const extensionUrl = chrome.runtime.getURL("popup/index.html");
const popoutTabs = (await BrowserApi.tabsQuery({ url: `${extensionUrl}*` })).filter((tab) =>
- tab.url.includes(`singleActionPopout=${popoutKey}`)
+ tab.url.includes(`singleActionPopout=${popoutKey}`),
);
if (popoutTabs.length === 0) {
return false;
@@ -240,7 +240,7 @@ class BrowserPopupUtils {
private static urlContainsSearchParams(
win: Window,
searchParam: string,
- searchValue: string
+ searchValue: string,
): boolean {
return win.location.href.indexOf(`${searchParam}=${searchValue}`) > -1;
}
@@ -257,7 +257,7 @@ class BrowserPopupUtils {
if (formattedExtensionUrlPath.includes("uilocation=")) {
formattedExtensionUrlPath = formattedExtensionUrlPath.replace(
/uilocation=[^&]*/g,
- "uilocation=popout"
+ "uilocation=popout",
);
} else {
formattedExtensionUrlPath +=
diff --git a/apps/browser/src/platform/popup/header.component.ts b/apps/browser/src/platform/popup/header.component.ts
index c32ee603458..a124c78f7b8 100644
--- a/apps/browser/src/platform/popup/header.component.ts
+++ b/apps/browser/src/platform/popup/header.component.ts
@@ -21,7 +21,7 @@ export class HeaderComponent {
}
return Object.values(accounts).some((a) => a.status !== AuthenticationStatus.LoggedOut);
- })
+ }),
);
}
}
diff --git a/apps/browser/src/platform/services/abstractions/abstract-chrome-storage-api.service.ts b/apps/browser/src/platform/services/abstractions/abstract-chrome-storage-api.service.ts
index 60ca9415e0e..22ce8d45649 100644
--- a/apps/browser/src/platform/services/abstractions/abstract-chrome-storage-api.service.ts
+++ b/apps/browser/src/platform/services/abstractions/abstract-chrome-storage-api.service.ts
@@ -32,7 +32,7 @@ export default abstract class AbstractChromeStorageService
updateType: updateType,
};
});
- })
+ }),
);
}
diff --git a/apps/browser/src/platform/services/abstractions/browser-state.service.ts b/apps/browser/src/platform/services/abstractions/browser-state.service.ts
index 30b1bb98635..88c2312762b 100644
--- a/apps/browser/src/platform/services/abstractions/browser-state.service.ts
+++ b/apps/browser/src/platform/services/abstractions/browser-state.service.ts
@@ -8,25 +8,25 @@ import { BrowserSendComponentState } from "../../../models/browserSendComponentS
export abstract class BrowserStateService extends BaseStateServiceAbstraction {
getBrowserGroupingComponentState: (
- options?: StorageOptions
+ options?: StorageOptions,
) => Promise;
setBrowserGroupingComponentState: (
value: BrowserGroupingsComponentState,
- options?: StorageOptions
+ options?: StorageOptions,
) => Promise;
getBrowserVaultItemsComponentState: (options?: StorageOptions) => Promise;
setBrowserVaultItemsComponentState: (
value: BrowserComponentState,
- options?: StorageOptions
+ options?: StorageOptions,
) => Promise;
getBrowserSendComponentState: (options?: StorageOptions) => Promise;
setBrowserSendComponentState: (
value: BrowserSendComponentState,
- options?: StorageOptions
+ options?: StorageOptions,
) => Promise;
getBrowserSendTypeComponentState: (options?: StorageOptions) => Promise;
setBrowserSendTypeComponentState: (
value: BrowserComponentState,
- options?: StorageOptions
+ options?: StorageOptions,
) => Promise;
}
diff --git a/apps/browser/src/platform/services/browser-config.service.ts b/apps/browser/src/platform/services/browser-config.service.ts
index 39d1fc565eb..557db4f33ce 100644
--- a/apps/browser/src/platform/services/browser-config.service.ts
+++ b/apps/browser/src/platform/services/browser-config.service.ts
@@ -21,7 +21,7 @@ export class BrowserConfigService extends ConfigService {
authService: AuthService,
environmentService: EnvironmentService,
logService: LogService,
- subscribe = false
+ subscribe = false,
) {
super(stateService, configApiService, authService, environmentService, logService, subscribe);
}
diff --git a/apps/browser/src/platform/services/browser-environment.service.ts b/apps/browser/src/platform/services/browser-environment.service.ts
index 08a4d811d9d..db716baf4a3 100644
--- a/apps/browser/src/platform/services/browser-environment.service.ts
+++ b/apps/browser/src/platform/services/browser-environment.service.ts
@@ -6,7 +6,10 @@ import { GroupPolicyEnvironment } from "../../admin-console/types/group-policy-e
import { devFlagEnabled, devFlagValue } from "../flags";
export class BrowserEnvironmentService extends EnvironmentService {
- constructor(stateService: StateService, private logService: LogService) {
+ constructor(
+ stateService: StateService,
+ private logService: LogService,
+ ) {
super(stateService);
}
diff --git a/apps/browser/src/platform/services/browser-file-download.service.ts b/apps/browser/src/platform/services/browser-file-download.service.ts
index 1ade74367f5..ec1de5f3668 100644
--- a/apps/browser/src/platform/services/browser-file-download.service.ts
+++ b/apps/browser/src/platform/services/browser-file-download.service.ts
@@ -26,7 +26,7 @@ export class BrowserFileDownloadService implements FileDownloadService {
blobOptions: request.blobOptions,
fileName: request.fileName,
}),
- true
+ true,
);
} else {
const a = window.document.createElement("a");
diff --git a/apps/browser/src/platform/services/browser-i18n.service.ts b/apps/browser/src/platform/services/browser-i18n.service.ts
index 03406c5b706..66821bc1582 100644
--- a/apps/browser/src/platform/services/browser-i18n.service.ts
+++ b/apps/browser/src/platform/services/browser-i18n.service.ts
@@ -11,7 +11,10 @@ export class BrowserI18nService extends I18nService {
@sessionSync({ initializer: (s: string) => s })
protected _locale: ReplaySubject;
- constructor(systemLanguage: string, private stateService: StateService) {
+ constructor(
+ systemLanguage: string,
+ private stateService: StateService,
+ ) {
super(systemLanguage);
}
}
diff --git a/apps/browser/src/platform/services/browser-platform-utils.service.ts b/apps/browser/src/platform/services/browser-platform-utils.service.ts
index 018b1c623dc..a610afd733d 100644
--- a/apps/browser/src/platform/services/browser-platform-utils.service.ts
+++ b/apps/browser/src/platform/services/browser-platform-utils.service.ts
@@ -12,7 +12,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
private messagingService: MessagingService,
private clipboardWriteCallback: (clipboardValue: string, clearMs: number) => void,
private biometricCallback: () => Promise,
- private win: Window & typeof globalThis
+ private win: Window & typeof globalThis,
) {}
static getDevice(win: Window & typeof globalThis): DeviceType {
@@ -197,7 +197,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
type: "error" | "success" | "warning" | "info",
title: string,
text: string | string[],
- options?: any
+ options?: any,
): void {
this.messagingService.send("showToast", {
text: text,
@@ -332,7 +332,7 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
autofillCommand = "Cmd+Shift+L";
} else if (this.isFirefox()) {
autofillCommand = (await browser.commands.getAll()).find(
- (c) => c.name === "autofill_login"
+ (c) => c.name === "autofill_login",
).shortcut;
// Firefox is returning Ctrl instead of Cmd for the modifier key on macOS if
// the command is the default one set on installation.
@@ -345,8 +345,8 @@ export default class BrowserPlatformUtilsService implements PlatformUtilsService
} else {
await new Promise((resolve) =>
chrome.commands.getAll((c) =>
- resolve((autofillCommand = c.find((c) => c.name === "autofill_login").shortcut))
- )
+ resolve((autofillCommand = c.find((c) => c.name === "autofill_login").shortcut)),
+ ),
);
}
return autofillCommand;
diff --git a/apps/browser/src/platform/services/browser-state.service.spec.ts b/apps/browser/src/platform/services/browser-state.service.spec.ts
index c63aae74036..08393ca0de3 100644
--- a/apps/browser/src/platform/services/browser-state.service.spec.ts
+++ b/apps/browser/src/platform/services/browser-state.service.spec.ts
@@ -66,7 +66,7 @@ describe("Browser State Service", () => {
logService,
stateFactory,
accountService,
- useAccountCache
+ useAccountCache,
);
});
diff --git a/apps/browser/src/platform/services/browser-state.service.ts b/apps/browser/src/platform/services/browser-state.service.ts
index ae5abb8a897..798139561f1 100644
--- a/apps/browser/src/platform/services/browser-state.service.ts
+++ b/apps/browser/src/platform/services/browser-state.service.ts
@@ -44,7 +44,7 @@ export class BrowserStateService
logService: LogService,
stateFactory: StateFactory,
accountService: AccountService,
- useAccountCache = true
+ useAccountCache = true,
) {
super(
storageService,
@@ -53,7 +53,7 @@ export class BrowserStateService
logService,
stateFactory,
accountService,
- useAccountCache
+ useAccountCache,
);
// TODO: This is a hack to fix having a disk cache on both the popup and
@@ -88,7 +88,7 @@ export class BrowserStateService
}
async getBrowserGroupingComponentState(
- options?: StorageOptions
+ options?: StorageOptions,
): Promise {
return (
await this.getAccount(this.reconcileOptions(options, await this.defaultInMemoryOptions()))
@@ -97,20 +97,20 @@ export class BrowserStateService
async setBrowserGroupingComponentState(
value: BrowserGroupingsComponentState,
- options?: StorageOptions
+ options?: StorageOptions,
): Promise {
const account = await this.getAccount(
- this.reconcileOptions(options, await this.defaultInMemoryOptions())
+ this.reconcileOptions(options, await this.defaultInMemoryOptions()),
);
account.groupings = value;
await this.saveAccount(
account,
- this.reconcileOptions(options, await this.defaultInMemoryOptions())
+ this.reconcileOptions(options, await this.defaultInMemoryOptions()),
);
}
async getBrowserVaultItemsComponentState(
- options?: StorageOptions
+ options?: StorageOptions,
): Promise {
return (
await this.getAccount(this.reconcileOptions(options, await this.defaultInMemoryOptions()))
@@ -119,15 +119,15 @@ export class BrowserStateService
async setBrowserVaultItemsComponentState(
value: BrowserComponentState,
- options?: StorageOptions
+ options?: StorageOptions,
): Promise {
const account = await this.getAccount(
- this.reconcileOptions(options, await this.defaultInMemoryOptions())
+ this.reconcileOptions(options, await this.defaultInMemoryOptions()),
);
account.ciphers = value;
await this.saveAccount(
account,
- this.reconcileOptions(options, await this.defaultInMemoryOptions())
+ this.reconcileOptions(options, await this.defaultInMemoryOptions()),
);
}
@@ -139,15 +139,15 @@ export class BrowserStateService
async setBrowserSendComponentState(
value: BrowserSendComponentState,
- options?: StorageOptions
+ options?: StorageOptions,
): Promise {
const account = await this.getAccount(
- this.reconcileOptions(options, await this.defaultInMemoryOptions())
+ this.reconcileOptions(options, await this.defaultInMemoryOptions()),
);
account.send = value;
await this.saveAccount(
account,
- this.reconcileOptions(options, await this.defaultInMemoryOptions())
+ this.reconcileOptions(options, await this.defaultInMemoryOptions()),
);
}
@@ -159,15 +159,15 @@ export class BrowserStateService
async setBrowserSendTypeComponentState(
value: BrowserComponentState,
- options?: StorageOptions
+ options?: StorageOptions,
): Promise {
const account = await this.getAccount(
- this.reconcileOptions(options, await this.defaultInMemoryOptions())
+ this.reconcileOptions(options, await this.defaultInMemoryOptions()),
);
account.sendType = value;
await this.saveAccount(
account,
- this.reconcileOptions(options, await this.defaultInMemoryOptions())
+ this.reconcileOptions(options, await this.defaultInMemoryOptions()),
);
}
@@ -175,7 +175,7 @@ export class BrowserStateService
// to delete the cache in the constructor above.
protected override async saveAccountToDisk(
account: Account,
- options: StorageOptions
+ options: StorageOptions,
): Promise {
const storageLocation = options.useSecureStorage
? this.secureStorageService
diff --git a/apps/browser/src/platform/services/key-generation.service.ts b/apps/browser/src/platform/services/key-generation.service.ts
index b2c76e1aee2..6b6f552c715 100644
--- a/apps/browser/src/platform/services/key-generation.service.ts
+++ b/apps/browser/src/platform/services/key-generation.service.ts
@@ -13,7 +13,7 @@ export class KeyGenerationService implements AbstractKeyGenerationService {
"bitwarden-ephemeral",
"ephemeral",
64,
- "sha256"
+ "sha256",
);
return new SymmetricCryptoKey(key);
}
diff --git a/apps/browser/src/platform/services/local-backed-session-storage.service.ts b/apps/browser/src/platform/services/local-backed-session-storage.service.ts
index 8f6d519bcf1..d17a338f7fb 100644
--- a/apps/browser/src/platform/services/local-backed-session-storage.service.ts
+++ b/apps/browser/src/platform/services/local-backed-session-storage.service.ts
@@ -31,7 +31,7 @@ export class LocalBackedSessionStorageService extends AbstractMemoryStorageServi
constructor(
private encryptService: EncryptService,
- private keyGenerationService: AbstractKeyGenerationService
+ private keyGenerationService: AbstractKeyGenerationService,
) {
super();
this.updates$ = this.updatesSubject.asObservable();
diff --git a/apps/browser/src/platform/storage/foreground-memory-storage.service.ts b/apps/browser/src/platform/storage/foreground-memory-storage.service.ts
index 25c59798877..1e5220002a8 100644
--- a/apps/browser/src/platform/storage/foreground-memory-storage.service.ts
+++ b/apps/browser/src/platform/storage/foreground-memory-storage.service.ts
@@ -29,14 +29,14 @@ export class ForegroundMemoryStorageService extends AbstractMemoryStorageService
this._port = chrome.runtime.connect({ name: portName(chrome.storage.session) });
this._backgroundResponses$ = fromChromeEvent(this._port.onMessage).pipe(
map(([message]) => message),
- filter((message) => message.originator === "background")
+ filter((message) => message.originator === "background"),
);
this._backgroundResponses$
.pipe(
filter(
- (message) => message.action === "subject_update" || message.action === "initialization"
- )
+ (message) => message.action === "subject_update" || message.action === "initialization",
+ ),
)
.subscribe((message) => {
switch (message.action) {
@@ -71,15 +71,15 @@ export class ForegroundMemoryStorageService extends AbstractMemoryStorageService
private async delegateToBackground(
action: MemoryStoragePortMessage["action"],
key: string,
- data?: T
+ data?: T,
): Promise {
const id = Utils.newGuid();
// listen for response before request
const response = firstValueFrom(
this._backgroundResponses$.pipe(
filter((message) => message.id === id),
- map((message) => JSON.parse((message.data as string) ?? null) as T)
- )
+ map((message) => JSON.parse((message.data as string) ?? null) as T),
+ ),
);
this.sendMessage({
diff --git a/apps/browser/src/platform/storage/memory-storage-service-interactions.spec.ts b/apps/browser/src/platform/storage/memory-storage-service-interactions.spec.ts
index f9d59b8962a..0f604035247 100644
--- a/apps/browser/src/platform/storage/memory-storage-service-interactions.spec.ts
+++ b/apps/browser/src/platform/storage/memory-storage-service-interactions.spec.ts
@@ -34,7 +34,7 @@ describe("foreground background memory storage interaction", () => {
const result = await foreground[action](key);
expect(result).toEqual(value);
- }
+ },
);
test("background should call save from foreground", async () => {
diff --git a/apps/browser/src/popup/app-routing.animations.ts b/apps/browser/src/popup/app-routing.animations.ts
index 42baf65c270..6edd839fde4 100644
--- a/apps/browser/src/popup/app-routing.animations.ts
+++ b/apps/browser/src/popup/app-routing.animations.ts
@@ -5,7 +5,7 @@ const queryShown = query(
[style({ position: "fixed", width: "100%", height: "100%" })],
{
optional: true,
- }
+ },
);
// ref: https://github.com/angular/angular/issues/15477
@@ -20,7 +20,7 @@ export function queryTranslate(
axis: string,
from: number,
to: number,
- zIndex = 1000
+ zIndex = 1000,
) {
return query(
":" + direction,
@@ -32,7 +32,7 @@ export function queryTranslate(
}),
animate(speed + " ease-in-out", style({ transform: "translate" + axis + "(" + to + "%)" })),
],
- { optional: true }
+ { optional: true },
);
}
@@ -144,7 +144,7 @@ export const routerTransition = trigger("routerTransition", [
transition("view-cipher => edit-cipher, view-cipher => cipher-password-history", inSlideUp),
transition(
"edit-cipher => view-cipher, cipher-password-history => view-cipher, edit-cipher => tabs",
- outSlideDown
+ outSlideDown,
),
transition("view-cipher => clone-cipher", inSlideUp),
@@ -161,11 +161,11 @@ export const routerTransition = trigger("routerTransition", [
transition(
"add-cipher => generator, edit-cipher => generator, clone-cipher => generator",
- inSlideUp
+ inSlideUp,
),
transition(
"generator => add-cipher, generator => edit-cipher, generator => clone-cipher",
- outSlideDown
+ outSlideDown,
),
transition("edit-cipher => attachments, edit-cipher => collections", inSlideLeft),
diff --git a/apps/browser/src/popup/app.component.ts b/apps/browser/src/popup/app.component.ts
index 0a402f7c370..ed0707691ac 100644
--- a/apps/browser/src/popup/app.component.ts
+++ b/apps/browser/src/popup/app.component.ts
@@ -52,7 +52,7 @@ export class AppComponent implements OnInit, OnDestroy {
private sanitizer: DomSanitizer,
private platformUtilsService: PlatformUtilsService,
private dialogService: DialogService,
- private browserMessagingApi: ZonedMessageListenerService
+ private browserMessagingApi: ZonedMessageListenerService,
) {}
async ngOnInit() {
@@ -70,7 +70,7 @@ export class AppComponent implements OnInit, OnDestroy {
concatMap(async () => {
await this.recordActivity();
}),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe();
@@ -120,7 +120,7 @@ export class AppComponent implements OnInit, OnDestroy {
// Wait to make sure background has reloaded first.
window.setTimeout(
() => BrowserApi.reloadExtension(forceWindowReload ? window : null),
- 2000
+ 2000,
);
} else if (msg.command === "reloadPopup") {
this.router.navigate(["/"]);
@@ -214,7 +214,7 @@ export class AppComponent implements OnInit, OnDestroy {
} else {
msg.text.forEach(
(t: string) =>
- (message += "" + this.sanitizer.sanitize(SecurityContext.HTML, t) + "
")
+ (message += "" + this.sanitizer.sanitize(SecurityContext.HTML, t) + "
"),
);
options.enableHtml = true;
}
diff --git a/apps/browser/src/popup/index.html b/apps/browser/src/popup/index.html
index 17f50e0a0eb..e76a8c749fd 100644
--- a/apps/browser/src/popup/index.html
+++ b/apps/browser/src/popup/index.html
@@ -1,4 +1,4 @@
-
+
diff --git a/apps/browser/src/popup/scss/environment.scss b/apps/browser/src/popup/scss/environment.scss
index f6adba86c2e..0fb8e0ddaba 100644
--- a/apps/browser/src/popup/scss/environment.scss
+++ b/apps/browser/src/popup/scss/environment.scss
@@ -65,7 +65,9 @@ html.browser_safari {
}
padding: 5px;
width: 100%;
- box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12),
+ box-shadow:
+ 0 2px 2px 0 rgba(0, 0, 0, 0.14),
+ 0 3px 1px -2px rgba(0, 0, 0, 0.12),
0 1px 5px 0 rgba(0, 0, 0, 0.2);
border-radius: $border-radius;
}
diff --git a/apps/browser/src/popup/services/debounceNavigationService.ts b/apps/browser/src/popup/services/debounceNavigationService.ts
index bf1e2e83ca5..091f817be92 100644
--- a/apps/browser/src/popup/services/debounceNavigationService.ts
+++ b/apps/browser/src/popup/services/debounceNavigationService.ts
@@ -16,11 +16,11 @@ export class DebounceNavigationService implements CanActivate, OnDestroy {
this.navigationStartSub = this.router.events
.pipe(
filter((event) => event instanceof NavigationStart),
- pairwise()
+ pairwise(),
)
.subscribe(
(events: [NavigationStart, NavigationStart]) =>
- ([this.lastNavigation, this.thisNavigation] = events)
+ ([this.lastNavigation, this.thisNavigation] = events),
);
this.navigationSuccessSub = this.router.events
diff --git a/apps/browser/src/popup/services/init.service.ts b/apps/browser/src/popup/services/init.service.ts
index 78fbdfaa9f1..005664bdd20 100644
--- a/apps/browser/src/popup/services/init.service.ts
+++ b/apps/browser/src/popup/services/init.service.ts
@@ -17,7 +17,7 @@ export class InitService {
private stateService: StateServiceAbstraction,
private logService: LogServiceAbstraction,
private themingService: AbstractThemingService,
- private configService: ConfigService
+ private configService: ConfigService,
) {}
init() {
diff --git a/apps/browser/src/popup/services/popup-close-warning.service.ts b/apps/browser/src/popup/services/popup-close-warning.service.ts
index 536def47d5d..01e91ecad70 100644
--- a/apps/browser/src/popup/services/popup-close-warning.service.ts
+++ b/apps/browser/src/popup/services/popup-close-warning.service.ts
@@ -26,7 +26,7 @@ export class PopupCloseWarningService {
// Older methods with better support
e.returnValue = confirmationMessage;
return confirmationMessage;
- }
+ },
);
}
diff --git a/apps/browser/src/popup/services/popup-search.service.ts b/apps/browser/src/popup/services/popup-search.service.ts
index 43fbed055e8..7eea1265a23 100644
--- a/apps/browser/src/popup/services/popup-search.service.ts
+++ b/apps/browser/src/popup/services/popup-search.service.ts
@@ -6,7 +6,7 @@ export class PopupSearchService extends SearchService {
constructor(
private mainSearchService: SearchService,
consoleLogService: ConsoleLogService,
- i18nService: I18nService
+ i18nService: I18nService,
) {
super(consoleLogService, i18nService);
}
diff --git a/apps/browser/src/popup/services/services.module.ts b/apps/browser/src/popup/services/services.module.ts
index 2cd0166f946..46b94f6a8c9 100644
--- a/apps/browser/src/popup/services/services.module.ts
+++ b/apps/browser/src/popup/services/services.module.ts
@@ -183,7 +183,7 @@ function getBgService(service: keyof MainBackground) {
return new PopupSearchService(
getBgService("searchService")(),
logService,
- i18nService
+ i18nService,
);
},
deps: [LogServiceAbstraction, I18nServiceAbstraction],
@@ -210,7 +210,7 @@ function getBgService(service: keyof MainBackground) {
cryptoService: CryptoService,
i18nService: I18nServiceAbstraction,
cipherService: CipherService,
- stateService: StateServiceAbstraction
+ stateService: StateServiceAbstraction,
) => {
return new BrowserFolderService(cryptoService, i18nService, cipherService, stateService);
},
@@ -293,7 +293,7 @@ function getBgService(service: keyof MainBackground) {
provide: PolicyService,
useFactory: (
stateService: StateServiceAbstraction,
- organizationService: OrganizationService
+ organizationService: OrganizationService,
) => {
return new BrowserPolicyService(stateService, organizationService);
},
@@ -304,7 +304,7 @@ function getBgService(service: keyof MainBackground) {
useFactory: (
policyService: InternalPolicyService,
apiService: ApiService,
- stateService: StateService
+ stateService: StateService,
) => {
return new PolicyApiService(policyService, apiService, stateService);
},
@@ -332,13 +332,13 @@ function getBgService(service: keyof MainBackground) {
cryptoService: CryptoService,
i18nService: I18nServiceAbstraction,
cryptoFunctionService: CryptoFunctionService,
- stateServiceAbstraction: StateServiceAbstraction
+ stateServiceAbstraction: StateServiceAbstraction,
) => {
return new BrowserSendService(
cryptoService,
i18nService,
cryptoFunctionService,
- stateServiceAbstraction
+ stateServiceAbstraction,
);
},
deps: [CryptoService, I18nServiceAbstraction, CryptoFunctionService, StateServiceAbstraction],
@@ -352,7 +352,7 @@ function getBgService(service: keyof MainBackground) {
useFactory: (
apiService: ApiService,
fileUploadService: FileUploadService,
- sendService: InternalSendServiceAbstraction
+ sendService: InternalSendServiceAbstraction,
) => {
return new SendApiService(apiService, fileUploadService, sendService);
},
@@ -430,7 +430,7 @@ function getBgService(service: keyof MainBackground) {
stateService: StateServiceAbstraction,
organizationService: OrganizationService,
folderService: FolderService,
- policyService: PolicyService
+ policyService: PolicyService,
) => {
return new VaultFilterService(
stateService,
@@ -438,7 +438,7 @@ function getBgService(service: keyof MainBackground) {
folderService,
getBgService("cipherService")(),
getBgService("collectionService")(),
- policyService
+ policyService,
);
},
deps: [StateServiceAbstraction, OrganizationService, FolderService, PolicyService],
@@ -472,7 +472,7 @@ function getBgService(service: keyof MainBackground) {
secureStorageService: AbstractStorageService,
memoryStorageService: AbstractMemoryStorageService,
logService: LogServiceAbstraction,
- accountService: AccountServiceAbstraction
+ accountService: AccountServiceAbstraction,
) => {
return new BrowserStateService(
storageService,
@@ -480,7 +480,7 @@ function getBgService(service: keyof MainBackground) {
memoryStorageService,
logService,
new StateFactory(GlobalState, Account),
- accountService
+ accountService,
);
},
deps: [
@@ -514,14 +514,14 @@ function getBgService(service: keyof MainBackground) {
provide: AbstractThemingService,
useFactory: (
stateService: StateServiceAbstraction,
- platformUtilsService: PlatformUtilsService
+ platformUtilsService: PlatformUtilsService,
) => {
return new ThemingService(
stateService,
// Safari doesn't properly handle the (prefers-color-scheme) media query in the popup window, it always returns light.
// In Safari we have to use the background page instead, which comes with limitations like not dynamically changing the extension theme when the system theme is changed.
platformUtilsService.isSafari() ? getBgService("backgroundWindow")() : window,
- document
+ document,
);
},
deps: [StateServiceAbstraction, PlatformUtilsService],
diff --git a/apps/browser/src/popup/settings/about.component.html b/apps/browser/src/popup/settings/about.component.html
index b68f592492f..b4086178340 100644
--- a/apps/browser/src/popup/settings/about.component.html
+++ b/apps/browser/src/popup/settings/about.component.html
@@ -10,7 +10,7 @@
{{ "serverVersion" | i18n }}: {{ this.serverConfig?.version }}
- ({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
+ ({{ "lastSeenOn" | i18n: (serverConfig.utcDate | date: "mediumDate") }})
@@ -20,11 +20,11 @@
{{ "serverVersion" | i18n }} ({{ "thirdParty" | i18n }}):
{{ this.serverConfig?.version }}
- ({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
+ ({{ "lastSeenOn" | i18n: (serverConfig.utcDate | date: "mediumDate") }})
- {{ "thirdPartyServerMessage" | i18n : serverConfig.server?.name }}
+ {{ "thirdPartyServerMessage" | i18n: serverConfig.server?.name }}
@@ -32,7 +32,7 @@
{{ "serverVersion" | i18n }} ({{ "selfHostedServer" | i18n }}):
{{ this.serverConfig?.version }}
- ({{ "lastSeenOn" | i18n : (serverConfig.utcDate | date : "mediumDate") }})
+ ({{ "lastSeenOn" | i18n: (serverConfig.utcDate | date: "mediumDate") }})
diff --git a/apps/browser/src/popup/settings/about.component.ts b/apps/browser/src/popup/settings/about.component.ts
index c0c9012f341..d6f6f000b61 100644
--- a/apps/browser/src/popup/settings/about.component.ts
+++ b/apps/browser/src/popup/settings/about.component.ts
@@ -24,6 +24,6 @@ export class AboutComponent {
constructor(
private configService: ConfigServiceAbstraction,
- private environmentService: EnvironmentService
+ private environmentService: EnvironmentService,
) {}
}
diff --git a/apps/browser/src/popup/settings/autofill.component.ts b/apps/browser/src/popup/settings/autofill.component.ts
index fb544d7526a..37dc691c9ba 100644
--- a/apps/browser/src/popup/settings/autofill.component.ts
+++ b/apps/browser/src/popup/settings/autofill.component.ts
@@ -37,7 +37,7 @@ export class AutofillComponent implements OnInit {
private platformUtilsService: PlatformUtilsService,
private configService: ConfigServiceAbstraction,
private settingsService: SettingsService,
- private dialogService: DialogService
+ private dialogService: DialogService,
) {
this.autoFillOverlayVisibilityOptions = [
{
@@ -75,7 +75,7 @@ export class AutofillComponent implements OnInit {
this.defaultBrowserAutofillDisabled = await this.browserAutofillSettingCurrentlyOverridden();
this.isAutoFillOverlayFlagEnabled = await this.configService.getFeatureFlag(
- FeatureFlag.AutofillOverlay
+ FeatureFlag.AutofillOverlay,
);
this.autoFillOverlayVisibility =
(await this.settingsService.getAutoFillOverlayVisibility()) || AutofillOverlayVisibility.Off;
diff --git a/apps/browser/src/popup/settings/excluded-domains.component.html b/apps/browser/src/popup/settings/excluded-domains.component.html
index 51d6a20d5be..652eb4aef08 100644
--- a/apps/browser/src/popup/settings/excluded-domains.component.html
+++ b/apps/browser/src/popup/settings/excluded-domains.component.html
@@ -38,7 +38,7 @@
-
+
await this.loadCurrentUris(),
- 500
+ 500,
);
break;
default:
@@ -96,7 +96,7 @@ export class ExcludedDomainsComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
null,
- this.i18nService.t("excludedDomainsInvalidDomain", domain.uri)
+ this.i18nService.t("excludedDomainsInvalidDomain", domain.uri),
);
return;
}
@@ -116,7 +116,7 @@ export class ExcludedDomainsComponent implements OnInit, OnDestroy {
getNewlyAddedDomains(domain: ExcludedDomain[]): ExcludedDomain[] {
const result = this.excludedDomains.filter(
(newDomain) =>
- !this.existingExcludedDomains.some((oldDomain) => newDomain.uri === oldDomain.uri)
+ !this.existingExcludedDomains.some((oldDomain) => newDomain.uri === oldDomain.uri),
);
return result;
}
diff --git a/apps/browser/src/popup/settings/folders.component.ts b/apps/browser/src/popup/settings/folders.component.ts
index cae5d6f5106..6e97fb332a2 100644
--- a/apps/browser/src/popup/settings/folders.component.ts
+++ b/apps/browser/src/popup/settings/folders.component.ts
@@ -12,7 +12,10 @@ import { FolderView } from "@bitwarden/common/vault/models/view/folder.view";
export class FoldersComponent {
folders$: Observable
;
- constructor(private folderService: FolderService, private router: Router) {
+ constructor(
+ private folderService: FolderService,
+ private router: Router,
+ ) {
this.folders$ = this.folderService.folderViews$.pipe(
map((folders) => {
if (folders.length > 0) {
@@ -20,7 +23,7 @@ export class FoldersComponent {
}
return folders;
- })
+ }),
);
}
diff --git a/apps/browser/src/popup/settings/options.component.ts b/apps/browser/src/popup/settings/options.component.ts
index 4f943a857be..cac85405298 100644
--- a/apps/browser/src/popup/settings/options.component.ts
+++ b/apps/browser/src/popup/settings/options.component.ts
@@ -46,7 +46,7 @@ export class OptionsComponent implements OnInit {
private totpService: TotpService,
i18nService: I18nService,
private themingService: AbstractThemingService,
- private settingsService: SettingsService
+ private settingsService: SettingsService,
) {
this.themeOptions = [
{ name: i18nService.t("default"), value: ThemeType.System },
@@ -118,7 +118,7 @@ export class OptionsComponent implements OnInit {
async updateChangedPasswordNotification() {
await this.stateService.setDisableChangedPasswordNotification(
- !this.enableChangedPasswordNotification
+ !this.enableChangedPasswordNotification,
);
}
diff --git a/apps/browser/src/popup/settings/premium.component.ts b/apps/browser/src/popup/settings/premium.component.ts
index e57d53f3c40..cda93d5b68f 100644
--- a/apps/browser/src/popup/settings/premium.component.ts
+++ b/apps/browser/src/popup/settings/premium.component.ts
@@ -26,7 +26,7 @@ export class PremiumComponent extends BasePremiumComponent {
private location: Location,
private currencyPipe: CurrencyPipe,
dialogService: DialogService,
- environmentService: EnvironmentService
+ environmentService: EnvironmentService,
) {
super(
i18nService,
@@ -35,7 +35,7 @@ export class PremiumComponent extends BasePremiumComponent {
logService,
stateService,
dialogService,
- environmentService
+ environmentService,
);
// Support old price string. Can be removed in future once all translations are properly updated.
diff --git a/apps/browser/src/popup/settings/settings.component.html b/apps/browser/src/popup/settings/settings.component.html
index 0b752ac6ce6..140bf38dee0 100644
--- a/apps/browser/src/popup/settings/settings.component.html
+++ b/apps/browser/src/popup/settings/settings.component.html
@@ -52,14 +52,14 @@
{{
"vaultTimeoutPolicyWithActionInEffect"
- | i18n : policy.timeout.hours : policy.timeout.minutes : (policy.action | i18n)
+ | i18n: policy.timeout.hours : policy.timeout.minutes : (policy.action | i18n)
}}
- {{ "vaultTimeoutPolicyInEffect" | i18n : policy.timeout.hours : policy.timeout.minutes }}
+ {{ "vaultTimeoutPolicyInEffect" | i18n: policy.timeout.hours : policy.timeout.minutes }}
- {{ "vaultTimeoutActionPolicyInEffect" | i18n : (policy.action | i18n) }}
+ {{ "vaultTimeoutActionPolicyInEffect" | i18n: (policy.action | i18n) }}
{
await this.saveVaultTimeout(previousValue, newValue);
}),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe();
@@ -165,14 +165,14 @@ export class SettingsComponent implements OnInit {
concatMap(async ([previousValue, newValue]) => {
await this.saveVaultTimeoutAction(previousValue, newValue);
}),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe();
const initialValues = {
vaultTimeout: timeout,
vaultTimeoutAction: await firstValueFrom(
- this.vaultTimeoutSettingsService.vaultTimeoutAction$()
+ this.vaultTimeoutSettingsService.vaultTimeoutAction$(),
),
pin: pinStatus !== "DISABLED",
biometric: await this.vaultTimeoutSettingsService.isBiometricLockSet(),
@@ -189,7 +189,7 @@ export class SettingsComponent implements OnInit {
await this.updatePin(value);
this.refreshTimeoutSettings$.next();
}),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe();
@@ -205,7 +205,7 @@ export class SettingsComponent implements OnInit {
}
this.refreshTimeoutSettings$.next();
}),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe();
@@ -215,9 +215,9 @@ export class SettingsComponent implements OnInit {
combineLatest([
this.vaultTimeoutSettingsService.availableVaultTimeoutActions$(),
this.vaultTimeoutSettingsService.vaultTimeoutAction$(),
- ])
+ ]),
),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe(([availableActions, action]) => {
this.availableVaultTimeoutActions = availableActions;
@@ -235,9 +235,9 @@ export class SettingsComponent implements OnInit {
combineLatest([
this.vaultTimeoutSettingsService.availableVaultTimeoutActions$(),
maximumVaultTimeoutPolicy,
- ])
+ ]),
),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe(([availableActions, policy]) => {
if (policy?.data?.action || availableActions.length <= 1) {
@@ -268,14 +268,14 @@ export class SettingsComponent implements OnInit {
this.platformUtilsService.showToast(
"error",
null,
- this.i18nService.t("vaultTimeoutTooLarge")
+ this.i18nService.t("vaultTimeoutTooLarge"),
);
return;
}
await this.vaultTimeoutSettingsService.setVaultTimeoutOptions(
newValue,
- await firstValueFrom(this.vaultTimeoutSettingsService.vaultTimeoutAction$())
+ await firstValueFrom(this.vaultTimeoutSettingsService.vaultTimeoutAction$()),
);
if (newValue == null) {
this.messagingService.send("bgReseedStorage");
@@ -302,14 +302,14 @@ export class SettingsComponent implements OnInit {
this.platformUtilsService.showToast(
"error",
null,
- this.i18nService.t("vaultTimeoutTooLarge")
+ this.i18nService.t("vaultTimeoutTooLarge"),
);
return;
}
await this.vaultTimeoutSettingsService.setVaultTimeoutOptions(
this.form.value.vaultTimeout,
- newValue
+ newValue,
);
this.refreshTimeoutSettings$.next();
}
@@ -386,7 +386,7 @@ export class SettingsComponent implements OnInit {
this.platformUtilsService.showToast(
"error",
this.i18nService.t("errorEnableBiometricTitle"),
- this.i18nService.t("errorEnableBiometricDesc")
+ this.i18nService.t("errorEnableBiometricDesc"),
);
}
})
@@ -416,7 +416,7 @@ export class SettingsComponent implements OnInit {
async updateAutoBiometricsPrompt() {
await this.stateService.setDisableAutoBiometricsPrompt(
- !this.form.value.enableAutoBiometricsPrompt
+ !this.form.value.enableAutoBiometricsPrompt,
);
}
@@ -491,7 +491,7 @@ export class SettingsComponent implements OnInit {
async fingerprint() {
const fingerprint = await this.cryptoService.getFingerprint(
- await this.stateService.getUserId()
+ await this.stateService.getUserId(),
);
const dialogRef = FingerprintDialogComponent.open(this.dialogService, {
diff --git a/apps/browser/src/popup/settings/sync.component.ts b/apps/browser/src/popup/settings/sync.component.ts
index ffc20363f71..3fe4de9eb51 100644
--- a/apps/browser/src/popup/settings/sync.component.ts
+++ b/apps/browser/src/popup/settings/sync.component.ts
@@ -15,7 +15,7 @@ export class SyncComponent implements OnInit {
constructor(
private syncService: SyncService,
private platformUtilsService: PlatformUtilsService,
- private i18nService: I18nService
+ private i18nService: I18nService,
) {}
async ngOnInit() {
diff --git a/apps/browser/src/tools/background/service_factories/import-api-service.factory.ts b/apps/browser/src/tools/background/service_factories/import-api-service.factory.ts
index 00954a0dc60..37d0b9000c2 100644
--- a/apps/browser/src/tools/background/service_factories/import-api-service.factory.ts
+++ b/apps/browser/src/tools/background/service_factories/import-api-service.factory.ts
@@ -15,12 +15,12 @@ type ServiceCache = { importApiService?: ImportApiServiceAbstraction } & CachedS
export function importApiServiceFactory(
cache: ServiceCache,
- opts: ImportApiServiceInitOptions
+ opts: ImportApiServiceInitOptions,
): Promise {
return factory(
cache,
"importApiService",
opts,
- async () => new ImportApiService(await apiServiceFactory(cache, opts))
+ async () => new ImportApiService(await apiServiceFactory(cache, opts)),
);
}
diff --git a/apps/browser/src/tools/background/service_factories/import-service.factory.ts b/apps/browser/src/tools/background/service_factories/import-service.factory.ts
index 7f5328f4d07..e800dbabaa1 100644
--- a/apps/browser/src/tools/background/service_factories/import-service.factory.ts
+++ b/apps/browser/src/tools/background/service_factories/import-service.factory.ts
@@ -42,7 +42,7 @@ export function importServiceFactory(
cache: {
importService?: ImportServiceAbstraction;
} & CachedServices,
- opts: ImportServiceInitOptions
+ opts: ImportServiceInitOptions,
): Promise {
return factory(
cache,
@@ -55,7 +55,7 @@ export function importServiceFactory(
await importApiServiceFactory(cache, opts),
await i18nServiceFactory(cache, opts),
await collectionServiceFactory(cache, opts),
- await cryptoServiceFactory(cache, opts)
- )
+ await cryptoServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/tools/background/service_factories/password-generation-service.factory.ts b/apps/browser/src/tools/background/service_factories/password-generation-service.factory.ts
index b5a56dc1184..4b4d80e76d4 100644
--- a/apps/browser/src/tools/background/service_factories/password-generation-service.factory.ts
+++ b/apps/browser/src/tools/background/service_factories/password-generation-service.factory.ts
@@ -30,7 +30,7 @@ export type PasswordGenerationServiceInitOptions = PasswordGenerationServiceFact
export function passwordGenerationServiceFactory(
cache: { passwordGenerationService?: PasswordGenerationServiceAbstraction } & CachedServices,
- opts: PasswordGenerationServiceInitOptions
+ opts: PasswordGenerationServiceInitOptions,
): Promise {
return factory(
cache,
@@ -40,7 +40,7 @@ export function passwordGenerationServiceFactory(
new PasswordGenerationService(
await cryptoServiceFactory(cache, opts),
await policyServiceFactory(cache, opts),
- await stateServiceFactory(cache, opts)
- )
+ await stateServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/tools/background/service_factories/password-strength-service.factory.ts b/apps/browser/src/tools/background/service_factories/password-strength-service.factory.ts
index 3ebd4636fe3..c1e5b71ee32 100644
--- a/apps/browser/src/tools/background/service_factories/password-strength-service.factory.ts
+++ b/apps/browser/src/tools/background/service_factories/password-strength-service.factory.ts
@@ -17,7 +17,7 @@ export function passwordStrengthServiceFactory(
cache: {
passwordStrengthService?: PasswordStrengthServiceAbstraction;
} & CachedServices,
- opts: PasswordStrengthServiceInitOptions
+ opts: PasswordStrengthServiceInitOptions,
): Promise {
return factory(cache, "passwordStrengthService", opts, async () => new PasswordStrengthService());
}
diff --git a/apps/browser/src/tools/popup/generator/generator.component.ts b/apps/browser/src/tools/popup/generator/generator.component.ts
index 03d7442e6eb..e4263d3caa2 100644
--- a/apps/browser/src/tools/popup/generator/generator.component.ts
+++ b/apps/browser/src/tools/popup/generator/generator.component.ts
@@ -28,7 +28,7 @@ export class GeneratorComponent extends BaseGeneratorComponent {
stateService: StateService,
route: ActivatedRoute,
logService: LogService,
- private location: Location
+ private location: Location,
) {
super(
passwordGenerationService,
@@ -38,7 +38,7 @@ export class GeneratorComponent extends BaseGeneratorComponent {
i18nService,
logService,
route,
- window
+ window,
);
}
diff --git a/apps/browser/src/tools/popup/generator/password-generator-history.component.html b/apps/browser/src/tools/popup/generator/password-generator-history.component.html
index 22e07810d07..8f4a246fc5e 100644
--- a/apps/browser/src/tools/popup/generator/password-generator-history.component.html
+++ b/apps/browser/src/tools/popup/generator/password-generator-history.component.html
@@ -25,7 +25,7 @@
[appCopyText]="h.password"
[innerHTML]="h.password | colorPassword"
>
- {{ h.date | date : "medium" }}
+ {{ h.date | date: "medium" }}
diff --git a/apps/browser/src/tools/popup/generator/password-generator-history.component.ts b/apps/browser/src/tools/popup/generator/password-generator-history.component.ts
index fbe1ba10d33..8448077083e 100644
--- a/apps/browser/src/tools/popup/generator/password-generator-history.component.ts
+++ b/apps/browser/src/tools/popup/generator/password-generator-history.component.ts
@@ -15,7 +15,7 @@ export class PasswordGeneratorHistoryComponent extends BasePasswordGeneratorHist
passwordGenerationService: PasswordGenerationServiceAbstraction,
platformUtilsService: PlatformUtilsService,
i18nService: I18nService,
- private location: Location
+ private location: Location,
) {
super(passwordGenerationService, platformUtilsService, i18nService, window);
}
diff --git a/apps/browser/src/tools/popup/send/components/send-list.component.html b/apps/browser/src/tools/popup/send/components/send-list.component.html
index 3dc5af0106d..05c8e3e3754 100644
--- a/apps/browser/src/tools/popup/send/components/send-list.component.html
+++ b/apps/browser/src/tools/popup/send/components/send-list.component.html
@@ -57,7 +57,7 @@
{{ "pendingDeletion" | i18n }}
- {{ s.deletionDate | date : "medium" }}
+ {{ s.deletionDate | date: "medium" }}
diff --git a/apps/browser/src/tools/popup/send/send-add-edit.component.ts b/apps/browser/src/tools/popup/send/send-add-edit.component.ts
index 5ad664d871e..ef2b57992ac 100644
--- a/apps/browser/src/tools/popup/send/send-add-edit.component.ts
+++ b/apps/browser/src/tools/popup/send/send-add-edit.component.ts
@@ -48,7 +48,7 @@ export class SendAddEditComponent extends BaseAddEditComponent {
sendApiService: SendApiService,
dialogService: DialogService,
formBuilder: FormBuilder,
- private filePopoutUtilsService: FilePopoutUtilsService
+ private filePopoutUtilsService: FilePopoutUtilsService,
) {
super(
i18nService,
@@ -62,7 +62,7 @@ export class SendAddEditComponent extends BaseAddEditComponent {
stateService,
sendApiService,
dialogService,
- formBuilder
+ formBuilder,
);
}
diff --git a/apps/browser/src/tools/popup/send/send-groupings.component.ts b/apps/browser/src/tools/popup/send/send-groupings.component.ts
index 0fde93df8fe..40bb38d574f 100644
--- a/apps/browser/src/tools/popup/send/send-groupings.component.ts
+++ b/apps/browser/src/tools/popup/send/send-groupings.component.ts
@@ -50,7 +50,7 @@ export class SendGroupingsComponent extends BaseSendComponent {
private broadcasterService: BroadcasterService,
logService: LogService,
sendApiService: SendApiService,
- dialogService: DialogService
+ dialogService: DialogService,
) {
super(
sendService,
@@ -62,7 +62,7 @@ export class SendGroupingsComponent extends BaseSendComponent {
policyService,
logService,
sendApiService,
- dialogService
+ dialogService,
);
super.onSuccessfulLoad = async () => {
this.calculateTypeCounts();
diff --git a/apps/browser/src/tools/popup/send/send-type.component.ts b/apps/browser/src/tools/popup/send/send-type.component.ts
index 6e5e76a0e5d..f72be474f13 100644
--- a/apps/browser/src/tools/popup/send/send-type.component.ts
+++ b/apps/browser/src/tools/popup/send/send-type.component.ts
@@ -50,7 +50,7 @@ export class SendTypeComponent extends BaseSendComponent {
private router: Router,
logService: LogService,
sendApiService: SendApiService,
- dialogService: DialogService
+ dialogService: DialogService,
) {
super(
sendService,
@@ -62,7 +62,7 @@ export class SendTypeComponent extends BaseSendComponent {
policyService,
logService,
sendApiService,
- dialogService
+ dialogService,
);
super.onSuccessfulLoad = async () => {
this.selectType(this.type);
diff --git a/apps/browser/src/tools/popup/settings/export.component.ts b/apps/browser/src/tools/popup/settings/export.component.ts
index d34b86a9e46..7c0a294ec5e 100644
--- a/apps/browser/src/tools/popup/settings/export.component.ts
+++ b/apps/browser/src/tools/popup/settings/export.component.ts
@@ -31,7 +31,7 @@ export class ExportComponent extends BaseExportComponent {
userVerificationService: UserVerificationService,
formBuilder: UntypedFormBuilder,
fileDownloadService: FileDownloadService,
- dialogService: DialogService
+ dialogService: DialogService,
) {
super(
cryptoService,
@@ -45,7 +45,7 @@ export class ExportComponent extends BaseExportComponent {
userVerificationService,
formBuilder,
fileDownloadService,
- dialogService
+ dialogService,
);
}
diff --git a/apps/browser/src/vault/background/service_factories/cipher-service.factory.ts b/apps/browser/src/vault/background/service_factories/cipher-service.factory.ts
index 46062ebc9cc..3c539586333 100644
--- a/apps/browser/src/vault/background/service_factories/cipher-service.factory.ts
+++ b/apps/browser/src/vault/background/service_factories/cipher-service.factory.ts
@@ -58,7 +58,7 @@ export type CipherServiceInitOptions = CipherServiceFactoryOptions &
export function cipherServiceFactory(
cache: { cipherService?: AbstractCipherService } & CachedServices,
- opts: CipherServiceInitOptions
+ opts: CipherServiceInitOptions,
): Promise
{
return factory(
cache,
@@ -74,7 +74,7 @@ export function cipherServiceFactory(
await stateServiceFactory(cache, opts),
await encryptServiceFactory(cache, opts),
await cipherFileUploadServiceFactory(cache, opts),
- await configServiceFactory(cache, opts)
- )
+ await configServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/vault/background/service_factories/collection-service.factory.ts b/apps/browser/src/vault/background/service_factories/collection-service.factory.ts
index 323eebe27d1..fd576ca12c3 100644
--- a/apps/browser/src/vault/background/service_factories/collection-service.factory.ts
+++ b/apps/browser/src/vault/background/service_factories/collection-service.factory.ts
@@ -28,7 +28,7 @@ export type CollectionServiceInitOptions = CollectionServiceFactoryOptions &
export function collectionServiceFactory(
cache: { collectionService?: AbstractCollectionService } & CachedServices,
- opts: CollectionServiceInitOptions
+ opts: CollectionServiceInitOptions,
): Promise {
return factory(
cache,
@@ -38,7 +38,7 @@ export function collectionServiceFactory(
new CollectionService(
await cryptoServiceFactory(cache, opts),
await i18nServiceFactory(cache, opts),
- await stateServiceFactory(cache, opts)
- )
+ await stateServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/vault/background/service_factories/folder-service.factory.ts b/apps/browser/src/vault/background/service_factories/folder-service.factory.ts
index b33c79a012b..aeafbe5ef24 100644
--- a/apps/browser/src/vault/background/service_factories/folder-service.factory.ts
+++ b/apps/browser/src/vault/background/service_factories/folder-service.factory.ts
@@ -31,7 +31,7 @@ export type FolderServiceInitOptions = FolderServiceFactoryOptions &
export function folderServiceFactory(
cache: { folderService?: AbstractFolderService } & CachedServices,
- opts: FolderServiceInitOptions
+ opts: FolderServiceInitOptions,
): Promise {
return factory(
cache,
@@ -42,7 +42,7 @@ export function folderServiceFactory(
await cryptoServiceFactory(cache, opts),
await i18nServiceFactory(cache, opts),
await cipherServiceFactory(cache, opts),
- await stateServiceFactory(cache, opts)
- )
+ await stateServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/vault/background/service_factories/sync-notifier-service.factory.ts b/apps/browser/src/vault/background/service_factories/sync-notifier-service.factory.ts
index 9e976b3bf75..715d0f2c860 100644
--- a/apps/browser/src/vault/background/service_factories/sync-notifier-service.factory.ts
+++ b/apps/browser/src/vault/background/service_factories/sync-notifier-service.factory.ts
@@ -13,9 +13,9 @@ export type SyncNotifierServiceInitOptions = SyncNotifierServiceFactoryOptions;
export function syncNotifierServiceFactory(
cache: { syncNotifierService?: AbstractSyncNotifierService } & CachedServices,
- opts: SyncNotifierServiceInitOptions
+ opts: SyncNotifierServiceInitOptions,
): Promise {
return factory(cache, "syncNotifierService", opts, () =>
- Promise.resolve(new SyncNotifierService())
+ Promise.resolve(new SyncNotifierService()),
);
}
diff --git a/apps/browser/src/vault/background/service_factories/totp-service.factory.ts b/apps/browser/src/vault/background/service_factories/totp-service.factory.ts
index 21e042370b7..c8f5a270b48 100644
--- a/apps/browser/src/vault/background/service_factories/totp-service.factory.ts
+++ b/apps/browser/src/vault/background/service_factories/totp-service.factory.ts
@@ -23,7 +23,7 @@ export type TotpServiceInitOptions = TotpServiceOptions &
export function totpServiceFactory(
cache: { totpService?: AbstractTotpService } & CachedServices,
- opts: TotpServiceInitOptions
+ opts: TotpServiceInitOptions,
): Promise {
return factory(
cache,
@@ -32,7 +32,7 @@ export function totpServiceFactory(
async () =>
new TotpService(
await cryptoFunctionServiceFactory(cache, opts),
- await logServiceFactory(cache, opts)
- )
+ await logServiceFactory(cache, opts),
+ ),
);
}
diff --git a/apps/browser/src/vault/fido2/browser-fido2-user-interface.service.ts b/apps/browser/src/vault/fido2/browser-fido2-user-interface.service.ts
index e03c430009d..c22c043fb92 100644
--- a/apps/browser/src/vault/fido2/browser-fido2-user-interface.service.ts
+++ b/apps/browser/src/vault/fido2/browser-fido2-user-interface.service.ts
@@ -46,7 +46,7 @@ export function fido2PopoutSessionData$() {
sessionId: queryParams.sessionId as string,
fallbackSupported: queryParams.fallbackSupported === "true",
userVerification: queryParams.userVerification === "true",
- }))
+ })),
);
}
@@ -121,13 +121,13 @@ export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServi
async newSession(
fallbackSupported: boolean,
tab: chrome.tabs.Tab,
- abortController?: AbortController
+ abortController?: AbortController,
): Promise {
return await BrowserFido2UserInterfaceSession.create(
this.authService,
fallbackSupported,
tab,
- abortController
+ abortController,
);
}
}
@@ -137,13 +137,13 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
authService: AuthService,
fallbackSupported: boolean,
tab: chrome.tabs.Tab,
- abortController?: AbortController
+ abortController?: AbortController,
): Promise {
return new BrowserFido2UserInterfaceSession(
authService,
fallbackSupported,
tab,
- abortController
+ abortController,
);
}
@@ -170,7 +170,7 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
private closed = false;
private messages$ = (BrowserApi.messageListener$() as Observable).pipe(
- filter((msg) => msg.sessionId === this.sessionId)
+ filter((msg) => msg.sessionId === this.sessionId),
);
private connected$ = new BehaviorSubject(false);
private windowClosed$: Observable;
@@ -181,13 +181,13 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
private readonly fallbackSupported: boolean,
private readonly tab: chrome.tabs.Tab,
readonly abortController = new AbortController(),
- readonly sessionId = Utils.newGuid()
+ readonly sessionId = Utils.newGuid(),
) {
this.messages$
.pipe(
filter((msg) => msg.type === "ConnectResponse"),
take(1),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe(() => {
this.connected$.next(true);
@@ -209,7 +209,7 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
.pipe(
filter((msg) => msg.type === "AbortResponse"),
take(1),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe((msg) => {
if (msg.type === "AbortResponse") {
@@ -223,7 +223,7 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
// and test that it doesn't break. Tracking Ticket: https://bitwarden.atlassian.net/browse/PM-4735
// eslint-disable-next-line no-restricted-syntax
(handler: any) => chrome.windows.onRemoved.addListener(handler),
- (handler: any) => chrome.windows.onRemoved.removeListener(handler)
+ (handler: any) => chrome.windows.onRemoved.removeListener(handler),
);
BrowserFido2UserInterfaceSession.sendMessage({
@@ -318,14 +318,14 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
}
private async receive(
- type: T
+ type: T,
): Promise {
try {
const response = await firstValueFrom(
this.messages$.pipe(
filter((msg) => msg.sessionId === this.sessionId && msg.type === type),
- takeUntil(this.destroy$)
- )
+ takeUntil(this.destroy$),
+ ),
);
return response as BrowserFido2Message & { type: T };
} catch (error) {
@@ -345,9 +345,9 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
merge(
this.connected$.pipe(filter((connected) => connected === true)),
fromEvent(this.abortController.signal, "abort").pipe(
- switchMap(() => throwError(() => new SessionClosedError()))
- )
- )
+ switchMap(() => throwError(() => new SessionClosedError())),
+ ),
+ ),
);
const popoutId = await openFido2Popout(this.tab, {
@@ -360,7 +360,7 @@ export class BrowserFido2UserInterfaceSession implements Fido2UserInterfaceSessi
filter((windowId) => {
return popoutId === windowId;
}),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe(() => {
this.close();
diff --git a/apps/browser/src/vault/fido2/content/content-script.ts b/apps/browser/src/vault/fido2/content/content-script.ts
index 96af5a6e647..6d03c421110 100644
--- a/apps/browser/src/vault/fido2/content/content-script.ts
+++ b/apps/browser/src/vault/fido2/content/content-script.ts
@@ -10,7 +10,7 @@ function isFido2FeatureEnabled(): Promise {
return new Promise((resolve) => {
chrome.runtime.sendMessage(
{ command: "checkFido2FeatureEnabled" },
- (response: { result?: boolean }) => resolve(response.result)
+ (response: { result?: boolean }) => resolve(response.result),
);
});
}
@@ -92,7 +92,7 @@ function initializeFido2ContentScript() {
type: MessageType.CredentialCreationResponse,
result: response.result,
});
- }
+ },
);
});
}
@@ -120,10 +120,10 @@ function initializeFido2ContentScript() {
type: MessageType.CredentialGetResponse,
result: response.result,
});
- }
+ },
);
}).finally(() =>
- abortController.signal.removeEventListener("abort", abortHandler)
+ abortController.signal.removeEventListener("abort", abortHandler),
) as Promise;
}
diff --git a/apps/browser/src/vault/fido2/content/messaging/messenger.spec.ts b/apps/browser/src/vault/fido2/content/messaging/messenger.spec.ts
index 505682d997d..02e0f944974 100644
--- a/apps/browser/src/vault/fido2/content/messaging/messenger.spec.ts
+++ b/apps/browser/src/vault/fido2/content/messaging/messenger.spec.ts
@@ -99,7 +99,7 @@ class TestChannelPair {
class TestMessageHandler {
readonly handler: (
message: TestMessage,
- abortController?: AbortController
+ abortController?: AbortController,
) => Promise;
private recievedMessages: {
@@ -144,7 +144,7 @@ class MockMessagePort {
postMessage(message: T, port?: MessagePort) {
this.remotePort.onmessage(
- new MessageEvent("message", { data: message, ports: port ? [port] : [] })
+ new MessageEvent("message", { data: message, ports: port ? [port] : [] }),
);
}
diff --git a/apps/browser/src/vault/fido2/content/messaging/messenger.ts b/apps/browser/src/vault/fido2/content/messaging/messenger.ts
index aeb835e2d5f..b69f6ac076f 100644
--- a/apps/browser/src/vault/fido2/content/messaging/messenger.ts
+++ b/apps/browser/src/vault/fido2/content/messaging/messenger.ts
@@ -13,7 +13,7 @@ export type Metadata = { SENDER: typeof SENDER };
export type MessageWithMetadata = Message & Metadata;
type Handler = (
message: MessageWithMetadata,
- abortController?: AbortController
+ abortController?: AbortController,
) => Promise;
/**
diff --git a/apps/browser/src/vault/fido2/content/page-script.ts b/apps/browser/src/vault/fido2/content/page-script.ts
index 2071dbb1495..24860902309 100644
--- a/apps/browser/src/vault/fido2/content/page-script.ts
+++ b/apps/browser/src/vault/fido2/content/page-script.ts
@@ -47,7 +47,7 @@ if (browserNativeWebauthnSupport) {
const browserCredentials = {
create: navigator.credentials.create.bind(
- navigator.credentials
+ navigator.credentials,
) as typeof navigator.credentials.create,
get: navigator.credentials.get.bind(navigator.credentials) as typeof navigator.credentials.get,
};
@@ -55,7 +55,7 @@ const browserCredentials = {
const messenger = ((window as any).messenger = Messenger.forDOMCommunication(window));
navigator.credentials.create = async (
options?: CredentialCreationOptions,
- abortController?: AbortController
+ abortController?: AbortController,
): Promise => {
if (!isWebauthnCall(options)) {
return await browserCredentials.create(options);
@@ -72,7 +72,7 @@ navigator.credentials.create = async (
type: MessageType.CredentialCreationRequest,
data: WebauthnUtils.mapCredentialCreationOptions(options, fallbackSupported),
},
- abortController
+ abortController,
);
if (response.type !== MessageType.CredentialCreationResponse) {
@@ -92,7 +92,7 @@ navigator.credentials.create = async (
navigator.credentials.get = async (
options?: CredentialRequestOptions,
- abortController?: AbortController
+ abortController?: AbortController,
): Promise => {
if (!isWebauthnCall(options)) {
return await browserCredentials.get(options);
@@ -110,7 +110,7 @@ navigator.credentials.get = async (
type: MessageType.CredentialGetRequest,
data: WebauthnUtils.mapCredentialRequestOptions(options, fallbackSupported),
},
- abortController
+ abortController,
);
if (response.type !== MessageType.CredentialGetResponse) {
@@ -161,9 +161,9 @@ async function waitForFocus(fallbackWait = 500, timeout = 5 * 60 * 1000) {
timeoutId = window.setTimeout(
() =>
reject(
- new DOMException("The operation either timed out or was not allowed.", "AbortError")
+ new DOMException("The operation either timed out or was not allowed.", "AbortError"),
),
- timeout
+ timeout,
);
});
diff --git a/apps/browser/src/vault/fido2/webauthn-utils.ts b/apps/browser/src/vault/fido2/webauthn-utils.ts
index 3227e5ef116..ec23303a6eb 100644
--- a/apps/browser/src/vault/fido2/webauthn-utils.ts
+++ b/apps/browser/src/vault/fido2/webauthn-utils.ts
@@ -12,7 +12,7 @@ import {
export class WebauthnUtils {
static mapCredentialCreationOptions(
options: CredentialCreationOptions,
- fallbackSupported: boolean
+ fallbackSupported: boolean,
): InsecureCreateCredentialParams {
const keyOptions = options.publicKey;
@@ -92,7 +92,7 @@ export class WebauthnUtils {
static mapCredentialRequestOptions(
options: CredentialRequestOptions,
- fallbackSupported: boolean
+ fallbackSupported: boolean,
): InsecureAssertCredentialParams {
const keyOptions = options.publicKey;
diff --git a/apps/browser/src/vault/popup/components/action-buttons.component.ts b/apps/browser/src/vault/popup/components/action-buttons.component.ts
index e9ed209bb27..5dbf4f35b8e 100644
--- a/apps/browser/src/vault/popup/components/action-buttons.component.ts
+++ b/apps/browser/src/vault/popup/components/action-buttons.component.ts
@@ -30,7 +30,7 @@ export class ActionButtonsComponent {
private eventCollectionService: EventCollectionService,
private totpService: TotpService,
private stateService: StateService,
- private passwordRepromptService: PasswordRepromptService
+ private passwordRepromptService: PasswordRepromptService,
) {}
async ngOnInit() {
@@ -64,7 +64,7 @@ export class ActionButtonsComponent {
this.platformUtilsService.showToast(
"info",
null,
- this.i18nService.t("valueCopied", this.i18nService.t(typeI18nKey))
+ this.i18nService.t("valueCopied", this.i18nService.t(typeI18nKey)),
);
if (typeI18nKey === "password") {
diff --git a/apps/browser/src/vault/popup/components/fido2/fido2.component.ts b/apps/browser/src/vault/popup/components/fido2/fido2.component.ts
index e0a81d760e3..9311b6f18ad 100644
--- a/apps/browser/src/vault/popup/components/fido2/fido2.component.ts
+++ b/apps/browser/src/vault/popup/components/fido2/fido2.component.ts
@@ -79,7 +79,7 @@ export class Fido2Component implements OnInit, OnDestroy {
private searchService: SearchService,
private logService: LogService,
private dialogService: DialogService,
- private browserMessagingApi: ZonedMessageListenerService
+ private browserMessagingApi: ZonedMessageListenerService,
) {}
ngOnInit() {
@@ -91,7 +91,7 @@ export class Fido2Component implements OnInit, OnDestroy {
sessionId: queryParamMap.get("sessionId"),
senderTabId: queryParamMap.get("senderTabId"),
senderUrl: queryParamMap.get("senderUrl"),
- }))
+ })),
);
combineLatest([
@@ -125,7 +125,7 @@ export class Fido2Component implements OnInit, OnDestroy {
return message;
}),
filter((message) => !!message),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
)
.subscribe((message) => {
this.message$.next(message);
@@ -139,10 +139,10 @@ export class Fido2Component implements OnInit, OnDestroy {
const equivalentDomains = this.settingsService.getEquivalentDomains(this.url);
this.ciphers = (await this.cipherService.getAllDecrypted()).filter(
- (cipher) => cipher.type === CipherType.Login && !cipher.isDeleted
+ (cipher) => cipher.type === CipherType.Login && !cipher.isDeleted,
);
this.displayedCiphers = this.ciphers.filter((cipher) =>
- cipher.login.matchesUri(this.url, equivalentDomains)
+ cipher.login.matchesUri(this.url, equivalentDomains),
);
if (this.displayedCiphers.length > 0) {
@@ -156,9 +156,9 @@ export class Fido2Component implements OnInit, OnDestroy {
message.cipherIds.map(async (cipherId) => {
const cipher = await this.cipherService.get(cipherId);
return cipher.decrypt(
- await this.cipherService.getKeyForCipherKeyDecryption(cipher)
+ await this.cipherService.getKeyForCipherKeyDecryption(cipher),
);
- })
+ }),
);
this.displayedCiphers = [...this.ciphers];
if (this.displayedCiphers.length > 0) {
@@ -172,9 +172,9 @@ export class Fido2Component implements OnInit, OnDestroy {
message.existingCipherIds.map(async (cipherId) => {
const cipher = await this.cipherService.get(cipherId);
return cipher.decrypt(
- await this.cipherService.getKeyForCipherKeyDecryption(cipher)
+ await this.cipherService.getKeyForCipherKeyDecryption(cipher),
);
- })
+ }),
);
this.displayedCiphers = [...this.ciphers];
@@ -196,7 +196,7 @@ export class Fido2Component implements OnInit, OnDestroy {
fallbackSupported: "fallbackSupported" in message && message.fallbackSupported,
};
}),
- takeUntil(this.destroy$)
+ takeUntil(this.destroy$),
);
queryParams$.pipe(takeUntil(this.destroy$)).subscribe((queryParams) => {
@@ -312,12 +312,12 @@ export class Fido2Component implements OnInit, OnDestroy {
this.displayedCiphers = await this.searchService.searchCiphers(
this.searchText,
null,
- this.ciphers
+ this.ciphers,
);
} else {
const equivalentDomains = this.settingsService.getEquivalentDomains(this.url);
this.displayedCiphers = this.ciphers.filter((cipher) =>
- cipher.login.matchesUri(this.url, equivalentDomains)
+ cipher.login.matchesUri(this.url, equivalentDomains),
);
}
this.searchPending = false;
@@ -369,7 +369,7 @@ export class Fido2Component implements OnInit, OnDestroy {
private async handleUserVerification(
userVerificationRequested: boolean,
- cipher: CipherView
+ cipher: CipherView,
): Promise {
const masterPasswordRepromptRequired = cipher && cipher.reprompt !== 0;
diff --git a/apps/browser/src/vault/popup/components/vault/add-edit.component.html b/apps/browser/src/vault/popup/components/vault/add-edit.component.html
index b2a42776e18..de8315d3022 100644
--- a/apps/browser/src/vault/popup/components/vault/add-edit.component.html
+++ b/apps/browser/src/vault/popup/components/vault/add-edit.component.html
@@ -136,7 +136,7 @@
{{ "typePasskey" | i18n }}
{{ "dateCreated" | i18n }}
- {{ cipher.login.fido2Credentials[0].creationDate | date : "short" }}
+ {{ cipher.login.fido2Credentials[0].creationDate | date: "short" }}
@@ -241,7 +241,7 @@
type="text"
name="Card.ExpYear"
[(ngModel)]="cipher.card.expYear"
- placeholder="{{ 'ex' | i18n }} {{ currentDate | date : 'yyyy' }}"
+ placeholder="{{ 'ex' | i18n }} {{ currentDate | date: 'yyyy' }}"
[readonly]="!cipher.edit && editMode"
/>
@@ -483,7 +483,7 @@
class="box-content-row box-content-row-multi"
appBoxRow
*ngFor="let u of cipher.login.uris; let i = index; trackBy: trackByFunction"
- attr.aria-label="{{ 'uriPosition' | i18n : i + 1 }}"
+ attr.aria-label="{{ 'uriPosition' | i18n: i + 1 }}"
>
-
+
{
// We are bypassing user verification pending implementation of PIN and biometric support.
return true;
@@ -322,7 +322,7 @@ export class AddEditComponent extends BaseAddEditComponent {
this.platformUtilsService.showToast(
"info",
null,
- this.i18nService.t("passwordRepromptDisabledAutofillOnPageLoad")
+ this.i18nService.t("passwordRepromptDisabledAutofillOnPageLoad"),
);
return;
}
@@ -330,14 +330,14 @@ export class AddEditComponent extends BaseAddEditComponent {
this.platformUtilsService.showToast(
"info",
null,
- this.i18nService.t("autofillOnPageLoadSetToDefault")
+ this.i18nService.t("autofillOnPageLoadSetToDefault"),
);
}
private inAddEditPopoutWindow() {
return BrowserPopupUtils.inSingleActionPopout(
window,
- this.singleActionKey || VaultPopoutType.addEditVaultItem
+ this.singleActionKey || VaultPopoutType.addEditVaultItem,
);
}
}
diff --git a/apps/browser/src/vault/popup/components/vault/attachments.component.ts b/apps/browser/src/vault/popup/components/vault/attachments.component.ts
index 5047c9bfd1e..8faeb86de62 100644
--- a/apps/browser/src/vault/popup/components/vault/attachments.component.ts
+++ b/apps/browser/src/vault/popup/components/vault/attachments.component.ts
@@ -33,7 +33,7 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
stateService: StateService,
logService: LogService,
fileDownloadService: FileDownloadService,
- dialogService: DialogService
+ dialogService: DialogService,
) {
super(
cipherService,
@@ -45,7 +45,7 @@ export class AttachmentsComponent extends BaseAttachmentsComponent {
logService,
stateService,
fileDownloadService,
- dialogService
+ dialogService,
);
}
diff --git a/apps/browser/src/vault/popup/components/vault/collections.component.ts b/apps/browser/src/vault/popup/components/vault/collections.component.ts
index d4615e165b2..acbdab36852 100644
--- a/apps/browser/src/vault/popup/components/vault/collections.component.ts
+++ b/apps/browser/src/vault/popup/components/vault/collections.component.ts
@@ -23,7 +23,7 @@ export class CollectionsComponent extends BaseCollectionsComponent {
cipherService: CipherService,
private route: ActivatedRoute,
private location: Location,
- logService: LogService
+ logService: LogService,
) {
super(collectionService, platformUtilsService, i18nService, cipherService, logService);
}
diff --git a/apps/browser/src/vault/popup/components/vault/current-tab.component.ts b/apps/browser/src/vault/popup/components/vault/current-tab.component.ts
index 86c6551fb4f..872f6c8d97a 100644
--- a/apps/browser/src/vault/popup/components/vault/current-tab.component.ts
+++ b/apps/browser/src/vault/popup/components/vault/current-tab.component.ts
@@ -67,7 +67,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
private stateService: StateService,
private passwordRepromptService: PasswordRepromptService,
private organizationService: OrganizationService,
- private vaultFilterService: VaultFilterService
+ private vaultFilterService: VaultFilterService,
) {}
async ngOnInit() {
@@ -124,7 +124,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"info",
null,
- this.i18nService.t("autofillPageLoadPolicyActivated")
+ this.i18nService.t("autofillPageLoadPolicyActivated"),
);
}
}
@@ -252,7 +252,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
const ciphers = await this.cipherService.getAllDecryptedForUrl(
this.url,
- otherTypes.length > 0 ? otherTypes : null
+ otherTypes.length > 0 ? otherTypes : null,
);
this.loginCiphers = [];
@@ -278,7 +278,7 @@ export class CurrentTabComponent implements OnInit, OnDestroy {
});
this.loginCiphers = this.loginCiphers.sort((a, b) =>
- this.cipherService.sortCiphersByLastUsedThenName(a, b)
+ this.cipherService.sortCiphersByLastUsedThenName(a, b),
);
this.isLoading = this.loaded = true;
}
diff --git a/apps/browser/src/vault/popup/components/vault/password-history.component.html b/apps/browser/src/vault/popup/components/vault/password-history.component.html
index 7d468c87f25..6286aa1022d 100644
--- a/apps/browser/src/vault/popup/components/vault/password-history.component.html
+++ b/apps/browser/src/vault/popup/components/vault/password-history.component.html
@@ -17,7 +17,7 @@
class="text monospaced no-ellipsis"
[innerHTML]="h.password | colorPassword"
>
- {{ h.lastUsedDate | date : "medium" }}
+ {{ h.lastUsedDate | date: "medium" }}
diff --git a/apps/browser/src/vault/popup/components/vault/password-history.component.ts b/apps/browser/src/vault/popup/components/vault/password-history.component.ts
index 1dd7697a7d5..05986aad51f 100644
--- a/apps/browser/src/vault/popup/components/vault/password-history.component.ts
+++ b/apps/browser/src/vault/popup/components/vault/password-history.component.ts
@@ -19,7 +19,7 @@ export class PasswordHistoryComponent extends BasePasswordHistoryComponent {
platformUtilsService: PlatformUtilsService,
i18nService: I18nService,
private location: Location,
- private route: ActivatedRoute
+ private route: ActivatedRoute,
) {
super(cipherService, platformUtilsService, i18nService, window);
}
diff --git a/apps/browser/src/vault/popup/components/vault/share.component.ts b/apps/browser/src/vault/popup/components/vault/share.component.ts
index 80188646baf..7f99ea72db2 100644
--- a/apps/browser/src/vault/popup/components/vault/share.component.ts
+++ b/apps/browser/src/vault/popup/components/vault/share.component.ts
@@ -24,7 +24,7 @@ export class ShareComponent extends BaseShareComponent {
cipherService: CipherService,
private route: ActivatedRoute,
private router: Router,
- organizationService: OrganizationService
+ organizationService: OrganizationService,
) {
super(
collectionService,
@@ -32,7 +32,7 @@ export class ShareComponent extends BaseShareComponent {
i18nService,
cipherService,
logService,
- organizationService
+ organizationService,
);
}
diff --git a/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts b/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts
index c2bfb262fd4..61f21a8750a 100644
--- a/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts
+++ b/apps/browser/src/vault/popup/components/vault/vault-filter.component.ts
@@ -85,7 +85,7 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
private searchService: SearchService,
private location: Location,
private browserStateService: BrowserStateService,
- private vaultFilterService: VaultFilterService
+ private vaultFilterService: VaultFilterService,
) {
this.noFolderListSize = 100;
}
@@ -177,7 +177,7 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
async loadCollections() {
const allCollections = await this.vaultFilterService.buildCollections(
- this.selectedOrganization
+ this.selectedOrganization,
);
this.collections = allCollections.fullList;
this.nestedCollections = allCollections.nestedList;
@@ -185,7 +185,7 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
async loadFolders() {
const allFolders = await firstValueFrom(
- this.vaultFilterService.buildNestedFolders(this.selectedOrganization)
+ this.vaultFilterService.buildNestedFolders(this.selectedOrganization),
);
this.folders = allFolders.fullList;
this.nestedFolders = allFolders.nestedList;
@@ -202,10 +202,10 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
this.ciphers = await this.searchService.searchCiphers(
this.searchText,
filterDeleted,
- this.allCiphers
+ this.allCiphers,
);
this.ciphers = this.ciphers.filter(
- (c) => !this.vaultFilterService.filterCipherForSelectedVault(c)
+ (c) => !this.vaultFilterService.filterCipherForSelectedVault(c),
);
return;
}
@@ -218,11 +218,11 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
this.ciphers = await this.searchService.searchCiphers(
this.searchText,
filterDeleted,
- this.allCiphers
+ this.allCiphers,
);
}
this.ciphers = this.ciphers.filter(
- (c) => !this.vaultFilterService.filterCipherForSelectedVault(c)
+ (c) => !this.vaultFilterService.filterCipherForSelectedVault(c),
);
this.searchPending = false;
}, timeout);
@@ -301,7 +301,7 @@ export class VaultFilterComponent implements OnInit, OnDestroy {
const typeCounts = new Map
();
this.deletedCount = this.allCiphers.filter(
- (c) => c.isDeleted && !this.vaultFilterService.filterCipherForSelectedVault(c)
+ (c) => c.isDeleted && !this.vaultFilterService.filterCipherForSelectedVault(c),
).length;
this.ciphers?.forEach((c) => {
diff --git a/apps/browser/src/vault/popup/components/vault/vault-items.component.ts b/apps/browser/src/vault/popup/components/vault/vault-items.component.ts
index 70d9d079c6e..1e29a17981e 100644
--- a/apps/browser/src/vault/popup/components/vault/vault-items.component.ts
+++ b/apps/browser/src/vault/popup/components/vault/vault-items.component.ts
@@ -64,7 +64,7 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
private collectionService: CollectionService,
private platformUtilsService: PlatformUtilsService,
cipherService: CipherService,
- private vaultFilterService: VaultFilterService
+ private vaultFilterService: VaultFilterService,
) {
super(searchService, cipherService);
this.applySavedState =
@@ -143,7 +143,7 @@ export class VaultItemsComponent extends BaseVaultItemsComponent implements OnIn
: null;
}
await this.load(
- (c) => c.collectionIds != null && c.collectionIds.indexOf(this.collectionId) > -1
+ (c) => c.collectionIds != null && c.collectionIds.indexOf(this.collectionId) > -1,
);
} else {
this.showVaultFilter = true;
diff --git a/apps/browser/src/vault/popup/components/vault/vault-select.component.ts b/apps/browser/src/vault/popup/components/vault/vault-select.component.ts
index 30b5533fcc4..de6a33724d1 100644
--- a/apps/browser/src/vault/popup/components/vault/vault-select.component.ts
+++ b/apps/browser/src/vault/popup/components/vault/vault-select.component.ts
@@ -32,7 +32,7 @@ import { VaultFilterService } from "../../../services/vault-filter.service";
"void",
style({
opacity: 0,
- })
+ }),
),
transition(
"void => open",
@@ -40,8 +40,8 @@ import { VaultFilterService } from "../../../services/vault-filter.service";
"100ms linear",
style({
opacity: 1,
- })
- )
+ }),
+ ),
),
transition("* => void", animate("100ms linear", style({ opacity: 0 }))),
]),
@@ -87,7 +87,7 @@ export class VaultSelectComponent implements OnInit, OnDestroy {
private overlay: Overlay,
private viewContainerRef: ViewContainerRef,
private platformUtilsService: PlatformUtilsService,
- private organizationService: OrganizationService
+ private organizationService: OrganizationService,
) {}
@HostListener("document:keydown.escape", ["$event"])
@@ -118,14 +118,14 @@ export class VaultSelectComponent implements OnInit, OnDestroy {
this._selectedVault.next(this.i18nService.t(this.vaultFilterService.myVault));
} else if (this.vaultFilterService.vaultFilter.selectedOrganizationId != null) {
const selectedOrganization = organizations.find(
- (o) => o.id === this.vaultFilterService.vaultFilter.selectedOrganizationId
+ (o) => o.id === this.vaultFilterService.vaultFilter.selectedOrganizationId,
);
this._selectedVault.next(selectedOrganization.name);
} else {
this._selectedVault.next(this.i18nService.t(this.vaultFilterService.allVaults));
}
}
- })
+ }),
)
.pipe(takeUntil(this._destroy))
.subscribe();
@@ -167,7 +167,7 @@ export class VaultSelectComponent implements OnInit, OnDestroy {
merge(
this.overlayRef.outsidePointerEvents(),
this.overlayRef.backdropClick(),
- this.overlayRef.detachments()
+ this.overlayRef.detachments(),
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
).subscribe(() => {
this.close();
@@ -187,7 +187,7 @@ export class VaultSelectComponent implements OnInit, OnDestroy {
this.platformUtilsService.showToast(
"error",
null,
- this.i18nService.t("disabledOrganizationFilterError")
+ this.i18nService.t("disabledOrganizationFilterError"),
);
} else {
this._selectedVault.next(organization.name);
diff --git a/apps/browser/src/vault/popup/components/vault/view.component.html b/apps/browser/src/vault/popup/components/vault/view.component.html
index a4b2ae200c8..dcdb1cab12b 100644
--- a/apps/browser/src/vault/popup/components/vault/view.component.html
+++ b/apps/browser/src/vault/popup/components/vault/view.component.html
@@ -149,7 +149,7 @@
{{ "typePasskey" | i18n }}
{{ "dateCreated" | i18n }}
- {{ cipher.login.fido2Credentials[0].creationDate | date : "short" }}
+ {{ cipher.login.fido2Credentials[0].creationDate | date: "short" }}
@@ -233,10 +233,10 @@
>{{ "number" | i18n }}
{{
- cipher.card.maskedNumber | creditCardNumber : cipher.card.brand
+ cipher.card.maskedNumber | creditCardNumber: cipher.card.brand
}}
{{
- cipher.card.number | creditCardNumber : cipher.card.brand
+ cipher.card.number | creditCardNumber: cipher.card.brand
}}
@@ -655,15 +655,15 @@