File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
packages/transactional/src/lib Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 1
1
import { Provider } from '@nestjs/common' ;
2
- import { ClsModule , ClsPlugin } from 'nestjs-cls' ;
2
+ import { ClsModule , ClsPluginBase } from 'nestjs-cls' ;
3
3
import { getTransactionToken } from './inject-transaction.decorator' ;
4
4
import {
5
5
MergedTransactionalAdapterOptions ,
@@ -13,16 +13,15 @@ import {
13
13
} from './symbols' ;
14
14
import { getTransactionHostToken , TransactionHost } from './transaction-host' ;
15
15
16
- export class ClsPluginTransactional implements ClsPlugin {
17
- name : string ;
16
+ export class ClsPluginTransactional extends ClsPluginBase {
18
17
providers : Provider [ ] ;
19
- imports : any [ ] = [ ] ;
20
- exports : any [ ] = [ ] ;
21
18
22
19
constructor ( options : TransactionalPluginOptions < any , any , any > ) {
23
- this . name = options . connectionName
24
- ? `cls-plugin-transactional-${ options . connectionName } `
25
- : 'cls-plugin-transactional' ;
20
+ super (
21
+ options . connectionName
22
+ ? `cls-plugin-transactional-${ options . connectionName } `
23
+ : 'cls-plugin-transactional' ,
24
+ ) ;
26
25
this . imports . push ( ...( options . imports ?? [ ] ) ) ;
27
26
const transactionHostToken = getTransactionHostToken (
28
27
options . connectionName ,
You can’t perform that action at this time.
0 commit comments