@cedarjs/vite 6.0.0-canary.2646 → 6.0.0-canary.2652

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":"buildApp.d.ts","sourceRoot":"","sources":["../src/buildApp.ts"],"names":[],"mappings":"AAiDA,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,EAClC,OAAe,EACf,SAA0B,EAC1B,EAAU,GACX,GAAE,oBAAyB,iBA2V3B"}
1
+ {"version":3,"file":"buildApp.d.ts","sourceRoot":"","sources":["../src/buildApp.ts"],"names":[],"mappings":"AAsDA,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,EAAE,CAAC,EAAE,OAAO,CAAA;CACb;AAED;;;;;;;;GAQG;AACH,wBAAsB,aAAa,CAAC,EAClC,OAAe,EACf,SAA0B,EAC1B,EAAU,GACX,GAAE,oBAAyB,iBAkW3B"}
package/dist/buildApp.js CHANGED
@@ -26,7 +26,7 @@ import { cedarOtelWrappingPlugin } from "./plugins/vite-plugin-cedar-otel-wrappi
26
26
  import { cedarjsJobPathInjectorPlugin } from "./plugins/vite-plugin-cedarjs-job-path-injector.js";
27
27
  import { handlerAlsWrappingPlugin } from "./plugins/vite-plugin-handler-als-wrapping.js";
28
28
  function resolveWithExtensions(id) {
29
- if (fs.existsSync(id)) {
29
+ if (fs.existsSync(id) && fs.statSync(id).isFile()) {
30
30
  return id;
31
31
  }
32
32
  for (const ext of [".js", ".ts", ".jsx", ".tsx", ".mjs", ".mts"]) {
@@ -232,7 +232,9 @@ async function buildCedarApp({
232
232
  name: "cedar-api-src-redirect",
233
233
  enforce: "pre",
234
234
  resolveId(id, importer) {
235
- if (!importer?.startsWith(cedarPaths.api.src)) {
235
+ const normalizedImporter = importer && normalizePath(importer);
236
+ const normalizedApiSrc = normalizePath(cedarPaths.api.src);
237
+ if (!normalizedImporter?.startsWith(`${normalizedApiSrc}/`)) {
236
238
  return null;
237
239
  }
238
240
  if (id.startsWith("src/")) {
@@ -56,7 +56,7 @@ const tsconfigPaths = (
56
56
  import_vite_tsconfig_paths.default.default?.default || import_vite_tsconfig_paths.default.default || import_vite_tsconfig_paths.default
57
57
  );
58
58
  function resolveWithExtensions(id) {
59
- if (import_node_fs.default.existsSync(id)) {
59
+ if (import_node_fs.default.existsSync(id) && import_node_fs.default.statSync(id).isFile()) {
60
60
  return id;
61
61
  }
62
62
  for (const ext of [".js", ".ts", ".jsx", ".tsx", ".mjs", ".mts"]) {
@@ -262,7 +262,9 @@ async function buildCedarApp({
262
262
  name: "cedar-api-src-redirect",
263
263
  enforce: "pre",
264
264
  resolveId(id, importer) {
265
- if (!importer?.startsWith(cedarPaths.api.src)) {
265
+ const normalizedImporter = importer && (0, import_vite2.normalizePath)(importer);
266
+ const normalizedApiSrc = (0, import_vite2.normalizePath)(cedarPaths.api.src);
267
+ if (!normalizedImporter?.startsWith(`${normalizedApiSrc}/`)) {
266
268
  return null;
267
269
  }
268
270
  if (id.startsWith("src/")) {
@@ -40,6 +40,7 @@ const generate = import_generator.default.default || import_generator.default;
40
40
  const EXPECTED_EXPORTS_FROM_CELL = [
41
41
  "beforeQuery",
42
42
  "QUERY",
43
+ "FRAGMENT",
43
44
  "data",
44
45
  "isEmpty",
45
46
  "afterQuery",
@@ -97,7 +98,7 @@ function cedarCellTransform() {
97
98
  }
98
99
  }
99
100
  });
100
- const hasQueryOrDataExport = exportNames.includes("QUERY") || exportNames.includes("data");
101
+ const hasQueryOrDataExport = exportNames.includes("QUERY") || exportNames.includes("FRAGMENT") || exportNames.includes("data");
101
102
  if (hasDefaultExport || !hasQueryOrDataExport) {
102
103
  return null;
103
104
  }
@@ -1 +1 @@
1
- {"version":3,"file":"vite-plugin-cedar-cell.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-cell.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAoBlC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAmK3C"}
1
+ {"version":3,"file":"vite-plugin-cedar-cell.d.ts","sourceRoot":"","sources":["../../src/plugins/vite-plugin-cedar-cell.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAqBlC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAsK3C"}
@@ -7,6 +7,7 @@ const generate = babelGenerator.default || babelGenerator;
7
7
  const EXPECTED_EXPORTS_FROM_CELL = [
8
8
  "beforeQuery",
9
9
  "QUERY",
10
+ "FRAGMENT",
10
11
  "data",
11
12
  "isEmpty",
12
13
  "afterQuery",
@@ -64,7 +65,7 @@ function cedarCellTransform() {
64
65
  }
65
66
  }
66
67
  });
67
- const hasQueryOrDataExport = exportNames.includes("QUERY") || exportNames.includes("data");
68
+ const hasQueryOrDataExport = exportNames.includes("QUERY") || exportNames.includes("FRAGMENT") || exportNames.includes("data");
68
69
  if (hasDefaultExport || !hasQueryOrDataExport) {
69
70
  return null;
70
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "6.0.0-canary.2646",
3
+ "version": "6.0.0-canary.2652",
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": "6.0.0-canary.2646",
67
- "@cedarjs/babel-config": "6.0.0-canary.2646",
68
- "@cedarjs/context": "6.0.0-canary.2646",
69
- "@cedarjs/cookie-jar": "6.0.0-canary.2646",
70
- "@cedarjs/graphql-server": "6.0.0-canary.2646",
71
- "@cedarjs/internal": "6.0.0-canary.2646",
72
- "@cedarjs/project-config": "6.0.0-canary.2646",
73
- "@cedarjs/server-store": "6.0.0-canary.2646",
74
- "@cedarjs/testing": "6.0.0-canary.2646",
66
+ "@cedarjs/api": "6.0.0-canary.2652",
67
+ "@cedarjs/babel-config": "6.0.0-canary.2652",
68
+ "@cedarjs/context": "6.0.0-canary.2652",
69
+ "@cedarjs/cookie-jar": "6.0.0-canary.2652",
70
+ "@cedarjs/graphql-server": "6.0.0-canary.2652",
71
+ "@cedarjs/internal": "6.0.0-canary.2652",
72
+ "@cedarjs/project-config": "6.0.0-canary.2652",
73
+ "@cedarjs/server-store": "6.0.0-canary.2652",
74
+ "@cedarjs/testing": "6.0.0-canary.2652",
75
75
  "@fastify/url-data": "6.0.3",
76
76
  "@swc/core": "1.15.41",
77
77
  "@universal-deploy/store": "^0.2.1",
@@ -108,9 +108,9 @@
108
108
  },
109
109
  "devDependencies": {
110
110
  "@arethetypeswrong/cli": "0.18.5",
111
- "@cedarjs/auth": "6.0.0-canary.2646",
112
- "@cedarjs/router": "6.0.0-canary.2646",
113
- "@cedarjs/web": "6.0.0-canary.2646",
111
+ "@cedarjs/auth": "6.0.0-canary.2652",
112
+ "@cedarjs/router": "6.0.0-canary.2652",
113
+ "@cedarjs/web": "6.0.0-canary.2652",
114
114
  "@hyrious/esbuild-plugin-commonjs": "0.2.6",
115
115
  "@jridgewell/trace-mapping": "0.3.31",
116
116
  "@types/aws-lambda": "8.10.162",