create-velox-app 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 +16 -0
- package/dist/templates/placeholders.js +1 -1
- package/package.json +7 -7
- package/src/templates/source/api/package.auth.json +4 -4
- package/src/templates/source/api/package.default.json +4 -4
- package/src/templates/source/api/package.trpc.json +4 -4
- package/src/templates/source/api/procedures/auth.ts +1 -1
- package/src/templates/source/root/package.json +2 -2
- package/src/templates/source/rsc/package.json +9 -9
- package/src/templates/source/rsc-auth/package.json +9 -9
- package/src/templates/source/rsc-auth/src/api/procedures/auth.ts +1 -1
- package/src/templates/source/web/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# create-velox-app
|
|
2
2
|
|
|
3
|
+
## 0.8.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- bump dependencies across packages (April 2026)
|
|
8
|
+
|
|
3
9
|
## 0.8.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -309,6 +315,7 @@
|
|
|
309
315
|
- ### feat(auth): Unified Adapter-Only Architecture
|
|
310
316
|
|
|
311
317
|
**New Features:**
|
|
318
|
+
|
|
312
319
|
- Add `JwtAdapter` implementing the `AuthAdapter` interface for unified JWT authentication
|
|
313
320
|
- Add `jwtAuth()` convenience function for direct adapter usage with optional built-in routes (`/api/auth/refresh`, `/api/auth/logout`)
|
|
314
321
|
- Add `AuthContext` discriminated union (`NativeAuthContext | AdapterAuthContext`) for type-safe auth mode handling
|
|
@@ -316,20 +323,24 @@
|
|
|
316
323
|
- Add shared decoration utilities (`decorateAuth`, `setRequestAuth`, `checkDoubleRegistration`)
|
|
317
324
|
|
|
318
325
|
**Architecture Changes:**
|
|
326
|
+
|
|
319
327
|
- `authPlugin` now uses `JwtAdapter` internally - all authentication flows through the adapter pattern
|
|
320
328
|
- Single code path for authentication (no more dual native/adapter modes)
|
|
321
329
|
- `authContext.authMode` is now always `'adapter'` with `providerId='jwt'` when using `authPlugin`
|
|
322
330
|
|
|
323
331
|
**Breaking Changes:**
|
|
332
|
+
|
|
324
333
|
- Remove deprecated `LegacySessionConfig` interface (use `sessionMiddleware` instead)
|
|
325
334
|
- Remove deprecated `session` field from `AuthConfig`
|
|
326
335
|
- `User` interface no longer has index signature (extend via declaration merging)
|
|
327
336
|
|
|
328
337
|
**Type Safety Improvements:**
|
|
338
|
+
|
|
329
339
|
- `AuthContext` discriminated union enables exhaustive type narrowing based on `authMode`
|
|
330
340
|
- Export `NativeAuthContext` and `AdapterAuthContext` types for explicit typing
|
|
331
341
|
|
|
332
342
|
**Migration:**
|
|
343
|
+
|
|
333
344
|
- Existing `authPlugin` usage remains backward-compatible
|
|
334
345
|
- If checking `authContext.token`, use `authContext.session` instead (token stored in session for adapter mode)
|
|
335
346
|
|
|
@@ -344,10 +355,12 @@
|
|
|
344
355
|
Addresses 9 user feedback items to improve DX, reduce boilerplate, and eliminate template duplications.
|
|
345
356
|
|
|
346
357
|
### Phase 1: Validation Helpers (`@veloxts/validation`)
|
|
358
|
+
|
|
347
359
|
- Add `prismaDecimal()`, `prismaDecimalNullable()`, `prismaDecimalOptional()` for Prisma Decimal → number conversion
|
|
348
360
|
- Add `dateToIso`, `dateToIsoNullable`, `dateToIsoOptional` aliases for consistency
|
|
349
361
|
|
|
350
362
|
### Phase 2: Template Deduplication (`@veloxts/auth`)
|
|
363
|
+
|
|
351
364
|
- Export `createEnhancedTokenStore()` with token revocation and refresh token reuse detection
|
|
352
365
|
- Export `parseUserRoles()` and `DEFAULT_ALLOWED_ROLES`
|
|
353
366
|
- Fix memory leak: track pending timeouts for proper cleanup on `destroy()`
|
|
@@ -355,17 +368,20 @@
|
|
|
355
368
|
- Fix jwtManager singleton pattern in templates
|
|
356
369
|
|
|
357
370
|
### Phase 3: Router Helpers (`@veloxts/router`)
|
|
371
|
+
|
|
358
372
|
- Add `createRouter()` returning `{ collections, router }` for DRY setup
|
|
359
373
|
- Add `toRouter()` for router-only use cases
|
|
360
374
|
- Update all router templates to use `createRouter()`
|
|
361
375
|
|
|
362
376
|
### Phase 4: Guard Type Narrowing - Experimental (`@veloxts/auth`, `@veloxts/router`)
|
|
377
|
+
|
|
363
378
|
- Add `NarrowingGuard` interface with phantom `_narrows` type
|
|
364
379
|
- Add `authenticatedNarrow` and `hasRoleNarrow()` guards
|
|
365
380
|
- Add `guardNarrow()` method to `ProcedureBuilder` for context narrowing
|
|
366
381
|
- Enables `ctx.user` to be non-null after guard passes
|
|
367
382
|
|
|
368
383
|
### Phase 5: Documentation (`@veloxts/router`)
|
|
384
|
+
|
|
369
385
|
- Document `.rest()` override patterns
|
|
370
386
|
- Document `createRouter()` helper usage
|
|
371
387
|
- Document `guardNarrow()` experimental API
|
|
@@ -175,7 +175,7 @@ export function applyPlaceholdersToJson(content, config) {
|
|
|
175
175
|
return applyPlaceholders(jsonString, config);
|
|
176
176
|
}
|
|
177
177
|
// Database adapter versions
|
|
178
|
-
const PRISMA_VERSION = '7.
|
|
178
|
+
const PRISMA_VERSION = '7.8.0';
|
|
179
179
|
const PG_VERSION = '8.16.0';
|
|
180
180
|
/**
|
|
181
181
|
* Apply database-specific dependency modifications to package.json content.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-velox-app",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "Project scaffolder for VeloxTS framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -23,16 +23,16 @@
|
|
|
23
23
|
"CHANGELOG.md"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@clack/prompts": "1.
|
|
27
|
-
"ora": "9.
|
|
26
|
+
"@clack/prompts": "1.2.0",
|
|
27
|
+
"ora": "9.4.0",
|
|
28
28
|
"picocolors": "1.1.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@playwright/test": "1.
|
|
32
|
-
"@types/node": "25.
|
|
33
|
-
"@vitest/coverage-v8": "4.1.
|
|
31
|
+
"@playwright/test": "1.59.1",
|
|
32
|
+
"@types/node": "25.6.0",
|
|
33
|
+
"@vitest/coverage-v8": "4.1.5",
|
|
34
34
|
"typescript": "5.9.3",
|
|
35
|
-
"vitest": "4.1.
|
|
35
|
+
"vitest": "4.1.5"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"velox",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"postinstall": "prisma generate"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@prisma/adapter-better-sqlite3": "7.
|
|
22
|
-
"@prisma/client": "7.
|
|
23
|
-
"@prisma/client-runtime-utils": "7.
|
|
21
|
+
"@prisma/adapter-better-sqlite3": "7.8.0",
|
|
22
|
+
"@prisma/client": "7.8.0",
|
|
23
|
+
"@prisma/client-runtime-utils": "7.8.0",
|
|
24
24
|
"@veloxts/auth": "__VELOXTS_VERSION__",
|
|
25
25
|
"@veloxts/core": "__VELOXTS_VERSION__",
|
|
26
26
|
"@veloxts/velox": "__VELOXTS_VERSION__",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@types/bcrypt": "6.0.0",
|
|
35
35
|
"@types/node": "25.5.0",
|
|
36
36
|
"hot-hook": "0.4.0",
|
|
37
|
-
"prisma": "7.
|
|
37
|
+
"prisma": "7.8.0",
|
|
38
38
|
"tsup": "8.5.1",
|
|
39
39
|
"tsx": "4.21.0",
|
|
40
40
|
"typescript": "5.9.3"
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"postinstall": "prisma generate"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@prisma/adapter-better-sqlite3": "7.
|
|
22
|
-
"@prisma/client": "7.
|
|
23
|
-
"@prisma/client-runtime-utils": "7.
|
|
21
|
+
"@prisma/adapter-better-sqlite3": "7.8.0",
|
|
22
|
+
"@prisma/client": "7.8.0",
|
|
23
|
+
"@prisma/client-runtime-utils": "7.8.0",
|
|
24
24
|
"@veloxts/core": "__VELOXTS_VERSION__",
|
|
25
25
|
"@veloxts/velox": "__VELOXTS_VERSION__",
|
|
26
26
|
"better-sqlite3": "12.8.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "25.5.0",
|
|
33
33
|
"hot-hook": "0.4.0",
|
|
34
|
-
"prisma": "7.
|
|
34
|
+
"prisma": "7.8.0",
|
|
35
35
|
"tsup": "8.5.1",
|
|
36
36
|
"tsx": "4.21.0",
|
|
37
37
|
"typescript": "5.9.3"
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
"postinstall": "prisma generate"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@prisma/adapter-better-sqlite3": "7.
|
|
22
|
-
"@prisma/client": "7.
|
|
23
|
-
"@prisma/client-runtime-utils": "7.
|
|
21
|
+
"@prisma/adapter-better-sqlite3": "7.8.0",
|
|
22
|
+
"@prisma/client": "7.8.0",
|
|
23
|
+
"@prisma/client-runtime-utils": "7.8.0",
|
|
24
24
|
"@trpc/server": "11.12.0",
|
|
25
25
|
"@veloxts/core": "__VELOXTS_VERSION__",
|
|
26
26
|
"@veloxts/velox": "__VELOXTS_VERSION__",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/node": "25.5.0",
|
|
34
34
|
"hot-hook": "0.4.0",
|
|
35
|
-
"prisma": "7.
|
|
35
|
+
"prisma": "7.8.0",
|
|
36
36
|
"tsup": "8.5.1",
|
|
37
37
|
"tsx": "4.21.0",
|
|
38
38
|
"typescript": "5.9.3"
|
|
@@ -147,7 +147,7 @@ export const authProcedures = procedures('auth', {
|
|
|
147
147
|
const hashToVerify = user?.password || DUMMY_HASH;
|
|
148
148
|
const isValid = await verifyPassword(input.password, hashToVerify);
|
|
149
149
|
|
|
150
|
-
if (!user
|
|
150
|
+
if (!user?.password || !isValid) {
|
|
151
151
|
throw new AuthError('Invalid email or password', 401, 'INVALID_CREDENTIALS');
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"db:studio": "__WS_API__ db:studio"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@prisma/client-runtime-utils": "7.
|
|
20
|
+
"@prisma/client-runtime-utils": "7.8.0",
|
|
21
21
|
"@veloxts/velox": "__VELOXTS_VERSION__"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@types/node": "25.
|
|
24
|
+
"@types/node": "25.6.0",
|
|
25
25
|
"@veloxts/cli": "__VELOXTS_VERSION__",
|
|
26
26
|
"@veloxts/mcp": "__VELOXTS_VERSION__",
|
|
27
27
|
"tsx": "4.21.0",
|
|
@@ -17,29 +17,29 @@
|
|
|
17
17
|
"lint:client": "./scripts/check-client-imports.sh"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@prisma/adapter-better-sqlite3": "7.
|
|
21
|
-
"@prisma/client": "7.
|
|
22
|
-
"@prisma/client-runtime-utils": "7.
|
|
23
|
-
"better-sqlite3": "12.
|
|
20
|
+
"@prisma/adapter-better-sqlite3": "7.8.0",
|
|
21
|
+
"@prisma/client": "7.8.0",
|
|
22
|
+
"@prisma/client-runtime-utils": "7.8.0",
|
|
23
|
+
"better-sqlite3": "12.9.0",
|
|
24
24
|
"@veloxts/core": "__VELOXTS_VERSION__",
|
|
25
25
|
"@veloxts/orm": "__VELOXTS_VERSION__",
|
|
26
26
|
"@veloxts/router": "__VELOXTS_VERSION__",
|
|
27
27
|
"@veloxts/validation": "__VELOXTS_VERSION__",
|
|
28
28
|
"@veloxts/web": "__VELOXTS_VERSION__",
|
|
29
29
|
"@vinxi/server-functions": "0.5.1",
|
|
30
|
-
"dotenv": "17.
|
|
31
|
-
"react": "19.2.
|
|
32
|
-
"react-dom": "19.2.
|
|
30
|
+
"dotenv": "17.4.2",
|
|
31
|
+
"react": "19.2.5",
|
|
32
|
+
"react-dom": "19.2.5",
|
|
33
33
|
"vinxi": "0.5.11",
|
|
34
34
|
"zod": "4.3.6"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "25.
|
|
37
|
+
"@types/node": "25.6.0",
|
|
38
38
|
"@types/react": "19.2.14",
|
|
39
39
|
"@types/react-dom": "19.2.3",
|
|
40
40
|
"@veloxts/cli": "__VELOXTS_VERSION__",
|
|
41
41
|
"@veloxts/mcp": "__VELOXTS_VERSION__",
|
|
42
|
-
"prisma": "7.
|
|
42
|
+
"prisma": "7.8.0",
|
|
43
43
|
"typescript": "5.9.3"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"lint:client": "./scripts/check-client-imports.sh"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@prisma/adapter-better-sqlite3": "7.
|
|
21
|
-
"@prisma/client": "7.
|
|
22
|
-
"@prisma/client-runtime-utils": "7.
|
|
23
|
-
"better-sqlite3": "12.
|
|
20
|
+
"@prisma/adapter-better-sqlite3": "7.8.0",
|
|
21
|
+
"@prisma/client": "7.8.0",
|
|
22
|
+
"@prisma/client-runtime-utils": "7.8.0",
|
|
23
|
+
"better-sqlite3": "12.9.0",
|
|
24
24
|
"@veloxts/auth": "__VELOXTS_VERSION__",
|
|
25
25
|
"@veloxts/core": "__VELOXTS_VERSION__",
|
|
26
26
|
"@veloxts/orm": "__VELOXTS_VERSION__",
|
|
@@ -29,20 +29,20 @@
|
|
|
29
29
|
"@veloxts/web": "__VELOXTS_VERSION__",
|
|
30
30
|
"@vinxi/server-functions": "0.5.1",
|
|
31
31
|
"bcrypt": "6.0.0",
|
|
32
|
-
"dotenv": "17.
|
|
33
|
-
"react": "19.2.
|
|
34
|
-
"react-dom": "19.2.
|
|
32
|
+
"dotenv": "17.4.2",
|
|
33
|
+
"react": "19.2.5",
|
|
34
|
+
"react-dom": "19.2.5",
|
|
35
35
|
"vinxi": "0.5.11",
|
|
36
36
|
"zod": "4.3.6"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/bcrypt": "6.0.0",
|
|
40
|
-
"@types/node": "25.
|
|
40
|
+
"@types/node": "25.6.0",
|
|
41
41
|
"@types/react": "19.2.14",
|
|
42
42
|
"@types/react-dom": "19.2.3",
|
|
43
43
|
"@veloxts/cli": "__VELOXTS_VERSION__",
|
|
44
44
|
"@veloxts/mcp": "__VELOXTS_VERSION__",
|
|
45
|
-
"prisma": "7.
|
|
45
|
+
"prisma": "7.8.0",
|
|
46
46
|
"typescript": "5.9.3"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -146,7 +146,7 @@ export const authProcedures = procedures('auth', {
|
|
|
146
146
|
const hashToVerify = user?.password || DUMMY_HASH;
|
|
147
147
|
const isValid = await verifyPassword(input.password, hashToVerify);
|
|
148
148
|
|
|
149
|
-
if (!user
|
|
149
|
+
if (!user?.password || !isValid) {
|
|
150
150
|
throw new AuthError('Invalid email or password', 401, 'INVALID_CREDENTIALS');
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -10,20 +10,20 @@
|
|
|
10
10
|
"type-check": "tsc --noEmit"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@tanstack/react-query": "5.
|
|
14
|
-
"@tanstack/react-router": "1.
|
|
13
|
+
"@tanstack/react-query": "5.100.3",
|
|
14
|
+
"@tanstack/react-router": "1.168.24",
|
|
15
15
|
"@veloxts/client": "__VELOXTS_VERSION__",
|
|
16
|
-
"react": "19.2.
|
|
17
|
-
"react-dom": "19.2.
|
|
16
|
+
"react": "19.2.5",
|
|
17
|
+
"react-dom": "19.2.5",
|
|
18
18
|
"react-error-boundary": "6.1.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@tanstack/router-plugin": "1.
|
|
22
|
-
"@types/node": "25.
|
|
21
|
+
"@tanstack/router-plugin": "1.167.26",
|
|
22
|
+
"@types/node": "25.6.0",
|
|
23
23
|
"@types/react": "19.2.14",
|
|
24
24
|
"@types/react-dom": "19.2.3",
|
|
25
25
|
"@vitejs/plugin-react": "5.2.0",
|
|
26
26
|
"typescript": "5.9.3",
|
|
27
|
-
"vite": "7.3.
|
|
27
|
+
"vite": "7.3.2"
|
|
28
28
|
}
|
|
29
29
|
}
|