@veloxts/velox 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 +46 -0
  2. package/package.json +19 -19
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @veloxts/velox
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/cache@0.8.3
11
+ - @veloxts/core@0.8.3
12
+ - @veloxts/events@0.8.3
13
+ - @veloxts/mail@0.8.3
14
+ - @veloxts/orm@0.8.3
15
+ - @veloxts/queue@0.8.3
16
+ - @veloxts/router@0.8.3
17
+ - @veloxts/scheduler@0.8.3
18
+ - @veloxts/storage@0.8.3
19
+ - @veloxts/validation@0.8.3
20
+
21
+ ## 0.8.2
22
+
23
+ ### Patch Changes
24
+
25
+ - merge URL params into POST input for flat .rest() paths
26
+ - Updated dependencies
27
+ - @veloxts/auth@0.8.2
28
+ - @veloxts/cache@0.8.2
29
+ - @veloxts/core@0.8.2
30
+ - @veloxts/events@0.8.2
31
+ - @veloxts/mail@0.8.2
32
+ - @veloxts/orm@0.8.2
33
+ - @veloxts/queue@0.8.2
34
+ - @veloxts/router@0.8.2
35
+ - @veloxts/scheduler@0.8.2
36
+ - @veloxts/storage@0.8.2
37
+ - @veloxts/validation@0.8.2
38
+
3
39
  ## 0.8.1
4
40
 
5
41
  ### Patch Changes
@@ -783,6 +819,7 @@
783
819
  - ### feat(auth): Unified Adapter-Only Architecture
784
820
 
785
821
  **New Features:**
822
+
786
823
  - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
787
824
  - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
788
825
  - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
@@ -790,20 +827,24 @@
790
827
  - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
791
828
 
792
829
  **Architecture Changes:**
830
+
793
831
  - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
794
832
  - Single code path for authentication (no more dual native/adapter modes)
795
833
  - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
796
834
 
797
835
  **Breaking Changes:**
836
+
798
837
  - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
799
838
  - Remove deprecated `session` field from `AuthConfig`
800
839
  - `User` interface no longer has index signature (extend via declaration merging)
801
840
 
802
841
  **Type Safety Improvements:**
842
+
803
843
  - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
804
844
  - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
805
845
 
806
846
  **Migration:**
847
+
807
848
  - Existing `authPlugin` usage remains backward-compatible
808
849
  - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
809
850
 
@@ -825,10 +866,12 @@
825
866
  Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
826
867
 
827
868
  ### Phase 1: Validation Helpers (`@veloxts/validation`)
869
+
828
870
  - Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
829
871
  - Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
830
872
 
831
873
  ### Phase 2: Template Deduplication (`@veloxts/auth`)
874
+
832
875
  - Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
833
876
  - Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
834
877
  - Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
@@ -836,17 +879,20 @@
836
879
  - Fix jwtManager singleton pattern in templates
837
880
 
838
881
  ### Phase 3: Router Helpers (`@veloxts/router`)
882
+
839
883
  - Add `createRouter()` returning `{ collections, router }` for DRY setup
840
884
  - Add `toRouter()` for router-only use cases
841
885
  - Update all router templates to use `createRouter()`
842
886
 
843
887
  ### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
888
+
844
889
  - Add `NarrowingGuard` interface with phantom `_narrows` type
845
890
  - Add `authenticatedNarrow` and `hasRoleNarrow()` guards
846
891
  - Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
847
892
  - Enables `ctx.user` to be non-null after guard passes
848
893
 
849
894
  ### Phase 5: Documentation (`@veloxts/router`)
895
+
850
896
  - Document `.rest()` override patterns
851
897
  - Document `createRouter()` helper usage
852
898
  - Document `guardNarrow()` experimental API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veloxts/velox",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Complete VeloxTS framework - batteries included",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -39,30 +39,30 @@
39
39
  "CHANGELOG.md"
40
40
  ],
41
41
  "dependencies": {
42
- "@veloxts/validation": "0.8.1",
43
- "@veloxts/core": "0.8.1",
44
- "@veloxts/orm": "0.8.1",
45
- "@veloxts/router": "0.8.1",
46
- "@veloxts/auth": "0.8.1"
42
+ "@veloxts/core": "0.8.3",
43
+ "@veloxts/validation": "0.8.3",
44
+ "@veloxts/orm": "0.8.3",
45
+ "@veloxts/auth": "0.8.3",
46
+ "@veloxts/router": "0.8.3"
47
47
  },
48
48
  "devDependencies": {
49
49
  "typescript": "5.9.3",
50
- "vitest": "4.1.0",
51
- "@veloxts/mail": "0.8.1",
52
- "@veloxts/events": "0.8.1",
53
- "@veloxts/cache": "0.8.1",
54
- "@veloxts/scheduler": "0.8.1",
55
- "@veloxts/storage": "0.8.1",
56
- "@veloxts/queue": "0.8.1"
50
+ "vitest": "4.1.5",
51
+ "@veloxts/events": "0.8.3",
52
+ "@veloxts/mail": "0.8.3",
53
+ "@veloxts/cache": "0.8.3",
54
+ "@veloxts/scheduler": "0.8.3",
55
+ "@veloxts/storage": "0.8.3",
56
+ "@veloxts/queue": "0.8.3"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "zod": "^4.3.0",
60
- "@veloxts/queue": "0.8.1",
61
- "@veloxts/mail": "0.8.1",
62
- "@veloxts/cache": "0.8.1",
63
- "@veloxts/storage": "0.8.1",
64
- "@veloxts/events": "0.8.1",
65
- "@veloxts/scheduler": "0.8.1"
60
+ "@veloxts/cache": "0.8.3",
61
+ "@veloxts/queue": "0.8.3",
62
+ "@veloxts/mail": "0.8.3",
63
+ "@veloxts/storage": "0.8.3",
64
+ "@veloxts/events": "0.8.3",
65
+ "@veloxts/scheduler": "0.8.3"
66
66
  },
67
67
  "peerDependenciesMeta": {
68
68
  "@veloxts/cache": {