create-velox-app 0.6.93 → 0.6.94

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,11 @@
1
1
  # create-velox-app
2
2
 
3
+ ## 0.6.94
4
+
5
+ ### Patch Changes
6
+
7
+ - feat(client): add tRPC router type support for ClientFromRouter and VeloxHooks
8
+
3
9
  ## 0.6.93
4
10
 
5
11
  ### Patch Changes
@@ -69,7 +69,7 @@ function generateHealthSchema() {
69
69
  return compileTemplate('api/schemas/health.ts', AUTH_CONFIG);
70
70
  }
71
71
  function generateApiTypesTs() {
72
- return compileTemplate('api/types.ts', AUTH_CONFIG);
72
+ return compileTemplate('api/types.auth.ts', AUTH_CONFIG);
73
73
  }
74
74
  function generateAuthUtils() {
75
75
  return compileTemplate('api/utils/auth.ts', AUTH_CONFIG);
@@ -57,7 +57,7 @@ function generateHealthSchema() {
57
57
  return compileTemplate('api/schemas/health.ts', DEFAULT_CONFIG);
58
58
  }
59
59
  function generateApiTypesTs() {
60
- return compileTemplate('api/types.ts', DEFAULT_CONFIG);
60
+ return compileTemplate('api/types.default.ts', DEFAULT_CONFIG);
61
61
  }
62
62
  function generateDockerCompose(config) {
63
63
  return compileTemplate('api/docker-compose.yml', config);
@@ -19,8 +19,8 @@ import { generateRootFiles, generateWebBaseFiles, generateWebStyleFiles } from '
19
19
  // API Template Compilation
20
20
  // ============================================================================
21
21
  function generateApiPackageJson(config) {
22
- // Reuse default package.json - @veloxts/velox already includes tRPC utilities
23
- const content = compileTemplate('api/package.default.json', config);
22
+ // Use tRPC package.json with @trpc/server for TypeScript type portability
23
+ const content = compileTemplate('api/package.trpc.json', config);
24
24
  return applyDatabaseDependencies(content, config);
25
25
  }
26
26
  function generateApiTsConfig() {
@@ -67,7 +67,7 @@ function generateHealthSchema() {
67
67
  return compileTemplate('api/schemas/health.ts', DEFAULT_CONFIG);
68
68
  }
69
69
  function generateApiTypesTs() {
70
- return compileTemplate('api/types.ts', DEFAULT_CONFIG);
70
+ return compileTemplate('api/types.default.ts', DEFAULT_CONFIG);
71
71
  }
72
72
  function generateDockerCompose(config) {
73
73
  return compileTemplate('api/docker-compose.yml', config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-velox-app",
3
- "version": "0.6.93",
3
+ "version": "0.6.94",
4
4
  "description": "Project scaffolder for VeloxTS framework",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "api",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "scripts": {
8
+ "build": "tsup",
9
+ "start": "node dist/index.js",
10
+ "dev": "tsx watch src/index.ts",
11
+ "dev:hmr": "velox dev --hmr",
12
+ "type-check": "prisma generate && tsc --noEmit",
13
+ "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true});require('fs').rmSync('tsconfig.tsbuildinfo',{force:true})\"",
14
+ "db:generate": "prisma generate",
15
+ "db:push": "prisma db push",
16
+ "db:seed": "prisma db seed",
17
+ "db:studio": "prisma studio",
18
+ "postinstall": "prisma generate"
19
+ },
20
+ "dependencies": {
21
+ "@prisma/adapter-better-sqlite3": "7.3.0",
22
+ "@prisma/client": "7.3.0",
23
+ "@prisma/client-runtime-utils": "7.3.0",
24
+ "@trpc/server": "11.9.0",
25
+ "@veloxts/core": "__VELOXTS_VERSION__",
26
+ "@veloxts/velox": "__VELOXTS_VERSION__",
27
+ "better-sqlite3": "12.6.2",
28
+ "dotenv": "17.2.3",
29
+ "file-uri-to-path": "2.0.0",
30
+ "zod": "3.25.76"
31
+ },
32
+ "devDependencies": {
33
+ "@types/node": "25.1.0",
34
+ "hot-hook": "0.4.0",
35
+ "prisma": "7.3.0",
36
+ "tsup": "8.5.1",
37
+ "tsx": "4.21.0",
38
+ "typescript": "5.9.3"
39
+ },
40
+ "hotHook": {
41
+ "boundaries": ["./src/procedures/**/*.ts", "./src/schemas/**/*.ts", "./src/handlers/**/*.ts"]
42
+ }
43
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Type declarations for VeloxTS application
3
+ *
4
+ * This file uses declaration merging to extend the framework's base types
5
+ * with application-specific properties:
6
+ *
7
+ * - `ctx.db`: Typed PrismaClient for database access in procedure handlers
8
+ *
9
+ * IMPORTANT: This file must be imported (side-effect import) in your entry
10
+ * point to ensure the declaration merging is processed by TypeScript.
11
+ *
12
+ * @example
13
+ * ```typescript
14
+ * // In your index.ts entry point:
15
+ * import './types.js'; // Side-effect import for declaration merging
16
+ * ```
17
+ */
18
+
19
+ import type { PrismaClient } from '@prisma/client';
20
+
21
+ declare module '@veloxts/core' {
22
+ interface BaseContext {
23
+ db: PrismaClient;
24
+ }
25
+ }