update dependency
This commit is contained in:
parent
cd87586791
commit
9eb554abd0
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,5 @@
|
||||
.vscode
|
||||
.idea
|
||||
dist
|
||||
coverage
|
||||
node_modules
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
.vscode
|
||||
.idea
|
||||
node_modules
|
||||
coverage
|
||||
src
|
||||
.gitignore
|
||||
tsconfig.json
|
||||
5
README.md
Normal file
5
README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Email Verification
|
||||
|
||||
A Service that sends Emails and verify it.
|
||||
|
||||
_UNDER CONSTRUCTION NOT USE IN PRODUCTION_
|
||||
4708
package-lock.json
generated
4708
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
38
package.json
38
package.json
@ -1,18 +1,27 @@
|
||||
{
|
||||
"name": "@apihub24/email-verification",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "",
|
||||
"main": "dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc"
|
||||
"build": "rimraf ./dist && tsc",
|
||||
"test": "jest",
|
||||
"test:coverage": "jest --coverage",
|
||||
"pub": "npm publish",
|
||||
"rel": "npm i && npm run build && npm run test:coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nestjs/common": "^11.1.6",
|
||||
"@apihub24/token-authentication": "^1.0.0"
|
||||
"@apihub24/token-authentication": "^1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.9.2"
|
||||
"rimraf": "^6.0.1",
|
||||
"@nestjs/testing": "^11.1.6",
|
||||
"typescript": "^5.9.2",
|
||||
"@types/jest": "^30.0.0",
|
||||
"jest": "^30.0.0",
|
||||
"ts-jest": "^29.4.1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": {
|
||||
@ -23,5 +32,26 @@
|
||||
"license": "MIT",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"jest": {
|
||||
"moduleFileExtensions": [
|
||||
"js",
|
||||
"json",
|
||||
"ts"
|
||||
],
|
||||
"rootDir": ".",
|
||||
"testRegex": ".*\\.spec\\.ts$",
|
||||
"transform": {
|
||||
"^.+\\.(t|j)s$": "ts-jest"
|
||||
},
|
||||
"collectCoverageFrom": [
|
||||
"**/*.(t|j)s"
|
||||
],
|
||||
"coverageDirectory": "./coverage",
|
||||
"testEnvironment": "node",
|
||||
"roots": [
|
||||
"<rootDir>/src/"
|
||||
],
|
||||
"moduleNameMapper": {}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
import {
|
||||
Account,
|
||||
MailVerificationService,
|
||||
IAccount,
|
||||
IMailVerificationService,
|
||||
} from "@apihub24/token-authentication";
|
||||
import { Injectable } from "@nestjs/common";
|
||||
|
||||
@Injectable()
|
||||
export class EmailService implements MailVerificationService {
|
||||
sendVerificationMail(account: Account): Promise<void> {
|
||||
export class EmailService implements IMailVerificationService {
|
||||
sendVerificationMail(account: IAccount): Promise<void> {
|
||||
console.info(
|
||||
"no mail verification used account(",
|
||||
account.accountName,
|
||||
|
||||
@ -1,12 +1,15 @@
|
||||
import { DynamicModule, Module } from '@nestjs/common';
|
||||
import { EmailService } from './email.service';
|
||||
import { DynamicModule, Module } from "@nestjs/common";
|
||||
import { EmailService } from "./email.service";
|
||||
|
||||
export const APIHUB24_MAIL_SERVICE_INJECTION_KEY =
|
||||
"@apihub24/mail_verification_service";
|
||||
|
||||
@Module({})
|
||||
export class EmailVerificationModule {
|
||||
static forRoot(): DynamicModule {
|
||||
const providers = [
|
||||
{
|
||||
provide: '@apihub24/mail_verification_service',
|
||||
provide: APIHUB24_MAIL_SERVICE_INJECTION_KEY,
|
||||
useClass: EmailService,
|
||||
},
|
||||
];
|
||||
|
||||
@ -22,5 +22,6 @@
|
||||
"strictBindCallApply": false,
|
||||
"noFallthroughCasesInSwitch": false
|
||||
},
|
||||
"include": ["./src"]
|
||||
"include": ["./src"],
|
||||
"exclude": ["**/*.spec.ts", "**/*.mock.ts"]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user