Skip to content

Commit c61aa16

Browse files
committed
Install hooks
1 parent 6270495 commit c61aa16

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.eslintrc.cjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ const restrictedImports = [
103103
path: 'gql.tada',
104104
replacement: { path: '~/graphql' },
105105
},
106+
{
107+
path: '@seedcompany/nest/hooks',
108+
replacement: { path: '~/core/hooks' },
109+
message: 'Reference from core instead to keep loose coupling',
110+
},
106111
];
107112

108113
const namingConvention = [

src/core/core.module.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { Global, Module } from '@nestjs/common';
22
import { APP_FILTER, APP_INTERCEPTOR } from '@nestjs/core';
33
import { DataLoaderModule } from '@seedcompany/data-loader';
44
import { DiscoveryModule } from '@seedcompany/nest/discovery';
5+
// eslint-disable-next-line @seedcompany/no-restricted-imports
6+
import { HooksModule } from '@seedcompany/nest/hooks';
57
import { EmailModule } from '@seedcompany/nestjs-email';
68
import { AuthenticationModule } from './authentication/authentication.module';
79
import { AwsS3Factory } from './aws-s3.factory';
@@ -38,6 +40,7 @@ import { WaitResolver } from './wait.resolver';
3840
GelModule,
3941
EmailModule.forRootAsync({ useExisting: ConfigService }),
4042
DiscoveryModule,
43+
HooksModule,
4144
GraphqlModule,
4245
EventsModule,
4346
TracingModule,
@@ -65,6 +68,7 @@ import { WaitResolver } from './wait.resolver';
6568
DatabaseModule,
6669
DataLoaderModule,
6770
DiscoveryModule,
71+
HooksModule,
6872
GelModule,
6973
EmailModule,
7074
EventsModule,

src/core/hooks/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// eslint-disable-next-line @seedcompany/no-restricted-imports
2+
export { Hooks, OnHook } from '@seedcompany/nest/hooks';

0 commit comments

Comments
 (0)