mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
Upgrade angular & friends (v15.2.9 ⮕ v16.2.12) (#424)
* Upgrade @angular packages to 16.2.12 Upgrade a webpack package * Rebuild package-lock.json * Remove use of deprecated Guard interfaces Update route guards to use mapToCanActivate
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot } from "@angular/router";
|
||||
import { ActivatedRouteSnapshot, Router, RouterStateSnapshot } from "@angular/router";
|
||||
|
||||
import { KeyConnectorService } from "@/jslib/common/src/abstractions/keyConnector.service";
|
||||
import { MessagingService } from "@/jslib/common/src/abstractions/messaging.service";
|
||||
@@ -7,7 +7,7 @@ import { StateService } from "@/jslib/common/src/abstractions/state.service";
|
||||
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
||||
|
||||
@Injectable()
|
||||
export class AuthGuardService implements CanActivate {
|
||||
export class AuthGuardService {
|
||||
constructor(
|
||||
private vaultTimeoutService: VaultTimeoutService,
|
||||
private router: Router,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { CanActivate, Router } from "@angular/router";
|
||||
import { Router } from "@angular/router";
|
||||
|
||||
import { StateService } from "@/jslib/common/src/abstractions/state.service";
|
||||
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
||||
|
||||
@Injectable()
|
||||
export class LockGuardService implements CanActivate {
|
||||
export class LockGuardService {
|
||||
protected homepage = "vault";
|
||||
protected loginpage = "login";
|
||||
constructor(
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { CanActivate, Router } from "@angular/router";
|
||||
import { Router } from "@angular/router";
|
||||
|
||||
import { StateService } from "@/jslib/common/src/abstractions/state.service";
|
||||
import { VaultTimeoutService } from "@/jslib/common/src/abstractions/vaultTimeout.service";
|
||||
|
||||
@Injectable()
|
||||
export class UnauthGuardService implements CanActivate {
|
||||
export class UnauthGuardService {
|
||||
protected homepage = "vault";
|
||||
constructor(
|
||||
private vaultTimeoutService: VaultTimeoutService,
|
||||
|
||||
4653
package-lock.json
generated
4653
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -70,14 +70,12 @@
|
||||
"test:types": "npx tsc --noEmit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "15.2.9",
|
||||
"@angular-eslint/eslint-plugin-template": "17.2.0",
|
||||
"@angular-eslint/template-parser": "17.2.0",
|
||||
"@angular/compiler-cli": "15.2.9",
|
||||
"@angular/platform-browser-dynamic": "15.2.9",
|
||||
"@angular/compiler-cli": "16.2.12",
|
||||
"@fluffy-spoon/substitute": "1.208.0",
|
||||
"@microsoft/microsoft-graph-types": "2.40.0",
|
||||
"@ngtools/webpack": "15.2.9",
|
||||
"@ngtools/webpack": "16.2.12",
|
||||
"@types/inquirer": "8.2.6",
|
||||
"@types/jest": "29.5.11",
|
||||
"@types/ldapjs": "2.2.5",
|
||||
@@ -140,15 +138,15 @@
|
||||
"zone.js": "0.13.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@angular/animations": "15.2.9",
|
||||
"@angular/animations": "16.2.12",
|
||||
"@angular/cdk": "15.2.9",
|
||||
"@angular/common": "15.2.9",
|
||||
"@angular/compiler": "15.2.9",
|
||||
"@angular/core": "15.2.9",
|
||||
"@angular/forms": "15.2.9",
|
||||
"@angular/platform-browser": "15.2.9",
|
||||
"@angular/platform-browser-dynamic": "15.2.9",
|
||||
"@angular/router": "15.2.9",
|
||||
"@angular/common": "16.2.12",
|
||||
"@angular/compiler": "16.2.12",
|
||||
"@angular/core": "16.2.12",
|
||||
"@angular/forms": "16.2.12",
|
||||
"@angular/platform-browser": "16.2.12",
|
||||
"@angular/platform-browser-dynamic": "16.2.12",
|
||||
"@angular/router": "16.2.12",
|
||||
"@microsoft/microsoft-graph-client": "3.0.7",
|
||||
"@microsoft/signalr": "7.0.10",
|
||||
"@microsoft/signalr-protocol-msgpack": "7.0.10",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
import { RouterModule, Routes } from "@angular/router";
|
||||
import { RouterModule, Routes, mapToCanActivate } from "@angular/router";
|
||||
|
||||
import { ApiKeyComponent } from "./accounts/apiKey.component";
|
||||
import { AuthGuardService } from "./services/auth-guard.service";
|
||||
@@ -14,7 +14,7 @@ const routes: Routes = [
|
||||
{
|
||||
path: "login",
|
||||
component: ApiKeyComponent,
|
||||
canActivate: [LaunchGuardService],
|
||||
canActivate: mapToCanActivate([LaunchGuardService]),
|
||||
},
|
||||
{
|
||||
path: "tabs",
|
||||
@@ -28,17 +28,17 @@ const routes: Routes = [
|
||||
{
|
||||
path: "dashboard",
|
||||
component: DashboardComponent,
|
||||
canActivate: [AuthGuardService],
|
||||
canActivate: mapToCanActivate([AuthGuardService]),
|
||||
},
|
||||
{
|
||||
path: "settings",
|
||||
component: SettingsComponent,
|
||||
canActivate: [AuthGuardService],
|
||||
canActivate: mapToCanActivate([AuthGuardService]),
|
||||
},
|
||||
{
|
||||
path: "more",
|
||||
component: MoreComponent,
|
||||
canActivate: [AuthGuardService],
|
||||
canActivate: mapToCanActivate([AuthGuardService]),
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { CanActivate } from "@angular/router";
|
||||
|
||||
import { MessagingService } from "@/jslib/common/src/abstractions/messaging.service";
|
||||
|
||||
import { StateService } from "../../abstractions/state.service";
|
||||
|
||||
@Injectable()
|
||||
export class AuthGuardService implements CanActivate {
|
||||
export class AuthGuardService {
|
||||
constructor(
|
||||
private stateService: StateService,
|
||||
private messagingService: MessagingService,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { CanActivate, Router } from "@angular/router";
|
||||
import { Router } from "@angular/router";
|
||||
|
||||
import { StateService } from "../../abstractions/state.service";
|
||||
|
||||
@Injectable()
|
||||
export class LaunchGuardService implements CanActivate {
|
||||
export class LaunchGuardService {
|
||||
constructor(
|
||||
private stateService: StateService,
|
||||
private router: Router,
|
||||
|
||||
Reference in New Issue
Block a user