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

Function getAutoUpdaterDisabledReason

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

Source from the content-addressed store, hash-verified

1753}
1754
1755export function getAutoUpdaterDisabledReason(): AutoUpdaterDisabledReason | null {
1756 if (process.env.NODE_ENV === 'development') {
1757 return { type: 'development' }
1758 }
1759 if (isEnvTruthy(process.env.DISABLE_AUTOUPDATER)) {
1760 return { type: 'env', envVar: 'DISABLE_AUTOUPDATER' }
1761 }
1762 const essentialTrafficEnvVar = getEssentialTrafficOnlyReason()
1763 if (essentialTrafficEnvVar) {
1764 return { type: 'env', envVar: essentialTrafficEnvVar }
1765 }
1766 const config = getGlobalConfig()
1767 if (
1768 config.autoUpdates === false &&
1769 (config.installMethod !== 'native' ||
1770 config.autoUpdatesProtectedForNative !== true)
1771 ) {
1772 return { type: 'config' }
1773 }
1774 return null
1775}
1776
1777export function getOrCreateUserID(): string {
1778 const config = getGlobalConfig()

Callers 3

ConfigFunction · 0.85
isAutoUpdaterDisabledFunction · 0.85
getDoctorDiagnosticFunction · 0.85

Calls 3

isEnvTruthyFunction · 0.85
getGlobalConfigFunction · 0.85

Tested by

no test coverage detected