create-keystone-app 5.1.0 → 7.0.0
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 +5 -9
- package/dist/create-keystone-app.cjs.prod.js +5 -9
- package/package.json +3 -3
- package/starter/CHANGELOG.md +6 -0
- package/starter/auth.ts +2 -2
- package/starter/keystone.ts +1 -1
- package/starter/package.json +10 -10
- package/starter/schema.prisma +4 -5
- package/starter/schema.ts +11 -4
- package/starter/.keystone/admin/.next/build-manifest.json +0 -30
- package/starter/.keystone/admin/.next/cache/webpack/client-development/0.pack +0 -0
- package/starter/.keystone/admin/.next/cache/webpack/client-development/index.pack +0 -0
- package/starter/.keystone/admin/.next/cache/webpack/server-development/0.pack +0 -0
- package/starter/.keystone/admin/.next/cache/webpack/server-development/index.pack +0 -0
- package/starter/.keystone/admin/.next/react-loadable-manifest.json +0 -1
- package/starter/.keystone/admin/.next/server/middleware-manifest.json +0 -6
- package/starter/.keystone/admin/.next/server/pages/_app.js +0 -1534
- package/starter/.keystone/admin/.next/server/pages/_document.js +0 -156
- package/starter/.keystone/admin/.next/server/pages/_error.js +0 -56
- package/starter/.keystone/admin/.next/server/pages/api/__keystone_api_build.js +0 -123
- package/starter/.keystone/admin/.next/server/pages-manifest.json +0 -6
- package/starter/.keystone/admin/.next/server/webpack-api-runtime.js +0 -168
- package/starter/.keystone/admin/.next/server/webpack-runtime.js +0 -168
- package/starter/.keystone/admin/.next/static/chunks/amp.js +0 -366
- package/starter/.keystone/admin/.next/static/chunks/main.js +0 -1251
- package/starter/.keystone/admin/.next/static/chunks/pages/_app.js +0 -10481
- package/starter/.keystone/admin/.next/static/chunks/pages/_error.js +0 -28
- package/starter/.keystone/admin/.next/static/chunks/polyfills.js +0 -1
- package/starter/.keystone/admin/.next/static/chunks/react-refresh.js +0 -62
- package/starter/.keystone/admin/.next/static/chunks/webpack.js +0 -1202
- package/starter/.keystone/admin/.next/static/development/_buildManifest.js +0 -1
- package/starter/.keystone/admin/.next/static/development/_middlewareManifest.js +0 -1
- package/starter/.keystone/admin/.next/static/development/_ssgManifest.js +0 -1
- package/starter/.keystone/admin/.next/trace +0 -26
- package/starter/.keystone/admin/next-env.d.ts +0 -6
- package/starter/.keystone/admin/next.config.js +0 -4
- package/starter/.keystone/admin/pages/_app.js +0 -19
- package/starter/.keystone/admin/pages/api/__keystone_api_build.js +0 -3
- package/starter/.keystone/admin/pages/index.js +0 -1
- package/starter/.keystone/admin/pages/init.js +0 -5
- package/starter/.keystone/admin/pages/no-access.js +0 -3
- package/starter/.keystone/admin/pages/posts/[id].js +0 -3
- package/starter/.keystone/admin/pages/posts/index.js +0 -3
- package/starter/.keystone/admin/pages/signin.js +0 -3
- package/starter/.keystone/admin/pages/tags/[id].js +0 -3
- package/starter/.keystone/admin/pages/tags/index.js +0 -3
- package/starter/.keystone/admin/pages/users/[id].js +0 -3
- package/starter/.keystone/admin/pages/users/index.js +0 -3
- package/starter/.keystone/admin/tsconfig.json +0 -22
- package/starter/keystone.db +0 -0
|
@@ -44,7 +44,7 @@ var terminalLink__default = /*#__PURE__*/_interopDefault(terminalLink);
|
|
|
44
44
|
|
|
45
45
|
var currentPkgJson = {
|
|
46
46
|
name: "create-keystone-app",
|
|
47
|
-
version: "
|
|
47
|
+
version: "7.0.0",
|
|
48
48
|
main: "dist/create-keystone-app.cjs.js",
|
|
49
49
|
files: [
|
|
50
50
|
"dist",
|
|
@@ -55,14 +55,14 @@ var currentPkgJson = {
|
|
|
55
55
|
bin: "./bin.js",
|
|
56
56
|
license: "MIT",
|
|
57
57
|
dependencies: {
|
|
58
|
-
"@babel/runtime": "^7.
|
|
58
|
+
"@babel/runtime": "^7.17.2",
|
|
59
59
|
chalk: "^4.1.2",
|
|
60
60
|
enquirer: "^2.3.6",
|
|
61
61
|
execa: "^5.1.1",
|
|
62
62
|
"fs-extra": "^10.0.0",
|
|
63
63
|
meow: "^9.0.0",
|
|
64
64
|
ora: "^5.4.1",
|
|
65
|
-
"package-json": "^
|
|
65
|
+
"package-json": "^7.0.0",
|
|
66
66
|
semver: "^7.3.5",
|
|
67
67
|
"terminal-link": "^2.1.1"
|
|
68
68
|
}
|
|
@@ -97,12 +97,8 @@ Usage
|
|
|
97
97
|
|
|
98
98
|
const versionInfo = () => {
|
|
99
99
|
process.stdout.write('\n');
|
|
100
|
-
console.log(
|
|
101
|
-
|
|
102
|
-
🚏 If you'd like to use ${c__default["default"].bold('Keystone 5')}, please use \`create-keystone-5-app\` instead.
|
|
103
|
-
|
|
104
|
-
📖 Learn more about the changes between ${c__default["default"].bold('Keystone 5')} and ${c__default["default"].bold('Keystone Next')} on our ${terminalLink__default["default"]('website', 'https://keystonejs.com/guides/keystone-5-vs-keystone-next')}.
|
|
105
|
-
`);
|
|
100
|
+
console.log(`✨ You're about to generate a project using ${c__default["default"].bold('Keystone 6')} packages.
|
|
101
|
+
`);
|
|
106
102
|
};
|
|
107
103
|
|
|
108
104
|
async function normalizeArgs() {
|
|
@@ -44,7 +44,7 @@ var terminalLink__default = /*#__PURE__*/_interopDefault(terminalLink);
|
|
|
44
44
|
|
|
45
45
|
var currentPkgJson = {
|
|
46
46
|
name: "create-keystone-app",
|
|
47
|
-
version: "
|
|
47
|
+
version: "7.0.0",
|
|
48
48
|
main: "dist/create-keystone-app.cjs.js",
|
|
49
49
|
files: [
|
|
50
50
|
"dist",
|
|
@@ -55,14 +55,14 @@ var currentPkgJson = {
|
|
|
55
55
|
bin: "./bin.js",
|
|
56
56
|
license: "MIT",
|
|
57
57
|
dependencies: {
|
|
58
|
-
"@babel/runtime": "^7.
|
|
58
|
+
"@babel/runtime": "^7.17.2",
|
|
59
59
|
chalk: "^4.1.2",
|
|
60
60
|
enquirer: "^2.3.6",
|
|
61
61
|
execa: "^5.1.1",
|
|
62
62
|
"fs-extra": "^10.0.0",
|
|
63
63
|
meow: "^9.0.0",
|
|
64
64
|
ora: "^5.4.1",
|
|
65
|
-
"package-json": "^
|
|
65
|
+
"package-json": "^7.0.0",
|
|
66
66
|
semver: "^7.3.5",
|
|
67
67
|
"terminal-link": "^2.1.1"
|
|
68
68
|
}
|
|
@@ -97,12 +97,8 @@ Usage
|
|
|
97
97
|
|
|
98
98
|
const versionInfo = () => {
|
|
99
99
|
process.stdout.write('\n');
|
|
100
|
-
console.log(
|
|
101
|
-
|
|
102
|
-
🚏 If you'd like to use ${c__default["default"].bold('Keystone 5')}, please use \`create-keystone-5-app\` instead.
|
|
103
|
-
|
|
104
|
-
📖 Learn more about the changes between ${c__default["default"].bold('Keystone 5')} and ${c__default["default"].bold('Keystone Next')} on our ${terminalLink__default["default"]('website', 'https://keystonejs.com/guides/keystone-5-vs-keystone-next')}.
|
|
105
|
-
`);
|
|
100
|
+
console.log(`✨ You're about to generate a project using ${c__default["default"].bold('Keystone 6')} packages.
|
|
101
|
+
`);
|
|
106
102
|
};
|
|
107
103
|
|
|
108
104
|
async function normalizeArgs() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-keystone-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"main": "dist/create-keystone-app.cjs.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"bin": "./bin.js",
|
|
12
12
|
"license": "MIT",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@babel/runtime": "^7.
|
|
14
|
+
"@babel/runtime": "^7.17.2",
|
|
15
15
|
"chalk": "^4.1.2",
|
|
16
16
|
"enquirer": "^2.3.6",
|
|
17
17
|
"execa": "^5.1.1",
|
|
18
18
|
"fs-extra": "^10.0.0",
|
|
19
19
|
"meow": "^9.0.0",
|
|
20
20
|
"ora": "^5.4.1",
|
|
21
|
-
"package-json": "^
|
|
21
|
+
"package-json": "^7.0.0",
|
|
22
22
|
"semver": "^7.3.5",
|
|
23
23
|
"terminal-link": "^2.1.1"
|
|
24
24
|
}
|
package/starter/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# keystone-next-app
|
|
2
2
|
|
|
3
|
+
## 5.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#260](https://github.com/keystonejs/create-keystone-app/pull/260) [`6288ac4`](https://github.com/keystonejs/create-keystone-app/commit/6288ac493d82a4f4f669f70daa2f24cefd8e375e) Thanks [@bladey](https://github.com/bladey)! - Updated to use Keystone 6.
|
|
8
|
+
|
|
3
9
|
## 3.1.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/starter/auth.ts
CHANGED
|
@@ -7,10 +7,10 @@ Welcome to the auth file! Here we have put a config to do basic auth in Keystone
|
|
|
7
7
|
For more on auth, check out: https://keystonejs.com/docs/apis/auth#authentication-api
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { createAuth } from '@keystone-
|
|
10
|
+
import { createAuth } from '@keystone-6/auth';
|
|
11
11
|
|
|
12
12
|
// See https://keystonejs.com/docs/apis/session#session-api for the session docs
|
|
13
|
-
import { statelessSessions } from '@keystone-
|
|
13
|
+
import { statelessSessions } from '@keystone-6/core/session';
|
|
14
14
|
|
|
15
15
|
let sessionSecret = process.env.SESSION_SECRET;
|
|
16
16
|
|
package/starter/keystone.ts
CHANGED
|
@@ -6,7 +6,7 @@ It looks at the default export, and expects a Keystone config object.
|
|
|
6
6
|
You can find all the config options in our docs here: https://keystonejs.com/docs/apis/config
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { config } from '@keystone-
|
|
9
|
+
import { config } from '@keystone-6/core';
|
|
10
10
|
|
|
11
11
|
// Look in the schema file for how we define our lists, and how users interact with them through graphql or the Admin UI
|
|
12
12
|
import { lists } from './schema';
|
package/starter/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "keystone-app",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"scripts": {
|
|
6
|
-
"dev": "keystone
|
|
7
|
-
"start": "keystone
|
|
8
|
-
"build": "keystone
|
|
9
|
-
"postinstall": "keystone
|
|
6
|
+
"dev": "keystone dev",
|
|
7
|
+
"start": "keystone start",
|
|
8
|
+
"build": "keystone build",
|
|
9
|
+
"postinstall": "keystone postinstall"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@keystone-
|
|
13
|
-
"@keystone-
|
|
14
|
-
"@keystone-
|
|
15
|
-
"typescript": "^4.
|
|
12
|
+
"@keystone-6/auth": "^3.0.0",
|
|
13
|
+
"@keystone-6/core": "^2.0.0",
|
|
14
|
+
"@keystone-6/fields-document": "^3.0.0",
|
|
15
|
+
"typescript": "^4.5.4"
|
|
16
16
|
},
|
|
17
17
|
"engines": {
|
|
18
|
-
"node": "^
|
|
18
|
+
"node": "^14.15 || ^16.13"
|
|
19
19
|
}
|
|
20
20
|
}
|
package/starter/schema.prisma
CHANGED
|
@@ -7,9 +7,8 @@ datasource sqlite {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
generator client {
|
|
10
|
-
provider
|
|
11
|
-
output
|
|
12
|
-
engineType = "binary"
|
|
10
|
+
provider = "prisma-client-js"
|
|
11
|
+
output = "node_modules/.prisma/client"
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
model User {
|
|
@@ -28,7 +27,7 @@ model Post {
|
|
|
28
27
|
publishDate DateTime?
|
|
29
28
|
author User? @relation("Post_author", fields: [authorId], references: [id])
|
|
30
29
|
authorId String? @map("author")
|
|
31
|
-
tags Tag[] @relation("
|
|
30
|
+
tags Tag[] @relation("Post_tags")
|
|
32
31
|
|
|
33
32
|
@@index([authorId])
|
|
34
33
|
}
|
|
@@ -36,5 +35,5 @@ model Post {
|
|
|
36
35
|
model Tag {
|
|
37
36
|
id String @id @default(cuid())
|
|
38
37
|
name String @default("")
|
|
39
|
-
posts Post[] @relation("
|
|
38
|
+
posts Post[] @relation("Post_tags")
|
|
40
39
|
}
|
package/starter/schema.ts
CHANGED
|
@@ -15,7 +15,7 @@ A field: The individual bits of data on your list, each with its own type.
|
|
|
15
15
|
// Like the `config` function we use in keystone.ts, we use functions
|
|
16
16
|
// for putting in our config so we get useful errors. With typescript,
|
|
17
17
|
// we get these even before code runs.
|
|
18
|
-
import { list } from '@keystone-
|
|
18
|
+
import { list } from '@keystone-6/core';
|
|
19
19
|
|
|
20
20
|
// We're using some common fields in the starter. Check out https://keystonejs.com/docs/apis/fields#fields-api
|
|
21
21
|
// for the full list of fields.
|
|
@@ -25,16 +25,22 @@ import {
|
|
|
25
25
|
password,
|
|
26
26
|
timestamp,
|
|
27
27
|
select,
|
|
28
|
-
} from '@keystone-
|
|
28
|
+
} from '@keystone-6/core/fields';
|
|
29
29
|
// The document field is a more complicated field, so it's in its own package
|
|
30
30
|
// Keystone aims to have all the base field types, but you can make your own
|
|
31
31
|
// custom ones.
|
|
32
|
-
import { document } from '@keystone-
|
|
32
|
+
import { document } from '@keystone-6/fields-document';
|
|
33
|
+
|
|
34
|
+
// We are using Typescript, and we want our types experience to be as strict as it can be.
|
|
35
|
+
// By providing the Keystone generated `Lists` type to our lists object, we refine
|
|
36
|
+
// our types to a stricter subset that is type-aware of other lists in our schema
|
|
37
|
+
// that Typescript cannot easily infer.
|
|
38
|
+
import { Lists } from '.keystone/types';
|
|
33
39
|
|
|
34
40
|
// We have a users list, a blogs list, and tags for blog posts, so they can be filtered.
|
|
35
41
|
// Each property on the exported object will become the name of a list (a.k.a. the `listKey`),
|
|
36
42
|
// with the value being the definition of the list, including the fields.
|
|
37
|
-
export const lists = {
|
|
43
|
+
export const lists: Lists = {
|
|
38
44
|
// Here we define the user list.
|
|
39
45
|
User: list({
|
|
40
46
|
// Here are the fields that `User` will have. We want an email and password so they can log in
|
|
@@ -105,6 +111,7 @@ export const lists = {
|
|
|
105
111
|
cardFields: ['name', 'email'],
|
|
106
112
|
inlineEdit: { fields: ['name', 'email'] },
|
|
107
113
|
linkToItem: true,
|
|
114
|
+
inlineConnect: true,
|
|
108
115
|
inlineCreate: { fields: ['name', 'email'] },
|
|
109
116
|
},
|
|
110
117
|
}),
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"polyfillFiles": [
|
|
3
|
-
"static/chunks/polyfills.js"
|
|
4
|
-
],
|
|
5
|
-
"devFiles": [
|
|
6
|
-
"static/chunks/react-refresh.js"
|
|
7
|
-
],
|
|
8
|
-
"ampDevFiles": [
|
|
9
|
-
"static/chunks/webpack.js",
|
|
10
|
-
"static/chunks/amp.js"
|
|
11
|
-
],
|
|
12
|
-
"lowPriorityFiles": [
|
|
13
|
-
"static/development/_buildManifest.js",
|
|
14
|
-
"static/development/_ssgManifest.js",
|
|
15
|
-
"static/development/_middlewareManifest.js"
|
|
16
|
-
],
|
|
17
|
-
"pages": {
|
|
18
|
-
"/_app": [
|
|
19
|
-
"static/chunks/webpack.js",
|
|
20
|
-
"static/chunks/main.js",
|
|
21
|
-
"static/chunks/pages/_app.js"
|
|
22
|
-
],
|
|
23
|
-
"/_error": [
|
|
24
|
-
"static/chunks/webpack.js",
|
|
25
|
-
"static/chunks/main.js",
|
|
26
|
-
"static/chunks/pages/_error.js"
|
|
27
|
-
]
|
|
28
|
-
},
|
|
29
|
-
"ampFirstPages": []
|
|
30
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{}
|