Browse Source

Task/prettify files 20251204 (#6033)

* Prettify files
pull/6027/head^2
Thomas Kaul 3 days ago
committed by GitHub
parent
commit
ccea6481ab
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 7
      apps/api/src/interceptors/redact-values-in-response/redact-values-in-response.interceptor.ts
  2. 6
      apps/api/src/interceptors/transform-data-source-in-request/transform-data-source-in-request.interceptor.ts
  3. 6
      apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts
  4. 102
      apps/client/src/app/pages/blog/blog-page.routes.ts
  5. 6
      apps/client/src/app/pages/resources/resources-page.routes.ts
  6. 3
      libs/common/src/lib/interfaces/responses/data-provider-ghostfolio-asset-profile-response.interface.ts
  7. 39
      libs/common/src/lib/interfaces/simplewebauthn.interface.ts
  8. 4
      libs/common/src/lib/validators/is-currency-code.ts
  9. 6
      libs/ui/src/lib/assistant/interfaces/interfaces.ts

7
apps/api/src/interceptors/redact-values-in-response/redact-values-in-response.interceptor.ts

@ -16,9 +16,10 @@ import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
@Injectable() @Injectable()
export class RedactValuesInResponseInterceptor<T> export class RedactValuesInResponseInterceptor<T> implements NestInterceptor<
implements NestInterceptor<T, any> T,
{ any
> {
public intercept( public intercept(
context: ExecutionContext, context: ExecutionContext,
next: CallHandler<T> next: CallHandler<T>

6
apps/api/src/interceptors/transform-data-source-in-request/transform-data-source-in-request.interceptor.ts

@ -11,9 +11,9 @@ import { DataSource } from '@prisma/client';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@Injectable() @Injectable()
export class TransformDataSourceInRequestInterceptor<T> export class TransformDataSourceInRequestInterceptor<
implements NestInterceptor<T, any> T
{ > implements NestInterceptor<T, any> {
public constructor( public constructor(
private readonly configurationService: ConfigurationService private readonly configurationService: ConfigurationService
) {} ) {}

6
apps/api/src/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor.ts

@ -13,9 +13,9 @@ import { Observable } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
@Injectable() @Injectable()
export class TransformDataSourceInResponseInterceptor<T> export class TransformDataSourceInResponseInterceptor<
implements NestInterceptor<T, any> T
{ > implements NestInterceptor<T, any> {
private encodedDataSourceMap: { private encodedDataSourceMap: {
[dataSource: string]: string; [dataSource: string]: string;
} = {}; } = {};

102
apps/client/src/app/pages/blog/blog-page.routes.ts

@ -34,117 +34,117 @@ export const routes: Routes = [
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2022/01/ghostfolio-first-months-in-open-source', path: '2022/01/ghostfolio-first-months-in-open-source',
loadComponent: () => loadComponent: () =>
import( import('./2022/01/first-months-in-open-source/first-months-in-open-source-page.component').then(
'./2022/01/first-months-in-open-source/first-months-in-open-source-page.component' (c) => c.FirstMonthsInOpenSourcePageComponent
).then((c) => c.FirstMonthsInOpenSourcePageComponent), ),
title: 'First months in Open Source' title: 'First months in Open Source'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2022/07/ghostfolio-meets-internet-identity', path: '2022/07/ghostfolio-meets-internet-identity',
loadComponent: () => loadComponent: () =>
import( import('./2022/07/ghostfolio-meets-internet-identity/ghostfolio-meets-internet-identity-page.component').then(
'./2022/07/ghostfolio-meets-internet-identity/ghostfolio-meets-internet-identity-page.component' (c) => c.GhostfolioMeetsInternetIdentityPageComponent
).then((c) => c.GhostfolioMeetsInternetIdentityPageComponent), ),
title: 'Ghostfolio meets Internet Identity' title: 'Ghostfolio meets Internet Identity'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2022/07/how-do-i-get-my-finances-in-order', path: '2022/07/how-do-i-get-my-finances-in-order',
loadComponent: () => loadComponent: () =>
import( import('./2022/07/how-do-i-get-my-finances-in-order/how-do-i-get-my-finances-in-order-page.component').then(
'./2022/07/how-do-i-get-my-finances-in-order/how-do-i-get-my-finances-in-order-page.component' (c) => c.HowDoIGetMyFinancesInOrderPageComponent
).then((c) => c.HowDoIGetMyFinancesInOrderPageComponent), ),
title: 'How do I get my finances in order?' title: 'How do I get my finances in order?'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2022/08/500-stars-on-github', path: '2022/08/500-stars-on-github',
loadComponent: () => loadComponent: () =>
import( import('./2022/08/500-stars-on-github/500-stars-on-github-page.component').then(
'./2022/08/500-stars-on-github/500-stars-on-github-page.component' (c) => c.FiveHundredStarsOnGitHubPageComponent
).then((c) => c.FiveHundredStarsOnGitHubPageComponent), ),
title: '500 Stars on GitHub' title: '500 Stars on GitHub'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2022/10/hacktoberfest-2022', path: '2022/10/hacktoberfest-2022',
loadComponent: () => loadComponent: () =>
import( import('./2022/10/hacktoberfest-2022/hacktoberfest-2022-page.component').then(
'./2022/10/hacktoberfest-2022/hacktoberfest-2022-page.component' (c) => c.Hacktoberfest2022PageComponent
).then((c) => c.Hacktoberfest2022PageComponent), ),
title: 'Hacktoberfest 2022' title: 'Hacktoberfest 2022'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2022/11/black-friday-2022', path: '2022/11/black-friday-2022',
loadComponent: () => loadComponent: () =>
import( import('./2022/11/black-friday-2022/black-friday-2022-page.component').then(
'./2022/11/black-friday-2022/black-friday-2022-page.component' (c) => c.BlackFriday2022PageComponent
).then((c) => c.BlackFriday2022PageComponent), ),
title: 'Black Friday 2022' title: 'Black Friday 2022'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2022/12/the-importance-of-tracking-your-personal-finances', path: '2022/12/the-importance-of-tracking-your-personal-finances',
loadComponent: () => loadComponent: () =>
import( import('./2022/12/the-importance-of-tracking-your-personal-finances/the-importance-of-tracking-your-personal-finances-page.component').then(
'./2022/12/the-importance-of-tracking-your-personal-finances/the-importance-of-tracking-your-personal-finances-page.component' (c) => c.TheImportanceOfTrackingYourPersonalFinancesPageComponent
).then((c) => c.TheImportanceOfTrackingYourPersonalFinancesPageComponent), ),
title: 'The importance of tracking your personal finances' title: 'The importance of tracking your personal finances'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2023/01/ghostfolio-auf-sackgeld-vorgestellt', path: '2023/01/ghostfolio-auf-sackgeld-vorgestellt',
loadComponent: () => loadComponent: () =>
import( import('./2023/01/ghostfolio-auf-sackgeld-vorgestellt/ghostfolio-auf-sackgeld-vorgestellt-page.component').then(
'./2023/01/ghostfolio-auf-sackgeld-vorgestellt/ghostfolio-auf-sackgeld-vorgestellt-page.component' (c) => c.GhostfolioAufSackgeldVorgestelltPageComponent
).then((c) => c.GhostfolioAufSackgeldVorgestelltPageComponent), ),
title: 'Ghostfolio auf Sackgeld.com vorgestellt' title: 'Ghostfolio auf Sackgeld.com vorgestellt'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2023/02/ghostfolio-meets-umbrel', path: '2023/02/ghostfolio-meets-umbrel',
loadComponent: () => loadComponent: () =>
import( import('./2023/02/ghostfolio-meets-umbrel/ghostfolio-meets-umbrel-page.component').then(
'./2023/02/ghostfolio-meets-umbrel/ghostfolio-meets-umbrel-page.component' (c) => c.GhostfolioMeetsUmbrelPageComponent
).then((c) => c.GhostfolioMeetsUmbrelPageComponent), ),
title: 'Ghostfolio meets Umbrel' title: 'Ghostfolio meets Umbrel'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2023/03/ghostfolio-reaches-1000-stars-on-github', path: '2023/03/ghostfolio-reaches-1000-stars-on-github',
loadComponent: () => loadComponent: () =>
import( import('./2023/03/1000-stars-on-github/1000-stars-on-github-page.component').then(
'./2023/03/1000-stars-on-github/1000-stars-on-github-page.component' (c) => c.ThousandStarsOnGitHubPageComponent
).then((c) => c.ThousandStarsOnGitHubPageComponent), ),
title: 'Ghostfolio reaches 1’000 Stars on GitHub' title: 'Ghostfolio reaches 1’000 Stars on GitHub'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2023/05/unlock-your-financial-potential-with-ghostfolio', path: '2023/05/unlock-your-financial-potential-with-ghostfolio',
loadComponent: () => loadComponent: () =>
import( import('./2023/05/unlock-your-financial-potential-with-ghostfolio/unlock-your-financial-potential-with-ghostfolio-page.component').then(
'./2023/05/unlock-your-financial-potential-with-ghostfolio/unlock-your-financial-potential-with-ghostfolio-page.component' (c) => c.UnlockYourFinancialPotentialWithGhostfolioPageComponent
).then((c) => c.UnlockYourFinancialPotentialWithGhostfolioPageComponent), ),
title: 'Unlock your Financial Potential with Ghostfolio' title: 'Unlock your Financial Potential with Ghostfolio'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2023/07/exploring-the-path-to-fire', path: '2023/07/exploring-the-path-to-fire',
loadComponent: () => loadComponent: () =>
import( import('./2023/07/exploring-the-path-to-fire/exploring-the-path-to-fire-page.component').then(
'./2023/07/exploring-the-path-to-fire/exploring-the-path-to-fire-page.component' (c) => c.ExploringThePathToFirePageComponent
).then((c) => c.ExploringThePathToFirePageComponent), ),
title: 'Exploring the Path to FIRE' title: 'Exploring the Path to FIRE'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2023/08/ghostfolio-joins-oss-friends', path: '2023/08/ghostfolio-joins-oss-friends',
loadComponent: () => loadComponent: () =>
import( import('./2023/08/ghostfolio-joins-oss-friends/ghostfolio-joins-oss-friends-page.component').then(
'./2023/08/ghostfolio-joins-oss-friends/ghostfolio-joins-oss-friends-page.component' (c) => c.GhostfolioJoinsOssFriendsPageComponent
).then((c) => c.GhostfolioJoinsOssFriendsPageComponent), ),
title: 'Ghostfolio joins OSS Friends' title: 'Ghostfolio joins OSS Friends'
}, },
{ {
@ -160,9 +160,9 @@ export const routes: Routes = [
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2023/09/hacktoberfest-2023', path: '2023/09/hacktoberfest-2023',
loadComponent: () => loadComponent: () =>
import( import('./2023/09/hacktoberfest-2023/hacktoberfest-2023-page.component').then(
'./2023/09/hacktoberfest-2023/hacktoberfest-2023-page.component' (c) => c.Hacktoberfest2023PageComponent
).then((c) => c.Hacktoberfest2023PageComponent), ),
title: 'Hacktoberfest 2023' title: 'Hacktoberfest 2023'
}, },
{ {
@ -178,18 +178,18 @@ export const routes: Routes = [
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2023/11/hacktoberfest-2023-debriefing', path: '2023/11/hacktoberfest-2023-debriefing',
loadComponent: () => loadComponent: () =>
import( import('./2023/11/hacktoberfest-2023-debriefing/hacktoberfest-2023-debriefing-page.component').then(
'./2023/11/hacktoberfest-2023-debriefing/hacktoberfest-2023-debriefing-page.component' (c) => c.Hacktoberfest2023DebriefingPageComponent
).then((c) => c.Hacktoberfest2023DebriefingPageComponent), ),
title: 'Hacktoberfest 2023 Debriefing' title: 'Hacktoberfest 2023 Debriefing'
}, },
{ {
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2024/09/hacktoberfest-2024', path: '2024/09/hacktoberfest-2024',
loadComponent: () => loadComponent: () =>
import( import('./2024/09/hacktoberfest-2024/hacktoberfest-2024-page.component').then(
'./2024/09/hacktoberfest-2024/hacktoberfest-2024-page.component' (c) => c.Hacktoberfest2024PageComponent
).then((c) => c.Hacktoberfest2024PageComponent), ),
title: 'Hacktoberfest 2024' title: 'Hacktoberfest 2024'
}, },
{ {
@ -205,9 +205,9 @@ export const routes: Routes = [
canActivate: [AuthGuard], canActivate: [AuthGuard],
path: '2025/09/hacktoberfest-2025', path: '2025/09/hacktoberfest-2025',
loadComponent: () => loadComponent: () =>
import( import('./2025/09/hacktoberfest-2025/hacktoberfest-2025-page.component').then(
'./2025/09/hacktoberfest-2025/hacktoberfest-2025-page.component' (c) => c.Hacktoberfest2025PageComponent
).then((c) => c.Hacktoberfest2025PageComponent), ),
title: 'Hacktoberfest 2025' title: 'Hacktoberfest 2025'
}, },
{ {

6
apps/client/src/app/pages/resources/resources-page.routes.ts

@ -33,9 +33,9 @@ export const routes: Routes = [
{ {
path: publicRoutes.resources.subRoutes.personalFinanceTools.path, path: publicRoutes.resources.subRoutes.personalFinanceTools.path,
loadChildren: () => loadChildren: () =>
import( import('./personal-finance-tools/personal-finance-tools-page.routes').then(
'./personal-finance-tools/personal-finance-tools-page.routes' (m) => m.routes
).then((m) => m.routes) )
} }
], ],
path: '', path: '',

3
libs/common/src/lib/interfaces/responses/data-provider-ghostfolio-asset-profile-response.interface.ts

@ -1,4 +1,3 @@
import { SymbolProfile } from '@prisma/client'; import { SymbolProfile } from '@prisma/client';
export interface DataProviderGhostfolioAssetProfileResponse export interface DataProviderGhostfolioAssetProfileResponse extends Partial<SymbolProfile> {}
extends Partial<SymbolProfile> {}

39
libs/common/src/lib/interfaces/simplewebauthn.interface.ts

@ -3,8 +3,7 @@ export interface AuthenticatorAssertionResponse extends AuthenticatorResponse {
readonly signature: ArrayBuffer; readonly signature: ArrayBuffer;
readonly userHandle: ArrayBuffer | null; readonly userHandle: ArrayBuffer | null;
} }
export interface AuthenticatorAttestationResponse export interface AuthenticatorAttestationResponse extends AuthenticatorResponse {
extends AuthenticatorResponse {
readonly attestationObject: ArrayBuffer; readonly attestationObject: ArrayBuffer;
} }
export interface AuthenticationExtensionsClientInputs { export interface AuthenticationExtensionsClientInputs {
@ -57,8 +56,7 @@ export interface PublicKeyCredentialRequestOptions {
timeout?: number; timeout?: number;
userVerification?: UserVerificationRequirement; userVerification?: UserVerificationRequirement;
} }
export interface PublicKeyCredentialUserEntity export interface PublicKeyCredentialUserEntity extends PublicKeyCredentialEntity {
extends PublicKeyCredentialEntity {
displayName: string; displayName: string;
id: BufferSource; id: BufferSource;
} }
@ -99,8 +97,7 @@ export declare type BufferSource = ArrayBufferView | ArrayBuffer;
export declare type PublicKeyCredentialType = 'public-key'; export declare type PublicKeyCredentialType = 'public-key';
export declare type UvmEntry = number[]; export declare type UvmEntry = number[];
export interface PublicKeyCredentialCreationOptionsJSON export interface PublicKeyCredentialCreationOptionsJSON extends Omit<
extends Omit<
PublicKeyCredentialCreationOptions, PublicKeyCredentialCreationOptions,
'challenge' | 'user' | 'excludeCredentials' 'challenge' | 'user' | 'excludeCredentials'
> { > {
@ -113,8 +110,7 @@ export interface PublicKeyCredentialCreationOptionsJSON
* A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to * A variant of PublicKeyCredentialRequestOptions suitable for JSON transmission to the browser to
* (eventually) get passed into navigator.credentials.get(...) in the browser. * (eventually) get passed into navigator.credentials.get(...) in the browser.
*/ */
export interface PublicKeyCredentialRequestOptionsJSON export interface PublicKeyCredentialRequestOptionsJSON extends Omit<
extends Omit<
PublicKeyCredentialRequestOptions, PublicKeyCredentialRequestOptions,
'challenge' | 'allowCredentials' 'challenge' | 'allowCredentials'
> { > {
@ -122,12 +118,16 @@ export interface PublicKeyCredentialRequestOptionsJSON
allowCredentials?: PublicKeyCredentialDescriptorJSON[]; allowCredentials?: PublicKeyCredentialDescriptorJSON[];
extensions?: AuthenticationExtensionsClientInputs; extensions?: AuthenticationExtensionsClientInputs;
} }
export interface PublicKeyCredentialDescriptorJSON export interface PublicKeyCredentialDescriptorJSON extends Omit<
extends Omit<PublicKeyCredentialDescriptor, 'id'> { PublicKeyCredentialDescriptor,
'id'
> {
id: Base64URLString; id: Base64URLString;
} }
export interface PublicKeyCredentialUserEntityJSON export interface PublicKeyCredentialUserEntityJSON extends Omit<
extends Omit<PublicKeyCredentialUserEntity, 'id'> { PublicKeyCredentialUserEntity,
'id'
> {
id: string; id: string;
} }
/** /**
@ -140,8 +140,7 @@ export interface AttestationCredential extends PublicKeyCredential {
* A slightly-modified AttestationCredential to simplify working with ArrayBuffers that * A slightly-modified AttestationCredential to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server. * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*/ */
export interface AttestationCredentialJSON export interface AttestationCredentialJSON extends Omit<
extends Omit<
AttestationCredential, AttestationCredential,
'response' | 'rawId' | 'getClientExtensionResults' 'response' | 'rawId' | 'getClientExtensionResults'
> { > {
@ -160,8 +159,7 @@ export interface AssertionCredential extends PublicKeyCredential {
* A slightly-modified AssertionCredential to simplify working with ArrayBuffers that * A slightly-modified AssertionCredential to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server. * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*/ */
export interface AssertionCredentialJSON export interface AssertionCredentialJSON extends Omit<
extends Omit<
AssertionCredential, AssertionCredential,
'response' | 'rawId' | 'getClientExtensionResults' 'response' | 'rawId' | 'getClientExtensionResults'
> { > {
@ -173,8 +171,7 @@ export interface AssertionCredentialJSON
* A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that * A slightly-modified AuthenticatorAttestationResponse to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server. * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*/ */
export interface AuthenticatorAttestationResponseJSON export interface AuthenticatorAttestationResponseJSON extends Omit<
extends Omit<
AuthenticatorAttestationResponseFuture, AuthenticatorAttestationResponseFuture,
'clientDataJSON' | 'attestationObject' 'clientDataJSON' | 'attestationObject'
> { > {
@ -185,8 +182,7 @@ export interface AuthenticatorAttestationResponseJSON
* A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that * A slightly-modified AuthenticatorAssertionResponse to simplify working with ArrayBuffers that
* are Base64URL-encoded in the browser so that they can be sent as JSON to the server. * are Base64URL-encoded in the browser so that they can be sent as JSON to the server.
*/ */
export interface AuthenticatorAssertionResponseJSON export interface AuthenticatorAssertionResponseJSON extends Omit<
extends Omit<
AuthenticatorAssertionResponse, AuthenticatorAssertionResponse,
'authenticatorData' | 'clientDataJSON' | 'signature' | 'userHandle' 'authenticatorData' | 'clientDataJSON' | 'signature' | 'userHandle'
> { > {
@ -217,8 +213,7 @@ export declare type Base64URLString = string;
* *
* Properties marked optional are not supported in all browsers. * Properties marked optional are not supported in all browsers.
*/ */
export interface AuthenticatorAttestationResponseFuture export interface AuthenticatorAttestationResponseFuture extends AuthenticatorAttestationResponse {
extends AuthenticatorAttestationResponse {
getTransports?: () => AuthenticatorTransport[]; getTransports?: () => AuthenticatorTransport[];
getAuthenticatorData?: () => ArrayBuffer; getAuthenticatorData?: () => ArrayBuffer;
getPublicKey?: () => ArrayBuffer; getPublicKey?: () => ArrayBuffer;

4
libs/common/src/lib/validators/is-currency-code.ts

@ -21,9 +21,7 @@ export function IsCurrencyCode(validationOptions?: ValidationOptions) {
} }
@ValidatorConstraint({ async: false }) @ValidatorConstraint({ async: false })
export class IsExtendedCurrencyConstraint export class IsExtendedCurrencyConstraint implements ValidatorConstraintInterface {
implements ValidatorConstraintInterface
{
public defaultMessage() { public defaultMessage() {
return '$property must be a valid ISO4217 currency code'; return '$property must be a valid ISO4217 currency code';
} }

6
libs/ui/src/lib/assistant/interfaces/interfaces.ts

@ -3,8 +3,10 @@ import { AccountWithValue, DateRange } from '@ghostfolio/common/types';
import { SearchMode } from '../enums/search-mode'; import { SearchMode } from '../enums/search-mode';
export interface AccountSearchResultItem export interface AccountSearchResultItem extends Pick<
extends Pick<AccountWithValue, 'id' | 'name'> { AccountWithValue,
'id' | 'name'
> {
mode: SearchMode.ACCOUNT; mode: SearchMode.ACCOUNT;
routerLink: string[]; routerLink: string[];
} }

Loading…
Cancel
Save