website refactor

This commit is contained in:
2026-01-16 13:48:18 +01:00
parent 20a42c52fd
commit 7e02fc3ea5
796 changed files with 1946 additions and 2545 deletions

View File

@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { Logger } from '@core/shared/application';
import { AnalyticsSnapshot } from '@core/analytics';
import type { Logger } from '@core/shared/domain';
import { AnalyticsSnapshot } from '@core/analytics/application/repositories/PageViewRepository';
import { InMemoryAnalyticsSnapshotRepository } from './InMemoryAnalyticsSnapshotRepository';
describe('InMemoryAnalyticsSnapshotRepository', () => {

View File

@@ -4,10 +4,10 @@
* In-memory implementation of IAnalyticsSnapshotRepository for development/testing.
*/
import { AnalyticsSnapshot, IAnalyticsSnapshotRepository, SnapshotEntityType, SnapshotPeriod } from '@core/analytics';
import { Logger } from '@core/shared/application';
import { AnalyticsSnapshot, IAnalyticsSnapshotRepository, SnapshotEntityType, SnapshotPeriod } from '@core/analytics/application/repositories/PageViewRepository';
import { Logger } from '@core/shared/domain/Logger';
export class InMemoryAnalyticsSnapshotRepository implements IAnalyticsSnapshotRepository {
export class InMemoryAnalyticsSnapshotRepository implements AnalyticsSnapshotRepository {
private snapshots: Map<string, AnalyticsSnapshot> = new Map();
private readonly logger: Logger;

View File

@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { Logger } from '@core/shared/application';
import { EngagementEvent } from '@core/analytics';
import type { Logger } from '@core/shared/domain';
import { EngagementEvent } from '@core/analytics/application/repositories/PageViewRepository';
import { InMemoryEngagementRepository } from './InMemoryEngagementRepository';
describe('InMemoryEngagementRepository', () => {

View File

@@ -4,12 +4,12 @@
* In-memory implementation of IEngagementRepository for development/testing.
*/
import type { IEngagementRepository } from '@core/analytics/domain/repositories/IEngagementRepository';
import type { EngagementRepository } from '@core/analytics/domain/repositories/EngagementRepository';
import { EngagementEvent, type EngagementAction, type EngagementEntityType } from '@core/analytics/domain/entities/EngagementEvent';
import { Logger } from '@core/shared/application';
import { Logger } from '@core/shared/domain/Logger';
export class InMemoryEngagementRepository implements IEngagementRepository {
export class InMemoryEngagementRepository implements EngagementRepository {
private events: Map<string, EngagementEvent> = new Map();
private logger: Logger;

View File

@@ -1,6 +1,6 @@
import { beforeEach, describe, expect, it, vi } from 'vitest';
import type { Logger } from '@core/shared/application';
import { PageView } from '@core/analytics';
import type { Logger } from '@core/shared/domain';
import { PageView } from '@core/analytics/application/repositories/PageViewRepository';
import { InMemoryPageViewRepository } from './InMemoryPageViewRepository';
describe('InMemoryPageViewRepository', () => {

View File

@@ -4,11 +4,11 @@
* In-memory implementation of IPageViewRepository for development/testing.
*/
import type { IPageViewRepository } from '@core/analytics/application/repositories/IPageViewRepository';
import type { PageViewRepository } from '@core/analytics/application/repositories/PageViewRepository';
import { PageView, type EntityType } from '@core/analytics/domain/entities/PageView';
import { Logger } from '@core/shared/application';
import { Logger } from '@core/shared/domain';
export class InMemoryPageViewRepository implements IPageViewRepository {
export class InMemoryPageViewRepository implements PageViewRepository {
private pageViews: Map<string, PageView> = new Map();
private logger: Logger;

View File

@@ -1,13 +1,13 @@
import { type Repository } from 'typeorm';
import type { IAnalyticsSnapshotRepository } from '@core/analytics/domain/repositories/IAnalyticsSnapshotRepository';
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';
export class TypeOrmAnalyticsSnapshotRepository implements IAnalyticsSnapshotRepository {
export class TypeOrmAnalyticsSnapshotRepository implements AnalyticsSnapshotRepository {
constructor(
private readonly snapshotRepo: Repository<AnalyticsSnapshotOrmEntity>,
private readonly mapper: AnalyticsSnapshotOrmMapper,

View File

@@ -1,13 +1,13 @@
import { Between, MoreThanOrEqual, type FindOptionsWhere, type Repository } from 'typeorm';
import type { IEngagementRepository } from '@core/analytics/domain/repositories/IEngagementRepository';
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';
export class TypeOrmEngagementRepository implements IEngagementRepository {
export class TypeOrmEngagementRepository implements EngagementRepository {
constructor(
private readonly engagementRepo: Repository<EngagementEventOrmEntity>,
private readonly mapper: EngagementEventOrmMapper,

View File

@@ -1,6 +1,6 @@
import { Between, MoreThanOrEqual, type Repository } from 'typeorm';
import type { IPageViewRepository } from '@core/analytics/application/repositories/IPageViewRepository';
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';
@@ -9,7 +9,7 @@ import { PageViewOrmMapper } from '../mappers/PageViewOrmMapper';
type CountRow = { count: string | number } | null | undefined;
export class TypeOrmPageViewRepository implements IPageViewRepository {
export class TypeOrmPageViewRepository implements PageViewRepository {
constructor(
private readonly pageViewRepo: Repository<PageViewOrmEntity>,
private readonly mapper: PageViewOrmMapper,