diff --git a/.gitignore b/.gitignore index e865fa6a8fb..0fa968aa47c 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,9 @@ build # Testing coverage junit.xml +## The "base" root level folder is expected for some local tests that do +## comparisons between the current branch and a base branch (usually main) +base/ # Misc *.crx diff --git a/apps/browser/jest.config.js b/apps/browser/jest.config.js index 0d1034f0eac..14cd959810e 100644 --- a/apps/browser/jest.config.js +++ b/apps/browser/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -9,9 +9,9 @@ module.exports = { ...sharedConfig, setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( - { "@bitwarden/common/spec": ["../../libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, + { "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/apps/browser/src/_locales/en/messages.json b/apps/browser/src/_locales/en/messages.json index 985f04ce456..89c1cd64ccb 100644 --- a/apps/browser/src/_locales/en/messages.json +++ b/apps/browser/src/_locales/en/messages.json @@ -1371,8 +1371,8 @@ "featureUnavailable": { "message": "Feature unavailable" }, - "encryptionKeyMigrationRequired": { - "message": "Encryption key migration required. Please login through the web vault to update your encryption key." + "legacyEncryptionUnsupported": { + "message": "Legacy encryption is no longer supported. Please contact support to recover your account." }, "premiumMembership": { "message": "Premium membership" diff --git a/apps/browser/src/tools/popup/components/file-popout-callout.component.ts b/apps/browser/src/tools/popup/components/file-popout-callout.component.ts index 491e33c5738..e30fbf58321 100644 --- a/apps/browser/src/tools/popup/components/file-popout-callout.component.ts +++ b/apps/browser/src/tools/popup/components/file-popout-callout.component.ts @@ -12,7 +12,6 @@ import { FilePopoutUtilsService } from "../services/file-popout-utils.service"; @Component({ selector: "tools-file-popout-callout", templateUrl: "file-popout-callout.component.html", - standalone: true, imports: [CommonModule, JslibModule, CalloutModule], }) export class FilePopoutCalloutComponent implements OnInit { diff --git a/apps/browser/src/tools/popup/generator/credential-generator-history.component.ts b/apps/browser/src/tools/popup/generator/credential-generator-history.component.ts index 2bf290b3223..441e5d6e4c6 100644 --- a/apps/browser/src/tools/popup/generator/credential-generator-history.component.ts +++ b/apps/browser/src/tools/popup/generator/credential-generator-history.component.ts @@ -28,7 +28,6 @@ import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.co @Component({ selector: "app-credential-generator-history", templateUrl: "credential-generator-history.component.html", - standalone: true, imports: [ ButtonModule, CommonModule, diff --git a/apps/browser/src/tools/popup/generator/credential-generator.component.ts b/apps/browser/src/tools/popup/generator/credential-generator.component.ts index a2ef4be6620..b34c829b006 100644 --- a/apps/browser/src/tools/popup/generator/credential-generator.component.ts +++ b/apps/browser/src/tools/popup/generator/credential-generator.component.ts @@ -11,7 +11,6 @@ import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-heade import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; @Component({ - standalone: true, selector: "credential-generator", templateUrl: "credential-generator.component.html", imports: [ diff --git a/apps/browser/src/tools/popup/send-v2/add-edit/send-add-edit.component.ts b/apps/browser/src/tools/popup/send-v2/add-edit/send-add-edit.component.ts index 0962dec3dcf..b6957248d75 100644 --- a/apps/browser/src/tools/popup/send-v2/add-edit/send-add-edit.component.ts +++ b/apps/browser/src/tools/popup/send-v2/add-edit/send-add-edit.component.ts @@ -63,7 +63,6 @@ export type AddEditQueryParams = Partial>; @Component({ selector: "tools-send-add-edit", templateUrl: "send-add-edit.component.html", - standalone: true, providers: [{ provide: SendFormConfigService, useClass: DefaultSendFormConfigService }], imports: [ CommonModule, diff --git a/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts b/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts index 7680e05dd5b..89d1ad5e809 100644 --- a/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-created/send-created.component.ts @@ -23,7 +23,6 @@ import { PopupPageComponent } from "../../../../platform/popup/layout/popup-page @Component({ selector: "app-send-created", templateUrl: "./send-created.component.html", - standalone: true, imports: [ ButtonModule, CommonModule, diff --git a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog-container.component.ts b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog-container.component.ts index 4266dd3914e..251f19cf252 100644 --- a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog-container.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog-container.component.ts @@ -15,7 +15,6 @@ import { SendFilePopoutDialogComponent } from "./send-file-popout-dialog.compone @Component({ selector: "send-file-popout-dialog-container", templateUrl: "./send-file-popout-dialog-container.component.html", - standalone: true, imports: [JslibModule, CommonModule], }) export class SendFilePopoutDialogContainerComponent implements OnInit { diff --git a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts index fb21b5bb026..248b3c49a98 100644 --- a/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-file-popout-dialog/send-file-popout-dialog.component.ts @@ -9,7 +9,6 @@ import BrowserPopupUtils from "../../../../platform/popup/browser-popup-utils"; @Component({ selector: "send-file-popout-dialog", templateUrl: "./send-file-popout-dialog.component.html", - standalone: true, imports: [JslibModule, CommonModule, DialogModule, ButtonModule, TypographyModule], }) export class SendFilePopoutDialogComponent { diff --git a/apps/browser/src/tools/popup/send-v2/send-v2.component.ts b/apps/browser/src/tools/popup/send-v2/send-v2.component.ts index 9fc19e98b34..e2b5551cc7d 100644 --- a/apps/browser/src/tools/popup/send-v2/send-v2.component.ts +++ b/apps/browser/src/tools/popup/send-v2/send-v2.component.ts @@ -35,7 +35,6 @@ export enum SendState { @Component({ templateUrl: "send-v2.component.html", - standalone: true, imports: [ CalloutModule, PopupPageComponent, diff --git a/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts b/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts index 6f1c1162eb4..39bff089668 100644 --- a/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts +++ b/apps/browser/src/tools/popup/settings/about-dialog/about-dialog.component.ts @@ -18,7 +18,6 @@ import { @Component({ templateUrl: "about-dialog.component.html", - standalone: true, imports: [CommonModule, JslibModule, DialogModule, ButtonModule, TypographyModule], }) export class AboutDialogComponent { diff --git a/apps/browser/src/tools/popup/settings/about-page/about-page-v2.component.ts b/apps/browser/src/tools/popup/settings/about-page/about-page-v2.component.ts index 51dbf3685ae..8a76290eff1 100644 --- a/apps/browser/src/tools/popup/settings/about-page/about-page-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/about-page/about-page-v2.component.ts @@ -33,7 +33,6 @@ const RateUrls = { @Component({ templateUrl: "about-page-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/browser/src/tools/popup/settings/export/export-browser-v2.component.ts b/apps/browser/src/tools/popup/settings/export/export-browser-v2.component.ts index 27147b75d39..5aebee3b781 100644 --- a/apps/browser/src/tools/popup/settings/export/export-browser-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/export/export-browser-v2.component.ts @@ -14,7 +14,6 @@ import { PopupPageComponent } from "../../../../platform/popup/layout/popup-page @Component({ templateUrl: "export-browser-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/browser/src/tools/popup/settings/import/import-browser-v2.component.ts b/apps/browser/src/tools/popup/settings/import/import-browser-v2.component.ts index 1c5558bd90e..506dae2fb18 100644 --- a/apps/browser/src/tools/popup/settings/import/import-browser-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/import/import-browser-v2.component.ts @@ -13,7 +13,6 @@ import { PopupPageComponent } from "../../../../platform/popup/layout/popup-page @Component({ templateUrl: "import-browser-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/browser/src/tools/popup/settings/settings-v2.component.ts b/apps/browser/src/tools/popup/settings/settings-v2.component.ts index 63a22f81ddd..a0383b99390 100644 --- a/apps/browser/src/tools/popup/settings/settings-v2.component.ts +++ b/apps/browser/src/tools/popup/settings/settings-v2.component.ts @@ -28,7 +28,6 @@ import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.co @Component({ templateUrl: "settings-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/browser/src/vault/popup/components/at-risk-callout/at-risk-password-callout.component.ts b/apps/browser/src/vault/popup/components/at-risk-callout/at-risk-password-callout.component.ts index ed78d9433f1..18482706272 100644 --- a/apps/browser/src/vault/popup/components/at-risk-callout/at-risk-password-callout.component.ts +++ b/apps/browser/src/vault/popup/components/at-risk-callout/at-risk-password-callout.component.ts @@ -11,7 +11,6 @@ import { I18nPipe } from "@bitwarden/ui-common"; @Component({ selector: "vault-at-risk-password-callout", - standalone: true, imports: [CommonModule, AnchorLinkDirective, RouterModule, CalloutModule, I18nPipe], templateUrl: "./at-risk-password-callout.component.html", }) diff --git a/apps/browser/src/vault/popup/components/at-risk-carousel-dialog/at-risk-carousel-dialog.component.ts b/apps/browser/src/vault/popup/components/at-risk-carousel-dialog/at-risk-carousel-dialog.component.ts index 0133bccd25c..4f6a682e58d 100644 --- a/apps/browser/src/vault/popup/components/at-risk-carousel-dialog/at-risk-carousel-dialog.component.ts +++ b/apps/browser/src/vault/popup/components/at-risk-carousel-dialog/at-risk-carousel-dialog.component.ts @@ -27,7 +27,6 @@ export enum AtRiskCarouselDialogResult { DarkImageSourceDirective, I18nPipe, ], - standalone: true, }) export class AtRiskCarouselDialogComponent { private dialogRef = inject(DialogRef); diff --git a/apps/browser/src/vault/popup/components/at-risk-passwords/at-risk-passwords.component.spec.ts b/apps/browser/src/vault/popup/components/at-risk-passwords/at-risk-passwords.component.spec.ts index ff583061684..dae00ba6c2b 100644 --- a/apps/browser/src/vault/popup/components/at-risk-passwords/at-risk-passwords.component.spec.ts +++ b/apps/browser/src/vault/popup/components/at-risk-passwords/at-risk-passwords.component.spec.ts @@ -35,7 +35,6 @@ import { AtRiskPasswordPageService } from "./at-risk-password-page.service"; import { AtRiskPasswordsComponent } from "./at-risk-passwords.component"; @Component({ - standalone: true, selector: "popup-header", template: ``, }) @@ -45,7 +44,6 @@ class MockPopupHeaderComponent { } @Component({ - standalone: true, selector: "popup-page", template: ``, }) @@ -54,7 +52,6 @@ class MockPopupPageComponent { } @Component({ - standalone: true, selector: "app-vault-icon", template: ``, }) diff --git a/apps/browser/src/vault/popup/components/at-risk-passwords/at-risk-passwords.component.ts b/apps/browser/src/vault/popup/components/at-risk-passwords/at-risk-passwords.component.ts index 1b43151193a..dc6712aa23f 100644 --- a/apps/browser/src/vault/popup/components/at-risk-passwords/at-risk-passwords.component.ts +++ b/apps/browser/src/vault/popup/components/at-risk-passwords/at-risk-passwords.component.ts @@ -79,7 +79,6 @@ import { AtRiskPasswordPageService } from "./at-risk-password-page.service"; { provide: ChangeLoginPasswordService, useClass: DefaultChangeLoginPasswordService }, ], selector: "vault-at-risk-passwords", - standalone: true, templateUrl: "./at-risk-passwords.component.html", }) export class AtRiskPasswordsComponent implements OnInit { diff --git a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts index e47f4637199..a5a6a6f9922 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts @@ -132,7 +132,6 @@ export type AddEditQueryParams = Partial>; @Component({ selector: "app-add-edit-v2", templateUrl: "add-edit-v2.component.html", - standalone: true, providers: [ { provide: CipherFormConfigService, useClass: DefaultCipherFormConfigService }, { provide: TotpCaptureService, useClass: BrowserTotpCaptureService }, diff --git a/apps/browser/src/vault/popup/components/vault-v2/assign-collections/assign-collections.component.ts b/apps/browser/src/vault/popup/components/vault-v2/assign-collections/assign-collections.component.ts index a11a7d806bd..8374cc254a9 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/assign-collections/assign-collections.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/assign-collections/assign-collections.component.ts @@ -28,7 +28,6 @@ import { PopupHeaderComponent } from "../../../../../platform/popup/layout/popup import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-page.component"; @Component({ - standalone: true, selector: "app-assign-collections", templateUrl: "./assign-collections.component.html", imports: [ diff --git a/apps/browser/src/vault/popup/components/vault-v2/attachments/attachments-v2.component.spec.ts b/apps/browser/src/vault/popup/components/vault-v2/attachments/attachments-v2.component.spec.ts index 7c2cc99e300..6e4215c1ec2 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/attachments/attachments-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/attachments/attachments-v2.component.spec.ts @@ -26,7 +26,6 @@ import { PopupRouterCacheService } from "../../../../../platform/popup/view-cach import { AttachmentsV2Component } from "./attachments-v2.component"; @Component({ - standalone: true, selector: "popup-header", template: ``, }) @@ -36,7 +35,6 @@ class MockPopupHeaderComponent { } @Component({ - standalone: true, selector: "popup-footer", template: ``, }) diff --git a/apps/browser/src/vault/popup/components/vault-v2/attachments/attachments-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/attachments/attachments-v2.component.ts index 32d446daf75..fc6d882dfd5 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/attachments/attachments-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/attachments/attachments-v2.component.ts @@ -18,7 +18,6 @@ import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-p import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service"; @Component({ - standalone: true, selector: "app-attachments-v2", templateUrl: "./attachments-v2.component.html", imports: [ diff --git a/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.ts b/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.ts index d44b54bcb96..6577975ae0c 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/attachments/open-attachments/open-attachments.component.ts @@ -24,7 +24,6 @@ import BrowserPopupUtils from "../../../../../../platform/popup/browser-popup-ut import { FilePopoutUtilsService } from "../../../../../../tools/popup/services/file-popout-utils.service"; @Component({ - standalone: true, selector: "app-open-attachments", templateUrl: "./open-attachments.component.html", imports: [BadgeModule, CommonModule, ItemModule, JslibModule, TypographyModule], diff --git a/apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts b/apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts index bdc0d7ae5bc..b490d71df83 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.ts @@ -15,7 +15,6 @@ import { PopupCipherView } from "../../../views/popup-cipher.view"; import { VaultListItemsContainerComponent } from "../vault-list-items-container/vault-list-items-container.component"; @Component({ - standalone: true, imports: [ CommonModule, TypographyModule, diff --git a/apps/browser/src/vault/popup/components/vault-v2/blocked-injection-banner/blocked-injection-banner.component.ts b/apps/browser/src/vault/popup/components/vault-v2/blocked-injection-banner/blocked-injection-banner.component.ts index 3a17825f4fb..5824e8d97ea 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/blocked-injection-banner/blocked-injection-banner.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/blocked-injection-banner/blocked-injection-banner.component.ts @@ -16,7 +16,6 @@ import { VaultPopupAutofillService } from "../../../services/vault-popup-autofil const blockedURISettingsRoute = "/blocked-domains"; @Component({ - standalone: true, imports: [ BannerModule, CommonModule, diff --git a/apps/browser/src/vault/popup/components/vault-v2/intro-carousel/intro-carousel.component.ts b/apps/browser/src/vault/popup/components/vault-v2/intro-carousel/intro-carousel.component.ts index 96e1a70306e..527f0f246af 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/intro-carousel/intro-carousel.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/intro-carousel/intro-carousel.component.ts @@ -20,7 +20,6 @@ import { IntroCarouselService } from "../../../services/intro-carousel.service"; JslibModule, I18nPipe, ], - standalone: true, }) export class IntroCarouselComponent { protected securityHandshake = VaultIcons.SecurityHandshake; diff --git a/apps/browser/src/vault/popup/components/vault-v2/item-copy-action/item-copy-actions.component.ts b/apps/browser/src/vault/popup/components/vault-v2/item-copy-action/item-copy-actions.component.ts index 053d87c6485..de548e7be7a 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/item-copy-action/item-copy-actions.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/item-copy-action/item-copy-actions.component.ts @@ -19,7 +19,6 @@ type CipherItem = { }; @Component({ - standalone: true, selector: "app-item-copy-actions", templateUrl: "item-copy-actions.component.html", imports: [ diff --git a/apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts b/apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts index 94b4c2b855b..bb7b74f8c61 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/item-more-options/item-more-options.component.ts @@ -28,7 +28,6 @@ import { VaultPopupAutofillService } from "../../../services/vault-popup-autofil import { AddEditQueryParams } from "../add-edit/add-edit-v2.component"; @Component({ - standalone: true, selector: "app-item-more-options", templateUrl: "./item-more-options.component.html", imports: [ItemModule, IconButtonModule, MenuModule, CommonModule, JslibModule, RouterModule], diff --git a/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.ts index 1bcc4297b71..ef0b009025d 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/new-item-dropdown/new-item-dropdown-v2.component.ts @@ -23,7 +23,6 @@ export interface NewItemInitialValues { @Component({ selector: "app-new-item-dropdown", templateUrl: "new-item-dropdown-v2.component.html", - standalone: true, imports: [NoItemsModule, JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule], }) export class NewItemDropdownV2Component implements OnInit { diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-generator-dialog/vault-generator-dialog.component.spec.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-generator-dialog/vault-generator-dialog.component.spec.ts index dd5f55a66ee..b5d35e2005e 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-generator-dialog/vault-generator-dialog.component.spec.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-generator-dialog/vault-generator-dialog.component.spec.ts @@ -21,7 +21,6 @@ import { @Component({ selector: "vault-cipher-form-generator", template: "", - standalone: true, }) class MockCipherFormGenerator { @Input() type: "password" | "username" = "password"; diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-generator-dialog/vault-generator-dialog.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-generator-dialog/vault-generator-dialog.component.ts index 4daffa6a9b8..f02ce46e931 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-generator-dialog/vault-generator-dialog.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-generator-dialog/vault-generator-dialog.component.ts @@ -40,7 +40,6 @@ export enum GeneratorDialogAction { @Component({ selector: "app-vault-generator-dialog", templateUrl: "./vault-generator-dialog.component.html", - standalone: true, imports: [ PopupPageComponent, PopupHeaderComponent, diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-header/vault-header-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-header/vault-header-v2.component.ts index bcea2e76190..f64b5e6b83d 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-header/vault-header-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-header/vault-header-v2.component.ts @@ -20,7 +20,6 @@ import { VaultV2SearchComponent } from "../vault-search/vault-v2-search.componen @Component({ selector: "app-vault-header-v2", templateUrl: "vault-header-v2.component.html", - standalone: true, imports: [ VaultV2SearchComponent, VaultListFiltersComponent, diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-list-filters/vault-list-filters.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-list-filters/vault-list-filters.component.ts index feccf92cec2..bc43a1d6a46 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-list-filters/vault-list-filters.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-list-filters/vault-list-filters.component.ts @@ -9,7 +9,6 @@ import { ChipSelectComponent } from "@bitwarden/components"; import { VaultPopupListFiltersService } from "../../../services/vault-popup-list-filters.service"; @Component({ - standalone: true, selector: "app-vault-list-filters", templateUrl: "./vault-list-filters.component.html", imports: [CommonModule, JslibModule, ChipSelectComponent, ReactiveFormsModule], diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts index 073d49333b5..cef1ef8d2ff 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts @@ -77,7 +77,6 @@ import { ItemMoreOptionsComponent } from "../item-more-options/item-more-options ], selector: "app-vault-list-items-container", templateUrl: "vault-list-items-container.component.html", - standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, }) export class VaultListItemsContainerComponent implements OnInit, AfterViewInit { diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-password-history-v2/vault-password-history-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-password-history-v2/vault-password-history-v2.component.ts index d0eef20f044..f2764df7ba7 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-password-history-v2/vault-password-history-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-password-history-v2/vault-password-history-v2.component.ts @@ -19,7 +19,6 @@ import { PopupPageComponent } from "../../../../../platform/popup/layout/popup-p import { PopupRouterCacheService } from "../../../../../platform/popup/view-cache/popup-router-cache.service"; @Component({ - standalone: true, selector: "vault-password-history-v2", templateUrl: "vault-password-history-v2.component.html", imports: [ diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-search/vault-v2-search.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-search/vault-v2-search.component.ts index b68818454d1..fe2baf463cf 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-search/vault-v2-search.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-search/vault-v2-search.component.ts @@ -13,7 +13,6 @@ const SearchTextDebounceInterval = 200; @Component({ imports: [CommonModule, SearchModule, JslibModule, FormsModule], - standalone: true, selector: "app-vault-v2-search", templateUrl: "vault-v2-search.component.html", }) diff --git a/apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.ts index db853d45940..9310953dbb7 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.ts @@ -66,7 +66,6 @@ enum VaultState { @Component({ selector: "app-vault", templateUrl: "vault-v2.component.html", - standalone: true, imports: [ BlockedInjectionBanner, PopupPageComponent, diff --git a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts index 0a71caf5aee..77b1819e29d 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/view-v2/view-v2.component.ts @@ -80,7 +80,6 @@ type LoadAction = @Component({ selector: "app-view-v2", templateUrl: "view-v2.component.html", - standalone: true, imports: [ CommonModule, SearchModule, diff --git a/apps/browser/src/vault/popup/settings/appearance-v2.component.spec.ts b/apps/browser/src/vault/popup/settings/appearance-v2.component.spec.ts index 30715ebaedf..738ec3ae1ff 100644 --- a/apps/browser/src/vault/popup/settings/appearance-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/settings/appearance-v2.component.spec.ts @@ -23,7 +23,6 @@ import { VaultPopupCopyButtonsService } from "../services/vault-popup-copy-butto import { AppearanceV2Component } from "./appearance-v2.component"; @Component({ - standalone: true, selector: "popup-header", template: ``, }) @@ -33,7 +32,6 @@ class MockPopupHeaderComponent { } @Component({ - standalone: true, selector: "popup-page", template: ``, }) diff --git a/apps/browser/src/vault/popup/settings/appearance-v2.component.ts b/apps/browser/src/vault/popup/settings/appearance-v2.component.ts index 1462a2d7ab4..2a38d281396 100644 --- a/apps/browser/src/vault/popup/settings/appearance-v2.component.ts +++ b/apps/browser/src/vault/popup/settings/appearance-v2.component.ts @@ -35,7 +35,6 @@ import { import { VaultPopupCopyButtonsService } from "../services/vault-popup-copy-buttons.service"; @Component({ - standalone: true, templateUrl: "./appearance-v2.component.html", imports: [ CommonModule, diff --git a/apps/browser/src/vault/popup/settings/download-bitwarden.component.ts b/apps/browser/src/vault/popup/settings/download-bitwarden.component.ts index 0287b7d504f..d23d00a1ad7 100644 --- a/apps/browser/src/vault/popup/settings/download-bitwarden.component.ts +++ b/apps/browser/src/vault/popup/settings/download-bitwarden.component.ts @@ -15,7 +15,6 @@ import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.co @Component({ templateUrl: "download-bitwarden.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/browser/src/vault/popup/settings/folders-v2.component.spec.ts b/apps/browser/src/vault/popup/settings/folders-v2.component.spec.ts index 6689f5a6c6d..d1450667fa8 100644 --- a/apps/browser/src/vault/popup/settings/folders-v2.component.spec.ts +++ b/apps/browser/src/vault/popup/settings/folders-v2.component.spec.ts @@ -22,7 +22,6 @@ import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-heade import { FoldersV2Component } from "./folders-v2.component"; @Component({ - standalone: true, selector: "popup-header", template: ``, }) @@ -32,7 +31,6 @@ class MockPopupHeaderComponent { } @Component({ - standalone: true, selector: "popup-footer", template: ``, }) diff --git a/apps/browser/src/vault/popup/settings/folders-v2.component.ts b/apps/browser/src/vault/popup/settings/folders-v2.component.ts index f71374e5305..2264415f4fa 100644 --- a/apps/browser/src/vault/popup/settings/folders-v2.component.ts +++ b/apps/browser/src/vault/popup/settings/folders-v2.component.ts @@ -22,7 +22,6 @@ import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-heade import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; @Component({ - standalone: true, templateUrl: "./folders-v2.component.html", imports: [ CommonModule, diff --git a/apps/browser/src/vault/popup/settings/more-from-bitwarden-page-v2.component.ts b/apps/browser/src/vault/popup/settings/more-from-bitwarden-page-v2.component.ts index b1269963f70..ec7a73a3bc3 100644 --- a/apps/browser/src/vault/popup/settings/more-from-bitwarden-page-v2.component.ts +++ b/apps/browser/src/vault/popup/settings/more-from-bitwarden-page-v2.component.ts @@ -19,7 +19,6 @@ import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.co @Component({ templateUrl: "more-from-bitwarden-page-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts b/apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts index b4899e12eda..0f025ebe3f4 100644 --- a/apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts +++ b/apps/browser/src/vault/popup/settings/trash-list-items-container/trash-list-items-container.component.ts @@ -37,7 +37,6 @@ import { PopupCipherView } from "../../views/popup-cipher.view"; @Component({ selector: "app-trash-list-items-container", templateUrl: "trash-list-items-container.component.html", - standalone: true, imports: [ CommonModule, ItemModule, diff --git a/apps/browser/src/vault/popup/settings/trash.component.ts b/apps/browser/src/vault/popup/settings/trash.component.ts index 61843de31bc..d6e5f899bba 100644 --- a/apps/browser/src/vault/popup/settings/trash.component.ts +++ b/apps/browser/src/vault/popup/settings/trash.component.ts @@ -14,7 +14,6 @@ import { TrashListItemsContainerComponent } from "./trash-list-items-container/t @Component({ templateUrl: "trash.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/browser/src/vault/popup/settings/vault-settings-v2.component.ts b/apps/browser/src/vault/popup/settings/vault-settings-v2.component.ts index 049e853d2cd..9efdc568997 100644 --- a/apps/browser/src/vault/popup/settings/vault-settings-v2.component.ts +++ b/apps/browser/src/vault/popup/settings/vault-settings-v2.component.ts @@ -15,7 +15,6 @@ import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.co @Component({ templateUrl: "vault-settings-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/browser/tsconfig.json b/apps/browser/tsconfig.json index ff4ac340219..a554120bd1e 100644 --- a/apps/browser/tsconfig.json +++ b/apps/browser/tsconfig.json @@ -1,55 +1,5 @@ { - "compilerOptions": { - "moduleResolution": "node", - "noImplicitAny": true, - "allowSyntheticDefaultImports": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "module": "ES2020", - "target": "ES2016", - "allowJs": true, - "sourceMap": true, - "baseUrl": ".", - "lib": ["ES2021.String"], - "paths": { - "@bitwarden/admin-console/common": ["../../libs/admin-console/src/common"], - "@bitwarden/angular/*": ["../../libs/angular/src/*"], - "@bitwarden/auth/common": ["../../libs/auth/src/common"], - "@bitwarden/auth/angular": ["../../libs/auth/src/angular"], - "@bitwarden/billing": ["../../libs/billing/src"], - "@bitwarden/common/*": ["../../libs/common/src/*"], - "@bitwarden/components": ["../../libs/components/src"], - "@bitwarden/dirt-card": ["../../libs/dirt/card/src"], - "@bitwarden/generator-components": ["../../libs/tools/generator/components/src"], - "@bitwarden/generator-core": ["../../libs/tools/generator/core/src"], - "@bitwarden/generator-history": ["../../libs/tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../../libs/tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../../libs/tools/generator/extensions/navigation/src"], - "@bitwarden/importer-core": ["../../libs/importer/src"], - "@bitwarden/importer-ui": ["../../libs/importer/src/components"], - "@bitwarden/key-management": ["../../libs/key-management/src"], - "@bitwarden/key-management-ui": ["../../libs/key-management-ui/src"], - "@bitwarden/platform": ["../../libs/platform/src"], - "@bitwarden/platform/*": ["../../libs/platform/src/*"], - "@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"], - "@bitwarden/ui-common": ["../../libs/ui/common/src"], - "@bitwarden/ui-common/setup-jest": ["../../libs/ui/common/src/setup-jest"], - "@bitwarden/vault-export-core": [ - "../../libs/tools/export/vault-export/vault-export-core/src" - ], - "@bitwarden/vault-export-ui": ["../../libs/tools/export/vault-export/vault-export-ui/src"], - "@bitwarden/vault": ["../../libs/vault/src"] - }, - "plugins": [ - { - "name": "typescript-strict-plugin" - } - ], - "useDefineForClassFields": false - }, - "angularCompilerOptions": { - "strictTemplates": true - }, + "extends": "../../tsconfig.base", "include": [ "src", "../../libs/common/src/autofill/constants", diff --git a/apps/cli/jest.config.js b/apps/cli/jest.config.js index e0a5b9ec9cc..c96395944b5 100644 --- a/apps/cli/jest.config.js +++ b/apps/cli/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.ts"); @@ -13,8 +13,14 @@ module.exports = { moduleNameMapper: { "@bitwarden/common/platform/services/sdk/default-sdk-client-factory": "/../../libs/common/spec/jest-sdk-client-factory", - ...pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/", - }), + ...pathsToModuleNameMapper( + { + "@bitwarden/common/spec": ["libs/common/spec"], + ...(compilerOptions?.paths || {}), + }, + { + prefix: "/../../", + }, + ), }, }; diff --git a/apps/cli/src/auth/commands/login.command.ts b/apps/cli/src/auth/commands/login.command.ts index cd5c8ef9bcd..a8e525e2206 100644 --- a/apps/cli/src/auth/commands/login.command.ts +++ b/apps/cli/src/auth/commands/login.command.ts @@ -34,6 +34,7 @@ import { CryptoFunctionService } from "@bitwarden/common/key-management/crypto/a import { KeyConnectorService } from "@bitwarden/common/key-management/key-connector/abstractions/key-connector.service"; import { MasterPasswordServiceAbstraction } from "@bitwarden/common/key-management/master-password/abstractions/master-password.service.abstraction"; import { EnvironmentService } from "@bitwarden/common/platform/abstractions/environment.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { EncString } from "@bitwarden/common/platform/models/domain/enc-string"; @@ -77,6 +78,7 @@ export class LoginCommand { protected logoutCallback: () => Promise, protected kdfConfigService: KdfConfigService, protected ssoUrlService: SsoUrlService, + protected i18nService: I18nService, protected masterPasswordService: MasterPasswordServiceAbstraction, ) {} @@ -227,9 +229,7 @@ export class LoginCommand { ); } if (response.requiresEncryptionKeyMigration) { - return Response.error( - "Encryption key migration required. Please login through the web vault to update your encryption key.", - ); + return Response.error(this.i18nService.t("legacyEncryptionUnsupported")); } if (response.requiresTwoFactor) { const twoFactorProviders = await this.twoFactorService.getSupportedProviders(null); diff --git a/apps/cli/src/locales/en/messages.json b/apps/cli/src/locales/en/messages.json index 9149e25c5bc..815939c0c95 100644 --- a/apps/cli/src/locales/en/messages.json +++ b/apps/cli/src/locales/en/messages.json @@ -185,6 +185,9 @@ } } }, + "legacyEncryptionUnsupported": { + "message": "Legacy encryption is no longer supported. Please contact support to recover your account." + }, "organizationUsingKeyConnectorOptInLoggedOut": { "message": "An organization you are a member of is using Key Connector. In order to access the vault, you must opt-in to Key Connector now via the web vault. You have been logged out." }, diff --git a/apps/cli/src/program.ts b/apps/cli/src/program.ts index e7e25d66343..468901282b4 100644 --- a/apps/cli/src/program.ts +++ b/apps/cli/src/program.ts @@ -175,6 +175,7 @@ export class Program extends BaseProgram { async () => await this.serviceContainer.logout(), this.serviceContainer.kdfConfigService, this.serviceContainer.ssoUrlService, + this.serviceContainer.i18nService, this.serviceContainer.masterPasswordService, ); const response = await command.run(email, password, options); diff --git a/apps/cli/tsconfig.json b/apps/cli/tsconfig.json index 9d6e3066b29..3bcd098ca19 100644 --- a/apps/cli/tsconfig.json +++ b/apps/cli/tsconfig.json @@ -1,38 +1,4 @@ { - "compilerOptions": { - "pretty": true, - "moduleResolution": "node", - "target": "ES2016", - "module": "ES2020", - "noImplicitAny": true, - "allowSyntheticDefaultImports": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowJs": true, - "sourceMap": true, - "baseUrl": ".", - "paths": { - "@bitwarden/common/spec": ["../../libs/common/spec"], - "@bitwarden/admin-console/common": ["../../libs/admin-console/src/common"], - "@bitwarden/auth/common": ["../../libs/auth/src/common"], - "@bitwarden/auth/angular": ["../../libs/auth/src/angular"], - "@bitwarden/common/*": ["../../libs/common/src/*"], - "@bitwarden/importer-core": ["../../libs/importer/src"], - "@bitwarden/generator-core": ["../../libs/tools/generator/core/src"], - "@bitwarden/generator-legacy": ["../../libs/tools/generator/extensions/legacy/src"], - "@bitwarden/generator-history": ["../../libs/tools/generator/extensions/history/src"], - "@bitwarden/generator-navigation": ["../../libs/tools/generator/extensions/navigation/src"], - "@bitwarden/vault-export-core": [ - "../../libs/tools/export/vault-export/vault-export-core/src" - ], - "@bitwarden/key-management": ["../../libs/key-management/src"], - "@bitwarden/node/*": ["../../libs/node/src/*"] - }, - "plugins": [ - { - "name": "typescript-strict-plugin" - } - ] - }, + "extends": "../../tsconfig.base", "include": ["src", "src/**/*.spec.ts"] } diff --git a/apps/desktop/jest.config.js b/apps/desktop/jest.config.js index 0d1034f0eac..14cd959810e 100644 --- a/apps/desktop/jest.config.js +++ b/apps/desktop/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -9,9 +9,9 @@ module.exports = { ...sharedConfig, setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( - { "@bitwarden/common/spec": ["../../libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, + { "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/apps/desktop/native-messaging-test-runner/tsconfig.json b/apps/desktop/native-messaging-test-runner/tsconfig.json index 59c7040e509..608e5a3bf4c 100644 --- a/apps/desktop/native-messaging-test-runner/tsconfig.json +++ b/apps/desktop/native-messaging-test-runner/tsconfig.json @@ -1,6 +1,6 @@ { + "extends": "../tsconfig", "compilerOptions": { - "baseUrl": "./", "outDir": "dist", "target": "es6", "module": "CommonJS", @@ -10,12 +10,7 @@ "sourceMap": false, "declaration": false, "paths": { - "@src/*": ["src/*"], - "@bitwarden/admin-console/*": ["../../../libs/admin-console/src/*"], - "@bitwarden/auth/*": ["../../../libs/auth/src/*"], - "@bitwarden/common/*": ["../../../libs/common/src/*"], - "@bitwarden/key-management": ["../../../libs/key-management/src/"], - "@bitwarden/node/*": ["../../../libs/node/src/*"] + "@src/*": ["src/*"] }, "plugins": [ { diff --git a/apps/desktop/src/app/tools/export/export-desktop.component.ts b/apps/desktop/src/app/tools/export/export-desktop.component.ts index 11651111492..03afb154200 100644 --- a/apps/desktop/src/app/tools/export/export-desktop.component.ts +++ b/apps/desktop/src/app/tools/export/export-desktop.component.ts @@ -7,7 +7,6 @@ import { ExportComponent } from "@bitwarden/vault-export-ui"; @Component({ templateUrl: "export-desktop.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/desktop/src/app/tools/generator/credential-generator.component.ts b/apps/desktop/src/app/tools/generator/credential-generator.component.ts index aed8bf18684..4124b2439da 100644 --- a/apps/desktop/src/app/tools/generator/credential-generator.component.ts +++ b/apps/desktop/src/app/tools/generator/credential-generator.component.ts @@ -14,7 +14,6 @@ import { } from "@bitwarden/generator-components"; @Component({ - standalone: true, selector: "credential-generator", templateUrl: "credential-generator.component.html", imports: [DialogModule, ButtonModule, JslibModule, GeneratorModule, ItemModule, LinkModule], diff --git a/apps/desktop/src/app/tools/import/import-desktop.component.ts b/apps/desktop/src/app/tools/import/import-desktop.component.ts index 7d0780bf0df..c1639c6d3ec 100644 --- a/apps/desktop/src/app/tools/import/import-desktop.component.ts +++ b/apps/desktop/src/app/tools/import/import-desktop.component.ts @@ -7,7 +7,6 @@ import { ImportComponent } from "@bitwarden/importer-ui"; @Component({ templateUrl: "import-desktop.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/apps/desktop/src/app/tools/send/add-edit.component.ts b/apps/desktop/src/app/tools/send/add-edit.component.ts index c0db3934259..025bab66539 100644 --- a/apps/desktop/src/app/tools/send/add-edit.component.ts +++ b/apps/desktop/src/app/tools/send/add-edit.component.ts @@ -22,7 +22,6 @@ import { CalloutModule, DialogService, ToastService } from "@bitwarden/component @Component({ selector: "app-send-add-edit", templateUrl: "add-edit.component.html", - standalone: true, imports: [CommonModule, JslibModule, ReactiveFormsModule, CalloutModule], }) export class AddEditComponent extends BaseAddEditComponent { diff --git a/apps/desktop/src/app/tools/send/send.component.ts b/apps/desktop/src/app/tools/send/send.component.ts index 6c2c3ed53c6..3ca26780853 100644 --- a/apps/desktop/src/app/tools/send/send.component.ts +++ b/apps/desktop/src/app/tools/send/send.component.ts @@ -38,7 +38,6 @@ const BroadcasterSubscriptionId = "SendComponent"; @Component({ selector: "app-send", templateUrl: "send.component.html", - standalone: true, imports: [CommonModule, JslibModule, FormsModule, NavComponent, AddEditComponent], }) export class SendComponent extends BaseSendComponent implements OnInit, OnDestroy { diff --git a/apps/desktop/src/autofill/services/desktop-autofill.service.ts b/apps/desktop/src/autofill/services/desktop-autofill.service.ts index d6dddf3b23f..7e60c6b8d76 100644 --- a/apps/desktop/src/autofill/services/desktop-autofill.service.ts +++ b/apps/desktop/src/autofill/services/desktop-autofill.service.ts @@ -1,5 +1,4 @@ import { Injectable, OnDestroy } from "@angular/core"; -import { autofill } from "desktop_native/napi"; import { Subject, distinctUntilChanged, @@ -33,6 +32,7 @@ import { UserId } from "@bitwarden/common/types/guid"; import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; import { CipherType } from "@bitwarden/common/vault/enums"; import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; +import { autofill } from "@bitwarden/desktop-napi"; import { NativeAutofillStatusCommand } from "../../platform/main/autofill/status.command"; import { diff --git a/apps/desktop/src/locales/en/messages.json b/apps/desktop/src/locales/en/messages.json index 6aa5e50871f..4de0269928f 100644 --- a/apps/desktop/src/locales/en/messages.json +++ b/apps/desktop/src/locales/en/messages.json @@ -691,8 +691,8 @@ "maxFileSize": { "message": "Maximum file size is 500 MB." }, - "encryptionKeyMigrationRequired": { - "message": "Encryption key migration required. Please login through the web vault to update your encryption key." + "legacyEncryptionUnsupported": { + "message": "Legacy encryption is no longer supported. Please contact support to recover your account." }, "editedFolder": { "message": "Folder saved" diff --git a/apps/desktop/src/vault/app/vault/credential-generator-dialog.component.ts b/apps/desktop/src/vault/app/vault/credential-generator-dialog.component.ts index 204615443ba..1a375fc0f5a 100644 --- a/apps/desktop/src/vault/app/vault/credential-generator-dialog.component.ts +++ b/apps/desktop/src/vault/app/vault/credential-generator-dialog.component.ts @@ -39,7 +39,6 @@ export enum CredentialGeneratorDialogAction { } @Component({ - standalone: true, selector: "credential-generator-dialog", templateUrl: "credential-generator-dialog.component.html", imports: [ diff --git a/apps/desktop/src/vault/app/vault/item-footer.component.ts b/apps/desktop/src/vault/app/vault/item-footer.component.ts index 639d1557ecd..a022246ed94 100644 --- a/apps/desktop/src/vault/app/vault/item-footer.component.ts +++ b/apps/desktop/src/vault/app/vault/item-footer.component.ts @@ -18,7 +18,6 @@ import { PasswordRepromptService } from "@bitwarden/vault"; @Component({ selector: "app-vault-item-footer", templateUrl: "item-footer.component.html", - standalone: true, imports: [ButtonModule, CommonModule, JslibModule], }) export class ItemFooterComponent implements OnInit { diff --git a/apps/desktop/src/vault/app/vault/vault-items-v2.component.ts b/apps/desktop/src/vault/app/vault/vault-items-v2.component.ts index 31d4098d2b2..5a832ed79b0 100644 --- a/apps/desktop/src/vault/app/vault/vault-items-v2.component.ts +++ b/apps/desktop/src/vault/app/vault/vault-items-v2.component.ts @@ -17,7 +17,6 @@ import { SearchBarService } from "../../../app/layout/search/search-bar.service" @Component({ selector: "app-vault-items-v2", templateUrl: "vault-items-v2.component.html", - standalone: true, imports: [MenuModule, CommonModule, JslibModule, ScrollingModule], }) export class VaultItemsV2Component extends BaseVaultItemsComponent { diff --git a/apps/desktop/src/vault/app/vault/vault-v2.component.ts b/apps/desktop/src/vault/app/vault/vault-v2.component.ts index b45d943dcdd..70f0f29deee 100644 --- a/apps/desktop/src/vault/app/vault/vault-v2.component.ts +++ b/apps/desktop/src/vault/app/vault/vault-v2.component.ts @@ -79,7 +79,6 @@ const BroadcasterSubscriptionId = "VaultComponent"; @Component({ selector: "app-vault", templateUrl: "vault-v2.component.html", - standalone: true, imports: [ BadgeModule, CommonModule, diff --git a/apps/desktop/tsconfig.json b/apps/desktop/tsconfig.json index 27e38757e97..7db3e84e451 100644 --- a/apps/desktop/tsconfig.json +++ b/apps/desktop/tsconfig.json @@ -1,50 +1,5 @@ { - "compilerOptions": { - "moduleResolution": "node", - "noImplicitAny": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "module": "ES2020", - "target": "ES2016", - "sourceMap": true, - "types": [], - "baseUrl": ".", - "paths": { - "@bitwarden/admin-console/common": ["../../libs/admin-console/src/common"], - "@bitwarden/angular/*": ["../../libs/angular/src/*"], - "@bitwarden/auth/common": ["../../libs/auth/src/common"], - "@bitwarden/auth/angular": ["../../libs/auth/src/angular"], - "@bitwarden/billing": ["../../libs/billing/src"], - "@bitwarden/common/*": ["../../libs/common/src/*"], - "@bitwarden/components": ["../../libs/components/src"], - "@bitwarden/dirt-card": ["../../libs/dirt/card/src"], - "@bitwarden/generator-components": ["../../libs/tools/generator/components/src"], - "@bitwarden/generator-core": ["../../libs/tools/generator/core/src"], - "@bitwarden/generator-history": ["../../libs/tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../../libs/tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../../libs/tools/generator/extensions/navigation/src"], - "@bitwarden/importer-core": ["../../libs/importer/src"], - "@bitwarden/importer-ui": ["../../libs/importer/src/components"], - "@bitwarden/key-management": ["../../libs/key-management/src"], - "@bitwarden/key-management-ui": ["../../libs/key-management-ui/src"], - "@bitwarden/node/*": ["../../libs/node/src/*"], - "@bitwarden/platform": ["../../libs/platform/src"], - "@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"], - "@bitwarden/ui-common": ["../../libs/ui/common/src"], - "@bitwarden/ui-common/setup-jest": ["../../libs/ui/common/src/setup-jest"], - "@bitwarden/vault-export-core": [ - "../../libs/tools/export/vault-export/vault-export-core/src" - ], - "@bitwarden/vault-export-ui": ["../../libs/tools/export/vault-export/vault-export-ui/src"], - "@bitwarden/vault": ["../../libs/vault/src"] - }, - "plugins": [ - { - "name": "typescript-strict-plugin" - } - ], - "useDefineForClassFields": false - }, + "extends": "../../tsconfig.base", "angularCompilerOptions": { "strictTemplates": true }, diff --git a/apps/web/jest.config.js b/apps/web/jest.config.js index 724e44be009..e1d64fa64c3 100644 --- a/apps/web/jest.config.js +++ b/apps/web/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -15,11 +15,11 @@ module.exports = { ...pathsToModuleNameMapper( { // lets us use @bitwarden/common/spec in web tests - "@bitwarden/common/spec": ["../../libs/common/spec"], + "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}), }, { - prefix: "/", + prefix: "/../../", }, ), }, diff --git a/apps/web/src/app/admin-console/organizations/collections/bulk-collections-dialog/bulk-collections-dialog.component.ts b/apps/web/src/app/admin-console/organizations/collections/bulk-collections-dialog/bulk-collections-dialog.component.ts index 147340e6a00..7c4e2156ffb 100644 --- a/apps/web/src/app/admin-console/organizations/collections/bulk-collections-dialog/bulk-collections-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/bulk-collections-dialog/bulk-collections-dialog.component.ts @@ -54,7 +54,6 @@ export enum BulkCollectionsDialogResult { imports: [SharedModule, AccessSelectorModule], selector: "app-bulk-collections-dialog", templateUrl: "bulk-collections-dialog.component.html", - standalone: true, }) export class BulkCollectionsDialogComponent implements OnDestroy { protected readonly PermissionMode = PermissionMode; diff --git a/apps/web/src/app/admin-console/organizations/collections/collection-access-restricted.component.ts b/apps/web/src/app/admin-console/organizations/collections/collection-access-restricted.component.ts index 15ba10a0d59..3f26e03e203 100644 --- a/apps/web/src/app/admin-console/organizations/collections/collection-access-restricted.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/collection-access-restricted.component.ts @@ -12,7 +12,6 @@ const icon = svgIcon` {{ "youDoNotHavePermissions" | i18n }} diff --git a/apps/web/src/app/admin-console/organizations/collections/collection-badge/collection-name.badge.component.ts b/apps/web/src/app/admin-console/organizations/collections/collection-badge/collection-name.badge.component.ts index d8ace8acc56..728faaf66e2 100644 --- a/apps/web/src/app/admin-console/organizations/collections/collection-badge/collection-name.badge.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/collection-badge/collection-name.badge.component.ts @@ -10,7 +10,6 @@ import { GetCollectionNameFromIdPipe } from "../pipes"; @Component({ selector: "app-collection-badge", templateUrl: "collection-name-badge.component.html", - standalone: true, imports: [SharedModule, GetCollectionNameFromIdPipe], }) export class CollectionNameBadgeComponent { diff --git a/apps/web/src/app/admin-console/organizations/collections/pipes/get-collection-name.pipe.ts b/apps/web/src/app/admin-console/organizations/collections/pipes/get-collection-name.pipe.ts index 8833ddfa382..b52719304b8 100644 --- a/apps/web/src/app/admin-console/organizations/collections/pipes/get-collection-name.pipe.ts +++ b/apps/web/src/app/admin-console/organizations/collections/pipes/get-collection-name.pipe.ts @@ -5,7 +5,6 @@ import { CollectionView } from "@bitwarden/admin-console/common"; @Pipe({ name: "collectionNameFromId", pure: true, - standalone: true, }) export class GetCollectionNameFromIdPipe implements PipeTransform { transform(value: string, collections: CollectionView[]) { diff --git a/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.ts b/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.ts index 4c129e325c5..b343d5874bc 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/vault-header/vault-header.component.ts @@ -35,7 +35,6 @@ import { import { CollectionDialogTabType } from "../../shared/components/collection-dialog"; @Component({ - standalone: true, selector: "app-org-vault-header", templateUrl: "./vault-header.component.html", imports: [ diff --git a/apps/web/src/app/admin-console/organizations/collections/vault.component.ts b/apps/web/src/app/admin-console/organizations/collections/vault.component.ts index 45300b45fa5..bc0f517d1fb 100644 --- a/apps/web/src/app/admin-console/organizations/collections/vault.component.ts +++ b/apps/web/src/app/admin-console/organizations/collections/vault.component.ts @@ -144,7 +144,6 @@ enum AddAccessStatusType { } @Component({ - standalone: true, selector: "app-org-vault", templateUrl: "vault.component.html", imports: [ diff --git a/apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts b/apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts index 80c12af8522..e6a62b1db73 100644 --- a/apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts +++ b/apps/web/src/app/admin-console/organizations/integrations/integrations.component.ts @@ -22,7 +22,6 @@ import { Integration } from "../shared/components/integrations/models"; @Component({ selector: "ac-integrations", templateUrl: "./integrations.component.html", - standalone: true, imports: [ SharedModule, SharedOrganizationModule, diff --git a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts index 726832b478a..e60cc918fb8 100644 --- a/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts +++ b/apps/web/src/app/admin-console/organizations/layouts/organization-layout.component.ts @@ -37,7 +37,6 @@ import { AdminConsoleLogo } from "../../icons/admin-console-logo"; @Component({ selector: "app-organization-layout", templateUrl: "organization-layout.component.html", - standalone: true, imports: [ CommonModule, RouterModule, diff --git a/apps/web/src/app/admin-console/organizations/manage/entity-events.component.ts b/apps/web/src/app/admin-console/organizations/manage/entity-events.component.ts index 4eab2969fff..10f68695e88 100644 --- a/apps/web/src/app/admin-console/organizations/manage/entity-events.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/entity-events.component.ts @@ -38,7 +38,6 @@ export interface EntityEventsDialogParams { @Component({ imports: [SharedModule], templateUrl: "entity-events.component.html", - standalone: true, }) export class EntityEventsComponent implements OnInit, OnDestroy { loading = true; diff --git a/apps/web/src/app/admin-console/organizations/manage/verify-recover-delete-org.component.ts b/apps/web/src/app/admin-console/organizations/manage/verify-recover-delete-org.component.ts index 6dcdff00160..f88eb82e529 100644 --- a/apps/web/src/app/admin-console/organizations/manage/verify-recover-delete-org.component.ts +++ b/apps/web/src/app/admin-console/organizations/manage/verify-recover-delete-org.component.ts @@ -14,7 +14,6 @@ import { SharedModule } from "../../../shared/shared.module"; @Component({ templateUrl: "verify-recover-delete-org.component.html", - standalone: true, imports: [SharedModule], }) export class VerifyRecoverDeleteOrgComponent implements OnInit { diff --git a/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts b/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts index e942eecbd37..8c2bfe079de 100644 --- a/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts @@ -80,7 +80,6 @@ export enum DeleteOrganizationDialogResult { @Component({ selector: "app-delete-organization", - standalone: true, imports: [SharedModule, UserVerificationModule], templateUrl: "delete-organization-dialog.component.html", }) diff --git a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts b/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts index 70b26041df6..e9865f14d54 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/collection-dialog/collection-dialog.component.ts @@ -117,7 +117,6 @@ export enum CollectionDialogAction { @Component({ templateUrl: "collection-dialog.component.html", - standalone: true, imports: [SharedModule, AccessSelectorModule, SelectModule], }) export class CollectionDialogComponent implements OnInit, OnDestroy { diff --git a/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.ts index 3943ceb22ed..20e4028e9df 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-card/integration-card.component.ts @@ -20,7 +20,6 @@ import { SharedModule } from "../../../../../../shared/shared.module"; @Component({ selector: "app-integration-card", templateUrl: "./integration-card.component.html", - standalone: true, imports: [SharedModule], }) export class IntegrationCardComponent implements AfterViewInit, OnDestroy { diff --git a/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.ts index 2e3158f9894..55b552bd251 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integration-grid/integration-grid.component.ts @@ -11,7 +11,6 @@ import { Integration } from "../models"; @Component({ selector: "app-integration-grid", templateUrl: "./integration-grid.component.html", - standalone: true, imports: [IntegrationCardComponent, SharedModule], }) export class IntegrationGridComponent { diff --git a/apps/web/src/app/admin-console/organizations/shared/components/integrations/integrations.pipe.ts b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integrations.pipe.ts index 760d9913e9e..ae9f73e78c0 100644 --- a/apps/web/src/app/admin-console/organizations/shared/components/integrations/integrations.pipe.ts +++ b/apps/web/src/app/admin-console/organizations/shared/components/integrations/integrations.pipe.ts @@ -6,7 +6,6 @@ import { Integration } from "../../../shared/components/integrations/models"; @Pipe({ name: "filterIntegrations", - standalone: true, }) export class FilterIntegrationsPipe implements PipeTransform { transform(integrations: Integration[], type: IntegrationType): Integration[] { diff --git a/apps/web/src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts b/apps/web/src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts index 57fe212fa65..30c0ba159c1 100644 --- a/apps/web/src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts +++ b/apps/web/src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts @@ -30,7 +30,6 @@ import { @Component({ templateUrl: "families-for-enterprise-setup.component.html", - standalone: true, imports: [SharedModule, OrganizationPlansComponent], }) export class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy { diff --git a/apps/web/src/app/admin-console/settings/create-organization.component.ts b/apps/web/src/app/admin-console/settings/create-organization.component.ts index 7a20826086d..f87e9ec5b72 100644 --- a/apps/web/src/app/admin-console/settings/create-organization.component.ts +++ b/apps/web/src/app/admin-console/settings/create-organization.component.ts @@ -13,7 +13,6 @@ import { SharedModule } from "../../shared"; @Component({ templateUrl: "create-organization.component.html", - standalone: true, imports: [SharedModule, OrganizationPlansComponent, HeaderModule], }) export class CreateOrganizationComponent { diff --git a/apps/web/src/app/auth/core/services/two-factor-auth/index.ts b/apps/web/src/app/auth/core/services/two-factor-auth/index.ts index ba2697fdee4..4ca57b34737 100644 --- a/apps/web/src/app/auth/core/services/two-factor-auth/index.ts +++ b/apps/web/src/app/auth/core/services/two-factor-auth/index.ts @@ -1,2 +1 @@ -export * from "./web-two-factor-auth-component.service"; export * from "./web-two-factor-auth-duo-component.service"; diff --git a/apps/web/src/app/auth/core/services/two-factor-auth/web-two-factor-auth-component.service.ts b/apps/web/src/app/auth/core/services/two-factor-auth/web-two-factor-auth-component.service.ts deleted file mode 100644 index 451cec57ddd..00000000000 --- a/apps/web/src/app/auth/core/services/two-factor-auth/web-two-factor-auth-component.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { - DefaultTwoFactorAuthComponentService, - TwoFactorAuthComponentService, - LegacyKeyMigrationAction, -} from "@bitwarden/auth/angular"; - -export class WebTwoFactorAuthComponentService - extends DefaultTwoFactorAuthComponentService - implements TwoFactorAuthComponentService -{ - override determineLegacyKeyMigrationAction(): LegacyKeyMigrationAction { - return LegacyKeyMigrationAction.NAVIGATE_TO_MIGRATION_COMPONENT; - } -} diff --git a/apps/web/src/app/core/core.module.ts b/apps/web/src/app/core/core.module.ts index 415dae50c74..ea54b1972a9 100644 --- a/apps/web/src/app/core/core.module.ts +++ b/apps/web/src/app/core/core.module.ts @@ -32,7 +32,6 @@ import { SetPasswordJitService, SsoComponentService, LoginDecryptionOptionsService, - TwoFactorAuthComponentService, TwoFactorAuthDuoComponentService, ChangePasswordService, } from "@bitwarden/auth/angular"; @@ -117,7 +116,6 @@ import { WebRegistrationFinishService, WebLoginComponentService, WebLoginDecryptionOptionsService, - WebTwoFactorAuthComponentService, WebTwoFactorAuthDuoComponentService, LinkSsoService, } from "../auth"; @@ -270,12 +268,6 @@ const safeProviders: SafeProvider[] = [ useClass: WebLockComponentService, deps: [], }), - // TODO: PM-18182 - Refactor component services into lazy loaded modules - safeProvider({ - provide: TwoFactorAuthComponentService, - useClass: WebTwoFactorAuthComponentService, - deps: [], - }), safeProvider({ provide: SetPasswordJitService, useClass: WebSetPasswordJitService, diff --git a/apps/web/src/app/key-management/migrate-encryption/migrate-legacy-encryption.component.html b/apps/web/src/app/key-management/migrate-encryption/migrate-legacy-encryption.component.html deleted file mode 100644 index 7ed1efeb461..00000000000 --- a/apps/web/src/app/key-management/migrate-encryption/migrate-legacy-encryption.component.html +++ /dev/null @@ -1,36 +0,0 @@ -
-
-
-

{{ "updateEncryptionKey" | i18n }}

-
-

- {{ "updateEncryptionSchemeDesc" | i18n }} - {{ "learnMore" | i18n }} -

- {{ "updateEncryptionKeyWarning" | i18n }} - - - {{ "masterPass" | i18n }} - - - - -
-
-
-
diff --git a/apps/web/src/app/key-management/migrate-encryption/migrate-legacy-encryption.component.ts b/apps/web/src/app/key-management/migrate-encryption/migrate-legacy-encryption.component.ts deleted file mode 100644 index f6685a749a2..00000000000 --- a/apps/web/src/app/key-management/migrate-encryption/migrate-legacy-encryption.component.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Component } from "@angular/core"; -import { FormControl, FormGroup, Validators } from "@angular/forms"; -import { firstValueFrom } from "rxjs"; - -import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; -import { ErrorResponse } from "@bitwarden/common/models/response/error.response"; -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; -import { FolderApiServiceAbstraction } from "@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction"; -import { SyncService } from "@bitwarden/common/vault/abstractions/sync/sync.service.abstraction"; -import { DialogService, ToastService } from "@bitwarden/components"; -import { KeyService } from "@bitwarden/key-management"; - -import { SharedModule } from "../../shared"; -import { UserKeyRotationModule } from "../key-rotation/user-key-rotation.module"; -import { UserKeyRotationService } from "../key-rotation/user-key-rotation.service"; - -// The master key was originally used to encrypt user data, before the user key was introduced. -// This component is used to migrate from the old encryption scheme to the new one. -@Component({ - imports: [SharedModule, UserKeyRotationModule], - templateUrl: "migrate-legacy-encryption.component.html", -}) -export class MigrateFromLegacyEncryptionComponent { - protected formGroup = new FormGroup({ - masterPassword: new FormControl("", [Validators.required]), - }); - - constructor( - private accountService: AccountService, - private keyRotationService: UserKeyRotationService, - private i18nService: I18nService, - private keyService: KeyService, - private messagingService: MessagingService, - private logService: LogService, - private syncService: SyncService, - private toastService: ToastService, - private dialogService: DialogService, - private folderApiService: FolderApiServiceAbstraction, - ) {} - - submit = async () => { - this.formGroup.markAsTouched(); - - if (this.formGroup.invalid) { - return; - } - - const activeUser = await firstValueFrom(this.accountService.activeAccount$); - if (activeUser == null) { - throw new Error("No active user."); - } - - const hasUserKey = await this.keyService.hasUserKey(activeUser.id); - if (hasUserKey) { - this.messagingService.send("logout"); - throw new Error("User key already exists, cannot migrate legacy encryption."); - } - - const masterPassword = this.formGroup.value.masterPassword!; - - try { - await this.syncService.fullSync(false, true); - - await this.keyRotationService.rotateUserKeyAndEncryptedDataLegacy(masterPassword, activeUser); - - this.toastService.showToast({ - variant: "success", - title: this.i18nService.t("keyUpdated"), - message: this.i18nService.t("logBackInOthersToo"), - timeout: 15000, - }); - this.messagingService.send("logout"); - } catch (e) { - // If the error is due to missing folders, we can delete all folders and try again - if ( - e instanceof ErrorResponse && - e.message === "All existing folders must be included in the rotation." - ) { - const deleteFolders = await this.dialogService.openSimpleDialog({ - type: "warning", - title: { key: "encryptionKeyUpdateCannotProceed" }, - content: { key: "keyUpdateFoldersFailed" }, - acceptButtonText: { key: "ok" }, - cancelButtonText: { key: "cancel" }, - }); - - if (deleteFolders) { - await this.folderApiService.deleteAll(activeUser.id); - await this.syncService.fullSync(true, true); - await this.submit(); - return; - } - } - this.logService.error(e); - throw e; - } - }; -} diff --git a/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.stories.ts b/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.stories.ts index 0ecec9d8944..f0660f7d655 100644 --- a/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.stories.ts +++ b/apps/web/src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.stories.ts @@ -3,7 +3,6 @@ import { RouterModule } from "@angular/router"; import { applicationConfig, Meta, moduleMetadata, StoryObj } from "@storybook/angular"; import { BehaviorSubject, firstValueFrom, Observable, of } from "rxjs"; -import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; @@ -18,6 +17,7 @@ import { LayoutComponent, NavigationModule } from "@bitwarden/components"; // FIXME: remove `src` and fix import // eslint-disable-next-line no-restricted-imports import { I18nMockService } from "@bitwarden/components/src/utils/i18n-mock.service"; +import { I18nPipe } from "@bitwarden/ui-common"; import { ProductSwitcherService } from "../shared/product-switcher.service"; @@ -109,9 +109,8 @@ export default { MockProviderService, StoryLayoutComponent, StoryContentComponent, - I18nPipe, ], - imports: [NavigationModule, RouterModule, LayoutComponent], + imports: [NavigationModule, RouterModule, LayoutComponent, I18nPipe], providers: [ { provide: OrganizationService, useClass: MockOrganizationService }, { provide: AccountService, useClass: MockAccountService }, @@ -119,12 +118,6 @@ export default { { provide: SyncService, useClass: MockSyncService }, { provide: PlatformUtilsService, useClass: MockPlatformUtilsService }, ProductSwitcherService, - { - provide: I18nPipe, - useFactory: () => ({ - transform: (key: string) => translations[key], - }), - }, { provide: I18nService, useFactory: () => { diff --git a/apps/web/src/app/layouts/product-switcher/product-switcher.module.ts b/apps/web/src/app/layouts/product-switcher/product-switcher.module.ts index d43bca1c0b9..b78b1ce6b96 100644 --- a/apps/web/src/app/layouts/product-switcher/product-switcher.module.ts +++ b/apps/web/src/app/layouts/product-switcher/product-switcher.module.ts @@ -2,8 +2,8 @@ import { A11yModule } from "@angular/cdk/a11y"; import { NgModule } from "@angular/core"; import { RouterModule } from "@angular/router"; -import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe"; import { NavigationModule } from "@bitwarden/components"; +import { I18nPipe } from "@bitwarden/ui-common"; import { SharedModule } from "../../shared"; @@ -12,13 +12,12 @@ import { ProductSwitcherContentComponent } from "./product-switcher-content.comp import { ProductSwitcherComponent } from "./product-switcher.component"; @NgModule({ - imports: [SharedModule, A11yModule, RouterModule, NavigationModule], + imports: [SharedModule, A11yModule, RouterModule, NavigationModule, I18nPipe], declarations: [ ProductSwitcherComponent, ProductSwitcherContentComponent, NavigationProductSwitcherComponent, ], exports: [ProductSwitcherComponent, NavigationProductSwitcherComponent], - providers: [I18nPipe], }) export class ProductSwitcherModule {} diff --git a/apps/web/src/app/layouts/product-switcher/shared/product-switcher.service.spec.ts b/apps/web/src/app/layouts/product-switcher/shared/product-switcher.service.spec.ts index 4abd85d7991..f72557ac57f 100644 --- a/apps/web/src/app/layouts/product-switcher/shared/product-switcher.service.spec.ts +++ b/apps/web/src/app/layouts/product-switcher/shared/product-switcher.service.spec.ts @@ -5,13 +5,13 @@ import { ActivatedRoute, Router, convertToParamMap } from "@angular/router"; import { mock, MockProxy } from "jest-mock-extended"; import { Observable, firstValueFrom, of } from "rxjs"; -import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe"; import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; import { PolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; import { ProviderService } from "@bitwarden/common/admin-console/abstractions/provider.service"; import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { Provider } from "@bitwarden/common/admin-console/models/domain/provider"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { Utils } from "@bitwarden/common/platform/misc/utils"; import { SyncService } from "@bitwarden/common/platform/sync"; @@ -70,9 +70,9 @@ describe("ProductSwitcherService", () => { }, }, { - provide: I18nPipe, + provide: I18nService, useValue: { - transform: (key: string) => key, + t: (id: string, p1?: string | number, p2?: string | number, p3?: string | number) => id, }, }, { diff --git a/apps/web/src/app/layouts/product-switcher/shared/product-switcher.service.ts b/apps/web/src/app/layouts/product-switcher/shared/product-switcher.service.ts index 53ec3b0840f..2d296ac7d62 100644 --- a/apps/web/src/app/layouts/product-switcher/shared/product-switcher.service.ts +++ b/apps/web/src/app/layouts/product-switcher/shared/product-switcher.service.ts @@ -14,7 +14,6 @@ import { switchMap, } from "rxjs"; -import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe"; import { canAccessOrgAdmin, OrganizationService, @@ -25,6 +24,7 @@ import { PolicyType, ProviderType } from "@bitwarden/common/admin-console/enums" import { Organization } from "@bitwarden/common/admin-console/models/domain/organization"; import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; import { getUserId } from "@bitwarden/common/auth/services/account.service"; +import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { SyncService } from "@bitwarden/common/platform/sync"; @@ -103,11 +103,11 @@ export class ProductSwitcherService { private providerService: ProviderService, private route: ActivatedRoute, private router: Router, - private i18n: I18nPipe, private syncService: SyncService, private accountService: AccountService, private platformUtilsService: PlatformUtilsService, private policyService: PolicyService, + private i18nService: I18nService, ) { this.pollUntilSynced(); } @@ -197,7 +197,7 @@ export class ProductSwitcherService { }, isActive: this.router.url.includes("/sm/"), otherProductOverrides: { - supportingText: this.i18n.transform("secureYourInfrastructure"), + supportingText: this.i18nService.t("secureYourInfrastructure"), }, }, ac: { @@ -222,7 +222,7 @@ export class ProductSwitcherService { marketingRoute: orgsMarketingRoute, otherProductOverrides: { name: "Share your passwords", - supportingText: this.i18n.transform("protectYourFamilyOrBusiness"), + supportingText: this.i18nService.t("protectYourFamilyOrBusiness"), }, }, } satisfies Record; diff --git a/apps/web/src/app/oss-routing.module.ts b/apps/web/src/app/oss-routing.module.ts index b70ae6c5d3f..50de97afe8f 100644 --- a/apps/web/src/app/oss-routing.module.ts +++ b/apps/web/src/app/oss-routing.module.ts @@ -170,13 +170,6 @@ const routes: Routes = [ ], data: { titleId: "updatePassword" } satisfies RouteDataProperties, }, - { - path: "migrate-legacy-encryption", - loadComponent: () => - import("./key-management/migrate-encryption/migrate-legacy-encryption.component").then( - (mod) => mod.MigrateFromLegacyEncryptionComponent, - ), - }, ], }, { diff --git a/apps/web/src/app/tools/credential-generator/credential-generator.component.ts b/apps/web/src/app/tools/credential-generator/credential-generator.component.ts index 8d7b56a09ad..7d62bff0ac1 100644 --- a/apps/web/src/app/tools/credential-generator/credential-generator.component.ts +++ b/apps/web/src/app/tools/credential-generator/credential-generator.component.ts @@ -10,7 +10,6 @@ import { HeaderModule } from "../../layouts/header/header.module"; import { SharedModule } from "../../shared"; @Component({ - standalone: true, selector: "credential-generator", templateUrl: "credential-generator.component.html", imports: [SharedModule, HeaderModule, GeneratorModule, ButtonModule, LinkModule], diff --git a/apps/web/src/app/tools/import/import-web.component.ts b/apps/web/src/app/tools/import/import-web.component.ts index a527b9e71f4..7883769389f 100644 --- a/apps/web/src/app/tools/import/import-web.component.ts +++ b/apps/web/src/app/tools/import/import-web.component.ts @@ -8,7 +8,6 @@ import { SharedModule } from "../../shared"; @Component({ templateUrl: "import-web.component.html", - standalone: true, imports: [SharedModule, ImportComponent, HeaderModule], }) export class ImportWebComponent { diff --git a/apps/web/src/app/tools/import/org-import.component.ts b/apps/web/src/app/tools/import/org-import.component.ts index 90c13833ffc..fd833f3a698 100644 --- a/apps/web/src/app/tools/import/org-import.component.ts +++ b/apps/web/src/app/tools/import/org-import.component.ts @@ -20,7 +20,6 @@ import { ImportCollectionAdminService } from "./import-collection-admin.service" @Component({ templateUrl: "org-import.component.html", - standalone: true, imports: [SharedModule, ImportComponent, LooseComponentsModule], providers: [ { diff --git a/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.ts b/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.ts index 8cd052aa016..64ada8f75d0 100644 --- a/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.ts +++ b/apps/web/src/app/tools/send/new-send/new-send-dropdown.component.ts @@ -13,7 +13,6 @@ import { DefaultSendFormConfigService, SendAddEditDialogComponent } from "@bitwa @Component({ selector: "tools-new-send-dropdown", templateUrl: "new-send-dropdown.component.html", - standalone: true, imports: [JslibModule, CommonModule, ButtonModule, MenuModule, BadgeModule], providers: [DefaultSendFormConfigService], }) diff --git a/apps/web/src/app/tools/send/send-access/access.component.ts b/apps/web/src/app/tools/send/send-access/access.component.ts index 7fd66a10c20..2676cb9bef4 100644 --- a/apps/web/src/app/tools/send/send-access/access.component.ts +++ b/apps/web/src/app/tools/send/send-access/access.component.ts @@ -30,7 +30,6 @@ import { SendAccessTextComponent } from "./send-access-text.component"; @Component({ selector: "app-send-access", templateUrl: "access.component.html", - standalone: true, imports: [ SendAccessFileComponent, SendAccessTextComponent, diff --git a/apps/web/src/app/tools/send/send-access/send-access-explainer.component.ts b/apps/web/src/app/tools/send/send-access/send-access-explainer.component.ts index ec39d970444..d9f35a3d38e 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-explainer.component.ts +++ b/apps/web/src/app/tools/send/send-access/send-access-explainer.component.ts @@ -5,7 +5,6 @@ import { SharedModule } from "../../../shared"; @Component({ selector: "app-send-access-explainer", templateUrl: "send-access-explainer.component.html", - standalone: true, imports: [SharedModule], }) export class SendAccessExplainerComponent { diff --git a/apps/web/src/app/tools/send/send-access/send-access-file.component.ts b/apps/web/src/app/tools/send/send-access/send-access-file.component.ts index eec0bfd787b..3b1bf427a0b 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-file.component.ts +++ b/apps/web/src/app/tools/send/send-access/send-access-file.component.ts @@ -19,7 +19,6 @@ import { SharedModule } from "../../../shared"; selector: "app-send-access-file", templateUrl: "send-access-file.component.html", imports: [SharedModule], - standalone: true, }) export class SendAccessFileComponent { @Input() send: SendAccessView; diff --git a/apps/web/src/app/tools/send/send-access/send-access-password.component.ts b/apps/web/src/app/tools/send/send-access/send-access-password.component.ts index 0cfd93fcea0..81e66c8acc4 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-password.component.ts +++ b/apps/web/src/app/tools/send/send-access/send-access-password.component.ts @@ -10,7 +10,6 @@ import { SharedModule } from "../../../shared"; selector: "app-send-access-password", templateUrl: "send-access-password.component.html", imports: [SharedModule], - standalone: true, }) export class SendAccessPasswordComponent implements OnInit, OnDestroy { private destroy$ = new Subject(); diff --git a/apps/web/src/app/tools/send/send-access/send-access-text.component.ts b/apps/web/src/app/tools/send/send-access/send-access-text.component.ts index 6f9bc798d4b..2b5405a3f27 100644 --- a/apps/web/src/app/tools/send/send-access/send-access-text.component.ts +++ b/apps/web/src/app/tools/send/send-access/send-access-text.component.ts @@ -14,7 +14,6 @@ import { SharedModule } from "../../../shared"; selector: "app-send-access-text", templateUrl: "send-access-text.component.html", imports: [SharedModule], - standalone: true, }) export class SendAccessTextComponent { private _send: SendAccessView = null; diff --git a/apps/web/src/app/tools/send/send.component.ts b/apps/web/src/app/tools/send/send.component.ts index c6057c654f5..3d42b3182f8 100644 --- a/apps/web/src/app/tools/send/send.component.ts +++ b/apps/web/src/app/tools/send/send.component.ts @@ -41,7 +41,6 @@ const BroadcasterSubscriptionId = "SendComponent"; @Component({ selector: "app-send", - standalone: true, imports: [SharedModule, SearchModule, NoItemsModule, HeaderModule, NewSendDropdownComponent], templateUrl: "send.component.html", providers: [DefaultSendFormConfigService], diff --git a/apps/web/src/app/tools/vault-export/export-web.component.ts b/apps/web/src/app/tools/vault-export/export-web.component.ts index f2612656cee..bf29e83b893 100644 --- a/apps/web/src/app/tools/vault-export/export-web.component.ts +++ b/apps/web/src/app/tools/vault-export/export-web.component.ts @@ -8,7 +8,6 @@ import { SharedModule } from "../../shared"; @Component({ templateUrl: "export-web.component.html", - standalone: true, imports: [SharedModule, ExportComponent, HeaderModule], }) export class ExportWebComponent { diff --git a/apps/web/src/app/tools/vault-export/org-vault-export.component.ts b/apps/web/src/app/tools/vault-export/org-vault-export.component.ts index d84d2b26a90..94cc9bf18f7 100644 --- a/apps/web/src/app/tools/vault-export/org-vault-export.component.ts +++ b/apps/web/src/app/tools/vault-export/org-vault-export.component.ts @@ -9,7 +9,6 @@ import { LooseComponentsModule, SharedModule } from "../../shared"; @Component({ templateUrl: "org-vault-export.component.html", - standalone: true, imports: [SharedModule, ExportComponent, LooseComponentsModule], }) export class OrganizationVaultExportComponent implements OnInit { diff --git a/apps/web/src/app/vault/components/assign-collections/assign-collections-web.component.ts b/apps/web/src/app/vault/components/assign-collections/assign-collections-web.component.ts index 716d0b5a2bf..753d2708e60 100644 --- a/apps/web/src/app/vault/components/assign-collections/assign-collections-web.component.ts +++ b/apps/web/src/app/vault/components/assign-collections/assign-collections-web.component.ts @@ -15,7 +15,6 @@ import { SharedModule } from "../../../shared"; @Component({ imports: [SharedModule, AssignCollectionsComponent, PluralizePipe], templateUrl: "./assign-collections-web.component.html", - standalone: true, }) export class AssignCollectionsWebComponent { protected editableItemCount: number; diff --git a/apps/web/src/app/vault/components/browser-extension-prompt/browser-extension-prompt-install.component.ts b/apps/web/src/app/vault/components/browser-extension-prompt/browser-extension-prompt-install.component.ts index 73f4307d9cc..005fbb1b14d 100644 --- a/apps/web/src/app/vault/components/browser-extension-prompt/browser-extension-prompt-install.component.ts +++ b/apps/web/src/app/vault/components/browser-extension-prompt/browser-extension-prompt-install.component.ts @@ -28,7 +28,6 @@ const WebStoreUrls: Partial> = { @Component({ selector: "vault-browser-extension-prompt-install", templateUrl: "./browser-extension-prompt-install.component.html", - standalone: true, imports: [CommonModule, I18nPipe, LinkModule], }) export class BrowserExtensionPromptInstallComponent implements OnInit { diff --git a/apps/web/src/app/vault/components/browser-extension-prompt/browser-extension-prompt.component.ts b/apps/web/src/app/vault/components/browser-extension-prompt/browser-extension-prompt.component.ts index 9800d0c64fe..624275a8297 100644 --- a/apps/web/src/app/vault/components/browser-extension-prompt/browser-extension-prompt.component.ts +++ b/apps/web/src/app/vault/components/browser-extension-prompt/browser-extension-prompt.component.ts @@ -13,7 +13,6 @@ import { @Component({ selector: "vault-browser-extension-prompt", templateUrl: "./browser-extension-prompt.component.html", - standalone: true, imports: [CommonModule, I18nPipe, ButtonComponent, IconModule], }) export class BrowserExtensionPromptComponent implements OnInit, OnDestroy { diff --git a/apps/web/src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts b/apps/web/src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts index aa457e97093..11c326d72df 100644 --- a/apps/web/src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts +++ b/apps/web/src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts @@ -122,7 +122,6 @@ export enum VaultItemDialogResult { @Component({ selector: "app-vault-item-dialog", templateUrl: "vault-item-dialog.component.html", - standalone: true, imports: [ ButtonModule, CipherViewComponent, diff --git a/apps/web/src/app/vault/components/web-generator-dialog/web-generator-dialog.component.spec.ts b/apps/web/src/app/vault/components/web-generator-dialog/web-generator-dialog.component.spec.ts index 806cb51bfce..085a3d0d4b0 100644 --- a/apps/web/src/app/vault/components/web-generator-dialog/web-generator-dialog.component.spec.ts +++ b/apps/web/src/app/vault/components/web-generator-dialog/web-generator-dialog.component.spec.ts @@ -19,7 +19,6 @@ import { @Component({ selector: "vault-cipher-form-generator", template: "", - standalone: true, }) class MockCipherFormGenerator { @Input() type: "password" | "username" = "password"; diff --git a/apps/web/src/app/vault/components/web-generator-dialog/web-generator-dialog.component.ts b/apps/web/src/app/vault/components/web-generator-dialog/web-generator-dialog.component.ts index e20efa9dbb8..8ff0709a5ed 100644 --- a/apps/web/src/app/vault/components/web-generator-dialog/web-generator-dialog.component.ts +++ b/apps/web/src/app/vault/components/web-generator-dialog/web-generator-dialog.component.ts @@ -36,7 +36,6 @@ export enum WebVaultGeneratorDialogAction { @Component({ selector: "web-vault-generator-dialog", templateUrl: "./web-generator-dialog.component.html", - standalone: true, imports: [CommonModule, CipherFormGeneratorComponent, ButtonModule, DialogModule, I18nPipe], }) export class WebVaultGeneratorDialogComponent { diff --git a/apps/web/src/app/vault/individual-vault/add-edit-v2.component.ts b/apps/web/src/app/vault/individual-vault/add-edit-v2.component.ts index 621e0ec88c5..76b7cd3723b 100644 --- a/apps/web/src/app/vault/individual-vault/add-edit-v2.component.ts +++ b/apps/web/src/app/vault/individual-vault/add-edit-v2.component.ts @@ -64,7 +64,6 @@ export interface AddEditCipherDialogCloseResult { @Component({ selector: "app-vault-add-edit-v2", templateUrl: "add-edit-v2.component.html", - standalone: true, imports: [ CommonModule, AsyncActionsModule, diff --git a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts index 5f5fc1e218d..22a4f5f8c92 100644 --- a/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-banners/vault-banners.component.ts @@ -16,7 +16,6 @@ import { SharedModule } from "../../../shared"; import { VaultBannersService, VisibleVaultBanner } from "./services/vault-banners.service"; @Component({ - standalone: true, selector: "app-vault-banners", templateUrl: "./vault-banners.component.html", imports: [VerifyEmailComponent, SharedModule, BannerModule], diff --git a/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts b/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts index 1049ee17faf..5466bbb6137 100644 --- a/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-header/vault-header.component.ts @@ -42,7 +42,6 @@ import { } from "../vault-filter/shared/models/routed-vault-filter.model"; @Component({ - standalone: true, selector: "app-vault-header", templateUrl: "./vault-header.component.html", imports: [ diff --git a/apps/web/src/app/vault/individual-vault/vault-onboarding/vault-onboarding.component.ts b/apps/web/src/app/vault/individual-vault/vault-onboarding/vault-onboarding.component.ts index b3a4b324d30..a4026b7d355 100644 --- a/apps/web/src/app/vault/individual-vault/vault-onboarding/vault-onboarding.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault-onboarding/vault-onboarding.component.ts @@ -33,7 +33,6 @@ import { VaultOnboardingService as VaultOnboardingServiceAbstraction } from "./s import { VaultOnboardingService, VaultOnboardingTasks } from "./services/vault-onboarding.service"; @Component({ - standalone: true, imports: [OnboardingModule, CommonModule, JslibModule, LinkModule], providers: [ { diff --git a/apps/web/src/app/vault/individual-vault/vault.component.ts b/apps/web/src/app/vault/individual-vault/vault.component.ts index 0dfaa1ac589..26fcb7a8b04 100644 --- a/apps/web/src/app/vault/individual-vault/vault.component.ts +++ b/apps/web/src/app/vault/individual-vault/vault.component.ts @@ -133,7 +133,6 @@ const BroadcasterSubscriptionId = "VaultComponent"; const SearchTextDebounceInterval = 200; @Component({ - standalone: true, selector: "app-vault", templateUrl: "vault.component.html", imports: [ diff --git a/apps/web/src/app/vault/individual-vault/view.component.ts b/apps/web/src/app/vault/individual-vault/view.component.ts index f52a4da3ffb..15a1a46b107 100644 --- a/apps/web/src/app/vault/individual-vault/view.component.ts +++ b/apps/web/src/app/vault/individual-vault/view.component.ts @@ -73,7 +73,6 @@ export interface ViewCipherDialogCloseResult { @Component({ selector: "app-vault-view", templateUrl: "view.component.html", - standalone: true, imports: [CipherViewComponent, CommonModule, AsyncActionsModule, DialogModule, SharedModule], providers: [ { provide: ViewPasswordHistoryService, useClass: VaultViewPasswordHistoryService }, diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index b4b27e35eea..2c906fadda9 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -4476,9 +4476,6 @@ } } }, - "encryptionKeyUpdateCannotProceed": { - "message": "Encryption key update cannot proceed" - }, "editFieldLabel": { "message": "Edit $LABEL$", "placeholders": { @@ -4531,24 +4528,15 @@ } } }, - "keyUpdateFoldersFailed": { - "message": "When updating your encryption key, your folders could not be decrypted. To continue with the update, your folders must be deleted. No vault items will be deleted if you proceed." - }, - "keyUpdated": { - "message": "Key updated" - }, - "updateEncryptionKey": { - "message": "Update encryption key" - }, - "updateEncryptionSchemeDesc": { - "message": "We've changed the encryption scheme to provide better security. Update your encryption key now by entering your master password below." - }, "updateEncryptionKeyWarning": { "message": "After updating your encryption key, you are required to log out and back in to all Bitwarden applications that you are currently using (such as the mobile app or browser extensions). Failure to log out and back in (which downloads your new encryption key) may result in data corruption. We will attempt to log you out automatically, however, it may be delayed." }, "updateEncryptionKeyAccountExportWarning": { "message": "Any account restricted exports you have saved will become invalid." }, + "legacyEncryptionUnsupported": { + "message": "Legacy encryption is no longer supported. Please contact support to recover your account." + }, "subscription": { "message": "Subscription" }, diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index 0cc988ea722..92cec0d6a2c 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -1,40 +1,5 @@ { - "extends": "../../libs/shared/tsconfig", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "resolveJsonModule": true, - "paths": { - "@bitwarden/admin-console/common": ["../../libs/admin-console/src/common"], - "@bitwarden/angular/*": ["../../libs/angular/src/*"], - "@bitwarden/auth/angular": ["../../libs/auth/src/angular"], - "@bitwarden/auth/common": ["../../libs/auth/src/common"], - "@bitwarden/billing": ["../../libs/billing/src"], - "@bitwarden/bit-common/*": ["../../bitwarden_license/bit-common/src/*"], - "@bitwarden/common/*": ["../../libs/common/src/*"], - "@bitwarden/components": ["../../libs/components/src"], - "@bitwarden/dirt-card": ["../../libs/dirt/card/src"], - "@bitwarden/generator-components": ["../../libs/tools/generator/components/src"], - "@bitwarden/generator-core": ["../../libs/tools/generator/core/src"], - "@bitwarden/generator-history": ["../../libs/tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../../libs/tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../../libs/tools/generator/extensions/navigation/src"], - "@bitwarden/importer-core": ["../../libs/importer/src"], - "@bitwarden/importer-ui": ["../../libs/importer/src/components"], - "@bitwarden/key-management": ["../../libs/key-management/src"], - "@bitwarden/key-management-ui": ["../../libs/key-management-ui/src"], - "@bitwarden/platform": ["../../libs/platform/src"], - "@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"], - "@bitwarden/ui-common": ["../../libs/ui/common/src"], - "@bitwarden/ui-common/setup-jest": ["../../libs/ui/common/src/setup-jest"], - "@bitwarden/vault-export-core": [ - "../../libs/tools/export/vault-export/vault-export-core/src" - ], - "@bitwarden/vault-export-ui": ["../../libs/tools/export/vault-export/vault-export-ui/src"], - "@bitwarden/vault": ["../../libs/vault/src"], - "@bitwarden/web-vault/*": ["src/*"] - } - }, + "extends": "../../tsconfig.base", "angularCompilerOptions": { "strictTemplates": true }, diff --git a/apps/web/webpack.config.js b/apps/web/webpack.config.js index d8b9fd3dbee..d564baaa60f 100644 --- a/apps/web/webpack.config.js +++ b/apps/web/webpack.config.js @@ -259,7 +259,7 @@ const devServer = 'sha256-JVRXyYPueLWdwGwY9m/7u4QlZ1xeQdqUj2t8OVIzZE4=' 'sha256-or0p3LaHetJ4FRq+flVORVFFNsOjQGWrDvX8Jf7ACWg=' 'sha256-jvLh2uL2/Pq/gpvNJMaEL4C+TNhBeGadLIUyPcVRZvY=' - 'sha256-VZTcMoTEw3nbAHejvqlyyRm1Mdx+DVNgyKANjpWw0qg=' + 'sha256-EnIJNDxVnh0++RytXJOkU0sqtLDFt1nYUDOfeJ5SKxg=' ;img-src 'self' data: diff --git a/bitwarden_license/bit-cli/jest.config.js b/bitwarden_license/bit-cli/jest.config.js index 30c9784c326..6a91ba706ed 100644 --- a/bitwarden_license/bit-cli/jest.config.js +++ b/bitwarden_license/bit-cli/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.ts"); @@ -14,7 +14,7 @@ module.exports = { "@bitwarden/common/platform/services/sdk/default-sdk-client-factory": "/../../libs/common/spec/jest-sdk-client-factory", ...pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/", + prefix: "/../../", }), }, }; diff --git a/bitwarden_license/bit-cli/tsconfig.json b/bitwarden_license/bit-cli/tsconfig.json index 4a972b540a7..6630021232f 100644 --- a/bitwarden_license/bit-cli/tsconfig.json +++ b/bitwarden_license/bit-cli/tsconfig.json @@ -1,40 +1,3 @@ { - "compilerOptions": { - "pretty": true, - "moduleResolution": "node", - "target": "ES2016", - "module": "ES2020", - "noImplicitAny": true, - "allowSyntheticDefaultImports": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowJs": true, - "sourceMap": true, - "baseUrl": ".", - "paths": { - "@bitwarden/cli/*": ["../../apps/cli/src/*"], - "@bitwarden/common/spec": ["../../libs/common/spec"], - "@bitwarden/admin-console/common": ["../../libs/admin-console/src/common"], - "@bitwarden/auth/common": ["../../libs/auth/src/common"], - "@bitwarden/auth/angular": ["../../libs/auth/src/angular"], - "@bitwarden/common/*": ["../../libs/common/src/*"], - "@bitwarden/importer-core": ["../../libs/importer/src"], - "@bitwarden/generator-core": ["../../libs/tools/generator/core/src"], - "@bitwarden/generator-legacy": ["../../libs/tools/generator/extensions/legacy/src"], - "@bitwarden/generator-history": ["../../libs/tools/generator/extensions/history/src"], - "@bitwarden/generator-navigation": ["../../libs/tools/generator/extensions/navigation/src"], - "@bitwarden/key-management": ["../../libs/key-management/src"], - "@bitwarden/vault-export-core": [ - "../../libs/tools/export/vault-export/vault-export-core/src" - ], - "@bitwarden/node/*": ["../../libs/node/src/*"], - "@bitwarden/bit-common/*": ["../../bitwarden_license/bit-common/src/*"] - }, - "plugins": [ - { - "name": "typescript-strict-plugin" - } - ] - }, - "include": ["src", "src/**/*.spec.ts"] + "extends": "../../apps/cli/tsconfig" } diff --git a/bitwarden_license/bit-common/jest.config.js b/bitwarden_license/bit-common/jest.config.js index ab31a4c26ca..31f15253ebd 100644 --- a/bitwarden_license/bit-common/jest.config.js +++ b/bitwarden_license/bit-common/jest.config.js @@ -1,5 +1,5 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); /** @type {import('jest').Config} */ @@ -9,13 +9,13 @@ module.exports = { testEnvironment: "jsdom", moduleNameMapper: pathsToModuleNameMapper( { - "@bitwarden/common/spec": ["../../libs/common/spec"], - "@bitwarden/common": ["../../libs/common/src/*"], - "@bitwarden/admin-console/common": ["/libs/admin-console/src/common"], + "@bitwarden/common/spec": ["libs/common/spec"], + "@bitwarden/common": ["libs/common/src/*"], + "@bitwarden/admin-console/common": ["libs/admin-console/src/common"], ...(compilerOptions?.paths ?? {}), }, { - prefix: "/", + prefix: "/../../", }, ), setupFilesAfterEnv: ["/test.setup.ts"], diff --git a/bitwarden_license/bit-common/tsconfig.json b/bitwarden_license/bit-common/tsconfig.json index c92167bb919..9c607a26b09 100644 --- a/bitwarden_license/bit-common/tsconfig.json +++ b/bitwarden_license/bit-common/tsconfig.json @@ -1,34 +1,5 @@ { - "extends": "../../libs/shared/tsconfig", + "extends": "../../tsconfig.base", "include": ["src", "spec"], - "exclude": ["node_modules", "dist"], - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@bitwarden/admin-console/common": ["../../libs/admin-console/src/common"], - "@bitwarden/angular/*": ["../../libs/angular/src/*"], - "@bitwarden/auth": ["../../libs/auth/src"], - "@bitwarden/billing": ["../../libs/billing/src"], - "@bitwarden/bit-common/*": ["../bit-common/src/*"], - "@bitwarden/common/*": ["../../libs/common/src/*"], - "@bitwarden/components": ["../../libs/components/src"], - "@bitwarden/dirt-card": ["../../libs/dirt/card/src"], - "@bitwarden/generator-components": ["../../libs/tools/generator/components/src"], - "@bitwarden/generator-core": ["../../libs/tools/generator/core/src"], - "@bitwarden/generator-history": ["../../libs/tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../../libs/tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../../libs/tools/generator/extensions/navigation/src"], - "@bitwarden/key-management": ["../../libs/key-management/src"], - "@bitwarden/platform": ["../../libs/platform/src"], - "@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"], - "@bitwarden/ui-common": ["../../libs/ui/common/src"], - "@bitwarden/ui-common/setup-jest": ["../../libs/ui/common/src/setup-jest"], - "@bitwarden/vault-export-core": [ - "../../libs/tools/export/vault-export/vault-export-core/src" - ], - "@bitwarden/vault-export-ui": ["../../libs/tools/export/vault-export/vault-export-core/src"], - "@bitwarden/vault": ["../../libs/vault/src"], - "@bitwarden/web-vault/*": ["../../apps/web/src/*"] - } - } + "exclude": ["node_modules", "dist"] } diff --git a/bitwarden_license/bit-web/jest.config.js b/bitwarden_license/bit-web/jest.config.js index 9eefd99528a..5934882e731 100644 --- a/bitwarden_license/bit-web/jest.config.js +++ b/bitwarden_license/bit-web/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -10,13 +10,13 @@ module.exports = { setupFilesAfterEnv: ["../../apps/web/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( { - "@bitwarden/common/spec": ["../../libs/common/spec"], - "@bitwarden/common": ["../../libs/common/src/*"], - "@bitwarden/admin-console/common": ["/libs/admin-console/src/common"], + "@bitwarden/common/spec": ["libs/common/spec"], + "@bitwarden/common": ["libs/common/src/*"], + "@bitwarden/admin-console/common": ["libs/admin-console/src/common"], ...(compilerOptions?.paths ?? {}), }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/device-approvals/device-approvals.component.ts b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/device-approvals/device-approvals.component.ts index 83f23089c59..08c7f181308 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/device-approvals/device-approvals.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/organizations/manage/device-approvals/device-approvals.component.ts @@ -26,7 +26,6 @@ import { SharedModule } from "@bitwarden/web-vault/app/shared/shared.module"; @Component({ selector: "app-org-device-approvals", templateUrl: "./device-approvals.component.html", - standalone: true, providers: [ safeProvider({ provide: OrganizationAuthRequestApiService, diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts index f830b149db4..130f1f2c482 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/clients/clients.component.ts @@ -43,7 +43,6 @@ const DisallowedPlanTypes = [ @Component({ templateUrl: "clients.component.html", - standalone: true, imports: [ SharedOrganizationModule, HeaderModule, diff --git a/bitwarden_license/bit-web/src/app/admin-console/providers/providers-layout.component.ts b/bitwarden_license/bit-web/src/app/admin-console/providers/providers-layout.component.ts index bbd25d6dbe2..72d87136f55 100644 --- a/bitwarden_license/bit-web/src/app/admin-console/providers/providers-layout.component.ts +++ b/bitwarden_license/bit-web/src/app/admin-console/providers/providers-layout.component.ts @@ -18,7 +18,6 @@ import { WebLayoutModule } from "@bitwarden/web-vault/app/layouts/web-layout.mod @Component({ selector: "providers-layout", templateUrl: "providers-layout.component.html", - standalone: true, imports: [CommonModule, RouterModule, JslibModule, WebLayoutModule, IconModule], }) export class ProvidersLayoutComponent implements OnInit, OnDestroy { diff --git a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html index f2f72fa5bb4..7f2b205fc22 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html +++ b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.html @@ -71,7 +71,7 @@

{{ "creditAppliedDesc" | i18n }}

- +

{{ "paymentMethod" | i18n }}

{{ "noPaymentMethod" | i18n }} diff --git a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts index 74368ef7839..cff2d8e63fe 100644 --- a/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts +++ b/bitwarden_license/bit-web/src/app/billing/providers/subscription/provider-subscription.component.ts @@ -13,8 +13,6 @@ import { ProviderPlanResponse, ProviderSubscriptionResponse, } from "@bitwarden/common/billing/models/response/provider-subscription-response"; -import { FeatureFlag } from "@bitwarden/common/enums/feature-flag.enum"; -import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { DialogService, ToastService } from "@bitwarden/components"; import { BillingNotificationService } from "@bitwarden/web-vault/app/billing/services/billing-notification.service"; @@ -39,10 +37,6 @@ export class ProviderSubscriptionComponent implements OnInit, OnDestroy { protected readonly TaxInformation = TaxInformation; - protected readonly allowProviderPaymentMethod$ = this.configService.getFeatureFlag$( - FeatureFlag.PM18794_ProviderPaymentMethod, - ); - constructor( private billingApiService: BillingApiServiceAbstraction, private i18nService: I18nService, @@ -50,7 +44,6 @@ export class ProviderSubscriptionComponent implements OnInit, OnDestroy { private billingNotificationService: BillingNotificationService, private dialogService: DialogService, private toastService: ToastService, - private configService: ConfigService, ) {} async ngOnInit() { diff --git a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts index a96f9a08919..1fd0afd3458 100644 --- a/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts +++ b/bitwarden_license/bit-web/src/app/secrets-manager/overview/overview.component.ts @@ -20,7 +20,6 @@ import { from, } from "rxjs"; -import { I18nPipe } from "@bitwarden/angular/platform/pipes/i18n.pipe"; import { OrganizationApiServiceAbstraction } from "@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction"; import { getOrganizationById, @@ -100,7 +99,6 @@ export class OverviewComponent implements OnInit, OnDestroy { protected loading = true; protected organizationEnabled = false; protected organization: Organization; - protected i18n: I18nPipe; protected onboardingTasks$: Observable; protected view$: Observable<{ diff --git a/bitwarden_license/bit-web/tsconfig.json b/bitwarden_license/bit-web/tsconfig.json index 66b83755aa8..7ec0441f4c1 100644 --- a/bitwarden_license/bit-web/tsconfig.json +++ b/bitwarden_license/bit-web/tsconfig.json @@ -1,41 +1,5 @@ { "extends": "../../apps/web/tsconfig", - "compilerOptions": { - "baseUrl": ".", - "module": "ES2020", - "resolveJsonModule": true, - "paths": { - "@bitwarden/admin-console/common": ["../../libs/admin-console/src/common"], - "@bitwarden/angular/*": ["../../libs/angular/src/*"], - "@bitwarden/auth/common": ["../../libs/auth/src/common"], - "@bitwarden/auth/angular": ["../../libs/auth/src/angular"], - "@bitwarden/billing": ["../../libs/billing/src"], - "@bitwarden/common/*": ["../../libs/common/src/*"], - "@bitwarden/components": ["../../libs/components/src"], - "@bitwarden/dirt-card": ["../../libs/dirt/card/src"], - "@bitwarden/generator-components": ["../../libs/tools/generator/components/src"], - "@bitwarden/generator-core": ["../../libs/tools/generator/core/src"], - "@bitwarden/generator-history": ["../../libs/tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../../libs/tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../../libs/tools/generator/extensions/navigation/src"], - "@bitwarden/vault-export-core": [ - "../../libs/tools/export/vault-export/vault-export-core/src" - ], - "@bitwarden/vault-export-ui": ["../../libs/tools/export/vault-export/vault-export-ui/src"], - "@bitwarden/importer-core": ["../../libs/importer/src"], - "@bitwarden/importer-ui": ["../../libs/importer/src/components"], - "@bitwarden/key-management": ["../../libs/key-management/src"], - "@bitwarden/key-management-ui": ["../../libs/key-management-ui/src"], - "@bitwarden/platform": ["../../libs/platform/src"], - "@bitwarden/ui-common": ["../../libs/ui/common/src"], - "@bitwarden/ui-common/setup-jest": ["../../libs/ui/common/src/setup-jest"], - "@bitwarden/send-ui": ["../../libs/tools/send/send-ui/src"], - "@bitwarden/vault": ["../../libs/vault/src"], - "@bitwarden/web-vault/*": ["../../apps/web/src/*"], - - "@bitwarden/bit-common/*": ["../bit-common/src/*"] - } - }, "files": [ "../../apps/web/src/polyfills.ts", "../../apps/web/src/main.ts", diff --git a/jest.config.js b/jest.config.js index e8815f92ffb..b0ffd2382ca 100644 --- a/jest.config.js +++ b/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("./tsconfig.base"); /** @type {import('jest').Config} */ module.exports = { diff --git a/libs/admin-console/jest.config.js b/libs/admin-console/jest.config.js index d59da5d68f5..48f498a2d7f 100644 --- a/libs/admin-console/jest.config.js +++ b/libs/admin-console/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -11,9 +11,9 @@ module.exports = { setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( // lets us use @bitwarden/common/spec in tests - { "@bitwarden/common/spec": ["../common/spec"], ...(compilerOptions?.paths ?? {}) }, + { "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/libs/admin-console/tsconfig.json b/libs/admin-console/tsconfig.json index 4f057fd6af0..72e2a434344 100644 --- a/libs/admin-console/tsconfig.json +++ b/libs/admin-console/tsconfig.json @@ -1,13 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/key-management": ["../key-management/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec", "../../libs/common/custom-matchers.d.ts"], "exclude": ["node_modules", "dist"] } diff --git a/libs/angular/jest.config.js b/libs/angular/jest.config.js index 66a7e9a687a..e94ae5e9af4 100644 --- a/libs/angular/jest.config.js +++ b/libs/angular/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -11,9 +11,9 @@ module.exports = { setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( // lets us use @bitwarden/common/spec in tests - { "@bitwarden/common/spec": ["../common/spec"], ...(compilerOptions?.paths ?? {}) }, + { "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/libs/angular/src/auth/guards/lock.guard.spec.ts b/libs/angular/src/auth/guards/lock.guard.spec.ts index ed77f9bdebf..2085e0f3486 100644 --- a/libs/angular/src/auth/guards/lock.guard.spec.ts +++ b/libs/angular/src/auth/guards/lock.guard.spec.ts @@ -79,7 +79,6 @@ describe("lockGuard", () => { { path: "", component: EmptyComponent }, { path: "lock", component: EmptyComponent, canActivate: [lockGuard()] }, { path: "non-lock-route", component: EmptyComponent }, - { path: "migrate-legacy-encryption", component: EmptyComponent }, ]), ], providers: [ @@ -182,18 +181,6 @@ describe("lockGuard", () => { expect(messagingService.send).toHaveBeenCalledWith("logout"); }); - it("should send the user to migrate-legacy-encryption if they are a legacy user on a web client", async () => { - const { router } = setup({ - authStatus: AuthenticationStatus.Locked, - canLock: true, - isLegacyUser: true, - clientType: ClientType.Web, - }); - - await router.navigate(["lock"]); - expect(router.url).toBe("/migrate-legacy-encryption"); - }); - it("should allow navigation to the lock route when device trust is supported, the user has a MP, and the user is coming from the login-initiated page", async () => { const { router } = setup({ authStatus: AuthenticationStatus.Locked, diff --git a/libs/angular/src/auth/guards/lock.guard.ts b/libs/angular/src/auth/guards/lock.guard.ts index 01d03dc718d..4b09ddeee18 100644 --- a/libs/angular/src/auth/guards/lock.guard.ts +++ b/libs/angular/src/auth/guards/lock.guard.ts @@ -11,11 +11,9 @@ import { AccountService } from "@bitwarden/common/auth/abstractions/account.serv import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction"; import { AuthenticationStatus } from "@bitwarden/common/auth/enums/authentication-status"; -import { ClientType } from "@bitwarden/common/enums"; import { DeviceTrustServiceAbstraction } from "@bitwarden/common/key-management/device-trust/abstractions/device-trust.service.abstraction"; import { VaultTimeoutSettingsService } from "@bitwarden/common/key-management/vault-timeout"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; import { KeyService } from "@bitwarden/key-management"; /** @@ -33,7 +31,6 @@ export function lockGuard(): CanActivateFn { const authService = inject(AuthService); const keyService = inject(KeyService); const deviceTrustService = inject(DeviceTrustServiceAbstraction); - const platformUtilService = inject(PlatformUtilsService); const messagingService = inject(MessagingService); const router = inject(Router); const userVerificationService = inject(UserVerificationService); @@ -59,12 +56,7 @@ export function lockGuard(): CanActivateFn { return false; } - // If legacy user on web, redirect to migration page if (await keyService.isLegacyUser()) { - if (platformUtilService.getClientType() === ClientType.Web) { - return router.createUrlTree(["migrate-legacy-encryption"]); - } - // Log out legacy users on other clients messagingService.send("logout"); return false; } diff --git a/libs/angular/src/tools/password-strength/password-strength-v2.component.ts b/libs/angular/src/tools/password-strength/password-strength-v2.component.ts index 8d9fc458384..c8a3b071746 100644 --- a/libs/angular/src/tools/password-strength/password-strength-v2.component.ts +++ b/libs/angular/src/tools/password-strength/password-strength-v2.component.ts @@ -20,7 +20,6 @@ type BackgroundTypes = "danger" | "primary" | "success" | "warning"; @Component({ selector: "tools-password-strength", templateUrl: "password-strength-v2.component.html", - standalone: true, imports: [CommonModule, JslibModule, ProgressModule], }) export class PasswordStrengthV2Component implements OnChanges { diff --git a/libs/angular/src/vault/components/spotlight/spotlight.component.ts b/libs/angular/src/vault/components/spotlight/spotlight.component.ts index a2e2a13a468..3c64318a900 100644 --- a/libs/angular/src/vault/components/spotlight/spotlight.component.ts +++ b/libs/angular/src/vault/components/spotlight/spotlight.component.ts @@ -7,7 +7,6 @@ import { I18nPipe } from "@bitwarden/ui-common"; @Component({ selector: "bit-spotlight", templateUrl: "spotlight.component.html", - standalone: true, imports: [ButtonModule, CommonModule, IconButtonModule, I18nPipe, TypographyModule], }) export class SpotlightComponent { diff --git a/libs/angular/tsconfig.json b/libs/angular/tsconfig.json index d77e56d778e..9c607a26b09 100644 --- a/libs/angular/tsconfig.json +++ b/libs/angular/tsconfig.json @@ -1,27 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/angular/*": ["../angular/src/*"], - "@bitwarden/auth/angular": ["../auth/src/angular"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/components": ["../components/src"], - "@bitwarden/generator-components": ["../tools/generator/components/src"], - "@bitwarden/generator-core": ["../tools/generator/core/src"], - "@bitwarden/generator-history": ["../tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../tools/generator/extensions/navigation/src"], - "@bitwarden/importer/core": ["../importer/src"], - "@bitwarden/importer-ui": ["../importer/src/components"], - "@bitwarden/key-management": ["../key-management/src"], - "@bitwarden/platform": ["../platform/src"], - "@bitwarden/ui-common": ["../ui/common/src"], - "@bitwarden/vault-export-core": ["../tools/export/vault-export/vault-export-core/src"], - "@bitwarden/vault": ["../vault/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec"], "exclude": ["node_modules", "dist"] } diff --git a/libs/auth/jest.config.js b/libs/auth/jest.config.js index 79b054f0741..815ac5c30c2 100644 --- a/libs/auth/jest.config.js +++ b/libs/auth/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -11,9 +11,9 @@ module.exports = { setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( // lets us use @bitwarden/common/spec in tests - { "@bitwarden/common/spec": ["../common/spec"], ...(compilerOptions?.paths ?? {}) }, + { "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/libs/auth/src/angular/login/login.component.ts b/libs/auth/src/angular/login/login.component.ts index e08497fa243..991ae07bbd0 100644 --- a/libs/auth/src/angular/login/login.component.ts +++ b/libs/auth/src/angular/login/login.component.ts @@ -307,16 +307,12 @@ export class LoginComponent implements OnInit, OnDestroy { private async handleAuthResult(authResult: AuthResult): Promise { if (authResult.requiresEncryptionKeyMigration) { /* Legacy accounts used the master key to encrypt data. - Migration is required but only performed on Web. */ - if (this.clientType === ClientType.Web) { - await this.router.navigate(["migrate-legacy-encryption"]); - } else { - this.toastService.showToast({ - variant: "error", - title: this.i18nService.t("errorOccured"), - message: this.i18nService.t("encryptionKeyMigrationRequired"), - }); - } + This is now unsupported and requires a downgraded client */ + this.toastService.showToast({ + variant: "error", + title: this.i18nService.t("errorOccured"), + message: this.i18nService.t("legacyEncryptionUnsupported"), + }); return; } diff --git a/libs/auth/src/angular/two-factor-auth/default-two-factor-auth-component.service.ts b/libs/auth/src/angular/two-factor-auth/default-two-factor-auth-component.service.ts index f68c1d34515..1ce0cba5afb 100644 --- a/libs/auth/src/angular/two-factor-auth/default-two-factor-auth-component.service.ts +++ b/libs/auth/src/angular/two-factor-auth/default-two-factor-auth-component.service.ts @@ -1,6 +1,5 @@ import { DuoLaunchAction, - LegacyKeyMigrationAction, TwoFactorAuthComponentService, } from "./two-factor-auth-component.service"; @@ -9,10 +8,6 @@ export class DefaultTwoFactorAuthComponentService implements TwoFactorAuthCompon return false; } - determineLegacyKeyMigrationAction() { - return LegacyKeyMigrationAction.PREVENT_LOGIN_AND_SHOW_REQUIRE_MIGRATION_WARNING; - } - determineDuoLaunchAction(): DuoLaunchAction { return DuoLaunchAction.DIRECT_LAUNCH; } diff --git a/libs/auth/src/angular/two-factor-auth/two-factor-auth-component.service.ts b/libs/auth/src/angular/two-factor-auth/two-factor-auth-component.service.ts index c99722fb8e4..2d2cdba3a10 100644 --- a/libs/auth/src/angular/two-factor-auth/two-factor-auth-component.service.ts +++ b/libs/auth/src/angular/two-factor-auth/two-factor-auth-component.service.ts @@ -1,12 +1,5 @@ import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; -// FIXME: update to use a const object instead of a typescript enum -// eslint-disable-next-line @bitwarden/platform/no-enums -export enum LegacyKeyMigrationAction { - PREVENT_LOGIN_AND_SHOW_REQUIRE_MIGRATION_WARNING, - NAVIGATE_TO_MIGRATION_COMPONENT, -} - // FIXME: update to use a const object instead of a typescript enum // eslint-disable-next-line @bitwarden/platform/no-enums export enum DuoLaunchAction { @@ -38,18 +31,6 @@ export abstract class TwoFactorAuthComponentService { */ abstract removePopupWidthExtension?(): void; - /** - * We used to use the user's master key to encrypt their data. We deprecated that approach - * and now use a user key. This method should be called if we detect that the user - * is still using the old master key encryption scheme (server sends down a flag to - * indicate this). This method then determines what action to take based on the client. - * - * We have two possible actions: - * 1. Prevent the user from logging in and show a warning that they need to migrate their key on the web client today. - * 2. Navigate the user to the key migration component on the web client. - */ - abstract determineLegacyKeyMigrationAction(): LegacyKeyMigrationAction; - /** * Optionally closes any single action popouts (extension only). * @returns true if we are in a single action popout and it was closed, false otherwise. diff --git a/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts b/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts index 57637fe9118..85184283efd 100644 --- a/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts +++ b/libs/auth/src/angular/two-factor-auth/two-factor-auth.component.ts @@ -69,7 +69,6 @@ import { } from "./two-factor-auth-component-cache.service"; import { DuoLaunchAction, - LegacyKeyMigrationAction, TwoFactorAuthComponentService, } from "./two-factor-auth-component.service"; import { @@ -388,22 +387,12 @@ export class TwoFactorAuthComponent implements OnInit, OnDestroy { if (!result.requiresEncryptionKeyMigration) { return false; } - // Migration is forced so prevent login via return - const legacyKeyMigrationAction: LegacyKeyMigrationAction = - this.twoFactorAuthComponentService.determineLegacyKeyMigrationAction(); - switch (legacyKeyMigrationAction) { - case LegacyKeyMigrationAction.NAVIGATE_TO_MIGRATION_COMPONENT: - await this.router.navigate(["migrate-legacy-encryption"]); - break; - case LegacyKeyMigrationAction.PREVENT_LOGIN_AND_SHOW_REQUIRE_MIGRATION_WARNING: - this.toastService.showToast({ - variant: "error", - title: this.i18nService.t("errorOccured"), - message: this.i18nService.t("encryptionKeyMigrationRequired"), - }); - break; - } + this.toastService.showToast({ + variant: "error", + title: this.i18nService.t("errorOccured"), + message: this.i18nService.t("legacyEncryptionUnsupported"), + }); return true; } diff --git a/libs/auth/src/common/login-strategies/login.strategy.ts b/libs/auth/src/common/login-strategies/login.strategy.ts index d00e75bb630..116eba9d223 100644 --- a/libs/auth/src/common/login-strategies/login.strategy.ts +++ b/libs/auth/src/common/login-strategies/login.strategy.ts @@ -17,7 +17,6 @@ import { IdentityDeviceVerificationResponse } from "@bitwarden/common/auth/model import { IdentityTokenResponse } from "@bitwarden/common/auth/models/response/identity-token.response"; import { IdentityTwoFactorResponse } from "@bitwarden/common/auth/models/response/identity-two-factor.response"; import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service"; -import { ClientType } from "@bitwarden/common/enums"; import { EncryptService } from "@bitwarden/common/key-management/crypto/abstractions/encrypt.service"; import { InternalMasterPasswordServiceAbstraction } from "@bitwarden/common/key-management/master-password/abstractions/master-password.service.abstraction"; import { @@ -256,13 +255,10 @@ export abstract class LoginStrategy { protected async processTokenResponse(response: IdentityTokenResponse): Promise { const result = new AuthResult(); - // Old encryption keys must be migrated, but is currently only available on web. - // Other clients shouldn't continue the login process. + // Encryption key migration of legacy users (with no userkey) is not supported anymore if (this.encryptionKeyMigrationRequired(response)) { result.requiresEncryptionKeyMigration = true; - if (this.platformUtilsService.getClientType() !== ClientType.Web) { - return result; - } + return result; } // Must come before setting keys, user key needs email to update additional keys. diff --git a/libs/auth/tsconfig.json b/libs/auth/tsconfig.json index 8d08522ffce..9c607a26b09 100644 --- a/libs/auth/tsconfig.json +++ b/libs/auth/tsconfig.json @@ -1,23 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "resolveJsonModule": true, - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/angular/*": ["../angular/src/*"], - "@bitwarden/auth/angular": ["../auth/src/angular"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/components": ["../components/src"], - "@bitwarden/generator-core": ["../tools/generator/core/src"], - "@bitwarden/generator-history": ["../tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../tools/generator/extensions/navigation/src"], - "@bitwarden/key-management": ["../key-management/src"], - "@bitwarden/platform": ["../platform/src"], - "@bitwarden/ui-common": ["../ui/common/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec"], "exclude": ["node_modules", "dist"] } diff --git a/libs/billing/jest.config.js b/libs/billing/jest.config.js index 5c24975e836..0aa13381668 100644 --- a/libs/billing/jest.config.js +++ b/libs/billing/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -10,6 +10,6 @@ module.exports = { displayName: "libs/billing tests", setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/", + prefix: "/../../", }), }; diff --git a/libs/billing/tsconfig.json b/libs/billing/tsconfig.json index bb08eb89d1c..9c607a26b09 100644 --- a/libs/billing/tsconfig.json +++ b/libs/billing/tsconfig.json @@ -1,6 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": {}, + "extends": "../../tsconfig.base", "include": ["src", "spec"], "exclude": ["node_modules", "dist"] } diff --git a/libs/common/jest.config.js b/libs/common/jest.config.js index 7e6c0997b9c..a1e14ee62f8 100644 --- a/libs/common/jest.config.js +++ b/libs/common/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../shared/jest.config.ts"); @@ -12,6 +12,6 @@ module.exports = { testEnvironment: "jsdom", setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/", + prefix: "/../../", }), }; diff --git a/libs/common/src/enums/feature-flag.enum.ts b/libs/common/src/enums/feature-flag.enum.ts index dbddc426e73..91d24ef3e9d 100644 --- a/libs/common/src/enums/feature-flag.enum.ts +++ b/libs/common/src/enums/feature-flag.enum.ts @@ -29,7 +29,6 @@ export enum FeatureFlag { /* Billing */ TrialPaymentOptional = "PM-8163-trial-payment", PM12276_BreadcrumbEventLogs = "pm-12276-breadcrumbing-for-business-features", - PM18794_ProviderPaymentMethod = "pm-18794-provider-payment-method", PM17772_AdminInitiatedSponsorships = "pm-17772-admin-initiated-sponsorships", PM19956_RequireProviderPaymentMethodDuringSetup = "pm-19956-require-provider-payment-method-during-setup", UseOrganizationWarningsService = "use-organization-warnings-service", @@ -113,7 +112,6 @@ export const DefaultFeatureFlagValue = { /* Billing */ [FeatureFlag.TrialPaymentOptional]: FALSE, [FeatureFlag.PM12276_BreadcrumbEventLogs]: FALSE, - [FeatureFlag.PM18794_ProviderPaymentMethod]: FALSE, [FeatureFlag.PM17772_AdminInitiatedSponsorships]: FALSE, [FeatureFlag.PM19956_RequireProviderPaymentMethodDuringSetup]: FALSE, [FeatureFlag.UseOrganizationWarningsService]: FALSE, diff --git a/libs/common/tsconfig.json b/libs/common/tsconfig.json index 03f66196a30..1d81cc8c221 100644 --- a/libs/common/tsconfig.json +++ b/libs/common/tsconfig.json @@ -1,15 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/auth/common": ["../auth/src/common"], - // TODO: Remove once circular dependencies in admin-console, auth and key-management are resolved - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/key-management": ["../key-management/src"], - "@bitwarden/vault-export-core": ["../tools/export/vault-export/vault-export-core/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec", "./custom-matchers.d.ts", "../key-management/src/index.ts"], "exclude": ["node_modules", "dist"] } diff --git a/libs/components/jest.config.js b/libs/components/jest.config.js index 082d378dced..4310480dd29 100644 --- a/libs/components/jest.config.js +++ b/libs/components/jest.config.js @@ -1,8 +1,8 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("./tsconfig"); +const { compilerOptions } = require("../../tsconfig.base"); -const sharedConfig = require("../../libs/shared/jest.config.angular"); +const sharedConfig = require("../shared/jest.config.angular"); /** @type {import('jest').Config} */ module.exports = { @@ -10,6 +10,6 @@ module.exports = { displayName: "libs/components tests", setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/", + prefix: "/../../", }), }; diff --git a/libs/components/tsconfig.json b/libs/components/tsconfig.json index 8f2b5edcc90..3706663ecf1 100644 --- a/libs/components/tsconfig.json +++ b/libs/components/tsconfig.json @@ -1,14 +1,3 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/platform": ["../platform/src"], - "@bitwarden/ui-common": ["../ui/common/src"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/key-management": ["../key-management/src"], - "@bitwarden/ui-common/setup-jest": ["../ui/common/src/setup-jest"] - } - } + "extends": "../../tsconfig.base" } diff --git a/libs/dirt/card/jest.config.js b/libs/dirt/card/jest.config.js index 68455588d66..03ffc631f76 100644 --- a/libs/dirt/card/jest.config.js +++ b/libs/dirt/card/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../shared/tsconfig.spec"); +const { compilerOptions } = require("../../../../tsconfig.base"); const sharedConfig = require("../../shared/jest.config.angular"); @@ -10,6 +10,6 @@ module.exports = { displayName: "tools/card tests", setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../", + prefix: "/../../../", }), }; diff --git a/libs/dirt/card/tsconfig.json b/libs/dirt/card/tsconfig.json index 050a1748b7b..941c32b5b2a 100644 --- a/libs/dirt/card/tsconfig.json +++ b/libs/dirt/card/tsconfig.json @@ -1,17 +1,5 @@ { - "extends": "../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../admin-console/src/common"], - "@bitwarden/angular/*": ["../../angular/src/*"], - "@bitwarden/auth/common": ["../../auth/src/common"], - "@bitwarden/common/*": ["../../common/src/*"], - "@bitwarden/components": ["../../components/src"], - "@bitwarden/key-management": ["../../key-management/src"], - "@bitwarden/platform": ["../../platform/src"], - "@bitwarden/ui-common": ["../../ui/common/src"] - } - }, + "extends": "../../../tsconfig.base", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/eslint/tsconfig.json b/libs/eslint/tsconfig.json index bbf065886c4..69be0fa9cac 100644 --- a/libs/eslint/tsconfig.json +++ b/libs/eslint/tsconfig.json @@ -1,6 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": {}, + "extends": "../../tsconfig.base", "exclude": ["node_modules", "dist"], "files": ["empty.ts"] } diff --git a/libs/importer/jest.config.js b/libs/importer/jest.config.js index 8d782d913a8..0d7db28409f 100644 --- a/libs/importer/jest.config.js +++ b/libs/importer/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../shared/jest.config.ts"); @@ -9,6 +9,6 @@ module.exports = { ...sharedConfig, testEnvironment: "jsdom", moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/", + prefix: "/../../", }), }; diff --git a/libs/importer/src/components/dialog/file-password-prompt.component.ts b/libs/importer/src/components/dialog/file-password-prompt.component.ts index d67c60d6b6b..9ad62b7e8f5 100644 --- a/libs/importer/src/components/dialog/file-password-prompt.component.ts +++ b/libs/importer/src/components/dialog/file-password-prompt.component.ts @@ -14,7 +14,6 @@ import { @Component({ templateUrl: "file-password-prompt.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/importer/src/components/dialog/import-error-dialog.component.ts b/libs/importer/src/components/dialog/import-error-dialog.component.ts index 9e09afa7cf1..cb998c2dfe9 100644 --- a/libs/importer/src/components/dialog/import-error-dialog.component.ts +++ b/libs/importer/src/components/dialog/import-error-dialog.component.ts @@ -18,7 +18,6 @@ export interface ErrorListItem { @Component({ templateUrl: "./import-error-dialog.component.html", - standalone: true, imports: [CommonModule, JslibModule, DialogModule, TableModule, ButtonModule], }) export class ImportErrorDialogComponent implements OnInit { diff --git a/libs/importer/src/components/dialog/import-success-dialog.component.ts b/libs/importer/src/components/dialog/import-success-dialog.component.ts index bafd3c26412..ff9a5d7b014 100644 --- a/libs/importer/src/components/dialog/import-success-dialog.component.ts +++ b/libs/importer/src/components/dialog/import-success-dialog.component.ts @@ -22,7 +22,6 @@ export interface ResultList { @Component({ templateUrl: "./import-success-dialog.component.html", - standalone: true, imports: [CommonModule, JslibModule, DialogModule, TableModule, ButtonModule], }) export class ImportSuccessDialogComponent implements OnInit { diff --git a/libs/importer/src/components/dialog/sshkey-password-prompt.component.ts b/libs/importer/src/components/dialog/sshkey-password-prompt.component.ts index 540d576d156..8c199ee5577 100644 --- a/libs/importer/src/components/dialog/sshkey-password-prompt.component.ts +++ b/libs/importer/src/components/dialog/sshkey-password-prompt.component.ts @@ -14,7 +14,6 @@ import { @Component({ templateUrl: "sshkey-password-prompt.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/importer/src/components/import.component.ts b/libs/importer/src/components/import.component.ts index 7b8f49b796b..28137906147 100644 --- a/libs/importer/src/components/import.component.ts +++ b/libs/importer/src/components/import.component.ts @@ -106,7 +106,6 @@ const safeProviders: SafeProvider[] = [ @Component({ selector: "tools-import", templateUrl: "import.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/importer/src/components/lastpass/dialog/lastpass-multifactor-prompt.component.ts b/libs/importer/src/components/lastpass/dialog/lastpass-multifactor-prompt.component.ts index 662a1291547..f497a3bf32c 100644 --- a/libs/importer/src/components/lastpass/dialog/lastpass-multifactor-prompt.component.ts +++ b/libs/importer/src/components/lastpass/dialog/lastpass-multifactor-prompt.component.ts @@ -23,7 +23,6 @@ type LastPassMultifactorPromptData = { @Component({ templateUrl: "lastpass-multifactor-prompt.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/importer/src/components/lastpass/dialog/lastpass-password-prompt.component.ts b/libs/importer/src/components/lastpass/dialog/lastpass-password-prompt.component.ts index e0f0d5b4cfa..861f184f94d 100644 --- a/libs/importer/src/components/lastpass/dialog/lastpass-password-prompt.component.ts +++ b/libs/importer/src/components/lastpass/dialog/lastpass-password-prompt.component.ts @@ -17,7 +17,6 @@ import { @Component({ templateUrl: "lastpass-password-prompt.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/importer/src/components/lastpass/import-lastpass.component.ts b/libs/importer/src/components/lastpass/import-lastpass.component.ts index a08349609d9..7fbf7dd8a7a 100644 --- a/libs/importer/src/components/lastpass/import-lastpass.component.ts +++ b/libs/importer/src/components/lastpass/import-lastpass.component.ts @@ -28,7 +28,6 @@ import { LastPassDirectImportService } from "./lastpass-direct-import.service"; @Component({ selector: "import-lastpass", templateUrl: "import-lastpass.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/importer/tsconfig.json b/libs/importer/tsconfig.json index e16a16a0337..919c7bf77bf 100644 --- a/libs/importer/tsconfig.json +++ b/libs/importer/tsconfig.json @@ -1,22 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/angular/*": ["../angular/src/*"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/components": ["../components/src"], - "@bitwarden/generator-core": ["../tools/generator/core/src"], - "@bitwarden/generator-history": ["../tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../tools/generator/extensions/navigation/src"], - "@bitwarden/key-management": ["../key-management/src"], - "@bitwarden/platform": ["../platform/src"], - "@bitwarden/ui-common": ["../ui/common/src"], - "@bitwarden/vault-export-core": ["../tools/export/vault-export/vault-export-core/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/key-management-ui/jest.config.js b/libs/key-management-ui/jest.config.js index ceeee3b2445..6a1fbdd63e1 100644 --- a/libs/key-management-ui/jest.config.js +++ b/libs/key-management-ui/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -11,9 +11,9 @@ module.exports = { setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( // lets us use @bitwarden/common/spec in tests - { "@bitwarden/common/spec": ["../common/spec"], ...(compilerOptions?.paths ?? {}) }, + { "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/libs/key-management-ui/tsconfig.json b/libs/key-management-ui/tsconfig.json index bb263f3a2b9..9c607a26b09 100644 --- a/libs/key-management-ui/tsconfig.json +++ b/libs/key-management-ui/tsconfig.json @@ -1,22 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/angular/*": ["../angular/src/*"], - "@bitwarden/auth/angular": ["../auth/src/angular"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/components": ["../components/src/index.ts"], - "@bitwarden/generator-core": ["../tools/generator/core/src"], - "@bitwarden/generator-history": ["../tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../tools/generator/extensions/navigation/src"], - "@bitwarden/key-management": ["../key-management/src/index.ts"], - "@bitwarden/platform": ["../platform/src"], - "@bitwarden/ui-common": ["../ui/common/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec"], "exclude": ["node_modules", "dist"] } diff --git a/libs/key-management/jest.config.js b/libs/key-management/jest.config.js index 4da81b0bd13..a074621a098 100644 --- a/libs/key-management/jest.config.js +++ b/libs/key-management/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -11,9 +11,9 @@ module.exports = { setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( // lets us use @bitwarden/common/spec in tests - { "@bitwarden/common/spec": ["../common/spec"], ...(compilerOptions?.paths ?? {}) }, + { "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/libs/key-management/tsconfig.json b/libs/key-management/tsconfig.json index 3d22cb2ec51..9c607a26b09 100644 --- a/libs/key-management/tsconfig.json +++ b/libs/key-management/tsconfig.json @@ -1,13 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/key-management": ["../key-management/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec"], "exclude": ["node_modules", "dist"] } diff --git a/libs/node/jest.config.js b/libs/node/jest.config.js index 1a33ad39406..d765efcfa2c 100644 --- a/libs/node/jest.config.js +++ b/libs/node/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../shared/jest.config.ts"); @@ -11,6 +11,6 @@ module.exports = { testEnvironment: "node", setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/", + prefix: "/../../", }), }; diff --git a/libs/node/tsconfig.json b/libs/node/tsconfig.json index 3d22cb2ec51..9c607a26b09 100644 --- a/libs/node/tsconfig.json +++ b/libs/node/tsconfig.json @@ -1,13 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/key-management": ["../key-management/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec"], "exclude": ["node_modules", "dist"] } diff --git a/libs/platform/jest.config.js b/libs/platform/jest.config.js index 7d190940909..174c430a901 100644 --- a/libs/platform/jest.config.js +++ b/libs/platform/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -10,6 +10,6 @@ module.exports = { displayName: "libs/platform tests", setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/", + prefix: "/../../", }), }; diff --git a/libs/platform/tsconfig.json b/libs/platform/tsconfig.json index 898f9e41c6a..9c607a26b09 100644 --- a/libs/platform/tsconfig.json +++ b/libs/platform/tsconfig.json @@ -1,10 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/common/*": ["../common/src/*"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec"], "exclude": ["node_modules", "dist"] } diff --git a/libs/shared/tsconfig.json b/libs/shared/tsconfig.json deleted file mode 100644 index 2161d2fb7d1..00000000000 --- a/libs/shared/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "pretty": true, - "moduleResolution": "node", - "noImplicitAny": true, - "target": "ES6", - "module": "es2020", - "lib": ["es5", "es6", "es7", "dom"], - "sourceMap": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "outDir": "dist", - "plugins": [ - { - "name": "typescript-strict-plugin" - } - ] - } -} diff --git a/libs/shared/tsconfig.spec.json b/libs/shared/tsconfig.spec.json index 5402594e5ab..3706663ecf1 100644 --- a/libs/shared/tsconfig.spec.json +++ b/libs/shared/tsconfig.spec.json @@ -1,33 +1,3 @@ { - "extends": "./tsconfig", - "compilerOptions": { - "resolveJsonModule": true, - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/angular/*": ["../angular/src/*"], - "@bitwarden/auth/angular": ["../auth/src/angular"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/billing": ["../billing/src"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/components": ["../components/src"], - "@bitwarden/dirt-card": ["../dirt/card/src"], - "@bitwarden/generator-components": ["../tools/generator/components/src"], - "@bitwarden/generator-core": ["../tools/generator/core/src"], - "@bitwarden/generator-history": ["../tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../tools/generator/extensions/navigation/src"], - "@bitwarden/importer-core": ["../importer/src"], - "@bitwarden/importer-ui": ["../importer/src/components"], - "@bitwarden/key-management": ["../key-management/src"], - "@bitwarden/key-management-ui": ["../key-management-ui/src/index.ts"], - "@bitwarden/node/*": ["../node/src/*"], - "@bitwarden/platform": ["../platform/src"], - "@bitwarden/send-ui": ["../tools/send/send-ui/src"], - "@bitwarden/ui-common": ["../ui/common/src"], - "@bitwarden/ui-common/setup-jest": ["../ui/common/src/setup-jest"], - "@bitwarden/vault-export-core": ["../tools/export/vault-export/vault-export-core/src"], - "@bitwarden/vault-export-ui": ["../tools/export/vault-export/vault-export-ui/src"], - "@bitwarden/vault": ["../vault/src"] - } - } + "extends": "../../tsconfig.base" } diff --git a/libs/tools/export/vault-export/vault-export-core/jest.config.js b/libs/tools/export/vault-export/vault-export-core/jest.config.js index 0a78a9855dc..066309a8bfc 100644 --- a/libs/tools/export/vault-export/vault-export-core/jest.config.js +++ b/libs/tools/export/vault-export/vault-export-core/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../../shared/tsconfig.spec"); +const { compilerOptions } = require("../../../../../tsconfig.base"); /** @type {import('jest').Config} */ module.exports = { @@ -8,6 +8,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "jsdom", moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../../", + prefix: "/../../../../../", }), }; diff --git a/libs/tools/export/vault-export/vault-export-core/tsconfig.json b/libs/tools/export/vault-export/vault-export-core/tsconfig.json index 7652a271044..06123643d63 100644 --- a/libs/tools/export/vault-export/vault-export-core/tsconfig.json +++ b/libs/tools/export/vault-export/vault-export-core/tsconfig.json @@ -1,13 +1,5 @@ { - "extends": "../../../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../../../admin-console/src/common"], - "@bitwarden/auth/common": ["../../../../auth/src/common"], - "@bitwarden/common/*": ["../../../../common/src/*"], - "@bitwarden/key-management": ["../../../../key-management/src"] - } - }, + "extends": "../../../../../tsconfig", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/tools/export/vault-export/vault-export-ui/jest.config.js b/libs/tools/export/vault-export/vault-export-ui/jest.config.js index 0a78a9855dc..066309a8bfc 100644 --- a/libs/tools/export/vault-export/vault-export-ui/jest.config.js +++ b/libs/tools/export/vault-export/vault-export-ui/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../../shared/tsconfig.spec"); +const { compilerOptions } = require("../../../../../tsconfig.base"); /** @type {import('jest').Config} */ module.exports = { @@ -8,6 +8,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "jsdom", moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../../", + prefix: "/../../../../../", }), }; diff --git a/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts b/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts index cb16c759ba2..2b03234c5e2 100644 --- a/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts +++ b/libs/tools/export/vault-export/vault-export-ui/src/components/export-scope-callout.component.ts @@ -16,7 +16,6 @@ import { CalloutModule } from "@bitwarden/components"; @Component({ selector: "tools-export-scope-callout", templateUrl: "export-scope-callout.component.html", - standalone: true, imports: [CommonModule, JslibModule, CalloutModule], }) export class ExportScopeCalloutComponent { diff --git a/libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts b/libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts index 956cc611c2e..7773c6a4d4a 100644 --- a/libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts +++ b/libs/tools/export/vault-export/vault-export-ui/src/components/export.component.ts @@ -67,7 +67,6 @@ import { ExportScopeCalloutComponent } from "./export-scope-callout.component"; @Component({ selector: "tools-export", templateUrl: "export.component.html", - standalone: true, imports: [ CommonModule, ReactiveFormsModule, diff --git a/libs/tools/export/vault-export/vault-export-ui/tsconfig.json b/libs/tools/export/vault-export/vault-export-ui/tsconfig.json index 6f2a0242dac..06123643d63 100644 --- a/libs/tools/export/vault-export/vault-export-ui/tsconfig.json +++ b/libs/tools/export/vault-export/vault-export-ui/tsconfig.json @@ -1,26 +1,5 @@ { - "extends": "../../../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../../../admin-console/src/common"], - "@bitwarden/angular/*": ["../../../../angular/src/*"], - "@bitwarden/auth/angular": ["../../../../auth/src/angular"], - "@bitwarden/auth/common": ["../../../../auth/src/common"], - "@bitwarden/common/*": ["../../../../common/src/*"], - "@bitwarden/components": ["../../../../components/src"], - "@bitwarden/generator-core": ["../../../../tools/generator/core/src"], - "@bitwarden/generator-components": ["../../../../tools/generator/components/src"], - "@bitwarden/generator-history": ["../../../../tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../../../../tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../../../../tools/generator/extensions/navigation/src"], - "@bitwarden/key-management": ["../../../../key-management/src"], - "@bitwarden/platform": ["../../../../platform/src"], - "@bitwarden/ui-common": ["../../../../ui/common/src"], - "@bitwarden/vault-export-core": [ - "../../../../tools/export/vault-export/vault-export-core/src" - ] - } - }, + "extends": "../../../../../tsconfig", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/tools/generator/components/jest.config.js b/libs/tools/generator/components/jest.config.js index bf5e465f398..e8a7d433d1d 100644 --- a/libs/tools/generator/components/jest.config.js +++ b/libs/tools/generator/components/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../shared/tsconfig.spec.json"); +const { compilerOptions } = require("../../../../tsconfig.base"); /** @type {import('jest').Config} */ module.exports = { @@ -8,6 +8,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "../../../shared/test.environment.ts", moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../", + prefix: "/../../../../", }), }; diff --git a/libs/tools/generator/components/src/credential-generator-history-dialog.component.ts b/libs/tools/generator/components/src/credential-generator-history-dialog.component.ts index 7559dee130c..9ec0e636f9a 100644 --- a/libs/tools/generator/components/src/credential-generator-history-dialog.component.ts +++ b/libs/tools/generator/components/src/credential-generator-history-dialog.component.ts @@ -29,7 +29,6 @@ import { EmptyCredentialHistoryComponent } from "./empty-credential-history.comp @Component({ templateUrl: "credential-generator-history-dialog.component.html", - standalone: true, imports: [ ButtonModule, CommonModule, diff --git a/libs/tools/generator/components/src/credential-generator-history.component.ts b/libs/tools/generator/components/src/credential-generator-history.component.ts index 76dfbaea867..3965b2be83e 100644 --- a/libs/tools/generator/components/src/credential-generator-history.component.ts +++ b/libs/tools/generator/components/src/credential-generator-history.component.ts @@ -27,7 +27,6 @@ import { GeneratorModule } from "./generator.module"; import { translate } from "./util"; @Component({ - standalone: true, selector: "bit-credential-generator-history", templateUrl: "credential-generator-history.component.html", imports: [ diff --git a/libs/tools/generator/components/src/empty-credential-history.component.ts b/libs/tools/generator/components/src/empty-credential-history.component.ts index 1e23adf0bb1..29c9fc277fc 100644 --- a/libs/tools/generator/components/src/empty-credential-history.component.ts +++ b/libs/tools/generator/components/src/empty-credential-history.component.ts @@ -6,7 +6,6 @@ import { IconModule, TypographyModule } from "@bitwarden/components"; import { NoCredentialsIcon } from "./icons/no-credentials.icon"; @Component({ - standalone: true, selector: "bit-empty-credential-history", templateUrl: "empty-credential-history.component.html", imports: [JslibModule, IconModule, TypographyModule], diff --git a/libs/tools/generator/components/src/nudge-generator-spotlight.component.ts b/libs/tools/generator/components/src/nudge-generator-spotlight.component.ts index a0008bac782..6807a987a85 100644 --- a/libs/tools/generator/components/src/nudge-generator-spotlight.component.ts +++ b/libs/tools/generator/components/src/nudge-generator-spotlight.component.ts @@ -11,7 +11,6 @@ import { TypographyModule } from "@bitwarden/components"; import { I18nPipe } from "@bitwarden/ui-common"; @Component({ - standalone: true, selector: "nudge-generator-spotlight", templateUrl: "nudge-generator-spotlight.component.html", imports: [I18nPipe, SpotlightComponent, AsyncPipe, CommonModule, TypographyModule], diff --git a/libs/tools/generator/components/tsconfig.json b/libs/tools/generator/components/tsconfig.json index 9a3a08b40fc..5010a206c9b 100644 --- a/libs/tools/generator/components/tsconfig.json +++ b/libs/tools/generator/components/tsconfig.json @@ -1,20 +1,5 @@ { - "extends": "../../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../../admin-console/src/common"], - "@bitwarden/angular/*": ["../../../angular/src/*"], - "@bitwarden/auth/common": ["../../../auth/src/common"], - "@bitwarden/common/*": ["../../../common/src/*"], - "@bitwarden/components": ["../../../components/src"], - "@bitwarden/generator-core": ["../../../tools/generator/core/src"], - "@bitwarden/generator-history": ["../../../tools/generator/extensions/history/src"], - "@bitwarden/key-management": ["../../../key-management/src"], - "@bitwarden/platform": ["../../../platform/src"], - "@bitwarden/ui-common": ["../../../ui/common/src"], - "@bitwarden/vault": ["../../../vault/src"] - } - }, + "extends": "../../../../tsconfig.base", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/tools/generator/core/jest.config.js b/libs/tools/generator/core/jest.config.js index b052672c4af..e8a7d433d1d 100644 --- a/libs/tools/generator/core/jest.config.js +++ b/libs/tools/generator/core/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../shared/tsconfig.spec"); +const { compilerOptions } = require("../../../../tsconfig.base"); /** @type {import('jest').Config} */ module.exports = { @@ -8,6 +8,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "../../../shared/test.environment.ts", moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../", + prefix: "/../../../../", }), }; diff --git a/libs/tools/generator/core/tsconfig.json b/libs/tools/generator/core/tsconfig.json index 303f913ba23..5010a206c9b 100644 --- a/libs/tools/generator/core/tsconfig.json +++ b/libs/tools/generator/core/tsconfig.json @@ -1,13 +1,5 @@ { - "extends": "../../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../../admin-console/src/common"], - "@bitwarden/auth/common": ["../../../auth/src/common"], - "@bitwarden/common/*": ["../../../common/src/*"], - "@bitwarden/key-management": ["../../../key-management/src"] - } - }, + "extends": "../../../../tsconfig.base", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/tools/generator/extensions/history/jest.config.js b/libs/tools/generator/extensions/history/jest.config.js index f90801cd7c4..598c83fe7d7 100644 --- a/libs/tools/generator/extensions/history/jest.config.js +++ b/libs/tools/generator/extensions/history/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../../shared/tsconfig.spec"); +const { compilerOptions } = require("../../../../../tsconfig.base"); /** @type {import('jest').Config} */ module.exports = { @@ -8,6 +8,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "../../../../shared/test.environment.ts", moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../../", + prefix: "/../../../../../", }), }; diff --git a/libs/tools/generator/extensions/history/tsconfig.json b/libs/tools/generator/extensions/history/tsconfig.json index 5fc1caf014f..84e562664f4 100644 --- a/libs/tools/generator/extensions/history/tsconfig.json +++ b/libs/tools/generator/extensions/history/tsconfig.json @@ -1,14 +1,5 @@ { - "extends": "../../../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../../../admin-console/src/common"], - "@bitwarden/auth/common": ["../../../../auth/src/common"], - "@bitwarden/common/*": ["../../../../common/src/*"], - "@bitwarden/generator-core": ["../../../../tools/generator/core/src"], - "@bitwarden/key-management": ["../../../../key-management/src"] - } - }, + "extends": "../../../../../tsconfig.base", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/tools/generator/extensions/legacy/jest.config.js b/libs/tools/generator/extensions/legacy/jest.config.js index f90801cd7c4..598c83fe7d7 100644 --- a/libs/tools/generator/extensions/legacy/jest.config.js +++ b/libs/tools/generator/extensions/legacy/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../../shared/tsconfig.spec"); +const { compilerOptions } = require("../../../../../tsconfig.base"); /** @type {import('jest').Config} */ module.exports = { @@ -8,6 +8,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "../../../../shared/test.environment.ts", moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../../", + prefix: "/../../../../../", }), }; diff --git a/libs/tools/generator/extensions/legacy/tsconfig.json b/libs/tools/generator/extensions/legacy/tsconfig.json index 9a09e28ea3d..06123643d63 100644 --- a/libs/tools/generator/extensions/legacy/tsconfig.json +++ b/libs/tools/generator/extensions/legacy/tsconfig.json @@ -1,16 +1,5 @@ { - "extends": "../../../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../../../admin-console/src/common"], - "@bitwarden/auth/common": ["../../../../auth/src/common"], - "@bitwarden/common/*": ["../../../../common/src/*"], - "@bitwarden/generator-core": ["../../../../tools/generator/core/src"], - "@bitwarden/generator-history": ["../../../../tools/generator/extensions/history/src"], - "@bitwarden/generator-navigation": ["../../../../tools/generator/extensions/navigation/src"], - "@bitwarden/key-management": ["../../../../key-management/src"] - } - }, + "extends": "../../../../../tsconfig", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/tools/generator/extensions/navigation/jest.config.js b/libs/tools/generator/extensions/navigation/jest.config.js index f90801cd7c4..598c83fe7d7 100644 --- a/libs/tools/generator/extensions/navigation/jest.config.js +++ b/libs/tools/generator/extensions/navigation/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../../shared/tsconfig.spec"); +const { compilerOptions } = require("../../../../../tsconfig.base"); /** @type {import('jest').Config} */ module.exports = { @@ -8,6 +8,6 @@ module.exports = { preset: "ts-jest", testEnvironment: "../../../../shared/test.environment.ts", moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../../", + prefix: "/../../../../../", }), }; diff --git a/libs/tools/generator/extensions/navigation/tsconfig.json b/libs/tools/generator/extensions/navigation/tsconfig.json index 5fc1caf014f..06123643d63 100644 --- a/libs/tools/generator/extensions/navigation/tsconfig.json +++ b/libs/tools/generator/extensions/navigation/tsconfig.json @@ -1,14 +1,5 @@ { - "extends": "../../../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../../../admin-console/src/common"], - "@bitwarden/auth/common": ["../../../../auth/src/common"], - "@bitwarden/common/*": ["../../../../common/src/*"], - "@bitwarden/generator-core": ["../../../../tools/generator/core/src"], - "@bitwarden/key-management": ["../../../../key-management/src"] - } - }, + "extends": "../../../../../tsconfig", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/tools/send/send-ui/jest.config.js b/libs/tools/send/send-ui/jest.config.js index ed8dbe61163..2ab935f0bfd 100644 --- a/libs/tools/send/send-ui/jest.config.js +++ b/libs/tools/send/send-ui/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../../../shared/tsconfig.spec"); +const { compilerOptions } = require("../../../../tsconfig.base"); const { createCjsPreset } = require("jest-preset-angular/presets"); @@ -21,6 +21,6 @@ module.exports = { displayName: "tools/send-ui tests", setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper(compilerOptions?.paths || {}, { - prefix: "/../../", + prefix: "/../../../../", }), }; diff --git a/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts b/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts index 0bb753d3f37..4bcf11bf94f 100644 --- a/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts +++ b/libs/tools/send/send-ui/src/add-edit/send-add-edit-dialog.component.ts @@ -54,7 +54,6 @@ export enum SendItemDialogResult { */ @Component({ templateUrl: "send-add-edit-dialog.component.html", - standalone: true, imports: [ CommonModule, SearchModule, diff --git a/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts b/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts index 6563789f1c7..ba5176e5db5 100644 --- a/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts +++ b/libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts @@ -12,7 +12,6 @@ import { BadgeModule, ButtonModule, ButtonType, MenuModule } from "@bitwarden/co @Component({ selector: "tools-new-send-dropdown", templateUrl: "new-send-dropdown.component.html", - standalone: true, imports: [JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule, BadgeModule], }) export class NewSendDropdownComponent implements OnInit { diff --git a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts index 30775aa8a83..b2ab149f2f2 100644 --- a/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts @@ -36,7 +36,6 @@ import { SendFormContainer } from "../../send-form-container"; @Component({ selector: "tools-send-options", templateUrl: "./send-options.component.html", - standalone: true, imports: [ AsyncActionsModule, ButtonModule, diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts index 9ca9aefb4ac..e1fbf5dbc50 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts @@ -50,7 +50,6 @@ export interface DatePresetSelectOption { @Component({ selector: "tools-send-details", templateUrl: "./send-details.component.html", - standalone: true, imports: [ SectionComponent, SectionHeaderComponent, diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts index a8f878aab23..9d967e15ba8 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts @@ -22,7 +22,6 @@ import { SendFormContainer } from "../../send-form-container"; @Component({ selector: "tools-send-file-details", templateUrl: "./send-file-details.component.html", - standalone: true, imports: [ ButtonModule, CommonModule, diff --git a/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts index e896f4c2bc2..ac8ee0c8d71 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts @@ -15,7 +15,6 @@ import { SendFormContainer } from "../../send-form-container"; @Component({ selector: "tools-send-text-details", templateUrl: "./send-text-details.component.html", - standalone: true, imports: [ CheckboxModule, CommonModule, diff --git a/libs/tools/send/send-ui/src/send-form/components/send-form.component.ts b/libs/tools/send/send-ui/src/send-form/components/send-form.component.ts index 13c00a6bb78..b8593c735b7 100644 --- a/libs/tools/send/send-ui/src/send-form/components/send-form.component.ts +++ b/libs/tools/send/send-ui/src/send-form/components/send-form.component.ts @@ -41,7 +41,6 @@ import { SendDetailsComponent } from "./send-details/send-details.component"; @Component({ selector: "tools-send-form", templateUrl: "./send-form.component.html", - standalone: true, providers: [ { provide: SendFormContainer, diff --git a/libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts b/libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts index d42eab382e9..b7c60145bbf 100644 --- a/libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts +++ b/libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts @@ -11,7 +11,6 @@ import { ChipSelectComponent } from "@bitwarden/components"; import { SendListFiltersService } from "../services/send-list-filters.service"; @Component({ - standalone: true, selector: "app-send-list-filters", templateUrl: "./send-list-filters.component.html", imports: [CommonModule, JslibModule, ChipSelectComponent, ReactiveFormsModule], diff --git a/libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts b/libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts index ab73e71c4ab..f67880eb73f 100644 --- a/libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts +++ b/libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts @@ -40,7 +40,6 @@ import { ], selector: "app-send-list-items-container", templateUrl: "send-list-items-container.component.html", - standalone: true, }) export class SendListItemsContainerComponent { sendType = SendType; diff --git a/libs/tools/send/send-ui/src/send-search/send-search.component.ts b/libs/tools/send/send-ui/src/send-search/send-search.component.ts index 8142ce58f64..90b31a206fc 100644 --- a/libs/tools/send/send-ui/src/send-search/send-search.component.ts +++ b/libs/tools/send/send-ui/src/send-search/send-search.component.ts @@ -13,7 +13,6 @@ const SearchTextDebounceInterval = 200; @Component({ imports: [CommonModule, SearchModule, JslibModule, FormsModule], - standalone: true, selector: "tools-send-search", templateUrl: "send-search.component.html", }) diff --git a/libs/tools/send/send-ui/tsconfig.json b/libs/tools/send/send-ui/tsconfig.json index e6d6680ad40..5010a206c9b 100644 --- a/libs/tools/send/send-ui/tsconfig.json +++ b/libs/tools/send/send-ui/tsconfig.json @@ -1,22 +1,5 @@ { - "extends": "../../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/admin-console/common": ["../../../admin-console/src/common"], - "@bitwarden/angular/*": ["../../../angular/src/*"], - "@bitwarden/auth/common": ["../../../auth/src/common"], - "@bitwarden/common/*": ["../../../common/src/*"], - "@bitwarden/components": ["../../../components/src"], - "@bitwarden/generator-components": ["../../../tools/generator/components/src"], - "@bitwarden/generator-core": ["../../../tools/generator/core/src"], - "@bitwarden/generator-history": ["../../../tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../../../tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../../../tools/generator/extensions/navigation/src"], - "@bitwarden/key-management": ["../../../key-management/src"], - "@bitwarden/platform": ["../../../platform/src"], - "@bitwarden/ui-common": ["../../../ui/common/src"] - } - }, + "extends": "../../../../tsconfig.base", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/ui/common/tsconfig.json b/libs/ui/common/tsconfig.json index 31062d41a1c..941c32b5b2a 100644 --- a/libs/ui/common/tsconfig.json +++ b/libs/ui/common/tsconfig.json @@ -1,10 +1,5 @@ { - "extends": "../../shared/tsconfig", - "compilerOptions": { - "paths": { - "@bitwarden/common/*": ["../../common/src/*"] - } - }, + "extends": "../../../tsconfig.base", "include": ["src"], "exclude": ["node_modules", "dist"] } diff --git a/libs/vault/jest.config.js b/libs/vault/jest.config.js index c0a0103da73..05c5b5c5d3a 100644 --- a/libs/vault/jest.config.js +++ b/libs/vault/jest.config.js @@ -1,6 +1,6 @@ const { pathsToModuleNameMapper } = require("ts-jest"); -const { compilerOptions } = require("../shared/tsconfig.spec"); +const { compilerOptions } = require("../../tsconfig.base"); const sharedConfig = require("../../libs/shared/jest.config.angular"); @@ -11,9 +11,9 @@ module.exports = { setupFilesAfterEnv: ["/test.setup.ts"], moduleNameMapper: pathsToModuleNameMapper( // lets us use @bitwarden/common/spec in tests - { "@bitwarden/common/spec": ["../common/spec"], ...(compilerOptions?.paths ?? {}) }, + { "@bitwarden/common/spec": ["libs/common/spec"], ...(compilerOptions?.paths ?? {}) }, { - prefix: "/", + prefix: "/../../", }, ), }; diff --git a/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.spec.ts b/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.spec.ts index f1c8085ae15..5b93a7bdefe 100644 --- a/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.spec.ts +++ b/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.spec.ts @@ -14,7 +14,6 @@ import { CustomFieldsComponent } from "../custom-fields/custom-fields.component" import { AdditionalOptionsSectionComponent } from "./additional-options-section.component"; @Component({ - standalone: true, selector: "vault-custom-fields", template: "", }) diff --git a/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts b/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts index 14f3494652a..7877144f9f0 100644 --- a/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts +++ b/libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts @@ -24,7 +24,6 @@ import { CustomFieldsComponent } from "../custom-fields/custom-fields.component" @Component({ selector: "vault-additional-options-section", templateUrl: "./additional-options-section.component.html", - standalone: true, imports: [ CommonModule, SectionHeaderComponent, diff --git a/libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.spec.ts b/libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.spec.ts index da827addf67..439c651e5ad 100644 --- a/libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.spec.ts +++ b/libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.spec.ts @@ -27,7 +27,6 @@ import { CipherAttachmentsComponent } from "./cipher-attachments.component"; import { DeleteAttachmentComponent } from "./delete-attachment/delete-attachment.component"; @Component({ - standalone: true, selector: "app-download-attachment", template: "", }) diff --git a/libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.ts b/libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.ts index aa9769ec392..0bcb31c7af9 100644 --- a/libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.ts +++ b/libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.ts @@ -57,7 +57,6 @@ type CipherAttachmentForm = FormGroup<{ }>; @Component({ - standalone: true, selector: "app-cipher-attachments", templateUrl: "./cipher-attachments.component.html", imports: [ diff --git a/libs/vault/src/cipher-form/components/attachments/delete-attachment/delete-attachment.component.ts b/libs/vault/src/cipher-form/components/attachments/delete-attachment/delete-attachment.component.ts index ce7a5a22dd8..be6f10c01de 100644 --- a/libs/vault/src/cipher-form/components/attachments/delete-attachment/delete-attachment.component.ts +++ b/libs/vault/src/cipher-form/components/attachments/delete-attachment/delete-attachment.component.ts @@ -18,7 +18,6 @@ import { } from "@bitwarden/components"; @Component({ - standalone: true, selector: "app-delete-attachment", templateUrl: "./delete-attachment.component.html", imports: [AsyncActionsModule, CommonModule, JslibModule, ButtonModule, IconButtonModule], diff --git a/libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts b/libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts index ccbc792648e..b328c0ddd72 100644 --- a/libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts +++ b/libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts @@ -39,7 +39,6 @@ interface UriField { @Component({ selector: "vault-autofill-options", templateUrl: "./autofill-options.component.html", - standalone: true, imports: [ DragDropModule, SectionHeaderComponent, diff --git a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts index 07bf7bef775..3f12382b931 100644 --- a/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts +++ b/libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts @@ -35,7 +35,6 @@ import { @Component({ selector: "vault-autofill-uri-option", templateUrl: "./uri-option.component.html", - standalone: true, providers: [ { provide: NG_VALUE_ACCESSOR, diff --git a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts index 8086d2bf0c4..a71f57481ff 100644 --- a/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts +++ b/libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts @@ -26,7 +26,6 @@ import { CipherFormContainer } from "../../cipher-form-container"; @Component({ selector: "vault-card-details-section", templateUrl: "./card-details-section.component.html", - standalone: true, imports: [ CardComponent, TypographyModule, diff --git a/libs/vault/src/cipher-form/components/cipher-form.component.ts b/libs/vault/src/cipher-form/components/cipher-form.component.ts index 08dc71c9886..b8815235ee8 100644 --- a/libs/vault/src/cipher-form/components/cipher-form.component.ts +++ b/libs/vault/src/cipher-form/components/cipher-form.component.ts @@ -49,7 +49,6 @@ import { SshKeySectionComponent } from "./sshkey-section/sshkey-section.componen @Component({ selector: "vault-cipher-form", templateUrl: "./cipher-form.component.html", - standalone: true, providers: [ { provide: CipherFormContainer, diff --git a/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.spec.ts b/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.spec.ts index 7949c1fcc11..e98e4805d19 100644 --- a/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.spec.ts +++ b/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.spec.ts @@ -9,7 +9,6 @@ import { CipherFormGeneratorComponent } from "@bitwarden/vault"; @Component({ selector: "tools-password-generator", template: ``, - standalone: true, }) class MockPasswordGeneratorComponent { @Output() onGenerated = new EventEmitter(); @@ -18,7 +17,6 @@ class MockPasswordGeneratorComponent { @Component({ selector: "tools-username-generator", template: ``, - standalone: true, }) class MockUsernameGeneratorComponent { @Output() onGenerated = new EventEmitter(); diff --git a/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts b/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts index b9e5ed3c0ab..f1e4c5c177c 100644 --- a/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts +++ b/libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts @@ -12,7 +12,6 @@ import { AlgorithmInfo, GeneratedCredential } from "@bitwarden/generator-core"; @Component({ selector: "vault-cipher-form-generator", templateUrl: "./cipher-form-generator.component.html", - standalone: true, imports: [CommonModule, GeneratorModule], }) export class CipherFormGeneratorComponent { diff --git a/libs/vault/src/cipher-form/components/custom-fields/add-edit-custom-field-dialog/add-edit-custom-field-dialog.component.ts b/libs/vault/src/cipher-form/components/custom-fields/add-edit-custom-field-dialog/add-edit-custom-field-dialog.component.ts index 72bdf5dca1a..7ddcf902d70 100644 --- a/libs/vault/src/cipher-form/components/custom-fields/add-edit-custom-field-dialog/add-edit-custom-field-dialog.component.ts +++ b/libs/vault/src/cipher-form/components/custom-fields/add-edit-custom-field-dialog/add-edit-custom-field-dialog.component.ts @@ -29,7 +29,6 @@ export type AddEditCustomFieldDialogData = { }; @Component({ - standalone: true, selector: "vault-add-edit-custom-field-dialog", templateUrl: "./add-edit-custom-field-dialog.component.html", imports: [ diff --git a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts index 5d43f52788a..52cb740ad03 100644 --- a/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts +++ b/libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts @@ -69,7 +69,6 @@ export type CustomField = { }; @Component({ - standalone: true, selector: "vault-custom-fields", templateUrl: "./custom-fields.component.html", imports: [ diff --git a/libs/vault/src/cipher-form/components/identity/identity.component.ts b/libs/vault/src/cipher-form/components/identity/identity.component.ts index 3cc8e73697f..119ce1caf6e 100644 --- a/libs/vault/src/cipher-form/components/identity/identity.component.ts +++ b/libs/vault/src/cipher-form/components/identity/identity.component.ts @@ -22,7 +22,6 @@ import { import { CipherFormContainer } from "../../cipher-form-container"; @Component({ - standalone: true, selector: "vault-identity-section", templateUrl: "./identity.component.html", imports: [ diff --git a/libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts b/libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts index a1cf33c449b..192fac44a2d 100644 --- a/libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts +++ b/libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts @@ -36,7 +36,6 @@ import { CipherFormContainer } from "../../cipher-form-container"; @Component({ selector: "vault-item-details-section", templateUrl: "./item-details-section.component.html", - standalone: true, imports: [ CardComponent, TypographyModule, diff --git a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.spec.ts b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.spec.ts index e0ba52a54a2..c5b1fc7897b 100644 --- a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.spec.ts +++ b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.spec.ts @@ -23,7 +23,6 @@ import { AutofillOptionsComponent } from "../autofill-options/autofill-options.c import { LoginDetailsSectionComponent } from "./login-details-section.component"; @Component({ - standalone: true, selector: "vault-autofill-options", template: "", }) diff --git a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts index c6b8433dcfa..e74d9915cdb 100644 --- a/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts +++ b/libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts @@ -33,7 +33,6 @@ import { AutofillOptionsComponent } from "../autofill-options/autofill-options.c @Component({ selector: "vault-login-details-section", templateUrl: "./login-details-section.component.html", - standalone: true, imports: [ ReactiveFormsModule, SectionHeaderComponent, diff --git a/libs/vault/src/cipher-form/components/new-item-nudge/new-item-nudge.component.ts b/libs/vault/src/cipher-form/components/new-item-nudge/new-item-nudge.component.ts index 705b98f241a..79defc271cf 100644 --- a/libs/vault/src/cipher-form/components/new-item-nudge/new-item-nudge.component.ts +++ b/libs/vault/src/cipher-form/components/new-item-nudge/new-item-nudge.component.ts @@ -13,7 +13,6 @@ import { CipherType } from "@bitwarden/sdk-internal"; @Component({ selector: "vault-new-item-nudge", templateUrl: "./new-item-nudge.component.html", - standalone: true, imports: [NgIf, SpotlightComponent], }) export class NewItemNudgeComponent implements OnInit { diff --git a/libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts b/libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts index fcf2ba0d9f7..71f85e0e1b3 100644 --- a/libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts +++ b/libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts @@ -28,7 +28,6 @@ import { CipherFormContainer } from "../../cipher-form-container"; @Component({ selector: "vault-sshkey-section", templateUrl: "./sshkey-section.component.html", - standalone: true, imports: [ CardComponent, TypographyModule, diff --git a/libs/vault/src/cipher-view/additional-options/additional-options.component.ts b/libs/vault/src/cipher-view/additional-options/additional-options.component.ts index 0f2c99800f8..3e632983d49 100644 --- a/libs/vault/src/cipher-view/additional-options/additional-options.component.ts +++ b/libs/vault/src/cipher-view/additional-options/additional-options.component.ts @@ -14,7 +14,6 @@ import { @Component({ selector: "app-additional-options", templateUrl: "additional-options.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts b/libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts index 04e69fcccd6..711c63878e3 100644 --- a/libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts +++ b/libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts @@ -25,7 +25,6 @@ import { DownloadAttachmentComponent } from "../../components/download-attachmen @Component({ selector: "app-attachments-v2-view", templateUrl: "attachments-v2-view.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/attachments/attachments-v2.component.ts b/libs/vault/src/cipher-view/attachments/attachments-v2.component.ts index b34d0d3a312..7eb3d371292 100644 --- a/libs/vault/src/cipher-view/attachments/attachments-v2.component.ts +++ b/libs/vault/src/cipher-view/attachments/attachments-v2.component.ts @@ -42,7 +42,6 @@ export interface AttachmentDialogCloseResult { @Component({ selector: "app-vault-attachments-v2", templateUrl: "attachments-v2.component.html", - standalone: true, imports: [ButtonModule, CommonModule, DialogModule, I18nPipe, CipherAttachmentsComponent], }) export class AttachmentsV2Component { diff --git a/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts b/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts index bab37324993..0643737d846 100644 --- a/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts +++ b/libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts @@ -21,7 +21,6 @@ import { @Component({ selector: "app-autofill-options-view", templateUrl: "autofill-options-view.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/card-details/card-details-view.component.ts b/libs/vault/src/cipher-view/card-details/card-details-view.component.ts index 2d1b2800c79..502214848f3 100644 --- a/libs/vault/src/cipher-view/card-details/card-details-view.component.ts +++ b/libs/vault/src/cipher-view/card-details/card-details-view.component.ts @@ -20,7 +20,6 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only- @Component({ selector: "app-card-details-view", templateUrl: "card-details-view.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/cipher-view.component.ts b/libs/vault/src/cipher-view/cipher-view.component.ts index 02968d6d149..66910ad8ac7 100644 --- a/libs/vault/src/cipher-view/cipher-view.component.ts +++ b/libs/vault/src/cipher-view/cipher-view.component.ts @@ -41,7 +41,6 @@ import { ViewIdentitySectionsComponent } from "./view-identity-sections/view-ide @Component({ selector: "app-cipher-view", templateUrl: "cipher-view.component.html", - standalone: true, imports: [ CalloutModule, CommonModule, diff --git a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts index 4d20eceb285..9a6f93026e5 100644 --- a/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts +++ b/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts @@ -28,7 +28,6 @@ import { VaultAutosizeReadOnlyTextArea } from "../../directives/readonly-textare @Component({ selector: "app-custom-fields-v2", templateUrl: "custom-fields-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/item-details/item-details-v2.component.ts b/libs/vault/src/cipher-view/item-details/item-details-v2.component.ts index fbedcbb54df..8f0fedbe599 100644 --- a/libs/vault/src/cipher-view/item-details/item-details-v2.component.ts +++ b/libs/vault/src/cipher-view/item-details/item-details-v2.component.ts @@ -22,7 +22,6 @@ import { OrgIconDirective } from "../../components/org-icon.directive"; @Component({ selector: "app-item-details-v2", templateUrl: "item-details-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/item-history/item-history-v2.component.ts b/libs/vault/src/cipher-view/item-history/item-history-v2.component.ts index f49d7030d77..2bbb6418934 100644 --- a/libs/vault/src/cipher-view/item-history/item-history-v2.component.ts +++ b/libs/vault/src/cipher-view/item-history/item-history-v2.component.ts @@ -19,7 +19,6 @@ import { @Component({ selector: "app-item-history-v2", templateUrl: "item-history-v2.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts index 5f7d0b32201..5eeb3f9e8f3 100644 --- a/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts +++ b/libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts @@ -42,7 +42,6 @@ type TotpCodeValues = { @Component({ selector: "app-login-credentials-view", templateUrl: "login-credentials-view.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/read-only-cipher-card/read-only-cipher-card.component.ts b/libs/vault/src/cipher-view/read-only-cipher-card/read-only-cipher-card.component.ts index 9005ea9674c..8f6b9954a9f 100644 --- a/libs/vault/src/cipher-view/read-only-cipher-card/read-only-cipher-card.component.ts +++ b/libs/vault/src/cipher-view/read-only-cipher-card/read-only-cipher-card.component.ts @@ -5,7 +5,6 @@ import { CardComponent, BitFormFieldComponent } from "@bitwarden/components"; @Component({ selector: "read-only-cipher-card", templateUrl: "./read-only-cipher-card.component.html", - standalone: true, imports: [CardComponent], }) /** diff --git a/libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts b/libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts index e0ec1358ee1..5bce5527112 100644 --- a/libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts +++ b/libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts @@ -17,7 +17,6 @@ import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only- @Component({ selector: "app-sshkey-view", templateUrl: "sshkey-view.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts b/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts index 3b710812b36..f9cb9d2b549 100644 --- a/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts +++ b/libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts @@ -13,7 +13,6 @@ import { import { ReadOnlyCipherCardComponent } from "../read-only-cipher-card/read-only-cipher-card.component"; @Component({ - standalone: true, selector: "app-view-identity-sections", templateUrl: "./view-identity-sections.component.html", imports: [ diff --git a/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.ts b/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.ts index dd3cbc4c5c9..bb79c7877a9 100644 --- a/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.ts +++ b/libs/vault/src/components/add-edit-folder-dialog/add-edit-folder-dialog.component.ts @@ -47,7 +47,6 @@ export type AddEditFolderDialogData = { }; @Component({ - standalone: true, selector: "vault-add-edit-folder-dialog", templateUrl: "./add-edit-folder-dialog.component.html", imports: [ diff --git a/libs/vault/src/components/assign-collections.component.ts b/libs/vault/src/components/assign-collections.component.ts index 4a0bd1fc670..42e6d9c92c5 100644 --- a/libs/vault/src/components/assign-collections.component.ts +++ b/libs/vault/src/components/assign-collections.component.ts @@ -94,7 +94,6 @@ const MY_VAULT_ID = "MyVault"; @Component({ selector: "assign-collections", templateUrl: "assign-collections.component.html", - standalone: true, imports: [ CommonModule, JslibModule, diff --git a/libs/vault/src/components/can-delete-cipher.directive.ts b/libs/vault/src/components/can-delete-cipher.directive.ts index c1c7706a1fa..7eadedc7ada 100644 --- a/libs/vault/src/components/can-delete-cipher.directive.ts +++ b/libs/vault/src/components/can-delete-cipher.directive.ts @@ -9,7 +9,6 @@ import { CipherAuthorizationService } from "@bitwarden/common/vault/services/cip */ @Directive({ selector: "[appCanDeleteCipher]", - standalone: true, }) export class CanDeleteCipherDirective implements OnDestroy { private destroy$ = new Subject(); diff --git a/libs/vault/src/components/carousel/carousel-button/carousel-button.component.ts b/libs/vault/src/components/carousel/carousel-button/carousel-button.component.ts index d0e353dcc76..7b5f7d3b164 100644 --- a/libs/vault/src/components/carousel/carousel-button/carousel-button.component.ts +++ b/libs/vault/src/components/carousel/carousel-button/carousel-button.component.ts @@ -10,7 +10,6 @@ import { VaultCarouselSlideComponent } from "../carousel-slide/carousel-slide.co @Component({ selector: "vault-carousel-button", templateUrl: "carousel-button.component.html", - standalone: true, imports: [CommonModule, IconModule], }) export class VaultCarouselButtonComponent implements FocusableOption { diff --git a/libs/vault/src/components/carousel/carousel-content/carousel-content.component.spec.ts b/libs/vault/src/components/carousel/carousel-content/carousel-content.component.spec.ts index 2900225b886..bc1c9250c2c 100644 --- a/libs/vault/src/components/carousel/carousel-content/carousel-content.component.spec.ts +++ b/libs/vault/src/components/carousel/carousel-content/carousel-content.component.spec.ts @@ -7,7 +7,6 @@ import { VaultCarouselContentComponent } from "./carousel-content.component"; @Component({ selector: "app-test-template-ref", - standalone: true, imports: [VaultCarouselContentComponent], template: ` diff --git a/libs/vault/src/components/carousel/carousel-content/carousel-content.component.ts b/libs/vault/src/components/carousel/carousel-content/carousel-content.component.ts index 7051a8ff8fa..47027a77ae9 100644 --- a/libs/vault/src/components/carousel/carousel-content/carousel-content.component.ts +++ b/libs/vault/src/components/carousel/carousel-content/carousel-content.component.ts @@ -4,7 +4,6 @@ import { Component, Input } from "@angular/core"; @Component({ selector: "vault-carousel-content", templateUrl: "carousel-content.component.html", - standalone: true, imports: [CdkPortalOutlet], }) export class VaultCarouselContentComponent { diff --git a/libs/vault/src/components/carousel/carousel-slide/carousel-slide.component.spec.ts b/libs/vault/src/components/carousel/carousel-slide/carousel-slide.component.spec.ts index e69a2a2d758..46f06f6dcb4 100644 --- a/libs/vault/src/components/carousel/carousel-slide/carousel-slide.component.spec.ts +++ b/libs/vault/src/components/carousel/carousel-slide/carousel-slide.component.spec.ts @@ -7,7 +7,6 @@ import { VaultCarouselSlideComponent } from "./carousel-slide.component"; @Component({ selector: "app-test-carousel-slide", - standalone: true, imports: [VaultCarouselSlideComponent], template: `

Carousel Slide Content!

`, }) diff --git a/libs/vault/src/components/carousel/carousel-slide/carousel-slide.component.ts b/libs/vault/src/components/carousel/carousel-slide/carousel-slide.component.ts index a516914f0c0..811572881da 100644 --- a/libs/vault/src/components/carousel/carousel-slide/carousel-slide.component.ts +++ b/libs/vault/src/components/carousel/carousel-slide/carousel-slide.component.ts @@ -14,7 +14,6 @@ import { @Component({ selector: "vault-carousel-slide", templateUrl: "./carousel-slide.component.html", - standalone: true, imports: [CommonModule], }) export class VaultCarouselSlideComponent implements OnInit { diff --git a/libs/vault/src/components/carousel/carousel.component.spec.ts b/libs/vault/src/components/carousel/carousel.component.spec.ts index 500b8115bad..1409aea0cb2 100644 --- a/libs/vault/src/components/carousel/carousel.component.spec.ts +++ b/libs/vault/src/components/carousel/carousel.component.spec.ts @@ -7,7 +7,6 @@ import { VaultCarouselComponent } from "./carousel.component"; @Component({ selector: "app-test-carousel-slide", - standalone: true, imports: [VaultCarouselComponent, VaultCarouselSlideComponent], template: ` diff --git a/libs/vault/src/components/carousel/carousel.component.ts b/libs/vault/src/components/carousel/carousel.component.ts index 2346ee29902..275b9de4fcb 100644 --- a/libs/vault/src/components/carousel/carousel.component.ts +++ b/libs/vault/src/components/carousel/carousel.component.ts @@ -25,7 +25,6 @@ import { VaultCarouselSlideComponent } from "./carousel-slide/carousel-slide.com @Component({ selector: "vault-carousel", templateUrl: "./carousel.component.html", - standalone: true, imports: [ CdkPortalOutlet, CommonModule, diff --git a/libs/vault/src/components/copy-cipher-field.directive.ts b/libs/vault/src/components/copy-cipher-field.directive.ts index 324b43f12d4..0ab7400a6dd 100644 --- a/libs/vault/src/components/copy-cipher-field.directive.ts +++ b/libs/vault/src/components/copy-cipher-field.directive.ts @@ -18,7 +18,6 @@ import { CopyAction, CopyCipherFieldService } from "@bitwarden/vault"; * ``` */ @Directive({ - standalone: true, selector: "[appCopyField]", }) export class CopyCipherFieldDirective implements OnChanges { diff --git a/libs/vault/src/components/dark-image-source.directive.ts b/libs/vault/src/components/dark-image-source.directive.ts index 9867f264365..ee54f61209a 100644 --- a/libs/vault/src/components/dark-image-source.directive.ts +++ b/libs/vault/src/components/dark-image-source.directive.ts @@ -24,7 +24,6 @@ import { ThemeStateService } from "@bitwarden/common/platform/theming/theme-stat */ @Directive({ selector: "[appDarkImgSrc]", - standalone: true, }) export class DarkImageSourceDirective implements OnInit { private themeService = inject(ThemeStateService); diff --git a/libs/vault/src/components/decryption-failure-dialog/decryption-failure-dialog.component.ts b/libs/vault/src/components/decryption-failure-dialog/decryption-failure-dialog.component.ts index cbddcc24dc0..91b1cef364c 100644 --- a/libs/vault/src/components/decryption-failure-dialog/decryption-failure-dialog.component.ts +++ b/libs/vault/src/components/decryption-failure-dialog/decryption-failure-dialog.component.ts @@ -20,7 +20,6 @@ export type DecryptionFailureDialogParams = { }; @Component({ - standalone: true, selector: "vault-decryption-failure-dialog", templateUrl: "./decryption-failure-dialog.component.html", imports: [ diff --git a/libs/vault/src/components/download-attachment/download-attachment.component.ts b/libs/vault/src/components/download-attachment/download-attachment.component.ts index f06d6db582a..e4c0c253f4f 100644 --- a/libs/vault/src/components/download-attachment/download-attachment.component.ts +++ b/libs/vault/src/components/download-attachment/download-attachment.component.ts @@ -17,7 +17,6 @@ import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view"; import { AsyncActionsModule, IconButtonModule, ToastService } from "@bitwarden/components"; @Component({ - standalone: true, selector: "app-download-attachment", templateUrl: "./download-attachment.component.html", imports: [AsyncActionsModule, CommonModule, JslibModule, IconButtonModule], diff --git a/libs/vault/src/components/org-icon.directive.ts b/libs/vault/src/components/org-icon.directive.ts index 69a19b46c65..d9c8f240474 100644 --- a/libs/vault/src/components/org-icon.directive.ts +++ b/libs/vault/src/components/org-icon.directive.ts @@ -5,7 +5,6 @@ import { ProductTierType } from "@bitwarden/common/billing/enums"; export type OrgIconSize = "default" | "small" | "large"; @Directive({ - standalone: true, selector: "[appOrgIcon]", }) export class OrgIconDirective { diff --git a/libs/vault/src/components/password-history-view/password-history-view.component.ts b/libs/vault/src/components/password-history-view/password-history-view.component.ts index 0f3c54d9d2b..427644f3e77 100644 --- a/libs/vault/src/components/password-history-view/password-history-view.component.ts +++ b/libs/vault/src/components/password-history-view/password-history-view.component.ts @@ -11,7 +11,6 @@ import { ItemModule, ColorPasswordModule, IconButtonModule } from "@bitwarden/co @Component({ selector: "vault-password-history-view", templateUrl: "./password-history-view.component.html", - standalone: true, imports: [CommonModule, ItemModule, ColorPasswordModule, IconButtonModule, JslibModule], }) export class PasswordHistoryViewComponent implements OnInit { diff --git a/libs/vault/src/components/password-history/password-history.component.ts b/libs/vault/src/components/password-history/password-history.component.ts index 5af785d1a70..7845edb2369 100644 --- a/libs/vault/src/components/password-history/password-history.component.ts +++ b/libs/vault/src/components/password-history/password-history.component.ts @@ -29,7 +29,6 @@ export interface ViewPasswordHistoryDialogParams { @Component({ selector: "app-vault-password-history", templateUrl: "password-history.component.html", - standalone: true, imports: [ ButtonModule, CommonModule, diff --git a/libs/vault/src/components/password-reprompt.component.ts b/libs/vault/src/components/password-reprompt.component.ts index 11decbd4e65..7665b22be49 100644 --- a/libs/vault/src/components/password-reprompt.component.ts +++ b/libs/vault/src/components/password-reprompt.component.ts @@ -23,7 +23,6 @@ import { KeyService } from "@bitwarden/key-management"; * See UserVerificationComponent for any other situation where you need to verify the user's identity. */ @Component({ - standalone: true, selector: "vault-password-reprompt", imports: [ JslibModule, diff --git a/libs/vault/src/components/totp-countdown/totp-countdown.component.ts b/libs/vault/src/components/totp-countdown/totp-countdown.component.ts index 08587cbb9fa..c634b1165d9 100644 --- a/libs/vault/src/components/totp-countdown/totp-countdown.component.ts +++ b/libs/vault/src/components/totp-countdown/totp-countdown.component.ts @@ -12,7 +12,6 @@ import { TypographyModule } from "@bitwarden/components"; @Component({ selector: "[bitTotpCountdown]", templateUrl: "totp-countdown.component.html", - standalone: true, imports: [CommonModule, TypographyModule], }) export class BitTotpCountdownComponent implements OnInit { diff --git a/libs/vault/tsconfig.json b/libs/vault/tsconfig.json index 6039dccd811..9c607a26b09 100644 --- a/libs/vault/tsconfig.json +++ b/libs/vault/tsconfig.json @@ -1,26 +1,5 @@ { - "extends": "../shared/tsconfig", - "compilerOptions": { - "resolveJsonModule": true, - "paths": { - "@bitwarden/admin-console/common": ["../admin-console/src/common"], - "@bitwarden/angular/*": ["../angular/src/*"], - "@bitwarden/auth/common": ["../auth/src/common"], - "@bitwarden/common/*": ["../common/src/*"], - "@bitwarden/components": ["../components/src"], - "@bitwarden/importer-ui": ["../importer/src/components"], - "@bitwarden/generator-components": ["../tools/generator/components/src"], - "@bitwarden/generator-core": ["../tools/generator/core/src"], - "@bitwarden/generator-history": ["../tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["../tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["../tools/generator/extensions/navigation/src"], - "@bitwarden/vault-export-core": ["../tools/export/vault-export/vault-export-core/src"], - "@bitwarden/key-management": ["../key-management/src"], - "@bitwarden/platform": ["../platform/src"], - "@bitwarden/ui-common": ["../ui/common/src"], - "@bitwarden/vault": ["../vault/src"] - } - }, + "extends": "../../tsconfig.base", "include": ["src", "spec"], "exclude": ["node_modules", "dist"] } diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 18ce94164c9..c346fdde300 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -1,7 +1,6 @@ { - "extends": "../libs/shared/tsconfig", + "extends": "../tsconfig.base", "compilerOptions": { - "strict": true, "outDir": "dist", "module": "NodeNext", "moduleResolution": "NodeNext", diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 00000000000..7053ec66aa4 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,59 @@ +{ + "compilerOptions": { + "strict": false, + "pretty": true, + "moduleResolution": "node", + "noImplicitAny": true, + "target": "ES2016", + "module": "ES2020", + "lib": ["es5", "es6", "es7", "dom", "ES2021", "ESNext.Disposable"], + "sourceMap": true, + "allowSyntheticDefaultImports": true, + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "declaration": false, + "outDir": "dist", + "baseUrl": ".", + "resolveJsonModule": true, + "allowJs": true, + "sourceMap": true, + "skipLibCheck": true, + "paths": { + "@bitwarden/admin-console/common": ["./libs/admin-console/src/common"], + "@bitwarden/angular/*": ["./libs/angular/src/*"], + "@bitwarden/auth/angular": ["./libs/auth/src/angular"], + "@bitwarden/auth/common": ["./libs/auth/src/common"], + "@bitwarden/billing": ["./libs/billing/src"], + "@bitwarden/bit-common/*": ["./bitwarden_license/bit-common/src/*"], + "@bitwarden/cli/*": ["./apps/cli/src/*"], + "@bitwarden/common/*": ["./libs/common/src/*"], + "@bitwarden/components": ["./libs/components/src"], + "@bitwarden/dirt-card": ["./libs/dirt/card/src"], + "@bitwarden/generator-components": ["./libs/tools/generator/components/src"], + "@bitwarden/generator-core": ["./libs/tools/generator/core/src"], + "@bitwarden/generator-history": ["./libs/tools/generator/extensions/history/src"], + "@bitwarden/generator-legacy": ["./libs/tools/generator/extensions/legacy/src"], + "@bitwarden/generator-navigation": ["./libs/tools/generator/extensions/navigation/src"], + "@bitwarden/importer-core": ["./libs/importer/src"], + "@bitwarden/importer-ui": ["./libs/importer/src/components"], + "@bitwarden/key-management": ["./libs/key-management/src"], + "@bitwarden/key-management-ui": ["./libs/key-management-ui/src"], + "@bitwarden/node/*": ["./libs/node/src/*"], + "@bitwarden/platform": ["./libs/platform/src"], + "@bitwarden/platform/*": ["./libs/platform/src/*"], + "@bitwarden/send-ui": ["./libs/tools/send/send-ui/src"], + "@bitwarden/ui-common": ["./libs/ui/common/src"], + "@bitwarden/ui-common/setup-jest": ["./libs/ui/common/src/setup-jest"], + "@bitwarden/vault-export-core": ["./libs/tools/export/vault-export/vault-export-core/src"], + "@bitwarden/vault-export-ui": ["./libs/tools/export/vault-export/vault-export-ui/src"], + "@bitwarden/vault": ["./libs/vault/src"], + "@bitwarden/web-vault/*": ["./apps/web/src/*"] + }, + "plugins": [ + { + "name": "typescript-strict-plugin" + } + ], + "useDefineForClassFields": false + } +} diff --git a/tsconfig.json b/tsconfig.json index 525af0ac3b7..35200efa430 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,57 +1,5 @@ { - "compilerOptions": { - "strict": false, - "pretty": true, - "moduleResolution": "node", - "noImplicitAny": true, - "target": "ES2016", - "module": "ES2020", - "lib": ["es5", "es6", "es7", "dom", "ES2021", "ESNext.Disposable"], - "sourceMap": true, - "allowSyntheticDefaultImports": true, - "experimentalDecorators": true, - "emitDecoratorMetadata": true, - "declaration": false, - "outDir": "dist", - "baseUrl": ".", - "resolveJsonModule": true, - "paths": { - "@bitwarden/admin-console/common": ["./libs/admin-console/src/common"], - "@bitwarden/angular/*": ["./libs/angular/src/*"], - "@bitwarden/auth/angular": ["./libs/auth/src/angular"], - "@bitwarden/auth/common": ["./libs/auth/src/common"], - "@bitwarden/billing": ["./libs/billing/src"], - "@bitwarden/bit-common/*": ["./bitwarden_license/bit-common/src/*"], - "@bitwarden/common/*": ["./libs/common/src/*"], - "@bitwarden/components": ["./libs/components/src"], - "@bitwarden/dirt-card": ["./libs/dirt/card/src"], - "@bitwarden/generator-components": ["./libs/tools/generator/components/src"], - "@bitwarden/generator-core": ["./libs/tools/generator/core/src"], - "@bitwarden/generator-history": ["./libs/tools/generator/extensions/history/src"], - "@bitwarden/generator-legacy": ["./libs/tools/generator/extensions/legacy/src"], - "@bitwarden/generator-navigation": ["./libs/tools/generator/extensions/navigation/src"], - "@bitwarden/importer-core": ["./libs/importer/src"], - "@bitwarden/importer-ui": ["./libs/importer/src/components"], - "@bitwarden/key-management": ["./libs/key-management/src"], - "@bitwarden/key-management-ui": ["./libs/key-management-ui/src"], - "@bitwarden/node/*": ["./libs/node/src/*"], - "@bitwarden/platform": ["./libs/platform/src"], - "@bitwarden/platform/*": ["./libs/platform/src/*"], - "@bitwarden/send-ui": ["./libs/tools/send/send-ui/src"], - "@bitwarden/ui-common": ["./libs/ui/common/src"], - "@bitwarden/ui-common/setup-jest": ["./libs/ui/common/src/setup-jest"], - "@bitwarden/vault-export-core": ["./libs/tools/export/vault-export/vault-export-core/src"], - "@bitwarden/vault-export-ui": ["./libs/tools/export/vault-export/vault-export-ui/src"], - "@bitwarden/vault": ["./libs/vault/src"], - "@bitwarden/web-vault/*": ["./apps/web/src/*"] - }, - "plugins": [ - { - "name": "typescript-strict-plugin" - } - ], - "useDefineForClassFields": false - }, + "extends": "./tsconfig.base.json", "include": [ "apps/web/src/**/*", "apps/browser/src/**/*",