@getuserfeedback/react-native 3.0.73 → 3.0.75
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.
|
@@ -23,10 +23,18 @@ function toCommandSettledDetail(settlement) {
|
|
|
23
23
|
}
|
|
24
24
|
export function createNativeCoreCommandSession(input) {
|
|
25
25
|
const pendingCommands = createPendingCommandTracker();
|
|
26
|
+
const pendingIdentityByRequestId = new Map();
|
|
26
27
|
const handleInvalidatedListeners = new Set();
|
|
27
28
|
let disposed = false;
|
|
28
29
|
const unsubscribeSettlements = input.channel.subscribe((settlement) => {
|
|
29
30
|
const detail = toCommandSettledDetail(settlement);
|
|
31
|
+
const pendingIdentity = pendingIdentityByRequestId.get(detail.requestId);
|
|
32
|
+
if (!pendingIdentity ||
|
|
33
|
+
detail.instanceId !== pendingIdentity.instanceId ||
|
|
34
|
+
detail.kind !== pendingIdentity.kind) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
pendingIdentityByRequestId.delete(detail.requestId);
|
|
30
38
|
if (detail.ok) {
|
|
31
39
|
pendingCommands.resolve(detail.requestId, detail);
|
|
32
40
|
return;
|
|
@@ -46,10 +54,15 @@ export function createNativeCoreCommandSession(input) {
|
|
|
46
54
|
}
|
|
47
55
|
const canonicalEnvelope = coreCommandEnvelopeSchema.parse(envelope);
|
|
48
56
|
const settlement = pendingCommands.waitFor(canonicalEnvelope.requestId);
|
|
57
|
+
pendingIdentityByRequestId.set(canonicalEnvelope.requestId, {
|
|
58
|
+
instanceId: canonicalEnvelope.instanceId,
|
|
59
|
+
kind: canonicalEnvelope.command.kind,
|
|
60
|
+
});
|
|
49
61
|
try {
|
|
50
62
|
input.channel.post(canonicalEnvelope);
|
|
51
63
|
}
|
|
52
64
|
catch (error) {
|
|
65
|
+
pendingIdentityByRequestId.delete(canonicalEnvelope.requestId);
|
|
53
66
|
pendingCommands.reject(canonicalEnvelope.requestId, error instanceof Error ? error : new Error(String(error)));
|
|
54
67
|
}
|
|
55
68
|
return settlement;
|
|
@@ -72,6 +85,7 @@ export function createNativeCoreCommandSession(input) {
|
|
|
72
85
|
unsubscribeSettlements();
|
|
73
86
|
unsubscribeHandleInvalidated();
|
|
74
87
|
handleInvalidatedListeners.clear();
|
|
88
|
+
pendingIdentityByRequestId.clear();
|
|
75
89
|
pendingCommands.reset((requestId) => new NativeCoreCommandSessionClosedError(requestId));
|
|
76
90
|
},
|
|
77
91
|
};
|
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.
|
|
6
|
+
export const REACT_NATIVE_SDK_VERSION = reactNativeSdkVersion.length > 0 ? reactNativeSdkVersion : "3.0.75";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@getuserfeedback/react-native",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.75",
|
|
4
4
|
"description": "getuserfeedback React Native SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"getuserfeedback",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"lint": "biome check ."
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@getuserfeedback/protocol": "^3.
|
|
48
|
-
"@getuserfeedback/sdk": "^0.12.
|
|
47
|
+
"@getuserfeedback/protocol": "^3.19.0",
|
|
48
|
+
"@getuserfeedback/sdk": "^0.12.4",
|
|
49
49
|
"robot3": "^1.2.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|