diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bff6b300..e8b280ac2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,33 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## Unreleased +## 2.12.0 - 2023-10-17 + +### Added + +- Added the endpoint `GET api/v1/account/:id/balances` which provides historical cash balances +- Added support to search for an asset profile by `isin`, `name` and `symbol` as an administrator (experimental) +- Added support for creating asset profiles with `MANUAL` data source + +### Changed + +- Changed the checkboxes to slide toggles in the user settings of the user account page +- Extended the `copy-assets` `Nx` target to copy the locales to the server’s assets +- Upgraded `@simplewebauthn/browser` and `@simplewebauthn/server` from version `5.2.1` to `8.3` + +### Fixed + +- Displayed the transfer cash balance button based on a permission +- Fixed the biometric authentication +- Fixed the query to get asset profiles that match both the `dataSource` and `symbol` values + +## 2.11.0 - 2023-10-14 ### Added - Added support to transfer a part of the cash balance from one to another account - Extended the markets overview by benchmarks (date of last all time high) +- Added support to import historical market data in the admin control panel ### Changed @@ -21,6 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed `FEE` and `INTEREST` types in the activities import of `csv` files +- Fixed the displayed currency of the cash balance in the create or update account dialog ## 2.10.0 - 2023-10-09 @@ -124,13 +146,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Improved the preselected currency based on the account's currency in the create or edit activity dialog +- Improved the preselected currency based on the account’s currency in the create or edit activity dialog - Unlocked the experimental features setting for all users - Upgraded `prisma` from version `5.2.0` to `5.3.1` ### Fixed -- Fixed a memory leak related to the server's timezone (behind UTC) in the data gathering +- Fixed a memory leak related to the server’s timezone (behind UTC) in the data gathering ## 2.3.0 - 2023-09-17 @@ -281,7 +303,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Optimized the activities import by allowing a different currency than the asset's official one +- Optimized the activities import by allowing a different currency than the asset’s official one - Added a timeout to the _EOD Historical Data_ requests - Migrated the requests from `bent` to `got` in the _EOD Historical Data_ service @@ -788,7 +810,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Persisted today's market data continuously +- Persisted today’s market data continuously ### Fixed @@ -1022,7 +1044,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Filtered activities with type `ITEM` from search results -- Considered the user's language in the _Stripe_ checkout +- Considered the user’s language in the _Stripe_ checkout - Upgraded the _Stripe_ dependencies - Upgraded `twitter-api-v2` from version `1.10.3` to `1.14.2` @@ -2696,7 +2718,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Moved the countries and sectors charts in the position detail dialog -- Distinguished today's data point of historical data in the admin control panel +- Distinguished today’s data point of historical data in the admin control panel - Restructured the server modules ### Fixed diff --git a/apps/api/src/app/account/account.controller.ts b/apps/api/src/app/account/account.controller.ts index 05d0c11de..4666e5084 100644 --- a/apps/api/src/app/account/account.controller.ts +++ b/apps/api/src/app/account/account.controller.ts @@ -1,8 +1,12 @@ import { PortfolioService } from '@ghostfolio/api/app/portfolio/portfolio.service'; import { RedactValuesInResponseInterceptor } from '@ghostfolio/api/interceptors/redact-values-in-response.interceptor'; +import { AccountBalanceService } from '@ghostfolio/api/services/account-balance/account-balance.service'; import { ImpersonationService } from '@ghostfolio/api/services/impersonation/impersonation.service'; import { HEADER_KEY_IMPERSONATION } from '@ghostfolio/common/config'; -import { Accounts } from '@ghostfolio/common/interfaces'; +import { + AccountBalancesResponse, + Accounts +} from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import type { AccountWithValue, @@ -35,6 +39,7 @@ import { UpdateAccountDto } from './update-account.dto'; @Controller('account') export class AccountController { public constructor( + private readonly accountBalanceService: AccountBalanceService, private readonly accountService: AccountService, private readonly impersonationService: ImpersonationService, private readonly portfolioService: PortfolioService, @@ -116,6 +121,18 @@ export class AccountController { return accountsWithAggregations.accounts[0]; } + @Get(':id/balances') + @UseGuards(AuthGuard('jwt')) + @UseInterceptors(RedactValuesInResponseInterceptor) + public async getAccountBalancesById( + @Param('id') id: string + ): Promise { + return this.accountBalanceService.getAccountBalances({ + accountId: id, + userId: this.request.user.id + }); + } + @Post() @UseGuards(AuthGuard('jwt')) public async createAccount( diff --git a/apps/api/src/app/admin/admin.controller.ts b/apps/api/src/app/admin/admin.controller.ts index 67e106ff8..a19b17d4a 100644 --- a/apps/api/src/app/admin/admin.controller.ts +++ b/apps/api/src/app/admin/admin.controller.ts @@ -1,9 +1,9 @@ import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-request.interceptor'; +import { ApiService } from '@ghostfolio/api/services/api/api.service'; import { DataGatheringService } from '@ghostfolio/api/services/data-gathering/data-gathering.service'; import { MarketDataService } from '@ghostfolio/api/services/market-data/market-data.service'; import { PropertyDto } from '@ghostfolio/api/services/property/property.dto'; import { - DEFAULT_PAGE_SIZE, GATHER_ASSET_PROFILE_PROCESS, GATHER_ASSET_PROFILE_PROCESS_OPTIONS } from '@ghostfolio/common/config'; @@ -12,8 +12,7 @@ import { AdminData, AdminMarketData, AdminMarketDataDetails, - EnhancedSymbolProfile, - Filter + EnhancedSymbolProfile } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import type { @@ -43,12 +42,14 @@ import { StatusCodes, getReasonPhrase } from 'http-status-codes'; import { AdminService } from './admin.service'; import { UpdateAssetProfileDto } from './update-asset-profile.dto'; +import { UpdateBulkMarketDataDto } from './update-bulk-market-data.dto'; import { UpdateMarketDataDto } from './update-market-data.dto'; @Controller('admin') export class AdminController { public constructor( private readonly adminService: AdminService, + private readonly apiService: ApiService, private readonly dataGatheringService: DataGatheringService, private readonly marketDataService: MarketDataService, @Inject(REQUEST) private readonly request: RequestWithUser @@ -254,6 +255,7 @@ export class AdminController { public async getMarketData( @Query('assetSubClasses') filterByAssetSubClasses?: string, @Query('presetId') presetId?: MarketDataPreset, + @Query('query') filterBySearchQuery?: string, @Query('skip') skip?: number, @Query('sortColumn') sortColumn?: string, @Query('sortDirection') sortDirection?: Prisma.SortOrder, @@ -271,16 +273,10 @@ export class AdminController { ); } - const assetSubClasses = filterByAssetSubClasses?.split(',') ?? []; - - const filters: Filter[] = [ - ...assetSubClasses.map((assetSubClass) => { - return { - id: assetSubClass, - type: 'ASSET_SUB_CLASS' - }; - }) - ]; + const filters = this.apiService.buildFiltersFromQueryParams({ + filterByAssetSubClasses, + filterBySearchQuery + }); return this.adminService.getMarketData({ filters, @@ -313,6 +309,43 @@ export class AdminController { return this.adminService.getMarketDataBySymbol({ dataSource, symbol }); } + @Post('market-data/:dataSource/:symbol') + @UseGuards(AuthGuard('jwt')) + public async updateMarketData( + @Body() data: UpdateBulkMarketDataDto, + @Param('dataSource') dataSource: DataSource, + @Param('symbol') symbol: string + ) { + if ( + !hasPermission( + this.request.user.permissions, + permissions.accessAdminControl + ) + ) { + throw new HttpException( + getReasonPhrase(StatusCodes.FORBIDDEN), + StatusCodes.FORBIDDEN + ); + } + + const dataBulkUpdate: Prisma.MarketDataUpdateInput[] = data.marketData.map( + ({ date, marketPrice }) => ({ + dataSource, + date, + marketPrice, + symbol, + state: 'CLOSE' + }) + ); + + return this.marketDataService.updateMany({ + data: dataBulkUpdate + }); + } + + /** + * @deprecated + */ @Put('market-data/:dataSource/:symbol/:dateString') @UseGuards(AuthGuard('jwt')) public async update( @@ -365,8 +398,11 @@ export class AdminController { StatusCodes.FORBIDDEN ); } - - return this.adminService.addAssetProfile({ dataSource, symbol }); + return this.adminService.addAssetProfile({ + dataSource, + symbol, + currency: this.request.user.Settings.settings.baseCurrency + }); } @Delete('profile-data/:dataSource/:symbol') diff --git a/apps/api/src/app/admin/admin.module.ts b/apps/api/src/app/admin/admin.module.ts index 500af69db..079af87fa 100644 --- a/apps/api/src/app/admin/admin.module.ts +++ b/apps/api/src/app/admin/admin.module.ts @@ -1,4 +1,5 @@ import { SubscriptionModule } from '@ghostfolio/api/app/subscription/subscription.module'; +import { ApiModule } from '@ghostfolio/api/services/api/api.module'; import { ConfigurationModule } from '@ghostfolio/api/services/configuration/configuration.module'; import { DataGatheringModule } from '@ghostfolio/api/services/data-gathering/data-gathering.module'; import { DataProviderModule } from '@ghostfolio/api/services/data-provider/data-provider.module'; @@ -15,6 +16,7 @@ import { QueueModule } from './queue/queue.module'; @Module({ imports: [ + ApiModule, ConfigurationModule, DataGatheringModule, DataProviderModule, diff --git a/apps/api/src/app/admin/admin.service.ts b/apps/api/src/app/admin/admin.service.ts index dd9e3f9ce..84ae5934c 100644 --- a/apps/api/src/app/admin/admin.service.ts +++ b/apps/api/src/app/admin/admin.service.ts @@ -41,10 +41,19 @@ export class AdminService { ) {} public async addAssetProfile({ + currency, dataSource, symbol - }: UniqueAsset): Promise { + }: UniqueAsset & { currency?: string }): Promise { try { + if (dataSource === 'MANUAL') { + return this.symbolProfileService.add({ + currency, + dataSource, + symbol + }); + } + const assetProfiles = await this.dataProviderService.getAssetProfiles([ { dataSource, symbol } ]); @@ -131,10 +140,14 @@ export class AdminService { filters = [{ id: 'ETF', type: 'ASSET_SUB_CLASS' }]; } + const searchQuery = filters.find(({ type }) => { + return type === 'SEARCH_QUERY'; + })?.id; + const { ASSET_SUB_CLASS: filtersByAssetSubClass } = groupBy( filters, - (filter) => { - return filter.type; + ({ type }) => { + return type; } ); @@ -147,6 +160,14 @@ export class AdminService { where.assetSubClass = AssetSubClass[filtersByAssetSubClass[0].id]; } + if (searchQuery) { + where.OR = [ + { isin: { mode: 'insensitive', startsWith: searchQuery } }, + { name: { mode: 'insensitive', startsWith: searchQuery } }, + { symbol: { mode: 'insensitive', startsWith: searchQuery } } + ]; + } + if (sortColumn) { orderBy = [{ [sortColumn]: sortDirection }]; @@ -173,7 +194,9 @@ export class AdminService { assetSubClass: true, comment: true, countries: true, + currency: true, dataSource: true, + name: true, Order: { orderBy: [{ date: 'asc' }], select: { date: true }, @@ -194,7 +217,9 @@ export class AdminService { assetSubClass, comment, countries, + currency, dataSource, + name, Order, sectors, symbol @@ -213,8 +238,10 @@ export class AdminService { assetClass, assetSubClass, comment, + currency, countriesCount, dataSource, + name, symbol, marketDataItemCount, sectorsCount, @@ -341,6 +368,8 @@ export class AdminService { symbol, assetClass: 'CASH', countriesCount: 0, + currency: symbol.replace(DEFAULT_CURRENCY, ''), + name: symbol, sectorsCount: 0 }; }); diff --git a/apps/api/src/app/admin/update-bulk-market-data.dto.ts b/apps/api/src/app/admin/update-bulk-market-data.dto.ts new file mode 100644 index 000000000..5177263a6 --- /dev/null +++ b/apps/api/src/app/admin/update-bulk-market-data.dto.ts @@ -0,0 +1,11 @@ +import { Type } from 'class-transformer'; +import { ArrayNotEmpty, IsArray, isNotEmptyObject } from 'class-validator'; + +import { UpdateMarketDataDto } from './update-market-data.dto'; + +export class UpdateBulkMarketDataDto { + @ArrayNotEmpty() + @IsArray() + @Type(() => UpdateMarketDataDto) + marketData: UpdateMarketDataDto[]; +} diff --git a/apps/api/src/app/admin/update-market-data.dto.ts b/apps/api/src/app/admin/update-market-data.dto.ts index 79779a318..c0463de31 100644 --- a/apps/api/src/app/admin/update-market-data.dto.ts +++ b/apps/api/src/app/admin/update-market-data.dto.ts @@ -1,6 +1,10 @@ -import { IsNumber } from 'class-validator'; +import { IsDate, IsNumber, IsOptional } from 'class-validator'; export class UpdateMarketDataDto { + @IsDate() + @IsOptional() + date?: Date; + @IsNumber() marketPrice: number; } diff --git a/apps/api/src/app/auth/web-auth.service.ts b/apps/api/src/app/auth/web-auth.service.ts index 471b77709..8d5c91a74 100644 --- a/apps/api/src/app/auth/web-auth.service.ts +++ b/apps/api/src/app/auth/web-auth.service.ts @@ -64,7 +64,7 @@ export class WebAuthService { } }; - const options = generateRegistrationOptions(opts); + const options = await generateRegistrationOptions(opts); await this.userService.updateUser({ data: { @@ -88,10 +88,16 @@ export class WebAuthService { let verification: VerifiedRegistrationResponse; try { const opts: VerifyRegistrationResponseOpts = { - credential, expectedChallenge, expectedOrigin: this.expectedOrigin, - expectedRPID: this.rpID + expectedRPID: this.rpID, + response: { + clientExtensionResults: credential.clientExtensionResults, + id: credential.id, + rawId: credential.rawId, + response: credential.response, + type: 'public-key' + } }; verification = await verifyRegistrationResponse(opts); } catch (error) { @@ -117,8 +123,8 @@ export class WebAuthService { */ existingDevice = await this.deviceService.createAuthDevice({ counter, - credentialPublicKey, - credentialId: credentialID, + credentialId: Buffer.from(credentialID), + credentialPublicKey: Buffer.from(credentialPublicKey), User: { connect: { id: user.id } } }); } @@ -152,7 +158,7 @@ export class WebAuthService { userVerification: 'preferred' }; - const options = generateAuthenticationOptions(opts); + const options = await generateAuthenticationOptions(opts); await this.userService.updateUser({ data: { @@ -181,7 +187,6 @@ export class WebAuthService { let verification: VerifiedAuthenticationResponse; try { const opts: VerifyAuthenticationResponseOpts = { - credential, authenticator: { credentialID: device.credentialId, credentialPublicKey: device.credentialPublicKey, @@ -189,9 +194,16 @@ export class WebAuthService { }, expectedChallenge: `${user.authChallenge}`, expectedOrigin: this.expectedOrigin, - expectedRPID: this.rpID + expectedRPID: this.rpID, + response: { + clientExtensionResults: credential.clientExtensionResults, + id: credential.id, + rawId: credential.rawId, + response: credential.response, + type: 'public-key' + } }; - verification = verifyAuthenticationResponse(opts); + verification = await verifyAuthenticationResponse(opts); } catch (error) { Logger.error(error, 'WebAuthService'); throw new InternalServerErrorException({ error: error.message }); diff --git a/apps/api/src/app/portfolio/portfolio.service.ts b/apps/api/src/app/portfolio/portfolio.service.ts index de366908f..fcd2cb13c 100644 --- a/apps/api/src/app/portfolio/portfolio.service.ts +++ b/apps/api/src/app/portfolio/portfolio.service.ts @@ -1088,6 +1088,7 @@ export class PortfolioService { return { ...position, assetClass: symbolProfileMap[position.symbol].assetClass, + assetSubClass: symbolProfileMap[position.symbol].assetSubClass, averagePrice: new Big(position.averagePrice).toNumber(), grossPerformance: position.grossPerformance?.toNumber() ?? null, grossPerformancePercentage: diff --git a/apps/api/src/services/account-balance/account-balance.service.ts b/apps/api/src/services/account-balance/account-balance.service.ts index 9cd2d31ac..9995bbc3e 100644 --- a/apps/api/src/services/account-balance/account-balance.service.ts +++ b/apps/api/src/services/account-balance/account-balance.service.ts @@ -1,4 +1,5 @@ import { PrismaService } from '@ghostfolio/api/services/prisma/prisma.service'; +import { AccountBalancesResponse } from '@ghostfolio/common/interfaces'; import { Injectable } from '@nestjs/common'; import { AccountBalance, Prisma } from '@prisma/client'; @@ -13,4 +14,29 @@ export class AccountBalanceService { data }); } + + public async getAccountBalances({ + accountId, + userId + }: { + accountId: string; + userId: string; + }): Promise { + const balances = await this.prismaService.accountBalance.findMany({ + orderBy: { + date: 'asc' + }, + select: { + date: true, + id: true, + value: true + }, + where: { + accountId, + userId + } + }); + + return { balances }; + } } diff --git a/apps/api/src/services/api/api.service.ts b/apps/api/src/services/api/api.service.ts index 204aa030e..8ef0df7b3 100644 --- a/apps/api/src/services/api/api.service.ts +++ b/apps/api/src/services/api/api.service.ts @@ -8,16 +8,19 @@ export class ApiService { public buildFiltersFromQueryParams({ filterByAccounts, filterByAssetClasses, + filterByAssetSubClasses, filterBySearchQuery, filterByTags }: { filterByAccounts?: string; filterByAssetClasses?: string; + filterByAssetSubClasses?: string; filterBySearchQuery?: string; filterByTags?: string; }): Filter[] { const accountIds = filterByAccounts?.split(',') ?? []; const assetClasses = filterByAssetClasses?.split(',') ?? []; + const assetSubClasses = filterByAssetSubClasses?.split(',') ?? []; const searchQuery = filterBySearchQuery?.toLowerCase(); const tagIds = filterByTags?.split(',') ?? []; @@ -34,6 +37,12 @@ export class ApiService { type: 'ASSET_CLASS' }; }), + ...assetSubClasses.map((assetClass) => { + return { + id: assetClass, + type: 'ASSET_SUB_CLASS' + }; + }), { id: searchQuery, type: 'SEARCH_QUERY' diff --git a/apps/api/src/services/symbol-profile/symbol-profile.service.ts b/apps/api/src/services/symbol-profile/symbol-profile.service.ts index 99244c352..b861ccf8f 100644 --- a/apps/api/src/services/symbol-profile/symbol-profile.service.ts +++ b/apps/api/src/services/symbol-profile/symbol-profile.service.ts @@ -52,20 +52,12 @@ export class SymbolProfileService { SymbolProfileOverrides: true }, where: { - AND: [ - { - dataSource: { - in: aUniqueAssets.map(({ dataSource }) => { - return dataSource; - }) - }, - symbol: { - in: aUniqueAssets.map(({ symbol }) => { - return symbol; - }) - } - } - ] + OR: aUniqueAssets.map(({ dataSource, symbol }) => { + return { + dataSource, + symbol + }; + }) } }) .then((symbolProfiles) => this.getSymbols(symbolProfiles)); diff --git a/apps/client/project.json b/apps/client/project.json index 2e36f7144..0d2e589dc 100644 --- a/apps/client/project.json +++ b/apps/client/project.json @@ -124,6 +124,9 @@ { "command": "shx cp apps/client/src/assets/site.webmanifest dist/apps/client" }, + { + "command": "shx cp -r apps/client/src/locales dist/apps/api/assets" + }, { "command": "shx cp node_modules/ionicons/dist/index.js dist/apps/client" }, diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.html b/apps/client/src/app/components/accounts-table/accounts-table.component.html index a4548c1b9..bfe5a667a 100644 --- a/apps/client/src/app/components/accounts-table/accounts-table.component.html +++ b/apps/client/src/app/components/accounts-table/accounts-table.component.html @@ -1,4 +1,4 @@ -
+
+
+
, public readonly formBuilder: FormBuilder ) {} public ngOnInit() { - this.createAssetProfileForm = this.formBuilder.group({ - searchSymbol: new FormControl(null, [Validators.required]) - }); + this.createAssetProfileForm = this.formBuilder.group( + { + addSymbol: new FormControl(null, [Validators.required]), + searchSymbol: new FormControl(null, [Validators.required]) + }, + { + validators: this.atLeastOneValid + } + ); + + this.mode = 'auto'; } public onCancel() { this.dialogRef.close(); } + public onRadioChange(mode: 'auto' | 'manual') { + this.mode = mode; + } + public onSubmit() { - this.dialogRef.close({ - dataSource: - this.createAssetProfileForm.controls['searchSymbol'].value.dataSource, - symbol: this.createAssetProfileForm.controls['searchSymbol'].value.symbol - }); + this.mode === 'auto' + ? this.dialogRef.close({ + dataSource: + this.createAssetProfileForm.controls['searchSymbol'].value + .dataSource, + symbol: + this.createAssetProfileForm.controls['searchSymbol'].value.symbol + }) + : this.dialogRef.close({ + dataSource: 'MANUAL', + symbol: this.createAssetProfileForm.controls['addSymbol'].value + }); } public ngOnDestroy() {} + + private atLeastOneValid(control: AbstractControl): ValidationErrors { + const addSymbolControl = control.get('addSymbol'); + const searchSymbolControl = control.get('searchSymbol'); + + if (addSymbolControl.valid && searchSymbolControl.valid) { + return { atLeastOneValid: true }; + } + + if ( + addSymbolControl.valid || + !addSymbolControl || + searchSymbolControl.valid || + !searchSymbolControl + ) { + return { atLeastOneValid: false }; + } + + return { atLeastOneValid: true }; + } } diff --git a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html index 43eadf93e..e7ed9352a 100644 --- a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html +++ b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.html @@ -6,13 +6,35 @@ >

Add Asset Profile

- - Name, symbol or ISIN - - +
+ + + + + + + +
+ +
+ + Name, symbol or ISIN + + +
+
+ + Symbol + + +
@@ -20,7 +42,7 @@ color="primary" mat-flat-button type="submit" - [disabled]="!createAssetProfileForm.valid" + [disabled]="createAssetProfileForm.hasError('atLeastOneValid')" > Save diff --git a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.module.ts b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.module.ts index e99d8f788..2d50200c4 100644 --- a/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.module.ts +++ b/apps/client/src/app/components/admin-market-data/create-asset-profile-dialog/create-asset-profile-dialog.module.ts @@ -4,6 +4,8 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule } from '@angular/material/dialog'; import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { MatRadioModule } from '@angular/material/radio'; import { GfSymbolAutocompleteModule } from '@ghostfolio/ui/symbol-autocomplete'; import { CreateAssetProfileDialog } from './create-asset-profile-dialog.component'; @@ -17,6 +19,8 @@ import { CreateAssetProfileDialog } from './create-asset-profile-dialog.componen MatDialogModule, MatButtonModule, MatFormFieldModule, + MatInputModule, + MatRadioModule, ReactiveFormsModule ], schemas: [CUSTOM_ELEMENTS_SCHEMA] diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index 45986df95..4d606f591 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -131,6 +131,9 @@ diff --git a/apps/client/src/app/components/user-account-access/user-account-access.module.ts b/apps/client/src/app/components/user-account-access/user-account-access.module.ts index 0388dd244..fb3346ae0 100644 --- a/apps/client/src/app/components/user-account-access/user-account-access.module.ts +++ b/apps/client/src/app/components/user-account-access/user-account-access.module.ts @@ -1,5 +1,6 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; import { MatDialogModule } from '@angular/material/dialog'; import { RouterModule } from '@angular/router'; import { GfPortfolioAccessTableModule } from '@ghostfolio/client/components/access-table/access-table.module'; @@ -7,7 +8,6 @@ import { GfPremiumIndicatorModule } from '@ghostfolio/ui/premium-indicator'; import { GfCreateOrUpdateAccessDialogModule } from './create-or-update-access-dialog/create-or-update-access-dialog.module'; import { UserAccountAccessComponent } from './user-account-access.component'; -import { MatButtonModule } from '@angular/material/button'; @NgModule({ declarations: [UserAccountAccessComponent], diff --git a/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts b/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts index a52812ed3..3fb3592e0 100644 --- a/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts +++ b/apps/client/src/app/components/user-account-settings/user-account-settings.component.ts @@ -3,10 +3,9 @@ import { ChangeDetectorRef, Component, OnDestroy, - OnInit, - ViewChild + OnInit } from '@angular/core'; -import { MatCheckbox, MatCheckboxChange } from '@angular/material/checkbox'; +import { MatSlideToggleChange } from '@angular/material/slide-toggle'; import { DataService } from '@ghostfolio/client/services/data.service'; import { STAY_SIGNED_IN, @@ -29,14 +28,12 @@ import { catchError, takeUntil } from 'rxjs/operators'; templateUrl: './user-account-settings.html' }) export class UserAccountSettingsComponent implements OnDestroy, OnInit { - @ViewChild('toggleSignInWithFingerprintEnabledElement') - signInWithFingerprintElement: MatCheckbox; - public appearancePlaceholder = $localize`Auto`; public baseCurrency: string; public currencies: string[] = []; public hasPermissionToUpdateViewMode: boolean; public hasPermissionToUpdateUserSettings: boolean; + public isWebAuthnEnabled: boolean; public language = document.documentElement.lang; public locales = [ 'de', @@ -120,7 +117,7 @@ export class UserAccountSettingsComponent implements OnDestroy, OnInit { }); } - public onExperimentalFeaturesChange(aEvent: MatCheckboxChange) { + public onExperimentalFeaturesChange(aEvent: MatSlideToggleChange) { this.dataService .putUserSetting({ isExperimentalFeatures: aEvent.checked }) .pipe(takeUntil(this.unsubscribeSubject)) @@ -158,7 +155,7 @@ export class UserAccountSettingsComponent implements OnDestroy, OnInit { }); } - public onRestrictedViewChange(aEvent: MatCheckboxChange) { + public onRestrictedViewChange(aEvent: MatSlideToggleChange) { this.dataService .putUserSetting({ isRestrictedView: aEvent.checked }) .pipe(takeUntil(this.unsubscribeSubject)) @@ -176,7 +173,7 @@ export class UserAccountSettingsComponent implements OnDestroy, OnInit { }); } - public onSignInWithFingerprintChange(aEvent: MatCheckboxChange) { + public onSignInWithFingerprintChange(aEvent: MatSlideToggleChange) { if (aEvent.checked) { this.registerDevice(); } else { @@ -192,7 +189,7 @@ export class UserAccountSettingsComponent implements OnDestroy, OnInit { } } - public onViewModeChange(aEvent: MatCheckboxChange) { + public onViewModeChange(aEvent: MatSlideToggleChange) { this.dataService .putUserSetting({ viewMode: aEvent.checked === true ? 'ZEN' : 'DEFAULT' }) .pipe(takeUntil(this.unsubscribeSubject)) @@ -250,9 +247,8 @@ export class UserAccountSettingsComponent implements OnDestroy, OnInit { } private update() { - if (this.signInWithFingerprintElement) { - this.signInWithFingerprintElement.checked = - this.webAuthnService.isEnabled() ?? false; - } + this.isWebAuthnEnabled = this.webAuthnService.isEnabled() ?? false; + + this.changeDetectorRef.markForCheck(); } } diff --git a/apps/client/src/app/components/user-account-settings/user-account-settings.html b/apps/client/src/app/components/user-account-settings/user-account-settings.html index 12f3da458..87762d449 100644 --- a/apps/client/src/app/components/user-account-settings/user-account-settings.html +++ b/apps/client/src/app/components/user-account-settings/user-account-settings.html @@ -11,12 +11,13 @@
- + >
@@ -139,12 +140,13 @@
- + >
@@ -153,12 +155,13 @@
Sign in with fingerprint
- + >
- + >
diff --git a/apps/client/src/app/components/user-account-settings/user-account-settings.module.ts b/apps/client/src/app/components/user-account-settings/user-account-settings.module.ts index 24e57ff20..7a40cf641 100644 --- a/apps/client/src/app/components/user-account-settings/user-account-settings.module.ts +++ b/apps/client/src/app/components/user-account-settings/user-account-settings.module.ts @@ -3,9 +3,9 @@ import { NgModule } from '@angular/core'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; -import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatSelectModule } from '@angular/material/select'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; import { RouterModule } from '@angular/router'; import { GfValueModule } from '@ghostfolio/ui/value'; @@ -20,9 +20,9 @@ import { UserAccountSettingsComponent } from './user-account-settings.component' GfValueModule, MatButtonModule, MatCardModule, - MatCheckboxModule, MatFormFieldModule, MatSelectModule, + MatSlideToggleModule, ReactiveFormsModule, RouterModule ] diff --git a/apps/client/src/app/pages/accounts/accounts-page.component.ts b/apps/client/src/app/pages/accounts/accounts-page.component.ts index 882f9b3f6..61db47577 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.component.ts +++ b/apps/client/src/app/pages/accounts/accounts-page.component.ts @@ -30,7 +30,7 @@ export class AccountsPageComponent implements OnDestroy, OnInit { public deviceType: string; public hasImpersonationId: boolean; public hasPermissionToCreateAccount: boolean; - public hasPermissionToDeleteAccount: boolean; + public hasPermissionToUpdateAccount: boolean; public routeQueryParams: Subscription; public totalBalanceInBaseCurrency = 0; public totalValueInBaseCurrency = 0; @@ -95,9 +95,9 @@ export class AccountsPageComponent implements OnDestroy, OnInit { this.user.permissions, permissions.createAccount ); - this.hasPermissionToDeleteAccount = hasPermission( + this.hasPermissionToUpdateAccount = hasPermission( this.user.permissions, - permissions.deleteAccount + permissions.updateAccount ); this.changeDetectorRef.markForCheck(); diff --git a/apps/client/src/app/pages/accounts/accounts-page.html b/apps/client/src/app/pages/accounts/accounts-page.html index a7d5901bb..c67323b1a 100644 --- a/apps/client/src/app/pages/accounts/accounts-page.html +++ b/apps/client/src/app/pages/accounts/accounts-page.html @@ -8,7 +8,7 @@ [baseCurrency]="user?.settings?.baseCurrency" [deviceType]="deviceType" [locale]="user?.settings?.locale" - [showActions]="!hasImpersonationId && hasPermissionToDeleteAccount && !user.settings.isRestrictedView" + [showActions]="!hasImpersonationId && hasPermissionToUpdateAccount && !user.settings.isRestrictedView" [totalBalanceInBaseCurrency]="totalBalanceInBaseCurrency" [totalValueInBaseCurrency]="totalValueInBaseCurrency" [transactionCount]="transactionCount" diff --git a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html index a456e2290..c901a9111 100644 --- a/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html +++ b/apps/client/src/app/pages/accounts/create-or-update-account-dialog/create-or-update-account-dialog.html @@ -35,7 +35,9 @@ type="number" (keydown.enter)="$event.stopPropagation()" /> - {{ data.account.currency }} + {{ accountForm.controls['currency'].value }}
diff --git a/apps/client/src/app/services/admin.service.ts b/apps/client/src/app/services/admin.service.ts index e62641db7..79923a3aa 100644 --- a/apps/client/src/app/services/admin.service.ts +++ b/apps/client/src/app/services/admin.service.ts @@ -1,6 +1,7 @@ import { HttpClient, HttpParams } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { UpdateAssetProfileDto } from '@ghostfolio/api/app/admin/update-asset-profile.dto'; +import { UpdateBulkMarketDataDto } from '@ghostfolio/api/app/admin/update-bulk-market-data.dto'; import { UpdateMarketDataDto } from '@ghostfolio/api/app/admin/update-market-data.dto'; import { CreatePlatformDto } from '@ghostfolio/api/app/platform/create-platform.dto'; import { UpdatePlatformDto } from '@ghostfolio/api/app/platform/update-platform.dto'; @@ -214,6 +215,20 @@ export class AdminService { ); } + public postMarketData({ + dataSource, + marketData, + symbol + }: { + dataSource: DataSource; + marketData: UpdateBulkMarketDataDto; + symbol: string; + }) { + const url = `/api/v1/admin/market-data/${dataSource}/${symbol}`; + + return this.http.post(url, marketData); + } + public postPlatform(aPlatform: CreatePlatformDto) { return this.http.post(`/api/v1/platform`, aPlatform); } diff --git a/apps/client/src/app/services/web-authn.service.ts b/apps/client/src/app/services/web-authn.service.ts index eb033884c..5075d036d 100644 --- a/apps/client/src/app/services/web-authn.service.ts +++ b/apps/client/src/app/services/web-authn.service.ts @@ -88,7 +88,9 @@ export class WebAuthnService { { deviceId } ) .pipe( - switchMap(startAuthentication), + switchMap((requestOptionsJSON) => + startAuthentication(requestOptionsJSON, true) + ), switchMap((assertionResponse) => { return this.http.post<{ authToken: string }>( `/api/v1/auth/webauthn/verify-assertion`, diff --git a/apps/client/src/styles.scss b/apps/client/src/styles.scss index 36099a249..175194cac 100644 --- a/apps/client/src/styles.scss +++ b/apps/client/src/styles.scss @@ -462,6 +462,15 @@ ngx-skeleton-loader { } } +/** + * Fix for https://github.com/angular/components/issues/26818 + */ +.mat-mdc-slide-toggle { + .mdc-switch__track { + background-color: rgba(var(--palette-primary-500), 1); + } +} + .mat-stepper-vertical, .mat-stepper-horizontal { background: transparent !important; diff --git a/libs/common/src/lib/interfaces/admin-market-data.interface.ts b/libs/common/src/lib/interfaces/admin-market-data.interface.ts index d53562a23..08838d4bc 100644 --- a/libs/common/src/lib/interfaces/admin-market-data.interface.ts +++ b/libs/common/src/lib/interfaces/admin-market-data.interface.ts @@ -9,9 +9,11 @@ export interface AdminMarketDataItem { assetClass?: AssetClass; assetSubClass?: AssetSubClass; countriesCount: number; + currency: string; dataSource: DataSource; date?: Date; marketDataItemCount: number; + name: string; sectorsCount: number; symbol: string; } diff --git a/libs/common/src/lib/interfaces/index.ts b/libs/common/src/lib/interfaces/index.ts index e33b6b55f..47df3d2f9 100644 --- a/libs/common/src/lib/interfaces/index.ts +++ b/libs/common/src/lib/interfaces/index.ts @@ -33,6 +33,7 @@ import type { PortfolioReport } from './portfolio-report.interface'; import type { PortfolioSummary } from './portfolio-summary.interface'; import type { Position } from './position.interface'; import type { Product } from './product'; +import type { AccountBalancesResponse } from './responses/account-balances-response.interface'; import type { BenchmarkResponse } from './responses/benchmark-response.interface'; import type { ResponseError } from './responses/errors.interface'; import type { ImportResponse } from './responses/import-response.interface'; @@ -49,6 +50,7 @@ import type { User } from './user.interface'; export { Access, + AccountBalancesResponse, Accounts, AdminData, AdminJobs, diff --git a/libs/common/src/lib/interfaces/position.interface.ts b/libs/common/src/lib/interfaces/position.interface.ts index 6d94e3443..1df07e0ce 100644 --- a/libs/common/src/lib/interfaces/position.interface.ts +++ b/libs/common/src/lib/interfaces/position.interface.ts @@ -1,9 +1,9 @@ -import { AssetClass, DataSource } from '@prisma/client'; - -import { MarketState } from '../types'; +import { MarketState } from '@ghostfolio/common/types'; +import { AssetClass, AssetSubClass, DataSource } from '@prisma/client'; export interface Position { assetClass: AssetClass; + assetSubClass: AssetSubClass; averagePrice: number; currency: string; dataSource: DataSource; diff --git a/libs/common/src/lib/interfaces/responses/account-balances-response.interface.ts b/libs/common/src/lib/interfaces/responses/account-balances-response.interface.ts new file mode 100644 index 000000000..9b4ec2f6d --- /dev/null +++ b/libs/common/src/lib/interfaces/responses/account-balances-response.interface.ts @@ -0,0 +1,5 @@ +import { AccountBalance } from '@prisma/client'; + +export interface AccountBalancesResponse { + balances: Pick[]; +} diff --git a/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.component.ts b/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.component.ts index 53a72206d..d00977c18 100644 --- a/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.component.ts +++ b/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.component.ts @@ -7,10 +7,12 @@ import { EventEmitter, HostBinding, Input, + OnChanges, Output, ViewChild } from '@angular/core'; -import { Position } from '@ghostfolio/common/interfaces'; +import { Params } from '@angular/router'; +import { ISearchResultItem } from '@ghostfolio/ui/assistant/interfaces/interfaces'; @Component({ changeDetection: ChangeDetectionStrategy.OnPush, @@ -18,22 +20,46 @@ import { Position } from '@ghostfolio/common/interfaces'; templateUrl: './assistant-list-item.html', styleUrls: ['./assistant-list-item.scss'] }) -export class AssistantListItemComponent implements FocusableOption { +export class AssistantListItemComponent implements FocusableOption, OnChanges { @HostBinding('attr.tabindex') tabindex = -1; @HostBinding('class.has-focus') get getHasFocus() { return this.hasFocus; } - @Input() holding: Position; + @Input() item: ISearchResultItem; + @Input() mode: 'assetProfile' | 'holding'; @Output() clicked = new EventEmitter(); @ViewChild('link') public linkElement: ElementRef; public hasFocus = false; + public queryParams: Params; + public routerLink: string[]; public constructor(private changeDetectorRef: ChangeDetectorRef) {} + public ngOnChanges() { + const dataSource = this.item?.dataSource; + const symbol = this.item?.symbol; + + if (this.mode === 'assetProfile') { + this.queryParams = { + dataSource, + symbol, + assetProfileDialog: true + }; + this.routerLink = ['/admin', 'market-data']; + } else if (this.mode === 'holding') { + this.queryParams = { + dataSource, + symbol, + positionDetailDialog: true + }; + this.routerLink = ['/portfolio', 'holdings']; + } + } + public focus() { this.hasFocus = true; diff --git a/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.html b/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.html index 5e078241d..d75db3c8a 100644 --- a/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.html +++ b/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.html @@ -1,12 +1,16 @@ {{ holding?.name }}{{ item?.name }} +
+ {{ item?.symbol | gfSymbol }} · {{ item?.currency }} + · {{ item?.assetSubClassString }} diff --git a/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.module.ts b/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.module.ts index 9a88fc919..0c2e89726 100644 --- a/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.module.ts +++ b/libs/ui/src/lib/assistant/assistant-list-item/assistant-list-item.module.ts @@ -1,12 +1,13 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; +import { GfSymbolModule } from '@ghostfolio/client/pipes/symbol/symbol.module'; import { AssistantListItemComponent } from './assistant-list-item.component'; @NgModule({ declarations: [AssistantListItemComponent], exports: [AssistantListItemComponent], - imports: [CommonModule, RouterModule] + imports: [CommonModule, GfSymbolModule, RouterModule] }) export class GfAssistantListItemModule {} diff --git a/libs/ui/src/lib/assistant/assistant.component.ts b/libs/ui/src/lib/assistant/assistant.component.ts index 30db8f2e0..2cfd9eff2 100644 --- a/libs/ui/src/lib/assistant/assistant.component.ts +++ b/libs/ui/src/lib/assistant/assistant.component.ts @@ -16,9 +16,10 @@ import { } from '@angular/core'; import { FormControl } from '@angular/forms'; import { MatMenuTrigger } from '@angular/material/menu'; +import { AdminService } from '@ghostfolio/client/services/admin.service'; import { DataService } from '@ghostfolio/client/services/data.service'; -import { Position } from '@ghostfolio/common/interfaces'; -import { EMPTY, Subject, lastValueFrom } from 'rxjs'; +import { translate } from '@ghostfolio/ui/i18n'; +import { EMPTY, Observable, Subject, lastValueFrom } from 'rxjs'; import { catchError, debounceTime, @@ -29,13 +30,13 @@ import { } from 'rxjs/operators'; import { AssistantListItemComponent } from './assistant-list-item/assistant-list-item.component'; -import { ISearchResults } from './interfaces/interfaces'; +import { ISearchResultItem, ISearchResults } from './interfaces/interfaces'; @Component({ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'gf-assistant', - templateUrl: './assistant.html', - styleUrls: ['./assistant.scss'] + styleUrls: ['./assistant.scss'], + templateUrl: './assistant.html' }) export class AssistantComponent implements OnDestroy, OnInit { @HostListener('document:keydown', ['$event']) onKeydown( @@ -71,6 +72,7 @@ export class AssistantComponent implements OnDestroy, OnInit { } @Input() deviceType: string; + @Input() hasPermissionToAccessAdminControl: boolean; @Output() closed = new EventEmitter(); @@ -87,6 +89,7 @@ export class AssistantComponent implements OnDestroy, OnInit { public placeholder = $localize`Find holding...`; public searchFormControl = new FormControl(''); public searchResults: ISearchResults = { + assetProfiles: [], holdings: [] }; @@ -94,6 +97,7 @@ export class AssistantComponent implements OnDestroy, OnInit { private unsubscribeSubject = new Subject(); public constructor( + private adminService: AdminService, private changeDetectorRef: ChangeDetectorRef, private dataService: DataService ) {} @@ -104,6 +108,7 @@ export class AssistantComponent implements OnDestroy, OnInit { map((searchTerm) => { this.isLoading = true; this.searchResults = { + assetProfiles: [], holdings: [] }; @@ -115,6 +120,7 @@ export class AssistantComponent implements OnDestroy, OnInit { distinctUntilChanged(), mergeMap(async (searchTerm) => { const result = { + assetProfiles: [], holdings: [] }; @@ -140,6 +146,7 @@ export class AssistantComponent implements OnDestroy, OnInit { this.isLoading = true; this.keyManager = new FocusKeyManager(this.assistantListItems).withWrap(); this.searchResults = { + assetProfiles: [], holdings: [] }; @@ -180,10 +187,23 @@ export class AssistantComponent implements OnDestroy, OnInit { } private async getSearchResults(aSearchTerm: string) { - let holdings: Position[] = []; + let assetProfiles: ISearchResultItem[] = []; + let holdings: ISearchResultItem[] = []; + + if (this.hasPermissionToAccessAdminControl) { + try { + assetProfiles = await lastValueFrom( + this.searchAssetProfiles(aSearchTerm) + ); + assetProfiles = assetProfiles.slice( + 0, + AssistantComponent.SEARCH_RESULTS_DEFAULT_LIMIT + ); + } catch {} + } try { - holdings = await lastValueFrom(this.searchHolding(aSearchTerm)); + holdings = await lastValueFrom(this.searchHoldings(aSearchTerm)); holdings = holdings.slice( 0, AssistantComponent.SEARCH_RESULTS_DEFAULT_LIMIT @@ -191,11 +211,46 @@ export class AssistantComponent implements OnDestroy, OnInit { } catch {} return { + assetProfiles, holdings }; } - private searchHolding(aSearchTerm: string) { + private searchAssetProfiles( + aSearchTerm: string + ): Observable { + return this.adminService + .fetchAdminMarketData({ + filters: [ + { + id: aSearchTerm, + type: 'SEARCH_QUERY' + } + ], + take: AssistantComponent.SEARCH_RESULTS_DEFAULT_LIMIT + }) + .pipe( + catchError(() => { + return EMPTY; + }), + map(({ marketData }) => { + return marketData.map( + ({ assetSubClass, currency, dataSource, name, symbol }) => { + return { + currency, + dataSource, + name, + symbol, + assetSubClassString: translate(assetSubClass) + }; + } + ); + }), + takeUntil(this.unsubscribeSubject) + ); + } + + private searchHoldings(aSearchTerm: string): Observable { return this.dataService .fetchPositions({ filters: [ @@ -211,7 +266,17 @@ export class AssistantComponent implements OnDestroy, OnInit { return EMPTY; }), map(({ positions }) => { - return positions; + return positions.map( + ({ assetSubClass, currency, dataSource, name, symbol }) => { + return { + currency, + dataSource, + name, + symbol, + assetSubClassString: translate(assetSubClass) + }; + } + ); }), takeUntil(this.unsubscribeSubject) ); diff --git a/libs/ui/src/lib/assistant/assistant.html b/libs/ui/src/lib/assistant/assistant.html index c5db29658..0644c945e 100644 --- a/libs/ui/src/lib/assistant/assistant.html +++ b/libs/ui/src/lib/assistant/assistant.html @@ -45,8 +45,9 @@
Holdings
@@ -62,5 +63,26 @@
No entries...
+
+
Asset Profiles
+ + + +
No entries...
+
+
diff --git a/libs/ui/src/lib/assistant/interfaces/interfaces.ts b/libs/ui/src/lib/assistant/interfaces/interfaces.ts index 922091fb5..99f70dbe1 100644 --- a/libs/ui/src/lib/assistant/interfaces/interfaces.ts +++ b/libs/ui/src/lib/assistant/interfaces/interfaces.ts @@ -1,5 +1,12 @@ -import { Position } from '@ghostfolio/common/interfaces'; +import { UniqueAsset } from '@ghostfolio/common/interfaces'; + +export interface ISearchResultItem extends UniqueAsset { + assetSubClassString: string; + currency: string; + name: string; +} export interface ISearchResults { - holdings: Position[]; + assetProfiles: ISearchResultItem[]; + holdings: ISearchResultItem[]; } diff --git a/package.json b/package.json index 0f75e6df4..3b5247252 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "2.10.0", + "version": "2.12.0", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "repository": "https://github.com/ghostfolio/ghostfolio", @@ -82,8 +82,8 @@ "@nestjs/schedule": "3.0.2", "@nestjs/serve-static": "4.0.0", "@prisma/client": "5.4.2", - "@simplewebauthn/browser": "5.2.1", - "@simplewebauthn/server": "5.2.1", + "@simplewebauthn/browser": "8.3.1", + "@simplewebauthn/server": "8.3.2", "@stripe/stripe-js": "1.47.0", "alphavantage": "2.2.0", "big.js": "6.2.1", @@ -157,7 +157,7 @@ "@nx/web": "16.7.4", "@nx/workspace": "16.7.4", "@schematics/angular": "16.2.0", - "@simplewebauthn/typescript-types": "5.2.1", + "@simplewebauthn/typescript-types": "8.0.0", "@storybook/addon-essentials": "7.3.2", "@storybook/angular": "7.3.2", "@storybook/core-server": "7.3.2", diff --git a/yarn.lock b/yarn.lock index aede5f1be..3c798bb15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1819,6 +1819,36 @@ resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.2.tgz#6110f918d273fe2af8ea1c4398a88774bb9fc12f" integrity sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg== +"@cbor-extract/cbor-extract-darwin-arm64@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@cbor-extract/cbor-extract-darwin-arm64/-/cbor-extract-darwin-arm64-2.1.1.tgz#5721f6dd3feae0b96d23122853ce977e0671b7a6" + integrity sha512-blVBy5MXz6m36Vx0DfLd7PChOQKEs8lK2bD1WJn/vVgG4FXZiZmZb2GECHFvVPA5T7OnODd9xZiL3nMCv6QUhA== + +"@cbor-extract/cbor-extract-darwin-x64@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@cbor-extract/cbor-extract-darwin-x64/-/cbor-extract-darwin-x64-2.1.1.tgz#c25e7d0133950d87d101d7b3afafea8d50d83f5f" + integrity sha512-h6KFOzqk8jXTvkOftyRIWGrd7sKQzQv2jVdTL9nKSf3D2drCvQB/LHUxAOpPXo3pv2clDtKs3xnHalpEh3rDsw== + +"@cbor-extract/cbor-extract-linux-arm64@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@cbor-extract/cbor-extract-linux-arm64/-/cbor-extract-linux-arm64-2.1.1.tgz#48f78e7d8f0fcc84ed074b6bfa6d15dd83187c63" + integrity sha512-SxAaRcYf8S0QHaMc7gvRSiTSr7nUYMqbUdErBEu+HYA4Q6UNydx1VwFE68hGcp1qvxcy9yT5U7gA+a5XikfwSQ== + +"@cbor-extract/cbor-extract-linux-arm@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@cbor-extract/cbor-extract-linux-arm/-/cbor-extract-linux-arm-2.1.1.tgz#7507d346389cb682e44fab8fae9534edd52e2e41" + integrity sha512-ds0uikdcIGUjPyraV4oJqyVE5gl/qYBpa/Wnh6l6xLE2lj/hwnjT2XcZCChdXwW/YFZ1LUHs6waoYN8PmK0nKQ== + +"@cbor-extract/cbor-extract-linux-x64@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@cbor-extract/cbor-extract-linux-x64/-/cbor-extract-linux-x64-2.1.1.tgz#b7c1d2be61c58ec18d58afbad52411ded63cd4cd" + integrity sha512-GVK+8fNIE9lJQHAlhOROYiI0Yd4bAZ4u++C2ZjlkS3YmO6hi+FUxe6Dqm+OKWTcMpL/l71N6CQAmaRcb4zyJuA== + +"@cbor-extract/cbor-extract-win32-x64@2.1.1": + version "2.1.1" + resolved "https://registry.yarnpkg.com/@cbor-extract/cbor-extract-win32-x64/-/cbor-extract-win32-x64-2.1.1.tgz#21b11a1a3f18c3e7d62fd5f87438b7ed2c64c1f7" + integrity sha512-2Niq1C41dCRIDeD8LddiH+mxGlO7HJ612Ll3D/E73ZWBmycued+8ghTr/Ho3CMOWPUEr08XtyBMVXAjqF+TcKw== + "@codewithdan/observable-store@2.2.15": version "2.2.15" resolved "https://registry.yarnpkg.com/@codewithdan/observable-store/-/observable-store-2.2.15.tgz#6d27e0988e182853def59a714b712f4389e558d2" @@ -2540,6 +2570,11 @@ resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.1.1.tgz#1a5b1959a528e374e8037c4396c3e825d6cf4a83" integrity sha512-m0G6wlnhm/AX0H12IOWtK8gASEMffnX08RtKkCgTdHb9JpHKGloI7icFfLg9ZmQeavcvR0PKmzxClyuFPSjKWw== +"@hexagon/base64@^1.1.27": + version "1.1.28" + resolved "https://registry.yarnpkg.com/@hexagon/base64/-/base64-1.1.28.tgz#7d306a97f1423829be5b27c9d388fe50e3099d48" + integrity sha512-lhqDEAvWixy3bZ+UOYbPwUbBkwBq5C1LAJ/xPC8Oi+lL54oyakv/npbA0aU2hgCsx/1NUd4IBvV03+aUBWxerw== + "@humanwhocodes/config-array@^0.11.8": version "0.11.10" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" @@ -4252,7 +4287,7 @@ node-addon-api "^3.2.1" node-gyp-build "^4.3.0" -"@peculiar/asn1-android@^2.1.7": +"@peculiar/asn1-android@^2.3.6": version "2.3.6" resolved "https://registry.yarnpkg.com/@peculiar/asn1-android/-/asn1-android-2.3.6.tgz#20363c23bc5b9a91f7ffd80d7c3842dccff8c20b" integrity sha512-zkYh4DsiRhiNfg6tWaUuRc+huwlb9XJbmeZLrjTz9v76UK1Ehq3EnfJFED6P3sdznW/nqWe46LoM9JrqxcD58g== @@ -4261,7 +4296,27 @@ asn1js "^3.0.5" tslib "^2.4.0" -"@peculiar/asn1-schema@^2.1.7", "@peculiar/asn1-schema@^2.3.6": +"@peculiar/asn1-ecc@^2.3.6": + version "2.3.6" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-ecc/-/asn1-ecc-2.3.6.tgz#f155f33f5c61df463d9b33b911d25578a19694b7" + integrity sha512-Hu1xzMJQWv8/GvzOiinaE6XiD1/kEhq2C/V89UEoWeZ2fLUcGNIvMxOr/pMyL0OmpRWj/mhCTXOZp4PP+a0aTg== + dependencies: + "@peculiar/asn1-schema" "^2.3.6" + "@peculiar/asn1-x509" "^2.3.6" + asn1js "^3.0.5" + tslib "^2.4.0" + +"@peculiar/asn1-rsa@^2.3.6": + version "2.3.6" + resolved "https://registry.yarnpkg.com/@peculiar/asn1-rsa/-/asn1-rsa-2.3.6.tgz#e2af2c52a914c60f33853a86a48905ec555b29c2" + integrity sha512-DswjJyAXZnvESuImGNTvbNKvh1XApBVqU+r3UmrFFTAI23gv62byl0f5OFKWTNhCf66WQrd3sklpsCZc/4+jwA== + dependencies: + "@peculiar/asn1-schema" "^2.3.6" + "@peculiar/asn1-x509" "^2.3.6" + asn1js "^3.0.5" + tslib "^2.4.0" + +"@peculiar/asn1-schema@^2.3.6": version "2.3.6" resolved "https://registry.yarnpkg.com/@peculiar/asn1-schema/-/asn1-schema-2.3.6.tgz#3dd3c2ade7f702a9a94dfb395c192f5fa5d6b922" integrity sha512-izNRxPoaeJeg/AyH8hER6s+H7p4itk+03QCa4sbxI3lNdseQYCuxzgsuNK8bTXChtLTjpJz6NmXKA73qLa3rCA== @@ -4270,7 +4325,7 @@ pvtsutils "^1.3.2" tslib "^2.4.0" -"@peculiar/asn1-x509@^2.1.7": +"@peculiar/asn1-x509@^2.3.6": version "2.3.6" resolved "https://registry.yarnpkg.com/@peculiar/asn1-x509/-/asn1-x509-2.3.6.tgz#e50154a460cdf43da8a41b23ee807a53e0036af0" integrity sha512-dRwX31R1lcbIdzbztiMvLNTDoGptxdV7HocNx87LfKU0fEWh7fTWJjx4oV+glETSy6heF/hJHB2J4RGB3vVSYg== @@ -4638,38 +4693,32 @@ "@sigstore/protobuf-specs" "^0.1.0" tuf-js "^1.1.7" -"@simplewebauthn/browser@5.2.1": - version "5.2.1" - resolved "https://registry.yarnpkg.com/@simplewebauthn/browser/-/browser-5.2.1.tgz#569252a9f235a99aae90c4d1cc6c441f42637b8e" - integrity sha512-TxL3OPHJf57hmnfQoF3zRIQWEdsJLxrA9NcGdRK0sB/h3jd13kpGQonBtMnj4YBQnWTtRDZ804wlpI9IEMaJ9g== - -"@simplewebauthn/server@5.2.1": - version "5.2.1" - resolved "https://registry.yarnpkg.com/@simplewebauthn/server/-/server-5.2.1.tgz#49038d2951ad2ac065bdf8342fdb13f78ee4df1c" - integrity sha512-+CQ8oJf9Io8y4ReYLagX5JG9ShntIkdeCPkMoyHLBSRPlNY0N/Yv3Iun4YPQ8d4LJUU9f8S1eD5bibIEMjWDRg== - dependencies: - "@peculiar/asn1-android" "^2.1.7" - "@peculiar/asn1-schema" "^2.1.7" - "@peculiar/asn1-x509" "^2.1.7" - "@simplewebauthn/typescript-types" "^5.2.1" - base64url "^3.0.1" - cbor "^5.1.0" - debug "^4.3.2" - elliptic "^6.5.3" - jsrsasign "^10.4.0" - jwk-to-pem "^2.0.4" - node-fetch "^2.6.0" - node-rsa "^1.1.1" +"@simplewebauthn/browser@8.3.1": + version "8.3.1" + resolved "https://registry.yarnpkg.com/@simplewebauthn/browser/-/browser-8.3.1.tgz#f5c1aed6313d61944a9e13f16ae4495750bddf93" + integrity sha512-bMW7oOkxX4ydRAkkPtJ1do2k9yOoIGc/hZYebcuEOVdJoC6wwVpu97mYY7Mz8B9hLlcaR5WFgBsLl5tSJVzm8A== + dependencies: + "@simplewebauthn/typescript-types" "^8.0.0" -"@simplewebauthn/typescript-types@5.2.1": - version "5.2.1" - resolved "https://registry.yarnpkg.com/@simplewebauthn/typescript-types/-/typescript-types-5.2.1.tgz#a8229ce4f71be7edafe3bfdce062b332ef494f0d" - integrity sha512-t/NzbjaD0zu4ivUmiof2cPA8X5LHhFX+DflBBl71/dzEhl15qepDI2rxWdjB+Hc0FfOT1fBQnb1uP19fPcDUiA== +"@simplewebauthn/server@8.3.2": + version "8.3.2" + resolved "https://registry.yarnpkg.com/@simplewebauthn/server/-/server-8.3.2.tgz#dfdbe7af4c1258e786c4a0b1c83c54743ba7568c" + integrity sha512-ceo8t5gdO5W/JOePQWPDH+rAd8tO6QNalLU56rc9ItdzaTjk+qcYwQg/BKXDDg6117P3HKrRBkZwBrMJl4dOdA== + dependencies: + "@hexagon/base64" "^1.1.27" + "@peculiar/asn1-android" "^2.3.6" + "@peculiar/asn1-ecc" "^2.3.6" + "@peculiar/asn1-rsa" "^2.3.6" + "@peculiar/asn1-schema" "^2.3.6" + "@peculiar/asn1-x509" "^2.3.6" + "@simplewebauthn/typescript-types" "^8.0.0" + cbor-x "^1.5.2" + cross-fetch "^4.0.0" -"@simplewebauthn/typescript-types@^5.2.1": - version "5.4.0" - resolved "https://registry.yarnpkg.com/@simplewebauthn/typescript-types/-/typescript-types-5.4.0.tgz#533b28e7cabcc092396ecd07bbb953b71e7696b6" - integrity sha512-LeJq6Jx+o7D6iIlCy8CH5jCjwVcUvAReEo66VcF3nysfc/yKW5yCAPLSRmPITF4CRZTfnVPxUBUcveUQL6aBMA== +"@simplewebauthn/typescript-types@8.0.0", "@simplewebauthn/typescript-types@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@simplewebauthn/typescript-types/-/typescript-types-8.0.0.tgz#1698a7228aba880c5c1deba1f13a4f9fd8851cb3" + integrity sha512-d7Izb2H+LZJteXMkS8DmpAarD6mZdpIOu/av/yH4/u/3Pd6DKFLyBM3j8BMmUvUqpzvJvHARNrRfQYto58mtTQ== "@sinclair/typebox@^0.27.8": version "0.27.8" @@ -7122,17 +7171,7 @@ arrify@^2.0.0: resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== -asn1.js@^5.3.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - -asn1@^0.2.4, asn1@~0.2.3: +asn1@~0.2.3: version "0.2.6" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== @@ -7461,7 +7500,7 @@ base64-js@^1.2.0, base64-js@^1.3.0, base64-js@^1.3.1: resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== -base64url@3.x.x, base64url@^3.0.1: +base64url@3.x.x: version "3.0.1" resolved "https://registry.yarnpkg.com/base64url/-/base64url-3.0.1.tgz#6399d572e2bc3f90a9a8b22d5dbb0a32d33f788d" integrity sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== @@ -7527,7 +7566,7 @@ big.js@^5.2.2: resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== -bignumber.js@^9.0.0, bignumber.js@^9.0.1: +bignumber.js@^9.0.0: version "9.1.1" resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6" integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig== @@ -7556,11 +7595,6 @@ bluebird@^3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -bn.js@^4.0.0, bn.js@^4.11.9: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - body-parser@1.20.1: version "1.20.1" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.1.tgz#b1812a8912c195cd371a3ee5e66faa2338a5c668" @@ -7689,11 +7723,6 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" -brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w== - browser-assert@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/browser-assert/-/browser-assert-1.2.1.tgz#9aaa5a2a8c74685c2ae05bfe46efd606f068c200" @@ -7953,13 +7982,26 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== -cbor@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/cbor/-/cbor-5.2.0.tgz#4cca67783ccd6de7b50ab4ed62636712f287a67c" - integrity sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A== +cbor-extract@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/cbor-extract/-/cbor-extract-2.1.1.tgz#f154b31529fdb6b7c70fb3ca448f44eda96a1b42" + integrity sha512-1UX977+L+zOJHsp0mWFG13GLwO6ucKgSmSW6JTl8B9GUvACvHeIVpFqhU92299Z6PfD09aTXDell5p+lp1rUFA== dependencies: - bignumber.js "^9.0.1" - nofilter "^1.0.4" + node-gyp-build-optional-packages "5.0.3" + optionalDependencies: + "@cbor-extract/cbor-extract-darwin-arm64" "2.1.1" + "@cbor-extract/cbor-extract-darwin-x64" "2.1.1" + "@cbor-extract/cbor-extract-linux-arm" "2.1.1" + "@cbor-extract/cbor-extract-linux-arm64" "2.1.1" + "@cbor-extract/cbor-extract-linux-x64" "2.1.1" + "@cbor-extract/cbor-extract-win32-x64" "2.1.1" + +cbor-x@^1.5.2: + version "1.5.4" + resolved "https://registry.yarnpkg.com/cbor-x/-/cbor-x-1.5.4.tgz#8f0754fa8589cbd7339b613b2b5717d133508e98" + integrity sha512-PVKILDn+Rf6MRhhcyzGXi5eizn1i0i3F8Fe6UMMxXBnWkalq9+C5+VTmlIjAYM4iF2IYF2N+zToqAfYOp+3rfw== + optionalDependencies: + cbor-extract "^2.1.1" chalk@^1.0.0, chalk@^1.1.3: version "1.1.3" @@ -8691,6 +8733,13 @@ cross-fetch@^3.0.5: dependencies: node-fetch "^2.6.12" +cross-fetch@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.0.0.tgz#f037aef1580bb3a1a35164ea2a848ba81b445983" + integrity sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g== + dependencies: + node-fetch "^2.6.12" + cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -9741,19 +9790,6 @@ elkjs@^0.8.2: resolved "https://registry.yarnpkg.com/elkjs/-/elkjs-0.8.2.tgz#c37763c5a3e24e042e318455e0147c912a7c248e" integrity sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ== -elliptic@^6.5.3, elliptic@^6.5.4: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - emittery@^0.13.1: version "0.13.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.13.1.tgz#c04b8c3457490e0847ae51fced3af52d338e3dad" @@ -11673,14 +11709,6 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" -hash.js@^1.0.0, hash.js@^1.0.3: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - hdr-histogram-js@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz#0b860534655722b6e3f3e7dca7b78867cf43dcb5" @@ -11710,15 +11738,6 @@ helmet@7.0.0: resolved "https://registry.yarnpkg.com/helmet/-/helmet-7.0.0.tgz#ac3011ba82fa2467f58075afa58a49427ba6212d" integrity sha512-MsIgYmdBh460ZZ8cJC81q4XJknjG567wzEmv46WOBblDb6TUd3z8/GhgmsM9pn8g2B80tAJ4m5/d3Bi1KrSUBQ== -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg== - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" @@ -13490,11 +13509,6 @@ jsprim@^2.0.2: json-schema "0.4.0" verror "1.10.0" -jsrsasign@^10.4.0: - version "10.8.6" - resolved "https://registry.yarnpkg.com/jsrsasign/-/jsrsasign-10.8.6.tgz#ebf7f3c812c6517af84f0d8a10115e0dbfabe145" - integrity sha512-bQmbVtsfbgaKBTWCKiDCPlUPbdlRIK/FzSwT3BzIgZl/cU6TqXu6pZJsCI/dJVrZ9Gir5GC4woqw9shH/v7MBw== - jwa@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" @@ -13513,15 +13527,6 @@ jwa@^2.0.0: ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jwk-to-pem@^2.0.4: - version "2.0.5" - resolved "https://registry.yarnpkg.com/jwk-to-pem/-/jwk-to-pem-2.0.5.tgz#151310bcfbcf731adc5ad9f379cbc8b395742906" - integrity sha512-L90jwellhO8jRKYwbssU9ifaMVqajzj3fpRjDKcsDzrslU9syRbFqfkXtT4B89HYAap+xsxNcxgBSB09ig+a7A== - dependencies: - asn1.js "^5.3.0" - elliptic "^6.5.4" - safe-buffer "^5.0.1" - jws@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" @@ -14226,16 +14231,11 @@ mini-css-extract-plugin@~2.4.7: dependencies: schema-utils "^4.0.0" -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: +minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== - minimatch@3.0.5: version "3.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.5.tgz#4da8f1290ee0f0f8e83d60ca69f8f134068604a3" @@ -14600,7 +14600,7 @@ node-fetch-native@^1.0.2: resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-1.2.0.tgz#13ec6df98f33168958dbfb6945f10aedf42e7ea8" integrity sha512-5IAMBTl9p6PaAjYCnMv5FmqIF6GcZnawAVnzaCG0rX2aYZJ4CxEkZNtVPuTRug7fL7wyM5BQYTlAzcyMPi6oTQ== -node-fetch@^2.0.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: +node-fetch@^2.0.0, node-fetch@^2.6.1, node-fetch@^2.6.12, node-fetch@^2.6.7: version "2.6.12" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba" integrity sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g== @@ -14612,6 +14612,11 @@ node-forge@^1, node-forge@^1.3.1: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== +node-gyp-build-optional-packages@5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.3.tgz#92a89d400352c44ad3975010368072b41ad66c17" + integrity sha512-k75jcVzk5wnnc/FMxsf4udAoTEUv2jY3ycfdSd3yWu6Cnd1oee6/CfZJApyscA4FJOmdoixWwiwOyf16RzD5JA== + node-gyp-build-optional-packages@5.0.7: version "5.0.7" resolved "https://registry.yarnpkg.com/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.0.7.tgz#5d2632bbde0ab2f6e22f1bbac2199b07244ae0b3" @@ -14654,18 +14659,6 @@ node-releases@^2.0.12: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== -node-rsa@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/node-rsa/-/node-rsa-1.1.1.tgz#efd9ad382097782f506153398496f79e4464434d" - integrity sha512-Jd4cvbJMryN21r5HgxQOpMEqv+ooke/korixNNK3mGqfGJmy0M77WDDzo/05969+OkMy3XW1UuZsSmW9KQm7Fw== - dependencies: - asn1 "^0.2.4" - -nofilter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/nofilter/-/nofilter-1.0.4.tgz#78d6f4b6a613e7ced8b015cec534625f7667006e" - integrity sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA== - non-layered-tidy-tree-layout@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/non-layered-tidy-tree-layout/-/non-layered-tidy-tree-layout-2.0.2.tgz#57d35d13c356643fc296a55fb11ac15e74da7804"