@cedarjs/vite 5.0.0-canary.2499 → 5.0.0-canary.2501
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.
|
@@ -268,15 +268,26 @@ async function generateGraphQLModule(distPath) {
|
|
|
268
268
|
// this, the auth plugin's setContext() call writes to a store
|
|
269
269
|
// that's only visible inside the plugin's own callback \u2014 not
|
|
270
270
|
// during directive validation.
|
|
271
|
-
const { getAsyncStoreInstance } = await import('@cedarjs/context/dist/store')
|
|
272
|
-
const store = getAsyncStoreInstance()
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
271
|
+
const { getAsyncStoreInstance } = await import('@cedarjs/context/dist/store')
|
|
272
|
+
const store = getAsyncStoreInstance()
|
|
273
|
+
|
|
274
|
+
return store.run(new Map(), () => {
|
|
275
|
+
return yoga.handle(request, {
|
|
276
|
+
request,
|
|
277
|
+
cedarContext,
|
|
278
|
+
event,
|
|
279
|
+
requestContext: undefined,
|
|
280
|
+
})
|
|
281
|
+
}).then((response) => {
|
|
282
|
+
// GraphQL Yoga returns a PonyfillResponse from @whatwg-node/fetch
|
|
283
|
+
// which is not an instanceof the native Response class. Netlify's
|
|
284
|
+
// bootstrap checks instanceof Response, so we wrap it.
|
|
285
|
+
return new Response(response.body, {
|
|
286
|
+
status: response.status,
|
|
287
|
+
statusText: response.statusText,
|
|
288
|
+
headers: response.headers,
|
|
289
|
+
})
|
|
290
|
+
})
|
|
280
291
|
}
|
|
281
292
|
};
|
|
282
293
|
`;
|
|
@@ -235,15 +235,26 @@ async function generateGraphQLModule(distPath) {
|
|
|
235
235
|
// this, the auth plugin's setContext() call writes to a store
|
|
236
236
|
// that's only visible inside the plugin's own callback \u2014 not
|
|
237
237
|
// during directive validation.
|
|
238
|
-
const { getAsyncStoreInstance } = await import('@cedarjs/context/dist/store')
|
|
239
|
-
const store = getAsyncStoreInstance()
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
238
|
+
const { getAsyncStoreInstance } = await import('@cedarjs/context/dist/store')
|
|
239
|
+
const store = getAsyncStoreInstance()
|
|
240
|
+
|
|
241
|
+
return store.run(new Map(), () => {
|
|
242
|
+
return yoga.handle(request, {
|
|
243
|
+
request,
|
|
244
|
+
cedarContext,
|
|
245
|
+
event,
|
|
246
|
+
requestContext: undefined,
|
|
247
|
+
})
|
|
248
|
+
}).then((response) => {
|
|
249
|
+
// GraphQL Yoga returns a PonyfillResponse from @whatwg-node/fetch
|
|
250
|
+
// which is not an instanceof the native Response class. Netlify's
|
|
251
|
+
// bootstrap checks instanceof Response, so we wrap it.
|
|
252
|
+
return new Response(response.body, {
|
|
253
|
+
status: response.status,
|
|
254
|
+
statusText: response.statusText,
|
|
255
|
+
headers: response.headers,
|
|
256
|
+
})
|
|
257
|
+
})
|
|
247
258
|
}
|
|
248
259
|
};
|
|
249
260
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/vite",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.2501",
|
|
4
4
|
"description": "Vite configuration package for CedarJS",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -69,17 +69,17 @@
|
|
|
69
69
|
"@babel/generator": "7.29.1",
|
|
70
70
|
"@babel/parser": "7.29.3",
|
|
71
71
|
"@babel/traverse": "7.29.0",
|
|
72
|
-
"@cedarjs/api": "5.0.0-canary.
|
|
73
|
-
"@cedarjs/auth": "5.0.0-canary.
|
|
74
|
-
"@cedarjs/babel-config": "5.0.0-canary.
|
|
75
|
-
"@cedarjs/context": "5.0.0-canary.
|
|
76
|
-
"@cedarjs/cookie-jar": "5.0.0-canary.
|
|
77
|
-
"@cedarjs/graphql-server": "5.0.0-canary.
|
|
78
|
-
"@cedarjs/internal": "5.0.0-canary.
|
|
79
|
-
"@cedarjs/project-config": "5.0.0-canary.
|
|
80
|
-
"@cedarjs/server-store": "5.0.0-canary.
|
|
81
|
-
"@cedarjs/testing": "5.0.0-canary.
|
|
82
|
-
"@cedarjs/web": "5.0.0-canary.
|
|
72
|
+
"@cedarjs/api": "5.0.0-canary.2501",
|
|
73
|
+
"@cedarjs/auth": "5.0.0-canary.2501",
|
|
74
|
+
"@cedarjs/babel-config": "5.0.0-canary.2501",
|
|
75
|
+
"@cedarjs/context": "5.0.0-canary.2501",
|
|
76
|
+
"@cedarjs/cookie-jar": "5.0.0-canary.2501",
|
|
77
|
+
"@cedarjs/graphql-server": "5.0.0-canary.2501",
|
|
78
|
+
"@cedarjs/internal": "5.0.0-canary.2501",
|
|
79
|
+
"@cedarjs/project-config": "5.0.0-canary.2501",
|
|
80
|
+
"@cedarjs/server-store": "5.0.0-canary.2501",
|
|
81
|
+
"@cedarjs/testing": "5.0.0-canary.2501",
|
|
82
|
+
"@cedarjs/web": "5.0.0-canary.2501",
|
|
83
83
|
"@fastify/url-data": "6.0.3",
|
|
84
84
|
"@swc/core": "1.15.41",
|
|
85
85
|
"@universal-deploy/store": "^0.2.1",
|