create-velox-app 0.6.102 → 0.6.104

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # create-velox-app
2
2
 
3
+ ## 0.6.104
4
+
5
+ ### Patch Changes
6
+
7
+ - feat(client): smart convention-based route inference, eliminate routes.ts
8
+
9
+ ## 0.6.103
10
+
11
+ ### Patch Changes
12
+
13
+ - chore(deps): upgrade Zod from v3 to v4
14
+
3
15
  ## 0.6.102
4
16
 
5
17
  ### Patch Changes
@@ -50,9 +50,6 @@ function generateIndexTs() {
50
50
  function generateRouterTs() {
51
51
  return compileTemplate('api/router.auth.ts', AUTH_CONFIG);
52
52
  }
53
- function generateRoutesTs() {
54
- return compileTemplate('api/routes.auth.ts', AUTH_CONFIG);
55
- }
56
53
  function generateConfigDatabase(config) {
57
54
  return compileTemplate('api/config/database.ts', config);
58
55
  }
@@ -96,7 +93,6 @@ export function generateAuthTemplate(config) {
96
93
  { path: 'apps/api/prisma/schema.prisma', content: generatePrismaSchema(config) },
97
94
  // API Source files
98
95
  { path: 'apps/api/src/router.ts', content: generateRouterTs() },
99
- { path: 'apps/api/src/routes.ts', content: generateRoutesTs() },
100
96
  { path: 'apps/api/src/index.ts', content: generateIndexTs() },
101
97
  { path: 'apps/api/src/config/app.ts', content: generateConfigApp(config) },
102
98
  { path: 'apps/api/src/config/auth.ts', content: generateAuthConfig() },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-velox-app",
3
- "version": "0.6.102",
3
+ "version": "0.6.104",
4
4
  "description": "Project scaffolder for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "better-sqlite3": "12.6.2",
29
29
  "dotenv": "17.2.3",
30
30
  "file-uri-to-path": "2.0.0",
31
- "zod": "3.25.76"
31
+ "zod": "4.3.6"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/bcrypt": "6.0.0",
@@ -26,7 +26,7 @@
26
26
  "better-sqlite3": "12.6.2",
27
27
  "dotenv": "17.2.3",
28
28
  "file-uri-to-path": "2.0.0",
29
- "zod": "3.25.76"
29
+ "zod": "4.3.6"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "25.1.0",
@@ -27,7 +27,7 @@
27
27
  "better-sqlite3": "12.6.2",
28
28
  "dotenv": "17.2.3",
29
29
  "file-uri-to-path": "2.0.0",
30
- "zod": "3.25.76"
30
+ "zod": "4.3.6"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "25.1.0",
@@ -71,7 +71,7 @@ export const userProcedures = procedures('users', {
71
71
 
72
72
  updateUser: procedure()
73
73
  .guard(authenticated)
74
- .input(z.object({ id: z.string().uuid() }).merge(UpdateUserInput))
74
+ .input(z.object({ id: z.string().uuid() }).extend(UpdateUserInput.shape))
75
75
  .output(UserSchema)
76
76
  .mutation(async ({ input, ctx }) => {
77
77
  const { id, ...data } = input;
@@ -92,7 +92,7 @@ export const userProcedures = procedures('users', {
92
92
 
93
93
  patchUser: procedure()
94
94
  .guard(authenticated)
95
- .input(z.object({ id: z.string().uuid() }).merge(UpdateUserInput))
95
+ .input(z.object({ id: z.string().uuid() }).extend(UpdateUserInput.shape))
96
96
  .output(UserSchema)
97
97
  .mutation(async ({ input, ctx }) => {
98
98
  const { id, ...data } = input;
@@ -54,7 +54,7 @@ export const userProcedures = procedures('users', {
54
54
  }),
55
55
 
56
56
  updateUser: procedure()
57
- .input(z.object({ id: z.string().uuid() }).merge(UpdateUserInput))
57
+ .input(z.object({ id: z.string().uuid() }).extend(UpdateUserInput.shape))
58
58
  .output(UserSchema)
59
59
  .mutation(async ({ input, ctx }) => {
60
60
  const { id, ...data } = input;
@@ -62,7 +62,7 @@ export const userProcedures = procedures('users', {
62
62
  }),
63
63
 
64
64
  patchUser: procedure()
65
- .input(z.object({ id: z.string().uuid() }).merge(UpdateUserInput))
65
+ .input(z.object({ id: z.string().uuid() }).extend(UpdateUserInput.shape))
66
66
  .output(UserSchema)
67
67
  .mutation(async ({ input, ctx }) => {
68
68
  const { id, ...data } = input;
@@ -31,7 +31,7 @@
31
31
  "react": "19.2.4",
32
32
  "react-dom": "19.2.4",
33
33
  "vinxi": "0.5.11",
34
- "zod": "3.25.76"
34
+ "zod": "4.3.6"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "25.1.0",
@@ -33,7 +33,7 @@
33
33
  "react": "19.2.4",
34
34
  "react-dom": "19.2.4",
35
35
  "vinxi": "0.5.11",
36
- "zod": "3.25.76"
36
+ "zod": "4.3.6"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/bcrypt": "6.0.0",
@@ -8,10 +8,8 @@ import './styles/global.css';
8
8
 
9
9
  // Import router type (type-only import is erased at compile time)
10
10
  import type { AppRouter } from '../../api/src/router.js';
11
- /* @if auth */
12
- // Import routes from browser-safe routes file (no server-side code)
13
- import { routes } from '../../api/src/routes.js';
14
11
 
12
+ /* @if auth */
15
13
  /* @endif auth */
16
14
 
17
15
  // Create router with route tree
@@ -82,7 +80,13 @@ createRoot(rootElement).render(
82
80
  config={{
83
81
  baseUrl: '/api',
84
82
  headers: getAuthHeaders,
85
- routes,
83
+ // Routes are inferred from procedure naming conventions.
84
+ // Only add routes for procedures with .rest() overrides:
85
+ // routes: {
86
+ // auth: {
87
+ // createSession: { method: 'POST', path: '/auth/login', kind: 'mutation' },
88
+ // },
89
+ // },
86
90
  onUnauthorized: handleUnauthorized,
87
91
  }}
88
92
  >
@@ -1,41 +0,0 @@
1
- /**
2
- * Browser-Safe Route Definitions
3
- *
4
- * This file exports route metadata that can be safely imported by frontend code.
5
- * It does NOT import any server-side modules like procedures or database clients.
6
- *
7
- * IMPORTANT: Keep this file browser-safe - no Node.js imports or side effects.
8
- */
9
-
10
- import type { RouteMap } from '@veloxts/velox';
11
-
12
- /**
13
- * Route mappings for the VeloxTS client
14
- *
15
- * Maps namespace -> procedure -> { method, path, kind }
16
- * These must match the actual procedure definitions in ./procedures/
17
- */
18
- export const routes: RouteMap = {
19
- health: {
20
- getHealth: { method: 'GET', path: '/health', kind: 'query' },
21
- },
22
- auth: {
23
- createAccount: { method: 'POST', path: '/auth/register', kind: 'mutation' },
24
- createSession: { method: 'POST', path: '/auth/login', kind: 'mutation' },
25
- createRefresh: { method: 'POST', path: '/auth/refresh', kind: 'mutation' },
26
- deleteSession: { method: 'POST', path: '/auth/logout', kind: 'mutation' },
27
- getMe: { method: 'GET', path: '/auth/me', kind: 'query' },
28
- },
29
- users: {
30
- listUsers: { method: 'GET', path: '/users', kind: 'query' },
31
- getUser: { method: 'GET', path: '/users/:id', kind: 'query' },
32
- createUser: { method: 'POST', path: '/users', kind: 'mutation' },
33
- updateUser: { method: 'PUT', path: '/users/:id', kind: 'mutation' },
34
- patchUser: { method: 'PATCH', path: '/users/:id', kind: 'mutation' },
35
- deleteUser: { method: 'DELETE', path: '/users/:id', kind: 'mutation' },
36
- },
37
- profiles: {
38
- getProfile: { method: 'GET', path: '/profiles/:id', kind: 'query' },
39
- getFullProfile: { method: 'GET', path: '/profiles/:id/full', kind: 'query' },
40
- },
41
- };