/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
shared/local-debug.tsx
103 строки
3 KB
chrisnojima
fix(provision): waiting feedback, back-out of hung RPCs, and device-list responsiveness (#29456)
23 июл 2026, 23:42
Не верифицирован
23 июл 2026, 23:42
94f84ce
Код
Авторство
О чём код?
/* * File to stash local debug changes to. Never check this in with changes */ import noop from 'lodash/noop' import KB2 from '@/util/electron' import {LogBox} from 'react-native' import * as rnkb from 'react-native-kb' // Mobile-only side effects (disabled yellow box warnings) if (isMobile) { LogBox.ignoreAllLogs() } const PERF = false as boolean let config = { allowMultipleInstances: false, featureFlagsOverride: '' as string | undefined, forceImmediateLogging: false, ignoreDisconnectOverlay: false, isDevApplePushToken: false, printOutstandingRPCs: false, printOutstandingTimerListeners: false, printRPC: false, printRPCBytes: false, printRPCStats: false, printRPCWaitingSession: false, showDevTools: false, skipAppFocusActions: false, skipSecondaryDevtools: true, } if (__DEV__) { if (isMobile) { config.isDevApplePushToken = true config.printOutstandingRPCs = false config.printOutstandingTimerListeners = false config.printRPCWaitingSession = false config.printRPC = true config.printRPCStats = false } else { config.printOutstandingRPCs = true config.printOutstandingTimerListeners = true config.printRPC = true config.printRPCStats = true config.printRPCWaitingSession = false config.showDevTools = true config.skipSecondaryDevtools = true } } if (!isMobile) { config = {...config, ...(KB2.constants.configOverload as Partial<typeof config>)} } if (isMobile) { const serverConfig = (rnkb as {serverConfig?: string}).serverConfig if (serverConfig) { try { const sc = JSON.parse(serverConfig) as undefined | {[key: string]: unknown} if (sc?.['lastLoggedInUser']) { const lastLoggedInUser = sc['lastLoggedInUser'] if (typeof lastLoggedInUser === 'string') { const userConfig = sc[lastLoggedInUser] as {[key: string]: unknown} if (typeof userConfig === 'object' && userConfig['printRPCStats']) { config.printRPCStats = true } } } } catch {} } } if (PERF) { console.warn('\n\n\nlocal debug PERF is ONNNNNn!!!!!1!!!11!!!!\nAll console.logs disabled!\n\n\n') console.log = noop console.warn = noop console.error = noop console.info = noop config.forceImmediateLogging = false config.printOutstandingRPCs = false config.printOutstandingTimerListeners = false config.printRPC = false } export const { allowMultipleInstances, featureFlagsOverride, forceImmediateLogging, ignoreDisconnectOverlay, isDevApplePushToken, printOutstandingRPCs, printOutstandingTimerListeners, printRPC, printRPCBytes, printRPCStats, printRPCWaitingSession, showDevTools, skipAppFocusActions, skipSecondaryDevtools, } = config