diff --git a/package-lock.json b/package-lock.json index bfff517..729d77f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,14 +1,14 @@ { "name": "blog-be", - "version": "0.0.1", + "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "0.0.1", + "version": "0.1.0", "license": "UNLICENSED", "dependencies": { - "@nestjs-lib/auth": "^0.1.1", + "@nestjs-lib/auth": "^0.2.1", "@nestjs/bull": "^0.3.1", "@nestjs/common": "^7.6.15", "@nestjs/config": "^0.6.2", @@ -2503,9 +2503,9 @@ } }, "node_modules/@nestjs-lib/auth": { - "version": "0.1.1", - "resolved": "https://npm.ivanli.cc/@nestjs-lib%2fauth/-/auth-0.1.1.tgz", - "integrity": "sha512-fYje3oHErN/1ZKyrzTlZ+3+w7fp3XplkKz26U9OycTA5hu+/LlM6EEvuMt7pfdo02KllVtcUWMtmKbezzr4Ujw==", + "version": "0.2.1", + "resolved": "https://npm.ivanli.cc/@nestjs-lib%2fauth/-/auth-0.2.1.tgz", + "integrity": "sha512-HNOjIWh6H/PVTjp+nQ11LmKY/09zNhlLZqruukTteAPKQGvkeLUU51/OIp/vj0WWzMxp4qMWnfCrLaRYjkQ1Yw==", "license": "MIT", "peerDependencies": { "@nestjs/common": "^7.0.0", @@ -17744,9 +17744,9 @@ } }, "@nestjs-lib/auth": { - "version": "0.1.1", - "resolved": "https://npm.ivanli.cc/@nestjs-lib%2fauth/-/auth-0.1.1.tgz", - "integrity": "sha512-fYje3oHErN/1ZKyrzTlZ+3+w7fp3XplkKz26U9OycTA5hu+/LlM6EEvuMt7pfdo02KllVtcUWMtmKbezzr4Ujw==", + "version": "0.2.1", + "resolved": "https://npm.ivanli.cc/@nestjs-lib%2fauth/-/auth-0.2.1.tgz", + "integrity": "sha512-HNOjIWh6H/PVTjp+nQ11LmKY/09zNhlLZqruukTteAPKQGvkeLUU51/OIp/vj0WWzMxp4qMWnfCrLaRYjkQ1Yw==", "requires": {} }, "@nestjs/bull": { diff --git a/package.json b/package.json index 7ce49b9..13ada3a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "test:e2e": "jest --config ./test/jest-e2e.json" }, "dependencies": { - "@nestjs-lib/auth": "^0.1.1", + "@nestjs-lib/auth": "^0.2.1", "@nestjs/bull": "^0.3.1", "@nestjs/common": "^7.6.15", "@nestjs/config": "^0.6.2", diff --git a/src/articles/articles.module.ts b/src/articles/articles.module.ts index 7388681..24e6a86 100644 --- a/src/articles/articles.module.ts +++ b/src/articles/articles.module.ts @@ -1,3 +1,4 @@ +import { CommonsModule } from './../commons/commons.module'; import { Module } from '@nestjs/common'; import { ArticlesService } from './articles.service'; import { ArticlesResolver } from './articles.resolver'; @@ -5,7 +6,7 @@ import { TypeOrmModule } from '@nestjs/typeorm'; import { Article } from './entities/article.entity'; @Module({ - imports: [TypeOrmModule.forFeature([Article])], + imports: [TypeOrmModule.forFeature([Article]), CommonsModule], providers: [ArticlesResolver, ArticlesService], }) export class ArticlesModule {} diff --git a/src/articles/articles.resolver.spec.ts b/src/articles/articles.resolver.spec.ts index 9d1e7c6..4c3bdf9 100644 --- a/src/articles/articles.resolver.spec.ts +++ b/src/articles/articles.resolver.spec.ts @@ -1,3 +1,4 @@ +import { JwtService } from '@nestjs-lib/auth'; import { Test, TestingModule } from '@nestjs/testing'; import { ArticlesResolver } from './articles.resolver'; import { ArticlesService } from './articles.service'; @@ -13,6 +14,10 @@ describe('ArticlesResolver', () => { provide: ArticlesService, useValue: {}, }, + { + provide: JwtService, + useValue: {}, + }, ], }).compile(); diff --git a/src/commons/commons.module.ts b/src/commons/commons.module.ts index 26c2fd1..1e701bb 100644 --- a/src/commons/commons.module.ts +++ b/src/commons/commons.module.ts @@ -6,6 +6,6 @@ import { AuthModule } from '@nestjs-lib/auth'; @Module({ imports: [PubSubModule, AuthModule], providers: [PasswordConverter], - exports: [PasswordConverter], + exports: [PasswordConverter, AuthModule], }) export class CommonsModule {}