create-keystone-app 10.0.0 → 10.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/create-keystone-app.cjs.dev.js +2 -2
- package/dist/create-keystone-app.cjs.prod.js +2 -2
- package/dist/create-keystone-app.esm.js +2 -2
- package/package.json +1 -1
- package/starter/auth.ts +1 -8
- package/starter/package.json +1 -2
- package/starter/schema.graphql +0 -424
- package/starter/schema.prisma +0 -38
|
@@ -23,7 +23,7 @@ var ora__default = /*#__PURE__*/_interopDefault(ora);
|
|
|
23
23
|
|
|
24
24
|
var thisPackage = {
|
|
25
25
|
name: "create-keystone-app",
|
|
26
|
-
version: "10.0.
|
|
26
|
+
version: "10.0.2",
|
|
27
27
|
license: "MIT",
|
|
28
28
|
type: "module",
|
|
29
29
|
main: "dist/create-keystone-app.cjs.js",
|
|
@@ -95,7 +95,7 @@ async function normalizeArgs() {
|
|
|
95
95
|
const normalizedArgs = await normalizeArgs();
|
|
96
96
|
const nextCwd = normalizedArgs.directory;
|
|
97
97
|
await fs__default["default"].mkdir(nextCwd);
|
|
98
|
-
await Promise.all(['_gitignore', 'schema.ts', 'package.json', 'tsconfig.json', '
|
|
98
|
+
await Promise.all(['_gitignore', 'schema.ts', 'package.json', 'tsconfig.json', 'keystone.ts', 'auth.ts', 'README.md'].map(filename => fs__default["default"].copyFile(path__default["default"].join(starterDir, filename), path__default["default"].join(normalizedArgs.directory, filename.replace(/^_/, '.')))));
|
|
99
99
|
const [packageManager] = (_process$env$npm_conf = (_process$env$npm_conf2 = process.env.npm_config_user_agent) === null || _process$env$npm_conf2 === void 0 ? void 0 : _process$env$npm_conf2.split('/', 1)) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : ['npm'];
|
|
100
100
|
const spinner = ora__default["default"](`Installing dependencies with ${packageManager}. This may take a few minutes.`).start();
|
|
101
101
|
try {
|
|
@@ -23,7 +23,7 @@ var ora__default = /*#__PURE__*/_interopDefault(ora);
|
|
|
23
23
|
|
|
24
24
|
var thisPackage = {
|
|
25
25
|
name: "create-keystone-app",
|
|
26
|
-
version: "10.0.
|
|
26
|
+
version: "10.0.2",
|
|
27
27
|
license: "MIT",
|
|
28
28
|
type: "module",
|
|
29
29
|
main: "dist/create-keystone-app.cjs.js",
|
|
@@ -95,7 +95,7 @@ async function normalizeArgs() {
|
|
|
95
95
|
const normalizedArgs = await normalizeArgs();
|
|
96
96
|
const nextCwd = normalizedArgs.directory;
|
|
97
97
|
await fs__default["default"].mkdir(nextCwd);
|
|
98
|
-
await Promise.all(['_gitignore', 'schema.ts', 'package.json', 'tsconfig.json', '
|
|
98
|
+
await Promise.all(['_gitignore', 'schema.ts', 'package.json', 'tsconfig.json', 'keystone.ts', 'auth.ts', 'README.md'].map(filename => fs__default["default"].copyFile(path__default["default"].join(starterDir, filename), path__default["default"].join(normalizedArgs.directory, filename.replace(/^_/, '.')))));
|
|
99
99
|
const [packageManager] = (_process$env$npm_conf = (_process$env$npm_conf2 = process.env.npm_config_user_agent) === null || _process$env$npm_conf2 === void 0 ? void 0 : _process$env$npm_conf2.split('/', 1)) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : ['npm'];
|
|
100
100
|
const spinner = ora__default["default"](`Installing dependencies with ${packageManager}. This may take a few minutes.`).start();
|
|
101
101
|
try {
|
|
@@ -10,7 +10,7 @@ import ora from 'ora';
|
|
|
10
10
|
|
|
11
11
|
var thisPackage = {
|
|
12
12
|
name: "create-keystone-app",
|
|
13
|
-
version: "10.0.
|
|
13
|
+
version: "10.0.2",
|
|
14
14
|
license: "MIT",
|
|
15
15
|
type: "module",
|
|
16
16
|
main: "dist/create-keystone-app.cjs.js",
|
|
@@ -82,7 +82,7 @@ async function normalizeArgs() {
|
|
|
82
82
|
const normalizedArgs = await normalizeArgs();
|
|
83
83
|
const nextCwd = normalizedArgs.directory;
|
|
84
84
|
await fs.mkdir(nextCwd);
|
|
85
|
-
await Promise.all(['_gitignore', 'schema.ts', 'package.json', 'tsconfig.json', '
|
|
85
|
+
await Promise.all(['_gitignore', 'schema.ts', 'package.json', 'tsconfig.json', 'keystone.ts', 'auth.ts', 'README.md'].map(filename => fs.copyFile(path.join(starterDir, filename), path.join(normalizedArgs.directory, filename.replace(/^_/, '.')))));
|
|
86
86
|
const [packageManager] = (_process$env$npm_conf = (_process$env$npm_conf2 = process.env.npm_config_user_agent) === null || _process$env$npm_conf2 === void 0 ? void 0 : _process$env$npm_conf2.split('/', 1)) !== null && _process$env$npm_conf !== void 0 ? _process$env$npm_conf : ['npm'];
|
|
87
87
|
const spinner = ora(`Installing dependencies with ${packageManager}. This may take a few minutes.`).start();
|
|
88
88
|
try {
|
package/package.json
CHANGED
package/starter/auth.ts
CHANGED
|
@@ -21,13 +21,6 @@ import { createAuth } from '@keystone-6/auth'
|
|
|
21
21
|
// see https://keystonejs.com/docs/apis/session for the session docs
|
|
22
22
|
import { statelessSessions } from '@keystone-6/core/session'
|
|
23
23
|
|
|
24
|
-
// for a stateless session, a SESSION_SECRET should always be provided
|
|
25
|
-
// especially in production (statelessSessions will throw if SESSION_SECRET is undefined)
|
|
26
|
-
let sessionSecret = process.env.SESSION_SECRET
|
|
27
|
-
if (!sessionSecret && process.env.NODE_ENV !== 'production') {
|
|
28
|
-
sessionSecret = randomBytes(32).toString('hex')
|
|
29
|
-
}
|
|
30
|
-
|
|
31
24
|
// withAuth is a function we can use to wrap our base configuration
|
|
32
25
|
const { withAuth } = createAuth({
|
|
33
26
|
listKey: 'User',
|
|
@@ -60,7 +53,7 @@ const sessionMaxAge = 60 * 60 * 24 * 30
|
|
|
60
53
|
// you can find out more at https://keystonejs.com/docs/apis/session#session-api
|
|
61
54
|
const session = statelessSessions({
|
|
62
55
|
maxAge: sessionMaxAge,
|
|
63
|
-
secret:
|
|
56
|
+
secret: process.env.SESSION_SECRET,
|
|
64
57
|
})
|
|
65
58
|
|
|
66
59
|
export { withAuth, session }
|
package/starter/package.json
CHANGED
package/starter/schema.graphql
DELETED
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
# This file is automatically generated by Keystone, do not modify it manually.
|
|
2
|
-
# Modify your Keystone config when you want to change this.
|
|
3
|
-
|
|
4
|
-
type User {
|
|
5
|
-
id: ID!
|
|
6
|
-
name: String
|
|
7
|
-
email: String
|
|
8
|
-
password: PasswordState
|
|
9
|
-
posts(where: PostWhereInput! = {}, orderBy: [PostOrderByInput!]! = [], take: Int, skip: Int! = 0, cursor: PostWhereUniqueInput): [Post!]
|
|
10
|
-
postsCount(where: PostWhereInput! = {}): Int
|
|
11
|
-
createdAt: DateTime
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
type PasswordState {
|
|
15
|
-
isSet: Boolean!
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
scalar DateTime @specifiedBy(url: "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6")
|
|
19
|
-
|
|
20
|
-
input UserWhereUniqueInput {
|
|
21
|
-
id: ID
|
|
22
|
-
email: String
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
input UserWhereInput {
|
|
26
|
-
AND: [UserWhereInput!]
|
|
27
|
-
OR: [UserWhereInput!]
|
|
28
|
-
NOT: [UserWhereInput!]
|
|
29
|
-
id: IDFilter
|
|
30
|
-
name: StringFilter
|
|
31
|
-
email: StringFilter
|
|
32
|
-
posts: PostManyRelationFilter
|
|
33
|
-
createdAt: DateTimeNullableFilter
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
input IDFilter {
|
|
37
|
-
equals: ID
|
|
38
|
-
in: [ID!]
|
|
39
|
-
notIn: [ID!]
|
|
40
|
-
lt: ID
|
|
41
|
-
lte: ID
|
|
42
|
-
gt: ID
|
|
43
|
-
gte: ID
|
|
44
|
-
not: IDFilter
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
input StringFilter {
|
|
48
|
-
equals: String
|
|
49
|
-
in: [String!]
|
|
50
|
-
notIn: [String!]
|
|
51
|
-
lt: String
|
|
52
|
-
lte: String
|
|
53
|
-
gt: String
|
|
54
|
-
gte: String
|
|
55
|
-
contains: String
|
|
56
|
-
startsWith: String
|
|
57
|
-
endsWith: String
|
|
58
|
-
not: NestedStringFilter
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
input NestedStringFilter {
|
|
62
|
-
equals: String
|
|
63
|
-
in: [String!]
|
|
64
|
-
notIn: [String!]
|
|
65
|
-
lt: String
|
|
66
|
-
lte: String
|
|
67
|
-
gt: String
|
|
68
|
-
gte: String
|
|
69
|
-
contains: String
|
|
70
|
-
startsWith: String
|
|
71
|
-
endsWith: String
|
|
72
|
-
not: NestedStringFilter
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
input PostManyRelationFilter {
|
|
76
|
-
every: PostWhereInput
|
|
77
|
-
some: PostWhereInput
|
|
78
|
-
none: PostWhereInput
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
input DateTimeNullableFilter {
|
|
82
|
-
equals: DateTime
|
|
83
|
-
in: [DateTime!]
|
|
84
|
-
notIn: [DateTime!]
|
|
85
|
-
lt: DateTime
|
|
86
|
-
lte: DateTime
|
|
87
|
-
gt: DateTime
|
|
88
|
-
gte: DateTime
|
|
89
|
-
not: DateTimeNullableFilter
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
input UserOrderByInput {
|
|
93
|
-
id: OrderDirection
|
|
94
|
-
name: OrderDirection
|
|
95
|
-
email: OrderDirection
|
|
96
|
-
createdAt: OrderDirection
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
enum OrderDirection {
|
|
100
|
-
asc
|
|
101
|
-
desc
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
input UserUpdateInput {
|
|
105
|
-
name: String
|
|
106
|
-
email: String
|
|
107
|
-
password: String
|
|
108
|
-
posts: PostRelateToManyForUpdateInput
|
|
109
|
-
createdAt: DateTime
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
input PostRelateToManyForUpdateInput {
|
|
113
|
-
disconnect: [PostWhereUniqueInput!]
|
|
114
|
-
set: [PostWhereUniqueInput!]
|
|
115
|
-
create: [PostCreateInput!]
|
|
116
|
-
connect: [PostWhereUniqueInput!]
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
input UserUpdateArgs {
|
|
120
|
-
where: UserWhereUniqueInput!
|
|
121
|
-
data: UserUpdateInput!
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
input UserCreateInput {
|
|
125
|
-
name: String
|
|
126
|
-
email: String
|
|
127
|
-
password: String
|
|
128
|
-
posts: PostRelateToManyForCreateInput
|
|
129
|
-
createdAt: DateTime
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
input PostRelateToManyForCreateInput {
|
|
133
|
-
create: [PostCreateInput!]
|
|
134
|
-
connect: [PostWhereUniqueInput!]
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
type Post {
|
|
138
|
-
id: ID!
|
|
139
|
-
title: String
|
|
140
|
-
content: Post_content_Document
|
|
141
|
-
author: User
|
|
142
|
-
tags(where: TagWhereInput! = {}, orderBy: [TagOrderByInput!]! = [], take: Int, skip: Int! = 0, cursor: TagWhereUniqueInput): [Tag!]
|
|
143
|
-
tagsCount(where: TagWhereInput! = {}): Int
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
type Post_content_Document {
|
|
147
|
-
document(hydrateRelationships: Boolean! = false): JSON!
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
input PostWhereUniqueInput {
|
|
151
|
-
id: ID
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
input PostWhereInput {
|
|
155
|
-
AND: [PostWhereInput!]
|
|
156
|
-
OR: [PostWhereInput!]
|
|
157
|
-
NOT: [PostWhereInput!]
|
|
158
|
-
id: IDFilter
|
|
159
|
-
title: StringFilter
|
|
160
|
-
author: UserWhereInput
|
|
161
|
-
tags: TagManyRelationFilter
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
input TagManyRelationFilter {
|
|
165
|
-
every: TagWhereInput
|
|
166
|
-
some: TagWhereInput
|
|
167
|
-
none: TagWhereInput
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
input PostOrderByInput {
|
|
171
|
-
id: OrderDirection
|
|
172
|
-
title: OrderDirection
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
input PostUpdateInput {
|
|
176
|
-
title: String
|
|
177
|
-
content: JSON
|
|
178
|
-
author: UserRelateToOneForUpdateInput
|
|
179
|
-
tags: TagRelateToManyForUpdateInput
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
input UserRelateToOneForUpdateInput {
|
|
183
|
-
create: UserCreateInput
|
|
184
|
-
connect: UserWhereUniqueInput
|
|
185
|
-
disconnect: Boolean
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
input TagRelateToManyForUpdateInput {
|
|
189
|
-
disconnect: [TagWhereUniqueInput!]
|
|
190
|
-
set: [TagWhereUniqueInput!]
|
|
191
|
-
create: [TagCreateInput!]
|
|
192
|
-
connect: [TagWhereUniqueInput!]
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
input PostUpdateArgs {
|
|
196
|
-
where: PostWhereUniqueInput!
|
|
197
|
-
data: PostUpdateInput!
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
input PostCreateInput {
|
|
201
|
-
title: String
|
|
202
|
-
content: JSON
|
|
203
|
-
author: UserRelateToOneForCreateInput
|
|
204
|
-
tags: TagRelateToManyForCreateInput
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
input UserRelateToOneForCreateInput {
|
|
208
|
-
create: UserCreateInput
|
|
209
|
-
connect: UserWhereUniqueInput
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
input TagRelateToManyForCreateInput {
|
|
213
|
-
create: [TagCreateInput!]
|
|
214
|
-
connect: [TagWhereUniqueInput!]
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
type Tag {
|
|
218
|
-
id: ID!
|
|
219
|
-
name: String
|
|
220
|
-
posts(where: PostWhereInput! = {}, orderBy: [PostOrderByInput!]! = [], take: Int, skip: Int! = 0, cursor: PostWhereUniqueInput): [Post!]
|
|
221
|
-
postsCount(where: PostWhereInput! = {}): Int
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
input TagWhereUniqueInput {
|
|
225
|
-
id: ID
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
input TagWhereInput {
|
|
229
|
-
AND: [TagWhereInput!]
|
|
230
|
-
OR: [TagWhereInput!]
|
|
231
|
-
NOT: [TagWhereInput!]
|
|
232
|
-
id: IDFilter
|
|
233
|
-
name: StringFilter
|
|
234
|
-
posts: PostManyRelationFilter
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
input TagOrderByInput {
|
|
238
|
-
id: OrderDirection
|
|
239
|
-
name: OrderDirection
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
input TagUpdateInput {
|
|
243
|
-
name: String
|
|
244
|
-
posts: PostRelateToManyForUpdateInput
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
input TagUpdateArgs {
|
|
248
|
-
where: TagWhereUniqueInput!
|
|
249
|
-
data: TagUpdateInput!
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
input TagCreateInput {
|
|
253
|
-
name: String
|
|
254
|
-
posts: PostRelateToManyForCreateInput
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
"""
|
|
258
|
-
The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).
|
|
259
|
-
"""
|
|
260
|
-
scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf")
|
|
261
|
-
|
|
262
|
-
type Mutation {
|
|
263
|
-
createUser(data: UserCreateInput!): User
|
|
264
|
-
createUsers(data: [UserCreateInput!]!): [User]
|
|
265
|
-
updateUser(where: UserWhereUniqueInput!, data: UserUpdateInput!): User
|
|
266
|
-
updateUsers(data: [UserUpdateArgs!]!): [User]
|
|
267
|
-
deleteUser(where: UserWhereUniqueInput!): User
|
|
268
|
-
deleteUsers(where: [UserWhereUniqueInput!]!): [User]
|
|
269
|
-
createPost(data: PostCreateInput!): Post
|
|
270
|
-
createPosts(data: [PostCreateInput!]!): [Post]
|
|
271
|
-
updatePost(where: PostWhereUniqueInput!, data: PostUpdateInput!): Post
|
|
272
|
-
updatePosts(data: [PostUpdateArgs!]!): [Post]
|
|
273
|
-
deletePost(where: PostWhereUniqueInput!): Post
|
|
274
|
-
deletePosts(where: [PostWhereUniqueInput!]!): [Post]
|
|
275
|
-
createTag(data: TagCreateInput!): Tag
|
|
276
|
-
createTags(data: [TagCreateInput!]!): [Tag]
|
|
277
|
-
updateTag(where: TagWhereUniqueInput!, data: TagUpdateInput!): Tag
|
|
278
|
-
updateTags(data: [TagUpdateArgs!]!): [Tag]
|
|
279
|
-
deleteTag(where: TagWhereUniqueInput!): Tag
|
|
280
|
-
deleteTags(where: [TagWhereUniqueInput!]!): [Tag]
|
|
281
|
-
endSession: Boolean!
|
|
282
|
-
authenticateUserWithPassword(email: String!, password: String!): UserAuthenticationWithPasswordResult
|
|
283
|
-
createInitialUser(data: CreateInitialUserInput!): UserAuthenticationWithPasswordSuccess!
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
union UserAuthenticationWithPasswordResult = UserAuthenticationWithPasswordSuccess | UserAuthenticationWithPasswordFailure
|
|
287
|
-
|
|
288
|
-
type UserAuthenticationWithPasswordSuccess {
|
|
289
|
-
sessionToken: String!
|
|
290
|
-
item: User!
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
type UserAuthenticationWithPasswordFailure {
|
|
294
|
-
message: String!
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
input CreateInitialUserInput {
|
|
298
|
-
name: String
|
|
299
|
-
email: String
|
|
300
|
-
password: String
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
type Query {
|
|
304
|
-
users(where: UserWhereInput! = {}, orderBy: [UserOrderByInput!]! = [], take: Int, skip: Int! = 0, cursor: UserWhereUniqueInput): [User!]
|
|
305
|
-
user(where: UserWhereUniqueInput!): User
|
|
306
|
-
usersCount(where: UserWhereInput! = {}): Int
|
|
307
|
-
posts(where: PostWhereInput! = {}, orderBy: [PostOrderByInput!]! = [], take: Int, skip: Int! = 0, cursor: PostWhereUniqueInput): [Post!]
|
|
308
|
-
post(where: PostWhereUniqueInput!): Post
|
|
309
|
-
postsCount(where: PostWhereInput! = {}): Int
|
|
310
|
-
tags(where: TagWhereInput! = {}, orderBy: [TagOrderByInput!]! = [], take: Int, skip: Int! = 0, cursor: TagWhereUniqueInput): [Tag!]
|
|
311
|
-
tag(where: TagWhereUniqueInput!): Tag
|
|
312
|
-
tagsCount(where: TagWhereInput! = {}): Int
|
|
313
|
-
keystone: KeystoneMeta!
|
|
314
|
-
authenticatedItem: AuthenticatedItem
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
union AuthenticatedItem = User
|
|
318
|
-
|
|
319
|
-
type KeystoneMeta {
|
|
320
|
-
adminMeta: KeystoneAdminMeta!
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
type KeystoneAdminMeta {
|
|
324
|
-
lists: [KeystoneAdminUIListMeta!]!
|
|
325
|
-
list(key: String!): KeystoneAdminUIListMeta
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
type KeystoneAdminUIListMeta {
|
|
329
|
-
key: String!
|
|
330
|
-
itemQueryName: String!
|
|
331
|
-
listQueryName: String!
|
|
332
|
-
hideCreate: Boolean!
|
|
333
|
-
hideDelete: Boolean!
|
|
334
|
-
path: String!
|
|
335
|
-
label: String!
|
|
336
|
-
singular: String!
|
|
337
|
-
plural: String!
|
|
338
|
-
description: String
|
|
339
|
-
initialColumns: [String!]!
|
|
340
|
-
pageSize: Int!
|
|
341
|
-
labelField: String!
|
|
342
|
-
fields: [KeystoneAdminUIFieldMeta!]!
|
|
343
|
-
groups: [KeystoneAdminUIFieldGroupMeta!]!
|
|
344
|
-
initialSort: KeystoneAdminUISort
|
|
345
|
-
isHidden: Boolean!
|
|
346
|
-
isSingleton: Boolean!
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
type KeystoneAdminUIFieldMeta {
|
|
350
|
-
path: String!
|
|
351
|
-
label: String!
|
|
352
|
-
description: String
|
|
353
|
-
isOrderable: Boolean!
|
|
354
|
-
isFilterable: Boolean!
|
|
355
|
-
isNonNull: [KeystoneAdminUIFieldMetaIsNonNull!]
|
|
356
|
-
fieldMeta: JSON
|
|
357
|
-
viewsIndex: Int!
|
|
358
|
-
customViewsIndex: Int
|
|
359
|
-
createView: KeystoneAdminUIFieldMetaCreateView!
|
|
360
|
-
listView: KeystoneAdminUIFieldMetaListView!
|
|
361
|
-
itemView(id: ID): KeystoneAdminUIFieldMetaItemView
|
|
362
|
-
search: QueryMode
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
enum KeystoneAdminUIFieldMetaIsNonNull {
|
|
366
|
-
read
|
|
367
|
-
create
|
|
368
|
-
update
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
type KeystoneAdminUIFieldMetaCreateView {
|
|
372
|
-
fieldMode: KeystoneAdminUIFieldMetaCreateViewFieldMode!
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
enum KeystoneAdminUIFieldMetaCreateViewFieldMode {
|
|
376
|
-
edit
|
|
377
|
-
hidden
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
type KeystoneAdminUIFieldMetaListView {
|
|
381
|
-
fieldMode: KeystoneAdminUIFieldMetaListViewFieldMode!
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
enum KeystoneAdminUIFieldMetaListViewFieldMode {
|
|
385
|
-
read
|
|
386
|
-
hidden
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
type KeystoneAdminUIFieldMetaItemView {
|
|
390
|
-
fieldMode: KeystoneAdminUIFieldMetaItemViewFieldMode
|
|
391
|
-
fieldPosition: KeystoneAdminUIFieldMetaItemViewFieldPosition
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
enum KeystoneAdminUIFieldMetaItemViewFieldMode {
|
|
395
|
-
edit
|
|
396
|
-
read
|
|
397
|
-
hidden
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
enum KeystoneAdminUIFieldMetaItemViewFieldPosition {
|
|
401
|
-
form
|
|
402
|
-
sidebar
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
enum QueryMode {
|
|
406
|
-
default
|
|
407
|
-
insensitive
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
type KeystoneAdminUIFieldGroupMeta {
|
|
411
|
-
label: String!
|
|
412
|
-
description: String
|
|
413
|
-
fields: [KeystoneAdminUIFieldMeta!]!
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
type KeystoneAdminUISort {
|
|
417
|
-
field: String!
|
|
418
|
-
direction: KeystoneAdminUISortDirection!
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
enum KeystoneAdminUISortDirection {
|
|
422
|
-
ASC
|
|
423
|
-
DESC
|
|
424
|
-
}
|
package/starter/schema.prisma
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// This file is automatically generated by Keystone, do not modify it manually.
|
|
2
|
-
// Modify your Keystone config when you want to change this.
|
|
3
|
-
|
|
4
|
-
datasource sqlite {
|
|
5
|
-
url = env("DATABASE_URL")
|
|
6
|
-
shadowDatabaseUrl = env("SHADOW_DATABASE_URL")
|
|
7
|
-
provider = "sqlite"
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
generator client {
|
|
11
|
-
provider = "prisma-client-js"
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
model User {
|
|
15
|
-
id String @id @default(cuid())
|
|
16
|
-
name String @default("")
|
|
17
|
-
email String @unique @default("")
|
|
18
|
-
password String
|
|
19
|
-
posts Post[] @relation("Post_author")
|
|
20
|
-
createdAt DateTime? @default(now())
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
model Post {
|
|
24
|
-
id String @id @default(cuid())
|
|
25
|
-
title String @default("")
|
|
26
|
-
content String @default("[{\"type\":\"paragraph\",\"children\":[{\"text\":\"\"}]}]")
|
|
27
|
-
author User? @relation("Post_author", fields: [authorId], references: [id])
|
|
28
|
-
authorId String? @map("author")
|
|
29
|
-
tags Tag[] @relation("Post_tags")
|
|
30
|
-
|
|
31
|
-
@@index([authorId])
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
model Tag {
|
|
35
|
-
id String @id @default(cuid())
|
|
36
|
-
name String @default("")
|
|
37
|
-
posts Post[] @relation("Post_tags")
|
|
38
|
-
}
|