MCPcopy Create free account
hub / github.com/Noumena-Network/code / getAutoUpdaterDisabledReason

Function getAutoUpdaterDisabledReason

src/utils/config.ts:1833–1853  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1831}
1832
1833export function getAutoUpdaterDisabledReason(): AutoUpdaterDisabledReason | null {
1834 if (isDevelopmentLikeBuild()) {
1835 return { type: 'development' }
1836 }
1837 if (isEnvTruthy(process.env.DISABLE_AUTOUPDATER)) {
1838 return { type: 'env', envVar: 'DISABLE_AUTOUPDATER' }
1839 }
1840 const essentialTrafficEnvVar = getEssentialTrafficOnlyReason()
1841 if (essentialTrafficEnvVar) {
1842 return { type: 'env', envVar: essentialTrafficEnvVar }
1843 }
1844 const config = getGlobalConfig()
1845 if (
1846 config.autoUpdates === false &&
1847 (config.installMethod !== 'native' ||
1848 config.autoUpdatesProtectedForNative !== true)
1849 ) {
1850 return { type: 'config' }
1851 }
1852 return null
1853}
1854
1855export function getOrCreateUserID(): string {
1856 const config = getGlobalConfig()

Callers 3

ConfigFunction · 0.85
isAutoUpdaterDisabledFunction · 0.85
getDoctorDiagnosticFunction · 0.85

Calls 4

isEnvTruthyFunction · 0.90
isDevelopmentLikeBuildFunction · 0.85
getGlobalConfigFunction · 0.70

Tested by

no test coverage detected