@opensaas/keystone-nextjs-auth 22.2.0 → 22.2.1
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/CHANGELOG.md
CHANGED
@@ -168,13 +168,9 @@ import keystoneConfig from '../../../../../keystone';
|
|
168
168
|
import { PrismaClient } from '.prisma/client';
|
169
169
|
import { createQueryAPI } from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/node-api';
|
170
170
|
|
171
|
-
const
|
171
|
+
const keystoneQueryAPI = global.keystoneQueryAPI || createQueryAPI(keystoneConfig, PrismaClient);
|
172
172
|
|
173
|
-
if (process.env.NODE_ENV !== 'production')
|
174
|
-
|
175
|
-
const query = global.query || createQueryAPI(keystoneConfig, prisma);
|
176
|
-
|
177
|
-
if (process.env.NODE_ENV !== 'production') global.query = query
|
173
|
+
if (process.env.NODE_ENV !== 'production') globalThis.keystoneQueryAPI = keystoneQueryAPI
|
178
174
|
|
179
175
|
export default getNextAuthPage({
|
180
176
|
autoCreate: <%= autoCreate %>,
|
@@ -182,7 +178,7 @@ export default getNextAuthPage({
|
|
182
178
|
listKey: '<%= listKey %>',
|
183
179
|
pages: keystoneConfig.pages,
|
184
180
|
providers: keystoneConfig.providers,
|
185
|
-
query,
|
181
|
+
query: keystoneQueryAPI,
|
186
182
|
resolver: keystoneConfig.resolver,
|
187
183
|
sessionData: '<%= sessionData %>',
|
188
184
|
sessionSecret: '<%= sessionSecret %>',
|
@@ -167,13 +167,9 @@ import keystoneConfig from '../../../../../keystone';
|
|
167
167
|
import { PrismaClient } from '.prisma/client';
|
168
168
|
import { createQueryAPI } from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/node-api';
|
169
169
|
|
170
|
-
const
|
170
|
+
const keystoneQueryAPI = global.keystoneQueryAPI || createQueryAPI(keystoneConfig, PrismaClient);
|
171
171
|
|
172
|
-
if (process.env.NODE_ENV !== 'production')
|
173
|
-
|
174
|
-
const query = global.query || createQueryAPI(keystoneConfig, prisma);
|
175
|
-
|
176
|
-
if (process.env.NODE_ENV !== 'production') global.query = query
|
172
|
+
if (process.env.NODE_ENV !== 'production') globalThis.keystoneQueryAPI = keystoneQueryAPI
|
177
173
|
|
178
174
|
export default getNextAuthPage({
|
179
175
|
autoCreate: <%= autoCreate %>,
|
@@ -181,7 +177,7 @@ export default getNextAuthPage({
|
|
181
177
|
listKey: '<%= listKey %>',
|
182
178
|
pages: keystoneConfig.pages,
|
183
179
|
providers: keystoneConfig.providers,
|
184
|
-
query,
|
180
|
+
query: keystoneQueryAPI,
|
185
181
|
resolver: keystoneConfig.resolver,
|
186
182
|
sessionData: '<%= sessionData %>',
|
187
183
|
sessionSecret: '<%= sessionSecret %>',
|
@@ -135,13 +135,9 @@ import keystoneConfig from '../../../../../keystone';
|
|
135
135
|
import { PrismaClient } from '.prisma/client';
|
136
136
|
import { createQueryAPI } from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/node-api';
|
137
137
|
|
138
|
-
const
|
138
|
+
const keystoneQueryAPI = global.keystoneQueryAPI || createQueryAPI(keystoneConfig, PrismaClient);
|
139
139
|
|
140
|
-
if (process.env.NODE_ENV !== 'production')
|
141
|
-
|
142
|
-
const query = global.query || createQueryAPI(keystoneConfig, prisma);
|
143
|
-
|
144
|
-
if (process.env.NODE_ENV !== 'production') global.query = query
|
140
|
+
if (process.env.NODE_ENV !== 'production') globalThis.keystoneQueryAPI = keystoneQueryAPI
|
145
141
|
|
146
142
|
export default getNextAuthPage({
|
147
143
|
autoCreate: <%= autoCreate %>,
|
@@ -149,7 +145,7 @@ export default getNextAuthPage({
|
|
149
145
|
listKey: '<%= listKey %>',
|
150
146
|
pages: keystoneConfig.pages,
|
151
147
|
providers: keystoneConfig.providers,
|
152
|
-
query,
|
148
|
+
query: keystoneQueryAPI,
|
153
149
|
resolver: keystoneConfig.resolver,
|
154
150
|
sessionData: '<%= sessionData %>',
|
155
151
|
sessionSecret: '<%= sessionSecret %>',
|
package/package.json
CHANGED
package/src/templates/auth.ts
CHANGED
@@ -7,13 +7,9 @@ import keystoneConfig from '../../../../../keystone';
|
|
7
7
|
import { PrismaClient } from '.prisma/client';
|
8
8
|
import { createQueryAPI } from '@keystone-6/core/___internal-do-not-use-will-break-in-patch/node-api';
|
9
9
|
|
10
|
-
const
|
10
|
+
const keystoneQueryAPI = global.keystoneQueryAPI || createQueryAPI(keystoneConfig, PrismaClient);
|
11
11
|
|
12
|
-
if (process.env.NODE_ENV !== 'production')
|
13
|
-
|
14
|
-
const query = global.query || createQueryAPI(keystoneConfig, prisma);
|
15
|
-
|
16
|
-
if (process.env.NODE_ENV !== 'production') global.query = query
|
12
|
+
if (process.env.NODE_ENV !== 'production') globalThis.keystoneQueryAPI = keystoneQueryAPI
|
17
13
|
|
18
14
|
export default getNextAuthPage({
|
19
15
|
autoCreate: <%= autoCreate %>,
|
@@ -21,7 +17,7 @@ export default getNextAuthPage({
|
|
21
17
|
listKey: '<%= listKey %>',
|
22
18
|
pages: keystoneConfig.pages,
|
23
19
|
providers: keystoneConfig.providers,
|
24
|
-
query,
|
20
|
+
query: keystoneQueryAPI,
|
25
21
|
resolver: keystoneConfig.resolver,
|
26
22
|
sessionData: '<%= sessionData %>',
|
27
23
|
sessionSecret: '<%= sessionSecret %>',
|