-
-
Notifications
You must be signed in to change notification settings - Fork 3
feat: depricate cheriot, upgrade merino to Nuxt 4 #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
633bc56
d10230a
bb7a3ce
df14619
a43106a
3d10405
4f803b6
68aa5fb
5285db5
8cc7c96
e124446
8c88fe8
b61cfea
87f6d81
8210dca
51360a7
1d5d728
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,8 +6,10 @@ const prismaRootSchema = `// This is your Prisma schema file, | |
| // learn more about it in the docs: https://pris.ly/d/prisma-schema | ||
|
|
||
| generator client { | ||
| provider = "prisma-client-js" | ||
| previewFeatures = ["prismaSchemaFolder"] | ||
| provider = "prisma-client" | ||
| output = "./client" | ||
|
|
||
| engineType = "library" | ||
zoey-kaiser marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| datasource db { | ||
|
|
@@ -21,9 +23,8 @@ datasource db { | |
| // This is required for development only. | ||
| shadowDatabaseUrl = "postgres://postgres@localhost/prisma-shadow?pgbouncer=true&connection_limit=1" | ||
| } | ||
| ` | ||
|
|
||
| const prismaExampleSchema = `model Example { | ||
| model Example { | ||
| id String @id @default(uuid()) | ||
| details String | ||
| } | ||
|
|
@@ -49,7 +50,8 @@ const prismaExampleEndpoint = `/** | |
| export default defineEventHandler(event => event.context.prisma.example.findMany()) | ||
| ` | ||
|
|
||
| const prismaServerMiddleware = `import { PrismaClient } from '@prisma/client' | ||
| const prismaServerMiddleware = `import { PrismaPg } from '@prisma/adapter-pg' | ||
| import { PrismaClient } from '~~/prisma/client/client' | ||
|
|
||
| let prisma: PrismaClient | ||
|
|
||
|
|
@@ -61,7 +63,8 @@ declare module 'h3' { | |
|
|
||
| export default eventHandler((event) => { | ||
| if (!prisma) { | ||
| prisma = new PrismaClient() | ||
| const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL }) | ||
| prisma = new PrismaClient({ adapter }) | ||
| } | ||
| event.context.prisma = prisma | ||
| }) | ||
|
|
@@ -166,33 +169,33 @@ const prisma: ModuleConfig = { | |
| scripts: [ | ||
| { | ||
| name: 'db', | ||
| command: 'vite-node prisma/pglite.ts', | ||
| command: 'node prisma/pglite.ts', | ||
| } | ||
| ], | ||
| dependencies: [ | ||
| { | ||
| name: 'prisma', | ||
| version: '^5.22.0', | ||
| version: '^6.16.3', | ||
zoey-kaiser marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| isDev: true | ||
| }, | ||
| { | ||
| name: '@prisma/client', | ||
| version: '^5.22.0', | ||
| version: '^6.16.3', | ||
| isDev: false | ||
| }, | ||
| { | ||
| name: '@prisma/adapter-pg', | ||
| version: '^6.16.3', | ||
| isDev: false, | ||
| }, | ||
| { | ||
| name: '@electric-sql/pglite', | ||
| version: '0.2.13', | ||
| isDev: true, | ||
| }, | ||
| { | ||
| name: 'pg-gateway', | ||
| version: '0.3.0-beta.3', | ||
| isDev: true, | ||
| }, | ||
| { | ||
| name: 'vite-node', | ||
| version: '^2.1.5', | ||
| version: '0.3.0-beta.4', | ||
|
||
| isDev: true, | ||
| } | ||
| ], | ||
|
|
@@ -203,13 +206,9 @@ const prisma: ModuleConfig = { | |
| content: prismaEnvFile | ||
| }, | ||
| { | ||
| path: 'prisma/schema/schema.prisma', | ||
| path: 'prisma/schema.prisma', | ||
| content: prismaRootSchema | ||
| }, | ||
| { | ||
| path: 'prisma/schema/example.prisma', | ||
| content: prismaExampleSchema | ||
| }, | ||
| { | ||
| path: 'server/api/examples.get.ts', | ||
| content: prismaExampleEndpoint | ||
|
|
@@ -219,7 +218,7 @@ const prisma: ModuleConfig = { | |
| content: prismaServerMiddleware | ||
| }, | ||
| { | ||
| path: 'components/Welcome/PrismaDemo.vue', | ||
| path: 'app/components/Welcome/PrismaDemo.vue', | ||
| content: prismaDemoComponent, | ||
| }, | ||
| { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.