Compare commits

...

2 Commits

Author SHA1 Message Date
Eric Bailey 7634110f1d Debug 2025-02-12 16:43:07 -06:00
Eric Bailey 4349c7f16d Clean up env 2025-02-12 16:43:00 -06:00
3 changed files with 76 additions and 7 deletions
+21 -6
View File
@@ -1,8 +1,23 @@
# Copy this to `.env` and `.env.test` files
BITDRIFT_API_KEY=
SENTRY_AUTH_TOKEN=
EXPO_PUBLIC_LOG_LEVEL=debug
EXPO_PUBLIC_LOG_DEBUG=
# The env the app is running in e.g. development, testflight, production
EXPO_PUBLIC_ENV=development
# This is 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.
EXPO_PUBLIC_BUNDLE_IDENTIFIER=
# This will always be in the format of YYMMDD, so that it always increases for
# each build. This should only be used for Statsig reporting and shouldn't be
# used to identify a specific bundle.
EXPO_PUBLIC_BUNDLE_DATE=0
# The log level for the app's logger transports
EXPO_PUBLIC_LOG_LEVEL=info
# Currently unused. Enable debug for a subset of the debug logs.
EXPO_PUBLIC_LOG_DEBUG=
#
# Bluesky specific
#
# Bitdrift
BITDRIFT_API_KEY=
# Sentry
SENTRY_AUTH_TOKEN=
+3
View File
@@ -69,10 +69,13 @@ import {NuxDialogs} from '#/components/dialogs/nuxs'
import {useStarterPackEntry} from '#/components/hooks/useStarterPackEntry'
import {Provider as IntentDialogProvider} from '#/components/intents/IntentDialogs'
import {Provider as PortalProvider} from '#/components/Portal'
import * as env from '#/env'
import {Splash} from '#/Splash'
import {BottomSheetProvider} from '../modules/bottom-sheet'
import {BackgroundNotificationPreferencesProvider} from '../modules/expo-background-notification-handler/src/BackgroundNotificationHandlerProvider'
logger.info('env', env)
SplashScreen.preventAutoHideAsync()
if (isIOS) {
SystemUI.setBackgroundColorAsync('black')
+52 -1
View File
@@ -1,6 +1,57 @@
export const LOG_DEBUG = process.env.EXPO_PUBLIC_LOG_DEBUG || ''
/**
* The env the app is running in e.g. development, testflight, production
*/
export const EXPO_PUBLIC_ENV = process.env.EXPO_PUBLIC_ENV
/**
* Indicates whether the app is running in TestFlight mode
*/
export const IS_TESTFLIGHT = EXPO_PUBLIC_ENV === 'testflight'
/**
* Indicates whether the app is __DEV__ or TestFlight
*/
export const IS_INTERNAL = __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 ?? ''
/**
* This will always be in the format of YYMMDD, so that it always increases for
* each build. This should only be used for Statsig reporting and shouldn't be
* used to identify a specific bundle.
*/
export const BUNDLE_DATE: number = IS_INTERNAL
? 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'
/**
* Currently unused. Enable debug for a subset of the debug logs.
*/
export const LOG_DEBUG: string = process.env.EXPO_PUBLIC_LOG_DEBUG || ''
/**
* Bitdrift API key. If undefined, Bitdrift should be disabled.
*/
export const BITDRIFT_API_KEY: string | undefined =
process.env.EXPO_PUBLIC_BITDRIFT_API_KEY
/**
* Sentry API key. If undefined, Sentry should be disabled.
*/
export const SENTRY_API_KEY: string | undefined =
process.env.EXPO_PUBLIC_SENTRY_API_KEY