From c7f85504c55dc987defe9a24cd0852a144a07163 Mon Sep 17 00:00:00 2001 From: Oscar Hinton Date: Thu, 29 Sep 2022 14:56:52 +0200 Subject: [PATCH] [SM-254] Rename web vault imports from src to web-vault (#3626) --- apps/web/.eslintrc.json | 2 +- apps/web/tsconfig.json | 2 +- bitwarden_license/bit-web/src/app/app.component.ts | 2 +- bitwarden_license/bit-web/src/app/app.module.ts | 9 ++++----- .../app/organizations/organizations-routing.module.ts | 7 +++---- .../src/app/organizations/organizations.module.ts | 2 +- .../policies/disable-personal-vault-export.component.ts | 3 +-- .../src/app/policies/maximum-vault-timeout.component.ts | 3 +-- .../providers/clients/create-organization.component.ts | 2 +- .../app/providers/manage/accept-provider.component.ts | 3 +-- .../app/providers/manage/bulk/bulk-confirm.component.ts | 5 ++--- .../app/providers/manage/bulk/bulk-remove.component.ts | 3 +-- .../bit-web/src/app/providers/manage/events.component.ts | 5 ++--- .../bit-web/src/app/providers/manage/people.component.ts | 7 +++---- .../src/app/providers/providers-routing.module.ts | 5 ++--- .../bit-web/src/app/providers/providers.module.ts | 3 +-- .../src/app/providers/setup/setup-provider.component.ts | 2 +- bitwarden_license/bit-web/src/app/sm/sm.module.ts | 2 +- bitwarden_license/bit-web/src/main.ts | 4 ++-- bitwarden_license/bit-web/tsconfig.json | 1 + 20 files changed, 31 insertions(+), 41 deletions(-) diff --git a/apps/web/.eslintrc.json b/apps/web/.eslintrc.json index 0cc672cc6e..b752b4be21 100644 --- a/apps/web/.eslintrc.json +++ b/apps/web/.eslintrc.json @@ -6,7 +6,7 @@ "no-restricted-imports": [ "error", { - "patterns": ["**/app/core/*", "**/reports/*", "**/app/shared/*"] + "patterns": ["**/app/core/*", "**/reports/*", "**/app/shared/*", "@bitwarden/web-vault/*"] } ] } diff --git a/apps/web/tsconfig.json b/apps/web/tsconfig.json index a27bc65afb..3e1d962f92 100644 --- a/apps/web/tsconfig.json +++ b/apps/web/tsconfig.json @@ -6,7 +6,7 @@ "resolveJsonModule": true, "paths": { "tldjs": ["../../libs/common/src/misc/tldjs.noop"], - "src/*": ["src/*"], + "@bitwarden/web-vault/*": ["src/*"], "@bitwarden/common/*": ["../../libs/common/src/*"], "@bitwarden/angular/*": ["../../libs/angular/src/*"], "@bitwarden/components": ["../../libs/components/src"] diff --git a/bitwarden_license/bit-web/src/app/app.component.ts b/bitwarden_license/bit-web/src/app/app.component.ts index 5f7fd544a2..a66456cc33 100644 --- a/bitwarden_license/bit-web/src/app/app.component.ts +++ b/bitwarden_license/bit-web/src/app/app.component.ts @@ -1,6 +1,6 @@ import { Component } from "@angular/core"; -import { AppComponent as BaseAppComponent } from "src/app/app.component"; +import { AppComponent as BaseAppComponent } from "@bitwarden/web-vault/app/app.component"; import { DisablePersonalVaultExportPolicy } from "./policies/disable-personal-vault-export.component"; import { MaximumVaultTimeoutPolicy } from "./policies/maximum-vault-timeout.component"; diff --git a/bitwarden_license/bit-web/src/app/app.module.ts b/bitwarden_license/bit-web/src/app/app.module.ts index e681744c51..c26b04ff30 100644 --- a/bitwarden_license/bit-web/src/app/app.module.ts +++ b/bitwarden_license/bit-web/src/app/app.module.ts @@ -7,11 +7,10 @@ import { RouterModule } from "@angular/router"; import { InfiniteScrollModule } from "ngx-infinite-scroll"; import { JslibModule } from "@bitwarden/angular/jslib.module"; - -import { CoreModule } from "src/app/core"; -import { OssRoutingModule } from "src/app/oss-routing.module"; -import { OssModule } from "src/app/oss.module"; -import { WildcardRoutingModule } from "src/app/wildcard-routing.module"; +import { CoreModule } from "@bitwarden/web-vault/app/core"; +import { OssRoutingModule } from "@bitwarden/web-vault/app/oss-routing.module"; +import { OssModule } from "@bitwarden/web-vault/app/oss.module"; +import { WildcardRoutingModule } from "@bitwarden/web-vault/app/wildcard-routing.module"; import { AppRoutingModule } from "./app-routing.module"; import { AppComponent } from "./app.component"; diff --git a/bitwarden_license/bit-web/src/app/organizations/organizations-routing.module.ts b/bitwarden_license/bit-web/src/app/organizations/organizations-routing.module.ts index 3127d328af..1909472139 100644 --- a/bitwarden_license/bit-web/src/app/organizations/organizations-routing.module.ts +++ b/bitwarden_license/bit-web/src/app/organizations/organizations-routing.module.ts @@ -4,10 +4,9 @@ import { RouterModule, Routes } from "@angular/router"; import { AuthGuard } from "@bitwarden/angular/guards/auth.guard"; import { canAccessManageTab } from "@bitwarden/common/abstractions/organization/organization.service.abstraction"; import { Organization } from "@bitwarden/common/models/domain/organization"; - -import { OrganizationPermissionsGuard } from "src/app/organizations/guards/org-permissions.guard"; -import { OrganizationLayoutComponent } from "src/app/organizations/layouts/organization-layout.component"; -import { ManageComponent } from "src/app/organizations/manage/manage.component"; +import { OrganizationPermissionsGuard } from "@bitwarden/web-vault/app/organizations/guards/org-permissions.guard"; +import { OrganizationLayoutComponent } from "@bitwarden/web-vault/app/organizations/layouts/organization-layout.component"; +import { ManageComponent } from "@bitwarden/web-vault/app/organizations/manage/manage.component"; import { ScimComponent } from "./manage/scim.component"; import { SsoComponent } from "./manage/sso.component"; diff --git a/bitwarden_license/bit-web/src/app/organizations/organizations.module.ts b/bitwarden_license/bit-web/src/app/organizations/organizations.module.ts index e95a0ba030..b9797e83e2 100644 --- a/bitwarden_license/bit-web/src/app/organizations/organizations.module.ts +++ b/bitwarden_license/bit-web/src/app/organizations/organizations.module.ts @@ -1,6 +1,6 @@ import { NgModule } from "@angular/core"; -import { SharedModule } from "src/app/shared/shared.module"; +import { SharedModule } from "@bitwarden/web-vault/app/shared/shared.module"; import { InputCheckboxComponent } from "./components/input-checkbox.component"; import { InputTextReadOnlyComponent } from "./components/input-text-readonly.component"; diff --git a/bitwarden_license/bit-web/src/app/policies/disable-personal-vault-export.component.ts b/bitwarden_license/bit-web/src/app/policies/disable-personal-vault-export.component.ts index 1633655743..bd43b56afe 100644 --- a/bitwarden_license/bit-web/src/app/policies/disable-personal-vault-export.component.ts +++ b/bitwarden_license/bit-web/src/app/policies/disable-personal-vault-export.component.ts @@ -1,11 +1,10 @@ import { Component } from "@angular/core"; import { PolicyType } from "@bitwarden/common/enums/policyType"; - import { BasePolicy, BasePolicyComponent, -} from "src/app/organizations/policies/base-policy.component"; +} from "@bitwarden/web-vault/app/organizations/policies/base-policy.component"; export class DisablePersonalVaultExportPolicy extends BasePolicy { name = "disablePersonalVaultExport"; diff --git a/bitwarden_license/bit-web/src/app/policies/maximum-vault-timeout.component.ts b/bitwarden_license/bit-web/src/app/policies/maximum-vault-timeout.component.ts index bacd652a40..45aa36037a 100644 --- a/bitwarden_license/bit-web/src/app/policies/maximum-vault-timeout.component.ts +++ b/bitwarden_license/bit-web/src/app/policies/maximum-vault-timeout.component.ts @@ -4,11 +4,10 @@ import { UntypedFormBuilder } from "@angular/forms"; import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { PolicyType } from "@bitwarden/common/enums/policyType"; import { PolicyRequest } from "@bitwarden/common/models/request/policyRequest"; - import { BasePolicy, BasePolicyComponent, -} from "src/app/organizations/policies/base-policy.component"; +} from "@bitwarden/web-vault/app/organizations/policies/base-policy.component"; export class MaximumVaultTimeoutPolicy extends BasePolicy { name = "maximumVaultTimeout"; diff --git a/bitwarden_license/bit-web/src/app/providers/clients/create-organization.component.ts b/bitwarden_license/bit-web/src/app/providers/clients/create-organization.component.ts index 79aafff50e..64d746d0a1 100644 --- a/bitwarden_license/bit-web/src/app/providers/clients/create-organization.component.ts +++ b/bitwarden_license/bit-web/src/app/providers/clients/create-organization.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, ViewChild } from "@angular/core"; import { ActivatedRoute } from "@angular/router"; -import { OrganizationPlansComponent } from "src/app/settings/organization-plans.component"; +import { OrganizationPlansComponent } from "@bitwarden/web-vault/app/settings/organization-plans.component"; @Component({ selector: "app-create-organization", diff --git a/bitwarden_license/bit-web/src/app/providers/manage/accept-provider.component.ts b/bitwarden_license/bit-web/src/app/providers/manage/accept-provider.component.ts index 148995134c..104a8d0b91 100644 --- a/bitwarden_license/bit-web/src/app/providers/manage/accept-provider.component.ts +++ b/bitwarden_license/bit-web/src/app/providers/manage/accept-provider.component.ts @@ -6,8 +6,7 @@ import { I18nService } from "@bitwarden/common/abstractions/i18n.service"; import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { StateService } from "@bitwarden/common/abstractions/state.service"; import { ProviderUserAcceptRequest } from "@bitwarden/common/models/request/provider/providerUserAcceptRequest"; - -import { BaseAcceptComponent } from "src/app/common/base.accept.component"; +import { BaseAcceptComponent } from "@bitwarden/web-vault/app/common/base.accept.component"; @Component({ selector: "app-accept-provider", diff --git a/bitwarden_license/bit-web/src/app/providers/manage/bulk/bulk-confirm.component.ts b/bitwarden_license/bit-web/src/app/providers/manage/bulk/bulk-confirm.component.ts index f2ab04b9cd..1a142e76eb 100644 --- a/bitwarden_license/bit-web/src/app/providers/manage/bulk/bulk-confirm.component.ts +++ b/bitwarden_license/bit-web/src/app/providers/manage/bulk/bulk-confirm.component.ts @@ -3,9 +3,8 @@ import { Component, Input } from "@angular/core"; import { ProviderUserStatusType } from "@bitwarden/common/enums/providerUserStatusType"; import { ProviderUserBulkConfirmRequest } from "@bitwarden/common/models/request/provider/providerUserBulkConfirmRequest"; import { ProviderUserBulkRequest } from "@bitwarden/common/models/request/provider/providerUserBulkRequest"; - -import { BulkConfirmComponent as OrganizationBulkConfirmComponent } from "src/app/organizations/manage/bulk/bulk-confirm.component"; -import { BulkUserDetails } from "src/app/organizations/manage/bulk/bulk-status.component"; +import { BulkConfirmComponent as OrganizationBulkConfirmComponent } from "@bitwarden/web-vault/app/organizations/manage/bulk/bulk-confirm.component"; +import { BulkUserDetails } from "@bitwarden/web-vault/app/organizations/manage/bulk/bulk-status.component"; @Component({ templateUrl: diff --git a/bitwarden_license/bit-web/src/app/providers/manage/bulk/bulk-remove.component.ts b/bitwarden_license/bit-web/src/app/providers/manage/bulk/bulk-remove.component.ts index 3bc70541f0..ea991fba0d 100644 --- a/bitwarden_license/bit-web/src/app/providers/manage/bulk/bulk-remove.component.ts +++ b/bitwarden_license/bit-web/src/app/providers/manage/bulk/bulk-remove.component.ts @@ -1,8 +1,7 @@ import { Component, Input } from "@angular/core"; import { ProviderUserBulkRequest } from "@bitwarden/common/models/request/provider/providerUserBulkRequest"; - -import { BulkRemoveComponent as OrganizationBulkRemoveComponent } from "src/app/organizations/manage/bulk/bulk-remove.component"; +import { BulkRemoveComponent as OrganizationBulkRemoveComponent } from "@bitwarden/web-vault/app/organizations/manage/bulk/bulk-remove.component"; @Component({ templateUrl: diff --git a/bitwarden_license/bit-web/src/app/providers/manage/events.component.ts b/bitwarden_license/bit-web/src/app/providers/manage/events.component.ts index 6806f156fe..ca3a186cf2 100644 --- a/bitwarden_license/bit-web/src/app/providers/manage/events.component.ts +++ b/bitwarden_license/bit-web/src/app/providers/manage/events.component.ts @@ -10,9 +10,8 @@ import { LogService } from "@bitwarden/common/abstractions/log.service"; import { PlatformUtilsService } from "@bitwarden/common/abstractions/platformUtils.service"; import { ProviderService } from "@bitwarden/common/abstractions/provider.service"; import { EventResponse } from "@bitwarden/common/models/response/eventResponse"; - -import { BaseEventsComponent } from "src/app/common/base.events.component"; -import { EventService } from "src/app/core"; +import { BaseEventsComponent } from "@bitwarden/web-vault/app/common/base.events.component"; +import { EventService } from "@bitwarden/web-vault/app/core"; @Component({ selector: "provider-events", diff --git a/bitwarden_license/bit-web/src/app/providers/manage/people.component.ts b/bitwarden_license/bit-web/src/app/providers/manage/people.component.ts index 2847009028..2ffd0e7a53 100644 --- a/bitwarden_license/bit-web/src/app/providers/manage/people.component.ts +++ b/bitwarden_license/bit-web/src/app/providers/manage/people.component.ts @@ -21,10 +21,9 @@ import { ProviderUserConfirmRequest } from "@bitwarden/common/models/request/pro import { ListResponse } from "@bitwarden/common/models/response/listResponse"; import { ProviderUserBulkResponse } from "@bitwarden/common/models/response/provider/providerUserBulkResponse"; import { ProviderUserUserDetailsResponse } from "@bitwarden/common/models/response/provider/providerUserResponse"; - -import { BasePeopleComponent } from "src/app/common/base.people.component"; -import { BulkStatusComponent } from "src/app/organizations/manage/bulk/bulk-status.component"; -import { EntityEventsComponent } from "src/app/organizations/manage/entity-events.component"; +import { BasePeopleComponent } from "@bitwarden/web-vault/app/common/base.people.component"; +import { BulkStatusComponent } from "@bitwarden/web-vault/app/organizations/manage/bulk/bulk-status.component"; +import { EntityEventsComponent } from "@bitwarden/web-vault/app/organizations/manage/entity-events.component"; import { BulkConfirmComponent } from "./bulk/bulk-confirm.component"; import { BulkRemoveComponent } from "./bulk/bulk-remove.component"; diff --git a/bitwarden_license/bit-web/src/app/providers/providers-routing.module.ts b/bitwarden_license/bit-web/src/app/providers/providers-routing.module.ts index 6090ed8c70..1d3f79c43e 100644 --- a/bitwarden_license/bit-web/src/app/providers/providers-routing.module.ts +++ b/bitwarden_license/bit-web/src/app/providers/providers-routing.module.ts @@ -3,9 +3,8 @@ import { RouterModule, Routes } from "@angular/router"; import { AuthGuard } from "@bitwarden/angular/guards/auth.guard"; import { Provider } from "@bitwarden/common/models/domain/provider"; - -import { FrontendLayoutComponent } from "src/app/layouts/frontend-layout.component"; -import { ProvidersComponent } from "src/app/providers/providers.component"; +import { FrontendLayoutComponent } from "@bitwarden/web-vault/app/layouts/frontend-layout.component"; +import { ProvidersComponent } from "@bitwarden/web-vault/app/providers/providers.component"; import { ClientsComponent } from "./clients/clients.component"; import { CreateOrganizationComponent } from "./clients/create-organization.component"; diff --git a/bitwarden_license/bit-web/src/app/providers/providers.module.ts b/bitwarden_license/bit-web/src/app/providers/providers.module.ts index 7cc3210a71..99545b258a 100644 --- a/bitwarden_license/bit-web/src/app/providers/providers.module.ts +++ b/bitwarden_license/bit-web/src/app/providers/providers.module.ts @@ -4,8 +4,7 @@ import { FormsModule } from "@angular/forms"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { ModalService } from "@bitwarden/angular/services/modal.service"; - -import { OssModule } from "src/app/oss.module"; +import { OssModule } from "@bitwarden/web-vault/app/oss.module"; import { AddOrganizationComponent } from "./clients/add-organization.component"; import { ClientsComponent } from "./clients/clients.component"; diff --git a/bitwarden_license/bit-web/src/app/providers/setup/setup-provider.component.ts b/bitwarden_license/bit-web/src/app/providers/setup/setup-provider.component.ts index 248133fbf9..0490b6c6ec 100644 --- a/bitwarden_license/bit-web/src/app/providers/setup/setup-provider.component.ts +++ b/bitwarden_license/bit-web/src/app/providers/setup/setup-provider.component.ts @@ -1,7 +1,7 @@ import { Component } from "@angular/core"; import { Params } from "@angular/router"; -import { BaseAcceptComponent } from "src/app/common/base.accept.component"; +import { BaseAcceptComponent } from "@bitwarden/web-vault/app/common/base.accept.component"; @Component({ selector: "app-setup-provider", diff --git a/bitwarden_license/bit-web/src/app/sm/sm.module.ts b/bitwarden_license/bit-web/src/app/sm/sm.module.ts index 1032b8de05..b87b961caf 100644 --- a/bitwarden_license/bit-web/src/app/sm/sm.module.ts +++ b/bitwarden_license/bit-web/src/app/sm/sm.module.ts @@ -1,6 +1,6 @@ import { NgModule } from "@angular/core"; -import { SharedModule } from "src/app/shared"; +import { SharedModule } from "@bitwarden/web-vault/app/shared"; import { LayoutComponent } from "./layout/layout.component"; import { NavigationComponent } from "./layout/navigation.component"; diff --git a/bitwarden_license/bit-web/src/main.ts b/bitwarden_license/bit-web/src/main.ts index aa0e9d4697..f3bf5608e8 100644 --- a/bitwarden_license/bit-web/src/main.ts +++ b/bitwarden_license/bit-web/src/main.ts @@ -5,8 +5,8 @@ import "bootstrap"; import "jquery"; import "popper.js"; -require("src/scss/styles.scss"); -require("src/scss/tailwind.css"); +require("@bitwarden/web-vault/scss/styles.scss"); +require("@bitwarden/web-vault/scss/tailwind.css"); import { AppModule } from "./app/app.module"; diff --git a/bitwarden_license/bit-web/tsconfig.json b/bitwarden_license/bit-web/tsconfig.json index 9a6a7f5b69..c9b3f43cb9 100644 --- a/bitwarden_license/bit-web/tsconfig.json +++ b/bitwarden_license/bit-web/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../../apps/web/tsconfig", "compilerOptions": { "paths": { + "@bitwarden/web-vault/*": ["../../apps/web/src/*"], "@bitwarden/common/*": ["../../libs/common/src/*"], "@bitwarden/angular/*": ["../../libs/angular/src/*"], "@bitwarden/components": ["../../libs/components/src"]