chore: update @prisma/client to version 7.10.0 and add prisma.config.ts for configuration management

- Updated @prisma/client in shared package.json from ^6.0.0 to ^7.10.0.
- Modified stack.md to include generated Prisma client directory and Prisma CLI config file.
- Added prisma.config.ts for managing Prisma configuration, including datasource URL and migrations path.
This commit is contained in:
Jose Selesan
2026-09-04 18:50:02 -03:00
parent dfa7f73ebb
commit 1ec6200ffa
10 changed files with 292 additions and 39 deletions

View File

@@ -16,13 +16,14 @@
"dependencies": {
"@gruperly/shared": "workspace:*",
"@hono/zod-validator": "^0.8.0",
"@prisma/adapter-pg": "^7.10.0",
"@prisma/client": "^7.10.0",
"better-auth": "^1.1.0",
"hono": "^4.6.0"
},
"devDependencies": {
"@types/bun": "^1.0.0",
"prisma": "^6.0.0",
"@prisma/client": "^6.0.0",
"prisma": "^7.10.0",
"typescript": "^5.7.0"
}
}

15
apps/api/prisma.config.ts Normal file
View File

@@ -0,0 +1,15 @@
import { config } from 'dotenv'
import { join } from 'node:path'
import { defineConfig, env } from 'prisma/config'
config({ path: join(process.cwd(), '.env') })
export default defineConfig({
schema: 'prisma/schema.prisma',
migrations: {
path: 'prisma/migrations',
},
datasource: {
url: env('DATABASE_URL'),
},
})

View File

@@ -1,12 +1,12 @@
// Gruperly - Prisma Schema (PostgreSQL)
generator client {
provider = "prisma-client-js"
provider = "prisma-client"
output = "./generated/prisma"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
// Auth (Better Auth) - required tables

View File

@@ -1,3 +1,8 @@
import { PrismaClient } from '@prisma/client'
import { PrismaClient } from '../../prisma/generated/prisma/client'
import { PrismaPg } from '@prisma/adapter-pg'
export const prisma = new PrismaClient()
const adapter = new PrismaPg({
connectionString: process.env.DATABASE_URL!,
})
export const prisma = new PrismaClient({ adapter })

View File

@@ -7,5 +7,5 @@
"@gruperly/shared": ["../../packages/shared/src/index.ts"]
}
},
"include": ["src/**/*.ts"]
"include": ["src/**/*.ts", "prisma/generated/**/*.ts"]
}