@cedarjs/vite 7.0.0-canary.3083 → 7.0.0-canary.3086

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.
@@ -1 +1 @@
1
- {"version":3,"file":"apiDevMiddleware.d.ts","sourceRoot":"","sources":["../src/apiDevMiddleware.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,MAAM,CAAA;AA4E7D,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,aAAa,iBAe/D;AA+GD,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,aAAa,CAAC,CAyMlE;AA0BD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CA0EhE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,KAIrB,SAAS,OAAO,KAAG,OAAO,CAAC,QAAQ,CAAC,CAmGnD;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC;IACrD,UAAU,EAAE,aAAa,CAAA;IACzB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CACjD,CAAC,CAcD"}
1
+ {"version":3,"file":"apiDevMiddleware.d.ts","sourceRoot":"","sources":["../src/apiDevMiddleware.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,MAAM,CAAA;AAoE7D,wBAAsB,gBAAgB,CAAC,UAAU,EAAE,aAAa,iBAe/D;AA8GD,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,aAAa,CAAC,CAyMlE;AA0BD,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,aAAa,GAAG,IAAI,CA0EhE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,KAIrB,SAAS,OAAO,KAAG,OAAO,CAAC,QAAQ,CAAC,CAiGnD;AAED,wBAAsB,qBAAqB,IAAI,OAAO,CAAC;IACrD,UAAU,EAAE,aAAa,CAAA;IACzB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CACjD,CAAC,CAcD"}
@@ -133,8 +133,7 @@ async function internalLoadApiFunctions(viteServer) {
133
133
  });
134
134
  await Promise.all(imports);
135
135
  if (extractedGraphqlOptions) {
136
- const { yoga } = await createGraphQLYoga(extractedGraphqlOptions);
137
- loadedGraphqlServer = { yoga, options: extractedGraphqlOptions };
136
+ loadedGraphqlServer = await createGraphQLYoga(extractedGraphqlOptions);
138
137
  } else {
139
138
  loadedGraphqlServer = null;
140
139
  }
@@ -369,9 +368,7 @@ function createApiFetchHandler() {
369
368
  }
370
369
  return getAsyncStoreInstance().run(/* @__PURE__ */ new Map(), async () => {
371
370
  try {
372
- const cedarContext = await buildCedarContext(request, {
373
- authDecoder: graphqlServer.options.authDecoder
374
- });
371
+ const cedarContext = await graphqlServer.buildRequestContext(request);
375
372
  return await graphqlServer.yoga.handle(request, {
376
373
  request,
377
374
  cedarContext
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin-cedar-universal-deploy.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-universal-deploy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAalC,MAAM,WAAW,iCAAiC;IAChD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AA6GD,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,iCAAsC,GAC9C,MAAM,CA0GR"}
1
+ {"version":3,"file":"vite-plugin-cedar-universal-deploy.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-universal-deploy.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAgBlC,MAAM,WAAW,iCAAiC;IAChD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AA6GD,wBAAgB,0BAA0B,CACxC,OAAO,GAAE,iCAAsC,GAC9C,MAAM,CA0GR"}
@@ -272,24 +272,22 @@ function createFunctionFetch(cedarHandler) {
272
272
  };
273
273
  }
274
274
  function createGraphQLFetch(graphqlOptions) {
275
- let yogaInitPromise = null;
276
- function getYoga() {
277
- if (!yogaInitPromise) {
278
- yogaInitPromise = createGraphQLYoga(graphqlOptions);
275
+ let graphqlServerPromise = null;
276
+ function getGraphQLServer() {
277
+ if (!graphqlServerPromise) {
278
+ graphqlServerPromise = createGraphQLYoga(graphqlOptions);
279
279
  }
280
- return yogaInitPromise;
280
+ return graphqlServerPromise;
281
281
  }
282
282
  return async function fetch(request) {
283
- const { yoga } = await getYoga();
284
- const cedarContext = await buildCedarContext(request, {
285
- authDecoder: graphqlOptions?.authDecoder
286
- });
283
+ const graphqlServer = await getGraphQLServer();
284
+ const cedarContext = await graphqlServer.buildRequestContext(request);
287
285
  const event = await requestToLegacyEvent(request, cedarContext);
288
286
  const { getAsyncStoreInstance } = await import("@cedarjs/context/dist/store");
289
287
  const store = getAsyncStoreInstance();
290
288
  try {
291
289
  const response = await store.run(/* @__PURE__ */ new Map(), () => {
292
- return yoga.handle(request, {
290
+ return graphqlServer.yoga.handle(request, {
293
291
  request,
294
292
  cedarContext,
295
293
  event,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "7.0.0-canary.3083",
3
+ "version": "7.0.0-canary.3086",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -54,17 +54,17 @@
54
54
  "@babel/preset-typescript": "7.29.7",
55
55
  "@babel/traverse": "7.29.8",
56
56
  "@babel/types": "7.29.8",
57
- "@cedarjs/api": "7.0.0-canary.3083",
58
- "@cedarjs/api-server": "7.0.0-canary.3083",
59
- "@cedarjs/babel-config": "7.0.0-canary.3083",
60
- "@cedarjs/context": "7.0.0-canary.3083",
61
- "@cedarjs/graphql-server": "7.0.0-canary.3083",
62
- "@cedarjs/internal": "7.0.0-canary.3083",
63
- "@cedarjs/jobs": "7.0.0-canary.3083",
64
- "@cedarjs/project-config": "7.0.0-canary.3083",
65
- "@cedarjs/server-store": "7.0.0-canary.3083",
66
- "@cedarjs/structure": "7.0.0-canary.3083",
67
- "@cedarjs/testing": "7.0.0-canary.3083",
57
+ "@cedarjs/api": "7.0.0-canary.3086",
58
+ "@cedarjs/api-server": "7.0.0-canary.3086",
59
+ "@cedarjs/babel-config": "7.0.0-canary.3086",
60
+ "@cedarjs/context": "7.0.0-canary.3086",
61
+ "@cedarjs/graphql-server": "7.0.0-canary.3086",
62
+ "@cedarjs/internal": "7.0.0-canary.3086",
63
+ "@cedarjs/jobs": "7.0.0-canary.3086",
64
+ "@cedarjs/project-config": "7.0.0-canary.3086",
65
+ "@cedarjs/server-store": "7.0.0-canary.3086",
66
+ "@cedarjs/structure": "7.0.0-canary.3086",
67
+ "@cedarjs/testing": "7.0.0-canary.3086",
68
68
  "@swc/core": "1.16.1",
69
69
  "@universal-deploy/store": "^0.2.1",
70
70
  "@universal-deploy/vite": "^0.1.9",
@@ -94,10 +94,10 @@
94
94
  "yargs-parser": "21.1.1"
95
95
  },
96
96
  "devDependencies": {
97
- "@cedarjs/auth": "7.0.0-canary.3083",
98
- "@cedarjs/framework-tools": "7.0.0-canary.3083",
99
- "@cedarjs/router": "7.0.0-canary.3083",
100
- "@cedarjs/web": "7.0.0-canary.3083",
97
+ "@cedarjs/auth": "7.0.0-canary.3086",
98
+ "@cedarjs/framework-tools": "7.0.0-canary.3086",
99
+ "@cedarjs/router": "7.0.0-canary.3086",
100
+ "@cedarjs/web": "7.0.0-canary.3086",
101
101
  "@dr.pogodin/react-helmet": "2.0.4",
102
102
  "@hyrious/esbuild-plugin-commonjs": "0.2.6",
103
103
  "@jridgewell/trace-mapping": "0.3.31",
@@ -119,9 +119,9 @@
119
119
  "vitest": "4.1.11"
120
120
  },
121
121
  "peerDependencies": {
122
- "@cedarjs/auth": "7.0.0-canary.3083",
123
- "@cedarjs/router": "7.0.0-canary.3083",
124
- "@cedarjs/web": "7.0.0-canary.3083",
122
+ "@cedarjs/auth": "7.0.0-canary.3086",
123
+ "@cedarjs/router": "7.0.0-canary.3086",
124
+ "@cedarjs/web": "7.0.0-canary.3086",
125
125
  "react": "19.2.8",
126
126
  "react-dom": "19.2.8"
127
127
  },