@veloxts/validation 0.6.89 → 0.6.91

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/CHANGELOG.md +16 -11
  2. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @veloxts/validation
2
2
 
3
+ ## 0.6.91
4
+
5
+ ### Patch Changes
6
+
7
+ - removed unused DI system
8
+ - Updated dependencies
9
+ - @veloxts/core@0.6.91
10
+
11
+ ## 0.6.90
12
+
13
+ ### Patch Changes
14
+
15
+ - Dependencies updates – fix critical and high severity vulnerabilities
16
+ - Updated dependencies
17
+ - @veloxts/core@0.6.90
18
+
3
19
  ## 0.6.89
4
20
 
5
21
  ### Patch Changes
@@ -159,7 +175,6 @@
159
175
  - ### feat(auth): Unified Adapter-Only Architecture
160
176
 
161
177
  **New Features:**
162
-
163
178
  - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
164
179
  - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
165
180
  - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
@@ -167,24 +182,20 @@
167
182
  - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
168
183
 
169
184
  **Architecture Changes:**
170
-
171
185
  - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
172
186
  - Single code path for authentication (no more dual native/adapter modes)
173
187
  - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
174
188
 
175
189
  **Breaking Changes:**
176
-
177
190
  - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
178
191
  - Remove deprecated `session` field from `AuthConfig`
179
192
  - `User` interface no longer has index signature (extend via declaration merging)
180
193
 
181
194
  **Type Safety Improvements:**
182
-
183
195
  - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
184
196
  - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
185
197
 
186
198
  **Migration:**
187
-
188
199
  - Existing `authPlugin` usage remains backward-compatible
189
200
  - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
190
201
 
@@ -202,12 +213,10 @@
202
213
  Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
203
214
 
204
215
  ### Phase 1: Validation Helpers (`@veloxts/validation`)
205
-
206
216
  - Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
207
217
  - Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
208
218
 
209
219
  ### Phase 2: Template Deduplication (`@veloxts/auth`)
210
-
211
220
  - Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
212
221
  - Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
213
222
  - Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
@@ -215,20 +224,17 @@
215
224
  - Fix jwtManager singleton pattern in templates
216
225
 
217
226
  ### Phase 3: Router Helpers (`@veloxts/router`)
218
-
219
227
  - Add `createRouter()` returning `{ collections, router }` for DRY setup
220
228
  - Add `toRouter()` for router-only use cases
221
229
  - Update all router templates to use `createRouter()`
222
230
 
223
231
  ### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
224
-
225
232
  - Add `NarrowingGuard` interface with phantom `_narrows` type
226
233
  - Add `authenticatedNarrow` and `hasRoleNarrow()` guards
227
234
  - Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
228
235
  - Enables `ctx.user` to be non-null after guard passes
229
236
 
230
237
  ### Phase 5: Documentation (`@veloxts/router`)
231
-
232
238
  - Document `.rest()` override patterns
233
239
  - Document `createRouter()` helper usage
234
240
  - Document `guardNarrow()` experimental API
@@ -1053,7 +1059,6 @@
1053
1059
  ### Patch Changes
1054
1060
 
1055
1061
  - Fix Prisma client generation in scaffolder
1056
-
1057
1062
  - Added automatic Prisma client generation after dependency installation in create-velox-app
1058
1063
  - Fixed database template to validate DATABASE_URL environment variable
1059
1064
  - Added alpha release warning to all package READMEs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/validation",
3
- "version": "0.6.89",
3
+ "version": "0.6.91",
4
4
  "description": "Zod integration and validation middleware for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,12 +23,12 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "zod": "3.25.76",
26
- "@veloxts/core": "0.6.89"
26
+ "@veloxts/core": "0.6.91"
27
27
  },
28
28
  "devDependencies": {
29
- "@vitest/coverage-v8": "4.0.16",
29
+ "@vitest/coverage-v8": "4.0.18",
30
30
  "typescript": "5.9.3",
31
- "vitest": "4.0.16"
31
+ "vitest": "4.0.18"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "zod": "^3.25.0"