mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
1import {type Did} from '@atproto/api'
2
3import packageJson from '#/../package.json'
4
5/**
6 * The semver version of the app, as defined in `package.json.`
7 *
8 * N.B. The fallback is needed for Render.com deployments
9 */
10export const RELEASE_VERSION: string =
11 process.env.EXPO_PUBLIC_RELEASE_VERSION || packageJson.version
12
13/**
14 * The env the app is running in e.g. development, testflight, production
15 */
16export const ENV: string = process.env.EXPO_PUBLIC_ENV
17
18/**
19 * Indicates whether the app is running in TestFlight
20 */
21export const IS_TESTFLIGHT = ENV === 'testflight'
22
23/**
24 * Indicates whether the app is __DEV__
25 */
26export const IS_DEV = __DEV__
27
28/**
29 * Indicates whether the app is __DEV__ or TestFlight
30 */
31export const IS_INTERNAL = IS_DEV || IS_TESTFLIGHT
32
33/**
34 * The commit hash that the current bundle was made from. The user can
35 * see the commit hash in the app's settings along with the other version info.
36 * Useful for debugging/reporting.
37 */
38export const BUNDLE_IDENTIFIER: string =
39 process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER || 'dev'
40
41/**
42 * This will always be in the format of YYMMDDHH, so that it always increases
43 * for each build. This should only be used for StatSig reporting and shouldn't
44 * be used to identify a specific bundle.
45 */
46export const BUNDLE_DATE: number =
47 process.env.EXPO_PUBLIC_BUNDLE_DATE === undefined
48 ? 0
49 : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE)
50
51/**
52 * The log level for the app.
53 */
54export const LOG_LEVEL = (process.env.EXPO_PUBLIC_LOG_LEVEL || 'info') as
55 | 'debug'
56 | 'info'
57 | 'warn'
58 | 'error'
59
60/**
61 * Enable debug logs for specific logger instances
62 */
63export const LOG_DEBUG: string = process.env.EXPO_PUBLIC_LOG_DEBUG || ''
64
65/**
66 * The DID of the chat service to proxy to
67 */
68export const CHAT_PROXY_DID: Did =
69 process.env.EXPO_PUBLIC_CHAT_PROXY_DID || 'did:web:api.bsky.chat'
70
71/**
72 * Sentry DSN for telemetry
73 */
74export const SENTRY_DSN: string | undefined = process.env.EXPO_PUBLIC_SENTRY_DSN
75
76/**
77 * Bitdrift API key. If undefined, Bitdrift should be disabled.
78 */
79export const BITDRIFT_API_KEY: string | undefined =
80 process.env.EXPO_PUBLIC_BITDRIFT_API_KEY
81
82/**
83 * GCP project ID which is required for native device attestation. On web, this
84 * should be unset and evaluate to 0.
85 */
86export const GCP_PROJECT_ID: number =
87 process.env.EXPO_PUBLIC_GCP_PROJECT_ID === undefined
88 ? 0
89 : Number(process.env.EXPO_PUBLIC_GCP_PROJECT_ID)