()
| 1733 | } |
| 1734 | |
| 1735 | export function getAutoUpdaterDisabledReason(): AutoUpdaterDisabledReason | null { |
| 1736 | if (process.env.NODE_ENV === 'development') { |
| 1737 | return { type: 'development' } |
| 1738 | } |
| 1739 | if (isEnvTruthy(process.env.DISABLE_AUTOUPDATER)) { |
| 1740 | return { type: 'env', envVar: 'DISABLE_AUTOUPDATER' } |
| 1741 | } |
| 1742 | const essentialTrafficEnvVar = getEssentialTrafficOnlyReason() |
| 1743 | if (essentialTrafficEnvVar) { |
| 1744 | return { type: 'env', envVar: essentialTrafficEnvVar } |
| 1745 | } |
| 1746 | const config = getGlobalConfig() |
| 1747 | if ( |
| 1748 | config.autoUpdates === false && |
| 1749 | (config.installMethod !== 'native' || |
| 1750 | config.autoUpdatesProtectedForNative !== true) |
| 1751 | ) { |
| 1752 | return { type: 'config' } |
| 1753 | } |
| 1754 | return null |
| 1755 | } |
| 1756 | |
| 1757 | export function getOrCreateUserID(): string { |
| 1758 | const config = getGlobalConfig() |
no test coverage detected