@veloxts/velox 0.8.2 → 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.
- package/CHANGELOG.md +28 -0
- package/package.json +19 -19
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
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
|
+
|
|
3
21
|
## 0.8.2
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -801,6 +819,7 @@
|
|
|
801
819
|
- ### feat(auth): Unified Adapter-Only Architecture
|
|
802
820
|
|
|
803
821
|
**New Features:**
|
|
822
|
+
|
|
804
823
|
- Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
|
|
805
824
|
- Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
|
|
806
825
|
- Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
|
|
@@ -808,20 +827,24 @@
|
|
|
808
827
|
- Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
|
|
809
828
|
|
|
810
829
|
**Architecture Changes:**
|
|
830
|
+
|
|
811
831
|
- `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
|
|
812
832
|
- Single code path for authentication (no more dual native/adapter modes)
|
|
813
833
|
- `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
|
|
814
834
|
|
|
815
835
|
**Breaking Changes:**
|
|
836
|
+
|
|
816
837
|
- Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
|
|
817
838
|
- Remove deprecated `session` field from `AuthConfig`
|
|
818
839
|
- `User` interface no longer has index signature (extend via declaration merging)
|
|
819
840
|
|
|
820
841
|
**Type Safety Improvements:**
|
|
842
|
+
|
|
821
843
|
- `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
|
|
822
844
|
- Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
|
|
823
845
|
|
|
824
846
|
**Migration:**
|
|
847
|
+
|
|
825
848
|
- Existing `authPlugin` usage remains backward-compatible
|
|
826
849
|
- If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
|
|
827
850
|
|
|
@@ -843,10 +866,12 @@
|
|
|
843
866
|
Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
|
|
844
867
|
|
|
845
868
|
### Phase 1: Validation Helpers (`@veloxts/validation`)
|
|
869
|
+
|
|
846
870
|
- Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
|
|
847
871
|
- Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
|
|
848
872
|
|
|
849
873
|
### Phase 2: Template Deduplication (`@veloxts/auth`)
|
|
874
|
+
|
|
850
875
|
- Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
|
|
851
876
|
- Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
|
|
852
877
|
- Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
|
|
@@ -854,17 +879,20 @@
|
|
|
854
879
|
- Fix jwtManager singleton pattern in templates
|
|
855
880
|
|
|
856
881
|
### Phase 3: Router Helpers (`@veloxts/router`)
|
|
882
|
+
|
|
857
883
|
- Add `createRouter()` returning `{ collections, router }` for DRY setup
|
|
858
884
|
- Add `toRouter()` for router-only use cases
|
|
859
885
|
- Update all router templates to use `createRouter()`
|
|
860
886
|
|
|
861
887
|
### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
|
|
888
|
+
|
|
862
889
|
- Add `NarrowingGuard` interface with phantom `_narrows` type
|
|
863
890
|
- Add `authenticatedNarrow` and `hasRoleNarrow()` guards
|
|
864
891
|
- Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
|
|
865
892
|
- Enables `ctx.user` to be non-null after guard passes
|
|
866
893
|
|
|
867
894
|
### Phase 5: Documentation (`@veloxts/router`)
|
|
895
|
+
|
|
868
896
|
- Document `.rest()` override patterns
|
|
869
897
|
- Document `createRouter()` helper usage
|
|
870
898
|
- Document `guardNarrow()` experimental API
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/velox",
|
|
3
|
-
"version": "0.8.
|
|
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/
|
|
43
|
-
"@veloxts/
|
|
44
|
-
"@veloxts/
|
|
45
|
-
"@veloxts/
|
|
46
|
-
"@veloxts/router": "0.8.
|
|
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.
|
|
51
|
-
"@veloxts/
|
|
52
|
-
"@veloxts/mail": "0.8.
|
|
53
|
-
"@veloxts/
|
|
54
|
-
"@veloxts/
|
|
55
|
-
"@veloxts/
|
|
56
|
-
"@veloxts/
|
|
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/cache": "0.8.
|
|
61
|
-
"@veloxts/queue": "0.8.
|
|
62
|
-
"@veloxts/mail": "0.8.
|
|
63
|
-
"@veloxts/storage": "0.8.
|
|
64
|
-
"@veloxts/events": "0.8.
|
|
65
|
-
"@veloxts/scheduler": "0.8.
|
|
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": {
|