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