···1-# Copy this to `.env` and `.env.test` files
000023-BITDRIFT_API_KEY=
4-SENTRY_AUTH_TOKEN=
5-EXPO_PUBLIC_LOG_LEVEL=debug
6-EXPO_PUBLIC_LOG_DEBUG=
7EXPO_PUBLIC_BUNDLE_IDENTIFIER=
008EXPO_PUBLIC_BUNDLE_DATE=0
000000000000000000000
···1+# The env the app is running in e.g. development, testflight, production
2+EXPO_PUBLIC_ENV=development
3+4+# This is the semver release version of the app, pulled from package.json
5+EXPO_PUBLIC_RELEASE_VERSION=
67+# This is the commit hash that the current bundle was made from.
0008EXPO_PUBLIC_BUNDLE_IDENTIFIER=
9+10+# Should be formatted YYMMDDHH so that it increases for each build.
11EXPO_PUBLIC_BUNDLE_DATE=0
12+13+# The log level for the app's logger transports
14+EXPO_PUBLIC_LOG_LEVEL=debug
15+16+# Enable debug logs for specific logger instances
17+EXPO_PUBLIC_LOG_DEBUG=session
18+19+# Chat service DID
20+EXPO_PUBLIC_CHAT_PROXY_DID=
21+22+#
23+#
24+# Bluesky specific values
25+#
26+#
27+28+# Sentry DSN for telemetry
29+EXPO_PUBLIC_SENTRY_DSN=
30+31+# Bitdrift API key. If undefined, Bitdrift will be disabled.
32+EXPO_PUBLIC_BITDRIFT_API_KEY=
···8990### Adding bitdrift
9192-Adding bitdirft is NOT required. You can keep `BITDRIFT_API_KEY=` in `.env` which will avoid initializing bitdrift during startup.
9394-However, if you're a part of the Bluesky team and want to enable bitdrift, fill in `BITDRIFT_API_KEY` in your `.env` to enable bitdrift.
9596### Adding and Updating Locales
97
···8990### Adding bitdrift
9192+Adding bitdrift is NOT required. You can keep `EXPO_PUBLIC_BITDRIFT_API_KEY=` in `.env` which will avoid initializing bitdrift during startup.
9394+However, if you're a part of the Bluesky team and want to enable bitdrift, fill in `EXPO_PUBLIC_BITDRIFT_API_KEY` in your `.env` to enable bitdrift.
9596### Adding and Updating Locales
97
···2import * as Clipboard from 'expo-clipboard'
3import {t} from '@lingui/macro'
45-import {IS_INTERNAL} from '#/lib/app-info'
6import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
7import {useGate} from '#/lib/statsig/statsig'
8import {useSession} from '#/state/session'
9import * as Toast from '#/view/com/util/Toast'
10import {atoms as a, useBreakpoints, useTheme} from '#/alf'
11import {Text} from '#/components/Typography'
01213export function DiscoverDebug({
14 feedContext,
···2import * as Clipboard from 'expo-clipboard'
3import {t} from '@lingui/macro'
405import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
6import {useGate} from '#/lib/statsig/statsig'
7import {useSession} from '#/state/session'
8import * as Toast from '#/view/com/util/Toast'
9import {atoms as a, useBreakpoints, useTheme} from '#/alf'
10import {Text} from '#/components/Typography'
11+import {IS_INTERNAL} from '#/env'
1213export function DiscoverDebug({
14 feedContext,
···17import {useLingui} from '@lingui/react'
18import {useNavigation} from '@react-navigation/native'
1920-import {IS_INTERNAL} from '#/lib/app-info'
21import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
22import {useOpenLink} from '#/lib/hooks/useOpenLink'
23import {getCurrentRoute} from '#/lib/routes/helpers'
···83 useReportDialogControl,
84} from '#/components/moderation/ReportDialog'
85import * as Prompt from '#/components/Prompt'
086import * as bsky from '#/types/bsky'
8788let PostMenuItems = ({
···17import {useLingui} from '@lingui/react'
18import {useNavigation} from '@react-navigation/native'
19020import {DISCOVER_DEBUG_DIDS} from '#/lib/constants'
21import {useOpenLink} from '#/lib/hooks/useOpenLink'
22import {getCurrentRoute} from '#/lib/routes/helpers'
···82 useReportDialogControl,
83} from '#/components/moderation/ReportDialog'
84import * as Prompt from '#/components/Prompt'
85+import {IS_INTERNAL} from '#/env'
86import * as bsky from '#/types/bsky'
8788let PostMenuItems = ({
···1+import {type Did} from '@atproto/api'
2+3+import 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+ */
10+export 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+ */
16+export const ENV: string = process.env.EXPO_PUBLIC_ENV
17+18+/**
19+ * Indicates whether the app is running in TestFlight
20+ */
21+export const IS_TESTFLIGHT = ENV === 'testflight'
22+23+/**
24+ * Indicates whether the app is __DEV__
25+ */
26+export const IS_DEV = __DEV__
27+28+/**
29+ * Indicates whether the app is __DEV__ or TestFlight
30+ */
31+export 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+ */
38+export 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+ */
46+export const BUNDLE_DATE: number = !process.env.EXPO_PUBLIC_BUNDLE_DATE
47+ ? 0
48+ : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE)
49+50+/**
51+ * The log level for the app.
52+ */
53+export const LOG_LEVEL = (process.env.EXPO_PUBLIC_LOG_LEVEL || 'info') as
54+ | 'debug'
55+ | 'info'
56+ | 'warn'
57+ | 'error'
58+59+/**
60+ * Enable debug logs for specific logger instances
61+ */
62+export const LOG_DEBUG: string = process.env.EXPO_PUBLIC_LOG_DEBUG || ''
63+64+/**
65+ * The DID of the chat service to proxy to
66+ */
67+export const CHAT_PROXY_DID: Did =
68+ process.env.EXPO_PUBLIC_CHAT_PROXY_DID || 'did:web:api.bsky.chat'
69+70+/**
71+ * Sentry DSN for telemetry
72+ */
73+export const SENTRY_DSN: string | undefined = process.env.EXPO_PUBLIC_SENTRY_DSN
74+75+/**
76+ * Bitdrift API key. If undefined, Bitdrift should be disabled.
77+ */
78+export const BITDRIFT_API_KEY: string | undefined =
79+ process.env.EXPO_PUBLIC_BITDRIFT_API_KEY
+19
src/env/index.ts
···0000000000000000000
···1+import {nativeBuildVersion} from 'expo-application'
2+3+import {BUNDLE_IDENTIFIER, IS_TESTFLIGHT, RELEASE_VERSION} from '#/env/common'
4+5+export * from '#/env/common'
6+7+/**
8+ * The semver version of the app, specified in our `package.json`.file. On
9+ * iOs/Android, the native build version is appended to the semver version, so
10+ * that it can be used to identify a specific build.
11+ */
12+export const APP_VERSION = `${RELEASE_VERSION}.${nativeBuildVersion}`
13+14+/**
15+ * The short commit hash and environment of the current bundle.
16+ */
17+export const APP_METADATA = `${BUNDLE_IDENTIFIER.slice(0, 7)} (${
18+ __DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod'
19+})`
+15
src/env/index.web.ts
···000000000000000
···1+import {BUNDLE_IDENTIFIER, RELEASE_VERSION} from '#/env/common'
2+3+export * from '#/env/common'
4+5+/**
6+ * The semver version of the app, specified in our `package.json`.file. On
7+ * iOs/Android, the native build version is appended to the semver version, so
8+ * that it can be used to identify a specific build.
9+ */
10+export const APP_VERSION = RELEASE_VERSION
11+12+/**
13+ * The short commit hash and environment of the current bundle.
14+ */
15+export const APP_METADATA = `${BUNDLE_IDENTIFIER.slice(0, 7)} (${__DEV__ ? 'dev' : 'prod'})`
-18
src/lib/app-info.ts
···1-import {nativeApplicationVersion, nativeBuildVersion} from 'expo-application'
2-3-export const IS_TESTFLIGHT = process.env.EXPO_PUBLIC_ENV === 'testflight'
4-export const IS_INTERNAL = __DEV__ || IS_TESTFLIGHT
5-6-// This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings
7-// along with the other version info. Useful for debugging/reporting.
8-export const BUNDLE_IDENTIFIER = process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER ?? ''
9-10-// This will always be in the format of YYMMDD, so that it always increases for each build. This should only be used
11-// for Statsig reporting and shouldn't be used to identify a specific bundle.
12-export const BUNDLE_DATE =
13- IS_TESTFLIGHT || __DEV__ ? 0 : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE)
14-15-export const appVersion = `${nativeApplicationVersion}.${nativeBuildVersion}`
16-export const bundleInfo = `${BUNDLE_IDENTIFIER} (${
17- __DEV__ ? 'dev' : IS_TESTFLIGHT ? 'tf' : 'prod'
18-})`
···000000000000000000
-18
src/lib/app-info.web.ts
···1-import packageDotJson from '../../package.json'
2-3-export const IS_TESTFLIGHT = false
4-export const IS_INTERNAL = __DEV__
5-6-// This is the commit hash that the current bundle was made from. The user can see the commit hash in the app's settings
7-// along with the other version info. Useful for debugging/reporting.
8-export const BUNDLE_IDENTIFIER =
9- process.env.EXPO_PUBLIC_BUNDLE_IDENTIFIER ?? 'dev'
10-11-// This will always be in the format of YYMMDD, so that it always increases for each build. This should only be used
12-// for Statsig reporting and shouldn't be used to identify a specific bundle.
13-export const BUNDLE_DATE = __DEV__
14- ? 0
15- : Number(process.env.EXPO_PUBLIC_BUNDLE_DATE)
16-17-export const appVersion = packageDotJson.version
18-export const bundleInfo = `${BUNDLE_IDENTIFIER} (${__DEV__ ? 'dev' : 'prod'})`
···000000000000000000
+1-1
src/lib/hooks/useOTAUpdates.ts
···10 useUpdates,
11} from 'expo-updates'
1213-import {IS_TESTFLIGHT} from '#/lib/app-info'
14import {logger} from '#/logger'
15import {isIOS} from '#/platform/detection'
01617const MINIMUM_MINIMIZE_TIME = 15 * 60e3
18
···10 useUpdates,
11} from 'expo-updates'
12013import {logger} from '#/logger'
14import {isIOS} from '#/platform/detection'
15+import {IS_TESTFLIGHT} from '#/env'
1617const MINIMUM_MINIMIZE_TIME = 15 * 60e3
18
+9-11
src/lib/statsig/statsig.tsx
···3import {AppState, type AppStateStatus} from 'react-native'
4import {Statsig, StatsigProvider} from 'statsig-react-native-expo'
56-import {BUNDLE_DATE, BUNDLE_IDENTIFIER, IS_TESTFLIGHT} from '#/lib/app-info'
7import {logger} from '#/logger'
8import {type MetricEvents} from '#/logger/metrics'
9import {isWeb} from '#/platform/detection'
10import * as persisted from '#/state/persisted'
11-import packageDotJson from '../../../package.json'
12import {useSession} from '../../state/session'
13import {timeout} from '../async/timeout'
14import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback'
···49function createStatsigOptions(prefetchUsers: StatsigUser[]) {
50 return {
51 environment: {
52- tier:
53- process.env.NODE_ENV === 'development'
54- ? 'development'
55- : IS_TESTFLIGHT
56- ? 'staging'
57- : 'production',
58 },
59 // Don't block on waiting for network. The fetched config will kick in on next load.
60 // This ensures the UI is always consistent and doesn't update mid-session.
···212 refSrc,
213 refUrl,
214 platform: Platform.OS as 'ios' | 'android' | 'web',
215- appVersion: packageDotJson.version,
216- bundleIdentifier: BUNDLE_IDENTIFIER,
217- bundleDate: BUNDLE_DATE,
218 appLanguage: languagePrefs.appLanguage,
219 contentLanguages: languagePrefs.contentLanguages,
220 },
···3import {AppState, type AppStateStatus} from 'react-native'
4import {Statsig, StatsigProvider} from 'statsig-react-native-expo'
506import {logger} from '#/logger'
7import {type MetricEvents} from '#/logger/metrics'
8import {isWeb} from '#/platform/detection'
9import * as persisted from '#/state/persisted'
10+import * as env from '#/env'
11import {useSession} from '../../state/session'
12import {timeout} from '../async/timeout'
13import {useNonReactiveCallback} from '../hooks/useNonReactiveCallback'
···48function createStatsigOptions(prefetchUsers: StatsigUser[]) {
49 return {
50 environment: {
51+ tier: env.IS_DEV
52+ ? 'development'
53+ : env.IS_TESTFLIGHT
54+ ? 'staging'
55+ : 'production',
056 },
57 // Don't block on waiting for network. The fetched config will kick in on next load.
58 // This ensures the UI is always consistent and doesn't update mid-session.
···210 refSrc,
211 refUrl,
212 platform: Platform.OS as 'ios' | 'android' | 'web',
213+ appVersion: env.RELEASE_VERSION,
214+ bundleIdentifier: env.BUNDLE_IDENTIFIER,
215+ bundleDate: env.BUNDLE_DATE,
216 appLanguage: languagePrefs.appLanguage,
217 contentLanguages: languagePrefs.contentLanguages,
218 },
+31-22
src/locale/locales/en/messages.po
···966967#: src/components/hooks/useFollowMethods.ts:35
968#: src/components/hooks/useFollowMethods.ts:50
969-#: src/components/ProfileCard.tsx:457
970-#: src/components/ProfileCard.tsx:478
971#: src/view/com/profile/FollowButton.tsx:38
972#: src/view/com/profile/FollowButton.tsx:48
973msgid "An issue occurred, please try again."
···1262msgstr ""
12631264#: src/components/PostControls/PostMenu/PostMenuItems.tsx:757
1265-#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:319
1266#: src/view/com/profile/ProfileMenu.tsx:473
1267msgid "Block"
1268msgstr ""
···1423msgid "Books"
1424msgstr ""
14251426-#: src/components/FeedInterstitials.tsx:379
1427msgid "Browse more accounts on the Explore page"
1428msgstr ""
14291430-#: src/components/FeedInterstitials.tsx:517
1431msgid "Browse more feeds on the Explore page"
1432msgstr ""
14331434-#: src/components/FeedInterstitials.tsx:359
1435-#: src/components/FeedInterstitials.tsx:362
1436-#: src/components/FeedInterstitials.tsx:498
1437-#: src/components/FeedInterstitials.tsx:501
1438msgid "Browse more suggestions"
1439msgstr ""
14401441-#: src/components/FeedInterstitials.tsx:387
1442-#: src/components/FeedInterstitials.tsx:526
1443msgid "Browse more suggestions on the Explore page"
1444msgstr ""
1445···3618msgstr ""
36193620#. User is not following this account, click to follow
3621-#: src/components/ProfileCard.tsx:490
3622#: src/components/ProfileHoverCard/index.web.tsx:494
3623#: src/components/ProfileHoverCard/index.web.tsx:505
3624#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:245
···3696msgstr ""
36973698#. User is following this account, click to unfollow
3699-#: src/components/ProfileCard.tsx:484
3700#: src/components/ProfileHoverCard/index.web.tsx:493
3701#: src/components/ProfileHoverCard/index.web.tsx:504
3702#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:241
···3711msgid "Following"
3712msgstr ""
37133714-#: src/components/ProfileCard.tsx:447
3715#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:89
3716msgid "Following {0}"
3717msgstr ""
···5459msgid "No likes yet"
5460msgstr ""
54615462-#: src/components/ProfileCard.tsx:469
5463#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:110
5464msgid "No longer following {0}"
5465msgstr ""
···7398msgid "See jobs at Bluesky"
7399msgstr ""
74000000000000007401#: src/view/screens/SavedFeeds.tsx:213
7402msgid "See this guide"
7403msgstr ""
···7975msgid "Signed in as @{0}"
7976msgstr ""
79777978-#: src/components/FeedInterstitials.tsx:343
7979msgid "Similar accounts"
7980msgstr ""
7981···8005msgid "Some of your verifications are invalid."
8006msgstr ""
80078008-#: src/components/FeedInterstitials.tsx:480
8009msgid "Some other feeds you might like"
8010msgstr ""
8011···8237msgid "Suggested Accounts"
8238msgstr ""
82398240-#: src/components/FeedInterstitials.tsx:345
8241msgid "Suggested for you"
8242msgstr ""
8243···8421msgid "That's everything!"
8422msgstr ""
84238424-#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:315
8425#: src/view/com/profile/ProfileMenu.tsx:461
8426msgid "The account will be able to interact with you after unblocking."
8427msgstr ""
···9046#: src/components/dms/MessagesListBlockedFooter.tsx:112
9047#: src/components/dms/MessagesListBlockedFooter.tsx:119
9048#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:203
9049-#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:319
9050#: src/view/com/profile/ProfileMenu.tsx:473
9051#: src/view/screens/ProfileList.tsx:723
9052msgid "Unblock"
···9064msgid "Unblock account"
9065msgstr ""
90669067-#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:313
9068#: src/view/com/profile/ProfileMenu.tsx:455
9069msgid "Unblock Account?"
9070msgstr ""
···9571msgid "View {0}'s avatar"
9572msgstr ""
95739574-#: src/components/ProfileCard.tsx:118
9575#: src/screens/Profile/components/ProfileFeedHeader.tsx:454
9576#: src/screens/Search/components/SearchProfileCard.tsx:36
9577#: src/screens/VideoFeed/index.tsx:790
···966967#: src/components/hooks/useFollowMethods.ts:35
968#: src/components/hooks/useFollowMethods.ts:50
969+#: src/components/ProfileCard.tsx:484
970+#: src/components/ProfileCard.tsx:505
971#: src/view/com/profile/FollowButton.tsx:38
972#: src/view/com/profile/FollowButton.tsx:48
973msgid "An issue occurred, please try again."
···1262msgstr ""
12631264#: src/components/PostControls/PostMenu/PostMenuItems.tsx:757
1265+#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:320
1266#: src/view/com/profile/ProfileMenu.tsx:473
1267msgid "Block"
1268msgstr ""
···1423msgid "Books"
1424msgstr ""
14251426+#: src/components/FeedInterstitials.tsx:436
1427msgid "Browse more accounts on the Explore page"
1428msgstr ""
14291430+#: src/components/FeedInterstitials.tsx:566
1431msgid "Browse more feeds on the Explore page"
1432msgstr ""
14331434+#: src/components/FeedInterstitials.tsx:547
1435+#: src/components/FeedInterstitials.tsx:550
001436msgid "Browse more suggestions"
1437msgstr ""
14381439+#: src/components/FeedInterstitials.tsx:575
01440msgid "Browse more suggestions on the Explore page"
1441msgstr ""
1442···3615msgstr ""
36163617#. User is not following this account, click to follow
3618+#: src/components/ProfileCard.tsx:517
3619#: src/components/ProfileHoverCard/index.web.tsx:494
3620#: src/components/ProfileHoverCard/index.web.tsx:505
3621#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:245
···3693msgstr ""
36943695#. User is following this account, click to unfollow
3696+#: src/components/ProfileCard.tsx:511
3697#: src/components/ProfileHoverCard/index.web.tsx:493
3698#: src/components/ProfileHoverCard/index.web.tsx:504
3699#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:241
···3708msgid "Following"
3709msgstr ""
37103711+#: src/components/ProfileCard.tsx:474
3712#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:89
3713msgid "Following {0}"
3714msgstr ""
···5456msgid "No likes yet"
5457msgstr ""
54585459+#: src/components/ProfileCard.tsx:496
5460#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:110
5461msgid "No longer following {0}"
5462msgstr ""
···7395msgid "See jobs at Bluesky"
7396msgstr ""
73977398+#: src/components/FeedInterstitials.tsx:397
7399+msgid "See more"
7400+msgstr ""
7401+7402+#: src/components/FeedInterstitials.tsx:444
7403+msgid "See more accounts you might like"
7404+msgstr ""
7405+7406+#: src/components/FeedInterstitials.tsx:395
7407+msgid "See more suggested profiles on the Explore page"
7408+msgstr ""
7409+7410#: src/view/screens/SavedFeeds.tsx:213
7411msgid "See this guide"
7412msgstr ""
···7984msgid "Signed in as @{0}"
7985msgstr ""
79867987+#: src/components/FeedInterstitials.tsx:389
7988msgid "Similar accounts"
7989msgstr ""
7990···8014msgid "Some of your verifications are invalid."
8015msgstr ""
80168017+#: src/components/FeedInterstitials.tsx:529
8018msgid "Some other feeds you might like"
8019msgstr ""
8020···8246msgid "Suggested Accounts"
8247msgstr ""
82488249+#: src/components/FeedInterstitials.tsx:391
8250msgid "Suggested for you"
8251msgstr ""
8252···8430msgid "That's everything!"
8431msgstr ""
84328433+#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:316
8434#: src/view/com/profile/ProfileMenu.tsx:461
8435msgid "The account will be able to interact with you after unblocking."
8436msgstr ""
···9055#: src/components/dms/MessagesListBlockedFooter.tsx:112
9056#: src/components/dms/MessagesListBlockedFooter.tsx:119
9057#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:203
9058+#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:320
9059#: src/view/com/profile/ProfileMenu.tsx:473
9060#: src/view/screens/ProfileList.tsx:723
9061msgid "Unblock"
···9073msgid "Unblock account"
9074msgstr ""
90759076+#: src/screens/Profile/Header/ProfileHeaderStandard.tsx:314
9077#: src/view/com/profile/ProfileMenu.tsx:455
9078msgid "Unblock Account?"
9079msgstr ""
···9580msgid "View {0}'s avatar"
9581msgstr ""
95829583+#: src/components/ProfileCard.tsx:124
9584#: src/screens/Profile/components/ProfileFeedHeader.tsx:454
9585#: src/screens/Search/components/SearchProfileCard.tsx:36
9586#: src/screens/VideoFeed/index.tsx:790
+1-2
src/logger/bitdrift/setup/index.ts
···2import {Statsig} from 'statsig-react-native-expo'
34import {initPromise} from '#/lib/statsig/statsig'
5-6-const BITDRIFT_API_KEY = process.env.BITDRIFT_API_KEY
78initPromise.then(() => {
9 let isEnabled = false
···2import {Statsig} from 'statsig-react-native-expo'
34import {initPromise} from '#/lib/statsig/statsig'
5+import {BITDRIFT_API_KEY} from '#/env'
067initPromise.then(() => {
8 let isEnabled = false
+2-1
src/logger/index.ts
···14} from '#/logger/types'
15import {enabledLogLevels} from '#/logger/util'
16import {isNative} from '#/platform/detection'
01718const TRANSPORTS: Transport[] = (function configureTransports() {
19- switch (process.env.NODE_ENV) {
20 case 'production': {
21 return [sentryTransport, isNative && bitdriftTransport].filter(
22 Boolean,
···14} from '#/logger/types'
15import {enabledLogLevels} from '#/logger/util'
16import {isNative} from '#/platform/detection'
17+import {ENV} from '#/env'
1819const TRANSPORTS: Transport[] = (function configureTransports() {
20+ switch (ENV) {
21 case 'production': {
22 return [sentryTransport, isNative && bitdriftTransport].filter(
23 Boolean,
+6-23
src/logger/sentry/setup/index.ts
···1-/**
2- * Importing these separately from `platform/detection` and `lib/app-info` to
3- * avoid future conflicts and/or circular deps
4- */
5-6import {init} from '@sentry/react-native'
78-import pkgJson from '#/../package.json'
9-10-/**
11- * Examples:
12- * - `dev`
13- * - `1.99.0`
14- */
15-const release = process.env.SENTRY_RELEASE || pkgJson.version
16-17-/**
18- * The latest deployed commit hash
19- */
20-const dist = process.env.SENTRY_DIST || 'dev'
2122init({
23- enabled: !__DEV__ && !!process.env.SENTRY_DSN,
24 autoSessionTracking: false,
25- dsn: process.env.SENTRY_DSN,
26 debug: false, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production
27- environment: process.env.NODE_ENV,
28- dist,
29- release,
30 ignoreErrors: [
31 /*
32 * Unknown internals errors
···000001import {init} from '@sentry/react-native'
23+import * as env from '#/env'
00000000000045init({
6+ enabled: !env.IS_DEV && !!env.SENTRY_DSN,
7 autoSessionTracking: false,
8+ dsn: env.SENTRY_DSN,
9 debug: false, // If `true`, Sentry will try to print out useful debugging information if something goes wrong with sending the event. Set it to `false` in production
10+ environment: env.ENV,
11+ dist: env.BUNDLE_IDENTIFIER,
12+ release: env.RELEASE_VERSION,
13 ignoreErrors: [
14 /*
15 * Unknown internals errors
+5-5
src/screens/Settings/AboutSettings.tsx
···9import {useMutation} from '@tanstack/react-query'
10import {Statsig} from 'statsig-react-native-expo'
1112-import {appVersion, BUNDLE_DATE, bundleInfo} from '#/lib/app-info'
13import {STATUS_PAGE_URL} from '#/lib/constants'
14import {type CommonNavigatorParams} from '#/lib/routes/types'
15import {isAndroid, isIOS, isNative} from '#/platform/detection'
···23import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench'
24import * as Layout from '#/components/Layout'
25import {Loader} from '#/components/Loader'
026import {useDemoMode} from '#/storage/hooks/demo-mode'
27import {useDevMode} from '#/storage/hooks/dev-mode'
28import {OTAInfo} from './components/OTAInfo'
···123 </SettingsList.PressableItem>
124 )}
125 <SettingsList.PressableItem
126- label={_(msg`Version ${appVersion}`)}
127 accessibilityHint={_(msg`Copies build version to clipboard`)}
128 onLongPress={() => {
129 const newDevModeEnabled = !devModeEnabled
···146 }}
147 onPress={() => {
148 setStringAsync(
149- `Build version: ${appVersion}; Bundle info: ${bundleInfo}; Bundle date: ${BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`,
150 )
151 Toast.show(_(msg`Copied build version to clipboard`))
152 }}>
153 <SettingsList.ItemIcon icon={WrenchIcon} />
154 <SettingsList.ItemText>
155- <Trans>Version {appVersion}</Trans>
156 </SettingsList.ItemText>
157- <SettingsList.BadgeText>{bundleInfo}</SettingsList.BadgeText>
158 </SettingsList.PressableItem>
159 {devModeEnabled && (
160 <>
···9import {useMutation} from '@tanstack/react-query'
10import {Statsig} from 'statsig-react-native-expo'
11012import {STATUS_PAGE_URL} from '#/lib/constants'
13import {type CommonNavigatorParams} from '#/lib/routes/types'
14import {isAndroid, isIOS, isNative} from '#/platform/detection'
···22import {Wrench_Stroke2_Corner2_Rounded as WrenchIcon} from '#/components/icons/Wrench'
23import * as Layout from '#/components/Layout'
24import {Loader} from '#/components/Loader'
25+import * as env from '#/env'
26import {useDemoMode} from '#/storage/hooks/demo-mode'
27import {useDevMode} from '#/storage/hooks/dev-mode'
28import {OTAInfo} from './components/OTAInfo'
···123 </SettingsList.PressableItem>
124 )}
125 <SettingsList.PressableItem
126+ label={_(msg`Version ${env.APP_VERSION}`)}
127 accessibilityHint={_(msg`Copies build version to clipboard`)}
128 onLongPress={() => {
129 const newDevModeEnabled = !devModeEnabled
···146 }}
147 onPress={() => {
148 setStringAsync(
149+ `Build version: ${env.APP_VERSION}; Bundle info: ${env.APP_METADATA}; Bundle date: ${env.BUNDLE_DATE}; Platform: ${Platform.OS}; Platform version: ${Platform.Version}; Anonymous ID: ${stableID}`,
150 )
151 Toast.show(_(msg`Copied build version to clipboard`))
152 }}>
153 <SettingsList.ItemIcon icon={WrenchIcon} />
154 <SettingsList.ItemText>
155+ <Trans>Version {env.APP_VERSION}</Trans>
156 </SettingsList.ItemText>
157+ <SettingsList.BadgeText>{env.APP_METADATA}</SettingsList.BadgeText>
158 </SettingsList.PressableItem>
159 {devModeEnabled && (
160 <>
+4-4
src/screens/Settings/AppIconSettings/index.tsx
···3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
5import * as DynamicAppIcon from '@mozzius/expo-dynamic-app-icon'
6-import {NativeStackScreenProps} from '@react-navigation/native-stack'
78-import {IS_INTERNAL} from '#/lib/app-info'
9import {PressableScale} from '#/lib/custom-animations/PressableScale'
10-import {CommonNavigatorParams} from '#/lib/routes/types'
11import {useGate} from '#/lib/statsig/statsig'
12import {isAndroid} from '#/platform/detection'
13import {AppIconImage} from '#/screens/Settings/AppIconSettings/AppIconImage'
14-import {AppIconSet} from '#/screens/Settings/AppIconSettings/types'
15import {useAppIconSets} from '#/screens/Settings/AppIconSettings/useAppIconSets'
16import {atoms as a, useTheme} from '#/alf'
17import * as Toggle from '#/components/forms/Toggle'
18import * as Layout from '#/components/Layout'
19import {Text} from '#/components/Typography'
02021type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppIconSettings'>
22export function AppIconSettingsScreen({}: Props) {
···3import {msg, Trans} from '@lingui/macro'
4import {useLingui} from '@lingui/react'
5import * as DynamicAppIcon from '@mozzius/expo-dynamic-app-icon'
6+import {type NativeStackScreenProps} from '@react-navigation/native-stack'
708import {PressableScale} from '#/lib/custom-animations/PressableScale'
9+import {type CommonNavigatorParams} from '#/lib/routes/types'
10import {useGate} from '#/lib/statsig/statsig'
11import {isAndroid} from '#/platform/detection'
12import {AppIconImage} from '#/screens/Settings/AppIconSettings/AppIconImage'
13+import {type AppIconSet} from '#/screens/Settings/AppIconSettings/types'
14import {useAppIconSets} from '#/screens/Settings/AppIconSettings/useAppIconSets'
15import {atoms as a, useTheme} from '#/alf'
16import * as Toggle from '#/components/forms/Toggle'
17import * as Layout from '#/components/Layout'
18import {Text} from '#/components/Typography'
19+import {IS_INTERNAL} from '#/env'
2021type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppIconSettings'>
22export function AppIconSettingsScreen({}: Props) {
+1-1
src/screens/Settings/AppearanceSettings.tsx
···8import {msg, Trans} from '@lingui/macro'
9import {useLingui} from '@lingui/react'
1011-import {IS_INTERNAL} from '#/lib/app-info'
12import {
13 type CommonNavigatorParams,
14 type NativeStackScreenProps,
···26import {TitleCase_Stroke2_Corner0_Rounded as Aa} from '#/components/icons/TitleCase'
27import * as Layout from '#/components/Layout'
28import {Text} from '#/components/Typography'
029import * as SettingsList from './components/SettingsList'
3031type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppearanceSettings'>
···8import {msg, Trans} from '@lingui/macro'
9import {useLingui} from '@lingui/react'
10011import {
12 type CommonNavigatorParams,
13 type NativeStackScreenProps,
···25import {TitleCase_Stroke2_Corner0_Rounded as Aa} from '#/components/icons/TitleCase'
26import * as Layout from '#/components/Layout'
27import {Text} from '#/components/Typography'
28+import {IS_INTERNAL} from '#/env'
29import * as SettingsList from './components/SettingsList'
3031type Props = NativeStackScreenProps<CommonNavigatorParams, 'AppearanceSettings'>
+1-1
src/screens/Settings/Settings.tsx
···9import {type NativeStackScreenProps} from '@react-navigation/native-stack'
1011import {useActorStatus} from '#/lib/actor-status'
12-import {IS_INTERNAL} from '#/lib/app-info'
13import {HELP_DESK_URL} from '#/lib/constants'
14import {useAccountSwitcher} from '#/lib/hooks/useAccountSwitcher'
15import {useApplyPullRequestOTAUpdate} from '#/lib/hooks/useOTAUpdates'
···66 shouldShowVerificationCheckButton,
67 VerificationCheckButton,
68} from '#/components/verification/VerificationCheckButton'
069import {useActivitySubscriptionsNudged} from '#/storage/hooks/activity-subscriptions-nudged'
7071type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'>
···9import {type NativeStackScreenProps} from '@react-navigation/native-stack'
1011import {useActorStatus} from '#/lib/actor-status'
012import {HELP_DESK_URL} from '#/lib/constants'
13import {useAccountSwitcher} from '#/lib/hooks/useAccountSwitcher'
14import {useApplyPullRequestOTAUpdate} from '#/lib/hooks/useOTAUpdates'
···65 shouldShowVerificationCheckButton,
66 VerificationCheckButton,
67} from '#/components/verification/VerificationCheckButton'
68+import {IS_INTERNAL} from '#/env'
69import {useActivitySubscriptionsNudged} from '#/storage/hooks/activity-subscriptions-nudged'
7071type Props = NativeStackScreenProps<CommonNavigatorParams, 'Settings'>
···1-import {AtpSessionData, AtpSessionEvent} from '@atproto/api'
2import {sha256} from 'js-sha256'
3import {Statsig} from 'statsig-react-native-expo'
45-import {IS_INTERNAL} from '#/lib/app-info'
6-import {Schema} from '../persisted'
7-import {Action, State} from './reducer'
8-import {SessionAccount} from './types'
910type Reducer = (state: State, action: Action) => State
11
···1+import {type AtpSessionData, type AtpSessionEvent} from '@atproto/api'
2import {sha256} from 'js-sha256'
3import {Statsig} from 'statsig-react-native-expo'
45+import {IS_INTERNAL} from '#/env'
6+import {type Schema} from '../persisted'
7+import {type Action, type State} from './reducer'
8+import {type SessionAccount} from './types'
910type Reducer = (state: State, action: Action) => State
11