@veloxts/cache 0.6.88 → 0.6.90
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 +16 -10
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @veloxts/cache
|
|
2
2
|
|
|
3
|
+
## 0.6.90
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Dependencies updates – fix critical and high severity vulnerabilities
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @veloxts/core@0.6.90
|
|
10
|
+
|
|
11
|
+
## 0.6.89
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- expand preset system with server config, auth presets, and security validation
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @veloxts/core@0.6.89
|
|
18
|
+
|
|
3
19
|
## 0.6.88
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -151,7 +167,6 @@
|
|
|
151
167
|
- ### feat(auth): Unified Adapter-Only Architecture
|
|
152
168
|
|
|
153
169
|
**New Features:**
|
|
154
|
-
|
|
155
170
|
- Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
|
|
156
171
|
- Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
|
|
157
172
|
- Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
|
|
@@ -159,24 +174,20 @@
|
|
|
159
174
|
- Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
|
|
160
175
|
|
|
161
176
|
**Architecture Changes:**
|
|
162
|
-
|
|
163
177
|
- `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
|
|
164
178
|
- Single code path for authentication (no more dual native/adapter modes)
|
|
165
179
|
- `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
|
|
166
180
|
|
|
167
181
|
**Breaking Changes:**
|
|
168
|
-
|
|
169
182
|
- Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
|
|
170
183
|
- Remove deprecated `session` field from `AuthConfig`
|
|
171
184
|
- `User` interface no longer has index signature (extend via declaration merging)
|
|
172
185
|
|
|
173
186
|
**Type Safety Improvements:**
|
|
174
|
-
|
|
175
187
|
- `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
|
|
176
188
|
- Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
|
|
177
189
|
|
|
178
190
|
**Migration:**
|
|
179
|
-
|
|
180
191
|
- Existing `authPlugin` usage remains backward-compatible
|
|
181
192
|
- If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
|
|
182
193
|
|
|
@@ -194,12 +205,10 @@
|
|
|
194
205
|
Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
|
|
195
206
|
|
|
196
207
|
### Phase 1: Validation Helpers (`@veloxts/validation`)
|
|
197
|
-
|
|
198
208
|
- Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
|
|
199
209
|
- Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
|
|
200
210
|
|
|
201
211
|
### Phase 2: Template Deduplication (`@veloxts/auth`)
|
|
202
|
-
|
|
203
212
|
- Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
|
|
204
213
|
- Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
|
|
205
214
|
- Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
|
|
@@ -207,20 +216,17 @@
|
|
|
207
216
|
- Fix jwtManager singleton pattern in templates
|
|
208
217
|
|
|
209
218
|
### Phase 3: Router Helpers (`@veloxts/router`)
|
|
210
|
-
|
|
211
219
|
- Add `createRouter()` returning `{ collections, router }` for DRY setup
|
|
212
220
|
- Add `toRouter()` for router-only use cases
|
|
213
221
|
- Update all router templates to use `createRouter()`
|
|
214
222
|
|
|
215
223
|
### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
|
|
216
|
-
|
|
217
224
|
- Add `NarrowingGuard` interface with phantom `_narrows` type
|
|
218
225
|
- Add `authenticatedNarrow` and `hasRoleNarrow()` guards
|
|
219
226
|
- Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
|
|
220
227
|
- Enables `ctx.user` to be non-null after guard passes
|
|
221
228
|
|
|
222
229
|
### Phase 5: Documentation (`@veloxts/router`)
|
|
223
|
-
|
|
224
230
|
- Document `.rest()` override patterns
|
|
225
231
|
- Document `createRouter()` helper usage
|
|
226
232
|
- Document `guardNarrow()` experimental API
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/cache",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.90",
|
|
4
4
|
"description": "Multi-driver caching layer for VeloxTS framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"CHANGELOG.md"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"fastify": "5.
|
|
34
|
+
"fastify": "5.7.2",
|
|
35
35
|
"fastify-plugin": "5.1.0",
|
|
36
|
-
"lru-cache": "11.
|
|
37
|
-
"superjson": "2.2.
|
|
38
|
-
"@veloxts/core": "0.6.
|
|
36
|
+
"lru-cache": "11.2.5",
|
|
37
|
+
"superjson": "2.2.6",
|
|
38
|
+
"@veloxts/core": "0.6.90"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"ioredis": ">=5.0.0"
|
|
@@ -46,12 +46,12 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@types/node": "25.0
|
|
50
|
-
"@vitest/coverage-v8": "4.0.
|
|
51
|
-
"ioredis": "5.
|
|
49
|
+
"@types/node": "25.1.0",
|
|
50
|
+
"@vitest/coverage-v8": "4.0.18",
|
|
51
|
+
"ioredis": "5.9.2",
|
|
52
52
|
"typescript": "5.9.3",
|
|
53
|
-
"vitest": "4.0.
|
|
54
|
-
"@veloxts/testing": "0.6.
|
|
53
|
+
"vitest": "4.0.18",
|
|
54
|
+
"@veloxts/testing": "0.6.90"
|
|
55
55
|
},
|
|
56
56
|
"keywords": [
|
|
57
57
|
"velox",
|