Skip to content

Commit

Permalink
Added project paths/dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
WonderPanda committed Jan 26, 2019
1 parent 68f9a23 commit 82c8b75
Show file tree
Hide file tree
Showing 3 changed files with 679 additions and 22 deletions.
5 changes: 2 additions & 3 deletions packages/caching/src/caching.interceptor.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import { makeInjectableMixin } from '@nestjs-plus/common';
import {
ExecutionContext,
Inject,
Injectable,
mixin,
NestInterceptor
} from '@nestjs/common';
import { forkJoin, Observable, of } from 'rxjs';
import { catchError, map, switchMap } from 'rxjs/operators';
import { Cache, CacheToken } from './cache';
// import { makeInjectableMixin } from '@nestjs-plus/common';

@Injectable()
export abstract class CachingInterceptor implements NestInterceptor {
Expand Down Expand Up @@ -47,7 +46,7 @@ export interface CacheOptions {
}

export const makeCacheInterceptor = (options: CacheOptions) => {
return mixin(
return makeInjectableMixin('CachingInterceptor')(
class extends CachingInterceptor {
protected readonly options = options;
}
Expand Down
6 changes: 5 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
"experimentalDecorators": true,
"target": "es6",
"sourceMap": true,
"lib": ["es6"]
"lib": ["es6"],
"baseUrl": "./",
"paths": {
"@nestjs-plus/*": ["packages/*/src"]
}
},
"exclude": ["node_modules", "**/*.spec.ts"]
}
Loading

0 comments on commit 82c8b75

Please sign in to comment.