@veloxts/orm 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.
- package/CHANGELOG.md +27 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @veloxts/orm
|
|
2
2
|
|
|
3
|
+
## 0.8.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bump dependencies across packages (April 2026)
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @veloxts/core@0.8.3
|
|
10
|
+
|
|
11
|
+
## 0.8.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- merge URL params into POST input for flat .rest() paths
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- @veloxts/core@0.8.2
|
|
18
|
+
|
|
3
19
|
## 0.8.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -405,6 +421,7 @@
|
|
|
405
421
|
- ### feat(auth): Unified Adapter-Only Architecture
|
|
406
422
|
|
|
407
423
|
**New Features:**
|
|
424
|
+
|
|
408
425
|
- Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
|
|
409
426
|
- Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
|
|
410
427
|
- Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
|
|
@@ -412,20 +429,24 @@
|
|
|
412
429
|
- Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
|
|
413
430
|
|
|
414
431
|
**Architecture Changes:**
|
|
432
|
+
|
|
415
433
|
- `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
|
|
416
434
|
- Single code path for authentication (no more dual native/adapter modes)
|
|
417
435
|
- `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
|
|
418
436
|
|
|
419
437
|
**Breaking Changes:**
|
|
438
|
+
|
|
420
439
|
- Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
|
|
421
440
|
- Remove deprecated `session` field from `AuthConfig`
|
|
422
441
|
- `User` interface no longer has index signature (extend via declaration merging)
|
|
423
442
|
|
|
424
443
|
**Type Safety Improvements:**
|
|
444
|
+
|
|
425
445
|
- `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
|
|
426
446
|
- Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
|
|
427
447
|
|
|
428
448
|
**Migration:**
|
|
449
|
+
|
|
429
450
|
- Existing `authPlugin` usage remains backward-compatible
|
|
430
451
|
- If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
|
|
431
452
|
|
|
@@ -443,10 +464,12 @@
|
|
|
443
464
|
Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
|
|
444
465
|
|
|
445
466
|
### Phase 1: Validation Helpers (`@veloxts/validation`)
|
|
467
|
+
|
|
446
468
|
- Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
|
|
447
469
|
- Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
|
|
448
470
|
|
|
449
471
|
### Phase 2: Template Deduplication (`@veloxts/auth`)
|
|
472
|
+
|
|
450
473
|
- Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
|
|
451
474
|
- Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
|
|
452
475
|
- Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
|
|
@@ -454,17 +477,20 @@
|
|
|
454
477
|
- Fix jwtManager singleton pattern in templates
|
|
455
478
|
|
|
456
479
|
### Phase 3: Router Helpers (`@veloxts/router`)
|
|
480
|
+
|
|
457
481
|
- Add `createRouter()` returning `{ collections, router }` for DRY setup
|
|
458
482
|
- Add `toRouter()` for router-only use cases
|
|
459
483
|
- Update all router templates to use `createRouter()`
|
|
460
484
|
|
|
461
485
|
### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
|
|
486
|
+
|
|
462
487
|
- Add `NarrowingGuard` interface with phantom `_narrows` type
|
|
463
488
|
- Add `authenticatedNarrow` and `hasRoleNarrow()` guards
|
|
464
489
|
- Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
|
|
465
490
|
- Enables `ctx.user` to be non-null after guard passes
|
|
466
491
|
|
|
467
492
|
### Phase 5: Documentation (`@veloxts/router`)
|
|
493
|
+
|
|
468
494
|
- Document `.rest()` override patterns
|
|
469
495
|
- Document `createRouter()` helper usage
|
|
470
496
|
- Document `guardNarrow()` experimental API
|
|
@@ -1289,6 +1315,7 @@
|
|
|
1289
1315
|
### Patch Changes
|
|
1290
1316
|
|
|
1291
1317
|
- Fix Prisma client generation in scaffolder
|
|
1318
|
+
|
|
1292
1319
|
- Added automatic Prisma client generation after dependency installation in create-velox-app
|
|
1293
1320
|
- Fixed database template to validate DATABASE_URL environment variable
|
|
1294
1321
|
- Added alpha release warning to all package READMEs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@veloxts/orm",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Prisma wrapper with enhanced DX for VeloxTS framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,17 +16,17 @@
|
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"fastify": "5.8.
|
|
19
|
+
"fastify": "5.8.5",
|
|
20
20
|
"pg": "8.20.0",
|
|
21
21
|
"pg-format": "1.0.4",
|
|
22
|
-
"@veloxts/core": "0.8.
|
|
22
|
+
"@veloxts/core": "0.8.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@types/pg": "8.
|
|
25
|
+
"@types/pg": "8.20.0",
|
|
26
26
|
"@types/pg-format": "1.0.5",
|
|
27
|
-
"@vitest/coverage-v8": "4.1.
|
|
27
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
28
28
|
"typescript": "5.9.3",
|
|
29
|
-
"vitest": "4.1.
|
|
29
|
+
"vitest": "4.1.5"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@prisma/client": ">=7.0.0"
|