@veloxts/web 0.8.1 → 0.8.3

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 +32 -0
  2. package/package.json +17 -17
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @veloxts/web
2
2
 
3
+ ## 0.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - bump dependencies across packages (April 2026)
8
+ - Updated dependencies
9
+ - @veloxts/auth@0.8.3
10
+ - @veloxts/client@0.8.3
11
+ - @veloxts/core@0.8.3
12
+ - @veloxts/router@0.8.3
13
+
14
+ ## 0.8.2
15
+
16
+ ### Patch Changes
17
+
18
+ - merge URL params into POST input for flat .rest() paths
19
+ - Updated dependencies
20
+ - @veloxts/auth@0.8.2
21
+ - @veloxts/client@0.8.2
22
+ - @veloxts/core@0.8.2
23
+ - @veloxts/router@0.8.2
24
+
3
25
  ## 0.8.1
4
26
 
5
27
  ### Patch Changes
@@ -549,6 +571,7 @@
549
571
  - ### feat(auth): Unified Adapter-Only Architecture
550
572
 
551
573
  **New Features:**
574
+
552
575
  - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
553
576
  - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
554
577
  - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
@@ -556,20 +579,24 @@
556
579
  - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
557
580
 
558
581
  **Architecture Changes:**
582
+
559
583
  - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
560
584
  - Single code path for authentication (no more dual native/adapter modes)
561
585
  - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
562
586
 
563
587
  **Breaking Changes:**
588
+
564
589
  - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
565
590
  - Remove deprecated `session` field from `AuthConfig`
566
591
  - `User` interface no longer has index signature (extend via declaration merging)
567
592
 
568
593
  **Type Safety Improvements:**
594
+
569
595
  - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
570
596
  - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
571
597
 
572
598
  **Migration:**
599
+
573
600
  - Existing `authPlugin` usage remains backward-compatible
574
601
  - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
575
602
 
@@ -590,10 +617,12 @@
590
617
  Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
591
618
 
592
619
  ### Phase 1: Validation Helpers (`@veloxts/validation`)
620
+
593
621
  - Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
594
622
  - Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
595
623
 
596
624
  ### Phase 2: Template Deduplication (`@veloxts/auth`)
625
+
597
626
  - Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
598
627
  - Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
599
628
  - Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
@@ -601,17 +630,20 @@
601
630
  - Fix jwtManager singleton pattern in templates
602
631
 
603
632
  ### Phase 3: Router Helpers (`@veloxts/router`)
633
+
604
634
  - Add `createRouter()` returning `{ collections, router }` for DRY setup
605
635
  - Add `toRouter()` for router-only use cases
606
636
  - Update all router templates to use `createRouter()`
607
637
 
608
638
  ### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
639
+
609
640
  - Add `NarrowingGuard` interface with phantom `_narrows` type
610
641
  - Add `authenticatedNarrow` and `hasRoleNarrow()` guards
611
642
  - Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
612
643
  - Enables `ctx.user` to be non-null after guard passes
613
644
 
614
645
  ### Phase 5: Documentation (`@veloxts/router`)
646
+
615
647
  - Document `.rest()` override patterns
616
648
  - Document `createRouter()` helper usage
617
649
  - Document `guardNarrow()` experimental API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/web",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "React Server Components integration for VeloxTS framework using Vinxi",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -72,10 +72,10 @@
72
72
  "peerDependencies": {
73
73
  "react": ">=19.2.0",
74
74
  "react-dom": ">=19.2.0",
75
- "@veloxts/auth": "0.8.1",
76
- "@veloxts/client": "0.8.1",
77
- "@veloxts/router": "0.8.1",
78
- "@veloxts/core": "0.8.1"
75
+ "@veloxts/auth": "0.8.3",
76
+ "@veloxts/core": "0.8.3",
77
+ "@veloxts/client": "0.8.3",
78
+ "@veloxts/router": "0.8.3"
79
79
  },
80
80
  "peerDependenciesMeta": {
81
81
  "@veloxts/auth": {
@@ -86,21 +86,21 @@
86
86
  }
87
87
  },
88
88
  "devDependencies": {
89
- "@types/jsdom": "28.0.0",
90
- "@types/node": "25.5.0",
89
+ "@types/jsdom": "28.0.1",
90
+ "@types/node": "25.6.0",
91
91
  "@types/react": "19.2.14",
92
92
  "@types/react-dom": "19.2.3",
93
- "@vitest/coverage-v8": "4.1.0",
94
- "fastify": "5.8.2",
95
- "jsdom": "28.1.0",
96
- "react": "19.2.4",
97
- "react-dom": "19.2.4",
93
+ "@vitest/coverage-v8": "4.1.5",
94
+ "fastify": "5.8.5",
95
+ "jsdom": "29.0.2",
96
+ "react": "19.2.5",
97
+ "react-dom": "19.2.5",
98
98
  "typescript": "5.9.3",
99
- "vitest": "4.1.0",
100
- "@veloxts/auth": "0.8.1",
101
- "@veloxts/core": "0.8.1",
102
- "@veloxts/router": "0.8.1",
103
- "@veloxts/client": "0.8.1"
99
+ "vitest": "4.1.5",
100
+ "@veloxts/auth": "0.8.3",
101
+ "@veloxts/core": "0.8.3",
102
+ "@veloxts/router": "0.8.3",
103
+ "@veloxts/client": "0.8.3"
104
104
  },
105
105
  "keywords": [
106
106
  "velox",