Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199import {type Did} from '@atproto/api'
import packageJson from '#/../package.json'
/** * The semver version of the app, as defined in `package.json.` * * N.B. The fallback is needed for Render.com deployments */export const RELEASE_VERSION: string = process.env.EXPO_PUBLIC_RELEASE_VERSION || packageJson.version
/** * The env the app is running in e.g. development, testflight, production, e2e */export const ENV: string = process.env.EXPO_PUBLIC_ENV as | 'production' | 'testflight' | 'development' | 'staging' | 'e2e' | (string & {})
/** * Indicates whether the app is running in TestFlight */export const IS_TESTFLIGHT = ENV === 'testflight'
/** * Indicates whether the app is `__DEV__` */export const IS_DEV = __DEV__
/** * Indicates whether the app is running in a test environment */export const IS_E2E = ENV === 'e2e'
/** * Indicates whether the app is `__DEV__` or TestFlight */export const IS_INTERNAL = IS_DEV || IS_TESTFLIGHT
/** * The commit hash that the current bundle was made from. The user can * see the commit hash in the app's settings along with the other version info. * Useful for debugging/reporting. */export const BUNDLE_IDENTIFIER: string = process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER || ENV || 'dev'
/** * This will always be in the format of YYMMDDHH, so that it always increases * for each build. This should only be used for analytics reporting and shouldn't * be used to identify a specific bundle. */export const BUNDLE_DATE: number = process.env.EXPO_PUBLIC_BUNDLE_DATE === undefined ? 0 : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE)
/** * The log level for the app. */export const LOG_LEVEL = (process.env.EXPO_PUBLIC_LOG_LEVEL || 'info') as | 'debug' | 'info' | 'warn' | 'error'
/** * Enable debug logs for specific logger instances */export const LOG_DEBUG: string = process.env.EXPO_PUBLIC_LOG_DEBUG || ''
/** * The DID of the Bluesky appview to proxy to */export const BLUESKY_PROXY_DID: Did = process.env.EXPO_PUBLIC_BLUESKY_PROXY_DID || 'did:web:api.blacksky.community'export const ALT_PROXY_DID: Did = 'did:web:api.bsky.app'
/** * The DID of the chat service to proxy to */export const CHAT_PROXY_DID: Did = process.env.EXPO_PUBLIC_CHAT_PROXY_DID || 'did:web:api.bsky.chat'
/** * Metrics API host */export const METRICS_API_HOST: string = process.env.EXPO_PUBLIC_METRICS_API_HOST || 'https://events.bsky.app'
/** * Growthbook API host */export const GROWTHBOOK_API_HOST: string = process.env.EXPO_PUBLIC_GROWTHBOOK_API_HOST || `${METRICS_API_HOST}/gb`
/** * Growthbook client key */export const GROWTHBOOK_CLIENT_KEY: string = process.env.EXPO_PUBLIC_GROWTHBOOK_CLIENT_KEY || 'sdk-7gkUkGy9wguUjyFe'
/** * Sentry DSN for telemetry */export const SENTRY_DSN: string | undefined = process.env.EXPO_PUBLIC_SENTRY_DSN
/** * Bitdrift API key. If undefined, Bitdrift should be disabled. */export const BITDRIFT_API_KEY: string | undefined = process.env.EXPO_PUBLIC_BITDRIFT_API_KEY
/** * GCP project ID which is required for native device attestation. On web, this * should be unset and evaluate to 0. */export const GCP_PROJECT_ID: number = process.env.EXPO_PUBLIC_GCP_PROJECT_ID === undefined ? 0 : Number(process.env.EXPO_PUBLIC_GCP_PROJECT_ID)
/** * URLs for the app config web worker. Can be a * locally running server, see `env.example` for more. */export const GEOLOCATION_DEV_URL = process.env.GEOLOCATION_DEV_URLexport const GEOLOCATION_PROD_URL = `https://ip.bsky.app`export const GEOLOCATION_URL = IS_DEV ? (GEOLOCATION_DEV_URL ?? GEOLOCATION_PROD_URL) : GEOLOCATION_PROD_URL
/** * URLs for the live-event config web worker. Can be a * locally running server, see `env.example` for more. */export const LIVE_EVENTS_DEV_URL = process.env.LIVE_EVENTS_DEV_URLexport const LIVE_EVENTS_PROD_URL = `https://live-events.workers.bsky.app`export const LIVE_EVENTS_URL = IS_DEV ? (LIVE_EVENTS_DEV_URL ?? LIVE_EVENTS_PROD_URL) : LIVE_EVENTS_PROD_URL
/** * Base URL of the Acorn brand service. Used on native to resolve a community's * brand config from the active account's PDS (`/brands/resolve?pds=` / `?slug=`). * On web the config is injected by bskyweb (`window.__BRAND_CONFIG__`), so this * is only consulted on native. */export const BRAND_SERVICE_URL: string = process.env.EXPO_PUBLIC_BRAND_SERVICE_URL || 'https://brand.acorn.blacksky.community'
/** Acorn Web endpoint for community invitation previews and acceptance. */export const ACORN_SERVICE_URL: string = process.env.EXPO_PUBLIC_ACORN_SERVICE_URL || (ENV === 'production' || ENV === 'testflight' ? 'https://acorn.blacksky.community' : ENV === 'e2e' ? 'http://localhost:1986' : ENV === 'staging' ? (() => { throw new Error( 'EXPO_PUBLIC_ACORN_SERVICE_URL is required for staging builds', ) })() : 'http://localhost:3000')
export const ASSEMBLY_URL: string = process.env.EXPO_PUBLIC_ASSEMBLY_URL || 'https://assembly.blacksky.community'export const ASSEMBLY_SERVICE_DID: string = process.env.EXPO_PUBLIC_ASSEMBLY_SERVICE_DID || 'did:web:assembly.blacksky.community'
/** * Stripe publishable key for embedded checkout */export const STRIPE_PUBLISHABLE_KEY: string = process.env.EXPO_PUBLIC_STRIPE_PUBLISHABLE_KEY || ''
/** * Stripe API URL for creating checkout sessions */export const STRIPE_API_URL: string = process.env.EXPO_PUBLIC_STRIPE_API_URL || ''
/** * URLs for the app-config web worker. Can be a * locally running server, see `env.example` for more. */export const APP_CONFIG_DEV_URL = process.env.APP_CONFIG_DEV_URLexport const APP_CONFIG_PROD_URL = `https://app-config.workers.bsky.app`export const APP_CONFIG_URL = IS_DEV ? (APP_CONFIG_DEV_URL ?? APP_CONFIG_PROD_URL) : APP_CONFIG_PROD_URL