From f8600e929003b6ed238fa790165116beee4c7c96 Mon Sep 17 00:00:00 2001 From: Daniel Cousens <413395+dcousens@users.noreply.github.com> Date: Tue, 20 Aug 2024 15:56:26 +1000 Subject: [PATCH] fix example prisma paths --- examples/assets-local/keystone.ts | 3 +- examples/assets-local/schema.prisma | 2 +- examples/assets-s3/keystone.ts | 3 +- examples/assets-s3/schema.prisma | 2 +- examples/auth/keystone.ts | 3 +- examples/auth/schema.prisma | 2 +- examples/cloudinary/keystone.ts | 3 +- examples/cloudinary/schema.prisma | 2 +- examples/custom-admin-ui-logo/keystone.ts | 3 +- examples/custom-admin-ui-logo/schema.prisma | 2 +- .../custom-admin-ui-navigation/keystone.ts | 3 +- .../custom-admin-ui-navigation/schema.prisma | 2 +- examples/custom-admin-ui-pages/keystone.ts | 3 +- examples/custom-admin-ui-pages/schema.prisma | 2 +- examples/custom-esbuild/keystone.ts | 3 +- examples/custom-esbuild/schema.prisma | 2 +- examples/custom-field-view/keystone.ts | 3 +- examples/custom-field-view/schema.prisma | 2 +- examples/custom-field/keystone.ts | 3 +- examples/custom-field/schema.prisma | 2 +- examples/custom-id/keystone.ts | 3 +- examples/custom-id/schema.prisma | 2 +- .../custom-session-invalidation/keystone.ts | 3 +- .../custom-session-invalidation/schema.prisma | 2 +- examples/custom-session-jwt/keystone.ts | 3 +- examples/custom-session-jwt/schema.prisma | 2 +- examples/custom-session-next-auth/keystone.ts | 3 +- .../custom-session-next-auth/schema.prisma | 2 +- examples/custom-session-next-auth/session.ts | 2 +- examples/custom-session-passport/auth.ts | 2 +- examples/custom-session-passport/keystone.ts | 3 +- .../custom-session-passport/schema.prisma | 2 +- examples/custom-session-redis/keystone.ts | 3 +- examples/custom-session-redis/schema.prisma | 2 +- examples/custom-session/keystone.ts | 3 +- examples/custom-session/schema.prisma | 2 +- examples/default-values/keystone.ts | 3 +- examples/default-values/schema.prisma | 2 +- .../keystone-server/keystone.ts | 3 +- .../keystone-server/schema.prisma | 2 +- examples/document-field/keystone.ts | 3 +- examples/document-field/schema.prisma | 2 +- examples/empty-lists/keystone.ts | 3 +- examples/empty-lists/schema.prisma | 2 +- examples/example-utils.ts | 10 ----- examples/extend-express-app/keystone.ts | 3 +- examples/extend-express-app/schema.prisma | 2 +- .../keystone.ts | 3 +- .../schema.prisma | 2 +- .../keystone.ts | 3 +- .../schema.prisma | 2 +- .../keystone-types.ts | 40 +++++++++---------- .../extend-graphql-schema-nexus/keystone.ts | 3 +- .../extend-graphql-schema-nexus/schema.prisma | 2 +- .../extend-graphql-subscriptions/keystone.ts | 3 +- .../schema.prisma | 2 +- examples/extend-prisma-schema/keystone.ts | 3 +- examples/extend-prisma-schema/schema.prisma | 2 +- examples/field-groups/keystone.ts | 3 +- examples/field-groups/schema.prisma | 2 +- examples/framework-astro/src/env.d.ts | 1 + .../keystone.ts | 2 +- .../schema.prisma | 2 +- .../src/keystone/context.ts | 2 +- .../keystone.ts | 2 +- .../schema.prisma | 2 +- .../src/keystone/context.ts | 2 +- .../keystone-server/keystone.ts | 3 +- .../keystone-server/schema.prisma | 2 +- examples/graphql-ts-gql/keystone.ts | 3 +- examples/graphql-ts-gql/schema.prisma | 2 +- examples/hooks/keystone.ts | 3 +- examples/hooks/schema.prisma | 2 +- examples/limits/keystone.ts | 3 +- examples/limits/schema.prisma | 2 +- examples/limits/seed-data.ts | 2 +- .../nextjs-frontend/next-env.d.ts | 5 --- examples/omit/keystone.ts | 3 +- examples/omit/schema.prisma | 2 +- examples/reuse/keystone.ts | 3 +- examples/reuse/schema.prisma | 2 +- examples/script/keystone.ts | 3 +- examples/script/schema.prisma | 2 +- examples/script/script.ts | 2 +- examples/singleton/keystone.ts | 3 +- examples/singleton/schema.prisma | 2 +- examples/testing/example-test.ts | 2 +- examples/testing/keystone.ts | 3 +- examples/testing/schema.prisma | 2 +- examples/transactions/keystone.ts | 3 +- examples/transactions/schema.prisma | 2 +- examples/usecase-blog-moderated/keystone.ts | 3 +- examples/usecase-blog-moderated/schema.prisma | 2 +- examples/usecase-blog/keystone.ts | 3 +- examples/usecase-blog/schema.prisma | 2 +- examples/usecase-blog/seed-data.ts | 2 +- .../usecase-relationship-union/keystone.ts | 3 +- .../usecase-relationship-union/schema.prisma | 2 +- examples/usecase-roles/keystone.ts | 3 +- examples/usecase-roles/schema.prisma | 2 +- examples/usecase-todo/keystone.ts | 3 +- examples/usecase-todo/schema.prisma | 2 +- examples/usecase-todo/seed-data.ts | 2 +- examples/usecase-versioning/keystone.ts | 3 +- examples/usecase-versioning/schema.prisma | 2 +- examples/usecase-versioning/seed-data.ts | 2 +- examples/virtual-field/keystone.ts | 3 +- examples/virtual-field/schema.prisma | 2 +- 108 files changed, 125 insertions(+), 184 deletions(-) delete mode 100644 examples/example-utils.ts delete mode 100644 examples/nextjs-keystone-two-servers/nextjs-frontend/next-env.d.ts diff --git a/examples/assets-local/keystone.ts b/examples/assets-local/keystone.ts index 4a976bcc226..b23e6ef3915 100644 --- a/examples/assets-local/keystone.ts +++ b/examples/assets-local/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, storage: { diff --git a/examples/assets-local/schema.prisma b/examples/assets-local/schema.prisma index e1151645890..931c8139b39 100644 --- a/examples/assets-local/schema.prisma +++ b/examples/assets-local/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/assets-s3/keystone.ts b/examples/assets-s3/keystone.ts index fa1a84e9ae0..08cacb24914 100644 --- a/examples/assets-s3/keystone.ts +++ b/examples/assets-s3/keystone.ts @@ -1,6 +1,5 @@ import 'dotenv/config' import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' const { @@ -16,7 +15,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, storage: { diff --git a/examples/assets-s3/schema.prisma b/examples/assets-s3/schema.prisma index e1151645890..931c8139b39 100644 --- a/examples/assets-s3/schema.prisma +++ b/examples/assets-s3/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/auth/keystone.ts b/examples/auth/keystone.ts index 88f7606d0a1..ee96e919f1e 100644 --- a/examples/auth/keystone.ts +++ b/examples/auth/keystone.ts @@ -1,7 +1,6 @@ import { config } from '@keystone-6/core' import { statelessSessions } from '@keystone-6/core/session' import { createAuth } from '@keystone-6/auth' -import { fixPrismaPath } from '../example-utils' import { type Session, lists } from './schema' import { type TypeInfo } from '.keystone/types' @@ -55,7 +54,7 @@ export default withAuth>( url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, ui: { diff --git a/examples/auth/schema.prisma b/examples/auth/schema.prisma index 9ae26a3cb1c..44c1400b78b 100644 --- a/examples/auth/schema.prisma +++ b/examples/auth/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model User { diff --git a/examples/cloudinary/keystone.ts b/examples/cloudinary/keystone.ts index b9b7b9e731a..47af4414568 100644 --- a/examples/cloudinary/keystone.ts +++ b/examples/cloudinary/keystone.ts @@ -1,6 +1,5 @@ import 'dotenv/config' import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/cloudinary/schema.prisma b/examples/cloudinary/schema.prisma index f49a2dda8b2..d48f2c78e4a 100644 --- a/examples/cloudinary/schema.prisma +++ b/examples/cloudinary/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/custom-admin-ui-logo/keystone.ts b/examples/custom-admin-ui-logo/keystone.ts index fe1bf98ab98..a59cdcd5436 100644 --- a/examples/custom-admin-ui-logo/keystone.ts +++ b/examples/custom-admin-ui-logo/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/custom-admin-ui-logo/schema.prisma b/examples/custom-admin-ui-logo/schema.prisma index c1ffc491b67..70f9bdf7a22 100644 --- a/examples/custom-admin-ui-logo/schema.prisma +++ b/examples/custom-admin-ui-logo/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Task { diff --git a/examples/custom-admin-ui-navigation/keystone.ts b/examples/custom-admin-ui-navigation/keystone.ts index fe1bf98ab98..a59cdcd5436 100644 --- a/examples/custom-admin-ui-navigation/keystone.ts +++ b/examples/custom-admin-ui-navigation/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/custom-admin-ui-navigation/schema.prisma b/examples/custom-admin-ui-navigation/schema.prisma index c1ffc491b67..70f9bdf7a22 100644 --- a/examples/custom-admin-ui-navigation/schema.prisma +++ b/examples/custom-admin-ui-navigation/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Task { diff --git a/examples/custom-admin-ui-pages/keystone.ts b/examples/custom-admin-ui-pages/keystone.ts index fe1bf98ab98..a59cdcd5436 100644 --- a/examples/custom-admin-ui-pages/keystone.ts +++ b/examples/custom-admin-ui-pages/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/custom-admin-ui-pages/schema.prisma b/examples/custom-admin-ui-pages/schema.prisma index c1ffc491b67..70f9bdf7a22 100644 --- a/examples/custom-admin-ui-pages/schema.prisma +++ b/examples/custom-admin-ui-pages/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Task { diff --git a/examples/custom-esbuild/keystone.ts b/examples/custom-esbuild/keystone.ts index 0d08b1ef9e8..fc9fbe1a2cb 100644 --- a/examples/custom-esbuild/keystone.ts +++ b/examples/custom-esbuild/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, don't do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/custom-esbuild/schema.prisma b/examples/custom-esbuild/schema.prisma index c2211c27d88..82cb1467c12 100644 --- a/examples/custom-esbuild/schema.prisma +++ b/examples/custom-esbuild/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/custom-field-view/keystone.ts b/examples/custom-field-view/keystone.ts index fe1bf98ab98..a59cdcd5436 100644 --- a/examples/custom-field-view/keystone.ts +++ b/examples/custom-field-view/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/custom-field-view/schema.prisma b/examples/custom-field-view/schema.prisma index 32e04e70c82..c4b4e68cbe0 100644 --- a/examples/custom-field-view/schema.prisma +++ b/examples/custom-field-view/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Task { diff --git a/examples/custom-field/keystone.ts b/examples/custom-field/keystone.ts index a735710d7a0..e76d454cffe 100644 --- a/examples/custom-field/keystone.ts +++ b/examples/custom-field/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/custom-field/schema.prisma b/examples/custom-field/schema.prisma index 8c6ae38eb8e..db1a0977108 100644 --- a/examples/custom-field/schema.prisma +++ b/examples/custom-field/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/custom-id/keystone.ts b/examples/custom-id/keystone.ts index b30011746f2..297d4d8dbb3 100644 --- a/examples/custom-id/keystone.ts +++ b/examples/custom-id/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -12,7 +11,7 @@ export default config({ idField: { kind: 'random', bytes: 16, encoding: 'hex' }, // WARNING: this is only needed for our monorepo examples, don't do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/custom-id/schema.prisma b/examples/custom-id/schema.prisma index 0b3a1273c3f..4d2c4129775 100644 --- a/examples/custom-id/schema.prisma +++ b/examples/custom-id/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Task { diff --git a/examples/custom-session-invalidation/keystone.ts b/examples/custom-session-invalidation/keystone.ts index 36993b4a4b0..cbcfcf97ff1 100644 --- a/examples/custom-session-invalidation/keystone.ts +++ b/examples/custom-session-invalidation/keystone.ts @@ -1,7 +1,6 @@ import { config } from '@keystone-6/core' import { statelessSessions } from '@keystone-6/core/session' import { createAuth } from '@keystone-6/auth' -import { fixPrismaPath } from '../example-utils' import { lists, type Session } from './schema' import type { Config, Context, TypeInfo } from '.keystone/types' @@ -74,7 +73,7 @@ export default withSessionInvalidation( url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, // you can find out more at https://keystonejs.com/docs/apis/session#session-api diff --git a/examples/custom-session-invalidation/schema.prisma b/examples/custom-session-invalidation/schema.prisma index 0a1a98ffc9b..5c90b594717 100644 --- a/examples/custom-session-invalidation/schema.prisma +++ b/examples/custom-session-invalidation/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model User { diff --git a/examples/custom-session-jwt/keystone.ts b/examples/custom-session-jwt/keystone.ts index 5b46d689547..65645d7df6c 100644 --- a/examples/custom-session-jwt/keystone.ts +++ b/examples/custom-session-jwt/keystone.ts @@ -1,6 +1,5 @@ import jwt from 'jsonwebtoken' import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists, type Session } from './schema' import type { Context, TypeInfo } from '.keystone/types' @@ -83,7 +82,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', onConnect: async () => { // WARNING: remove this diff --git a/examples/custom-session-jwt/schema.prisma b/examples/custom-session-jwt/schema.prisma index 3a26a5e3328..0628309b8fc 100644 --- a/examples/custom-session-jwt/schema.prisma +++ b/examples/custom-session-jwt/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/custom-session-next-auth/keystone.ts b/examples/custom-session-next-auth/keystone.ts index 31feb40c019..121a2e023d9 100644 --- a/examples/custom-session-next-auth/keystone.ts +++ b/examples/custom-session-next-auth/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import { type Session, nextAuthSessionStrategy } from './session' @@ -15,7 +14,7 @@ export default config>({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, ui: { // the following api routes are required for nextauth.js diff --git a/examples/custom-session-next-auth/schema.prisma b/examples/custom-session-next-auth/schema.prisma index 9d951970e27..2cfed2a9cab 100644 --- a/examples/custom-session-next-auth/schema.prisma +++ b/examples/custom-session-next-auth/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/custom-session-next-auth/session.ts b/examples/custom-session-next-auth/session.ts index ada4eef4415..88f60c24205 100644 --- a/examples/custom-session-next-auth/session.ts +++ b/examples/custom-session-next-auth/session.ts @@ -23,7 +23,7 @@ async function getKeystoneContext () { // We use the prisma client from the .myprisma folder in order to support multiple Prisma Clients in our examples // your project will only have one Prisma Client, so you can use the following instead: // await import('@prisma/client') - await import('.myprisma/client') + await import('myprisma') ) if (process.env.NODE_ENV !== 'production') { (globalThis as any)._keystoneContext = _keystoneContext diff --git a/examples/custom-session-passport/auth.ts b/examples/custom-session-passport/auth.ts index 809df649b85..116d1f46d69 100644 --- a/examples/custom-session-passport/auth.ts +++ b/examples/custom-session-passport/auth.ts @@ -6,7 +6,7 @@ import { Passport } from 'passport' import { type VerifyCallback } from 'passport-oauth2' import { Strategy, StrategyOptions, Profile } from 'passport-github2' -import { type Author } from '.myprisma/client' +import { type Author } from 'myprisma' import { type TypeInfo } from '.keystone/types' export type Session = Author diff --git a/examples/custom-session-passport/keystone.ts b/examples/custom-session-passport/keystone.ts index e5c1460ee1e..a3162f657a2 100644 --- a/examples/custom-session-passport/keystone.ts +++ b/examples/custom-session-passport/keystone.ts @@ -8,7 +8,6 @@ import { session, passportMiddleware } from './auth' -import { fixPrismaPath } from '../example-utils' export default config>({ db: { @@ -16,7 +15,7 @@ export default config>({ url: 'file:./keystone.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, session, diff --git a/examples/custom-session-passport/schema.prisma b/examples/custom-session-passport/schema.prisma index 9d951970e27..2cfed2a9cab 100644 --- a/examples/custom-session-passport/schema.prisma +++ b/examples/custom-session-passport/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/custom-session-redis/keystone.ts b/examples/custom-session-redis/keystone.ts index 5df9fcde326..c0c05b87942 100644 --- a/examples/custom-session-redis/keystone.ts +++ b/examples/custom-session-redis/keystone.ts @@ -2,7 +2,6 @@ import { config } from '@keystone-6/core' import { storedSessions } from '@keystone-6/core/session' import { createAuth } from '@keystone-6/auth' import { createClient } from '@redis/client' -import { fixPrismaPath } from '../example-utils' import { lists, type Session } from './schema' import type { TypeInfo } from '.keystone/types' @@ -67,7 +66,7 @@ export default withAuth( }, // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, session: redisSessionStrategy(), diff --git a/examples/custom-session-redis/schema.prisma b/examples/custom-session-redis/schema.prisma index 3364a886215..242f7ea5b2d 100644 --- a/examples/custom-session-redis/schema.prisma +++ b/examples/custom-session-redis/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model User { diff --git a/examples/custom-session/keystone.ts b/examples/custom-session/keystone.ts index 0b62ef903f7..2d769415ae0 100644 --- a/examples/custom-session/keystone.ts +++ b/examples/custom-session/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists, type Session } from './schema' import type { Context, TypeInfo } from '.keystone/types' @@ -38,7 +37,7 @@ export default config({ url: process.env.DATABASE_URL ?? 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, session: sillySessionStrategy, diff --git a/examples/custom-session/schema.prisma b/examples/custom-session/schema.prisma index 3a26a5e3328..0628309b8fc 100644 --- a/examples/custom-session/schema.prisma +++ b/examples/custom-session/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/default-values/keystone.ts b/examples/default-values/keystone.ts index fe1bf98ab98..a59cdcd5436 100644 --- a/examples/default-values/keystone.ts +++ b/examples/default-values/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/default-values/schema.prisma b/examples/default-values/schema.prisma index cc47bf55c93..1ff4406b190 100644 --- a/examples/default-values/schema.prisma +++ b/examples/default-values/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Task { diff --git a/examples/document-field-customisation/keystone-server/keystone.ts b/examples/document-field-customisation/keystone-server/keystone.ts index 72ca0405c61..f8cd02ade5c 100644 --- a/examples/document-field-customisation/keystone-server/keystone.ts +++ b/examples/document-field-customisation/keystone-server/keystone.ts @@ -1,6 +1,5 @@ import { config } from '@keystone-6/core' import type { KeystoneConfig } from '@keystone-6/core/types' -import { fixPrismaPath } from '../../example-utils' import { seedDatabase } from './src/seed' import { lists } from './src/schema' import { type Context, type TypeInfo } from '.keystone/types' @@ -15,7 +14,7 @@ const db: KeystoneConfig['db'] = { }, // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', } export default config({ diff --git a/examples/document-field-customisation/keystone-server/schema.prisma b/examples/document-field-customisation/keystone-server/schema.prisma index 66300044e13..b24e20b62aa 100644 --- a/examples/document-field-customisation/keystone-server/schema.prisma +++ b/examples/document-field-customisation/keystone-server/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model User { diff --git a/examples/document-field/keystone.ts b/examples/document-field/keystone.ts index fe1bf98ab98..a59cdcd5436 100644 --- a/examples/document-field/keystone.ts +++ b/examples/document-field/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/document-field/schema.prisma b/examples/document-field/schema.prisma index 86820de8d0d..4081058267d 100644 --- a/examples/document-field/schema.prisma +++ b/examples/document-field/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/empty-lists/keystone.ts b/examples/empty-lists/keystone.ts index 81c45333858..f93f6805061 100644 --- a/examples/empty-lists/keystone.ts +++ b/examples/empty-lists/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL ?? 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, don't do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/empty-lists/schema.prisma b/examples/empty-lists/schema.prisma index e9516d71f53..bf867abe2f9 100644 --- a/examples/empty-lists/schema.prisma +++ b/examples/empty-lists/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/example-utils.ts b/examples/example-utils.ts deleted file mode 100644 index fcd07fa3f0d..00000000000 --- a/examples/example-utils.ts +++ /dev/null @@ -1,10 +0,0 @@ -// our monorepo examples have their @prisma/client dependencies hoisted -// to build them and use them without conflict, we need to ensure .prisma/client -// resolves to somewhere else -// -// we use node_modules/.myprisma to differentiate from node_modules/.prisma, but -// still use node_modules/... to skip the painful experience that is jest/babel -// transforms -export const fixPrismaPath = { - prismaClientPath: 'node_modules/.myprisma/client', -} diff --git a/examples/extend-express-app/keystone.ts b/examples/extend-express-app/keystone.ts index 6618dbdace0..157d016c164 100644 --- a/examples/extend-express-app/keystone.ts +++ b/examples/extend-express-app/keystone.ts @@ -1,6 +1,5 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import { type TypeInfo, @@ -16,7 +15,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, server: { extendExpressApp: (app, commonContext) => { diff --git a/examples/extend-express-app/schema.prisma b/examples/extend-express-app/schema.prisma index 2dc9e60df0b..5810dfc5a6a 100644 --- a/examples/extend-express-app/schema.prisma +++ b/examples/extend-express-app/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/extend-graphql-schema-graphql-tools/keystone.ts b/examples/extend-graphql-schema-graphql-tools/keystone.ts index 3051fe226d2..406f66f26ae 100644 --- a/examples/extend-graphql-schema-graphql-tools/keystone.ts +++ b/examples/extend-graphql-schema-graphql-tools/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists, extendGraphqlSchema } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, graphql: { extendGraphqlSchema diff --git a/examples/extend-graphql-schema-graphql-tools/schema.prisma b/examples/extend-graphql-schema-graphql-tools/schema.prisma index ef08f4c10bf..0c67b38c585 100644 --- a/examples/extend-graphql-schema-graphql-tools/schema.prisma +++ b/examples/extend-graphql-schema-graphql-tools/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/extend-graphql-schema-graphql-ts/keystone.ts b/examples/extend-graphql-schema-graphql-ts/keystone.ts index 876de997ec1..f5774f4938c 100644 --- a/examples/extend-graphql-schema-graphql-ts/keystone.ts +++ b/examples/extend-graphql-schema-graphql-ts/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists, extendGraphqlSchema } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, graphql: { extendGraphqlSchema diff --git a/examples/extend-graphql-schema-graphql-ts/schema.prisma b/examples/extend-graphql-schema-graphql-ts/schema.prisma index ef08f4c10bf..0c67b38c585 100644 --- a/examples/extend-graphql-schema-graphql-ts/schema.prisma +++ b/examples/extend-graphql-schema-graphql-ts/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/extend-graphql-schema-nexus/keystone-types.ts b/examples/extend-graphql-schema-nexus/keystone-types.ts index 5bbbe72c500..5ebba602f52 100644 --- a/examples/extend-graphql-schema-nexus/keystone-types.ts +++ b/examples/extend-graphql-schema-nexus/keystone-types.ts @@ -203,36 +203,36 @@ export type KeystoneAdminUISortDirection = | 'DESC' type ResolvedPostCreateInput = { - id?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['id'] - title?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['title'] - status?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['status'] - content?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['content'] - publishDate?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['publishDate'] - author?: import('./node_modules/.myprisma/client').Prisma.PostCreateInput['author'] + id?: import('./node_modules/myprisma').Prisma.PostCreateInput['id'] + title?: import('./node_modules/myprisma').Prisma.PostCreateInput['title'] + status?: import('./node_modules/myprisma').Prisma.PostCreateInput['status'] + content?: import('./node_modules/myprisma').Prisma.PostCreateInput['content'] + publishDate?: import('./node_modules/myprisma').Prisma.PostCreateInput['publishDate'] + author?: import('./node_modules/myprisma').Prisma.PostCreateInput['author'] } type ResolvedPostUpdateInput = { id?: undefined - title?: import('./node_modules/.myprisma/client').Prisma.PostUpdateInput['title'] - status?: import('./node_modules/.myprisma/client').Prisma.PostUpdateInput['status'] - content?: import('./node_modules/.myprisma/client').Prisma.PostUpdateInput['content'] - publishDate?: import('./node_modules/.myprisma/client').Prisma.PostUpdateInput['publishDate'] - author?: import('./node_modules/.myprisma/client').Prisma.PostUpdateInput['author'] + title?: import('./node_modules/myprisma').Prisma.PostUpdateInput['title'] + status?: import('./node_modules/myprisma').Prisma.PostUpdateInput['status'] + content?: import('./node_modules/myprisma').Prisma.PostUpdateInput['content'] + publishDate?: import('./node_modules/myprisma').Prisma.PostUpdateInput['publishDate'] + author?: import('./node_modules/myprisma').Prisma.PostUpdateInput['author'] } type ResolvedAuthorCreateInput = { - id?: import('./node_modules/.myprisma/client').Prisma.AuthorCreateInput['id'] - name?: import('./node_modules/.myprisma/client').Prisma.AuthorCreateInput['name'] - posts?: import('./node_modules/.myprisma/client').Prisma.AuthorCreateInput['posts'] + id?: import('./node_modules/myprisma').Prisma.AuthorCreateInput['id'] + name?: import('./node_modules/myprisma').Prisma.AuthorCreateInput['name'] + posts?: import('./node_modules/myprisma').Prisma.AuthorCreateInput['posts'] } type ResolvedAuthorUpdateInput = { id?: undefined - name?: import('./node_modules/.myprisma/client').Prisma.AuthorUpdateInput['name'] - posts?: import('./node_modules/.myprisma/client').Prisma.AuthorUpdateInput['posts'] + name?: import('./node_modules/myprisma').Prisma.AuthorUpdateInput['name'] + posts?: import('./node_modules/myprisma').Prisma.AuthorUpdateInput['posts'] } export declare namespace Lists { export type Post = import('@keystone-6/core').ListConfig> namespace Post { - export type Item = import('./node_modules/.myprisma/client').Post + export type Item = import('./node_modules/myprisma').Post export type TypeInfo = { key: 'Post' isSingleton: false @@ -254,7 +254,7 @@ export declare namespace Lists { } export type Author = import('@keystone-6/core').ListConfig> namespace Author { - export type Item = import('./node_modules/.myprisma/client').Author + export type Item = import('./node_modules/myprisma').Author export type TypeInfo = { key: 'Author' isSingleton: false @@ -283,8 +283,8 @@ export type TypeInfo = { readonly Post: Lists.Post.TypeInfo readonly Author: Lists.Author.TypeInfo } - prisma: import('./node_modules/.myprisma/client').PrismaClient - prismaTypes: import('./node_modules/.myprisma/client').Prisma + prisma: import('./node_modules/myprisma').PrismaClient + prismaTypes: import('./node_modules/myprisma').Prisma session: Session } diff --git a/examples/extend-graphql-schema-nexus/keystone.ts b/examples/extend-graphql-schema-nexus/keystone.ts index 063c3ee5720..8f80813bd64 100644 --- a/examples/extend-graphql-schema-nexus/keystone.ts +++ b/examples/extend-graphql-schema-nexus/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists, extendGraphqlSchema } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, graphql: { extendGraphqlSchema diff --git a/examples/extend-graphql-schema-nexus/schema.prisma b/examples/extend-graphql-schema-nexus/schema.prisma index 558a117135b..7c8b17f4423 100644 --- a/examples/extend-graphql-schema-nexus/schema.prisma +++ b/examples/extend-graphql-schema-nexus/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/extend-graphql-subscriptions/keystone.ts b/examples/extend-graphql-subscriptions/keystone.ts index d8b83b33745..428874a6ab7 100644 --- a/examples/extend-graphql-subscriptions/keystone.ts +++ b/examples/extend-graphql-subscriptions/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists, extendGraphqlSchema } from './schema' import { extendHttpServer } from './websocket' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, graphql: { extendGraphqlSchema diff --git a/examples/extend-graphql-subscriptions/schema.prisma b/examples/extend-graphql-subscriptions/schema.prisma index ef08f4c10bf..0c67b38c585 100644 --- a/examples/extend-graphql-subscriptions/schema.prisma +++ b/examples/extend-graphql-subscriptions/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/extend-prisma-schema/keystone.ts b/examples/extend-prisma-schema/keystone.ts index bc7d0245756..c2fafe99418 100644 --- a/examples/extend-prisma-schema/keystone.ts +++ b/examples/extend-prisma-schema/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -18,7 +17,7 @@ export default config({ }, // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/extend-prisma-schema/schema.prisma b/examples/extend-prisma-schema/schema.prisma index 74d4125cf30..97b5ecf531e 100644 --- a/examples/extend-prisma-schema/schema.prisma +++ b/examples/extend-prisma-schema/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" binaryTargets = ["native", "linux-musl"] previewFeatures = ["metrics"] diff --git a/examples/field-groups/keystone.ts b/examples/field-groups/keystone.ts index a735710d7a0..e76d454cffe 100644 --- a/examples/field-groups/keystone.ts +++ b/examples/field-groups/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/field-groups/schema.prisma b/examples/field-groups/schema.prisma index c4b7bddcb1c..d532663c59e 100644 --- a/examples/field-groups/schema.prisma +++ b/examples/field-groups/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/framework-astro/src/env.d.ts b/examples/framework-astro/src/env.d.ts index f964fe0cffd..acef35f175a 100644 --- a/examples/framework-astro/src/env.d.ts +++ b/examples/framework-astro/src/env.d.ts @@ -1 +1,2 @@ +/// /// diff --git a/examples/framework-nextjs-app-directory/keystone.ts b/examples/framework-nextjs-app-directory/keystone.ts index e3865362ee0..bdcebbbc7c8 100644 --- a/examples/framework-nextjs-app-directory/keystone.ts +++ b/examples/framework-nextjs-app-directory/keystone.ts @@ -12,7 +12,7 @@ export default config({ }, // WARNING: this is only needed for our monorepo examples, dont do this - prismaClientPath: 'node_modules/.myprisma/client', + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/framework-nextjs-app-directory/schema.prisma b/examples/framework-nextjs-app-directory/schema.prisma index c68563b5859..fc6131d94ef 100644 --- a/examples/framework-nextjs-app-directory/schema.prisma +++ b/examples/framework-nextjs-app-directory/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model User { diff --git a/examples/framework-nextjs-app-directory/src/keystone/context.ts b/examples/framework-nextjs-app-directory/src/keystone/context.ts index 839e93ef031..9ffb35cebc5 100644 --- a/examples/framework-nextjs-app-directory/src/keystone/context.ts +++ b/examples/framework-nextjs-app-directory/src/keystone/context.ts @@ -1,7 +1,7 @@ import { getContext } from '@keystone-6/core/context' import config from '../../keystone' import { type Context } from '.keystone/types' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' // Making sure multiple prisma clients are not created during hot reloading export const keystoneContext: Context = (globalThis as any).keystoneContext ?? getContext(config, PrismaModule) diff --git a/examples/framework-nextjs-pages-directory/keystone.ts b/examples/framework-nextjs-pages-directory/keystone.ts index 1e47d2ae5e4..c0110042825 100644 --- a/examples/framework-nextjs-pages-directory/keystone.ts +++ b/examples/framework-nextjs-pages-directory/keystone.ts @@ -12,7 +12,7 @@ export default config({ }, // WARNING: this is only needed for our monorepo examples, dont do this - prismaClientPath: 'node_modules/.myprisma/client', + prismaClientPath: 'node_modules/myprisma', }, ui: { basePath: '/admin', diff --git a/examples/framework-nextjs-pages-directory/schema.prisma b/examples/framework-nextjs-pages-directory/schema.prisma index 96a892e5443..6ed5c9db8ed 100644 --- a/examples/framework-nextjs-pages-directory/schema.prisma +++ b/examples/framework-nextjs-pages-directory/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model User { diff --git a/examples/framework-nextjs-pages-directory/src/keystone/context.ts b/examples/framework-nextjs-pages-directory/src/keystone/context.ts index 8aac61addea..e659cdb3e73 100644 --- a/examples/framework-nextjs-pages-directory/src/keystone/context.ts +++ b/examples/framework-nextjs-pages-directory/src/keystone/context.ts @@ -1,7 +1,7 @@ import { getContext } from '@keystone-6/core/context' import config from '../../keystone' import { type Context } from '.keystone/types' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' // Making sure multiple prisma clients are not created during hot reloading export const keystoneContext: Context = diff --git a/examples/framework-nextjs-two-servers/keystone-server/keystone.ts b/examples/framework-nextjs-two-servers/keystone-server/keystone.ts index 72ca0405c61..f8cd02ade5c 100644 --- a/examples/framework-nextjs-two-servers/keystone-server/keystone.ts +++ b/examples/framework-nextjs-two-servers/keystone-server/keystone.ts @@ -1,6 +1,5 @@ import { config } from '@keystone-6/core' import type { KeystoneConfig } from '@keystone-6/core/types' -import { fixPrismaPath } from '../../example-utils' import { seedDatabase } from './src/seed' import { lists } from './src/schema' import { type Context, type TypeInfo } from '.keystone/types' @@ -15,7 +14,7 @@ const db: KeystoneConfig['db'] = { }, // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', } export default config({ diff --git a/examples/framework-nextjs-two-servers/keystone-server/schema.prisma b/examples/framework-nextjs-two-servers/keystone-server/schema.prisma index 66300044e13..b24e20b62aa 100644 --- a/examples/framework-nextjs-two-servers/keystone-server/schema.prisma +++ b/examples/framework-nextjs-two-servers/keystone-server/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model User { diff --git a/examples/graphql-ts-gql/keystone.ts b/examples/graphql-ts-gql/keystone.ts index fe1bf98ab98..a59cdcd5436 100644 --- a/examples/graphql-ts-gql/keystone.ts +++ b/examples/graphql-ts-gql/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/graphql-ts-gql/schema.prisma b/examples/graphql-ts-gql/schema.prisma index ef08f4c10bf..0c67b38c585 100644 --- a/examples/graphql-ts-gql/schema.prisma +++ b/examples/graphql-ts-gql/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/hooks/keystone.ts b/examples/hooks/keystone.ts index a735710d7a0..e76d454cffe 100644 --- a/examples/hooks/keystone.ts +++ b/examples/hooks/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/hooks/schema.prisma b/examples/hooks/schema.prisma index ca0cc5b072c..124f84721f1 100644 --- a/examples/hooks/schema.prisma +++ b/examples/hooks/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/limits/keystone.ts b/examples/limits/keystone.ts index a735710d7a0..e76d454cffe 100644 --- a/examples/limits/keystone.ts +++ b/examples/limits/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/limits/schema.prisma b/examples/limits/schema.prisma index 7d23d654e08..ef28a7c2149 100644 --- a/examples/limits/schema.prisma +++ b/examples/limits/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/limits/seed-data.ts b/examples/limits/seed-data.ts index 8ab08fbd3ed..5e7c829c222 100644 --- a/examples/limits/seed-data.ts +++ b/examples/limits/seed-data.ts @@ -1,6 +1,6 @@ import { getContext } from '@keystone-6/core/context' import config from './keystone' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' async function main () { const context = getContext(config, PrismaModule) diff --git a/examples/nextjs-keystone-two-servers/nextjs-frontend/next-env.d.ts b/examples/nextjs-keystone-two-servers/nextjs-frontend/next-env.d.ts deleted file mode 100644 index 4f11a03dc6c..00000000000 --- a/examples/nextjs-keystone-two-servers/nextjs-frontend/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/examples/omit/keystone.ts b/examples/omit/keystone.ts index 10daa9c916b..09d6daa555b 100644 --- a/examples/omit/keystone.ts +++ b/examples/omit/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { Context } from '.keystone/types' @@ -52,7 +51,7 @@ export default config({ }, // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/omit/schema.prisma b/examples/omit/schema.prisma index 80047845712..5b0e8e7f7cd 100644 --- a/examples/omit/schema.prisma +++ b/examples/omit/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Person { diff --git a/examples/reuse/keystone.ts b/examples/reuse/keystone.ts index 913b632a542..608f0f6979c 100644 --- a/examples/reuse/keystone.ts +++ b/examples/reuse/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, don't do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/reuse/schema.prisma b/examples/reuse/schema.prisma index b209e5bebf7..122d12a89d1 100644 --- a/examples/reuse/schema.prisma +++ b/examples/reuse/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Invoice { diff --git a/examples/script/keystone.ts b/examples/script/keystone.ts index b9fc5da8c16..a18cbe95799 100644 --- a/examples/script/keystone.ts +++ b/examples/script/keystone.ts @@ -1,7 +1,6 @@ import { config, list } from '@keystone-6/core' import { allowAll } from '@keystone-6/core/access' import { text, timestamp } from '@keystone-6/core/fields' -import { fixPrismaPath } from '../example-utils' import { type TypeInfo } from '.keystone/types' export default config({ @@ -16,7 +15,7 @@ export default config({ }, // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists: { Post: list({ diff --git a/examples/script/schema.prisma b/examples/script/schema.prisma index ad102739321..8fb709acced 100644 --- a/examples/script/schema.prisma +++ b/examples/script/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/script/script.ts b/examples/script/script.ts index c862803a03e..c61449c851e 100644 --- a/examples/script/script.ts +++ b/examples/script/script.ts @@ -2,7 +2,7 @@ import { getContext } from '@keystone-6/core/context' import config from './keystone' // WARNING: this is only needed for our monorepo examples, dont do this -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' // do this instead // import * as PrismaModule from '@prisma/client' diff --git a/examples/singleton/keystone.ts b/examples/singleton/keystone.ts index a735710d7a0..e76d454cffe 100644 --- a/examples/singleton/keystone.ts +++ b/examples/singleton/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/singleton/schema.prisma b/examples/singleton/schema.prisma index 958e513d4dc..d75a01aa036 100644 --- a/examples/singleton/schema.prisma +++ b/examples/singleton/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Settings { diff --git a/examples/testing/example-test.ts b/examples/testing/example-test.ts index 6c7ac5eef0b..34b6c6d8b22 100644 --- a/examples/testing/example-test.ts +++ b/examples/testing/example-test.ts @@ -5,7 +5,7 @@ import assert from 'node:assert/strict' import { resetDatabase } from '@keystone-6/core/testing' import { getContext } from '@keystone-6/core/context' import config from './keystone' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' const prismaSchemaPath = path.join(__dirname, 'schema.prisma') const context = getContext(config, PrismaModule) diff --git a/examples/testing/keystone.ts b/examples/testing/keystone.ts index e29725cbb35..4bc92d7d35f 100644 --- a/examples/testing/keystone.ts +++ b/examples/testing/keystone.ts @@ -1,7 +1,6 @@ import { config } from '@keystone-6/core' import { statelessSessions } from '@keystone-6/core/session' import { createAuth } from '@keystone-6/auth' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { Session } from './schema' import type { TypeInfo } from '.keystone/types' @@ -39,7 +38,7 @@ export default withAuth( url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, // you can find out more at https://keystonejs.com/docs/apis/session#session-api diff --git a/examples/testing/schema.prisma b/examples/testing/schema.prisma index b03b0233709..b1bdb332bd5 100644 --- a/examples/testing/schema.prisma +++ b/examples/testing/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Task { diff --git a/examples/transactions/keystone.ts b/examples/transactions/keystone.ts index 47e2cfaa206..0f09a14245b 100644 --- a/examples/transactions/keystone.ts +++ b/examples/transactions/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists, extendGraphqlSchema } from './schema' export default config({ @@ -9,7 +8,7 @@ export default config({ enableLogging: ['query', 'info', 'warn', 'error'], // WARNING: this is only needed for our monorepo examples, don't do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, graphql: { diff --git a/examples/transactions/schema.prisma b/examples/transactions/schema.prisma index a05aa4a1291..0fa05565853 100644 --- a/examples/transactions/schema.prisma +++ b/examples/transactions/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Order { diff --git a/examples/usecase-blog-moderated/keystone.ts b/examples/usecase-blog-moderated/keystone.ts index 85719a40298..c40656909ce 100644 --- a/examples/usecase-blog-moderated/keystone.ts +++ b/examples/usecase-blog-moderated/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists, type Session } from './schema' import type { Context, TypeInfo } from '.keystone/types' @@ -41,7 +40,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, session: sillySessionStrategy, diff --git a/examples/usecase-blog-moderated/schema.prisma b/examples/usecase-blog-moderated/schema.prisma index 89c75e6fef0..da699456e4a 100644 --- a/examples/usecase-blog-moderated/schema.prisma +++ b/examples/usecase-blog-moderated/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/usecase-blog/keystone.ts b/examples/usecase-blog/keystone.ts index a735710d7a0..e76d454cffe 100644 --- a/examples/usecase-blog/keystone.ts +++ b/examples/usecase-blog/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/usecase-blog/schema.prisma b/examples/usecase-blog/schema.prisma index 02baaa0339f..eb095648260 100644 --- a/examples/usecase-blog/schema.prisma +++ b/examples/usecase-blog/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Author { diff --git a/examples/usecase-blog/seed-data.ts b/examples/usecase-blog/seed-data.ts index 3bc7d10988c..a18a31b8c4c 100644 --- a/examples/usecase-blog/seed-data.ts +++ b/examples/usecase-blog/seed-data.ts @@ -1,7 +1,7 @@ import { getContext } from '@keystone-6/core/context' import { authors, posts } from '../example-data' import config from './keystone' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' async function main () { const context = getContext(config, PrismaModule) diff --git a/examples/usecase-relationship-union/keystone.ts b/examples/usecase-relationship-union/keystone.ts index e94da84a666..870de6384ce 100644 --- a/examples/usecase-relationship-union/keystone.ts +++ b/examples/usecase-relationship-union/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import { type TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/usecase-relationship-union/schema.prisma b/examples/usecase-relationship-union/schema.prisma index c07b5ab1e5e..f67ca838f4a 100644 --- a/examples/usecase-relationship-union/schema.prisma +++ b/examples/usecase-relationship-union/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/usecase-roles/keystone.ts b/examples/usecase-roles/keystone.ts index 33ad168ae4b..d1330f218ab 100644 --- a/examples/usecase-roles/keystone.ts +++ b/examples/usecase-roles/keystone.ts @@ -1,7 +1,6 @@ import { config } from '@keystone-6/core' import { statelessSessions } from '@keystone-6/core/session' import { createAuth } from '@keystone-6/auth' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' // WARNING: this example is for demonstration purposes only @@ -71,7 +70,7 @@ export default withAuth( url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, ui: { diff --git a/examples/usecase-roles/schema.prisma b/examples/usecase-roles/schema.prisma index 372925a0002..b396063be3d 100644 --- a/examples/usecase-roles/schema.prisma +++ b/examples/usecase-roles/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Todo { diff --git a/examples/usecase-todo/keystone.ts b/examples/usecase-todo/keystone.ts index a735710d7a0..e76d454cffe 100644 --- a/examples/usecase-todo/keystone.ts +++ b/examples/usecase-todo/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import type { TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/usecase-todo/schema.prisma b/examples/usecase-todo/schema.prisma index 3d39c2e0c4e..218bac95560 100644 --- a/examples/usecase-todo/schema.prisma +++ b/examples/usecase-todo/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Task { diff --git a/examples/usecase-todo/seed-data.ts b/examples/usecase-todo/seed-data.ts index e1199dd5f7f..87c034748ac 100644 --- a/examples/usecase-todo/seed-data.ts +++ b/examples/usecase-todo/seed-data.ts @@ -1,7 +1,7 @@ import { getContext } from '@keystone-6/core/context' import { persons, tasks } from '../example-data' import config from './keystone' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' type PersonProps = { name: string diff --git a/examples/usecase-versioning/keystone.ts b/examples/usecase-versioning/keystone.ts index e94da84a666..870de6384ce 100644 --- a/examples/usecase-versioning/keystone.ts +++ b/examples/usecase-versioning/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' import { type TypeInfo } from '.keystone/types' @@ -9,7 +8,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/usecase-versioning/schema.prisma b/examples/usecase-versioning/schema.prisma index 23ce2cc1ce0..c85d2c5f08a 100644 --- a/examples/usecase-versioning/schema.prisma +++ b/examples/usecase-versioning/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post { diff --git a/examples/usecase-versioning/seed-data.ts b/examples/usecase-versioning/seed-data.ts index 71ef09bcc52..d6f1c5798e1 100644 --- a/examples/usecase-versioning/seed-data.ts +++ b/examples/usecase-versioning/seed-data.ts @@ -1,7 +1,7 @@ import { getContext } from '@keystone-6/core/context' import { posts } from '../example-data' import config from './keystone' -import * as PrismaModule from '.myprisma/client' +import * as PrismaModule from 'myprisma' async function main () { const context = getContext(config, PrismaModule) diff --git a/examples/virtual-field/keystone.ts b/examples/virtual-field/keystone.ts index fe1bf98ab98..a59cdcd5436 100644 --- a/examples/virtual-field/keystone.ts +++ b/examples/virtual-field/keystone.ts @@ -1,5 +1,4 @@ import { config } from '@keystone-6/core' -import { fixPrismaPath } from '../example-utils' import { lists } from './schema' export default config({ @@ -8,7 +7,7 @@ export default config({ url: process.env.DATABASE_URL || 'file:./keystone-example.db', // WARNING: this is only needed for our monorepo examples, dont do this - ...fixPrismaPath, + prismaClientPath: 'node_modules/myprisma', }, lists, }) diff --git a/examples/virtual-field/schema.prisma b/examples/virtual-field/schema.prisma index e71166a8989..6aa78e2add4 100644 --- a/examples/virtual-field/schema.prisma +++ b/examples/virtual-field/schema.prisma @@ -9,7 +9,7 @@ datasource sqlite { generator client { provider = "prisma-client-js" - output = "node_modules/.myprisma/client" + output = "node_modules/myprisma" } model Post {