@getuserfeedback/react-native 3.0.75 → 3.0.76

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.
@@ -1,11 +1,9 @@
1
1
  import { type CoreCommandEnvelope } from "@getuserfeedback/protocol";
2
- import { type EventHandleInvalidated } from "@getuserfeedback/protocol/internal/core-handle-invalidation";
3
2
  import { type EventCommandSettled } from "@getuserfeedback/protocol/internal/core-host-command-settlement";
4
3
  import type { CoreWebViewHostConnection } from "./core-webview-host-controller.js";
5
4
  export type NativeCoreCommandChannel = {
6
5
  post: (envelope: CoreCommandEnvelope) => void;
7
6
  subscribe: (listener: (message: EventCommandSettled) => void) => () => void;
8
- subscribeHandleInvalidated: (listener: (message: EventHandleInvalidated) => void) => () => void;
9
7
  };
10
8
  type OwnedNativeCoreCommandChannel = {
11
9
  channel: NativeCoreCommandChannel;
@@ -1,14 +1,12 @@
1
1
  import { coreCommandEnvelopeSchema, } from "@getuserfeedback/protocol";
2
- import { eventHandleInvalidatedSchema, } from "@getuserfeedback/protocol/internal/core-handle-invalidation";
3
2
  import { eventCommandSettledSchema, } from "@getuserfeedback/protocol/internal/core-host-command-settlement";
4
3
  const DISPOSED_MESSAGE = "Core command channel is disposed";
5
4
  const isRecord = (value) => typeof value === "object" && value !== null;
6
5
  export function createNativeCoreCommandChannel(input) {
7
6
  const listeners = new Set();
8
- const handleInvalidatedListeners = new Set();
9
7
  let disposed = false;
10
8
  const handleMessage = (value) => {
11
- var _a, _b;
9
+ var _a;
12
10
  if (disposed || !isRecord(value)) {
13
11
  return;
14
12
  }
@@ -28,22 +26,6 @@ export function createNativeCoreCommandChannel(input) {
28
26
  }
29
27
  return;
30
28
  }
31
- if (value.t !== "getuserfeedback:event:handleInvalidated") {
32
- return;
33
- }
34
- const parsed = eventHandleInvalidatedSchema.safeParse(value);
35
- if (!parsed.success) {
36
- (_b = input.onInvalidMessage) === null || _b === void 0 ? void 0 : _b.call(input, parsed.error instanceof Error
37
- ? parsed.error
38
- : new Error("Invalid core handle invalidation message"), value);
39
- return;
40
- }
41
- if (parsed.data.gen !== input.coreConnection.generation) {
42
- return;
43
- }
44
- for (const listener of [...handleInvalidatedListeners]) {
45
- listener(parsed.data);
46
- }
47
29
  };
48
30
  const unsubscribeTransport = input.coreConnection.transport.subscribe(handleMessage);
49
31
  const channel = {
@@ -63,15 +45,6 @@ export function createNativeCoreCommandChannel(input) {
63
45
  listeners.delete(listener);
64
46
  };
65
47
  },
66
- subscribeHandleInvalidated: (listener) => {
67
- if (disposed) {
68
- return () => { };
69
- }
70
- handleInvalidatedListeners.add(listener);
71
- return () => {
72
- handleInvalidatedListeners.delete(listener);
73
- };
74
- },
75
48
  };
76
49
  return {
77
50
  channel,
@@ -82,7 +55,6 @@ export function createNativeCoreCommandChannel(input) {
82
55
  disposed = true;
83
56
  unsubscribeTransport();
84
57
  listeners.clear();
85
- handleInvalidatedListeners.clear();
86
58
  },
87
59
  };
88
60
  }
@@ -1,10 +1,8 @@
1
1
  import { type CoreCommandEnvelope } from "@getuserfeedback/protocol";
2
2
  import { type CommandSettledDetail } from "@getuserfeedback/protocol/host";
3
- import type { EventHandleInvalidated } from "@getuserfeedback/protocol/internal/core-handle-invalidation";
4
3
  import type { NativeCoreCommandChannel } from "./native-core-command-channel.js";
5
4
  export type NativeCoreCommandSession = {
6
5
  dispatch: (envelope: CoreCommandEnvelope) => Promise<CommandSettledDetail>;
7
- subscribeHandleInvalidated: (listener: (message: EventHandleInvalidated) => void) => () => void;
8
6
  };
9
7
  type NativeCoreCommandSessionOwner = {
10
8
  dispose: () => void;
@@ -24,7 +24,6 @@ function toCommandSettledDetail(settlement) {
24
24
  export function createNativeCoreCommandSession(input) {
25
25
  const pendingCommands = createPendingCommandTracker();
26
26
  const pendingIdentityByRequestId = new Map();
27
- const handleInvalidatedListeners = new Set();
28
27
  let disposed = false;
29
28
  const unsubscribeSettlements = input.channel.subscribe((settlement) => {
30
29
  const detail = toCommandSettledDetail(settlement);
@@ -41,11 +40,6 @@ export function createNativeCoreCommandSession(input) {
41
40
  }
42
41
  pendingCommands.reject(detail.requestId, toCommandSettlementError(detail));
43
42
  });
44
- const unsubscribeHandleInvalidated = input.channel.subscribeHandleInvalidated((message) => {
45
- for (const listener of [...handleInvalidatedListeners]) {
46
- listener(message);
47
- }
48
- });
49
43
  return {
50
44
  session: {
51
45
  dispatch: async (envelope) => {
@@ -67,15 +61,6 @@ export function createNativeCoreCommandSession(input) {
67
61
  }
68
62
  return settlement;
69
63
  },
70
- subscribeHandleInvalidated: (listener) => {
71
- if (disposed) {
72
- return () => { };
73
- }
74
- handleInvalidatedListeners.add(listener);
75
- return () => {
76
- handleInvalidatedListeners.delete(listener);
77
- };
78
- },
79
64
  },
80
65
  dispose: () => {
81
66
  if (disposed) {
@@ -83,8 +68,6 @@ export function createNativeCoreCommandSession(input) {
83
68
  }
84
69
  disposed = true;
85
70
  unsubscribeSettlements();
86
- unsubscribeHandleInvalidated();
87
- handleInvalidatedListeners.clear();
88
71
  pendingIdentityByRequestId.clear();
89
72
  pendingCommands.reset((requestId) => new NativeCoreCommandSessionClosedError(requestId));
90
73
  },
package/dist/version.js CHANGED
@@ -3,4 +3,4 @@ const reactNativeSdkVersion = typeof __GX_REACT_NATIVE_SDK_VERSION__ === "string
3
3
  : "";
4
4
  // Build scripts patch this fallback to the package version for published artifacts.
5
5
  // Source-linked workspace usage keeps the local fallback.
6
- export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "3.0.75";
6
+ export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "3.0.76";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getuserfeedback/react-native",
3
- "version": "3.0.75",
3
+ "version": "3.0.76",
4
4
  "description": "getuserfeedback React Native SDK",
5
5
  "keywords": [
6
6
  "getuserfeedback",