@lark-apaas/devtool-kits 1.0.5-alpha.5 → 1.0.5-alpha.6
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.
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -28590,9 +28590,9 @@ function injectErrorData(template, errorLogs, clientBasePath) {
|
|
|
28590
28590
|
}
|
|
28591
28591
|
__name(injectErrorData, "injectErrorData");
|
|
28592
28592
|
function handleDevProxyError(err, req, res, options) {
|
|
28593
|
-
const { logDir = import_node_path2.default.join(process.cwd(), "logs"), maxErrorLogs = 100, logFileName = "server.log", retryTimeout = 5e3, retryInterval = 500, target
|
|
28593
|
+
const { logDir = import_node_path2.default.join(process.cwd(), "logs"), maxErrorLogs = 100, logFileName = "server.log", retryTimeout = 5e3, retryInterval = 500, target = `http://localhost:${process.env.SERVER_PORT || 3e3}`, clientBasePath = process.env.CLIENT_BASE_PATH || "/" } = options || {};
|
|
28594
28594
|
const clientBasePathWithoutSlash = normalizeBasePath(clientBasePath);
|
|
28595
|
-
console.error("[Proxy Error]:", err.message);
|
|
28595
|
+
console.error("[Proxy Error]:", err.message, clientBasePathWithoutSlash);
|
|
28596
28596
|
if (res.headersSent) {
|
|
28597
28597
|
console.error("[Proxy Error]: Headers already sent, cannot send error page");
|
|
28598
28598
|
return;
|
|
@@ -28601,7 +28601,7 @@ function handleDevProxyError(err, req, res, options) {
|
|
|
28601
28601
|
try {
|
|
28602
28602
|
const isConnError = isConnectionError(err);
|
|
28603
28603
|
const { logs: errorLogs, hasCompileError } = await readRecentErrorLogs(logDir, maxErrorLogs, logFileName);
|
|
28604
|
-
if (isConnError && !hasCompileError
|
|
28604
|
+
if (isConnError && !hasCompileError) {
|
|
28605
28605
|
console.log("[Proxy Error]: Connection error without compile errors, possibly server restarting...");
|
|
28606
28606
|
try {
|
|
28607
28607
|
new URL(target);
|