@localstack/appinspector-ui 1.0.119 → 1.0.121

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
@@ -15584,8 +15584,8 @@ var StatusMessage = ({
15584
15584
  setEnabling(false);
15585
15585
  }
15586
15586
  };
15587
- if (error instanceof AppInspectorNotFoundError) {
15588
- const isBelowMinimum = localstackVersion !== void 0 && checkEmulatorVersion(localstackVersion) === "below-minimum";
15587
+ const isBelowMinimum = localstackVersion !== void 0 && checkEmulatorVersion(localstackVersion) === "below-minimum";
15588
+ if (isBelowMinimum || error instanceof AppInspectorNotFoundError) {
15589
15589
  return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
15590
15590
  import_material9.Box,
15591
15591
  {
@@ -15605,7 +15605,7 @@ var StatusMessage = ({
15605
15605
  sx: { maxWidth: 600, width: "100%" },
15606
15606
  children: [
15607
15607
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.AlertTitle, { sx: { fontWeight: "bold" }, children: "App Inspector Not Available" }),
15608
- /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: isBelowMinimum ? `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. You are running version ${localstackVersion}. Please update LocalStack.` : "App Inspector is not available in LocalStack. Ensure LocalStack is up-to-date." }),
15608
+ /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 2 }, variant: "body2", children: isBelowMinimum ? `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. You are running version ${localstackVersion}. Please update LocalStack.` : `App Inspector requires LocalStack ${MINIMUM_EMULATOR_VERSION} or later. Please update LocalStack.` }),
15609
15609
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_material9.Typography, { sx: { mb: 1 }, variant: "body2", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("strong", { children: "Update LocalStack:" }) }),
15610
15610
  /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
15611
15611
  import_material9.Box,
@@ -31506,7 +31506,49 @@ var SpansListPage = () => {
31506
31506
  clearFetchError();
31507
31507
  void checkStatus();
31508
31508
  }, [api, checkStatus, clearFetchError]);
31509
+ const isDelayedRefetchRef = (0, import_react68.useRef)(false);
31510
+ const delayedRefetchTimerRef = (0, import_react68.useRef)();
31511
+ const prevFetchingForwardRef = (0, import_react68.useRef)(false);
31512
+ (0, import_react68.useEffect)(() => {
31513
+ const wasFetching = prevFetchingForwardRef.current;
31514
+ prevFetchingForwardRef.current = fetchingForward;
31515
+ if (wasFetching && !fetchingForward) {
31516
+ if (isDelayedRefetchRef.current) {
31517
+ isDelayedRefetchRef.current = false;
31518
+ } else {
31519
+ clearTimeout(delayedRefetchTimerRef.current);
31520
+ delayedRefetchTimerRef.current = setTimeout(() => {
31521
+ isDelayedRefetchRef.current = true;
31522
+ fetchForward();
31523
+ }, 2e3);
31524
+ }
31525
+ }
31526
+ return () => {
31527
+ clearTimeout(delayedRefetchTimerRef.current);
31528
+ };
31529
+ }, [fetchingForward, fetchForward]);
31509
31530
  const shouldShowStatusMessage = Boolean(statusError) || status?.status === "DISABLED";
31531
+ if (versionCompatibility === "below-minimum") {
31532
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31533
+ StatusMessage,
31534
+ {
31535
+ localstackVersion,
31536
+ onRetry: handleRetry
31537
+ }
31538
+ );
31539
+ }
31540
+ if (shouldShowStatusMessage) {
31541
+ return /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31542
+ StatusMessage,
31543
+ {
31544
+ error: statusError,
31545
+ localstackVersion,
31546
+ onEnable: handleEnable,
31547
+ onRetry: handleRetry,
31548
+ status
31549
+ }
31550
+ );
31551
+ }
31510
31552
  return /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(import_jsx_runtime146.Fragment, { children: [
31511
31553
  /* @__PURE__ */ (0, import_jsx_runtime146.jsxs)(
31512
31554
  import_material23.Box,
@@ -31524,7 +31566,7 @@ var SpansListPage = () => {
31524
31566
  width: "100%"
31525
31567
  },
31526
31568
  children: [
31527
- !checking && !shouldShowStatusMessage && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31569
+ !checking && /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31528
31570
  EmulatorVersionBanner,
31529
31571
  {
31530
31572
  compatibility: bannerDismissed && versionCompatibility === "warning" ? "ok" : versionCompatibility,
@@ -31534,16 +31576,7 @@ var SpansListPage = () => {
31534
31576
  } : void 0
31535
31577
  }
31536
31578
  ),
31537
- shouldShowStatusMessage ? /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31538
- StatusMessage,
31539
- {
31540
- error: statusError,
31541
- localstackVersion,
31542
- onEnable: handleEnable,
31543
- onRetry: handleRetry,
31544
- status
31545
- }
31546
- ) : /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31579
+ /* @__PURE__ */ (0, import_jsx_runtime146.jsx)(
31547
31580
  SpansList,
31548
31581
  {
31549
31582
  clearingSpans,