rename to core
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AnalyticsEntityId } from '../../../../../packages/analytics/domain/value-objects/AnalyticsEntityId';
|
||||
import { AnalyticsEntityId } from '../../../../../core/analytics/domain/value-objects/AnalyticsEntityId';
|
||||
|
||||
describe('AnalyticsEntityId', () => {
|
||||
it('creates a valid AnalyticsEntityId from a non-empty string', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AnalyticsSessionId } from '../../../../../packages/analytics/domain/value-objects/AnalyticsSessionId';
|
||||
import { AnalyticsSessionId } from '../../../../../core/analytics/domain/value-objects/AnalyticsSessionId';
|
||||
|
||||
describe('AnalyticsSessionId', () => {
|
||||
it('creates a valid AnalyticsSessionId from a non-empty string', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { PageViewId } from '../../../../../packages/analytics/domain/value-objects/PageViewId';
|
||||
import { PageViewId } from '../../../../../core/analytics/domain/value-objects/PageViewId';
|
||||
|
||||
describe('PageViewId', () => {
|
||||
it('creates a valid PageViewId from a non-empty string', () => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, expect, test } from 'vitest'
|
||||
import { OverlayAction, ActionAck } from '../../../../packages/automation/application/ports/IOverlaySyncPort'
|
||||
import { IAutomationEventPublisher, AutomationEvent } from '../../../../packages/automation/application/ports/IAutomationEventPublisher'
|
||||
import { IAutomationLifecycleEmitter, LifecycleCallback } from '../../../../packages/automation/infrastructure/adapters/IAutomationLifecycleEmitter'
|
||||
import { OverlaySyncService } from '../../../../packages/automation/application/services/OverlaySyncService'
|
||||
import { OverlayAction, ActionAck } from '../../../../core/automation/application/ports/IOverlaySyncPort'
|
||||
import { IAutomationEventPublisher, AutomationEvent } from '../../../../core/automation/application/ports/IAutomationEventPublisher'
|
||||
import { IAutomationLifecycleEmitter, LifecycleCallback } from '../../../../core/automation/infrastructure/adapters/IAutomationLifecycleEmitter'
|
||||
import { OverlaySyncService } from '../../../../core/automation/application/services/OverlaySyncService'
|
||||
|
||||
class MockLifecycleEmitter implements IAutomationLifecycleEmitter {
|
||||
private callbacks: Set<LifecycleCallback> = new Set()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, expect, test } from 'vitest'
|
||||
import { OverlayAction } from '../../../../packages/automation/application/ports/OverlaySyncPort'
|
||||
import { IAutomationLifecycleEmitter, LifecycleCallback } from '../../../../packages/automation/infrastructure/adapters/IAutomationLifecycleEmitter'
|
||||
import { OverlaySyncService } from '../../../../packages/automation/application/services/OverlaySyncService'
|
||||
import { OverlayAction } from '../../../../core/automation/application/ports/OverlaySyncPort'
|
||||
import { IAutomationLifecycleEmitter, LifecycleCallback } from '../../../../core/automation/infrastructure/adapters/IAutomationLifecycleEmitter'
|
||||
import { OverlaySyncService } from '../../../../core/automation/application/services/OverlaySyncService'
|
||||
|
||||
class MockLifecycleEmitter implements IAutomationLifecycleEmitter {
|
||||
private callbacks: Set<LifecycleCallback> = new Set()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { describe, it, expect, beforeEach, vi, Mock } from 'vitest';
|
||||
import { CheckAuthenticationUseCase } from '../../../../packages/automation/application/use-cases/CheckAuthenticationUseCase';
|
||||
import { CheckAuthenticationUseCase } from '../../../../core/automation/application/use-cases/CheckAuthenticationUseCase';
|
||||
import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState';
|
||||
import { BrowserAuthenticationState } from '@gridpilot/automation/domain/value-objects/BrowserAuthenticationState';
|
||||
import { Result } from '../../../../packages/shared/result/Result';
|
||||
import type { AuthenticationServicePort } from '../../../../packages/automation/application/ports/AuthenticationServicePort';
|
||||
import { Result } from '../../../../core/shared/result/Result';
|
||||
import type { AuthenticationServicePort } from '../../../../core/automation/application/ports/AuthenticationServicePort';
|
||||
|
||||
interface ISessionValidator {
|
||||
validateSession(): Promise<Result<boolean>>;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
||||
import { CompleteRaceCreationUseCase } from '../../../../packages/automation/application/use-cases/CompleteRaceCreationUseCase';
|
||||
import { Result } from '../../../../packages/shared/result/Result';
|
||||
import { CompleteRaceCreationUseCase } from '../../../../core/automation/application/use-cases/CompleteRaceCreationUseCase';
|
||||
import { Result } from '../../../../core/shared/result/Result';
|
||||
import { RaceCreationResult } from '@gridpilot/automation/domain/value-objects/RaceCreationResult';
|
||||
import { CheckoutPrice } from '@gridpilot/automation/domain/value-objects/CheckoutPrice';
|
||||
import type { CheckoutServicePort } from '../../../../packages/automation/application/ports/CheckoutServicePort';
|
||||
import type { CheckoutServicePort } from '../../../../core/automation/application/ports/CheckoutServicePort';
|
||||
import { CheckoutState } from '@gridpilot/automation/domain/value-objects/CheckoutState';
|
||||
|
||||
describe('CompleteRaceCreationUseCase', () => {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { describe, it, expect, beforeEach, vi, Mock } from 'vitest';
|
||||
import { Result } from '../../../../packages/shared/result/Result';
|
||||
import { ConfirmCheckoutUseCase } from '../../../../packages/automation/application/use-cases/ConfirmCheckoutUseCase';
|
||||
import type { CheckoutServicePort } from '../../../../packages/automation/application/ports/CheckoutServicePort';
|
||||
import type { CheckoutConfirmationPort } from '../../../../packages/automation/application/ports/CheckoutConfirmationPort';
|
||||
import type { CheckoutInfoDTO } from '../../../../packages/automation/application/dto/CheckoutInfoDTO';
|
||||
import { Result } from '../../../../core/shared/result/Result';
|
||||
import { ConfirmCheckoutUseCase } from '../../../../core/automation/application/use-cases/ConfirmCheckoutUseCase';
|
||||
import type { CheckoutServicePort } from '../../../../core/automation/application/ports/CheckoutServicePort';
|
||||
import type { CheckoutConfirmationPort } from '../../../../core/automation/application/ports/CheckoutConfirmationPort';
|
||||
import type { CheckoutInfoDTO } from '../../../../core/automation/application/dto/CheckoutInfoDTO';
|
||||
import { CheckoutPrice } from '@gridpilot/automation/domain/value-objects/CheckoutPrice';
|
||||
import { CheckoutState, CheckoutStateEnum } from '@gridpilot/automation/domain/value-objects/CheckoutState';
|
||||
import { CheckoutConfirmation } from '@gridpilot/automation/domain/value-objects/CheckoutConfirmation';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { describe, it, expect, vi, beforeEach, Mock } from 'vitest';
|
||||
import { StartAutomationSessionUseCase } from '../../../../packages/automation/application/use-cases/StartAutomationSessionUseCase';
|
||||
import { AutomationEnginePort as IAutomationEngine } from '../../../../packages/automation/application/ports/AutomationEnginePort';
|
||||
import { IBrowserAutomation as IScreenAutomation } from '../../../../packages/automation/application/ports/ScreenAutomationPort';
|
||||
import { SessionRepositoryPort as ISessionRepository } from '../../../../packages/automation/application/ports/SessionRepositoryPort';
|
||||
import { StartAutomationSessionUseCase } from '../../../../core/automation/application/use-cases/StartAutomationSessionUseCase';
|
||||
import { AutomationEnginePort as IAutomationEngine } from '../../../../core/automation/application/ports/AutomationEnginePort';
|
||||
import { IBrowserAutomation as IScreenAutomation } from '../../../../core/automation/application/ports/ScreenAutomationPort';
|
||||
import { SessionRepositoryPort as ISessionRepository } from '../../../../core/automation/application/ports/SessionRepositoryPort';
|
||||
import { AutomationSession } from '@gridpilot/automation/domain/entities/AutomationSession';
|
||||
|
||||
describe('StartAutomationSessionUseCase', () => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
||||
import { VerifyAuthenticatedPageUseCase } from '../../../../packages/automation/application/use-cases/VerifyAuthenticatedPageUseCase';
|
||||
import { AuthenticationServicePort as IAuthenticationService } from '../../../../packages/automation/application/ports/AuthenticationServicePort';
|
||||
import { Result } from '../../../../packages/shared/result/Result';
|
||||
import { VerifyAuthenticatedPageUseCase } from '../../../../core/automation/application/use-cases/VerifyAuthenticatedPageUseCase';
|
||||
import { AuthenticationServicePort as IAuthenticationService } from '../../../../core/automation/application/ports/AuthenticationServicePort';
|
||||
import { Result } from '../../../../core/shared/result/Result';
|
||||
import { BrowserAuthenticationState } from '@gridpilot/automation/domain/value-objects/BrowserAuthenticationState';
|
||||
import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { describe, it, expect } from 'vitest';
|
||||
import { calculateRaceDates, getNextWeekday, type ScheduleConfig } from '../../../../packages/racing/domain/services/ScheduleCalculator';
|
||||
import type { Weekday } from '../../../../packages/racing/domain/types/Weekday';
|
||||
import { calculateRaceDates, getNextWeekday, type ScheduleConfig } from '../../../../core/racing/domain/services/ScheduleCalculator';
|
||||
import type { Weekday } from '../../../../core/racing/domain/types/Weekday';
|
||||
|
||||
describe('ScheduleCalculator', () => {
|
||||
describe('calculateRaceDates', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { loadAutomationConfig, getAutomationMode, AutomationMode } from '../../../packages/automation/infrastructure/config/AutomationConfig';
|
||||
import { loadAutomationConfig, getAutomationMode, AutomationMode } from '../../../core/automation/infrastructure/config/AutomationConfig';
|
||||
|
||||
describe('AutomationConfig', () => {
|
||||
const originalEnv = process.env;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
||||
import type { Page, BrowserContext } from 'playwright';
|
||||
import { PlaywrightAuthSessionService } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
|
||||
import type { PlaywrightBrowserSession } from '../../../../packages/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession';
|
||||
import type { SessionCookieStore } from '../../../../packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore';
|
||||
import type { IPlaywrightAuthFlow } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
|
||||
import type { LoggerPort as ILogger } from '../../../../packages/automation/application/ports/LoggerPort';
|
||||
import { PlaywrightAuthSessionService } from '../../../../core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
|
||||
import type { PlaywrightBrowserSession } from '../../../../core/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession';
|
||||
import type { SessionCookieStore } from '../../../../core/automation/infrastructure/adapters/automation/auth/SessionCookieStore';
|
||||
import type { IPlaywrightAuthFlow } from '../../../../core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
|
||||
import type { LoggerPort as ILogger } from '../../../../core/automation/application/ports/LoggerPort';
|
||||
import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState';
|
||||
import { Result } from '../../../../packages/shared/result/Result';
|
||||
import { Result } from '../../../../core/shared/result/Result';
|
||||
|
||||
describe('PlaywrightAuthSessionService.initiateLogin browser mode behaviour', () => {
|
||||
const originalEnv = { ...process.env };
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import { describe, it, expect, vi } from 'vitest';
|
||||
import type { Page, Locator } from 'playwright';
|
||||
import { PlaywrightAuthSessionService } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
|
||||
import { PlaywrightAuthSessionService } from '../../../../core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthSessionService';
|
||||
import { AuthenticationState } from '@gridpilot/automation/domain/value-objects/AuthenticationState';
|
||||
import { BrowserAuthenticationState } from '@gridpilot/automation/domain/value-objects/BrowserAuthenticationState';
|
||||
import type { LoggerPort as ILogger } from '../../../../packages/automation/application/ports/LoggerPort';
|
||||
import type { Result } from '../../../../packages/shared/result/Result';
|
||||
import type { PlaywrightBrowserSession } from '../../../../packages/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession';
|
||||
import type { SessionCookieStore } from '../../../../packages/automation/infrastructure/adapters/automation/auth/SessionCookieStore';
|
||||
import type { IPlaywrightAuthFlow } from '../../../../packages/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
|
||||
import type { LoggerPort as ILogger } from '../../../../core/automation/application/ports/LoggerPort';
|
||||
import type { Result } from '../../../../core/shared/result/Result';
|
||||
import type { PlaywrightBrowserSession } from '../../../../core/automation/infrastructure/adapters/automation/core/PlaywrightBrowserSession';
|
||||
import type { SessionCookieStore } from '../../../../core/automation/infrastructure/adapters/automation/auth/SessionCookieStore';
|
||||
import type { IPlaywrightAuthFlow } from '../../../../core/automation/infrastructure/adapters/automation/auth/PlaywrightAuthFlow';
|
||||
|
||||
describe('PlaywrightAuthSessionService.verifyPageAuthentication', () => {
|
||||
function createService(deps: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
|
||||
import { BrowserModeConfigLoader } from '../../../../packages/automation/infrastructure/config/BrowserModeConfig';
|
||||
import { BrowserModeConfigLoader } from '../../../../core/automation/infrastructure/config/BrowserModeConfig';
|
||||
|
||||
/**
|
||||
* Unit tests for BrowserModeConfig - GREEN PHASE
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MediaUrl } from '../../../../../packages/media/domain/value-objects/MediaUrl';
|
||||
import { MediaUrl } from '../../../../../core/media/domain/value-objects/MediaUrl';
|
||||
|
||||
describe('MediaUrl', () => {
|
||||
it('creates from valid http/https URLs', () => {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { NotificationId } from '../../../../../packages/notifications/domain/value-objects/NotificationId';
|
||||
import { NotificationDomainError } from '../../../../../packages/notifications/domain/errors/NotificationDomainError';
|
||||
import { NotificationId } from '../../../../../core/notifications/domain/value-objects/NotificationId';
|
||||
import { NotificationDomainError } from '../../../../../core/notifications/domain/errors/NotificationDomainError';
|
||||
|
||||
describe('NotificationId', () => {
|
||||
it('creates a valid NotificationId from a non-empty string', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { QuietHours } from '../../../../../packages/notifications/domain/value-objects/QuietHours';
|
||||
import { QuietHours } from '../../../../../core/notifications/domain/value-objects/QuietHours';
|
||||
|
||||
describe('QuietHours', () => {
|
||||
it('creates a valid normal-range window', () => {
|
||||
|
||||
@@ -20,17 +20,17 @@ interface TsFile {
|
||||
function classifyFile(filePath: string): PackageKind {
|
||||
const normalized = filePath.replace(/\\/g, '/');
|
||||
|
||||
// Bounded-context domain lives under packages/racing/domain
|
||||
if (normalized.includes('/packages/racing/domain/')) {
|
||||
// Bounded-context domain lives under core/racing/domain
|
||||
if (normalized.includes('/core/racing/domain/')) {
|
||||
return 'racing-domain';
|
||||
}
|
||||
if (normalized.includes('/packages/racing-application/')) {
|
||||
if (normalized.includes('/core/racing-application/')) {
|
||||
return 'racing-application';
|
||||
}
|
||||
if (normalized.includes('/packages/racing-infrastructure/')) {
|
||||
if (normalized.includes('/core/racing-infrastructure/')) {
|
||||
return 'racing-infrastructure';
|
||||
}
|
||||
if (normalized.includes('/packages/racing-demo-infrastructure/')) {
|
||||
if (normalized.includes('/core/racing-demo-infrastructure/')) {
|
||||
return 'racing-demo-infrastructure';
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ describe('Package dependency structure for racing slice', () => {
|
||||
|
||||
if (violations.length > 0) {
|
||||
const message =
|
||||
'Found forbidden imports in racing domain layer (packages/racing/domain):\n' +
|
||||
'Found forbidden imports in racing domain layer (core/racing/domain):\n' +
|
||||
violations
|
||||
.map(
|
||||
(v) =>
|
||||
@@ -197,7 +197,7 @@ describe('Package dependency structure for racing slice', () => {
|
||||
|
||||
if (violations.length > 0) {
|
||||
const message =
|
||||
'Found forbidden imports in packages/racing-application:\n' +
|
||||
'Found forbidden imports in core/racing-application:\n' +
|
||||
violations
|
||||
.map(
|
||||
(v) =>
|
||||
|
||||
Reference in New Issue
Block a user