make global module

This commit is contained in:
admin 2025-08-22 16:11:42 +02:00
parent 60ef75ef7c
commit 737d69e788
4 changed files with 9 additions and 4 deletions

View File

@ -14,6 +14,10 @@ npm i --save @apihub24/password-hasher
| -------------- | ------------------------------------------------------------------------------------------------- | | -------------- | ------------------------------------------------------------------------------------------------- |
| @nestjs/config | use the NestJs Config Module to get the Password Salt Rounds with key _PASSWORD_HASH_SALT_ROUNDS_ | | @nestjs/config | use the NestJs Config Module to get the Password Salt Rounds with key _PASSWORD_HASH_SALT_ROUNDS_ |
| Exported Injection Keys |
| -------------------------- |
| @apihub24/password_service |
## Usage ## Usage
```typescript ```typescript

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@apihub24/password-hasher", "name": "@apihub24/password-hasher",
"version": "1.0.6", "version": "1.0.8",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@apihub24/password-hasher", "name": "@apihub24/password-hasher",
"version": "1.0.6", "version": "1.0.8",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@apihub24/token-authentication": "^1.0.4", "@apihub24/token-authentication": "^1.0.4",

View File

@ -1,6 +1,6 @@
{ {
"name": "@apihub24/password-hasher", "name": "@apihub24/password-hasher",
"version": "1.0.7", "version": "1.0.8",
"description": "", "description": "",
"main": "dist/index.js", "main": "dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",

View File

@ -1,10 +1,11 @@
import { DynamicModule, Module } from "@nestjs/common"; import { DynamicModule, Global, Module } from "@nestjs/common";
import { PasswordHashService } from "./password.hash.service"; import { PasswordHashService } from "./password.hash.service";
import { ConfigModule } from "@nestjs/config"; import { ConfigModule } from "@nestjs/config";
export const APIHUB24_PASSWORD_SERVICE_INJECTION_KEY = export const APIHUB24_PASSWORD_SERVICE_INJECTION_KEY =
"@apihub24/password_service"; "@apihub24/password_service";
@Global()
@Module({}) @Module({})
export class PasswordHasherModule { export class PasswordHasherModule {
static forRoot(): DynamicModule { static forRoot(): DynamicModule {