nestjs-security-cli 1.5.7 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +19 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -40,6 +40,22 @@ export class AppModule {
40
40
  }
41
41
  ```
42
42
 
43
+ ## DATABASE_CONNECTION provider
44
+
45
+ if you're needing to use the database connection, and the import options isn't working, you can try to pass it directly
46
+ into the providers array.
47
+
48
+ ```
49
+ {
50
+ provide: 'DATABASE_CONNECTION',
51
+ inject: [ConfigService],
52
+ useFactory: (configService: ConfigService): Promise<typeof mongoose> => {
53
+ return mongoose.connect(configService.get<string>('DATABASE_HOST'), {
54
+ dbName: configService.get<string>('DATABASE_NAME')
55
+ })
56
+ }
57
+ ```
58
+
43
59
  ## with forRoot
44
60
 
45
61
  ```typescript
@@ -287,4 +303,6 @@ export interface SecurityConfigInterface {
287
303
  MIT
288
304
 
289
305
  ## Donate
290
- If you like this project, please consider [donating to help me keep it up to date](https://buy.stripe.com/eVq00l2Dc4k05Bz9pY4Rq00)
306
+
307
+ If you like this project, please
308
+ consider [donating to help me keep it up to date](https://buy.stripe.com/eVq00l2Dc4k05Bz9pY4Rq00)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nestjs-security-cli",
3
- "version": "1.5.7",
3
+ "version": "1.5.8",
4
4
  "description": "Advanced IP blocking, role-based security, and attack detection for NestJS applications",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",