@lyrolab/nest-shared 1.7.1 → 1.9.0

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 (51) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/README.md +4 -2
  3. package/dist/ai/ai.constants.d.ts +1 -0
  4. package/dist/ai/ai.constants.js +5 -0
  5. package/dist/ai/ai.constants.js.map +1 -0
  6. package/dist/ai/index.d.ts +2 -0
  7. package/dist/ai/index.js +2 -0
  8. package/dist/ai/index.js.map +1 -1
  9. package/dist/ai/interfaces/ai-module-options.interface.d.ts +15 -0
  10. package/dist/ai/interfaces/ai-module-options.interface.js +3 -0
  11. package/dist/ai/interfaces/ai-module-options.interface.js.map +1 -0
  12. package/dist/ai/services/ai.service.d.ts +3 -1
  13. package/dist/ai/services/ai.service.js +12 -4
  14. package/dist/ai/services/ai.service.js.map +1 -1
  15. package/dist/ai/shared-ai.module.d.ts +6 -0
  16. package/dist/ai/shared-ai.module.js +58 -6
  17. package/dist/ai/shared-ai.module.js.map +1 -1
  18. package/dist/auth/auth.constants.d.ts +1 -0
  19. package/dist/auth/auth.constants.js +5 -0
  20. package/dist/auth/auth.constants.js.map +1 -0
  21. package/dist/auth/decorators/current-user.decorator.d.ts +1 -0
  22. package/dist/auth/decorators/current-user.decorator.js +11 -0
  23. package/dist/auth/decorators/current-user.decorator.js.map +1 -0
  24. package/dist/auth/decorators/public.decorator.d.ts +2 -0
  25. package/dist/auth/decorators/public.decorator.js +8 -0
  26. package/dist/auth/decorators/public.decorator.js.map +1 -0
  27. package/dist/auth/guards/jwt-auth.guard.d.ts +9 -0
  28. package/dist/auth/guards/jwt-auth.guard.js +41 -0
  29. package/dist/auth/guards/jwt-auth.guard.js.map +1 -0
  30. package/dist/auth/helpers/keycloak.helper.d.ts +4 -0
  31. package/dist/auth/helpers/keycloak.helper.js +10 -0
  32. package/dist/auth/helpers/keycloak.helper.js.map +1 -0
  33. package/dist/auth/index.d.ts +8 -0
  34. package/dist/auth/index.js +25 -0
  35. package/dist/auth/index.js.map +1 -0
  36. package/dist/auth/interfaces/auth-module-options.interface.d.ts +14 -0
  37. package/dist/auth/interfaces/auth-module-options.interface.js +3 -0
  38. package/dist/auth/interfaces/auth-module-options.interface.js.map +1 -0
  39. package/dist/auth/models/jwt-payload.d.ts +15 -0
  40. package/dist/auth/models/jwt-payload.js +3 -0
  41. package/dist/auth/models/jwt-payload.js.map +1 -0
  42. package/dist/auth/shared-auth.module.d.ts +8 -0
  43. package/dist/auth/shared-auth.module.js +82 -0
  44. package/dist/auth/shared-auth.module.js.map +1 -0
  45. package/dist/auth/strategies/jwt.strategy.d.ts +11 -0
  46. package/dist/auth/strategies/jwt.strategy.js +49 -0
  47. package/dist/auth/strategies/jwt.strategy.js.map +1 -0
  48. package/dist/tsconfig.build.tsbuildinfo +1 -0
  49. package/package.json +19 -10
  50. package/tsconfig.build.json +4 -0
  51. package/dist/tsconfig.tsbuildinfo +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyrolab/nest-shared",
3
- "version": "1.7.1",
3
+ "version": "1.9.0",
4
4
  "description": "A collection of shared modules for NestJS applications",
5
5
  "author": "",
6
6
  "license": "UNLICENSED",
@@ -52,12 +52,17 @@
52
52
  "types": "./dist/health/index.d.ts",
53
53
  "import": "./dist/health/index.js",
54
54
  "require": "./dist/health/index.js"
55
+ },
56
+ "./auth": {
57
+ "types": "./dist/auth/index.d.ts",
58
+ "import": "./dist/auth/index.js",
59
+ "require": "./dist/auth/index.js"
55
60
  }
56
61
  },
57
62
  "scripts": {
58
63
  "prebuild": "rimraf dist",
59
- "build": "tsc -p tsconfig.json",
60
- "dev": "tsc -p tsconfig.json --watch",
64
+ "build": "tsc -p tsconfig.build.json",
65
+ "dev": "tsc -p tsconfig.build.json --watch",
61
66
  "lint": "eslint 'src/**/*.ts' --fix",
62
67
  "test": "jest",
63
68
  "test:watch": "jest --watch",
@@ -66,6 +71,11 @@
66
71
  "lint-staged": "npx lint-staged",
67
72
  "release": "semantic-release"
68
73
  },
74
+ "dependencies": {
75
+ "jwks-rsa": "^3.2.0",
76
+ "passport": "^0.7.0",
77
+ "passport-jwt": "^4.0.1"
78
+ },
69
79
  "peerDependencies": {
70
80
  "@ai-sdk/provider": "^3.0.8",
71
81
  "@nestjs/bullmq": "^11.0.0",
@@ -82,7 +92,8 @@
82
92
  "class-validator": "^0.14.0",
83
93
  "rxjs": "^7.8.1",
84
94
  "typeorm": "^0.3.22",
85
- "zod": "^4.1.13"
95
+ "zod": "^4.1.13",
96
+ "@nestjs/passport": "^11.0.0"
86
97
  },
87
98
  "devDependencies": {
88
99
  "@ai-sdk/provider": "^3.0.8",
@@ -95,6 +106,7 @@
95
106
  "@nestjs/cache-manager": "^3.0.1",
96
107
  "@nestjs/cli": "^11.0.0",
97
108
  "@nestjs/common": "^11.0.1",
109
+ "@nestjs/passport": "^11.0.5",
98
110
  "@nestjs/config": "^4.0.2",
99
111
  "@nestjs/core": "^11.0.13",
100
112
  "@nestjs/platform-express": "^11.0.1",
@@ -111,6 +123,7 @@
111
123
  "@swc/core": "^1.10.7",
112
124
  "@types/express": "^5.0.0",
113
125
  "@types/jest": "^29.5.14",
126
+ "@types/passport-jwt": "^4.0.1",
114
127
  "@types/node": "^22.10.7",
115
128
  "@types/supertest": "^6.0.2",
116
129
  "ai": "^6.0.86",
@@ -156,12 +169,8 @@
156
169
  "coverageDirectory": "./coverage",
157
170
  "testEnvironment": "node",
158
171
  "roots": [
159
- "<rootDir>/src/",
160
- "<rootDir>/libs/"
161
- ],
162
- "moduleNameMapper": {
163
- "^@app/nest-shared(|/.*)$": "<rootDir>/libs/nest-shared/src/$1"
164
- }
172
+ "<rootDir>/src/"
173
+ ]
165
174
  },
166
175
  "commitlint": {
167
176
  "extends": [
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": ["node_modules", "dist", "**/*.spec.ts", "tests"]
4
+ }