anear-js-api 0.4.39 → 0.4.40
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.
|
@@ -1044,9 +1044,9 @@ const AnearEventMachineFunctions = ({
|
|
|
1044
1044
|
const type = event.data.type
|
|
1045
1045
|
switch (type) {
|
|
1046
1046
|
case 'PARTICIPANT_EXIT':
|
|
1047
|
-
case 'EVENT_UNMOUNT':
|
|
1048
|
-
case 'TRANSITION_CLOSED':
|
|
1049
1047
|
return true
|
|
1048
|
+
case 'EVENT_UNMOUNT':
|
|
1049
|
+
return false
|
|
1050
1050
|
default:
|
|
1051
1051
|
return false
|
|
1052
1052
|
}
|
|
@@ -106,20 +106,10 @@ const AnearParticipantMachineConfig = participantId => ({
|
|
|
106
106
|
actions: 'logExit',
|
|
107
107
|
target: '#cleanupAndExit'
|
|
108
108
|
},
|
|
109
|
-
PARTICIPANT_RECONNECT:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
'logReconnected',
|
|
114
|
-
'republishWithRemainingTimeout'
|
|
115
|
-
],
|
|
116
|
-
target: 'waitParticipantResponse'
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
actions: 'logReconnected',
|
|
120
|
-
target: 'idle'
|
|
121
|
-
}
|
|
122
|
-
]
|
|
109
|
+
PARTICIPANT_RECONNECT: {
|
|
110
|
+
actions: 'logReconnected',
|
|
111
|
+
internal: true
|
|
112
|
+
}
|
|
123
113
|
}
|
|
124
114
|
},
|
|
125
115
|
waitReconnect: {
|
|
@@ -141,10 +131,17 @@ const AnearParticipantMachineConfig = participantId => ({
|
|
|
141
131
|
PARTICIPANT_EXIT: {
|
|
142
132
|
target: '#cleanupAndExit'
|
|
143
133
|
},
|
|
144
|
-
PARTICIPANT_RECONNECT:
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
134
|
+
PARTICIPANT_RECONNECT: [
|
|
135
|
+
{
|
|
136
|
+
cond: 'wasMidTurnOnDisconnect',
|
|
137
|
+
actions: 'logReconnected',
|
|
138
|
+
target: 'waitParticipantResponse'
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
actions: 'logReconnected',
|
|
142
|
+
target: 'idle'
|
|
143
|
+
}
|
|
144
|
+
]
|
|
148
145
|
}
|
|
149
146
|
},
|
|
150
147
|
renderDisplay: {
|
|
@@ -185,6 +182,10 @@ const AnearParticipantMachineConfig = participantId => ({
|
|
|
185
182
|
PARTICIPANT_DISCONNECT: {
|
|
186
183
|
actions: 'updateRemainingTimeoutOnDisconnect',
|
|
187
184
|
target: 'waitReconnect'
|
|
185
|
+
},
|
|
186
|
+
PARTICIPANT_RECONNECT: {
|
|
187
|
+
actions: 'logReconnected',
|
|
188
|
+
internal: true
|
|
188
189
|
}
|
|
189
190
|
}
|
|
190
191
|
},
|
|
@@ -16,7 +16,11 @@ const AppMachineTransition = (anearEvent) => {
|
|
|
16
16
|
return (appEventMachineState) => {
|
|
17
17
|
// Handle potential XState version differences and missing properties
|
|
18
18
|
const { meta: rawMeta, context: appContext, value, event } = appEventMachineState || {}
|
|
19
|
-
|
|
19
|
+
const stateName = _stringifiedState(value)
|
|
20
|
+
const hasMeta = rawMeta && Object.keys(rawMeta).length > 0;
|
|
21
|
+
|
|
22
|
+
logger.debug(`[AppMachineTransition] onTransition to state '${stateName}'. Meta detected: ${hasMeta}`)
|
|
23
|
+
|
|
20
24
|
// Handle unpredictable meta structure
|
|
21
25
|
const metaObjects = rawMeta ? Object.values(rawMeta) : []
|
|
22
26
|
|