@cedarjs/vite 1.0.0-canary.12735 → 1.0.0-canary.12737

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.
@@ -90,11 +90,12 @@ function getMergedConfig(rwConfig, rwPaths) {
90
90
  setTimeout(() => {
91
91
  waitingForApiServer = false;
92
92
  }, 2500);
93
- proxy.on("error", (err, _req, res) => {
93
+ proxy.on("error", (err, req, res) => {
94
94
  const isWaiting = waitingForApiServer && err.message.includes("ECONNREFUSED");
95
95
  if (!isWaiting) {
96
96
  console.error(err);
97
97
  }
98
+ const isAuthTokenRequest = isWaiting && req.url === "/auth?method=getToken";
98
99
  const waitingMessage = "\u231B API Server launching, please refresh your page...";
99
100
  const genericMessage = "The Cedar API server is not available or is currently reloading. Please refresh.";
100
101
  const responseBody = {
@@ -106,7 +107,9 @@ function getMergedConfig(rwConfig, rwPaths) {
106
107
  "Content-Type": "application/json",
107
108
  "Cache-Control": "no-cache"
108
109
  });
109
- res.write(JSON.stringify(responseBody));
110
+ if (!isAuthTokenRequest) {
111
+ res.write(JSON.stringify(responseBody));
112
+ }
110
113
  res.end();
111
114
  });
112
115
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getMergedConfig.d.ts","sourceRoot":"","sources":["../../src/lib/getMergedConfig.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAO5D;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,IACtD,YAAY,cAAc,EAAE,KAAK,SAAS,KAAG,cAAc,CA6IpE"}
1
+ {"version":3,"file":"getMergedConfig.d.ts","sourceRoot":"","sources":["../../src/lib/getMergedConfig.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAO5D;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,IACtD,YAAY,cAAc,EAAE,KAAK,SAAS,KAAG,cAAc,CA0JpE"}
@@ -61,11 +61,12 @@ function getMergedConfig(rwConfig, rwPaths) {
61
61
  setTimeout(() => {
62
62
  waitingForApiServer = false;
63
63
  }, 2500);
64
- proxy.on("error", (err, _req, res) => {
64
+ proxy.on("error", (err, req, res) => {
65
65
  const isWaiting = waitingForApiServer && err.message.includes("ECONNREFUSED");
66
66
  if (!isWaiting) {
67
67
  console.error(err);
68
68
  }
69
+ const isAuthTokenRequest = isWaiting && req.url === "/auth?method=getToken";
69
70
  const waitingMessage = "\u231B API Server launching, please refresh your page...";
70
71
  const genericMessage = "The Cedar API server is not available or is currently reloading. Please refresh.";
71
72
  const responseBody = {
@@ -77,7 +78,9 @@ function getMergedConfig(rwConfig, rwPaths) {
77
78
  "Content-Type": "application/json",
78
79
  "Cache-Control": "no-cache"
79
80
  });
80
- res.write(JSON.stringify(responseBody));
81
+ if (!isAuthTokenRequest) {
82
+ res.write(JSON.stringify(responseBody));
83
+ }
81
84
  res.end();
82
85
  });
83
86
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "1.0.0-canary.12735+a92c00e5e",
3
+ "version": "1.0.0-canary.12737+c7dafc412",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -64,14 +64,14 @@
64
64
  "@babel/generator": "7.27.5",
65
65
  "@babel/parser": "7.27.5",
66
66
  "@babel/traverse": "7.27.4",
67
- "@cedarjs/auth": "1.0.0-canary.12735",
68
- "@cedarjs/babel-config": "1.0.0-canary.12735",
69
- "@cedarjs/cookie-jar": "1.0.0-canary.12735",
70
- "@cedarjs/internal": "1.0.0-canary.12735",
71
- "@cedarjs/project-config": "1.0.0-canary.12735",
72
- "@cedarjs/server-store": "1.0.0-canary.12735",
73
- "@cedarjs/testing": "1.0.0-canary.12735",
74
- "@cedarjs/web": "1.0.0-canary.12735",
67
+ "@cedarjs/auth": "1.0.0-canary.12737",
68
+ "@cedarjs/babel-config": "1.0.0-canary.12737",
69
+ "@cedarjs/cookie-jar": "1.0.0-canary.12737",
70
+ "@cedarjs/internal": "1.0.0-canary.12737",
71
+ "@cedarjs/project-config": "1.0.0-canary.12737",
72
+ "@cedarjs/server-store": "1.0.0-canary.12737",
73
+ "@cedarjs/testing": "1.0.0-canary.12737",
74
+ "@cedarjs/web": "1.0.0-canary.12737",
75
75
  "@swc/core": "1.13.5",
76
76
  "@vitejs/plugin-react": "4.3.4",
77
77
  "@whatwg-node/fetch": "0.9.21",
@@ -118,5 +118,5 @@
118
118
  "publishConfig": {
119
119
  "access": "public"
120
120
  },
121
- "gitHead": "a92c00e5ebaa75a4210064e1b0d27ca9d971822c"
121
+ "gitHead": "c7dafc41243479b37152ef54e0ee6582ab812aeb"
122
122
  }