Line data Source code
1 : /**
2 : * Distribution types and compile-time constants for managing
3 : * multi-distribution builds (Desktop, Localhost, Cloud)
4 : */
5 :
6 : declare global {
7 : const __DISTRIBUTION__: 'desktop' | 'localhost' | 'cloud'
8 : const __IS_NIGHTLY__: boolean
9 : }
10 :
11 : export type Distribution = typeof __DISTRIBUTION__
12 :
13 2356 : export const DISTRIBUTION: Distribution = __DISTRIBUTION__
14 :
15 : export const isDesktop = DISTRIBUTION === 'desktop'
16 : export const isCloud = DISTRIBUTION === 'cloud'
17 :
18 : /**
19 : * Whether this is a nightly build (from main branch).
20 : * Nightly builds may show experimental features and surveys.
21 : */
22 : export const isNightly = __IS_NIGHTLY__
|