@veloxts/web 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.
- package/CHANGELOG.md +22 -10
- package/package.json +20 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @veloxts/web
|
|
2
2
|
|
|
3
|
+
## 0.6.91
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- removed unused DI system
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @veloxts/auth@0.6.91
|
|
10
|
+
- @veloxts/client@0.6.91
|
|
11
|
+
- @veloxts/core@0.6.91
|
|
12
|
+
- @veloxts/router@0.6.91
|
|
13
|
+
|
|
14
|
+
## 0.6.90
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- Dependencies updates – fix critical and high severity vulnerabilities
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
- @veloxts/auth@0.6.90
|
|
21
|
+
- @veloxts/client@0.6.90
|
|
22
|
+
- @veloxts/core@0.6.90
|
|
23
|
+
- @veloxts/router@0.6.90
|
|
24
|
+
|
|
3
25
|
## 0.6.89
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -216,7 +238,6 @@
|
|
|
216
238
|
- ### feat(auth): Unified Adapter-Only Architecture
|
|
217
239
|
|
|
218
240
|
**New Features:**
|
|
219
|
-
|
|
220
241
|
- Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
|
|
221
242
|
- Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
|
|
222
243
|
- Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
|
|
@@ -224,24 +245,20 @@
|
|
|
224
245
|
- Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
|
|
225
246
|
|
|
226
247
|
**Architecture Changes:**
|
|
227
|
-
|
|
228
248
|
- `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
|
|
229
249
|
- Single code path for authentication (no more dual native/adapter modes)
|
|
230
250
|
- `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
|
|
231
251
|
|
|
232
252
|
**Breaking Changes:**
|
|
233
|
-
|
|
234
253
|
- Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
|
|
235
254
|
- Remove deprecated `session` field from `AuthConfig`
|
|
236
255
|
- `User` interface no longer has index signature (extend via declaration merging)
|
|
237
256
|
|
|
238
257
|
**Type Safety Improvements:**
|
|
239
|
-
|
|
240
258
|
- `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
|
|
241
259
|
- Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
|
|
242
260
|
|
|
243
261
|
**Migration:**
|
|
244
|
-
|
|
245
262
|
- Existing `authPlugin` usage remains backward-compatible
|
|
246
263
|
- If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
|
|
247
264
|
|
|
@@ -262,12 +279,10 @@
|
|
|
262
279
|
Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
|
|
263
280
|
|
|
264
281
|
### Phase 1: Validation Helpers (`@veloxts/validation`)
|
|
265
|
-
|
|
266
282
|
- Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
|
|
267
283
|
- Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
|
|
268
284
|
|
|
269
285
|
### Phase 2: Template Deduplication (`@veloxts/auth`)
|
|
270
|
-
|
|
271
286
|
- Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
|
|
272
287
|
- Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
|
|
273
288
|
- Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
|
|
@@ -275,20 +290,17 @@
|
|
|
275
290
|
- Fix jwtManager singleton pattern in templates
|
|
276
291
|
|
|
277
292
|
### Phase 3: Router Helpers (`@veloxts/router`)
|
|
278
|
-
|
|
279
293
|
- Add `createRouter()` returning `{ collections, router }` for DRY setup
|
|
280
294
|
- Add `toRouter()` for router-only use cases
|
|
281
295
|
- Update all router templates to use `createRouter()`
|
|
282
296
|
|
|
283
297
|
### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
|
|
284
|
-
|
|
285
298
|
- Add `NarrowingGuard` interface with phantom `_narrows` type
|
|
286
299
|
- Add `authenticatedNarrow` and `hasRoleNarrow()` guards
|
|
287
300
|
- Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
|
|
288
301
|
- Enables `ctx.user` to be non-null after guard passes
|
|
289
302
|
|
|
290
303
|
### Phase 5: Documentation (`@veloxts/router`)
|
|
291
|
-
|
|
292
304
|
- Document `.rest()` override patterns
|
|
293
305
|
- Document `createRouter()` helper usage
|
|
294
306
|
- Document `guardNarrow()` experimental API
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/web",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.91",
|
|
4
4
|
"description": "React Server Components integration for VeloxTS framework using Vinxi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -65,17 +65,17 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@vinxi/server-functions": "0.5.1",
|
|
67
67
|
"radix3": "1.1.2",
|
|
68
|
-
"vinxi": "0.5.
|
|
69
|
-
"vite-tsconfig-paths": "6.0.
|
|
68
|
+
"vinxi": "0.5.11",
|
|
69
|
+
"vite-tsconfig-paths": "6.0.5",
|
|
70
70
|
"zod": "3.25.76"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"react": ">=19.2.0",
|
|
74
74
|
"react-dom": ">=19.2.0",
|
|
75
|
-
"@veloxts/
|
|
76
|
-
"@veloxts/
|
|
77
|
-
"@veloxts/
|
|
78
|
-
"@veloxts/
|
|
75
|
+
"@veloxts/core": "0.6.91",
|
|
76
|
+
"@veloxts/router": "0.6.91",
|
|
77
|
+
"@veloxts/client": "0.6.91",
|
|
78
|
+
"@veloxts/auth": "0.6.91"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"@veloxts/auth": {
|
|
@@ -87,21 +87,21 @@
|
|
|
87
87
|
},
|
|
88
88
|
"devDependencies": {
|
|
89
89
|
"@types/jsdom": "27.0.0",
|
|
90
|
-
"@types/node": "25.0
|
|
91
|
-
"@types/react": "19.2.
|
|
90
|
+
"@types/node": "25.1.0",
|
|
91
|
+
"@types/react": "19.2.10",
|
|
92
92
|
"@types/react-dom": "19.2.3",
|
|
93
|
-
"@vitest/coverage-v8": "4.0.
|
|
94
|
-
"fastify": "5.
|
|
95
|
-
"jsdom": "27.
|
|
96
|
-
"react": "19.2.
|
|
97
|
-
"react-dom": "19.2.
|
|
98
|
-
"react-server-dom-webpack": "19.2.
|
|
93
|
+
"@vitest/coverage-v8": "4.0.18",
|
|
94
|
+
"fastify": "5.7.2",
|
|
95
|
+
"jsdom": "27.4.0",
|
|
96
|
+
"react": "19.2.4",
|
|
97
|
+
"react-dom": "19.2.4",
|
|
98
|
+
"react-server-dom-webpack": "19.2.4",
|
|
99
99
|
"typescript": "5.9.3",
|
|
100
|
-
"vitest": "4.0.
|
|
101
|
-
"@veloxts/auth": "0.6.
|
|
102
|
-
"@veloxts/client": "0.6.
|
|
103
|
-
"@veloxts/router": "0.6.
|
|
104
|
-
"@veloxts/core": "0.6.
|
|
100
|
+
"vitest": "4.0.18",
|
|
101
|
+
"@veloxts/auth": "0.6.91",
|
|
102
|
+
"@veloxts/client": "0.6.91",
|
|
103
|
+
"@veloxts/router": "0.6.91",
|
|
104
|
+
"@veloxts/core": "0.6.91"
|
|
105
105
|
},
|
|
106
106
|
"keywords": [
|
|
107
107
|
"velox",
|