@flotrace/runtime 2.0.2 → 2.2.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
@@ -754,6 +754,37 @@ function FloTraceProvider({ children, config = {}, stores, reduxStore, queryClie
754
754
  }
755
755
  break;
756
756
  }
757
+ // Value Lineage — resolve the origin chain for a prop or hook value.
758
+ case "ext:traceValue": {
759
+ try {
760
+ const trace = (0, import_runtime_core3.resolveValueTrace)({
761
+ nodeId: message.nodeId,
762
+ propPath: message.propPath,
763
+ hookPath: message.hookPath
764
+ });
765
+ client3.sendImmediate({
766
+ type: "runtime:valueTrace",
767
+ trace: { requestId: message.requestId, ...trace },
768
+ timestamp: Date.now()
769
+ });
770
+ } catch (error) {
771
+ console.error("[FloTrace] resolveValueTrace threw:", error);
772
+ client3.sendImmediate({
773
+ type: "runtime:valueTrace",
774
+ trace: {
775
+ requestId: message.requestId,
776
+ rootNodeId: message.nodeId,
777
+ rootPropPath: message.propPath,
778
+ rootHookPath: message.hookPath,
779
+ steps: [],
780
+ resolvedAtMs: Date.now(),
781
+ error: "value-not-found"
782
+ },
783
+ timestamp: Date.now()
784
+ });
785
+ }
786
+ break;
787
+ }
757
788
  case "ext:startNetworkCapture":
758
789
  safeTrackerOp("Network capture start", () => installNetworkTracker(client3));
759
790
  break;
package/dist/index.mjs CHANGED
@@ -26,7 +26,8 @@ import {
26
26
  installTimelineTracker,
27
27
  uninstallTimelineTracker,
28
28
  getTimeline,
29
- detectWebFramework
29
+ detectWebFramework,
30
+ resolveValueTrace
30
31
  } from "@flotrace/runtime-core";
31
32
 
32
33
  // src/routerTracker.ts
@@ -742,6 +743,37 @@ function FloTraceProvider({ children, config = {}, stores, reduxStore, queryClie
742
743
  }
743
744
  break;
744
745
  }
746
+ // Value Lineage — resolve the origin chain for a prop or hook value.
747
+ case "ext:traceValue": {
748
+ try {
749
+ const trace = resolveValueTrace({
750
+ nodeId: message.nodeId,
751
+ propPath: message.propPath,
752
+ hookPath: message.hookPath
753
+ });
754
+ client3.sendImmediate({
755
+ type: "runtime:valueTrace",
756
+ trace: { requestId: message.requestId, ...trace },
757
+ timestamp: Date.now()
758
+ });
759
+ } catch (error) {
760
+ console.error("[FloTrace] resolveValueTrace threw:", error);
761
+ client3.sendImmediate({
762
+ type: "runtime:valueTrace",
763
+ trace: {
764
+ requestId: message.requestId,
765
+ rootNodeId: message.nodeId,
766
+ rootPropPath: message.propPath,
767
+ rootHookPath: message.hookPath,
768
+ steps: [],
769
+ resolvedAtMs: Date.now(),
770
+ error: "value-not-found"
771
+ },
772
+ timestamp: Date.now()
773
+ });
774
+ }
775
+ break;
776
+ }
745
777
  case "ext:startNetworkCapture":
746
778
  safeTrackerOp("Network capture start", () => installNetworkTracker(client3));
747
779
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flotrace/runtime",
3
- "version": "2.0.2",
3
+ "version": "2.2.1",
4
4
  "description": "Runtime package for FloTrace - enables real-time render tracking in your React app",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -26,7 +26,7 @@
26
26
  "release:major": "npm version major && npm publish"
27
27
  },
28
28
  "dependencies": {
29
- "@flotrace/runtime-core": "2.0.1"
29
+ "@flotrace/runtime-core": "2.2.1"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=16.9.0",