Skip to content

Commit 9b5bb7d

Browse files
committed
update to latest
1 parent 11491ab commit 9b5bb7d

File tree

9 files changed

+2756
-2770
lines changed

9 files changed

+2756
-2770
lines changed

package-lock.json

Lines changed: 2531 additions & 2688 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"up": "npm i --save-exact @zenstackhq/runtime@latest @zenstackhq/server@latest @zenstackhq/swr@latest && npm i -D --save-exact zenstack@latest"
1313
},
1414
"dependencies": {
15-
"@clerk/nextjs": "^4.16.1",
16-
"@prisma/client": "^4.5.0",
17-
"@zenstackhq/runtime": "1.1.0",
18-
"@zenstackhq/server": "1.1.0",
19-
"@zenstackhq/swr": "1.1.0",
20-
"next": "13.0.2",
15+
"@clerk/nextjs": "^5.0.2",
16+
"@prisma/client": "5.12.0",
17+
"@zenstackhq/runtime": "^1.12.4",
18+
"@zenstackhq/server": "^1.12.4",
19+
"@zenstackhq/swr": "^1.12.4",
20+
"next": "^14.2.3",
2121
"react": "18.2.0",
2222
"react-dom": "18.2.0",
2323
"swr": "^2.1.3",
@@ -35,10 +35,10 @@
3535
"postcss": "^8.4.14",
3636
"prettier": "^2.7.1",
3737
"prettier-plugin-tailwindcss": "^0.1.13",
38-
"prisma": "^4.5.0",
38+
"prisma": "5.12.0",
3939
"tailwindcss": "^3.2.0",
4040
"typescript": "^4.8.4",
41-
"zenstack": "1.1.0"
41+
"zenstack": "^1.12.4"
4242
},
4343
"ct3aMetadata": {
4444
"initVersion": "6.11.3"

prisma/schema.prisma

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ datasource db {
1010

1111
generator client {
1212
provider = "prisma-client-js"
13-
previewFeatures = ["extendedWhereUnique","fieldReference"]
1413
}
1514

1615
/// @@allow('all', auth() != null && auth().id == authorId)

schema.zmodel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ plugin hooks {
1616
}
1717

1818
model Post {
19-
id String @id @default(cuid())
19+
id String @id @default(cuid())
2020
createdAt DateTime @default(now())
2121
updatedAt DateTime @updatedAt
22-
title String
23-
published Boolean @default(false)
24-
authorId String
22+
title String
23+
published Boolean @default(false)
24+
authorId String
2525

2626
// author has full access
2727
@@allow('all', auth() != null && auth().id == authorId)

src/lib/hooks/__model_meta.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/* eslint-disable */
2+
const metadata = {
3+
fields: {
4+
post: {
5+
id: {
6+
name: 'id',
7+
type: 'String',
8+
isId: true,
9+
attributes: [{ name: '@default', args: [] }],
10+
},
11+
createdAt: {
12+
name: 'createdAt',
13+
type: 'DateTime',
14+
attributes: [{ name: '@default', args: [] }],
15+
},
16+
updatedAt: {
17+
name: 'updatedAt',
18+
type: 'DateTime',
19+
attributes: [{ name: '@updatedAt', args: [] }],
20+
},
21+
title: {
22+
name: 'title',
23+
type: 'String',
24+
},
25+
published: {
26+
name: 'published',
27+
type: 'Boolean',
28+
attributes: [{ name: '@default', args: [{ value: false }] }],
29+
},
30+
authorId: {
31+
name: 'authorId',
32+
type: 'String',
33+
},
34+
},
35+
},
36+
uniqueConstraints: {
37+
post: {
38+
id: {
39+
name: 'id',
40+
fields: ['id'],
41+
},
42+
},
43+
},
44+
deleteCascade: {},
45+
};
46+
export default metadata;

0 commit comments

Comments
 (0)