create-keystone-app 8.0.0 → 8.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/package.json
CHANGED
|
@@ -104,7 +104,7 @@ var import_crypto = require("crypto");
|
|
|
104
104
|
var import_auth = require("@keystone-6/auth");
|
|
105
105
|
var import_session = require("@keystone-6/core/session");
|
|
106
106
|
var sessionSecret = process.env.SESSION_SECRET;
|
|
107
|
-
if (!sessionSecret &&
|
|
107
|
+
if (!sessionSecret && process.env.NODE_ENV !== "production") {
|
|
108
108
|
sessionSecret = (0, import_crypto.randomBytes)(32).toString("hex");
|
|
109
109
|
}
|
|
110
110
|
var { withAuth } = (0, import_auth.createAuth)({
|
|
@@ -112,7 +112,7 @@ var { withAuth } = (0, import_auth.createAuth)({
|
|
|
112
112
|
identityField: "email",
|
|
113
113
|
sessionData: "name createdAt",
|
|
114
114
|
secretField: "password",
|
|
115
|
-
initFirstItem:
|
|
115
|
+
initFirstItem: {
|
|
116
116
|
fields: ["name", "email", "password"]
|
|
117
117
|
}
|
|
118
118
|
});
|
|
@@ -133,3 +133,5 @@ var keystone_default = withAuth(
|
|
|
133
133
|
session
|
|
134
134
|
})
|
|
135
135
|
);
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {});
|
package/starter/auth.ts
CHANGED
|
@@ -39,20 +39,17 @@ const { withAuth } = createAuth({
|
|
|
39
39
|
sessionData: 'name createdAt',
|
|
40
40
|
secretField: 'password',
|
|
41
41
|
|
|
42
|
-
//
|
|
42
|
+
// WARNING: remove initFirstItem functionality in production
|
|
43
43
|
// see https://keystonejs.com/docs/config/auth#init-first-item for more
|
|
44
|
-
initFirstItem:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
// you are asking the Keystone AdminUI to create a new user
|
|
50
|
-
// providing inputs for these fields
|
|
51
|
-
fields: ['name', 'email', 'password'],
|
|
44
|
+
initFirstItem: {
|
|
45
|
+
// if there are no items in the database, by configuring this field
|
|
46
|
+
// you are asking the Keystone AdminUI to create a new user
|
|
47
|
+
// providing inputs for these fields
|
|
48
|
+
fields: ['name', 'email', 'password'],
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
// it uses context.sudo() to do this, which bypasses any access control you might have
|
|
51
|
+
// you shouldn't use this in production
|
|
52
|
+
},
|
|
56
53
|
});
|
|
57
54
|
|
|
58
55
|
// statelessSessions uses cookies for session tracking
|
package/starter/package.json
CHANGED
|
@@ -8,9 +8,7 @@
|
|
|
8
8
|
"build": "keystone build",
|
|
9
9
|
"postinstall": "keystone postinstall"
|
|
10
10
|
},
|
|
11
|
-
"// @aws-sdk": "temporary dependency until https://github.com/keystonejs/keystone/issues/8023 is resolved",
|
|
12
11
|
"dependencies": {
|
|
13
|
-
"@aws-sdk/util-endpoints": "^3.192.0",
|
|
14
12
|
"@keystone-6/auth": "^5.0.0",
|
|
15
13
|
"@keystone-6/core": "^3.0.1",
|
|
16
14
|
"@keystone-6/fields-document": "^5.0.0",
|