mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
at remove-hackfix 108 lines 3.0 kB view raw
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, e2e 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 Bluesky appview to proxy to 67 */ 68export const BLUESKY_PROXY_DID: Did = 69 process.env.EXPO_PUBLIC_BLUESKY_PROXY_DID || 'did:web:api.bsky.app' 70 71/** 72 * The DID of the chat service to proxy to 73 */ 74export const CHAT_PROXY_DID: Did = 75 process.env.EXPO_PUBLIC_CHAT_PROXY_DID || 'did:web:api.bsky.chat' 76 77/** 78 * Sentry DSN for telemetry 79 */ 80export const SENTRY_DSN: string | undefined = process.env.EXPO_PUBLIC_SENTRY_DSN 81 82/** 83 * Bitdrift API key. If undefined, Bitdrift should be disabled. 84 */ 85export const BITDRIFT_API_KEY: string | undefined = 86 process.env.EXPO_PUBLIC_BITDRIFT_API_KEY 87 88/** 89 * GCP project ID which is required for native device attestation. On web, this 90 * should be unset and evaluate to 0. 91 */ 92export const GCP_PROJECT_ID: number = 93 process.env.EXPO_PUBLIC_GCP_PROJECT_ID === undefined 94 ? 0 95 : Number(process.env.EXPO_PUBLIC_GCP_PROJECT_ID) 96 97/** 98 * URL for the bapp-config web worker _development_ environment. Can be a 99 * locally running server, see `env.example` for more. 100 */ 101export const BAPP_CONFIG_DEV_URL = process.env.BAPP_CONFIG_DEV_URL 102 103/** 104 * Dev environment passthrough value for bapp-config web worker. Allows local 105 * dev access to the web worker running in `development` mode. 106 */ 107export const BAPP_CONFIG_DEV_BYPASS_SECRET: string = 108 process.env.BAPP_CONFIG_DEV_BYPASS_SECRET