create-velox-app 0.8.3 → 0.9.0

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 +6 -10
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # create-velox-app
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - feat(router): add raw() response primitive for redirects, cookies, custom headers and .check() post-middleware authorization primitive
8
+
3
9
  ## 0.8.3
4
10
 
5
11
  ### Patch Changes
@@ -315,7 +321,6 @@
315
321
  - ### feat(auth): Unified Adapter-Only Architecture
316
322
 
317
323
  **New Features:**
318
-
319
324
  - Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
320
325
  - Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
321
326
  - Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
@@ -323,24 +328,20 @@
323
328
  - Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
324
329
 
325
330
  **Architecture Changes:**
326
-
327
331
  - `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
328
332
  - Single code path for authentication (no more dual native/adapter modes)
329
333
  - `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
330
334
 
331
335
  **Breaking Changes:**
332
-
333
336
  - Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
334
337
  - Remove deprecated `session` field from `AuthConfig`
335
338
  - `User` interface no longer has index signature (extend via declaration merging)
336
339
 
337
340
  **Type Safety Improvements:**
338
-
339
341
  - `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
340
342
  - Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
341
343
 
342
344
  **Migration:**
343
-
344
345
  - Existing `authPlugin` usage remains backward-compatible
345
346
  - If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
346
347
 
@@ -355,12 +356,10 @@
355
356
  Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
356
357
 
357
358
  ### Phase 1: Validation Helpers (`@veloxts/validation`)
358
-
359
359
  - Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
360
360
  - Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
361
361
 
362
362
  ### Phase 2: Template Deduplication (`@veloxts/auth`)
363
-
364
363
  - Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
365
364
  - Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
366
365
  - Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
@@ -368,20 +367,17 @@
368
367
  - Fix jwtManager singleton pattern in templates
369
368
 
370
369
  ### Phase 3: Router Helpers (`@veloxts/router`)
371
-
372
370
  - Add `createRouter()` returning `{ collections, router }` for DRY setup
373
371
  - Add `toRouter()` for router-only use cases
374
372
  - Update all router templates to use `createRouter()`
375
373
 
376
374
  ### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
377
-
378
375
  - Add `NarrowingGuard` interface with phantom `_narrows` type
379
376
  - Add `authenticatedNarrow` and `hasRoleNarrow()` guards
380
377
  - Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
381
378
  - Enables `ctx.user` to be non-null after guard passes
382
379
 
383
380
  ### Phase 5: Documentation (`@veloxts/router`)
384
-
385
381
  - Document `.rest()` override patterns
386
382
  - Document `createRouter()` helper usage
387
383
  - Document `guardNarrow()` experimental API
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-velox-app",
3
- "version": "0.8.3",
3
+ "version": "0.9.0",
4
4
  "description": "Project scaffolder for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",