@fintech-solutions/auth
Advanced tools
Comparing version 1.2.46 to 1.2.50
@@ -33,3 +33,3 @@ "use strict"; | ||
const delete_user_usecase_1 = require("./usecases/delete-user.usecase"); | ||
const useCases = [ | ||
const USE_CASES = [ | ||
create_session_usecase_1.CreateSessionUseCase, | ||
@@ -55,11 +55,5 @@ sign_up_usecase_1.SignUpUseCase, | ||
], | ||
controllers: [ | ||
registration_controller_1.RegistrationController, | ||
sessions_controller_1.SessionsController, | ||
email_confirmation_controller_1.EmailConfirmationController, | ||
forgot_password_controller_1.ForgotPasswordController, | ||
], | ||
providers: [ | ||
{ provide: user_repository_1.UserRepository, useClass: options.UserRepository }, | ||
{ provide: mailer_service_1.MailerService, useClass: options.MailerService }, | ||
{ provide: mailer_service_1.MailerService, useValue: options.MailerService }, | ||
{ provide: email_repository_1.EmailRepository, useClass: options.EmailRepository }, | ||
@@ -75,5 +69,10 @@ { provide: password_repository_1.PasswordRepository, useClass: options.PasswordRepository }, | ||
imports: [], | ||
controllers: [], | ||
controllers: [ | ||
registration_controller_1.RegistrationController, | ||
sessions_controller_1.SessionsController, | ||
email_confirmation_controller_1.EmailConfirmationController, | ||
forgot_password_controller_1.ForgotPasswordController, | ||
], | ||
providers: [ | ||
...useCases, | ||
...USE_CASES, | ||
], | ||
@@ -80,0 +79,0 @@ }), |
export { AuthModule } from './auth.module'; | ||
export { UserModel } from './domain/user.model'; | ||
export { JwtGuard } from './guards/jwt.guard'; | ||
export { CurrentUser } from './utils/decorators/current-user.decorator'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AuthModule = void 0; | ||
exports.CurrentUser = exports.JwtGuard = exports.AuthModule = void 0; | ||
var auth_module_1 = require("./auth.module"); | ||
Object.defineProperty(exports, "AuthModule", { enumerable: true, get: function () { return auth_module_1.AuthModule; } }); | ||
var jwt_guard_1 = require("./guards/jwt.guard"); | ||
Object.defineProperty(exports, "JwtGuard", { enumerable: true, get: function () { return jwt_guard_1.JwtGuard; } }); | ||
var current_user_decorator_1 = require("./utils/decorators/current-user.decorator"); | ||
Object.defineProperty(exports, "CurrentUser", { enumerable: true, get: function () { return current_user_decorator_1.CurrentUser; } }); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@fintech-solutions/auth", | ||
"private": false, | ||
"version": "1.2.46", | ||
"version": "1.2.50", | ||
"description": "", | ||
@@ -22,6 +22,7 @@ "main": "dist/index.js", | ||
"@nestjs/swagger": "^6.1.3", | ||
"class-validator": "^0.13.2" | ||
"class-validator": "^0.14.0" | ||
}, | ||
"dependencies": { | ||
"@fintech-solutions/core": "^1.2.46", | ||
"@fintech-solutions/core": "^1.2.48", | ||
"@fintech-solutions/mailer": "^1.2.48", | ||
"@nestjs/jwt": "^10.0.2", | ||
@@ -36,5 +37,5 @@ "argon2": "^0.30.2", | ||
"@types/ejs": "^3.1.2", | ||
"class-validator": "^0.13.2" | ||
"class-validator": "^0.14.0" | ||
}, | ||
"gitHead": "8ff9612dd1df9595a7216b23cbfdadde87c8e557" | ||
"gitHead": "f1b6a16e5ac04fe6dabfd5a69c36c9e4da8807c9" | ||
} |
@@ -20,58 +20,57 @@ import { DynamicModule, Module, Type } from '@nestjs/common'; | ||
import { AuthCoreModule } from './auth-core.module'; | ||
import {DeleteUserUseCase} from "./usecases/delete-user.usecase"; | ||
import { DeleteUserUseCase } from "./usecases/delete-user.usecase"; | ||
const useCases = [ | ||
CreateSessionUseCase, | ||
SignUpUseCase, | ||
SendConfirmationEmailUseCase, | ||
SendRestorePasswordEmailUseCase, | ||
ConfirmEmailUseCase, | ||
RestorePasswordUseCase, | ||
UpdatePasswordUsecase, | ||
DeleteUserUseCase | ||
const USE_CASES = [ | ||
CreateSessionUseCase, | ||
SignUpUseCase, | ||
SendConfirmationEmailUseCase, | ||
SendRestorePasswordEmailUseCase, | ||
ConfirmEmailUseCase, | ||
RestorePasswordUseCase, | ||
UpdatePasswordUsecase, | ||
DeleteUserUseCase | ||
] | ||
export interface AuthModuleOptions { | ||
UserRepository: Type<UserRepository>, | ||
MailerService: Type<IMailerService>, | ||
EmailRepository: Type<EmailRepository>, | ||
PasswordRepository: Type<PasswordRepository>, | ||
templatePath?: string; | ||
UserRepository: Type<UserRepository>, | ||
MailerService: Type<IMailerService>, | ||
EmailRepository: Type<EmailRepository>, | ||
PasswordRepository: Type<PasswordRepository>, | ||
templatePath?: string; | ||
} | ||
@Module({ | ||
imports: [], | ||
controllers: [], | ||
providers: [ | ||
...useCases, | ||
], | ||
imports: [], | ||
controllers: [ | ||
RegistrationController, | ||
SessionsController, | ||
EmailConfirmationController, | ||
ForgotPasswordController, | ||
], | ||
providers: [ | ||
...USE_CASES, | ||
], | ||
}) | ||
export class AuthModule { | ||
constructor() { | ||
} | ||
constructor() { | ||
} | ||
static register(options: AuthModuleOptions): DynamicModule { | ||
return { | ||
module: AuthModule, | ||
imports: [ | ||
AuthCoreModule.register({ | ||
UserRepository: options.UserRepository | ||
}), | ||
], | ||
controllers: [ | ||
RegistrationController, | ||
SessionsController, | ||
EmailConfirmationController, | ||
ForgotPasswordController, | ||
], | ||
providers: [ | ||
{provide: UserRepository, useClass: options.UserRepository}, | ||
{provide: MailerService, useClass: options.MailerService}, | ||
{provide: EmailRepository, useClass: options.EmailRepository}, | ||
{provide: PasswordRepository, useClass: options.PasswordRepository}, | ||
{provide: TemplatePath, useValue: options.templatePath || ''}, | ||
] | ||
} | ||
static register(options: AuthModuleOptions): DynamicModule { | ||
return { | ||
module: AuthModule, | ||
imports: [ | ||
AuthCoreModule.register({ | ||
UserRepository: options.UserRepository | ||
}), | ||
], | ||
providers: [ | ||
{provide: UserRepository, useClass: options.UserRepository}, | ||
{provide: MailerService, useValue: options.MailerService}, | ||
{provide: EmailRepository, useClass: options.EmailRepository}, | ||
{provide: PasswordRepository, useClass: options.PasswordRepository}, | ||
{provide: TemplatePath, useValue: options.templatePath || ''}, | ||
] | ||
} | ||
} | ||
} |
export { AuthModule } from './auth.module' | ||
export { UserModel } from './domain/user.model'; | ||
export { JwtGuard } from './guards/jwt.guard'; | ||
export {CurrentUser} from './utils/decorators/current-user.decorator'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
260693
9
149
2121
+ Added@fintech-solutions/mailer@1.3.6(transitive)
+ Added@types/validator@13.12.2(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaxios@1.7.9(transitive)
+ Addedbase-64@1.0.0(transitive)
+ Addedclass-validator@0.14.1(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedmailgun.js@8.2.2(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addednodemailer@6.9.16(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
+ Addedurl-join@4.0.1(transitive)
- Removedclass-validator@0.13.2(transitive)