@cedarjs/vite 5.0.0-canary.2601 → 5.0.0-canary.2602

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.
@@ -327,7 +327,15 @@ async function generateFunctionModule(distPath) {
327
327
  export default {
328
328
  async fetch(request) {
329
329
  const ctx = await buildCedarContext(request);
330
- return _handler(request, ctx);
330
+ // Wrap the handler in an AsyncLocalStorage run so the global
331
+ // @cedarjs/context is available inside it (and isolated per request).
332
+ // Mirrors the GraphQL module above and the cedarContextWrappingPlugin
333
+ // used for non-UD builds.
334
+ const { getAsyncStoreInstance } = await import(
335
+ '@cedarjs/context/dist/store'
336
+ );
337
+ const store = getAsyncStoreInstance();
338
+ return store.run(new Map(), () => _handler(request, ctx));
331
339
  }
332
340
  };
333
341
  `;
@@ -294,7 +294,15 @@ async function generateFunctionModule(distPath) {
294
294
  export default {
295
295
  async fetch(request) {
296
296
  const ctx = await buildCedarContext(request);
297
- return _handler(request, ctx);
297
+ // Wrap the handler in an AsyncLocalStorage run so the global
298
+ // @cedarjs/context is available inside it (and isolated per request).
299
+ // Mirrors the GraphQL module above and the cedarContextWrappingPlugin
300
+ // used for non-UD builds.
301
+ const { getAsyncStoreInstance } = await import(
302
+ '@cedarjs/context/dist/store'
303
+ );
304
+ const store = getAsyncStoreInstance();
305
+ return store.run(new Map(), () => _handler(request, ctx));
298
306
  }
299
307
  };
300
308
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "5.0.0-canary.2601",
3
+ "version": "5.0.0-canary.2602",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -63,15 +63,15 @@
63
63
  "@babel/parser": "7.29.7",
64
64
  "@babel/traverse": "7.29.7",
65
65
  "@babel/types": "7.29.7",
66
- "@cedarjs/api": "5.0.0-canary.2601",
67
- "@cedarjs/babel-config": "5.0.0-canary.2601",
68
- "@cedarjs/context": "5.0.0-canary.2601",
69
- "@cedarjs/cookie-jar": "5.0.0-canary.2601",
70
- "@cedarjs/graphql-server": "5.0.0-canary.2601",
71
- "@cedarjs/internal": "5.0.0-canary.2601",
72
- "@cedarjs/project-config": "5.0.0-canary.2601",
73
- "@cedarjs/server-store": "5.0.0-canary.2601",
74
- "@cedarjs/testing": "5.0.0-canary.2601",
66
+ "@cedarjs/api": "5.0.0-canary.2602",
67
+ "@cedarjs/babel-config": "5.0.0-canary.2602",
68
+ "@cedarjs/context": "5.0.0-canary.2602",
69
+ "@cedarjs/cookie-jar": "5.0.0-canary.2602",
70
+ "@cedarjs/graphql-server": "5.0.0-canary.2602",
71
+ "@cedarjs/internal": "5.0.0-canary.2602",
72
+ "@cedarjs/project-config": "5.0.0-canary.2602",
73
+ "@cedarjs/server-store": "5.0.0-canary.2602",
74
+ "@cedarjs/testing": "5.0.0-canary.2602",
75
75
  "@fastify/url-data": "6.0.3",
76
76
  "@swc/core": "1.15.41",
77
77
  "@universal-deploy/store": "^0.2.1",
@@ -103,9 +103,9 @@
103
103
  },
104
104
  "devDependencies": {
105
105
  "@arethetypeswrong/cli": "0.18.4",
106
- "@cedarjs/auth": "5.0.0-canary.2601",
107
- "@cedarjs/router": "5.0.0-canary.2601",
108
- "@cedarjs/web": "5.0.0-canary.2601",
106
+ "@cedarjs/auth": "5.0.0-canary.2602",
107
+ "@cedarjs/router": "5.0.0-canary.2602",
108
+ "@cedarjs/web": "5.0.0-canary.2602",
109
109
  "@hyrious/esbuild-plugin-commonjs": "0.2.6",
110
110
  "@jridgewell/trace-mapping": "0.3.31",
111
111
  "@types/aws-lambda": "8.10.162",