()
| 1753 | } |
| 1754 | |
| 1755 | export 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 | |
| 1777 | export function getOrCreateUserID(): string { |
| 1778 | const config = getGlobalConfig() |
no test coverage detected