update dependency

This commit is contained in:
admin 2025-08-21 23:01:37 +02:00
parent cd87586791
commit 9eb554abd0
8 changed files with 4751 additions and 22 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
.vscode .vscode
.idea .idea
dist dist
coverage
node_modules node_modules

View File

@ -1,6 +1,7 @@
.vscode .vscode
.idea .idea
node_modules node_modules
coverage
src src
.gitignore .gitignore
tsconfig.json tsconfig.json

5
README.md Normal file
View 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

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,27 @@
{ {
"name": "@apihub24/email-verification", "name": "@apihub24/email-verification",
"version": "1.0.0", "version": "1.0.1",
"description": "", "description": "",
"main": "dist/index.js", "main": "dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
"scripts": { "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": { "dependencies": {
"@nestjs/common": "^11.1.6", "@nestjs/common": "^11.1.6",
"@apihub24/token-authentication": "^1.0.0" "@apihub24/token-authentication": "^1.0.4"
}, },
"devDependencies": { "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": [], "keywords": [],
"author": { "author": {
@ -23,5 +32,26 @@
"license": "MIT", "license": "MIT",
"publishConfig": { "publishConfig": {
"access": "public" "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": {}
} }
} }

View File

@ -1,12 +1,12 @@
import { import {
Account, IAccount,
MailVerificationService, IMailVerificationService,
} from "@apihub24/token-authentication"; } from "@apihub24/token-authentication";
import { Injectable } from "@nestjs/common"; import { Injectable } from "@nestjs/common";
@Injectable() @Injectable()
export class EmailService implements MailVerificationService { export class EmailService implements IMailVerificationService {
sendVerificationMail(account: Account): Promise<void> { sendVerificationMail(account: IAccount): Promise<void> {
console.info( console.info(
"no mail verification used account(", "no mail verification used account(",
account.accountName, account.accountName,

View File

@ -1,12 +1,15 @@
import { DynamicModule, Module } from '@nestjs/common'; import { DynamicModule, Module } from "@nestjs/common";
import { EmailService } from './email.service'; import { EmailService } from "./email.service";
export const APIHUB24_MAIL_SERVICE_INJECTION_KEY =
"@apihub24/mail_verification_service";
@Module({}) @Module({})
export class EmailVerificationModule { export class EmailVerificationModule {
static forRoot(): DynamicModule { static forRoot(): DynamicModule {
const providers = [ const providers = [
{ {
provide: '@apihub24/mail_verification_service', provide: APIHUB24_MAIL_SERVICE_INJECTION_KEY,
useClass: EmailService, useClass: EmailService,
}, },
]; ];

View File

@ -22,5 +22,6 @@
"strictBindCallApply": false, "strictBindCallApply": false,
"noFallthroughCasesInSwitch": false "noFallthroughCasesInSwitch": false
}, },
"include": ["./src"] "include": ["./src"],
"exclude": ["**/*.spec.ts", "**/*.mock.ts"]
} }