Skip to content

Commit e210f53

Browse files
committed
EventsGateway moved to shared
1 parent 89c3a43 commit e210f53

File tree

9 files changed

+13
-14
lines changed

9 files changed

+13
-14
lines changed

src/builds/builds.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { BuildsController } from './builds.controller';
44
import { UsersModule } from '../users/users.module';
55
import { PrismaService } from '../prisma/prisma.service';
66
import { TestRunsModule } from '../test-runs/test-runs.module';
7-
import { EventsGateway } from '../events/events.gateway';
7+
import { SharedModule } from '../shared/shared.module';
88

99
@Module({
10-
imports: [UsersModule, TestRunsModule],
11-
providers: [BuildsService, PrismaService, EventsGateway],
10+
imports: [SharedModule, UsersModule, TestRunsModule],
11+
providers: [BuildsService, PrismaService],
1212
controllers: [BuildsController],
1313
exports: [BuildsService],
1414
})

src/builds/builds.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Test, TestingModule } from '@nestjs/testing';
22
import { BuildsService } from './builds.service';
33
import { PrismaService } from '../prisma/prisma.service';
44
import { TestRunsService } from '../test-runs/test-runs.service';
5-
import { EventsGateway } from '../events/events.gateway';
5+
import { EventsGateway } from '../shared/events/events.gateway';
66
import { CreateBuildDto } from './dto/build-create.dto';
77
import { Build, TestRun, Project } from '@prisma/client';
88
import { mocked } from 'ts-jest/utils';

src/builds/builds.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CreateBuildDto } from './dto/build-create.dto';
33
import { PrismaService } from '../prisma/prisma.service';
44
import { Build, Project } from '@prisma/client';
55
import { TestRunsService } from '../test-runs/test-runs.service';
6-
import { EventsGateway } from '../events/events.gateway';
6+
import { EventsGateway } from '../shared/events/events.gateway';
77
import { BuildDto } from './dto/build.dto';
88
import uuidAPIKey from 'uuid-apikey';
99

src/events/events.gateway.ts renamed to src/shared/events/events.gateway.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { WebSocketGateway, WebSocketServer } from '@nestjs/websockets';
22
import { Server } from 'socket.io';
33
import { TestRun } from '@prisma/client';
4-
import { BuildDto } from '../builds/dto/build.dto';
4+
import { BuildDto } from '../../builds/dto/build.dto';
55

66
@WebSocketGateway()
77
export class EventsGateway {

src/shared/shared.module.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Global, Module } from '@nestjs/common';
22
import { StaticService } from './static/static.service';
3+
import { EventsGateway } from 'src/shared/events/events.gateway';
34

45
@Global()
56
@Module({
6-
providers: [StaticService],
7-
exports: [StaticService],
7+
providers: [StaticService, EventsGateway],
8+
exports: [StaticService, EventsGateway],
89
imports: [],
910
controllers: [],
1011
})

src/test-runs/test-runs.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ import { TestRunsService } from './test-runs.service';
33
import { SharedModule } from '../shared/shared.module';
44
import { PrismaService } from '../prisma/prisma.service';
55
import { TestRunsController } from './test-runs.controller';
6-
import { EventsGateway } from '../events/events.gateway';
76
import { TestVariationsModule } from '../test-variations/test-variations.module';
87

98
@Module({
109
imports: [SharedModule, TestVariationsModule],
11-
providers: [TestRunsService, PrismaService, EventsGateway],
10+
providers: [TestRunsService, PrismaService],
1211
exports: [TestRunsService],
1312
controllers: [TestRunsController]
1413
})

src/test-runs/test-runs.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { CreateTestRequestDto } from './dto/create-test-request.dto';
1010
import { TestRunResultDto } from './dto/testRunResult.dto';
1111
import { DiffResult } from './diffResult';
1212
import { IgnoreAreaDto } from './dto/ignore-area.dto';
13-
import { EventsGateway } from '../events/events.gateway';
13+
import { EventsGateway } from '../shared/events/events.gateway';
1414
import { CommentDto } from '../shared/dto/comment.dto';
1515
import { BuildDto } from '../builds/dto/build.dto';
1616
import { TestVariationsService } from '../test-variations/test-variations.service';

src/test-runs/test-runs.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { StaticService } from '../shared/static/static.service';
77
import { PrismaService } from '../prisma/prisma.service';
88
import { TestRun, TestStatus, TestVariation } from '@prisma/client';
99
import { DiffResult } from './diffResult';
10-
import { EventsGateway } from '../events/events.gateway';
10+
import { EventsGateway } from '../shared/events/events.gateway';
1111
import { CommentDto } from '../shared/dto/comment.dto';
1212
import { BuildDto } from '../builds/dto/build.dto';
1313
import { TestRunResultDto } from '../test-runs/dto/testRunResult.dto';

src/test-variations/test-variations.module.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@ import { TestVariationsService } from './test-variations.service';
33
import { TestVariationsController } from './test-variations.controller';
44
import { PrismaService } from '../prisma/prisma.service';
55
import { TestRunsService } from '../test-runs/test-runs.service';
6-
import { EventsGateway } from '../events/events.gateway';
76
import { BuildsService } from '../builds/builds.service';
87

98
@Module({
10-
providers: [TestVariationsService, PrismaService, TestRunsService, EventsGateway, BuildsService],
9+
providers: [TestVariationsService, PrismaService, TestRunsService, BuildsService],
1110
controllers: [TestVariationsController],
1211
exports: [TestVariationsService],
1312
})

0 commit comments

Comments
 (0)