diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 000000000..d828d5c41 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +# +# git hook to run a command before actually committing when running `git commit`: +# + +ORANGE='\033[0;33m' +NC='\033[0m' # No Color + +log() { + printf "${ORANGE}[pre-commit]${NC} $1\n" +} + +log "Running custom pre-commit hook defined in ./husky/pre-commit" + +# Prevent committing to "main"-branch: +if [ "$(git rev-parse --abbrev-ref HEAD)" = "main" ]; then + log "You shouldn't commit directly to the main branch." + log "Create a feature branch: git branch new-branch-name" + log "Then reset 'main': git reset --hard origin/main" + log "And continue to work: git checkout new-branch-name" + exit 1 +fi + +log "Running lint-staged" +npx lint-staged + +log "All done" diff --git a/.lintstagedrc.js b/.lintstagedrc.js new file mode 100644 index 000000000..d9cc95b7f --- /dev/null +++ b/.lintstagedrc.js @@ -0,0 +1,3 @@ +module.exports = { + '*.{md,json,yml,scss}': 'prettier --write', +}; diff --git a/interfaces/IBF-dashboard/.lintstagedrc.js b/interfaces/IBF-dashboard/.lintstagedrc.js new file mode 100644 index 000000000..ad0869a1b --- /dev/null +++ b/interfaces/IBF-dashboard/.lintstagedrc.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../.lintstagedrc.js'); + +module.exports = { + ...baseConfig, + '*.{ts,js,html}': ['eslint --fix'], +}; diff --git a/interfaces/IBF-dashboard/package.json b/interfaces/IBF-dashboard/package.json index e340be7dd..0a199f22d 100644 --- a/interfaces/IBF-dashboard/package.json +++ b/interfaces/IBF-dashboard/package.json @@ -8,10 +8,8 @@ "build:prod": "npm run build -- --configuration production", "compress": "gzipper compress --skip-compressed --remove-larger --gzip --gzip-level 9 ./www/browser/", "e2e": "ng e2e", - "format:fix": "npm run format:check -- --write", - "format:check": "prettier --check \"**/*.{md,js,ts,scss,html}\" ", - "lint:check": "ng lint", - "lint": "npx npm-run-all --print-label --parallel lint:check format:check", + "fix": "ng lint --fix", + "lint": "ng lint", "ng": "ng", "postbuild:prod": "npm run compress", "prebuild": "npm run set-env-variables", diff --git a/interfaces/IBF-dashboard/src/app/analytics/analytics.enum.ts b/interfaces/IBF-dashboard/src/app/analytics/analytics.enum.ts index b82a2e71b..ab6e42774 100644 --- a/interfaces/IBF-dashboard/src/app/analytics/analytics.enum.ts +++ b/interfaces/IBF-dashboard/src/app/analytics/analytics.enum.ts @@ -1,30 +1,30 @@ export enum AnalyticsPage { - login = 'login', - dashboard = 'dashboard', activationLog = 'activation-Log', + dashboard = 'dashboard', + login = 'login', } export enum AnalyticsEvent { - watchIbfGuide = 'watch-ibf-guide', aboutTrigger = 'about-trigger', - aggregateInformation = 'aggregate-information', adminLevel = 'admin-level', - mapLayer = 'map-layer', - mapLayerInformation = 'map-layer-information', - exportView = 'export-view', - logOut = 'log-out', + aggregateInformation = 'aggregate-information', + communityNotification = 'community-notification', + damSite = 'dam', eapAction = 'eap-action', eapSubmit = 'eap-submit', - waterPoint = 'water-point', - redCrossBranch = 'red-cross-branch', + evacuationCenter = 'evacuation-center', + exportView = 'export-view', + glofasStation = 'glofas-station', healthSite = 'health-site', - damSite = 'dam', + leadTime = 'lead-time', + logOut = 'log-out', + mapLayer = 'map-layer', + mapLayerInformation = 'map-layer-information', mapMarker = 'map-marker', - glofasStation = 'glofas-station', - typhoonTrack = 'typhoon-track', mapPlaceSelect = 'map-place-select', - leadTime = 'lead-time', + redCrossBranch = 'red-cross-branch', stopTrigger = 'stop-trigger', - evacuationCenter = 'evacuation-center', - communityNotification = 'community-notification', + typhoonTrack = 'typhoon-track', + watchIbfGuide = 'watch-ibf-guide', + waterPoint = 'water-point', } diff --git a/interfaces/IBF-dashboard/src/app/analytics/analytics.service.ts b/interfaces/IBF-dashboard/src/app/analytics/analytics.service.ts index cca8b18ae..d22502b0c 100644 --- a/interfaces/IBF-dashboard/src/app/analytics/analytics.service.ts +++ b/interfaces/IBF-dashboard/src/app/analytics/analytics.service.ts @@ -4,10 +4,10 @@ import { ITelemetryItem, } from '@microsoft/applicationinsights-web'; import { SeverityLevel } from 'src/app/analytics/severity-level.model'; +import { DEBUG_LOG } from 'src/app/config'; +import { Country } from 'src/app/models/country.model'; +import { CountryService } from 'src/app/services/country.service'; import { environment } from 'src/environments/environment'; -import { DEBUG_LOG } from '../config'; -import { Country } from '../models/country.model'; -import { CountryService } from '../services/country.service'; @Injectable({ providedIn: 'root', @@ -72,7 +72,7 @@ export class AnalyticsService { logEvent( name: string, - properties?: { [key: string]: string | number | boolean }, + properties?: Record, ): void { if (this.isApplicationInsightsEnabled) { this.applicationInsights.trackEvent({ name }, properties); @@ -94,7 +94,7 @@ export class AnalyticsService { logTrace( message: string, - properties?: { [key: string]: string | number | boolean }, + properties?: Record, ) { if (this.isApplicationInsightsEnabled) { this.applicationInsights.trackTrace({ message }, properties); diff --git a/interfaces/IBF-dashboard/src/app/analytics/severity-level.model.ts b/interfaces/IBF-dashboard/src/app/analytics/severity-level.model.ts index 36eb3d79d..70fcd38f4 100644 --- a/interfaces/IBF-dashboard/src/app/analytics/severity-level.model.ts +++ b/interfaces/IBF-dashboard/src/app/analytics/severity-level.model.ts @@ -1,3 +1,4 @@ +/* eslint-disable perfectionist/sort-enums */ // Application Insights Severity Level export enum SeverityLevel { Verbose = 0, diff --git a/interfaces/IBF-dashboard/src/app/app-routing.module.ts b/interfaces/IBF-dashboard/src/app/app-routing.module.ts index e3a194c50..d950da6f5 100644 --- a/interfaces/IBF-dashboard/src/app/app-routing.module.ts +++ b/interfaces/IBF-dashboard/src/app/app-routing.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { PreloadAllModules, RouterModule, Routes } from '@angular/router'; -import { AuthGuard } from './auth/auth.guard'; +import { AuthGuard } from 'src/app/auth/auth.guard'; const routes: Routes = [ { diff --git a/interfaces/IBF-dashboard/src/app/app.component.spec.ts b/interfaces/IBF-dashboard/src/app/app.component.spec.ts index 2bec23747..24678d848 100644 --- a/interfaces/IBF-dashboard/src/app/app.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/app.component.spec.ts @@ -2,7 +2,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { TestBed, waitForAsync } from '@angular/core/testing'; import { Platform } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; -import { AppComponent } from './app.component'; +import { AppComponent } from 'src/app/app.component'; describe('AppComponent', () => { let platformReadySpy; diff --git a/interfaces/IBF-dashboard/src/app/app.module.ts b/interfaces/IBF-dashboard/src/app/app.module.ts index f41fe1d19..803639798 100644 --- a/interfaces/IBF-dashboard/src/app/app.module.ts +++ b/interfaces/IBF-dashboard/src/app/app.module.ts @@ -1,6 +1,6 @@ import { - HttpClient, HTTP_INTERCEPTORS, + HttpClient, provideHttpClient, withInterceptorsFromDi, } from '@angular/common/http'; @@ -11,11 +11,11 @@ import { ServiceWorkerModule } from '@angular/service-worker'; import { IonicModule, IonicRouteStrategy } from '@ionic/angular'; import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { TranslateHttpLoader } from '@ngx-translate/http-loader'; +import { AppComponent } from 'src/app/app.component'; +import { AppRoutingModule } from 'src/app/app-routing.module'; +import { AuthInterceptorService } from 'src/app/services/auth.interceptor.service'; import { LoaderInterceptorService } from 'src/app/services/loader.interceptor.service'; import { environment } from 'src/environments/environment'; -import { AppRoutingModule } from './app-routing.module'; -import { AppComponent } from './app.component'; -import { AuthInterceptorService } from './services/auth.interceptor.service'; export function createTranslateLoader(http: HttpClient) { return new TranslateHttpLoader(http, './assets/i18n/', '.json'); diff --git a/interfaces/IBF-dashboard/src/app/auth/auth.guard.ts b/interfaces/IBF-dashboard/src/app/auth/auth.guard.ts index f80313df5..804a07d46 100644 --- a/interfaces/IBF-dashboard/src/app/auth/auth.guard.ts +++ b/interfaces/IBF-dashboard/src/app/auth/auth.guard.ts @@ -6,7 +6,7 @@ import { UrlTree, } from '@angular/router'; import { Observable } from 'rxjs'; -import { AuthService } from './auth.service'; +import { AuthService } from 'src/app/auth/auth.service'; @Injectable({ providedIn: 'root', @@ -21,9 +21,9 @@ export class AuthGuard { next: ActivatedRouteSnapshot, state: RouterStateSnapshot, ): + | boolean | Observable | Promise - | boolean | UrlTree { const url: string = state.url; diff --git a/interfaces/IBF-dashboard/src/app/auth/auth.service.ts b/interfaces/IBF-dashboard/src/app/auth/auth.service.ts index 373ae3823..4f169e126 100644 --- a/interfaces/IBF-dashboard/src/app/auth/auth.service.ts +++ b/interfaces/IBF-dashboard/src/app/auth/auth.service.ts @@ -3,9 +3,9 @@ import { Router } from '@angular/router'; import { ToastController } from '@ionic/angular'; import { BehaviorSubject, Observable, Subscription } from 'rxjs'; import { User } from 'src/app/models/user/user.model'; +import { UserRole } from 'src/app/models/user/user-role.enum'; import { ApiService } from 'src/app/services/api.service'; import { JwtService } from 'src/app/services/jwt.service'; -import { UserRole } from '../models/user/user-role.enum'; const HTTP_STATUS_MESSAGE_MAP = { 401: 'Email and/or password unknown', @@ -95,7 +95,7 @@ export class AuthService implements OnDestroy { } private onLoginResponse = (response) => { - if (!response.user || !response.user.token) { + if (!response.user?.token) { return; } diff --git a/interfaces/IBF-dashboard/src/app/components/about-btn/about-btn.component.ts b/interfaces/IBF-dashboard/src/app/components/about-btn/about-btn.component.ts index ccc8d6fab..cec230f44 100644 --- a/interfaces/IBF-dashboard/src/app/components/about-btn/about-btn.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/about-btn/about-btn.component.ts @@ -11,8 +11,8 @@ import { DisasterType, } from 'src/app/models/country.model'; import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EventService } from 'src/app/services/event.service'; -import { DisasterTypeService } from '../../services/disaster-type.service'; @Component({ selector: 'app-about-btn', diff --git a/interfaces/IBF-dashboard/src/app/components/action-result-popover/action-result-popover.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/action-result-popover/action-result-popover.component.spec.ts index 0d6e83a2a..13dd6ad65 100644 --- a/interfaces/IBF-dashboard/src/app/components/action-result-popover/action-result-popover.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/action-result-popover/action-result-popover.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; -import { ActionResultPopoverComponent } from './action-result-popover.component'; +import { ActionResultPopoverComponent } from 'src/app/components/action-result-popover/action-result-popover.component'; describe('ActionResultPopoverComponent', () => { let component: ActionResultPopoverComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/activation-log-button/activation-log-button.component.ts b/interfaces/IBF-dashboard/src/app/components/activation-log-button/activation-log-button.component.ts index 4374c9f31..291e7aaad 100644 --- a/interfaces/IBF-dashboard/src/app/components/activation-log-button/activation-log-button.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/activation-log-button/activation-log-button.component.ts @@ -1,9 +1,9 @@ import { Component, OnDestroy } from '@angular/core'; import { Router } from '@angular/router'; import { Subscription } from 'rxjs'; -import { Country, DisasterType } from '../../models/country.model'; -import { CountryService } from '../../services/country.service'; -import { DisasterTypeService } from '../../services/disaster-type.service'; +import { Country, DisasterType } from 'src/app/models/country.model'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; @Component({ selector: 'app-activation-log-button', diff --git a/interfaces/IBF-dashboard/src/app/components/admin-level/admin-level.component.ts b/interfaces/IBF-dashboard/src/app/components/admin-level/admin-level.component.ts index e8e0fd828..9e271a7a3 100644 --- a/interfaces/IBF-dashboard/src/app/components/admin-level/admin-level.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/admin-level/admin-level.component.ts @@ -6,27 +6,27 @@ import { AnalyticsPage, } from 'src/app/analytics/analytics.enum'; import { AnalyticsService } from 'src/app/analytics/analytics.service'; +import { + Country, + CountryDisasterSettings, + DisasterType, +} from 'src/app/models/country.model'; +import { PlaceCode } from 'src/app/models/place-code.model'; import { AdminLevelButton, AdminLevelService, } from 'src/app/services/admin-level.service'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EventService } from 'src/app/services/event.service'; import { MapService } from 'src/app/services/map.service'; +import { MapViewService } from 'src/app/services/map-view.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; import { AdminLevel, AdminLevelType } from 'src/app/types/admin-level'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; +import { EventState } from 'src/app/types/event-state'; import { IbfLayer, IbfLayerGroup, IbfLayerName } from 'src/app/types/ibf-layer'; -import { - Country, - CountryDisasterSettings, - DisasterType, -} from '../../models/country.model'; -import { PlaceCode } from '../../models/place-code.model'; -import { CountryService } from '../../services/country.service'; -import { DisasterTypeService } from '../../services/disaster-type.service'; -import { MapViewService } from '../../services/map-view.service'; -import { PlaceCodeService } from '../../services/place-code.service'; -import { DisasterTypeKey } from '../../types/disaster-type-key'; -import { EventState } from '../../types/event-state'; -import { MapView } from '../../types/map-view'; +import { MapView } from 'src/app/types/map-view'; @Component({ selector: 'app-admin-level', @@ -184,9 +184,7 @@ export class AdminLevelComponent implements OnInit, OnDestroy { } public useBreadcrumbs(disasterType: DisasterType): boolean { - return this.breadcrumbDisasters.includes( - disasterType?.disasterType as DisasterTypeKey, - ); + return this.breadcrumbDisasters.includes(disasterType?.disasterType); } public clickBreadcrumbButton(breadCrumb: MapView, selected: boolean) { @@ -247,19 +245,19 @@ export class AdminLevelComponent implements OnInit, OnDestroy { public showBreadcrumb(breadCrumb: MapView): boolean { if (breadCrumb === MapView.national) { return [ - MapView.national, - MapView.event, MapView.adminArea, MapView.adminArea2, MapView.adminArea3, + MapView.event, + MapView.national, ].includes(this.currentMapView); } else if (breadCrumb === MapView.event) { return ( [ - MapView.event, MapView.adminArea, MapView.adminArea2, MapView.adminArea3, + MapView.event, ].includes(this.currentMapView) && this.countryDisasterSettings?.isEventBased ); diff --git a/interfaces/IBF-dashboard/src/app/components/areas-of-focus-summary/areas-of-focus-summary.component.ts b/interfaces/IBF-dashboard/src/app/components/areas-of-focus-summary/areas-of-focus-summary.component.ts index 7db21ad32..84b6c6d09 100644 --- a/interfaces/IBF-dashboard/src/app/components/areas-of-focus-summary/areas-of-focus-summary.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/areas-of-focus-summary/areas-of-focus-summary.component.ts @@ -1,24 +1,27 @@ import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { PopoverController } from '@ionic/angular'; import { Subscription } from 'rxjs'; +import { + AnalyticsEvent, + AnalyticsPage, +} from 'src/app/analytics/analytics.enum'; +import { AnalyticsService } from 'src/app/analytics/analytics.service'; +import { LayerControlInfoPopoverComponent } from 'src/app/components/layer-control-info-popover/layer-control-info-popover.component'; +import { + Country, + CountryDisasterSettings, + DisasterType, +} from 'src/app/models/country.model'; import { PlaceCode } from 'src/app/models/place-code.model'; import { ApiService } from 'src/app/services/api.service'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EapActionsService } from 'src/app/services/eap-actions.service'; import { EventService } from 'src/app/services/event.service'; import { PlaceCodeService } from 'src/app/services/place-code.service'; +import { AreaOfFocus } from 'src/app/types/area-of-focus'; import { EventState } from 'src/app/types/event-state'; -import { AnalyticsEvent, AnalyticsPage } from '../../analytics/analytics.enum'; -import { AnalyticsService } from '../../analytics/analytics.service'; -import { - Country, - CountryDisasterSettings, - DisasterType, -} from '../../models/country.model'; -import { CountryService } from '../../services/country.service'; -import { DisasterTypeService } from '../../services/disaster-type.service'; -import { AreaOfFocus } from '../../types/area-of-focus'; -import { TriggeredArea } from '../../types/triggered-area'; -import { LayerControlInfoPopoverComponent } from '../layer-control-info-popover/layer-control-info-popover.component'; +import { TriggeredArea } from 'src/app/types/triggered-area'; @Component({ selector: 'app-areas-of-focus-summary', diff --git a/interfaces/IBF-dashboard/src/app/components/chat/chat.component.ts b/interfaces/IBF-dashboard/src/app/components/chat/chat.component.ts index f93584ba9..14f02eb2d 100644 --- a/interfaces/IBF-dashboard/src/app/components/chat/chat.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/chat/chat.component.ts @@ -8,31 +8,31 @@ import { } from 'src/app/analytics/analytics.enum'; import { AnalyticsService } from 'src/app/analytics/analytics.service'; import { AuthService } from 'src/app/auth/auth.service'; +import { ActionResultPopoverComponent } from 'src/app/components/action-result-popover/action-result-popover.component'; +import { ToggleTriggerPopoverComponent } from 'src/app/components/toggle-trigger-popover/toggle-trigger-popover.component'; import { Country, CountryDisasterSettings, DisasterType, } from 'src/app/models/country.model'; import { PlaceCode } from 'src/app/models/place-code.model'; +import { AdminLevelService } from 'src/app/services/admin-level.service'; +import { AggregatesService } from 'src/app/services/aggregates.service'; import { ApiService } from 'src/app/services/api.service'; import { CountryService } from 'src/app/services/country.service'; import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EapActionsService } from 'src/app/services/eap-actions.service'; import { EventService, EventSummary } from 'src/app/services/event.service'; import { PlaceCodeService } from 'src/app/services/place-code.service'; +import { TimelineService } from 'src/app/services/timeline.service'; +import { AdminLevel, AdminLevelType } from 'src/app/types/admin-level'; import { EapAction } from 'src/app/types/eap-action'; import { EventState } from 'src/app/types/event-state'; +import { Indicator, NumberFormat } from 'src/app/types/indicator-group'; +import { LeadTimeTriggerKey } from 'src/app/types/lead-time'; import { TimelineState } from 'src/app/types/timeline-state'; -import { environment } from '../../../environments/environment'; -import { AdminLevelService } from '../../services/admin-level.service'; -import { AggregatesService } from '../../services/aggregates.service'; -import { TimelineService } from '../../services/timeline.service'; -import { AdminLevel, AdminLevelType } from '../../types/admin-level'; -import { Indicator, NumberFormat } from '../../types/indicator-group'; -import { LeadTimeTriggerKey } from '../../types/lead-time'; -import { TriggeredArea } from '../../types/triggered-area'; -import { ActionResultPopoverComponent } from '../action-result-popover/action-result-popover.component'; -import { ToggleTriggerPopoverComponent } from '../toggle-trigger-popover/toggle-trigger-popover.component'; +import { TriggeredArea } from 'src/app/types/triggered-area'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-chat', @@ -435,7 +435,9 @@ export class ChatComponent implements OnInit, OnDestroy { placeCode, }); this.apiService.toggleTrigger(eventPlaceCodeId).subscribe({ - next: () => this.reloadEapAndTrigger(), + next: () => { + this.reloadEapAndTrigger(); + }, error: () => this.actionResult( this.translateService.instant( diff --git a/interfaces/IBF-dashboard/src/app/components/community-notification-popup/community-notification-popup.component.ts b/interfaces/IBF-dashboard/src/app/components/community-notification-popup/community-notification-popup.component.ts index afba31d54..cd8c2fcc1 100644 --- a/interfaces/IBF-dashboard/src/app/components/community-notification-popup/community-notification-popup.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/community-notification-popup/community-notification-popup.component.ts @@ -2,11 +2,11 @@ import { Component, Input, OnInit } from '@angular/core'; import { AlertController, PopoverController } from '@ionic/angular'; import { TranslateService } from '@ngx-translate/core'; import { DateTime } from 'luxon'; -import { CommunityNotification } from '../../models/poi.model'; -import { ApiService } from '../../services/api.service'; -import { EventService } from '../../services/event.service'; -import { ActionResultPopoverComponent } from '../action-result-popover/action-result-popover.component'; -import { CommunityNotificationPhotoPopupComponent } from '../community-notification-photo-popup/community-notification-photo-popup.component'; +import { ActionResultPopoverComponent } from 'src/app/components/action-result-popover/action-result-popover.component'; +import { CommunityNotificationPhotoPopupComponent } from 'src/app/components/community-notification-photo-popup/community-notification-photo-popup.component'; +import { CommunityNotification } from 'src/app/models/poi.model'; +import { ApiService } from 'src/app/services/api.service'; +import { EventService } from 'src/app/services/event.service'; @Component({ selector: 'app-community-notification-popup', diff --git a/interfaces/IBF-dashboard/src/app/components/date-button/date-button.component.ts b/interfaces/IBF-dashboard/src/app/components/date-button/date-button.component.ts index 29fd50cff..433abc79d 100644 --- a/interfaces/IBF-dashboard/src/app/components/date-button/date-button.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/date-button/date-button.component.ts @@ -2,9 +2,9 @@ import { Component, Input, OnDestroy, OnInit } from '@angular/core'; import { DateTime } from 'luxon'; import { Subscription } from 'rxjs'; import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { TimelineService } from 'src/app/services/timeline.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; import { DateFormats, MonthFormats } from 'src/app/types/lead-time'; -import { TimelineService } from '../../services/timeline.service'; -import { DisasterTypeKey } from '../../types/disaster-type-key'; @Component({ selector: 'app-date-button', templateUrl: './date-button.component.html', @@ -15,8 +15,8 @@ export class DateButtonComponent implements OnInit, OnDestroy { @Input() active: boolean; @Input() alert: boolean; @Input() thresholdReached: boolean; - @Input() eventName: string | null; - @Input() duration: number | null; + @Input() eventName: null | string; + @Input() duration: null | number; private dateFormat = ''; private monthFormat = ''; diff --git a/interfaces/IBF-dashboard/src/app/components/dialogue-turn/dialogue-turn.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/dialogue-turn/dialogue-turn.component.spec.ts index d6e321e8f..97086cb17 100644 --- a/interfaces/IBF-dashboard/src/app/components/dialogue-turn/dialogue-turn.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/dialogue-turn/dialogue-turn.component.spec.ts @@ -1,6 +1,6 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { DialogueTurnComponent } from './dialogue-turn.component'; +import { DialogueTurnComponent } from 'src/app/components/dialogue-turn/dialogue-turn.component'; describe('DialogueTurnComponent', () => { let component: DialogueTurnComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/disaster-type/disaster-type.component.ts b/interfaces/IBF-dashboard/src/app/components/disaster-type/disaster-type.component.ts index 389a5e424..dfa283a73 100644 --- a/interfaces/IBF-dashboard/src/app/components/disaster-type/disaster-type.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/disaster-type/disaster-type.component.ts @@ -1,14 +1,14 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Subscription } from 'rxjs'; +import { AuthService } from 'src/app/auth/auth.service'; import { DISASTER_TYPES_SVG_MAP } from 'src/app/config'; +import { Country, DisasterType } from 'src/app/models/country.model'; +import { User } from 'src/app/models/user/user.model'; +import { CountryService } from 'src/app/services/country.service'; import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EventService } from 'src/app/services/event.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; -import { AuthService } from '../../auth/auth.service'; -import { Country, DisasterType } from '../../models/country.model'; -import { User } from '../../models/user/user.model'; -import { CountryService } from '../../services/country.service'; -import { PlaceCodeService } from '../../services/place-code.service'; @Component({ selector: 'app-disaster-type', @@ -93,8 +93,7 @@ export class DisasterTypeComponent implements OnInit, OnDestroy { const disasterType = activeDisasterType ? activeDisasterType : this.disasterTypes[0]; - this.selectedDisasterType = - disasterType.disasterType as DisasterTypeKey; + this.selectedDisasterType = disasterType.disasterType; this.disasterTypeService.setDisasterType(disasterType); } }; diff --git a/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.spec.ts index 458792d9b..321265de0 100644 --- a/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/disclaimer-approximate/disclaimer-approximate.component.spec.ts @@ -1,8 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; - -import { DisclaimerApproximateComponent } from './disclaimer-approximate.component'; +import { DisclaimerApproximateComponent } from 'src/app/components/disclaimer-approximate/disclaimer-approximate.component'; describe('DisclaimerApproximateComponent', () => { let component: DisclaimerApproximateComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/disclaimer-toolbar/disclaimer-toolbar.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/disclaimer-toolbar/disclaimer-toolbar.component.spec.ts index 4dcb3d9b1..0899173a6 100644 --- a/interfaces/IBF-dashboard/src/app/components/disclaimer-toolbar/disclaimer-toolbar.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/disclaimer-toolbar/disclaimer-toolbar.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; -import { DisclaimerToolbarComponent } from './disclaimer-toolbar.component'; +import { DisclaimerToolbarComponent } from 'src/app/components/disclaimer-toolbar/disclaimer-toolbar.component'; describe('DisclaimerToolbarComponent', () => { let component: DisclaimerToolbarComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/disclaimer-toolbar/disclaimer-toolbar.component.ts b/interfaces/IBF-dashboard/src/app/components/disclaimer-toolbar/disclaimer-toolbar.component.ts index d402954fe..fec844380 100644 --- a/interfaces/IBF-dashboard/src/app/components/disclaimer-toolbar/disclaimer-toolbar.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/disclaimer-toolbar/disclaimer-toolbar.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { environment } from '../../../environments/environment'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-disclaimer-toolbar', diff --git a/interfaces/IBF-dashboard/src/app/components/event-speech-bubble/event-speech-bubble.component.ts b/interfaces/IBF-dashboard/src/app/components/event-speech-bubble/event-speech-bubble.component.ts index 309966a5e..49fd23b89 100644 --- a/interfaces/IBF-dashboard/src/app/components/event-speech-bubble/event-speech-bubble.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/event-speech-bubble/event-speech-bubble.component.ts @@ -7,16 +7,16 @@ import { } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; -import { AuthService } from '../../auth/auth.service'; -import { PlaceCode } from '../../models/place-code.model'; -import { AdminLevelService } from '../../services/admin-level.service'; -import { EventService, EventSummary } from '../../services/event.service'; -import { PlaceCodeService } from '../../services/place-code.service'; -import { TimelineService } from '../../services/timeline.service'; -import { DisasterTypeKey } from '../../types/disaster-type-key'; -import { LeadTime, LeadTimeTriggerKey } from '../../types/lead-time'; -import { TriggeredArea } from '../../types/triggered-area'; -import { NumberFormat } from '../../types/indicator-group'; +import { AuthService } from 'src/app/auth/auth.service'; +import { PlaceCode } from 'src/app/models/place-code.model'; +import { AdminLevelService } from 'src/app/services/admin-level.service'; +import { EventService, EventSummary } from 'src/app/services/event.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; +import { TimelineService } from 'src/app/services/timeline.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; +import { NumberFormat } from 'src/app/types/indicator-group'; +import { LeadTime, LeadTimeTriggerKey } from 'src/app/types/lead-time'; +import { TriggeredArea } from 'src/app/types/triggered-area'; @Component({ selector: 'app-event-speech-bubble', @@ -77,7 +77,7 @@ export class EventSpeechBubbleComponent implements AfterViewChecked, OnDestroy { this.typhoonLandfallText = this.showTyphoonLandfallText(this.event); if (this.event) { - this.event['header'] = this.getHeader(this.event); + this.event.header = this.getHeader(this.event); } } @@ -236,11 +236,7 @@ export class EventSpeechBubbleComponent implements AfterViewChecked, OnDestroy { } public isEventWithForecastClasses(): boolean { - if ( - !this.event || - !this.event.disasterSpecificProperties || - !this.event.disasterSpecificProperties.eapAlertClass - ) { + if (!this.event?.disasterSpecificProperties?.eapAlertClass) { return false; } else return true; } diff --git a/interfaces/IBF-dashboard/src/app/components/event-switcher/event-switcher.component.ts b/interfaces/IBF-dashboard/src/app/components/event-switcher/event-switcher.component.ts index 894fb0508..94390e2e8 100644 --- a/interfaces/IBF-dashboard/src/app/components/event-switcher/event-switcher.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/event-switcher/event-switcher.component.ts @@ -1,13 +1,13 @@ import { Component, Input, OnDestroy, OnInit } from '@angular/core'; import { Subscription } from 'rxjs'; +import { DisasterType } from 'src/app/models/country.model'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EventService, EventSummary } from 'src/app/services/event.service'; +import { TimelineService } from 'src/app/services/timeline.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; import { EventState } from 'src/app/types/event-state'; +import { LeadTime } from 'src/app/types/lead-time'; import { TimelineState } from 'src/app/types/timeline-state'; -import { DisasterType } from '../../models/country.model'; -import { DisasterTypeService } from '../../services/disaster-type.service'; -import { TimelineService } from '../../services/timeline.service'; -import { DisasterTypeKey } from '../../types/disaster-type-key'; -import { LeadTime } from '../../types/lead-time'; @Component({ selector: 'app-event-switcher', diff --git a/interfaces/IBF-dashboard/src/app/components/export-view-popover/export-view-popover.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/export-view-popover/export-view-popover.component.spec.ts index 0d44545e8..90f4b7ce3 100644 --- a/interfaces/IBF-dashboard/src/app/components/export-view-popover/export-view-popover.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/export-view-popover/export-view-popover.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; -import { ExportViewPopoverComponent } from './export-view-popover.component'; +import { ExportViewPopoverComponent } from 'src/app/components/export-view-popover/export-view-popover.component'; describe('ExportViewPopoverComponent', () => { let component: ExportViewPopoverComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/export-view-popover/export-view-popover.component.ts b/interfaces/IBF-dashboard/src/app/components/export-view-popover/export-view-popover.component.ts index 7829898e7..a6f7c7208 100644 --- a/interfaces/IBF-dashboard/src/app/components/export-view-popover/export-view-popover.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/export-view-popover/export-view-popover.component.ts @@ -15,13 +15,13 @@ export class ExportViewPopoverComponent { public getOperatingSystem() { let operatingSystemName = 'Unknown'; - if (navigator.appVersion.indexOf('Win') !== -1) { + if (navigator.appVersion.includes('Win')) { operatingSystemName = 'Windows'; } - if (navigator.appVersion.indexOf('Mac') !== -1) { + if (navigator.appVersion.includes('Mac')) { operatingSystemName = 'MacOS'; } - if (navigator.appVersion.indexOf('Linux') !== -1) { + if (navigator.appVersion.includes('Linux')) { operatingSystemName = 'Linux'; } return operatingSystemName; diff --git a/interfaces/IBF-dashboard/src/app/components/forgot-password-popover/forgot-password-popover.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/forgot-password-popover/forgot-password-popover.component.spec.ts index a18e91d8e..e63b4ef84 100644 --- a/interfaces/IBF-dashboard/src/app/components/forgot-password-popover/forgot-password-popover.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/forgot-password-popover/forgot-password-popover.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; -import { ForgotPasswordPopoverComponent } from './forgot-password-popover.component'; +import { ForgotPasswordPopoverComponent } from 'src/app/components/forgot-password-popover/forgot-password-popover.component'; describe('ForgotPasswordPopoverComponent', () => { let component: ForgotPasswordPopoverComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/ibf-button/ibf-button.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/ibf-button/ibf-button.component.spec.ts index 3a6c3e508..30a7722fb 100644 --- a/interfaces/IBF-dashboard/src/app/components/ibf-button/ibf-button.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/ibf-button/ibf-button.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; -import { IbfButtonComponent } from './ibf-button.component'; +import { IbfButtonComponent } from 'src/app/components/ibf-button/ibf-button.component'; describe('IbfButtonComponent', () => { let component: IbfButtonComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/ibf-guide-button/ibf-guide-button.component.ts b/interfaces/IBF-dashboard/src/app/components/ibf-guide-button/ibf-guide-button.component.ts index 83b578256..53cfcec01 100644 --- a/interfaces/IBF-dashboard/src/app/components/ibf-guide-button/ibf-guide-button.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/ibf-guide-button/ibf-guide-button.component.ts @@ -6,10 +6,10 @@ import { AnalyticsPage, } from 'src/app/analytics/analytics.enum'; import { AnalyticsService } from 'src/app/analytics/analytics.service'; +import { IbfGuidePopoverComponent } from 'src/app/components/ibf-guide-popover/ibf-guide-popover.component'; +import { Country } from 'src/app/models/country.model'; +import { CountryService } from 'src/app/services/country.service'; import { EventService } from 'src/app/services/event.service'; -import { Country } from '../../models/country.model'; -import { CountryService } from '../../services/country.service'; -import { IbfGuidePopoverComponent } from '../ibf-guide-popover/ibf-guide-popover.component'; @Component({ selector: 'app-ibf-guide-button', diff --git a/interfaces/IBF-dashboard/src/app/components/ibf-guide-popover/ibf-guide-popover.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/ibf-guide-popover/ibf-guide-popover.component.spec.ts index 367878280..6cc3e233c 100644 --- a/interfaces/IBF-dashboard/src/app/components/ibf-guide-popover/ibf-guide-popover.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/ibf-guide-popover/ibf-guide-popover.component.spec.ts @@ -1,12 +1,12 @@ -import { provideHttpClientTesting } from '@angular/common/http/testing'; -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; -import { TranslateModule } from '@ngx-translate/core'; -import { IbfGuidePopoverComponent } from './ibf-guide-popover.component'; import { provideHttpClient, withInterceptorsFromDi, } from '@angular/common/http'; +import { provideHttpClientTesting } from '@angular/common/http/testing'; +import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { IonicModule } from '@ionic/angular'; +import { TranslateModule } from '@ngx-translate/core'; +import { IbfGuidePopoverComponent } from 'src/app/components/ibf-guide-popover/ibf-guide-popover.component'; describe('IbfGuidePopoverComponent', () => { let component: IbfGuidePopoverComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/layer-control-info-popover/layer-control-info-popover.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/layer-control-info-popover/layer-control-info-popover.component.spec.ts index aa590b27d..52ed9b13b 100644 --- a/interfaces/IBF-dashboard/src/app/components/layer-control-info-popover/layer-control-info-popover.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/layer-control-info-popover/layer-control-info-popover.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; -import { LayerControlInfoPopoverComponent } from './layer-control-info-popover.component'; +import { LayerControlInfoPopoverComponent } from 'src/app/components/layer-control-info-popover/layer-control-info-popover.component'; describe('LayerControlInfoPopoverComponent', () => { let component: LayerControlInfoPopoverComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/leaflet-popup/dynamic-point-popup/dynamic-point-popup.component.ts b/interfaces/IBF-dashboard/src/app/components/leaflet-popup/dynamic-point-popup/dynamic-point-popup.component.ts index cab16506f..9fe47d56a 100644 --- a/interfaces/IBF-dashboard/src/app/components/leaflet-popup/dynamic-point-popup/dynamic-point-popup.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/leaflet-popup/dynamic-point-popup/dynamic-point-popup.component.ts @@ -1,10 +1,10 @@ import { Component, Input, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { LatLng } from 'leaflet'; -import { EapAlertClass, EapAlertClasses } from '../../../models/country.model'; -import { RiverGauge, Station } from '../../../models/poi.model'; -import { IbfLayerName } from '../../../types/ibf-layer'; -import { LeadTime } from '../../../types/lead-time'; +import { EapAlertClass, EapAlertClasses } from 'src/app/models/country.model'; +import { RiverGauge, Station } from 'src/app/models/poi.model'; +import { IbfLayerName } from 'src/app/types/ibf-layer'; +import { LeadTime } from 'src/app/types/lead-time'; @Component({ selector: 'app-dynamic-point-popup', diff --git a/interfaces/IBF-dashboard/src/app/components/leaflet-popup/river-gauge-popup-content/river-gauge-popup-content.component.ts b/interfaces/IBF-dashboard/src/app/components/leaflet-popup/river-gauge-popup-content/river-gauge-popup-content.component.ts index 0976695e7..43f5c608d 100644 --- a/interfaces/IBF-dashboard/src/app/components/leaflet-popup/river-gauge-popup-content/river-gauge-popup-content.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/leaflet-popup/river-gauge-popup-content/river-gauge-popup-content.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; -import { RiverGauge } from '../../../models/poi.model'; +import { RiverGauge } from 'src/app/models/poi.model'; @Component({ selector: 'app-river-gauge-popup-content', diff --git a/interfaces/IBF-dashboard/src/app/components/login-form/login-form.component.ts b/interfaces/IBF-dashboard/src/app/components/login-form/login-form.component.ts index a6cfe131a..ee9e5a065 100644 --- a/interfaces/IBF-dashboard/src/app/components/login-form/login-form.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/login-form/login-form.component.ts @@ -2,7 +2,7 @@ import { Component, ViewChild } from '@angular/core'; import { NgForm } from '@angular/forms'; import { PopoverController } from '@ionic/angular'; import { AuthService } from 'src/app/auth/auth.service'; -import { ForgotPasswordPopoverComponent } from '../forgot-password-popover/forgot-password-popover.component'; +import { ForgotPasswordPopoverComponent } from 'src/app/components/forgot-password-popover/forgot-password-popover.component'; @Component({ selector: 'app-login-form', templateUrl: './login-form.component.html', diff --git a/interfaces/IBF-dashboard/src/app/components/logos/logos.component.ts b/interfaces/IBF-dashboard/src/app/components/logos/logos.component.ts index 40ad5bfd7..dc249b402 100644 --- a/interfaces/IBF-dashboard/src/app/components/logos/logos.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/logos/logos.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import { Country, DisasterType } from 'src/app/models/country.model'; import { CountryService } from 'src/app/services/country.service'; -import { DisasterTypeService } from '../../services/disaster-type.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; @Component({ selector: 'app-logos', diff --git a/interfaces/IBF-dashboard/src/app/components/map-controls/map-controls.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/map-controls/map-controls.component.spec.ts index 6731b8cd1..1c8c1cf52 100644 --- a/interfaces/IBF-dashboard/src/app/components/map-controls/map-controls.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/map-controls/map-controls.component.spec.ts @@ -1,7 +1,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; -import { MapControlsComponent } from './map-controls.component'; +import { MapControlsComponent } from 'src/app/components/map-controls/map-controls.component'; describe('MapControlsComponent', () => { let component: MapControlsComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/map/map.component.ts b/interfaces/IBF-dashboard/src/app/components/map/map.component.ts index 20ac4bcce..f287295d1 100644 --- a/interfaces/IBF-dashboard/src/app/components/map/map.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/map/map.component.ts @@ -6,16 +6,16 @@ import { Control, divIcon, DomUtil, - geoJSON, GeoJSON, + geoJSON, LatLng, LatLngBoundsLiteral, Layer, Map, MapOptions, Marker, - markerClusterGroup, MarkerClusterGroup, + markerClusterGroup, point, tileLayer, } from 'leaflet'; @@ -36,6 +36,7 @@ import { CountryDisasterSettings, DisasterType, } from 'src/app/models/country.model'; +import { PlaceCode } from 'src/app/models/place-code.model'; import { CommunityNotification, DamSite, @@ -49,13 +50,17 @@ import { Waterpoint, WaterpointInternal, } from 'src/app/models/poi.model'; +import { AdminLevelService } from 'src/app/services/admin-level.service'; import { ApiService } from 'src/app/services/api.service'; import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EventService, EventSummary } from 'src/app/services/event.service'; -import { MapLegendService } from 'src/app/services/map-legend.service'; import { MapService } from 'src/app/services/map.service'; +import { MapLegendService } from 'src/app/services/map-legend.service'; import { PlaceCodeService } from 'src/app/services/place-code.service'; +import { PointMarkerService } from 'src/app/services/point-marker.service'; import { TimelineService } from 'src/app/services/timeline.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; import { EventState } from 'src/app/types/event-state'; import { IbfLayer, @@ -66,12 +71,7 @@ import { } from 'src/app/types/ibf-layer'; import { NumberFormat } from 'src/app/types/indicator-group'; import { LeadTime } from 'src/app/types/lead-time'; -import { PlaceCode } from '../../models/place-code.model'; -import { AdminLevelService } from '../../services/admin-level.service'; -import { DisasterTypeService } from '../../services/disaster-type.service'; -import { PointMarkerService } from '../../services/point-marker.service'; -import { DisasterTypeKey } from '../../types/disaster-type-key'; -import { TimelineState } from '../../types/timeline-state'; +import { TimelineState } from 'src/app/types/timeline-state'; @Component({ selector: 'app-map', @@ -388,9 +388,9 @@ export class MapComponent implements AfterViewInit, OnDestroy { private isMultiLinePointLayer(layerName: IbfLayerName): boolean { return ( [ - IbfLayerName.waterpointsInternal, IbfLayerName.healthSites, IbfLayerName.schools, + IbfLayerName.waterpointsInternal, ].includes(layerName) && this.disasterType.disasterType === DisasterTypeKey.flashFloods && this.eventState.events?.length > 0 diff --git a/interfaces/IBF-dashboard/src/app/components/screen-orientation-popover/screen-orientation-popover.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/screen-orientation-popover/screen-orientation-popover.component.spec.ts index 76f473faa..85e39f503 100644 --- a/interfaces/IBF-dashboard/src/app/components/screen-orientation-popover/screen-orientation-popover.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/screen-orientation-popover/screen-orientation-popover.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; -import { ScreenOrientationPopoverComponent } from './screen-orientation-popover.component'; +import { ScreenOrientationPopoverComponent } from 'src/app/components/screen-orientation-popover/screen-orientation-popover.component'; describe('ScreenOrientationPopoverComponent', () => { let component: ScreenOrientationPopoverComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/timeline/timeline.component.ts b/interfaces/IBF-dashboard/src/app/components/timeline/timeline.component.ts index 2e3a6f893..d1a6ac0de 100644 --- a/interfaces/IBF-dashboard/src/app/components/timeline/timeline.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/timeline/timeline.component.ts @@ -5,14 +5,14 @@ import { AnalyticsPage, } from 'src/app/analytics/analytics.enum'; import { AnalyticsService } from 'src/app/analytics/analytics.service'; +import { PlaceCode } from 'src/app/models/place-code.model'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EventService } from 'src/app/services/event.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; import { TimelineService } from 'src/app/services/timeline.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; import { LeadTime } from 'src/app/types/lead-time'; import { TimelineState } from 'src/app/types/timeline-state'; -import { PlaceCode } from '../../models/place-code.model'; -import { DisasterTypeService } from '../../services/disaster-type.service'; -import { PlaceCodeService } from '../../services/place-code.service'; -import { DisasterTypeKey } from '../../types/disaster-type-key'; @Component({ selector: 'app-timeline', diff --git a/interfaces/IBF-dashboard/src/app/components/timestamp/timestamp.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/timestamp/timestamp.component.spec.ts index f55ad0f36..fe54e71dd 100644 --- a/interfaces/IBF-dashboard/src/app/components/timestamp/timestamp.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/timestamp/timestamp.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; -import { TimestampComponent } from './timestamp.component'; +import { TimestampComponent } from 'src/app/components/timestamp/timestamp.component'; describe('TimestampComponent', () => { let component: TimestampComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/toggle-trigger-popover/toggle-trigger-popover.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/toggle-trigger-popover/toggle-trigger-popover.component.spec.ts index 3d0ca7fd9..9589b2e2f 100644 --- a/interfaces/IBF-dashboard/src/app/components/toggle-trigger-popover/toggle-trigger-popover.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/toggle-trigger-popover/toggle-trigger-popover.component.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; -import { ToggleTriggerPopoverComponent } from './toggle-trigger-popover.component'; +import { ToggleTriggerPopoverComponent } from 'src/app/components/toggle-trigger-popover/toggle-trigger-popover.component'; describe('ToggleTriggerPopoverComponent', () => { let component: ToggleTriggerPopoverComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/toggle-trigger-popover/toggle-trigger-popover.component.ts b/interfaces/IBF-dashboard/src/app/components/toggle-trigger-popover/toggle-trigger-popover.component.ts index 0153f9746..742a2fecf 100644 --- a/interfaces/IBF-dashboard/src/app/components/toggle-trigger-popover/toggle-trigger-popover.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/toggle-trigger-popover/toggle-trigger-popover.component.ts @@ -1,8 +1,8 @@ import { Component, Input } from '@angular/core'; import { PopoverController } from '@ionic/angular'; import { TranslateService } from '@ngx-translate/core'; -import { DisasterTypeKey } from '../../types/disaster-type-key'; -import { TriggeredArea } from '../../types/triggered-area'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; +import { TriggeredArea } from 'src/app/types/triggered-area'; @Component({ selector: 'app-toggle-trigger-popover', diff --git a/interfaces/IBF-dashboard/src/app/components/tooltip-popover/tooltip-popover.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/tooltip-popover/tooltip-popover.component.spec.ts index ad171218a..f2a93c492 100644 --- a/interfaces/IBF-dashboard/src/app/components/tooltip-popover/tooltip-popover.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/tooltip-popover/tooltip-popover.component.spec.ts @@ -1,5 +1,5 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { TooltipPopoverComponent } from './tooltip-popover.component'; +import { TooltipPopoverComponent } from 'src/app/components/tooltip-popover/tooltip-popover.component'; describe('TooltipPopoverComponent', () => { let component: TooltipPopoverComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.spec.ts b/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.spec.ts index 941772b5c..0656358a3 100644 --- a/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.spec.ts +++ b/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.spec.ts @@ -1,7 +1,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { AngularDelegate, PopoverController } from '@ionic/angular'; -import { TooltipComponent } from './tooltip.component'; +import { TooltipComponent } from 'src/app/components/tooltip/tooltip.component'; describe('TooltipComponent', () => { let component: TooltipComponent; diff --git a/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.ts b/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.ts index 5e404f8c1..b0bab2d7f 100644 --- a/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/tooltip/tooltip.component.ts @@ -1,6 +1,6 @@ import { Component, Input } from '@angular/core'; import { PopoverController } from '@ionic/angular'; -import { TooltipPopoverComponent } from '../tooltip-popover/tooltip-popover.component'; +import { TooltipPopoverComponent } from 'src/app/components/tooltip-popover/tooltip-popover.component'; @Component({ selector: 'app-tooltip', diff --git a/interfaces/IBF-dashboard/src/app/components/user-state/user-state.component.ts b/interfaces/IBF-dashboard/src/app/components/user-state/user-state.component.ts index dbc82ed5a..46c059d60 100644 --- a/interfaces/IBF-dashboard/src/app/components/user-state/user-state.component.ts +++ b/interfaces/IBF-dashboard/src/app/components/user-state/user-state.component.ts @@ -8,14 +8,14 @@ import { } from 'src/app/analytics/analytics.enum'; import { AnalyticsService } from 'src/app/analytics/analytics.service'; import { AuthService } from 'src/app/auth/auth.service'; +import { ChangePasswordPopoverComponent } from 'src/app/components/change-password-popover/change-password-popover.component'; import { Country, DisasterType } from 'src/app/models/country.model'; +import { ApiService } from 'src/app/services/api.service'; import { CountryService } from 'src/app/services/country.service'; import { DisasterTypeService } from 'src/app/services/disaster-type.service'; import { EventService } from 'src/app/services/event.service'; import { LoaderService } from 'src/app/services/loader.service'; -import { environment } from '../../../environments/environment'; -import { ApiService } from '../../services/api.service'; -import { ChangePasswordPopoverComponent } from '../change-password-popover/change-password-popover.component'; +import { environment } from 'src/environments/environment'; @Component({ selector: 'app-user-state', @@ -26,7 +26,7 @@ export class UserStateComponent implements OnInit { @Input() public isLoggedIn: boolean; @Input() - public showCountry: boolean = true; + public showCountry = true; public environmentConfiguration = environment.configuration; diff --git a/interfaces/IBF-dashboard/src/app/models/country.model.ts b/interfaces/IBF-dashboard/src/app/models/country.model.ts index 8ce79c42a..384c77dcf 100644 --- a/interfaces/IBF-dashboard/src/app/models/country.model.ts +++ b/interfaces/IBF-dashboard/src/app/models/country.model.ts @@ -1,12 +1,12 @@ import { AdminLevel } from 'src/app/types/admin-level'; -import { DisasterTypeKey } from './../types/disaster-type-key'; -import { LeadTime, LeadTimeUnit } from './../types/lead-time'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; +import { LeadTime, LeadTimeUnit } from 'src/app/types/lead-time'; export class Country { countryCodeISO3: string; countryDisasterSettings: CountryDisasterSettings[]; countryName: string; adminRegionLabels: AdminRegionLabels; - countryLogos: { [disasterType: string]: string[] }; + countryLogos: Record; disasterTypes: DisasterType[]; notificationInfo: NotificationInfo; } @@ -17,26 +17,25 @@ export class CountryDisasterSettings { defaultAdminLevel: AdminLevel; activeLeadTimes: LeadTime[]; droughtForecastSeasons: DroughtForecastSeasons; - droughtAreas: { [area: string]: string[] }; + droughtAreas: Record; eapLink: string; showMonthlyEapActions: boolean; droughtEndOfMonthPipeline?: boolean; isEventBased: boolean; eapAlertClasses?: EapAlertClasses; - monthlyForecastInfo?: { - [key: string]: string[] | string; - }; + monthlyForecastInfo?: Record; enableEarlyActions?: boolean; enableStopTrigger?: boolean; } export class DroughtForecastSeasons { - [area: string]: { - [season: string]: { + [area: string]: Record< + string, + { rainMonths: number[]; actionMonths: number[]; - }; - }; + } + >; } export class NotificationInfo { diff --git a/interfaces/IBF-dashboard/src/app/models/place-code.model.ts b/interfaces/IBF-dashboard/src/app/models/place-code.model.ts index f48b86bdb..6b813cf02 100644 --- a/interfaces/IBF-dashboard/src/app/models/place-code.model.ts +++ b/interfaces/IBF-dashboard/src/app/models/place-code.model.ts @@ -1,4 +1,4 @@ -import { AdminLevel } from '../types/admin-level'; +import { AdminLevel } from 'src/app/types/admin-level'; export class PlaceCode { countryCodeISO3: string; diff --git a/interfaces/IBF-dashboard/src/app/models/user/user.model.ts b/interfaces/IBF-dashboard/src/app/models/user/user.model.ts index c01b3d3ca..483249edb 100644 --- a/interfaces/IBF-dashboard/src/app/models/user/user.model.ts +++ b/interfaces/IBF-dashboard/src/app/models/user/user.model.ts @@ -1,5 +1,5 @@ -import { UserRole } from './user-role.enum'; -import { UserStatus } from './user-status.enum'; +import { UserRole } from 'src/app/models/user/user-role.enum'; +import { UserStatus } from 'src/app/models/user/user-status.enum'; export class User { token: string; diff --git a/interfaces/IBF-dashboard/src/app/pages/dashboard/activation-log/activation.log.page.ts b/interfaces/IBF-dashboard/src/app/pages/dashboard/activation-log/activation.log.page.ts index c467071dc..9242e8c23 100644 --- a/interfaces/IBF-dashboard/src/app/pages/dashboard/activation-log/activation.log.page.ts +++ b/interfaces/IBF-dashboard/src/app/pages/dashboard/activation-log/activation.log.page.ts @@ -6,10 +6,10 @@ import { Subscription } from 'rxjs'; import { AnalyticsPage } from 'src/app/analytics/analytics.enum'; import { AnalyticsService } from 'src/app/analytics/analytics.service'; import { ApiService } from 'src/app/services/api.service'; -import { DisasterTypeService } from '../../../services/disaster-type.service'; -import { DisasterTypeKey } from '../../../types/disaster-type-key'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; -type ActivationLogRecord = { [key: string]: string | number | boolean }; +type ActivationLogRecord = Record; @Component({ selector: 'app-activation-log', @@ -23,7 +23,7 @@ export class ActivationLogPage implements OnInit, OnDestroy { public activationLogs: | { headerData: string[]; - rowsData: (string | number | boolean)[][]; + rowsData: (boolean | number | string)[][]; } | string; @@ -59,7 +59,7 @@ export class ActivationLogPage implements OnInit, OnDestroy { private jsonToCsv( items: ActivationLogRecord[], ): - | { headerData: string[]; rowsData: (string | number | boolean)[][] } + | { headerData: string[]; rowsData: (boolean | number | string)[][] } | string { if (items.length === 0) { return ''; diff --git a/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard-routing.module.ts b/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard-routing.module.ts index 2e92b0c37..28015715b 100644 --- a/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard-routing.module.ts +++ b/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard-routing.module.ts @@ -1,8 +1,8 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { ActivationLogPage } from './activation-log/activation.log.page'; -import { DashboardPage } from './dashboard.page'; -import { StatusReportPage } from './status-report/status-report.page'; +import { ActivationLogPage } from 'src/app/pages/dashboard/activation-log/activation.log.page'; +import { DashboardPage } from 'src/app/pages/dashboard/dashboard.page'; +import { StatusReportPage } from 'src/app/pages/dashboard/status-report/status-report.page'; const routes: Routes = [ { diff --git a/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.module.ts b/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.module.ts index 209e0496a..9a6304069 100644 --- a/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.module.ts +++ b/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.module.ts @@ -2,11 +2,11 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { IonicModule } from '@ionic/angular'; +import { ActivationLogPage } from 'src/app/pages/dashboard/activation-log/activation.log.page'; +import { DashboardPage } from 'src/app/pages/dashboard/dashboard.page'; +import { DashboardPageRoutingModule } from 'src/app/pages/dashboard/dashboard-routing.module'; +import { StatusReportPage } from 'src/app/pages/dashboard/status-report/status-report.page'; import { SharedModule } from 'src/app/shared.module'; -import { ActivationLogPage } from './activation-log/activation.log.page'; -import { DashboardPageRoutingModule } from './dashboard-routing.module'; -import { DashboardPage } from './dashboard.page'; -import { StatusReportPage } from './status-report/status-report.page'; @NgModule({ imports: [ diff --git a/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.page.ts b/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.page.ts index 87f8a8bf5..97b42e2c6 100644 --- a/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.page.ts +++ b/interfaces/IBF-dashboard/src/app/pages/dashboard/dashboard.page.ts @@ -4,10 +4,10 @@ import { DateTime } from 'luxon'; import { AnalyticsPage } from 'src/app/analytics/analytics.enum'; import { AnalyticsService } from 'src/app/analytics/analytics.service'; import { AuthService } from 'src/app/auth/auth.service'; -import { UserRole } from 'src/app/models/user/user-role.enum'; +import { ScreenOrientationPopoverComponent } from 'src/app/components/screen-orientation-popover/screen-orientation-popover.component'; import { User } from 'src/app/models/user/user.model'; +import { UserRole } from 'src/app/models/user/user-role.enum'; import { environment } from 'src/environments/environment'; -import { ScreenOrientationPopoverComponent } from '../../components/screen-orientation-popover/screen-orientation-popover.component'; @Component({ selector: 'app-dashboard', diff --git a/interfaces/IBF-dashboard/src/app/pages/dashboard/status-report/status-report.page.ts b/interfaces/IBF-dashboard/src/app/pages/dashboard/status-report/status-report.page.ts index 1bc6582e7..309617548 100644 --- a/interfaces/IBF-dashboard/src/app/pages/dashboard/status-report/status-report.page.ts +++ b/interfaces/IBF-dashboard/src/app/pages/dashboard/status-report/status-report.page.ts @@ -1,12 +1,12 @@ import { Component, OnInit } from '@angular/core'; -import { ApiService } from '../../../services/api.service'; -import { CountryService } from '../../../services/country.service'; -import { RecentDate } from '../../../types/recent-date'; -import { Country, DisasterType } from '../../../models/country.model'; -import { DISASTER_TYPES_SVG_MAP } from '../../../config'; -import { EventService, EventSummary } from '../../../services/event.service'; -import { format, parseISO } from 'date-fns'; import { TranslateService } from '@ngx-translate/core'; +import { format, parseISO } from 'date-fns'; +import { DISASTER_TYPES_SVG_MAP } from 'src/app/config'; +import { Country, DisasterType } from 'src/app/models/country.model'; +import { ApiService } from 'src/app/services/api.service'; +import { CountryService } from 'src/app/services/country.service'; +import { EventService, EventSummary } from 'src/app/services/event.service'; +import { RecentDate } from 'src/app/types/recent-date'; interface DisasterStatus { imgSrc: string; @@ -14,13 +14,9 @@ interface DisasterStatus { isStale: boolean; } -interface CountryStatus { - [key: string]: DisasterStatus; -} +type CountryStatus = Record; -interface StatusData { - [key: string]: CountryStatus; -} +type StatusData = Record; @Component({ selector: 'app-status-report', @@ -54,9 +50,9 @@ export class StatusReportPage implements OnInit { }; this.apiService .getRecentDates(country.countryCodeISO3, disasterType.disasterType) - .subscribe((date) => - this.onRecentDates(date, country.countryCodeISO3, disasterType), - ); + .subscribe((date) => { + this.onRecentDates(date, country.countryCodeISO3, disasterType); + }); } } }; @@ -80,9 +76,9 @@ export class StatusReportPage implements OnInit { this.apiService .getEventsSummary(countryCodeISO3, disasterType.disasterType) - .subscribe((events) => - this.onGetEvents(events, countryCodeISO3, disasterType), - ); + .subscribe((events) => { + this.onGetEvents(events, countryCodeISO3, disasterType); + }); }; private onGetEvents = ( diff --git a/interfaces/IBF-dashboard/src/app/pages/login/login-routing.module.ts b/interfaces/IBF-dashboard/src/app/pages/login/login-routing.module.ts index 775e38217..c275b8f21 100644 --- a/interfaces/IBF-dashboard/src/app/pages/login/login-routing.module.ts +++ b/interfaces/IBF-dashboard/src/app/pages/login/login-routing.module.ts @@ -1,6 +1,6 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; -import { LoginPage } from './login.page'; +import { LoginPage } from 'src/app/pages/login/login.page'; const routes: Routes = [ { diff --git a/interfaces/IBF-dashboard/src/app/pages/login/login.module.ts b/interfaces/IBF-dashboard/src/app/pages/login/login.module.ts index 741c1d2c0..98d9c7b16 100644 --- a/interfaces/IBF-dashboard/src/app/pages/login/login.module.ts +++ b/interfaces/IBF-dashboard/src/app/pages/login/login.module.ts @@ -2,9 +2,9 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { IonicModule } from '@ionic/angular'; -import { SharedModule } from '../../shared.module'; -import { LoginPageRoutingModule } from './login-routing.module'; -import { LoginPage } from './login.page'; +import { LoginPage } from 'src/app/pages/login/login.page'; +import { LoginPageRoutingModule } from 'src/app/pages/login/login-routing.module'; +import { SharedModule } from 'src/app/shared.module'; @NgModule({ imports: [ diff --git a/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.spec.ts b/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.spec.ts index df0446814..ae7941e47 100644 --- a/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.spec.ts +++ b/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.spec.ts @@ -1,4 +1,4 @@ -import { CompactPipe } from './compact.pipe'; +import { CompactPipe } from 'src/app/pipes/compact.pipe'; describe('CompactPipe', () => { it('create an instance', () => { diff --git a/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts b/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts index 29c7ad252..15b5732b7 100644 --- a/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts +++ b/interfaces/IBF-dashboard/src/app/pipes/compact.pipe.ts @@ -1,5 +1,5 @@ import { Inject, LOCALE_ID, Pipe, PipeTransform } from '@angular/core'; -import { NumberFormat } from '../types/indicator-group'; +import { NumberFormat } from 'src/app/types/indicator-group'; @Pipe({ standalone: true, diff --git a/interfaces/IBF-dashboard/src/app/services/admin-level.service.ts b/interfaces/IBF-dashboard/src/app/services/admin-level.service.ts index f0355111b..a2e214b73 100644 --- a/interfaces/IBF-dashboard/src/app/services/admin-level.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/admin-level.service.ts @@ -1,23 +1,23 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs'; +import { + Country, + CountryDisasterSettings, + DisasterType, +} from 'src/app/models/country.model'; +import { PlaceCode } from 'src/app/models/place-code.model'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { EventService } from 'src/app/services/event.service'; +import { TimelineService } from 'src/app/services/timeline.service'; import { AdminLevel, AdminLevelLabel, AdminLevelType, } from 'src/app/types/admin-level'; -import { - Country, - CountryDisasterSettings, - DisasterType, -} from '../models/country.model'; -import { PlaceCode } from '../models/place-code.model'; -import { EventState } from '../types/event-state'; -import { IbfLayerName } from '../types/ibf-layer'; -import { TimelineState } from '../types/timeline-state'; -import { CountryService } from './country.service'; -import { DisasterTypeService } from './disaster-type.service'; -import { EventService } from './event.service'; -import { TimelineService } from './timeline.service'; +import { EventState } from 'src/app/types/event-state'; +import { IbfLayerName } from 'src/app/types/ibf-layer'; +import { TimelineState } from 'src/app/types/timeline-state'; export class AdminLevelButton { adminLevel: AdminLevel; diff --git a/interfaces/IBF-dashboard/src/app/services/aggregates.service.ts b/interfaces/IBF-dashboard/src/app/services/aggregates.service.ts index 263be599c..72e0a58df 100644 --- a/interfaces/IBF-dashboard/src/app/services/aggregates.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/aggregates.service.ts @@ -1,27 +1,27 @@ import { Injectable } from '@angular/core'; import { BehaviorSubject, Observable } from 'rxjs'; +import { Country, DisasterType } from 'src/app/models/country.model'; +import { PlaceCode } from 'src/app/models/place-code.model'; +import { AdminLevelService } from 'src/app/services/admin-level.service'; import { ApiService } from 'src/app/services/api.service'; import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { EapActionsService } from 'src/app/services/eap-actions.service'; +import { EventService } from 'src/app/services/event.service'; import { MapService } from 'src/app/services/map.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; import { TimelineService } from 'src/app/services/timeline.service'; +import { AdminLevel } from 'src/app/types/admin-level'; +import { EventState } from 'src/app/types/event-state'; +import { IbfLayerName } from 'src/app/types/ibf-layer'; import { Indicator, NumberFormat } from 'src/app/types/indicator-group'; -import { Country, DisasterType } from '../models/country.model'; -import { PlaceCode } from '../models/place-code.model'; -import { AdminLevel } from '../types/admin-level'; -import { EventState } from '../types/event-state'; -import { IbfLayerName } from '../types/ibf-layer'; -import { TimelineState } from '../types/timeline-state'; -import { TriggeredArea } from '../types/triggered-area'; -import { AdminLevelService } from './admin-level.service'; -import { DisasterTypeService } from './disaster-type.service'; -import { EapActionsService } from './eap-actions.service'; -import { EventService } from './event.service'; -import { PlaceCodeService } from './place-code.service'; +import { TimelineState } from 'src/app/types/timeline-state'; +import { TriggeredArea } from 'src/app/types/triggered-area'; export enum AreaStatus { - TriggeredOrWarned = 'triggered-or-warned', NonTriggeredOrWarnd = 'non-triggered-or-warned', Stopped = 'stopped', + TriggeredOrWarned = 'triggered-or-warned', } @Injectable({ providedIn: 'root', @@ -144,9 +144,9 @@ export class AggregatesService { private onIndicatorChange = (indicators) => { this.indicators = indicators; this.mapService.removeAggregateLayers(); - this.indicators.forEach((indicator) => - this.mapService.loadAggregateLayer(indicator), - ); + this.indicators.forEach((indicator) => { + this.mapService.loadAggregateLayer(indicator); + }); this.indicatorSubject.next(this.indicators); this.loadAggregateInformation(); diff --git a/interfaces/IBF-dashboard/src/app/services/api.service.ts b/interfaces/IBF-dashboard/src/app/services/api.service.ts index dd3954a55..270564d6d 100644 --- a/interfaces/IBF-dashboard/src/app/services/api.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/api.service.ts @@ -3,19 +3,19 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { map, tap } from 'rxjs/operators'; import { DEBUG_LOG } from 'src/app/config'; -import { CountryTriggers } from 'src/app/models/country-triggers.model'; import { Country, DisasterType } from 'src/app/models/country.model'; +import { CountryTriggers } from 'src/app/models/country-triggers.model'; +import { User } from 'src/app/models/user/user.model'; +import { EventSummary } from 'src/app/services/event.service'; import { JwtService } from 'src/app/services/jwt.service'; import { AdminLevel } from 'src/app/types/admin-level'; +import { Aggregate } from 'src/app/types/aggregate'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; +import { IbfLayerName } from 'src/app/types/ibf-layer'; import { LeadTime } from 'src/app/types/lead-time'; +import { RecentDate } from 'src/app/types/recent-date'; +import { TriggeredArea } from 'src/app/types/triggered-area'; import { environment } from 'src/environments/environment'; -import { User } from '../models/user/user.model'; -import { Aggregate } from '../types/aggregate'; -import { DisasterTypeKey } from '../types/disaster-type-key'; -import { IbfLayerName } from '../types/ibf-layer'; -import { RecentDate } from '../types/recent-date'; -import { TriggeredArea } from '../types/triggered-area'; -import { EventSummary } from './event.service'; @Injectable({ providedIn: 'root', @@ -64,13 +64,13 @@ export class ApiService { params, }) .pipe( - tap((response) => + tap((response) => { this.log( `ApiService GET: ${security} ${url}`, '\nResponse:', response, - ), - ), + ); + }), ); } @@ -85,14 +85,14 @@ export class ApiService { headers: this.createHeaders(anonymous), }) .pipe( - tap((response) => + tap((response) => { this.log( `ApiService POST: ${security} ${url}:`, body, '\nResponse:', response, - ), - ), + ); + }), ); } @@ -107,14 +107,14 @@ export class ApiService { headers: this.createHeaders(anonymous), }) .pipe( - tap((response) => + tap((response) => { this.log( `ApiService PUT: ${security} ${url}:`, body, '\nResponse:', response, - ), - ), + ); + }), ); } diff --git a/interfaces/IBF-dashboard/src/app/services/auth.interceptor.service.ts b/interfaces/IBF-dashboard/src/app/services/auth.interceptor.service.ts index 7de498faa..8fb1a2621 100644 --- a/interfaces/IBF-dashboard/src/app/services/auth.interceptor.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/auth.interceptor.service.ts @@ -9,8 +9,8 @@ import { import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { tap } from 'rxjs/operators'; +import { AuthService } from 'src/app/auth/auth.service'; import { environment } from 'src/environments/environment'; -import { AuthService } from '../auth/auth.service'; @Injectable({ providedIn: 'root' }) export class AuthInterceptorService implements HttpInterceptor { @@ -22,8 +22,12 @@ export class AuthInterceptorService implements HttpInterceptor { ): Observable> { return next.handle(request).pipe( tap( - (event) => this.handleResponse(event), - (error) => this.handleError(error), + (event) => { + this.handleResponse(event); + }, + (error) => { + this.handleError(error); + }, ), ); } diff --git a/interfaces/IBF-dashboard/src/app/services/country.service.ts b/interfaces/IBF-dashboard/src/app/services/country.service.ts index f1fdc6bc4..db4e7aa6d 100644 --- a/interfaces/IBF-dashboard/src/app/services/country.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/country.service.ts @@ -1,10 +1,10 @@ import { Injectable } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { BehaviorSubject, Observable } from 'rxjs'; +import { AuthService } from 'src/app/auth/auth.service'; import { Country } from 'src/app/models/country.model'; import { User } from 'src/app/models/user/user.model'; -import { AuthService } from '../auth/auth.service'; -import { ApiService } from './api.service'; +import { ApiService } from 'src/app/services/api.service'; @Injectable({ providedIn: 'root', @@ -59,7 +59,7 @@ export class CountryService { country.countryCodeISO3 === countryCodeISO3; private filterCountryByUser = (user: User) => (country) => - user.countries.indexOf(country.countryCodeISO3) >= 0; + user.countries.includes(country.countryCodeISO3); public selectCountry = (countryCodeISO3: string): void => { this.countrySubject.next( @@ -68,7 +68,7 @@ export class CountryService { }; public filterCountriesByUser(user: User): void { - if (!user || !user.countries) { + if (!user?.countries) { this.countries = []; } else { this.countries = this.countries diff --git a/interfaces/IBF-dashboard/src/app/services/disaster-type.service.ts b/interfaces/IBF-dashboard/src/app/services/disaster-type.service.ts index 56889e40d..b603f4474 100644 --- a/interfaces/IBF-dashboard/src/app/services/disaster-type.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/disaster-type.service.ts @@ -4,9 +4,9 @@ import { Country, CountryDisasterSettings, DisasterType, -} from '../models/country.model'; -import { DisasterTypeKey } from '../types/disaster-type-key'; -import { CountryService } from './country.service'; +} from 'src/app/models/country.model'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; @Injectable({ providedIn: 'root', diff --git a/interfaces/IBF-dashboard/src/app/services/eap-actions.service.ts b/interfaces/IBF-dashboard/src/app/services/eap-actions.service.ts index af9fc9258..1bbf69071 100644 --- a/interfaces/IBF-dashboard/src/app/services/eap-actions.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/eap-actions.service.ts @@ -1,25 +1,25 @@ import { Injectable } from '@angular/core'; import { DateTime } from 'luxon'; import { BehaviorSubject, Observable } from 'rxjs'; -import { ApiService } from 'src/app/services/api.service'; -import { CountryService } from 'src/app/services/country.service'; import { Country, CountryDisasterSettings, DisasterType, -} from '../models/country.model'; -import { PlaceCode } from '../models/place-code.model'; -import { AdminLevelType } from '../types/admin-level'; -import { EapAction } from '../types/eap-action'; -import { EventState } from '../types/event-state'; -import { LeadTime } from '../types/lead-time'; -import { TimelineState } from '../types/timeline-state'; -import { AlertLabel, TriggeredArea } from '../types/triggered-area'; -import { AdminLevelService } from './admin-level.service'; -import { DisasterTypeService } from './disaster-type.service'; -import { EventService } from './event.service'; -import { PlaceCodeService } from './place-code.service'; -import { TimelineService } from './timeline.service'; +} from 'src/app/models/country.model'; +import { PlaceCode } from 'src/app/models/place-code.model'; +import { AdminLevelService } from 'src/app/services/admin-level.service'; +import { ApiService } from 'src/app/services/api.service'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { EventService } from 'src/app/services/event.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; +import { TimelineService } from 'src/app/services/timeline.service'; +import { AdminLevelType } from 'src/app/types/admin-level'; +import { EapAction } from 'src/app/types/eap-action'; +import { EventState } from 'src/app/types/event-state'; +import { LeadTime } from 'src/app/types/lead-time'; +import { TimelineState } from 'src/app/types/timeline-state'; +import { AlertLabel, TriggeredArea } from 'src/app/types/triggered-area'; @Injectable({ providedIn: 'root', diff --git a/interfaces/IBF-dashboard/src/app/services/event.service.ts b/interfaces/IBF-dashboard/src/app/services/event.service.ts index 8878f1980..50f75e62e 100644 --- a/interfaces/IBF-dashboard/src/app/services/event.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/event.service.ts @@ -1,22 +1,22 @@ import { Injectable } from '@angular/core'; +import { + differenceInDays, + differenceInHours, + differenceInMonths, +} from 'date-fns'; import { DateTime } from 'luxon'; import { BehaviorSubject, Observable } from 'rxjs'; -import { ApiService } from 'src/app/services/api.service'; -import { CountryService } from 'src/app/services/country.service'; -import { LeadTimeTriggerKey, LeadTimeUnit } from 'src/app/types/lead-time'; import { Country, CountryDisasterSettings, DisasterType, -} from '../models/country.model'; -import { DisasterTypeKey } from '../types/disaster-type-key'; -import { EventState } from '../types/event-state'; -import { DisasterTypeService } from './disaster-type.service'; -import { - differenceInDays, - differenceInHours, - differenceInMonths, -} from 'date-fns'; +} from 'src/app/models/country.model'; +import { ApiService } from 'src/app/services/api.service'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; +import { EventState } from 'src/app/types/event-state'; +import { LeadTimeTriggerKey, LeadTimeUnit } from 'src/app/types/lead-time'; export class EventSummary { countryCodeISO3: string; @@ -179,7 +179,9 @@ export class EventService { this.country.countryCodeISO3, this.disasterType.disasterType, ) - .subscribe((date) => this.onRecentDates(date, events)); + .subscribe((date) => { + this.onRecentDates(date, events); + }); }; private onRecentDates = (date, events) => { diff --git a/interfaces/IBF-dashboard/src/app/services/loader.interceptor.service.ts b/interfaces/IBF-dashboard/src/app/services/loader.interceptor.service.ts index ce541d32f..f8f533851 100644 --- a/interfaces/IBF-dashboard/src/app/services/loader.interceptor.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/loader.interceptor.service.ts @@ -8,7 +8,7 @@ import { import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { tap } from 'rxjs/operators'; -import { LoaderService } from './loader.service'; +import { LoaderService } from 'src/app/services/loader.service'; @Injectable({ providedIn: 'root', diff --git a/interfaces/IBF-dashboard/src/app/services/loader.service.spec.ts b/interfaces/IBF-dashboard/src/app/services/loader.service.spec.ts index e03eb135a..3e2a1d424 100644 --- a/interfaces/IBF-dashboard/src/app/services/loader.service.spec.ts +++ b/interfaces/IBF-dashboard/src/app/services/loader.service.spec.ts @@ -1,5 +1,5 @@ import { TestBed } from '@angular/core/testing'; -import { LoaderService } from './loader.service'; +import { LoaderService } from 'src/app/services/loader.service'; describe('LoaderService', () => { let service: LoaderService; diff --git a/interfaces/IBF-dashboard/src/app/services/map-legend.service.ts b/interfaces/IBF-dashboard/src/app/services/map-legend.service.ts index 2356a45cc..335130dc4 100644 --- a/interfaces/IBF-dashboard/src/app/services/map-legend.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/map-legend.service.ts @@ -1,24 +1,24 @@ import { Injectable } from '@angular/core'; -import { Country, DisasterType } from '../models/country.model'; -import { breakKey } from '../models/map.model'; -import { EventState } from '../types/event-state'; +import { Country, DisasterType } from 'src/app/models/country.model'; +import { breakKey } from 'src/app/models/map.model'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { EventService } from 'src/app/services/event.service'; +import { MapService } from 'src/app/services/map.service'; +import { EventState } from 'src/app/types/event-state'; import { IbfLayer, IbfLayerLabel, IbfLayerName, wmsLegendType, -} from '../types/ibf-layer'; -import { NumberFormat } from '../types/indicator-group'; -import { CountryService } from './country.service'; -import { DisasterTypeService } from './disaster-type.service'; -import { EventService } from './event.service'; -import { MapService } from './map.service'; +} from 'src/app/types/ibf-layer'; +import { NumberFormat } from 'src/app/types/indicator-group'; enum SingleRowLegendType { fullSquare = 'full-square', fullSquareGradient = 'full-square-gradient', - outlineSquare = 'outline-square', line = 'line', + outlineSquare = 'outline-square', pin = 'pin', } @Injectable({ @@ -266,9 +266,8 @@ export class MapLegendService { private getLabel = (grades, layer, labels) => (i) => { const label = labels ? ' - ' + labels[i] : ''; if (layer.colorBreaks) { - const valueLow = layer.colorBreaks && layer.colorBreaks[i + 1]?.valueLow; - const valueHigh = - layer.colorBreaks && layer.colorBreaks[i + 1]?.valueHigh; + const valueLow = layer.colorBreaks?.[i + 1]?.valueLow; + const valueHigh = layer.colorBreaks?.[i + 1]?.valueHigh; if (valueLow === valueHigh) { return this.numberFormat(valueHigh, layer) + label + '
'; } else { diff --git a/interfaces/IBF-dashboard/src/app/services/map-view.service.ts b/interfaces/IBF-dashboard/src/app/services/map-view.service.ts index d22d71d5c..1d10fd930 100644 --- a/interfaces/IBF-dashboard/src/app/services/map-view.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/map-view.service.ts @@ -4,14 +4,14 @@ import { Country, CountryDisasterSettings, DisasterType, -} from '../models/country.model'; -import { PlaceCode } from '../models/place-code.model'; -import { EventState } from '../types/event-state'; -import { MapView } from '../types/map-view'; -import { CountryService } from './country.service'; -import { DisasterTypeService } from './disaster-type.service'; -import { EventService } from './event.service'; -import { PlaceCodeService } from './place-code.service'; +} from 'src/app/models/country.model'; +import { PlaceCode } from 'src/app/models/place-code.model'; +import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { EventService } from 'src/app/services/event.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; +import { EventState } from 'src/app/types/event-state'; +import { MapView } from 'src/app/types/map-view'; @Injectable({ providedIn: 'root', @@ -83,7 +83,7 @@ export class MapViewService { return; } - if (!this.eventState || !this.eventState.event) { + if (!this.eventState?.event) { this.setBreadcrumbsMapView(MapView.national); return; } diff --git a/interfaces/IBF-dashboard/src/app/services/place-code.service.spec.ts b/interfaces/IBF-dashboard/src/app/services/place-code.service.spec.ts index 9cdaa9897..f0da7356c 100644 --- a/interfaces/IBF-dashboard/src/app/services/place-code.service.spec.ts +++ b/interfaces/IBF-dashboard/src/app/services/place-code.service.spec.ts @@ -1,5 +1,5 @@ import { TestBed } from '@angular/core/testing'; -import { PlaceCodeService } from './place-code.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; describe('PlaceCodeService', () => { let service: PlaceCodeService; diff --git a/interfaces/IBF-dashboard/src/app/services/point-marker.service.ts b/interfaces/IBF-dashboard/src/app/services/point-marker.service.ts index 6f3eabd06..18c938cd7 100644 --- a/interfaces/IBF-dashboard/src/app/services/point-marker.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/point-marker.service.ts @@ -6,6 +6,13 @@ import { } from '@angular/core'; import { divIcon, icon, IconOptions, LatLng, Marker, marker } from 'leaflet'; import { DateTime } from 'luxon'; +import { + AnalyticsEvent, + AnalyticsPage, +} from 'src/app/analytics/analytics.enum'; +import { AnalyticsService } from 'src/app/analytics/analytics.service'; +import { CommunityNotificationPopupComponent } from 'src/app/components/community-notification-popup/community-notification-popup.component'; +import { DynamicPointPopupComponent } from 'src/app/components/leaflet-popup/dynamic-point-popup/dynamic-point-popup.component'; import { LEAFLET_MARKER_ICON_OPTIONS_BASE, LEAFLET_MARKER_ICON_OPTIONS_COMMUNITY_NOTIFICATION, @@ -20,6 +27,10 @@ import { LEAFLET_MARKER_ICON_OPTIONS_WATER_POINT, LEAFLET_MARKER_ICON_OPTIONS_WATER_POINT_EXPOSED, } from 'src/app/config'; +import { + CountryDisasterSettings, + EapAlertClasses, +} from 'src/app/models/country.model'; import { CommunityNotification, DamSite, @@ -33,17 +44,9 @@ import { Waterpoint, WaterpointInternal, } from 'src/app/models/poi.model'; -import { AnalyticsEvent, AnalyticsPage } from '../analytics/analytics.enum'; -import { AnalyticsService } from '../analytics/analytics.service'; -import { CommunityNotificationPopupComponent } from '../components/community-notification-popup/community-notification-popup.component'; -import { DynamicPointPopupComponent } from '../components/leaflet-popup/dynamic-point-popup/dynamic-point-popup.component'; -import { - CountryDisasterSettings, - EapAlertClasses, -} from '../models/country.model'; -import { IbfLayerName } from '../types/ibf-layer'; -import { LeadTime } from '../types/lead-time'; -import { EventService, EventSummary } from './event.service'; +import { EventService, EventSummary } from 'src/app/services/event.service'; +import { IbfLayerName } from 'src/app/types/ibf-layer'; +import { LeadTime } from 'src/app/types/lead-time'; @Injectable({ providedIn: 'root', diff --git a/interfaces/IBF-dashboard/src/app/services/timeline.service.ts b/interfaces/IBF-dashboard/src/app/services/timeline.service.ts index d8fa86674..3a81dc829 100644 --- a/interfaces/IBF-dashboard/src/app/services/timeline.service.ts +++ b/interfaces/IBF-dashboard/src/app/services/timeline.service.ts @@ -1,26 +1,26 @@ import { Injectable } from '@angular/core'; import { DateTime } from 'luxon'; import { BehaviorSubject, Observable } from 'rxjs'; +import { + Country, + CountryDisasterSettings, + DisasterType, +} from 'src/app/models/country.model'; +import { CountryTriggers } from 'src/app/models/country-triggers.model'; import { ApiService } from 'src/app/services/api.service'; import { CountryService } from 'src/app/services/country.service'; +import { DisasterTypeService } from 'src/app/services/disaster-type.service'; +import { EventService } from 'src/app/services/event.service'; +import { PlaceCodeService } from 'src/app/services/place-code.service'; +import { DisasterTypeKey } from 'src/app/types/disaster-type-key'; +import { EventState } from 'src/app/types/event-state'; import { LeadTime, LeadTimeButtonInput, LeadTimeTriggerKey, LeadTimeUnit, } from 'src/app/types/lead-time'; -import { CountryTriggers } from '../models/country-triggers.model'; -import { - Country, - CountryDisasterSettings, - DisasterType, -} from '../models/country.model'; -import { DisasterTypeKey } from '../types/disaster-type-key'; -import { EventState } from '../types/event-state'; -import { TimelineState } from '../types/timeline-state'; -import { DisasterTypeService } from './disaster-type.service'; -import { EventService } from './event.service'; -import { PlaceCodeService } from './place-code.service'; +import { TimelineState } from 'src/app/types/timeline-state'; @Injectable({ providedIn: 'root', @@ -335,7 +335,7 @@ export class TimelineService { for (const leadTime of disasterLeadTimes) { // Push first only active lead-times .. if ( - visibleLeadTimes.map((lt) => lt.leadTime).indexOf(leadTime) === -1 && + !visibleLeadTimes.map((lt) => lt.leadTime).includes(leadTime) && this.isLeadTimeEnabled(leadTime, visibleLeadTimes) ) { if (this.hasDisabledTimeline(this.disasterType.disasterType)) { @@ -367,7 +367,7 @@ export class TimelineService { // .. and then all other lead-times if ( // skip already added leadTimes - visibleLeadTimes.map((lt) => lt.leadTime).indexOf(leadTime) === -1 && + !visibleLeadTimes.map((lt) => lt.leadTime).includes(leadTime) && // and decide for others to show or not this.filterVisibleLeadTimePerDisasterType( this.disasterType, @@ -448,13 +448,13 @@ export class TimelineService { return ( [ LeadTime.hour0, + LeadTime.hour120, + LeadTime.hour144, + LeadTime.hour168, LeadTime.hour24, LeadTime.hour48, LeadTime.hour72, LeadTime.hour96, - LeadTime.hour120, - LeadTime.hour144, - LeadTime.hour168, ].includes(leadTime) && // .. except if already one present for that day !activeLeadTimes diff --git a/interfaces/IBF-dashboard/src/app/shared.module.ts b/interfaces/IBF-dashboard/src/app/shared.module.ts index 3f3913495..59ed1ff8d 100644 --- a/interfaces/IBF-dashboard/src/app/shared.module.ts +++ b/interfaces/IBF-dashboard/src/app/shared.module.ts @@ -5,51 +5,51 @@ import { LeafletModule } from '@bluehalo/ngx-leaflet'; import { LeafletMarkerClusterModule } from '@bluehalo/ngx-leaflet-markercluster'; import { IonicModule } from '@ionic/angular'; import { TranslateModule } from '@ngx-translate/core'; -import { AnalyticsModule } from './analytics/analytics.module'; -import { AboutBtnComponent } from './components/about-btn/about-btn.component'; -import { ActionResultPopoverComponent } from './components/action-result-popover/action-result-popover.component'; -import { ActivationLogButtonComponent } from './components/activation-log-button/activation-log-button.component'; -import { AdminLevelComponent } from './components/admin-level/admin-level.component'; -import { AggregatesComponent } from './components/aggregates/aggregates.component'; -import { AreasOfFocusSummaryComponent } from './components/areas-of-focus-summary/areas-of-focus-summary.component'; -import { ChangePasswordPopoverComponent } from './components/change-password-popover/change-password-popover.component'; -import { ChatComponent } from './components/chat/chat.component'; -import { CommunityNotificationPhotoPopupComponent } from './components/community-notification-photo-popup/community-notification-photo-popup.component'; -import { CommunityNotificationPopupComponent } from './components/community-notification-popup/community-notification-popup.component'; -import { CountrySwitcherComponent } from './components/country-switcher/country-switcher.component'; -import { DateButtonComponent } from './components/date-button/date-button.component'; -import { DialogueTurnComponent } from './components/dialogue-turn/dialogue-turn.component'; -import { DisasterTypeComponent } from './components/disaster-type/disaster-type.component'; -import { DisclaimerToolbarComponent } from './components/disclaimer-toolbar/disclaimer-toolbar.component'; -import { EventSpeechBubbleComponent } from './components/event-speech-bubble/event-speech-bubble.component'; -import { EventSwitcherComponent } from './components/event-switcher/event-switcher.component'; -import { ExportViewPopoverComponent } from './components/export-view-popover/export-view-popover.component'; -import { ExportViewComponent } from './components/export-view/export-view.component'; -import { ForgotPasswordPopoverComponent } from './components/forgot-password-popover/forgot-password-popover.component'; -import { IbfButtonComponent } from './components/ibf-button/ibf-button.component'; -import { IbfGuideButtonComponent } from './components/ibf-guide-button/ibf-guide-button.component'; -import { IbfGuidePopoverComponent } from './components/ibf-guide-popover/ibf-guide-popover.component'; -import { LayerControlInfoPopoverComponent } from './components/layer-control-info-popover/layer-control-info-popover.component'; -import { DynamicPointPopupComponent } from './components/leaflet-popup/dynamic-point-popup/dynamic-point-popup.component'; -import { GlofasStationPopupContentComponent } from './components/leaflet-popup/glofas-station-popup-content/glofas-station-popup-content.component'; -import { RiverGaugePopupContentComponent } from './components/leaflet-popup/river-gauge-popup-content/river-gauge-popup-content.component'; -import { ThresholdBarComponent } from './components/leaflet-popup/threshold-bar/threshold-bar.component'; -import { TyphoonTrackpointPopupContentComponent } from './components/leaflet-popup/typhoon-trackpoint-popup-content/typhoon-trackpoint-popup-content.component'; -import { LoginFormComponent } from './components/login-form/login-form.component'; -import { LogosComponent } from './components/logos/logos.component'; -import { MapControlsComponent } from './components/map-controls/map-controls.component'; -import { MapComponent } from './components/map/map.component'; -import { MatrixComponent } from './components/matrix/matrix.component'; -import { ScreenOrientationPopoverComponent } from './components/screen-orientation-popover/screen-orientation-popover.component'; -import { TimelineComponent } from './components/timeline/timeline.component'; -import { TimestampComponent } from './components/timestamp/timestamp.component'; -import { ToggleTriggerPopoverComponent } from './components/toggle-trigger-popover/toggle-trigger-popover.component'; -import { TooltipPopoverComponent } from './components/tooltip-popover/tooltip-popover.component'; -import { TooltipComponent } from './components/tooltip/tooltip.component'; -import { UserStateComponent } from './components/user-state/user-state.component'; -import { BackendMockScenarioComponent } from './mocks/backend-mock-scenario-component/backend-mock-scenario.component'; -import { CompactPipe } from './pipes/compact.pipe'; -import { DisclaimerApproximateComponent } from './components/disclaimer-approximate/disclaimer-approximate.component'; +import { AnalyticsModule } from 'src/app/analytics/analytics.module'; +import { AboutBtnComponent } from 'src/app/components/about-btn/about-btn.component'; +import { ActionResultPopoverComponent } from 'src/app/components/action-result-popover/action-result-popover.component'; +import { ActivationLogButtonComponent } from 'src/app/components/activation-log-button/activation-log-button.component'; +import { AdminLevelComponent } from 'src/app/components/admin-level/admin-level.component'; +import { AggregatesComponent } from 'src/app/components/aggregates/aggregates.component'; +import { AreasOfFocusSummaryComponent } from 'src/app/components/areas-of-focus-summary/areas-of-focus-summary.component'; +import { ChangePasswordPopoverComponent } from 'src/app/components/change-password-popover/change-password-popover.component'; +import { ChatComponent } from 'src/app/components/chat/chat.component'; +import { CommunityNotificationPhotoPopupComponent } from 'src/app/components/community-notification-photo-popup/community-notification-photo-popup.component'; +import { CommunityNotificationPopupComponent } from 'src/app/components/community-notification-popup/community-notification-popup.component'; +import { CountrySwitcherComponent } from 'src/app/components/country-switcher/country-switcher.component'; +import { DateButtonComponent } from 'src/app/components/date-button/date-button.component'; +import { DialogueTurnComponent } from 'src/app/components/dialogue-turn/dialogue-turn.component'; +import { DisasterTypeComponent } from 'src/app/components/disaster-type/disaster-type.component'; +import { DisclaimerApproximateComponent } from 'src/app/components/disclaimer-approximate/disclaimer-approximate.component'; +import { DisclaimerToolbarComponent } from 'src/app/components/disclaimer-toolbar/disclaimer-toolbar.component'; +import { EventSpeechBubbleComponent } from 'src/app/components/event-speech-bubble/event-speech-bubble.component'; +import { EventSwitcherComponent } from 'src/app/components/event-switcher/event-switcher.component'; +import { ExportViewComponent } from 'src/app/components/export-view/export-view.component'; +import { ExportViewPopoverComponent } from 'src/app/components/export-view-popover/export-view-popover.component'; +import { ForgotPasswordPopoverComponent } from 'src/app/components/forgot-password-popover/forgot-password-popover.component'; +import { IbfButtonComponent } from 'src/app/components/ibf-button/ibf-button.component'; +import { IbfGuideButtonComponent } from 'src/app/components/ibf-guide-button/ibf-guide-button.component'; +import { IbfGuidePopoverComponent } from 'src/app/components/ibf-guide-popover/ibf-guide-popover.component'; +import { LayerControlInfoPopoverComponent } from 'src/app/components/layer-control-info-popover/layer-control-info-popover.component'; +import { DynamicPointPopupComponent } from 'src/app/components/leaflet-popup/dynamic-point-popup/dynamic-point-popup.component'; +import { GlofasStationPopupContentComponent } from 'src/app/components/leaflet-popup/glofas-station-popup-content/glofas-station-popup-content.component'; +import { RiverGaugePopupContentComponent } from 'src/app/components/leaflet-popup/river-gauge-popup-content/river-gauge-popup-content.component'; +import { ThresholdBarComponent } from 'src/app/components/leaflet-popup/threshold-bar/threshold-bar.component'; +import { TyphoonTrackpointPopupContentComponent } from 'src/app/components/leaflet-popup/typhoon-trackpoint-popup-content/typhoon-trackpoint-popup-content.component'; +import { LoginFormComponent } from 'src/app/components/login-form/login-form.component'; +import { LogosComponent } from 'src/app/components/logos/logos.component'; +import { MapComponent } from 'src/app/components/map/map.component'; +import { MapControlsComponent } from 'src/app/components/map-controls/map-controls.component'; +import { MatrixComponent } from 'src/app/components/matrix/matrix.component'; +import { ScreenOrientationPopoverComponent } from 'src/app/components/screen-orientation-popover/screen-orientation-popover.component'; +import { TimelineComponent } from 'src/app/components/timeline/timeline.component'; +import { TimestampComponent } from 'src/app/components/timestamp/timestamp.component'; +import { ToggleTriggerPopoverComponent } from 'src/app/components/toggle-trigger-popover/toggle-trigger-popover.component'; +import { TooltipComponent } from 'src/app/components/tooltip/tooltip.component'; +import { TooltipPopoverComponent } from 'src/app/components/tooltip-popover/tooltip-popover.component'; +import { UserStateComponent } from 'src/app/components/user-state/user-state.component'; +import { BackendMockScenarioComponent } from 'src/app/mocks/backend-mock-scenario-component/backend-mock-scenario.component'; +import { CompactPipe } from 'src/app/pipes/compact.pipe'; @NgModule({ imports: [ diff --git a/interfaces/IBF-dashboard/src/app/types/admin-level.ts b/interfaces/IBF-dashboard/src/app/types/admin-level.ts index 720e31e0b..2e890906e 100644 --- a/interfaces/IBF-dashboard/src/app/types/admin-level.ts +++ b/interfaces/IBF-dashboard/src/app/types/admin-level.ts @@ -6,9 +6,9 @@ export enum AdminLevel { } export enum AdminLevelType { - single = 'single', - deepest = 'deepest', - higher = 'higher', + deepest = 'deepest', // deepest of multiple admin-level + higher = 'higher', // non-deepest of multiple admin-level + single = 'single', // single admin level } export class AdminLevelLabel { diff --git a/interfaces/IBF-dashboard/src/app/types/disaster-type-key.ts b/interfaces/IBF-dashboard/src/app/types/disaster-type-key.ts index 93c5e7fb0..564b4c90f 100644 --- a/interfaces/IBF-dashboard/src/app/types/disaster-type-key.ts +++ b/interfaces/IBF-dashboard/src/app/types/disaster-type-key.ts @@ -1,9 +1,9 @@ export enum DisasterTypeKey { + dengue = 'dengue', + drought = 'drought', + flashFloods = 'flash-floods', floods = 'floods', heavyRain = 'heavy-rain', - dengue = 'dengue', malaria = 'malaria', - drought = 'drought', typhoon = 'typhoon', - flashFloods = 'flash-floods', } diff --git a/interfaces/IBF-dashboard/src/app/types/event-state.ts b/interfaces/IBF-dashboard/src/app/types/event-state.ts index 166a7a27c..16bb3dbbf 100644 --- a/interfaces/IBF-dashboard/src/app/types/event-state.ts +++ b/interfaces/IBF-dashboard/src/app/types/event-state.ts @@ -1,4 +1,4 @@ -import { EventSummary } from '../services/event.service'; +import { EventSummary } from 'src/app/services/event.service'; export class EventState { events: EventSummary[]; diff --git a/interfaces/IBF-dashboard/src/app/types/ibf-layer.ts b/interfaces/IBF-dashboard/src/app/types/ibf-layer.ts index 55b63d079..405760572 100644 --- a/interfaces/IBF-dashboard/src/app/types/ibf-layer.ts +++ b/interfaces/IBF-dashboard/src/app/types/ibf-layer.ts @@ -6,7 +6,7 @@ import { Marker, MarkerClusterGroup, } from 'leaflet'; -import { NumberFormat } from './indicator-group'; +import { NumberFormat } from 'src/app/types/indicator-group'; export class IbfLayerMetadata { name: IbfLayerName; @@ -33,7 +33,7 @@ export class IbfLayer { numberFormatMap?: NumberFormat; wms?: IbfLayerWMS; data?: GeoJSON.FeatureCollection; - leafletLayer?: Layer | LayerGroup | Marker | GeoJSON | MarkerClusterGroup; + leafletLayer?: GeoJSON | Layer | LayerGroup | Marker | MarkerClusterGroup; legendColor?: JSON | string; group?: IbfLayerGroup; dynamic?: boolean; @@ -44,8 +44,8 @@ export enum wmsLegendType { exposureLine = 'exposure-line', exposureSquare = 'exposure-square', gradient = 'gradient', - square = 'square', line = 'line', + square = 'square', } export enum IbfLayerThreshold { @@ -59,93 +59,93 @@ export enum IbfLayerType { } export enum IbfLayerName { - glofasStations = 'glofas_stations', - typhoonTrack = 'typhoon_track', - redCrossBranches = 'red_cross_branches', - redCrescentBranches = 'red_crescent_branches', - waterpoints = 'waterpoints', - floodExtent = 'flood_extent', - rainfallExtent = 'rainfall_extent', - rainfallForecast = 'rainfall_forecast', - population = 'population', adminRegions = 'adminRegions', adminRegions1 = 'adminRegions1', adminRegions2 = 'adminRegions2', adminRegions3 = 'adminRegions3', adminRegions4 = 'adminRegions4', + affectedPopulation = 'affected_population', + alertThreshold = 'alert_threshold', + communityNotifications = 'community_notifications', + covidRisk = 'covid_risk', cropland = 'cropland', + damSites = 'dams', + droughtPhaseClassification = 'drought_phase_classification', + evacuationCenters = 'evacuation_centers', + female_head_hh = 'female_head_hh', + flood_vulnerability_index = 'flood_vulnerability_index', + floodExtent = 'flood_extent', + gauges = 'gauges', + glofasStations = 'glofas_stations', grassland = 'grassland', + healthSites = 'health_sites', + hotspotGeneral = 'Hotspot_General', + hotspotHealth = 'Hotspot_Health', + hotspotNutrition = 'Hotspot_Nutrition', + hotspotWater = 'Hotspot_Water', + housesAffected = 'houses_affected', + ipcForecastLong = 'IPC_forecast_long', + ipcForecastShort = 'IPC_forecast_short', + livestockBodyCondition = 'livestock_body_condition', + malariaRisk = 'malaria_risk', + malariaSuitableTemperature = 'malaria_suitable_temperature', + motorizedTravelTimeToHealth = 'motorized_travel_time_to_health', + population = 'population', population_affected = 'population_affected', population_affected_percentage = 'population_affected_percentage', - populationTotal = 'populationTotal', - vulnerability_score = 'vulnerability_score', - flood_vulnerability_index = 'flood_vulnerability_index', - poverty_incidence = 'poverty_incidence', - female_head_hh = 'female_head_hh', - population_u8 = 'population_u8', population_over65 = 'population_over65', - wall_type = 'wall_type', - roof_type = 'roof_type', - covidRisk = 'covid_risk', - healthSites = 'health_sites', - damSites = 'dams', - alertThreshold = 'alert_threshold', + population_u5 = 'population_u5', + population_u8 = 'population_u8', + populationTotal = 'populationTotal', potentialCases = 'potential_cases', potentialCases65 = 'potential_cases_65', - potentialCasesU9 = 'potential_cases_U9', potentialCasesU5 = 'potential_cases_U5', - malariaRisk = 'malaria_risk', - vulnerableGroup = 'vulnerable_group', - vulnerableHousing = 'vulnerable_housing', + potentialCasesU9 = 'potential_cases_U9', + poverty_incidence = 'poverty_incidence', + probWithin50Km = 'prob_within_50km', + rainfall = 'rainfall', + rainfallExtent = 'rainfall_extent', + rainfallForecast = 'rainfall_forecast', + redCrescentBranches = 'red_crescent_branches', + redCrossBranches = 'red_cross_branches', + roads = 'roads', + roof_type = 'roof_type', + schools = 'schools', totalHouses = 'total_houses', - malariaSuitableTemperature = 'malaria_suitable_temperature', totalIdps = 'total_idps', - motorizedTravelTimeToHealth = 'motorized_travel_time_to_health', - walkingTravelTimeToHealth = 'walking_travel_time_to_health', travel_time_cities = 'travel_time_cities', - population_u5 = 'population_u5', - ipcForecastShort = 'IPC_forecast_short', - ipcForecastLong = 'IPC_forecast_long', - hotspotGeneral = 'Hotspot_General', - hotspotWater = 'Hotspot_Water', - hotspotHealth = 'Hotspot_Health', - hotspotNutrition = 'Hotspot_Nutrition', - windspeed = 'windspeed', - rainfall = 'rainfall', - housesAffected = 'houses_affected', - affectedPopulation = 'affected_population', - probWithin50Km = 'prob_within_50km', - droughtPhaseClassification = 'drought_phase_classification', + typhoonTrack = 'typhoon_track', vegetationCondition = 'vegetation_condition', - livestockBodyCondition = 'livestock_body_condition', - evacuationCenters = 'evacuation_centers', - communityNotifications = 'community_notifications', - schools = 'schools', + vulnerability_score = 'vulnerability_score', + vulnerableGroup = 'vulnerable_group', + vulnerableHousing = 'vulnerable_housing', + walkingTravelTimeToHealth = 'walking_travel_time_to_health', + wall_type = 'wall_type', + waterpoints = 'waterpoints', waterpointsInternal = 'waterpoints_internal', - roads = 'roads', - gauges = 'gauges', + windspeed = 'windspeed', } export enum IbfLayerLabel { - glofasStations = 'Glofas stations', - typhoonTrack = 'Typhoon track', - redCrossBranches = 'Red Cross branches', - redCrescentBranches = 'Red Crescent branches', - waterpoints = 'Waterpoints', - floodExtent = 'Flood extent', - rainfallExtent = 'Rainfall extent', - population = 'Population', - populationTotal = 'Total Population', adminRegions1 = 'Admin Level 1', adminRegions2 = 'Admin Level 2', adminRegions3 = 'Admin Level 3', adminRegions4 = 'Admin Level 4', - cropland = 'Cropland', - grassland = 'Grassland', covidRisk = 'Covid Risk', - healthSites = 'Health Sites', + cropland = 'Cropland', damSites = 'Dam Sites', evacuationCenters = 'Evacuation Centers', + floodExtent = 'Flood extent', + glofasStations = 'Glofas stations', + grassland = 'Grassland', + healthSites = 'Health Sites', + population = 'Population', + populationTotal = 'Total Population', + rainfallExtent = 'Rainfall extent', + redCrescentBranches = 'Red Crescent branches', + redCrossBranches = 'Red Cross branches', + typhoonTrack = 'Typhoon track', + waterpoints = 'Waterpoints', } export class IbfLayerWMS { @@ -161,9 +161,9 @@ export class IbfLayerWMS { } export enum IbfLayerGroup { + adminRegions = 'adminRegions', aggregates = 'aggregates', outline = 'outline', - adminRegions = 'adminRegions', point = 'point', wms = 'wms', } @@ -183,10 +183,10 @@ export class ColorBreak { } export enum LeafletPane { - overlayPane = 'overlayPane', - aggregatePane = 'ibf-aggregate', adminBoundaryPane = 'ibf-admin-boundaries', - wmsPane = 'ibf-wms', - popupPane = 'popup', + aggregatePane = 'ibf-aggregate', outline = 'outline', + overlayPane = 'overlayPane', + popupPane = 'popup', + wmsPane = 'ibf-wms', } diff --git a/interfaces/IBF-dashboard/src/app/types/indicator-group.ts b/interfaces/IBF-dashboard/src/app/types/indicator-group.ts index f2411d6fb..40abbd6c3 100644 --- a/interfaces/IBF-dashboard/src/app/types/indicator-group.ts +++ b/interfaces/IBF-dashboard/src/app/types/indicator-group.ts @@ -1,5 +1,9 @@ -import { LayerActivation } from '../models/layer-activation.enum'; -import { ColorBreaks, IbfLayerLabel, IbfLayerName } from './ibf-layer'; +import { LayerActivation } from 'src/app/models/layer-activation.enum'; +import { + ColorBreaks, + IbfLayerLabel, + IbfLayerName, +} from 'src/app/types/ibf-layer'; export class Indicator { countryDisasterTypes: JSON; diff --git a/interfaces/IBF-dashboard/src/app/types/lead-time.ts b/interfaces/IBF-dashboard/src/app/types/lead-time.ts index 265fb33a3..a36247828 100644 --- a/interfaces/IBF-dashboard/src/app/types/lead-time.ts +++ b/interfaces/IBF-dashboard/src/app/types/lead-time.ts @@ -1,3 +1,4 @@ +/* eslint-disable perfectionist/sort-enums */ /* eslint-disable @typescript-eslint/no-duplicate-enum-values */ export enum LeadTime { diff --git a/interfaces/IBF-dashboard/src/app/types/map-view.ts b/interfaces/IBF-dashboard/src/app/types/map-view.ts index 686c89c44..66447aa2e 100644 --- a/interfaces/IBF-dashboard/src/app/types/map-view.ts +++ b/interfaces/IBF-dashboard/src/app/types/map-view.ts @@ -1,7 +1,7 @@ export enum MapView { - national = 'national', - event = 'event', adminArea = 'admin-area', adminArea2 = 'admin-area2', adminArea3 = 'admin-area3', + event = 'event', + national = 'national', } diff --git a/interfaces/IBF-dashboard/src/app/types/timeline-state.ts b/interfaces/IBF-dashboard/src/app/types/timeline-state.ts index 22a6d3f7d..9cda5dc92 100644 --- a/interfaces/IBF-dashboard/src/app/types/timeline-state.ts +++ b/interfaces/IBF-dashboard/src/app/types/timeline-state.ts @@ -1,5 +1,5 @@ import { DateTime } from 'luxon'; -import { LeadTime, LeadTimeUnit } from './lead-time'; +import { LeadTime, LeadTimeUnit } from 'src/app/types/lead-time'; export class TimelineState { today: DateTime; diff --git a/interfaces/IBF-dashboard/src/app/types/triggered-area.ts b/interfaces/IBF-dashboard/src/app/types/triggered-area.ts index 0603247dd..6cd4e3032 100644 --- a/interfaces/IBF-dashboard/src/app/types/triggered-area.ts +++ b/interfaces/IBF-dashboard/src/app/types/triggered-area.ts @@ -1,5 +1,5 @@ -import { AdminLevel } from './admin-level'; -import { EapAction } from './eap-action'; +import { AdminLevel } from 'src/app/types/admin-level'; +import { EapAction } from 'src/app/types/eap-action'; export class TriggeredArea { actionsValue: number; @@ -19,7 +19,7 @@ export class TriggeredArea { } export enum AlertLabel { + alert = 'alert', // No-EAP trigger = 'trigger', // EAP trigger warning = 'warning', // EAP below-trigger - alert = 'alert', // No-EAP } diff --git a/interfaces/IBF-dashboard/src/main.ts b/interfaces/IBF-dashboard/src/main.ts index 8e6dfdcb4..3e3e8debf 100644 --- a/interfaces/IBF-dashboard/src/main.ts +++ b/interfaces/IBF-dashboard/src/main.ts @@ -1,12 +1,14 @@ import { enableProdMode } from '@angular/core'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; -import { environment } from './environments/environment'; +import { AppModule } from 'src/app/app.module'; +import { environment } from 'src/environments/environment'; -if (['production', 'stage'].indexOf(environment.configuration) >= 0) { +if (['production', 'stage'].includes(environment.configuration)) { enableProdMode(); } platformBrowserDynamic() .bootstrapModule(AppModule) - .catch((err) => console.log(err)); + .catch((err) => { + console.log(err); + }); diff --git a/interfaces/IBF-dashboard/src/polyfills.ts b/interfaces/IBF-dashboard/src/polyfills.ts index 09c3639f0..df6f00c6a 100644 --- a/interfaces/IBF-dashboard/src/polyfills.ts +++ b/interfaces/IBF-dashboard/src/polyfills.ts @@ -42,12 +42,10 @@ * */ -import './zone-flags'; - +import 'src/zone-flags'; /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ - import 'zone.js'; // Included with Angular CLI. /*************************************************************************************************** diff --git a/interfaces/IBF-dashboard/src/test.ts b/interfaces/IBF-dashboard/src/test.ts index 19fc8ba11..ff4efd206 100644 --- a/interfaces/IBF-dashboard/src/test.ts +++ b/interfaces/IBF-dashboard/src/test.ts @@ -1,6 +1,7 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js/testing'; + import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, diff --git a/package-lock.json b/package-lock.json index 45be0773b..828ff4687 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,26 +1,81 @@ { "name": "IBF-system", - "version": "0.277.4", + "version": "0.277.6", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "IBF-system", - "version": "0.277.4", + "version": "0.277.6", "dependencies": { "github-webhook-handler": "^1.0.0" }, "devDependencies": { - "pre-commit": "^1.2.2", - "pre-push": "^0.1.4", + "husky": "^9.0.11", + "lint-staged": "^15.2.2", "prettier": "^3.4.2" } }, + "node_modules/ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", + "dev": true, + "license": "MIT", + "dependencies": { + "environment": "^1.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -30,72 +85,239 @@ "ieee754": "^1.1.13" } }, - "node_modules/buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "node_modules/cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, - "engines": [ - "node >= 0.8" - ], + "license": "MIT", "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "restore-cursor": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "node_modules/cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", "dev": true, + "license": "MIT", "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/concat-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "node_modules/colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" }, - "node_modules/concat-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "node_modules/commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "license": "MIT", "dependencies": { - "safe-buffer": "~5.1.0" + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true + "node_modules/emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true, + "license": "MIT" }, - "node_modules/cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "node_modules/environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true, + "license": "MIT" + }, + "node_modules/execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": ">=16.17" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/execa/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/execa/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/execa/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/execa/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", "dependencies": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/github-webhook-handler": { @@ -116,6 +338,32 @@ "readable-stream": "^3.4.0" } }, + "node_modules/human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=16.17.0" + } + }, + "node_modules/husky": { + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", + "dev": true, + "license": "MIT", + "bin": { + "husky": "bin.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -126,11 +374,41 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/isexe": { "version": "2.0.0", @@ -138,70 +416,241 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "node_modules/lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "node_modules/lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/antonk52" + } + }, + "node_modules/lint-staged": { + "version": "15.2.11", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.11.tgz", + "integrity": "sha512-Ev6ivCTYRTGs9ychvpVw35m/bcNDuBN+mnTeObCL5h+boS5WzBEC6LHI4I9F/++sZm1m+J2LEiy0gxL/R9TBqQ==", "dev": true, + "license": "MIT", "dependencies": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.4.0", + "execa": "~8.0.1", + "lilconfig": "~3.1.3", + "listr2": "~8.2.5", + "micromatch": "~4.0.8", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.6.1" + }, + "bin": { + "lint-staged": "bin/lint-staged.js" + }, + "engines": { + "node": ">=18.12.0" + }, + "funding": { + "url": "https://opencollective.com/lint-staged" } }, - "node_modules/os-shim": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", - "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", + "node_modules/listr2": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.5.tgz", + "integrity": "sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==", "dev": true, + "license": "MIT", + "dependencies": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + }, "engines": { - "node": ">= 0.4.0" + "node": ">=18.0.0" } }, - "node_modules/pre-commit": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", - "integrity": "sha1-287g7p3nI15X95xW186UZBpp7sY=", + "node_modules/log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", "dev": true, + "license": "MIT", "dependencies": { - "cross-spawn": "^5.0.1", - "spawn-sync": "^1.0.15", - "which": "1.2.x" + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pre-commit/node_modules/which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "node_modules/log-update/node_modules/is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", "dev": true, + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" + "get-east-asian-width": "^1.0.0" }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/pre-push": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/pre-push/-/pre-push-0.1.4.tgz", - "integrity": "sha512-bIdVuDQR3r5AWV7bM6OMHD3mCXA53Ql0LXmW5UfcSmJZq+J+TytqZ5YJcTmMLcojJysN65vcFIeCqRn6YidA+Q==", + "node_modules/log-update/node_modules/slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", "dev": true, - "hasInstallScript": true, + "license": "MIT", "dependencies": { - "cross-spawn": "^5.0.1", - "spawn-sync": "^1.0.15", - "which": "1.2.x" + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, - "node_modules/pre-push/node_modules/which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha512-16uPglFkRPzgiUXYMi1Jf8Z5EzN1iB4V0ZtMXcHZnwsBtQhhHeCqoWw7tsUY42hJGNDWtUsVLTjakIa5BgAxCw==", + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^4.0.0" }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true, + "license": "MIT", "bin": { - "which": "bin/which" + "pidtree": "bin/pidtree.js" + }, + "engines": { + "node": ">=0.10" } }, "node_modules/prettier": { @@ -209,28 +658,19 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "dev": true, - "bin": { - "prettier": "bin/prettier.cjs" + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, "engines": { - "node": ">=14" + "node": ">=18" }, "funding": { - "url": "https://github.com/prettier/prettier?sponsor=1" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", - "dev": true - }, "node_modules/readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -244,40 +684,79 @@ "node": ">= 6" } }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + "node_modules/restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "license": "MIT", + "dependencies": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, - "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "node_modules/restore-cursor/node_modules/onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", "dev": true, + "license": "MIT", "dependencies": { - "shebang-regex": "^1.0.0" + "mimic-function": "^5.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true, + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true, + "license": "ISC", "engines": { - "node": ">=0.10.0" + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/spawn-sync": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", - "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "node_modules/slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, + "license": "MIT", "dependencies": { - "concat-stream": "^1.4.7", - "os-shim": "^0.1.2" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/string_decoder": { @@ -288,42 +767,150 @@ "safe-buffer": "~5.2.0" } }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true + "node_modules/string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "node_modules/wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, + "license": "MIT", "dependencies": { - "isexe": "^2.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" }, - "bin": { - "which": "bin/which" + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", - "dev": true + "node_modules/yaml": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14" + } } }, "dependencies": { + "ansi-escapes": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-7.0.0.tgz", + "integrity": "sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==", + "dev": true, + "requires": { + "environment": "^1.0.0" + } + }, + "ansi-regex": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, "base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, "buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -333,73 +920,151 @@ "ieee754": "^1.1.13" } }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "cli-cursor": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-5.0.0.tgz", + "integrity": "sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==", "dev": true, "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" + "restore-cursor": "^5.0.0" + } + }, + "cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "requires": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + } + }, + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "commander": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-12.1.0.tgz", + "integrity": "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==", + "dev": true + }, + "debug": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "dev": true, + "requires": { + "ms": "^2.1.3" + } + }, + "emoji-regex": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.4.0.tgz", + "integrity": "sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==", + "dev": true + }, + "environment": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/environment/-/environment-1.1.0.tgz", + "integrity": "sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==", + "dev": true + }, + "eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, + "execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" }, "dependencies": { - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" + "shebang-regex": "^3.0.0" } }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { - "safe-buffer": "~5.1.0" + "isexe": "^2.0.0" } } } }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "to-regex-range": "^5.0.1" } }, + "get-east-asian-width": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.3.0.tgz", + "integrity": "sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==", + "dev": true + }, + "get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true + }, "github-webhook-handler": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/github-webhook-handler/-/github-webhook-handler-1.0.0.tgz", @@ -420,6 +1085,18 @@ } } }, + "human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true + }, + "husky": { + "version": "9.1.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.7.tgz", + "integrity": "sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==", + "dev": true + }, "ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", @@ -430,10 +1107,22 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", "dev": true }, "isexe": { @@ -442,84 +1131,159 @@ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "lru-cache": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", - "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "lilconfig": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.1.3.tgz", + "integrity": "sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==", + "dev": true + }, + "lint-staged": { + "version": "15.2.11", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.11.tgz", + "integrity": "sha512-Ev6ivCTYRTGs9ychvpVw35m/bcNDuBN+mnTeObCL5h+boS5WzBEC6LHI4I9F/++sZm1m+J2LEiy0gxL/R9TBqQ==", "dev": true, "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" + "chalk": "~5.3.0", + "commander": "~12.1.0", + "debug": "~4.4.0", + "execa": "~8.0.1", + "lilconfig": "~3.1.3", + "listr2": "~8.2.5", + "micromatch": "~4.0.8", + "pidtree": "~0.6.0", + "string-argv": "~0.3.2", + "yaml": "~2.6.1" } }, - "os-shim": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/os-shim/-/os-shim-0.1.3.tgz", - "integrity": "sha1-a2LDeRz3kJ6jXtRuF2WLtBfLORc=", - "dev": true + "listr2": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.2.5.tgz", + "integrity": "sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==", + "dev": true, + "requires": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.1.0", + "rfdc": "^1.4.1", + "wrap-ansi": "^9.0.0" + } }, - "pre-commit": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", - "integrity": "sha1-287g7p3nI15X95xW186UZBpp7sY=", + "log-update": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.1.0.tgz", + "integrity": "sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "spawn-sync": "^1.0.15", - "which": "1.2.x" + "ansi-escapes": "^7.0.0", + "cli-cursor": "^5.0.0", + "slice-ansi": "^7.1.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "dependencies": { - "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", + "is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", "dev": true, "requires": { - "isexe": "^2.0.0" + "get-east-asian-width": "^1.0.0" + } + }, + "slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" } } } }, - "pre-push": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/pre-push/-/pre-push-0.1.4.tgz", - "integrity": "sha512-bIdVuDQR3r5AWV7bM6OMHD3mCXA53Ql0LXmW5UfcSmJZq+J+TytqZ5YJcTmMLcojJysN65vcFIeCqRn6YidA+Q==", + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "spawn-sync": "^1.0.15", - "which": "1.2.x" - }, - "dependencies": { - "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha512-16uPglFkRPzgiUXYMi1Jf8Z5EzN1iB4V0ZtMXcHZnwsBtQhhHeCqoWw7tsUY42hJGNDWtUsVLTjakIa5BgAxCw==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } + "braces": "^3.0.3", + "picomatch": "^2.3.1" } }, - "prettier": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", - "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", "dev": true }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "mimic-function": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/mimic-function/-/mimic-function-5.0.1.tgz", + "integrity": "sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==", "dev": true }, - "pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, + "npm-run-path": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.3.0.tgz", + "integrity": "sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + }, + "picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true + }, + "pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", "dev": true }, + "prettier": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + } + }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", @@ -530,34 +1294,52 @@ "util-deprecate": "^1.0.1" } }, + "restore-cursor": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-5.1.0.tgz", + "integrity": "sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==", + "dev": true, + "requires": { + "onetime": "^7.0.0", + "signal-exit": "^4.1.0" + }, + "dependencies": { + "onetime": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-7.0.0.tgz", + "integrity": "sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==", + "dev": true, + "requires": { + "mimic-function": "^5.0.0" + } + } + } + }, + "rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true + }, "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "dev": true }, - "spawn-sync": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/spawn-sync/-/spawn-sync-1.0.15.tgz", - "integrity": "sha1-sAeZVX63+wyDdsKdROih6mfldHY=", + "slice-ansi": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "requires": { - "concat-stream": "^1.4.7", - "os-shim": "^0.1.2" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" } }, "string_decoder": { @@ -568,30 +1350,67 @@ "safe-buffer": "~5.2.0" } }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true + }, + "string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", "dev": true }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", "dev": true, "requires": { - "isexe": "^2.0.0" + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } }, - "yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "yaml": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.6.1.tgz", + "integrity": "sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==", "dev": true } } diff --git a/package.json b/package.json index b6b5ef0a5..83d8743d7 100644 --- a/package.json +++ b/package.json @@ -14,15 +14,15 @@ "test:integration": "npm test --prefix tests/integration", "lint": "npx npm-run-all --print-label --parallel lint:interface lint:services", "lint:services": "npm run lint --prefix services/API-service/", - "lint:interface": "npm run lint --prefix interfaces/IBF-dashboard/" + "lint:interface": "npm run lint --prefix interfaces/IBF-dashboard/", + "prepare": "husky" }, "dependencies": { "github-webhook-handler": "^1.0.0" }, "devDependencies": { - "pre-commit": "^1.2.2", - "pre-push": "^0.1.4", - "prettier": "^3.4.2" - }, - "pre-commit": "lint" + "prettier": "^3.4.2", + "husky": "^9.0.11", + "lint-staged": "^15.2.2" + } } diff --git a/services/API-service/.lintstagedrc.js b/services/API-service/.lintstagedrc.js new file mode 100644 index 000000000..2eb478af2 --- /dev/null +++ b/services/API-service/.lintstagedrc.js @@ -0,0 +1,7 @@ +// eslint-disable-next-line @typescript-eslint/no-require-imports +const baseConfig = require('../../.lintstagedrc.js'); + +module.exports = { + ...baseConfig, + '*.ts': ['eslint --fix'], +}; diff --git a/services/API-service/package.json b/services/API-service/package.json index 7a3f01393..177b9e313 100644 --- a/services/API-service/package.json +++ b/services/API-service/package.json @@ -5,7 +5,7 @@ "main": "index.js", "scripts": { "lint": "eslint \"**/*.ts\"", - "format:fix": "npm run lint:syntax -- --write", + "fix": "npm run lint -- --fix", "lint:syntax": "prettier --check \"**/*.{md,js,ts,scss,html}\" ", "prestart": "npm run migration:run && ts-node src/scripts seed-prod", "start": "node index.js", diff --git a/services/API-service/src/api/notification/whatsapp/twilio.client.ts b/services/API-service/src/api/notification/whatsapp/twilio.client.ts index 0f4ec5696..c164f9c42 100644 --- a/services/API-service/src/api/notification/whatsapp/twilio.client.ts +++ b/services/API-service/src/api/notification/whatsapp/twilio.client.ts @@ -1,7 +1,6 @@ -// eslint-disable-next-line @typescript-eslint/no-require-imports +/* eslint-disable @typescript-eslint/no-require-imports */ export const twilioClient = require('twilio')( process.env.TWILIO_SID, process.env.TWILIO_AUTHTOKEN, ); -// eslint-disable-next-line @typescript-eslint/no-require-imports export const twilio = require('twilio'); diff --git a/tests/e2e/.lintstagedrc.js b/tests/e2e/.lintstagedrc.js new file mode 100644 index 000000000..65e73546b --- /dev/null +++ b/tests/e2e/.lintstagedrc.js @@ -0,0 +1,6 @@ +const baseConfig = require('../../.lintstagedrc.js'); + +module.exports = { + ...baseConfig, + '*.{ts,js}': ['eslint --fix'], +}; diff --git a/tests/e2e/eslint.config.js b/tests/e2e/eslint.config.js index c6b90b1b9..092543107 100644 --- a/tests/e2e/eslint.config.js +++ b/tests/e2e/eslint.config.js @@ -1,6 +1,5 @@ // @ts-check const globals = require('globals'); -const eslint = require('@eslint/js'); const tseslint = require('typescript-eslint'); const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended'); const eslintPluginSimpleSort = require('eslint-plugin-simple-import-sort'); diff --git a/tests/integration/.lintstagedrc.js b/tests/integration/.lintstagedrc.js new file mode 100644 index 000000000..a96d18bc7 --- /dev/null +++ b/tests/integration/.lintstagedrc.js @@ -0,0 +1,5 @@ +const baseConfig = require('../../.lintstagedrc.js'); + +module.exports = { + ...baseConfig, +};