@lark-apaas/client-toolkit-lite 1.1.7-alpha.16 → 1.1.7-alpha.18

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 CHANGED
@@ -2448,11 +2448,15 @@ var ErrorRender = /* @__PURE__ */ __name((props) => {
2448
2448
  (0, import_react12.useEffect)(() => {
2449
2449
  if (!resetErrorBoundary) return;
2450
2450
  const hmr = getHmrApi();
2451
- if (hmr) {
2452
- return hmr.onSuccess(() => {
2451
+ if (!hmr) return;
2452
+ return hmr.onSuccess(() => {
2453
+ const isVite = typeof window !== "undefined" && Boolean(window.__VITE_HMR__);
2454
+ if (isVite) {
2455
+ window.location.reload();
2456
+ } else {
2453
2457
  resetErrorBoundary();
2454
- });
2455
- }
2458
+ }
2459
+ });
2456
2460
  }, [
2457
2461
  resetErrorBoundary
2458
2462
  ]);
@@ -2847,6 +2851,11 @@ var capabilityClient = (0, import_client_capability.createClient)({
2847
2851
  headers: {
2848
2852
  "X-Suda-Csrf-Token": window.csrfToken ?? ""
2849
2853
  }
2854
+ },
2855
+ central: {
2856
+ enabled: true,
2857
+ // window.appId 由妙搭沙箱 / 线上环境注入;非妙搭场景下 capability 调用本身不可用
2858
+ appId: _appId ?? ""
2850
2859
  }
2851
2860
  });
2852
2861