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 +6 -0
- package/dist/templates/auth.js +1 -1
- package/dist/templates/spa.js +1 -1
- package/dist/templates/trpc.js +3 -3
- package/package.json +1 -1
- package/src/templates/source/api/package.trpc.json +43 -0
- package/src/templates/source/api/types.default.ts +25 -0
- /package/src/templates/source/api/{types.ts → types.auth.ts} +0 -0
package/CHANGELOG.md
CHANGED
package/dist/templates/auth.js
CHANGED
|
@@ -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);
|
package/dist/templates/spa.js
CHANGED
|
@@ -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);
|
package/dist/templates/trpc.js
CHANGED
|
@@ -19,8 +19,8 @@ import { generateRootFiles, generateWebBaseFiles, generateWebStyleFiles } from '
|
|
|
19
19
|
// API Template Compilation
|
|
20
20
|
// ============================================================================
|
|
21
21
|
function generateApiPackageJson(config) {
|
|
22
|
-
//
|
|
23
|
-
const content = compileTemplate('api/package.
|
|
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
|
@@ -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
|
+
}
|
|
File without changes
|