Skip to content

Commit

Permalink
Update CodeSandbox versions, and fix prisma client paths for `example…
Browse files Browse the repository at this point in the history
…s/` (continuation of #9300) (#9302)
  • Loading branch information
dcousens authored Aug 20, 2024
1 parent 2a6033f commit 40e85b7
Show file tree
Hide file tree
Showing 49 changed files with 47 additions and 301 deletions.
2 changes: 1 addition & 1 deletion examples/assets-local/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/auth/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-admin-ui-logo/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-admin-ui-navigation/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-admin-ui-pages/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-esbuild/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-field-view/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-field/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-id/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
Original file line number Diff line number Diff line change
@@ -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'

export async function main () {
const context = getContext(config, PrismaModule)
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-output-paths/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
232 changes: 0 additions & 232 deletions examples/custom-output-paths/schema.graphql

This file was deleted.

20 changes: 0 additions & 20 deletions examples/custom-output-paths/schema.prisma

This file was deleted.

2 changes: 1 addition & 1 deletion examples/custom-session-invalidation/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-session-jwt/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/custom-session-next-auth/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
6 changes: 3 additions & 3 deletions examples/custom-session-next-auth/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ async function getKeystoneContext () {
// TODO: this could probably be better
_keystoneContext = getContext(
(await import('./keystone')).default,
// 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')

// WARNING: this is only needed for our monorepo examples, dont do this
await import('myprisma')
// await import('@prisma/client') // <-- do this
)
if (process.env.NODE_ENV !== 'production') {
(globalThis as any)._keystoneContext = _keystoneContext
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-session/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
2 changes: 1 addition & 1 deletion examples/default-values/sandbox.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"template": "node",
"container": {
"startScript": "keystone dev",
"node": "16"
"node": "20"
}
}
Loading

0 comments on commit 40e85b7

Please sign in to comment.