@cedarjs/vite 1.0.0-canary.12733 → 1.0.0-canary.12735
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.
|
@@ -91,21 +91,22 @@ function getMergedConfig(rwConfig, rwPaths) {
|
|
|
91
91
|
waitingForApiServer = false;
|
|
92
92
|
}, 2500);
|
|
93
93
|
proxy.on("error", (err, _req, res) => {
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
const isWaiting = waitingForApiServer && err.message.includes("ECONNREFUSED");
|
|
95
|
+
if (!isWaiting) {
|
|
96
|
+
console.error(err);
|
|
96
97
|
}
|
|
97
|
-
const
|
|
98
|
+
const waitingMessage = "\u231B API Server launching, please refresh your page...";
|
|
99
|
+
const genericMessage = "The Cedar API server is not available or is currently reloading. Please refresh.";
|
|
100
|
+
const responseBody = {
|
|
98
101
|
errors: [
|
|
99
|
-
{
|
|
100
|
-
message: "The RedwoodJS API server is not available or is currently reloading. Please refresh."
|
|
101
|
-
}
|
|
102
|
+
{ message: isWaiting ? waitingMessage : genericMessage }
|
|
102
103
|
]
|
|
103
104
|
};
|
|
104
105
|
res.writeHead(203, {
|
|
105
106
|
"Content-Type": "application/json",
|
|
106
107
|
"Cache-Control": "no-cache"
|
|
107
108
|
});
|
|
108
|
-
res.write(JSON.stringify(
|
|
109
|
+
res.write(JSON.stringify(responseBody));
|
|
109
110
|
res.end();
|
|
110
111
|
});
|
|
111
112
|
}
|
|
@@ -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,
|
|
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"}
|
|
@@ -62,21 +62,22 @@ function getMergedConfig(rwConfig, rwPaths) {
|
|
|
62
62
|
waitingForApiServer = false;
|
|
63
63
|
}, 2500);
|
|
64
64
|
proxy.on("error", (err, _req, res) => {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
const isWaiting = waitingForApiServer && err.message.includes("ECONNREFUSED");
|
|
66
|
+
if (!isWaiting) {
|
|
67
|
+
console.error(err);
|
|
67
68
|
}
|
|
68
|
-
const
|
|
69
|
+
const waitingMessage = "\u231B API Server launching, please refresh your page...";
|
|
70
|
+
const genericMessage = "The Cedar API server is not available or is currently reloading. Please refresh.";
|
|
71
|
+
const responseBody = {
|
|
69
72
|
errors: [
|
|
70
|
-
{
|
|
71
|
-
message: "The RedwoodJS API server is not available or is currently reloading. Please refresh."
|
|
72
|
-
}
|
|
73
|
+
{ message: isWaiting ? waitingMessage : genericMessage }
|
|
73
74
|
]
|
|
74
75
|
};
|
|
75
76
|
res.writeHead(203, {
|
|
76
77
|
"Content-Type": "application/json",
|
|
77
78
|
"Cache-Control": "no-cache"
|
|
78
79
|
});
|
|
79
|
-
res.write(JSON.stringify(
|
|
80
|
+
res.write(JSON.stringify(responseBody));
|
|
80
81
|
res.end();
|
|
81
82
|
});
|
|
82
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/vite",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.12735+a92c00e5e",
|
|
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.
|
|
68
|
-
"@cedarjs/babel-config": "1.0.0-canary.
|
|
69
|
-
"@cedarjs/cookie-jar": "1.0.0-canary.
|
|
70
|
-
"@cedarjs/internal": "1.0.0-canary.
|
|
71
|
-
"@cedarjs/project-config": "1.0.0-canary.
|
|
72
|
-
"@cedarjs/server-store": "1.0.0-canary.
|
|
73
|
-
"@cedarjs/testing": "1.0.0-canary.
|
|
74
|
-
"@cedarjs/web": "1.0.0-canary.
|
|
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",
|
|
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": "
|
|
121
|
+
"gitHead": "a92c00e5ebaa75a4210064e1b0d27ca9d971822c"
|
|
122
122
|
}
|