@veloxts/client 0.6.89 → 0.6.90
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 +6 -11
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @veloxts/client
|
|
2
2
|
|
|
3
|
+
## 0.6.90
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Dependencies updates – fix critical and high severity vulnerabilities
|
|
8
|
+
|
|
3
9
|
## 0.6.89
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -121,7 +127,6 @@
|
|
|
121
127
|
- ### feat(auth): Unified Adapter-Only Architecture
|
|
122
128
|
|
|
123
129
|
**New Features:**
|
|
124
|
-
|
|
125
130
|
- Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
|
|
126
131
|
- Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
|
|
127
132
|
- Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
|
|
@@ -129,24 +134,20 @@
|
|
|
129
134
|
- Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
|
|
130
135
|
|
|
131
136
|
**Architecture Changes:**
|
|
132
|
-
|
|
133
137
|
- `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
|
|
134
138
|
- Single code path for authentication (no more dual native/adapter modes)
|
|
135
139
|
- `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
|
|
136
140
|
|
|
137
141
|
**Breaking Changes:**
|
|
138
|
-
|
|
139
142
|
- Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
|
|
140
143
|
- Remove deprecated `session` field from `AuthConfig`
|
|
141
144
|
- `User` interface no longer has index signature (extend via declaration merging)
|
|
142
145
|
|
|
143
146
|
**Type Safety Improvements:**
|
|
144
|
-
|
|
145
147
|
- `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
|
|
146
148
|
- Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
|
|
147
149
|
|
|
148
150
|
**Migration:**
|
|
149
|
-
|
|
150
151
|
- Existing `authPlugin` usage remains backward-compatible
|
|
151
152
|
- If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
|
|
152
153
|
|
|
@@ -161,12 +162,10 @@
|
|
|
161
162
|
Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
|
|
162
163
|
|
|
163
164
|
### Phase 1: Validation Helpers (`@veloxts/validation`)
|
|
164
|
-
|
|
165
165
|
- Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
|
|
166
166
|
- Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
|
|
167
167
|
|
|
168
168
|
### Phase 2: Template Deduplication (`@veloxts/auth`)
|
|
169
|
-
|
|
170
169
|
- Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
|
|
171
170
|
- Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
|
|
172
171
|
- Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
|
|
@@ -174,20 +173,17 @@
|
|
|
174
173
|
- Fix jwtManager singleton pattern in templates
|
|
175
174
|
|
|
176
175
|
### Phase 3: Router Helpers (`@veloxts/router`)
|
|
177
|
-
|
|
178
176
|
- Add `createRouter()` returning `{ collections, router }` for DRY setup
|
|
179
177
|
- Add `toRouter()` for router-only use cases
|
|
180
178
|
- Update all router templates to use `createRouter()`
|
|
181
179
|
|
|
182
180
|
### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
|
|
183
|
-
|
|
184
181
|
- Add `NarrowingGuard` interface with phantom `_narrows` type
|
|
185
182
|
- Add `authenticatedNarrow` and `hasRoleNarrow()` guards
|
|
186
183
|
- Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
|
|
187
184
|
- Enables `ctx.user` to be non-null after guard passes
|
|
188
185
|
|
|
189
186
|
### Phase 5: Documentation (`@veloxts/router`)
|
|
190
|
-
|
|
191
187
|
- Document `.rest()` override patterns
|
|
192
188
|
- Document `createRouter()` helper usage
|
|
193
189
|
- Document `guardNarrow()` experimental API
|
|
@@ -802,7 +798,6 @@
|
|
|
802
798
|
### Patch Changes
|
|
803
799
|
|
|
804
800
|
- Fix Prisma client generation in scaffolder
|
|
805
|
-
|
|
806
801
|
- Added automatic Prisma client generation after dependency installation in create-velox-app
|
|
807
802
|
- Fixed database template to validate DATABASE_URL environment variable
|
|
808
803
|
- Added alpha release warning to all package READMEs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/client",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.90",
|
|
4
4
|
"description": "Type-safe frontend API client for VeloxTS framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@tanstack/react-query": "5.90.
|
|
38
|
+
"@tanstack/react-query": "5.90.20",
|
|
39
39
|
"@testing-library/jest-dom": "6.9.1",
|
|
40
|
-
"@testing-library/react": "16.3.
|
|
41
|
-
"@types/react": "19.2.
|
|
40
|
+
"@testing-library/react": "16.3.2",
|
|
41
|
+
"@types/react": "19.2.10",
|
|
42
42
|
"@types/react-dom": "19.2.3",
|
|
43
|
-
"@vitest/coverage-v8": "4.0.
|
|
44
|
-
"jsdom": "27.
|
|
45
|
-
"react": "19.2.
|
|
46
|
-
"react-dom": "19.2.
|
|
43
|
+
"@vitest/coverage-v8": "4.0.18",
|
|
44
|
+
"jsdom": "27.4.0",
|
|
45
|
+
"react": "19.2.4",
|
|
46
|
+
"react-dom": "19.2.4",
|
|
47
47
|
"typescript": "5.9.3",
|
|
48
|
-
"vitest": "4.0.
|
|
48
|
+
"vitest": "4.0.18"
|
|
49
49
|
},
|
|
50
50
|
"keywords": [
|
|
51
51
|
"velox",
|