fix: update console deps (#9628)

# Which Problems Are Solved
Closes most of the dependabot alerts

# How the Problems Are Solved
Updating Versions as much as possible. Angular upgrade was left out on
purpose.

# Additional Changes
Some refactoring of unused code, which I stumbled upon looking at our
used deps.
This commit is contained in:
Ramon 2025-03-26 10:15:17 +01:00 committed by GitHub
parent febf410d80
commit b04babb4ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 343 additions and 1121 deletions

View File

@ -12,47 +12,43 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.2.5",
"@angular/cdk": "^16.2.4",
"@angular/common": "^16.2.5",
"@angular/compiler": "^16.2.5",
"@angular/core": "^16.2.5",
"@angular/forms": "^16.2.5",
"@angular/material": "^16.2.4",
"@angular/material-moment-adapter": "^16.2.4",
"@angular/platform-browser": "^16.2.5",
"@angular/platform-browser-dynamic": "^16.2.5",
"@angular/router": "^16.2.5",
"@angular/service-worker": "^16.2.5",
"@angular/animations": "^16.2.12",
"@angular/cdk": "^16.2.14",
"@angular/common": "^16.2.12",
"@angular/compiler": "^16.2.12",
"@angular/core": "^16.2.12",
"@angular/forms": "^16.2.12",
"@angular/material": "^16.2.14",
"@angular/material-moment-adapter": "^16.2.14",
"@angular/platform-browser": "^16.2.12",
"@angular/platform-browser-dynamic": "^16.2.12",
"@angular/router": "^16.2.12",
"@angular/service-worker": "^16.2.12",
"@connectrpc/connect": "^2.0.0",
"@connectrpc/connect-web": "^2.0.0",
"@ctrl/ngx-codemirror": "^6.1.0",
"@fortawesome/angular-fontawesome": "^0.13.0",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-brands-svg-icons": "^6.4.2",
"@grpc/grpc-js": "^1.11.2",
"@netlify/framework-info": "^9.8.13",
"@fortawesome/fontawesome-svg-core": "^6.7.2",
"@fortawesome/free-brands-svg-icons": "^6.7.2",
"@ngx-translate/core": "^15.0.0",
"@zitadel/client": "^1.0.7",
"@zitadel/proto": "^1.0.4",
"angular-oauth2-oidc": "^15.0.1",
"angularx-qrcode": "^16.0.0",
"angularx-qrcode": "^16.0.2",
"buffer": "^6.0.3",
"codemirror": "^5.65.8",
"cors": "^2.8.5",
"codemirror": "^5.65.19",
"file-saver": "^2.0.5",
"flag-icons": "^7.1.0",
"google-proto-files": "^4.0.0",
"google-protobuf": "^3.21.2",
"grpc-web": "^1.4.1",
"i18n-iso-countries": "^7.7.0",
"libphonenumber-js": "^1.11.8",
"material-design-icons-iconfont": "^6.1.1",
"moment": "^2.29.4",
"flag-icons": "^7.3.2",
"google-protobuf": "^3.21.4",
"grpc-web": "^1.5.0",
"i18n-iso-countries": "^7.14.0",
"libphonenumber-js": "^1.12.6",
"material-design-icons-iconfont": "^6.7.0",
"moment": "^2.30.1",
"ngx-color": "^9.0.0",
"opentype.js": "^1.3.4",
"posthog-js": "^1.191.0",
"rxjs": "~7.8.0",
"posthog-js": "^1.232.7",
"rxjs": "^7.8.2",
"tinycolor2": "^1.6.0",
"tslib": "^2.7.0",
"uuid": "^10.0.0",
@ -79,19 +75,18 @@
"@types/qrcode": "^1.5.2",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.60.1",
"codelyzer": "^6.0.2",
"eslint": "^8.50.0",
"jasmine-core": "~5.3.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.57.1",
"jasmine-core": "~5.6.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "^6.4.2",
"karma": "^6.4.4",
"karma-chrome-launcher": "^3.2.0",
"karma-coverage-istanbul-reporter": "^3.0.3",
"karma-jasmine": "^5.1.0",
"karma-jasmine-html-reporter": "^2.1.0",
"prettier": "^3.1.1",
"prettier-plugin-organize-imports": "^4.0.0",
"protractor": "~7.0.0",
"typescript": "5.1"
"prettier": "^3.5.3",
"prettier-plugin-organize-imports": "^4.1.0",
"typescript": "5.1",
"@netlify/framework-info": "^9.8.13"
}
}

View File

@ -1,23 +1,12 @@
import { CommonModule } from '@angular/common';
import { Component, EventEmitter, OnDestroy, OnInit, Output, effect, signal } from '@angular/core';
import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core';
import { ActivatedRoute, Params, RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import frameworkDefinition from '../../../../../docs/frameworks.json';
import { MatButtonModule } from '@angular/material/button';
import { listFrameworks, hasFramework, getFramework } from '@netlify/framework-info';
import { FrameworkName } from '@netlify/framework-info/lib/generated/frameworkNames';
import { FrameworkAutocompleteComponent } from '../framework-autocomplete/framework-autocomplete.component';
import { Framework } from '../quickstart/quickstart.component';
import { BehaviorSubject, Subject, takeUntil } from 'rxjs';
import {
MatDialog,
MatDialogActions,
MatDialogClose,
MatDialogContent,
MatDialogModule,
MatDialogRef,
MatDialogTitle,
} from '@angular/material/dialog';
import { MatDialog } from '@angular/material/dialog';
import { FrameworkChangeDialogComponent } from './framework-change-dialog.component';
@Component({
@ -25,12 +14,11 @@ import { FrameworkChangeDialogComponent } from './framework-change-dialog.compon
selector: 'cnsl-framework-change',
templateUrl: './framework-change.component.html',
styleUrls: ['./framework-change.component.scss'],
imports: [TranslateModule, RouterModule, CommonModule, MatButtonModule, FrameworkAutocompleteComponent],
imports: [TranslateModule, RouterModule, CommonModule, MatButtonModule],
})
export class FrameworkChangeComponent implements OnInit, OnDestroy {
private destroy$: Subject<void> = new Subject();
public framework: BehaviorSubject<Framework | undefined> = new BehaviorSubject<Framework | undefined>(undefined);
public showFrameworkAutocomplete = signal<boolean>(false);
@Output() public frameworkChanged: EventEmitter<Framework> = new EventEmitter();
public frameworks: Framework[] = frameworkDefinition.map((f) => {
return {

View File

@ -2,10 +2,8 @@ import { CommonModule } from '@angular/common';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import frameworkDefinition from '../../../../../docs/frameworks.json';
import { MatButtonModule } from '@angular/material/button';
import { listFrameworks, hasFramework, getFramework } from '@netlify/framework-info';
import { FrameworkName } from '@netlify/framework-info/lib/generated/frameworkNames';
import type { FrameworkName } from '@netlify/framework-info/lib/generated/frameworkNames';
import { AddOIDCAppRequest } from 'src/app/proto/generated/zitadel/management_pb';
export type FrameworkDefinition = {

View File

@ -4,8 +4,7 @@ import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';
import frameworkDefinition from '../../../../../docs/frameworks.json';
import { MatButtonModule } from '@angular/material/button';
import { listFrameworks, hasFramework, getFramework } from '@netlify/framework-info';
import { FrameworkName } from '@netlify/framework-info/lib/generated/frameworkNames';
import type { FrameworkName } from '@netlify/framework-info/lib/generated/frameworkNames';
import { OIDC_CONFIGURATIONS } from 'src/app/utils/framework';
export type FrameworkDefinition = {

View File

@ -71,14 +71,7 @@ const _MatInputBase = mixinErrorState(
})
export class InputDirective
extends _MatInputBase
implements
MatFormFieldControl<any>,
OnChanges,
CanUpdateErrorState,
OnDestroy,
AfterViewInit,
DoCheck,
CanUpdateErrorState
implements MatFormFieldControl<any>, OnChanges, CanUpdateErrorState, OnDestroy, AfterViewInit, DoCheck, CanUpdateErrorState
{
protected _uid: string = `cnsl-input-${nextUniqueId++}`;
protected _previousNativeValue: any;

View File

@ -1,5 +1,5 @@
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ColorEvent } from 'ngx-color';
import type { ColorEvent } from 'ngx-color';
import { BehaviorSubject, debounceTime } from 'rxjs';
import { ColorType } from '../private-labeling-policy.component';

View File

@ -46,7 +46,7 @@ import { RedirectUrisComponent } from './redirect-uris/redirect-uris.component';
import { IntegrateAppComponent } from './integrate/integrate.component';
import { OIDCConfigurationComponent } from 'src/app/components/oidc-configuration/oidc-configuration.component';
import { FrameworkChangeComponent } from 'src/app/components/framework-change/framework-change.component';
import { CopyRowComponent } from '../../../components/copy-row/copy-row.component';
import { CopyRowComponent } from 'src/app/components/copy-row/copy-row.component';
@NgModule({
declarations: [

View File

@ -1,7 +1,7 @@
import { Injectable, OnDestroy } from '@angular/core';
import { DestroyRef, Injectable, OnDestroy } from '@angular/core';
import { EnvironmentService } from './environment.service';
import { Subscription } from 'rxjs';
import posthog from 'posthog-js';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Injectable({
providedIn: 'root',
@ -9,17 +9,16 @@ import posthog from 'posthog-js';
export class PosthogService implements OnDestroy {
private posthogToken?: string;
private posthogUrl?: string;
private envSubscription: Subscription;
constructor(private envService: EnvironmentService) {
this.envSubscription = this.envService.env.subscribe((env) => {
constructor(envService: EnvironmentService, destroyRef: DestroyRef) {
envService.env.pipe(takeUntilDestroyed(destroyRef)).subscribe((env) => {
this.posthogToken = env.posthog_token;
this.posthogUrl = env.posthog_url;
this.init();
});
}
async init() {
init() {
if (this.posthogToken && this.posthogUrl) {
posthog.init(this.posthogToken, {
api_host: this.posthogUrl,
@ -34,10 +33,6 @@ export class PosthogService implements OnDestroy {
}
ngOnDestroy() {
if (this.envSubscription) {
this.envSubscription.unsubscribe();
}
posthog.reset();
}
}

View File

@ -1,6 +1,4 @@
import { Framework } from '@netlify/framework-info/lib/types';
import { AddOIDCAppRequest } from '../proto/generated/zitadel/management_pb';
import { FrameworkName } from '@netlify/framework-info/lib/generated/frameworkNames';
import { OIDCAppType, OIDCAuthMethodType, OIDCGrantType, OIDCResponseType } from '../proto/generated/zitadel/app_pb';
type OidcAppConfigurations = {

File diff suppressed because it is too large Load Diff