@cedarjs/vite 5.0.0-canary.2499 → 5.0.0-canary.2500

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
- return store.run(new Map(), () =>
274
- yoga.handle(request, { request, cedarContext, event, requestContext: undefined })
275
- ).then((response) => new Response(response.body, {
276
- status: response.status,
277
- statusText: response.statusText,
278
- headers: response.headers,
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
- return store.run(new Map(), () =>
241
- yoga.handle(request, { request, cedarContext, event, requestContext: undefined })
242
- ).then((response) => new Response(response.body, {
243
- status: response.status,
244
- statusText: response.statusText,
245
- headers: response.headers,
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.2499",
3
+ "version": "5.0.0-canary.2500",
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.2499",
73
- "@cedarjs/auth": "5.0.0-canary.2499",
74
- "@cedarjs/babel-config": "5.0.0-canary.2499",
75
- "@cedarjs/context": "5.0.0-canary.2499",
76
- "@cedarjs/cookie-jar": "5.0.0-canary.2499",
77
- "@cedarjs/graphql-server": "5.0.0-canary.2499",
78
- "@cedarjs/internal": "5.0.0-canary.2499",
79
- "@cedarjs/project-config": "5.0.0-canary.2499",
80
- "@cedarjs/server-store": "5.0.0-canary.2499",
81
- "@cedarjs/testing": "5.0.0-canary.2499",
82
- "@cedarjs/web": "5.0.0-canary.2499",
72
+ "@cedarjs/api": "5.0.0-canary.2500",
73
+ "@cedarjs/auth": "5.0.0-canary.2500",
74
+ "@cedarjs/babel-config": "5.0.0-canary.2500",
75
+ "@cedarjs/context": "5.0.0-canary.2500",
76
+ "@cedarjs/cookie-jar": "5.0.0-canary.2500",
77
+ "@cedarjs/graphql-server": "5.0.0-canary.2500",
78
+ "@cedarjs/internal": "5.0.0-canary.2500",
79
+ "@cedarjs/project-config": "5.0.0-canary.2500",
80
+ "@cedarjs/server-store": "5.0.0-canary.2500",
81
+ "@cedarjs/testing": "5.0.0-canary.2500",
82
+ "@cedarjs/web": "5.0.0-canary.2500",
83
83
  "@fastify/url-data": "6.0.3",
84
84
  "@swc/core": "1.15.41",
85
85
  "@universal-deploy/store": "^0.2.1",