Changeset View
Changeset View
Standalone View
Standalone View
lib/reducers/thread-reducer.js
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
import { updateTypes } from '../types/update-types-enum.js'; | import { updateTypes } from '../types/update-types-enum.js'; | ||||
import { | import { | ||||
type ClientUpdateInfo, | type ClientUpdateInfo, | ||||
processUpdatesActionType, | processUpdatesActionType, | ||||
} from '../types/update-types.js'; | } from '../types/update-types.js'; | ||||
import { actionLogger } from '../utils/action-logger.js'; | import { actionLogger } from '../utils/action-logger.js'; | ||||
import { setNewSessionActionType } from '../utils/action-utils.js'; | import { setNewSessionActionType } from '../utils/action-utils.js'; | ||||
import { getConfig } from '../utils/config.js'; | import { getConfig } from '../utils/config.js'; | ||||
import { generateReportID } from '../utils/report-utils.js'; | |||||
import { sanitizeActionSecrets } from '../utils/sanitization.js'; | import { sanitizeActionSecrets } from '../utils/sanitization.js'; | ||||
function generateOpsForThreadUpdates( | function generateOpsForThreadUpdates( | ||||
threadInfos: { +[id: string]: RawThreadInfo }, | threadInfos: { +[id: string]: RawThreadInfo }, | ||||
payload: { | payload: { | ||||
+updatesResult: { +newUpdates: $ReadOnlyArray<ClientUpdateInfo>, ... }, | +updatesResult: { +newUpdates: $ReadOnlyArray<ClientUpdateInfo>, ... }, | ||||
... | ... | ||||
}, | }, | ||||
▲ Show 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | return [ | ||||
{ | { | ||||
type: reportTypes.THREAD_INCONSISTENCY, | type: reportTypes.THREAD_INCONSISTENCY, | ||||
platformDetails: getConfig().platformDetails, | platformDetails: getConfig().platformDetails, | ||||
beforeAction: beforeStateCheck, | beforeAction: beforeStateCheck, | ||||
action: sanitizeActionSecrets(action), | action: sanitizeActionSecrets(action), | ||||
pushResult: afterStateCheck, | pushResult: afterStateCheck, | ||||
lastActions: actionLogger.interestingActionSummaries, | lastActions: actionLogger.interestingActionSummaries, | ||||
time: Date.now(), | time: Date.now(), | ||||
id: generateReportID(), | |||||
}, | }, | ||||
]; | ]; | ||||
} | } | ||||
function reduceThreadInfos( | function reduceThreadInfos( | ||||
state: ThreadStore, | state: ThreadStore, | ||||
action: BaseAction, | action: BaseAction, | ||||
): { | ): { | ||||
▲ Show 20 Lines • Show All 355 Lines • Show Last 20 Lines |