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