website refactor

This commit is contained in:
2026-01-16 21:40:26 +01:00
parent ae910da21a
commit 2d322b42e1
170 changed files with 438 additions and 474 deletions

View File

@@ -4,7 +4,7 @@
* In-memory implementation of IAnalyticsSnapshotRepository for development/testing.
*/
import { AnalyticsSnapshot, IAnalyticsSnapshotRepository, SnapshotEntityType, SnapshotPeriod } from '@core/analytics/application/repositories/PageViewRepository';
import { AnalyticsSnapshot, SnapshotPeriod } from '@core/analytics/application/repositories/PageViewRepository';
import { Logger } from '@core/shared/domain/Logger';
export class InMemoryAnalyticsSnapshotRepository implements AnalyticsSnapshotRepository {

View File

@@ -4,8 +4,8 @@
* In-memory implementation of IEngagementRepository for development/testing.
*/
import type { EngagementRepository } from '@core/analytics/domain/repositories/EngagementRepository';
import { EngagementEvent, type EngagementAction, type EngagementEntityType } from '@core/analytics/domain/entities/EngagementEvent';
import type { EngagementRepository } from '@core/analytics/domain/repositories/EngagementRepository';
import { Logger } from '@core/shared/domain/Logger';

View File

@@ -1,8 +1,8 @@
import { AnalyticsSnapshot } from '@core/analytics/domain/entities/AnalyticsSnapshot';
import type { AnalyticsMetrics, SnapshotEntityType, SnapshotPeriod } from '@core/analytics/domain/types/AnalyticsSnapshot';
import { TypeOrmAnalyticsSchemaError } from '../errors/TypeOrmAnalyticsSchemaError';
import { AnalyticsSnapshotOrmEntity } from '../entities/AnalyticsSnapshotOrmEntity';
import { TypeOrmAnalyticsSchemaError } from '../errors/TypeOrmAnalyticsSchemaError';
import { assertDate, assertEnumValue, assertNonEmptyString, assertNumber, assertRecord } from '../schema/TypeOrmAnalyticsSchemaGuards';
const VALID_ENTITY_TYPES: readonly SnapshotEntityType[] = ['league', 'driver', 'team', 'race', 'sponsor'] as const;

View File

@@ -1,14 +1,14 @@
import { EngagementEvent } from '@core/analytics/domain/entities/EngagementEvent';
import type { EngagementAction, EngagementEntityType } from '@core/analytics/domain/types/EngagementEvent';
import { TypeOrmAnalyticsSchemaError } from '../errors/TypeOrmAnalyticsSchemaError';
import { EngagementEventOrmEntity } from '../entities/EngagementEventOrmEntity';
import { TypeOrmAnalyticsSchemaError } from '../errors/TypeOrmAnalyticsSchemaError';
import {
assertDate,
assertEnumValue,
assertNonEmptyString,
assertOptionalStringOrNull,
assertRecord,
assertDate,
assertEnumValue,
assertNonEmptyString,
assertOptionalStringOrNull,
assertRecord,
} from '../schema/TypeOrmAnalyticsSchemaGuards';
const VALID_ACTIONS: readonly EngagementAction[] = [

View File

@@ -2,8 +2,8 @@ import { describe, expect, it } from 'vitest';
import { PageView } from '@core/analytics/domain/entities/PageView';
import { TypeOrmAnalyticsSchemaError } from '../errors/TypeOrmAnalyticsSchemaError';
import { PageViewOrmEntity } from '../entities/PageViewOrmEntity';
import { TypeOrmAnalyticsSchemaError } from '../errors/TypeOrmAnalyticsSchemaError';
import { PageViewOrmMapper } from './PageViewOrmMapper';
describe('PageViewOrmMapper', () => {

View File

@@ -1,14 +1,14 @@
import { PageView } from '@core/analytics/domain/entities/PageView';
import type { EntityType, VisitorType } from '@core/analytics/domain/types/PageView';
import { TypeOrmAnalyticsSchemaError } from '../errors/TypeOrmAnalyticsSchemaError';
import { PageViewOrmEntity } from '../entities/PageViewOrmEntity';
import { TypeOrmAnalyticsSchemaError } from '../errors/TypeOrmAnalyticsSchemaError';
import {
assertDate,
assertEnumValue,
assertNonEmptyString,
assertOptionalIntegerOrNull,
assertOptionalStringOrNull,
assertDate,
assertEnumValue,
assertNonEmptyString,
assertOptionalIntegerOrNull,
assertOptionalStringOrNull,
} from '../schema/TypeOrmAnalyticsSchemaGuards';
const VALID_ENTITY_TYPES: readonly EntityType[] = ['league', 'driver', 'team', 'race', 'sponsor'] as const;

View File

@@ -1,8 +1,8 @@
import { type Repository } from 'typeorm';
import { AnalyticsSnapshot } from '@core/analytics/domain/entities/AnalyticsSnapshot';
import type { AnalyticsSnapshotRepository } from '@core/analytics/domain/repositories/AnalyticsSnapshotRepository';
import type { SnapshotEntityType, SnapshotPeriod } from '@core/analytics/domain/types/AnalyticsSnapshot';
import { AnalyticsSnapshot } from '@core/analytics/domain/entities/AnalyticsSnapshot';
import { AnalyticsSnapshotOrmEntity } from '../entities/AnalyticsSnapshotOrmEntity';
import { AnalyticsSnapshotOrmMapper } from '../mappers/AnalyticsSnapshotOrmMapper';

View File

@@ -1,8 +1,8 @@
import { Between, MoreThanOrEqual, type FindOptionsWhere, type Repository } from 'typeorm';
import { EngagementEvent } from '@core/analytics/domain/entities/EngagementEvent';
import type { EngagementRepository } from '@core/analytics/domain/repositories/EngagementRepository';
import type { EngagementAction, EngagementEntityType } from '@core/analytics/domain/types/EngagementEvent';
import { EngagementEvent } from '@core/analytics/domain/entities/EngagementEvent';
import { EngagementEventOrmEntity } from '../entities/EngagementEventOrmEntity';
import { EngagementEventOrmMapper } from '../mappers/EngagementEventOrmMapper';

View File

@@ -1,5 +1,5 @@
import { describe, expect, it, vi } from 'vitest';
import type { Repository } from 'typeorm';
import { describe, expect, it, vi } from 'vitest';
import { PageView } from '@core/analytics/domain/entities/PageView';

View File

@@ -1,8 +1,8 @@
import { Between, MoreThanOrEqual, type Repository } from 'typeorm';
import type { PageViewRepository } from '@core/analytics/application/repositories/PageViewRepository';
import type { EntityType } from '@core/analytics/domain/types/PageView';
import { PageView } from '@core/analytics/domain/entities/PageView';
import type { EntityType } from '@core/analytics/domain/types/PageView';
import { PageViewOrmEntity } from '../entities/PageViewOrmEntity';
import { PageViewOrmMapper } from '../mappers/PageViewOrmMapper';