@veloxts/router 0.6.69 → 0.6.71

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 +49 -0
  2. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @veloxts/router
2
2
 
3
+ ## 0.6.71
4
+
5
+ ### Patch Changes
6
+
7
+ - feat(create): add template shorthand flags (--auth, --rsc, etc.) (#20)
8
+ - Updated dependencies
9
+ - @veloxts/core@0.6.71
10
+ - @veloxts/validation@0.6.71
11
+
12
+ ## 0.6.70
13
+
14
+ ### Patch Changes
15
+
16
+ - ### feat(auth): Unified Adapter-Only Architecture
17
+
18
+ **New Features:**
19
+
20
+ - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
21
+ - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
22
+ - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
23
+ - Add double-registration protection to prevent conflicting auth system setups
24
+ - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
25
+
26
+ **Architecture Changes:**
27
+
28
+ - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
29
+ - Single code path for authentication (no more dual native/adapter modes)
30
+ - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
31
+
32
+ **Breaking Changes:**
33
+
34
+ - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
35
+ - Remove deprecated `session` field from `AuthConfig`
36
+ - `User` interface no longer has index signature (extend via declaration merging)
37
+
38
+ **Type Safety Improvements:**
39
+
40
+ - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
41
+ - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
42
+
43
+ **Migration:**
44
+
45
+ - Existing `authPlugin` usage remains backward-compatible
46
+ - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
47
+
48
+ - Updated dependencies
49
+ - @veloxts/core@0.6.70
50
+ - @veloxts/validation@0.6.70
51
+
3
52
  ## 0.6.69
4
53
 
5
54
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/router",
3
- "version": "0.6.69",
3
+ "version": "0.6.71",
4
4
  "description": "Procedure definitions with tRPC and REST routing for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -40,8 +40,8 @@
40
40
  "@trpc/server": "11.8.0",
41
41
  "fastify": "5.6.2",
42
42
  "zod-to-json-schema": "3.24.5",
43
- "@veloxts/core": "0.6.69",
44
- "@veloxts/validation": "0.6.69"
43
+ "@veloxts/core": "0.6.71",
44
+ "@veloxts/validation": "0.6.71"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@vitest/coverage-v8": "4.0.16",