@getuserfeedback/react-native 3.0.71 → 3.0.72
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,10 +1,16 @@
|
|
|
1
1
|
import { getFlowHandleFromSettlementDetail } from "@getuserfeedback/protocol/host";
|
|
2
2
|
import { toCoreCommandPayload, } from "@getuserfeedback/protocol/internal/public-core-command";
|
|
3
3
|
import { createFlowHandleCommandStateStore, planFlowHandleCommand, } from "./view-orchestration-runtime.js";
|
|
4
|
-
// TODO(migration): Add native instance-wide command ordering
|
|
4
|
+
// TODO(migration): Add native instance-wide command ordering before routing reset, unscoped close, and the public provider client through this direct session.
|
|
5
5
|
// [from=native-flow-handle-command-session] [to=native-instance-flow-command-session] [scope=slice] [principle=core-owned-flow-lifecycle] [priority=high] [impact=high] [risk=high] [epic=runtime-neutral-view-host-orchestration] [epic_order=180]
|
|
6
6
|
export function createNativeDirectCommandSession(input) {
|
|
7
7
|
const flowHandleCommandStateStore = createFlowHandleCommandStateStore();
|
|
8
|
+
// The direct session shares the core session lifetime; core-session disposal clears this listener.
|
|
9
|
+
input.coreSession.subscribeHandleInvalidated((message) => {
|
|
10
|
+
if (message.handleKind === "flow") {
|
|
11
|
+
flowHandleCommandStateStore.invalidate(message.handleId);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
const dispatchToCore = (envelope, command) => {
|
|
9
15
|
const coreEnvelope = Object.assign(Object.assign({}, envelope), { command: toCoreCommandPayload(command) });
|
|
10
16
|
return input.coreSession.dispatch(coreEnvelope);
|
|
@@ -87,7 +93,8 @@ export function createNativeDirectCommandSession(input) {
|
|
|
87
93
|
throw new Error(`Expected ${command.kind} settlement to include matching flowHandleId and flowRunId`);
|
|
88
94
|
}
|
|
89
95
|
if (shouldResolveFlowRun &&
|
|
90
|
-
!state.runtime.finishFlowRunResolution(envelope.requestId)
|
|
96
|
+
!state.runtime.finishFlowRunResolution(envelope.requestId) &&
|
|
97
|
+
state.runtime.getSnapshot().state !== "invalidated") {
|
|
91
98
|
throw new Error(`Could not finish flow-run resolution for requestId "${envelope.requestId}"`);
|
|
92
99
|
}
|
|
93
100
|
state.runtime.bindFlowRun({
|
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.72";
|