@veloxts/cache 0.6.69 → 0.6.70

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 +39 -0
  2. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @veloxts/cache
2
2
 
3
+ ## 0.6.70
4
+
5
+ ### Patch Changes
6
+
7
+ - ### feat(auth): Unified Adapter-Only Architecture
8
+
9
+ **New Features:**
10
+
11
+ - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
12
+ - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
13
+ - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
14
+ - Add double-registration protection to prevent conflicting auth system setups
15
+ - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
16
+
17
+ **Architecture Changes:**
18
+
19
+ - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
20
+ - Single code path for authentication (no more dual native/adapter modes)
21
+ - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
22
+
23
+ **Breaking Changes:**
24
+
25
+ - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
26
+ - Remove deprecated `session` field from `AuthConfig`
27
+ - `User` interface no longer has index signature (extend via declaration merging)
28
+
29
+ **Type Safety Improvements:**
30
+
31
+ - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
32
+ - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
33
+
34
+ **Migration:**
35
+
36
+ - Existing `authPlugin` usage remains backward-compatible
37
+ - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
38
+
39
+ - Updated dependencies
40
+ - @veloxts/core@0.6.70
41
+
3
42
  ## 0.6.69
4
43
 
5
44
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/cache",
3
- "version": "0.6.69",
3
+ "version": "0.6.70",
4
4
  "description": "Multi-driver caching layer for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "fastify-plugin": "5.1.0",
36
36
  "lru-cache": "11.1.0",
37
37
  "superjson": "2.2.2",
38
- "@veloxts/core": "0.6.69"
38
+ "@veloxts/core": "0.6.70"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "ioredis": ">=5.0.0"
@@ -51,7 +51,7 @@
51
51
  "ioredis": "5.6.1",
52
52
  "typescript": "5.9.3",
53
53
  "vitest": "4.0.16",
54
- "@veloxts/testing": "0.6.69"
54
+ "@veloxts/testing": "0.6.70"
55
55
  },
56
56
  "keywords": [
57
57
  "velox",