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.
@@ -44,7 +44,7 @@ var terminalLink__default = /*#__PURE__*/_interopDefault(terminalLink);
44
44
 
45
45
  var currentPkgJson = {
46
46
  name: "create-keystone-app",
47
- version: "8.0.0",
47
+ version: "8.0.2",
48
48
  main: "dist/create-keystone-app.cjs.js",
49
49
  files: [
50
50
  "dist",
@@ -44,7 +44,7 @@ var terminalLink__default = /*#__PURE__*/_interopDefault(terminalLink);
44
44
 
45
45
  var currentPkgJson = {
46
46
  name: "create-keystone-app",
47
- version: "8.0.0",
47
+ version: "8.0.2",
48
48
  main: "dist/create-keystone-app.cjs.js",
49
49
  files: [
50
50
  "dist",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-keystone-app",
3
- "version": "8.0.0",
3
+ "version": "8.0.2",
4
4
  "main": "dist/create-keystone-app.cjs.js",
5
5
  "files": [
6
6
  "dist",
@@ -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 && true) {
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: false ? void 0 : {
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
- // dont support initFirstItem functionality in production
42
+ // WARNING: remove initFirstItem functionality in production
43
43
  // see https://keystonejs.com/docs/config/auth#init-first-item for more
44
- initFirstItem:
45
- process.env.NODE_ENV === 'production'
46
- ? undefined
47
- : {
48
- // if there are no items in the database, by configuring this field
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
- // it uses context.sudo() to do this, which bypasses any access control you might have
54
- // you shouldn't use this in production
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
@@ -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",