@lark-apaas/devtool-kits 1.2.13 → 1.2.14-alpha.1

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.js CHANGED
@@ -1394,8 +1394,8 @@ function checkForErrors(logs) {
1394
1394
  return false;
1395
1395
  }
1396
1396
  __name(checkForErrors, "checkForErrors");
1397
- function injectTemplateData(template, clientBasePath) {
1398
- return template.replace("{{.clientBasePath}}", clientBasePath);
1397
+ function injectTemplateData(template, clientBasePath, parentOrigin) {
1398
+ return template.replace("{{.clientBasePath}}", clientBasePath).replace("{{.parentOrigin}}", parentOrigin);
1399
1399
  }
1400
1400
  __name(injectTemplateData, "injectTemplateData");
1401
1401
  function handleDevProxyError(err, req, res, options) {
@@ -1433,7 +1433,8 @@ function handleDevProxyError(err, req, res, options) {
1433
1433
  console.log("[Proxy Error]: Compile error or non-connection error, showing error page");
1434
1434
  }
1435
1435
  const template = getErrorHtmlTemplate();
1436
- const html = injectTemplateData(template, clientBasePathWithoutSlash);
1436
+ const parentOrigin = process.env.FORCE_FRAMEWORK_DOMAIN_MAIN || "";
1437
+ const html = injectTemplateData(template, clientBasePathWithoutSlash, parentOrigin);
1437
1438
  res.writeHead(200, {
1438
1439
  "Content-Type": "text/html; charset=utf-8",
1439
1440
  "Cache-Control": "no-cache, no-store, must-revalidate",