From aaa61fa4a8dfeb8c02854dc41135a0636da39b05 Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Wed, 24 Jul 2024 15:15:30 +0530 Subject: [PATCH 1/6] Add bugsnag --- apps/expo/Bugsnag.ts | 11 + apps/expo/app.json | 9 +- apps/expo/app/_layout.tsx | 19 +- apps/expo/package.json | 8 +- .../components/navigation/Navbar/Navbar.tsx | 5 +- packages/ui/tsconfig.json | 2 +- yarn.lock | 634 +++++++++++++++++- 7 files changed, 653 insertions(+), 35 deletions(-) create mode 100644 apps/expo/Bugsnag.ts diff --git a/apps/expo/Bugsnag.ts b/apps/expo/Bugsnag.ts new file mode 100644 index 000000000..75a41ecec --- /dev/null +++ b/apps/expo/Bugsnag.ts @@ -0,0 +1,11 @@ +import Bugsnag from '@bugsnag/expo'; +import BugsnagPluginReact from '@bugsnag/plugin-react'; +import BugsnagPluginExpoApp from '@bugsnag/plugin-expo-app'; +import BugsnagPluginExpoDevice from '@bugsnag/plugin-expo-device'; + +Bugsnag.start({ + apiKey: 'd92cb1ab6783c77d1c4b2404641ffdfc', + plugins: [BugsnagPluginReact, BugsnagPluginExpoApp, BugsnagPluginExpoDevice], +}); + +export default Bugsnag; diff --git a/apps/expo/app.json b/apps/expo/app.json index 1cf034965..621a99e00 100644 --- a/apps/expo/app.json +++ b/apps/expo/app.json @@ -7,7 +7,9 @@ "icon": "./assets/packrat-app-icon.png", "userInterfaceStyle": "automatic", "scheme": "packrat", - "assetBundlePatterns": ["**/*"], + "assetBundlePatterns": [ + "**/*" + ], "ios": { "supportsTablet": true, "bundleIdentifier": "com.andrewbierman.packrat" @@ -54,8 +56,11 @@ "extra": { "eas": { "projectId": "267945b1-d9ac-4621-8541-826a2c70576d" + }, + "bugsnag": { + "apiKey": "d92cb1ab6783c77d1c4b2404641ffdfc" } }, "owner": "packrat" } -} +} \ No newline at end of file diff --git a/apps/expo/app/_layout.tsx b/apps/expo/app/_layout.tsx index 203fa20bb..45543ad3f 100644 --- a/apps/expo/app/_layout.tsx +++ b/apps/expo/app/_layout.tsx @@ -1,15 +1,20 @@ import React from 'react'; import { Provider } from 'app/provider'; import { Stack } from 'expo-router'; +import Bugsnag from '../Bugsnag'; + +const ErrorBoundary = Bugsnag.getPlugin('react')?.createErrorBoundary(React); export default function HomeLayout() { return ( - - - + + + + + ); } diff --git a/apps/expo/package.json b/apps/expo/package.json index 178c83604..d2129180f 100644 --- a/apps/expo/package.json +++ b/apps/expo/package.json @@ -34,6 +34,7 @@ }, "dependencies": { "@babel/runtime": "^7.21.0", + "@bugsnag/expo": "^50.0.0", "@expo/match-media": "^0.4.0", "@expo/metro-runtime": "~3.1.3", "@expo/vector-icons": "^14.0.0", @@ -84,17 +85,18 @@ "env": "^0.0.2", "eslint-plugin-react-native": "^4.0.0", "expo": "^50.0.14", - "expo-application": "~5.8.3", + "expo-application": "~5.8.4", "expo-auth-session": "~5.4.0", "expo-blur": "~12.9.2", "expo-build-properties": "~0.11.1", "expo-checkbox": "~2.7.0", "expo-clipboard": "~5.0.1", - "expo-constants": "~15.4.5", + "expo-constants": "~15.4.6", "expo-crypto": "~12.8.1", "expo-dev-client": "~3.3.11", + "expo-device": "~5.9.4", "expo-document-picker": "~11.10.1", - "expo-file-system": "~16.0.8", + "expo-file-system": "~16.0.9", "expo-font": "~11.10.3", "expo-haptics": "~12.8.1", "expo-image-picker": "~14.7.1", diff --git a/packages/app/components/navigation/Navbar/Navbar.tsx b/packages/app/components/navigation/Navbar/Navbar.tsx index 74f1812df..b04ceedd4 100644 --- a/packages/app/components/navigation/Navbar/Navbar.tsx +++ b/packages/app/components/navigation/Navbar/Navbar.tsx @@ -9,6 +9,7 @@ import { useScrollTop } from 'app/hooks/common/useScrollTop'; import { useScreenWidth } from 'app/hooks/common'; import useTheme from 'app/hooks/useTheme'; import { RImage } from '@packrat/ui'; +import { hexToRGBA } from 'app/utils/colorFunctions'; export const Navbar = () => { const { currentTheme } = useTheme(); @@ -68,7 +69,7 @@ const loadStyles = (currentTheme, isScrolled, screenWidth) => { const isWeb = Platform.OS === 'web'; const isFloating = isWeb && isScrolled; const backgroundColor = isFloating - ? NavbarStyles.floatingBg + ? hexToRGBA(NavbarStyles.floatingBg, 1) : currentTheme.colors.background; return StyleSheet.create({ @@ -93,7 +94,7 @@ const loadStyles = (currentTheme, isScrolled, screenWidth) => { position: 'fixed' as 'fixed' | 'relative', top: 0, zIndex: 100, - width: Platform.OS === 'web' ? '100vw' : "100%", + width: Platform.OS === 'web' ? '100vw' : '100%', }, }), }, diff --git a/packages/ui/tsconfig.json b/packages/ui/tsconfig.json index bb3fc4e85..f1e93e21d 100644 --- a/packages/ui/tsconfig.json +++ b/packages/ui/tsconfig.json @@ -1,6 +1,6 @@ { "extends": "../../tsconfig.base", // not set up yet - "include": ["src"], + "include": ["src", "../../apps/expo/app/Bugsnag.ts"], "compilerOptions": { "composite": true, "jsx": "react-jsx" diff --git a/yarn.lock b/yarn.lock index c5c3d2a76..c41045740 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1830,6 +1830,197 @@ __metadata: languageName: node linkType: hard +"@bugsnag/core@npm:^7.19.0": + version: 7.25.0 + resolution: "@bugsnag/core@npm:7.25.0" + dependencies: + "@bugsnag/cuid": "npm:^3.0.0" + "@bugsnag/safe-json-stringify": "npm:^6.0.0" + error-stack-parser: "npm:^2.0.3" + iserror: "npm:0.0.2" + stack-generator: "npm:^2.0.3" + checksum: 10/abecd0881663d1ecbe8304fa7c4e643ec62e05ad7a7d8db451e21966b3b63ea903d9d6b21229de317879a88027ed6ef6fed2bf728f0645d6a5be35bfa12a37fb + languageName: node + linkType: hard + +"@bugsnag/cuid@npm:^3.0.0": + version: 3.1.1 + resolution: "@bugsnag/cuid@npm:3.1.1" + checksum: 10/7a556bd8a166079e71872244c13f206a7d7e08b47ffa06bb712c04897144ab776ba25aaa63ea8b8e8cf7b3e973d41982bd6ac5d3544af9c988f4ef96bc86f6a3 + languageName: node + linkType: hard + +"@bugsnag/delivery-expo@npm:^50.0.0": + version: 50.0.0 + resolution: "@bugsnag/delivery-expo@npm:50.0.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + "@react-native-community/netinfo": 11.1.0 + expo-crypto: ~12.8.0 + expo-file-system: ~16.0.1 + checksum: 10/16fe802e1c6c6a4c9c50da50a6804709dc18ba98af1e2f4798a019ff432df1c91f0cfc69e48ea2896ce7110beb2a4c7b9ed8650154bbda611e0fe01784b7ab07 + languageName: node + linkType: hard + +"@bugsnag/expo@npm:^50.0.0": + version: 50.0.0 + resolution: "@bugsnag/expo@npm:50.0.0" + dependencies: + "@bugsnag/core": "npm:^7.19.0" + "@bugsnag/delivery-expo": "npm:^50.0.0" + "@bugsnag/plugin-browser-session": "npm:^7.19.0" + "@bugsnag/plugin-console-breadcrumbs": "npm:^7.19.0" + "@bugsnag/plugin-expo-app": "npm:^50.0.0" + "@bugsnag/plugin-expo-app-state-breadcrumbs": "npm:^50.0.0" + "@bugsnag/plugin-expo-connectivity-breadcrumbs": "npm:^50.0.0" + "@bugsnag/plugin-expo-device": "npm:^50.0.0" + "@bugsnag/plugin-network-breadcrumbs": "npm:^7.19.0" + "@bugsnag/plugin-react": "npm:^7.19.0" + "@bugsnag/plugin-react-native-global-error-handler": "npm:^7.19.0" + "@bugsnag/plugin-react-native-orientation-breadcrumbs": "npm:^7.19.0" + "@bugsnag/plugin-react-native-unhandled-rejection": "npm:^7.19.0" + "@bugsnag/source-maps": "npm:^2.3.1" + bugsnag-build-reporter: "npm:^2.0.0" + peerDependencies: + expo: ^50.0.0 + expo-constants: ~15.4.1 + promise: ^8.3.0 + react: "*" + checksum: 10/342c5f8e8e6e1d066902fdd0a2efca2b9ea2b9b4a1752e0af3f7e42d80d31ee22a5632618ed2aa704e7c15a8190b23c813b6952bbd14a2e4d19d9e85771686b3 + languageName: node + linkType: hard + +"@bugsnag/plugin-browser-session@npm:^7.19.0": + version: 7.25.0 + resolution: "@bugsnag/plugin-browser-session@npm:7.25.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + checksum: 10/48360e46699688329183fb861280d1e59c95d651735c3cc6de0eb5db4346decf9a28166ece28c8d4dd11d18b260124635198b3e63e5f5b11c2b980857febc7b9 + languageName: node + linkType: hard + +"@bugsnag/plugin-console-breadcrumbs@npm:^7.19.0": + version: 7.25.0 + resolution: "@bugsnag/plugin-console-breadcrumbs@npm:7.25.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + checksum: 10/ed8a377d14a0dce9c91d61008f5f01f54142f9d6d09ce5ec992ab886522ce158235537cb486c9196482f27d9a0a5137f503f779c8bddaa71e9082a25d1113bf5 + languageName: node + linkType: hard + +"@bugsnag/plugin-expo-app-state-breadcrumbs@npm:^50.0.0": + version: 50.0.0 + resolution: "@bugsnag/plugin-expo-app-state-breadcrumbs@npm:50.0.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + checksum: 10/d7b916e269820a8946d522b1fb5bff2675edfd3cc2cda79d81f6570b0e24b051bc56a51159d48de517fca2f65d632f8034efed51cb6b4aa45d094fa949ae2f3d + languageName: node + linkType: hard + +"@bugsnag/plugin-expo-app@npm:^50.0.0": + version: 50.0.0 + resolution: "@bugsnag/plugin-expo-app@npm:50.0.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + expo-application: ~5.8.0 + expo-constants: ~15.4.1 + checksum: 10/17100c90983f481dd0b7293e5e7f45818bdfc6d68b86d9ca5a18cd17ed64ade482b3796ef7acbbdac890fafcf5e66d8294306eab15a8446f004768c8e4e80971 + languageName: node + linkType: hard + +"@bugsnag/plugin-expo-connectivity-breadcrumbs@npm:^50.0.0": + version: 50.0.0 + resolution: "@bugsnag/plugin-expo-connectivity-breadcrumbs@npm:50.0.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + "@react-native-community/netinfo": 11.1.0 + checksum: 10/4822454691edfc06298d3792f32190097717e62560b02d9e7765a0d584f654ce9ffa37812091faab54b3b69714113d976231f9efb7a5075432e1b594eedb13ca + languageName: node + linkType: hard + +"@bugsnag/plugin-expo-device@npm:^50.0.0": + version: 50.0.0 + resolution: "@bugsnag/plugin-expo-device@npm:50.0.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + expo-constants: ~15.4.1 + expo-device: ~5.9.0 + checksum: 10/cffd34ef6883b3df3f44537eadd3498b29ea8be10eabb55e994a06b4be17222a169916e7c361a83049d99e6940abe16b285f4a0105757bce9870bf4584c86923 + languageName: node + linkType: hard + +"@bugsnag/plugin-network-breadcrumbs@npm:^7.19.0": + version: 7.25.0 + resolution: "@bugsnag/plugin-network-breadcrumbs@npm:7.25.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + checksum: 10/3cc6c81c85910badc905ab404c80f27b063f954117809b1ff460e44742fd3885a39201b4d78b6d69c05ab4ec063d7e60bfd2991fe8d8a97d2cc18b67816ceec2 + languageName: node + linkType: hard + +"@bugsnag/plugin-react-native-global-error-handler@npm:^7.19.0": + version: 7.25.0 + resolution: "@bugsnag/plugin-react-native-global-error-handler@npm:7.25.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + checksum: 10/4d582c63f596bf787f6f27c7697ac18e858a49c2b58f75333b88f6569838320a0ed3dece73b0e0bc8f3f82853fd000ca31d9a07d23ade383b6730f49f7bd2bdc + languageName: node + linkType: hard + +"@bugsnag/plugin-react-native-orientation-breadcrumbs@npm:^7.19.0": + version: 7.25.0 + resolution: "@bugsnag/plugin-react-native-orientation-breadcrumbs@npm:7.25.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + checksum: 10/b58dbd9b142001bb38e660216f5de472e908340bfa713edf07f329780b8d01410a418d56c2effa78046fc4917f9213945f238cfe70d0808bccd01d28290c8858 + languageName: node + linkType: hard + +"@bugsnag/plugin-react-native-unhandled-rejection@npm:^7.19.0": + version: 7.25.0 + resolution: "@bugsnag/plugin-react-native-unhandled-rejection@npm:7.25.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + checksum: 10/241f46d7f8df35de4c43e258ebe6b72c47ad2b96677e29f2eeae742ed2f18755b40a8e15d7e143e1bf8bbc33c88a255fc620ee90a141888e3e021b1c22bf1fec + languageName: node + linkType: hard + +"@bugsnag/plugin-react@npm:^7.19.0": + version: 7.25.0 + resolution: "@bugsnag/plugin-react@npm:7.25.0" + peerDependencies: + "@bugsnag/core": ^7.0.0 + peerDependenciesMeta: + "@bugsnag/core": + optional: true + checksum: 10/9b13b5c65ab464893afd0807e75ef254a9bfcf63c41893fb3fe6783e984da7d381b9cb51efe90681518f9e59ac6d47c6b96bcb09d82cfaab3e801573712ac509 + languageName: node + linkType: hard + +"@bugsnag/safe-json-stringify@npm:^6.0.0": + version: 6.0.0 + resolution: "@bugsnag/safe-json-stringify@npm:6.0.0" + checksum: 10/74f5d96af5f2f14be038ff939093329cdc6b3cc94eca6ce5ecd9e66a6d30819bcfd22f99c0ff229de56c0ef601cbca292f86ef5c9940ed2692bc9e005ac1f261 + languageName: node + linkType: hard + +"@bugsnag/source-maps@npm:^2.3.1": + version: 2.3.3 + resolution: "@bugsnag/source-maps@npm:2.3.3" + dependencies: + command-line-args: "npm:^5.1.1" + command-line-usage: "npm:^6.1.0" + concat-stream: "npm:^2.0.0" + consola: "npm:^2.15.0" + form-data: "npm:^3.0.0" + glob: "npm:^7.1.6" + read-pkg-up: "npm:^7.0.1" + bin: + bugsnag-source-maps: bin/cli + checksum: 10/c0d1d2079ca4a41fabd28a15a23818e905fdc8c7667fcec928745a85ae3227174e8d431af9696d0871a579530c3f0ca42e08d037835ec4b67d064020f4561c3b + languageName: node + linkType: hard + "@callstack/react-theme-provider@npm:^3.0.9": version: 3.0.9 resolution: "@callstack/react-theme-provider@npm:3.0.9" @@ -11157,6 +11348,13 @@ __metadata: languageName: node linkType: hard +"@types/minimist@npm:^1.2.0": + version: 1.2.5 + resolution: "@types/minimist@npm:1.2.5" + checksum: 10/477047b606005058ab0263c4f58097136268007f320003c348794f74adedc3166ffc47c80ec3e94687787f2ab7f4e72c468223946e79892cf0fd9e25e9970a90 + languageName: node + linkType: hard + "@types/node-fetch@npm:^2.6.11, @types/node-fetch@npm:^2.6.4": version: 2.6.11 resolution: "@types/node-fetch@npm:2.6.11" @@ -11210,6 +11408,13 @@ __metadata: languageName: node linkType: hard +"@types/normalize-package-data@npm:^2.4.0": + version: 2.4.4 + resolution: "@types/normalize-package-data@npm:2.4.4" + checksum: 10/65dff72b543997b7be8b0265eca7ace0e34b75c3e5fee31de11179d08fa7124a7a5587265d53d0409532ecb7f7fba662c2012807963e1f9b059653ec2c83ee05 + languageName: node + linkType: hard + "@types/nunjucks@npm:^3.1.0": version: 3.2.6 resolution: "@types/nunjucks@npm:3.2.6" @@ -12890,6 +13095,20 @@ __metadata: languageName: node linkType: hard +"array-back@npm:^3.0.1, array-back@npm:^3.1.0": + version: 3.1.0 + resolution: "array-back@npm:3.1.0" + checksum: 10/7205004fcd0f9edd926db921af901b083094608d5b265738d0290092f9822f73accb468e677db74c7c94ef432d39e5ed75a7b1786701e182efb25bbba9734209 + languageName: node + linkType: hard + +"array-back@npm:^4.0.1, array-back@npm:^4.0.2": + version: 4.0.2 + resolution: "array-back@npm:4.0.2" + checksum: 10/f30603270771eeb54e5aad5f54604c62b3577a18b6db212a7272b2b6c32049121b49431f656654790ed1469411e45f387e7627c0de8fd0515995cc40df9b9294 + languageName: node + linkType: hard + "array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" @@ -13044,6 +13263,13 @@ __metadata: languageName: node linkType: hard +"arrify@npm:^1.0.1": + version: 1.0.1 + resolution: "arrify@npm:1.0.1" + checksum: 10/745075dd4a4624ff0225c331dacb99be501a515d39bcb7c84d24660314a6ec28e68131b137e6f7e16318170842ce97538cd298fc4cd6b2cc798e0b957f2747e7 + languageName: node + linkType: hard + "arrify@npm:^2.0.0": version: 2.0.1 resolution: "arrify@npm:2.0.1" @@ -14606,6 +14832,23 @@ __metadata: languageName: node linkType: hard +"bugsnag-build-reporter@npm:^2.0.0": + version: 2.0.0 + resolution: "bugsnag-build-reporter@npm:2.0.0" + dependencies: + chalk: "npm:^2.3.0" + concat-stream: "npm:^1.6.0" + find-nearest-file: "npm:^1.1.0" + meow: "npm:^6.1.1" + once: "npm:^1.4.0" + pino: "npm:^4.10.3" + run-parallel: "npm:^1.1.6" + bin: + bugsnag-build-reporter: bin/cli.js + checksum: 10/6b761a63370b931bef2d560b43e0afcb0c8cadd1bbb7167b24adc5e495347a231e8947b26dcb77f8a7cb0530657353389b403883b04ef9059c186573d3940f0c + languageName: node + linkType: hard + "builtin-modules@npm:^3.3.0": version: 3.3.0 resolution: "builtin-modules@npm:3.3.0" @@ -14846,6 +15089,17 @@ __metadata: languageName: node linkType: hard +"camelcase-keys@npm:^6.2.2": + version: 6.2.2 + resolution: "camelcase-keys@npm:6.2.2" + dependencies: + camelcase: "npm:^5.3.1" + map-obj: "npm:^4.0.0" + quick-lru: "npm:^4.0.1" + checksum: 10/c1999f5b6d03bee7be9a36e48eef3da9e93e51b000677348ec8d15d51fc4418375890fb6c7155e387322d2ebb2a2cdebf9cd96607a6753d1d6c170d9b1e2eed5 + languageName: node + linkType: hard + "camelcase@npm:6, camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" @@ -15007,7 +15261,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.0.1, chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:^2.0.1, chalk@npm:^2.3.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -15620,6 +15874,30 @@ __metadata: languageName: node linkType: hard +"command-line-args@npm:^5.1.1": + version: 5.2.1 + resolution: "command-line-args@npm:5.2.1" + dependencies: + array-back: "npm:^3.1.0" + find-replace: "npm:^3.0.0" + lodash.camelcase: "npm:^4.3.0" + typical: "npm:^4.0.0" + checksum: 10/e6a42652ae8843fbb56e2fba1e85da00a16a0482896bb1849092e1bc70b8bf353d945e69732bf4ae98370ff84e8910ff4933af8f2f747806a6b2cb5074799fdb + languageName: node + linkType: hard + +"command-line-usage@npm:^6.1.0": + version: 6.1.3 + resolution: "command-line-usage@npm:6.1.3" + dependencies: + array-back: "npm:^4.0.2" + chalk: "npm:^2.4.2" + table-layout: "npm:^1.0.2" + typical: "npm:^5.2.0" + checksum: 10/902901582a543b26f55f90fc0f266c08a603a92bfadd8d07c66679f3d9eea2c074a039404126b0c4b65ff8452153c5f2010ea2f4ec14b70be0c77241f6d5bd53 + languageName: node + linkType: hard + "commander@npm:11.0.0": version: 11.0.0 resolution: "commander@npm:11.0.0" @@ -15779,7 +16057,7 @@ __metadata: languageName: node linkType: hard -"concat-stream@npm:2.0.0": +"concat-stream@npm:2.0.0, concat-stream@npm:^2.0.0": version: 2.0.0 resolution: "concat-stream@npm:2.0.0" dependencies: @@ -15791,6 +16069,18 @@ __metadata: languageName: node linkType: hard +"concat-stream@npm:^1.6.0": + version: 1.6.2 + resolution: "concat-stream@npm:1.6.2" + dependencies: + buffer-from: "npm:^1.0.0" + inherits: "npm:^2.0.3" + readable-stream: "npm:^2.2.2" + typedarray: "npm:^0.0.6" + checksum: 10/71db903c84fc073ca35a274074e8d26c4330713d299f8623e993c448c1f6bf8b967806dd1d1a7b0f8add6f15ab1af7435df21fe79b4fe7efd78420c89e054e28 + languageName: node + linkType: hard + "concat-stream@npm:~1.0.1": version: 1.0.1 resolution: "concat-stream@npm:1.0.1" @@ -16629,7 +16919,17 @@ __metadata: languageName: node linkType: hard -"decamelize@npm:1.2.0, decamelize@npm:^1.2.0": +"decamelize-keys@npm:^1.1.0": + version: 1.1.1 + resolution: "decamelize-keys@npm:1.1.1" + dependencies: + decamelize: "npm:^1.1.0" + map-obj: "npm:^1.0.0" + checksum: 10/71d5898174f17a8d2303cecc98ba0236e842948c4d042a8180d5e749be8442220bca2d16dd93bebd7b49e86c807814273212e4da0fae67be7c58c282ff76057a + languageName: node + linkType: hard + +"decamelize@npm:1.2.0, decamelize@npm:^1.1.0, decamelize@npm:^1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" checksum: 10/ad8c51a7e7e0720c70ec2eeb1163b66da03e7616d7b98c9ef43cce2416395e84c1e9548dd94f5f6ffecfee9f8b94251fc57121a8b021f2ff2469b2bae247b8aa @@ -16680,7 +16980,7 @@ __metadata: languageName: node linkType: hard -"deep-extend@npm:^0.6.0": +"deep-extend@npm:^0.6.0, deep-extend@npm:~0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" checksum: 10/7be7e5a8d468d6b10e6a67c3de828f55001b6eb515d014f7aeb9066ce36bd5717161eb47d6a0f7bed8a9083935b465bc163ee2581c8b128d29bf61092fdf57a7 @@ -17642,7 +17942,7 @@ __metadata: languageName: node linkType: hard -"error-stack-parser@npm:^2.0.6": +"error-stack-parser@npm:^2.0.3, error-stack-parser@npm:^2.0.6": version: 2.1.4 resolution: "error-stack-parser@npm:2.1.4" dependencies: @@ -19544,6 +19844,7 @@ __metadata: "@babel/core": "npm:^7.23.7" "@babel/preset-typescript": "npm:^7.22.5" "@babel/runtime": "npm:^7.21.0" + "@bugsnag/expo": "npm:^50.0.0" "@expo/match-media": "npm:^0.4.0" "@expo/metro-runtime": "npm:~3.1.3" "@expo/vector-icons": "npm:^14.0.0" @@ -19612,17 +19913,18 @@ __metadata: eslint-plugin-react: "npm:^7.33.2" eslint-plugin-react-native: "npm:^4.0.0" expo: "npm:^50.0.14" - expo-application: "npm:~5.8.3" + expo-application: "npm:~5.8.4" expo-auth-session: "npm:~5.4.0" expo-blur: "npm:~12.9.2" expo-build-properties: "npm:~0.11.1" expo-checkbox: "npm:~2.7.0" expo-clipboard: "npm:~5.0.1" - expo-constants: "npm:~15.4.5" + expo-constants: "npm:~15.4.6" expo-crypto: "npm:~12.8.1" expo-dev-client: "npm:~3.3.11" + expo-device: "npm:~5.9.4" expo-document-picker: "npm:~11.10.1" - expo-file-system: "npm:~16.0.8" + expo-file-system: "npm:~16.0.9" expo-font: "npm:~11.10.3" expo-haptics: "npm:~12.8.1" expo-image-picker: "npm:~14.7.1" @@ -19684,7 +19986,7 @@ __metadata: languageName: unknown linkType: soft -"expo-application@npm:~5.8.0, expo-application@npm:~5.8.3": +"expo-application@npm:~5.8.0, expo-application@npm:~5.8.3, expo-application@npm:~5.8.4": version: 5.8.4 resolution: "expo-application@npm:5.8.4" peerDependencies: @@ -19758,7 +20060,7 @@ __metadata: languageName: node linkType: hard -"expo-constants@npm:~15.4.0, expo-constants@npm:~15.4.3, expo-constants@npm:~15.4.5": +"expo-constants@npm:~15.4.0, expo-constants@npm:~15.4.3, expo-constants@npm:~15.4.5, expo-constants@npm:~15.4.6": version: 15.4.6 resolution: "expo-constants@npm:15.4.6" dependencies: @@ -19831,6 +20133,17 @@ __metadata: languageName: node linkType: hard +"expo-device@npm:~5.9.4": + version: 5.9.4 + resolution: "expo-device@npm:5.9.4" + dependencies: + ua-parser-js: "npm:^0.7.33" + peerDependencies: + expo: "*" + checksum: 10/2b163985f1d3bfb81ef5c0c566a586f107ca747e20ad52f6e42349bca7f96daf7f3903e9b6c92084eb9291671515b59438c5db2cdc783b161d20c6c7edeb95ac + languageName: node + linkType: hard + "expo-document-picker@npm:~11.10.1": version: 11.10.1 resolution: "expo-document-picker@npm:11.10.1" @@ -20271,6 +20584,13 @@ __metadata: languageName: node linkType: hard +"fast-json-parse@npm:^1.0.3": + version: 1.0.3 + resolution: "fast-json-parse@npm:1.0.3" + checksum: 10/4ae38b50a4641d503995862e3f103ad77b865a5c8c8894923a88eb1839af35fe7d2f1a7b2cabb42481fec781fad9876cc6e37d9bf25d175da35ea47e874dafb5 + languageName: node + linkType: hard + "fast-json-stable-stringify@npm:2.x, fast-json-stable-stringify@npm:^2.0.0, fast-json-stable-stringify@npm:^2.1.0": version: 2.1.0 resolution: "fast-json-stable-stringify@npm:2.1.0" @@ -20308,6 +20628,13 @@ __metadata: languageName: node linkType: hard +"fast-safe-stringify@npm:^1.0.8, fast-safe-stringify@npm:^1.2.3": + version: 1.2.3 + resolution: "fast-safe-stringify@npm:1.2.3" + checksum: 10/399f827255d6fc1057e5a455edf6a38dcc21942b20ef2f456d3b766da580d04da1b57a5d740ffa4a0dfef1cb7b27bfbe187ded71e7051b0bcbd6d568cd6f0c59 + languageName: node + linkType: hard + "fast-text-encoding@npm:^1.0.0, fast-text-encoding@npm:^1.0.3": version: 1.0.6 resolution: "fast-text-encoding@npm:1.0.6" @@ -20567,6 +20894,22 @@ __metadata: languageName: node linkType: hard +"find-nearest-file@npm:^1.1.0": + version: 1.1.0 + resolution: "find-nearest-file@npm:1.1.0" + checksum: 10/bf46adaf26938d1b2e274195196453cdba979eef9066b4b0a7edf0599d2c886520f9d707f88cc18b1dadd231efe6ee14e0c2898d43f7cbf2a8faddbef679867f + languageName: node + linkType: hard + +"find-replace@npm:^3.0.0": + version: 3.0.0 + resolution: "find-replace@npm:3.0.0" + dependencies: + array-back: "npm:^3.0.1" + checksum: 10/6b04bcfd79027f5b84aa1dfe100e3295da989bdac4b4de6b277f4d063e78f5c9e92ebc8a1fec6dd3b448c924ba404ee051cc759e14a3ee3e825fa1361025df08 + languageName: node + linkType: hard + "find-root@npm:^1.1.0": version: 1.1.0 resolution: "find-root@npm:1.1.0" @@ -20706,6 +21049,13 @@ __metadata: languageName: node linkType: hard +"flatstr@npm:^1.0.5": + version: 1.0.12 + resolution: "flatstr@npm:1.0.12" + checksum: 10/2334fec61d9b4e1d8de8ceb33d9a8c64f87073d06d5cb157b04c8835c50f600b10e763a303fa388443ee423f28ed600cfd04cba1e793fe5d7c2d7e13fd912a01 + languageName: node + linkType: hard + "flatted@npm:^3.2.9": version: 3.3.1 resolution: "flatted@npm:3.3.1" @@ -20823,7 +21173,7 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^3.0.1": +"form-data@npm:^3.0.0, form-data@npm:^3.0.1": version: 3.0.1 resolution: "form-data@npm:3.0.1" dependencies: @@ -21450,7 +21800,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.2.3, glob@npm:^7.0.3, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.7, glob@npm:^7.2.3": +"glob@npm:7.2.3, glob@npm:^7.0.3, glob@npm:^7.1.1, glob@npm:^7.1.2, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7, glob@npm:^7.2.3": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -21874,6 +22224,13 @@ __metadata: languageName: node linkType: hard +"hard-rejection@npm:^2.1.0": + version: 2.1.0 + resolution: "hard-rejection@npm:2.1.0" + checksum: 10/7baaf80a0c7fff4ca79687b4060113f1529589852152fa935e6787a2bc96211e784ad4588fb3048136ff8ffc9dfcf3ae385314a5b24db32de20bea0d1597f9dc + languageName: node + linkType: hard + "has-ansi@npm:^2.0.0": version: 2.0.0 resolution: "has-ansi@npm:2.0.0" @@ -23119,7 +23476,7 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:^1.0.0": +"is-plain-obj@npm:^1.0.0, is-plain-obj@npm:^1.1.0": version: 1.1.0 resolution: "is-plain-obj@npm:1.1.0" checksum: 10/0ee04807797aad50859652a7467481816cbb57e5cc97d813a7dcd8915da8195dc68c436010bf39d195226cde6a2d352f4b815f16f26b7bf486a5754290629931 @@ -23344,6 +23701,13 @@ __metadata: languageName: node linkType: hard +"iserror@npm:0.0.2": + version: 0.0.2 + resolution: "iserror@npm:0.0.2" + checksum: 10/6ca5e50d779471dbb69455ce6853a8284a2a077ff9b7130133a1d09f071830653274884a1e5271b55a422a33e128790a3a7c3e73b2648cf5398d3cbdeb5ca889 + languageName: node + linkType: hard + "isexe@npm:^2.0.0": version: 2.0.0 resolution: "isexe@npm:2.0.0" @@ -24516,7 +24880,7 @@ __metadata: languageName: node linkType: hard -"kind-of@npm:^6.0.2": +"kind-of@npm:^6.0.2, kind-of@npm:^6.0.3": version: 6.0.3 resolution: "kind-of@npm:6.0.3" checksum: 10/5873d303fb36aad875b7538798867da2ae5c9e328d67194b0162a3659a627d22f742fc9c4ae95cd1704132a24b00cae5041fc00c0f6ef937dc17080dc4dbb962 @@ -25703,6 +26067,20 @@ __metadata: languageName: node linkType: hard +"map-obj@npm:^1.0.0": + version: 1.0.1 + resolution: "map-obj@npm:1.0.1" + checksum: 10/f8e6fc7f6137329c376c4524f6d25b3c243c17019bc8f621d15a2dcb855919e482a9298a78ae58b00dbd0e76b640bf6533aa343a9e993cfc16e0346a2507e7f8 + languageName: node + linkType: hard + +"map-obj@npm:^4.0.0": + version: 4.3.0 + resolution: "map-obj@npm:4.3.0" + checksum: 10/fbc554934d1a27a1910e842bc87b177b1a556609dd803747c85ece420692380827c6ae94a95cce4407c054fa0964be3bf8226f7f2cb2e9eeee432c7c1985684e + languageName: node + linkType: hard + "mapbox-gl@npm:1.13.3": version: 1.13.3 resolution: "mapbox-gl@npm:1.13.3" @@ -25959,6 +26337,25 @@ __metadata: languageName: node linkType: hard +"meow@npm:^6.1.1": + version: 6.1.1 + resolution: "meow@npm:6.1.1" + dependencies: + "@types/minimist": "npm:^1.2.0" + camelcase-keys: "npm:^6.2.2" + decamelize-keys: "npm:^1.1.0" + hard-rejection: "npm:^2.1.0" + minimist-options: "npm:^4.0.2" + normalize-package-data: "npm:^2.5.0" + read-pkg-up: "npm:^7.0.1" + redent: "npm:^3.0.0" + trim-newlines: "npm:^3.0.0" + type-fest: "npm:^0.13.1" + yargs-parser: "npm:^18.1.3" + checksum: 10/507ea2e7d61f6afe17e8f57323e190ddc8bd4ad0921db75920cf9d6f0f686828d3fe3b18a0a09ee6a5c27e070a3ca69133a7a095e57703b2e8d46eb56ee7d66f + languageName: node + linkType: hard + "merge-descriptors@npm:1.0.1": version: 1.0.1 resolution: "merge-descriptors@npm:1.0.1" @@ -26453,6 +26850,13 @@ __metadata: languageName: node linkType: hard +"min-indent@npm:^1.0.0": + version: 1.0.1 + resolution: "min-indent@npm:1.0.1" + checksum: 10/bfc6dd03c5eaf623a4963ebd94d087f6f4bbbfd8c41329a7f09706b0cb66969c4ddd336abeb587bc44bc6f08e13bf90f0b374f9d71f9f01e04adc2cd6f083ef1 + languageName: node + linkType: hard + "mini-css-extract-plugin@npm:^2.5.2": version: 2.9.0 resolution: "mini-css-extract-plugin@npm:2.9.0" @@ -26586,6 +26990,17 @@ __metadata: languageName: node linkType: hard +"minimist-options@npm:^4.0.2": + version: 4.1.0 + resolution: "minimist-options@npm:4.1.0" + dependencies: + arrify: "npm:^1.0.1" + is-plain-obj: "npm:^1.1.0" + kind-of: "npm:^6.0.3" + checksum: 10/8c040b3068811e79de1140ca2b708d3e203c8003eb9a414c1ab3cd467fc5f17c9ca02a5aef23bedc51a7f8bfbe77f87e9a7e31ec81fba304cda675b019496f4e + languageName: node + linkType: hard + "minimist@npm:^1.2.0, minimist@npm:^1.2.6": version: 1.2.8 resolution: "minimist@npm:1.2.8" @@ -27704,7 +28119,7 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^2.3.2": +"normalize-package-data@npm:^2.3.2, normalize-package-data@npm:^2.5.0": version: 2.5.0 resolution: "normalize-package-data@npm:2.5.0" dependencies: @@ -28698,7 +29113,7 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^5.2.0": +"parse-json@npm:^5.0.0, parse-json@npm:^5.2.0": version: 5.2.0 resolution: "parse-json@npm:5.2.0" dependencies: @@ -29154,6 +29569,31 @@ __metadata: languageName: node linkType: hard +"pino-std-serializers@npm:^2.0.0": + version: 2.5.0 + resolution: "pino-std-serializers@npm:2.5.0" + checksum: 10/b6c4bf7035caaa55849fc3164558ce56cb2d23ef84a2a5f3a1610a740f3e538843fb7360822156ffd08f835dd5128152a05df6f1d653949f972d9c5d57ebccbf + languageName: node + linkType: hard + +"pino@npm:^4.10.3": + version: 4.17.6 + resolution: "pino@npm:4.17.6" + dependencies: + chalk: "npm:^2.4.1" + fast-json-parse: "npm:^1.0.3" + fast-safe-stringify: "npm:^1.2.3" + flatstr: "npm:^1.0.5" + pino-std-serializers: "npm:^2.0.0" + pump: "npm:^3.0.0" + quick-format-unescaped: "npm:^1.1.2" + split2: "npm:^2.2.0" + bin: + pino: ./bin.js + checksum: 10/12a987c2b6ff0e93057fd4feb20029e6da69be37b05ab4836240b08d14d9080a750afe4b6a5978f19d96560fd9cc0f4f8177b4a4b3430224b93fc7cb81cb0317 + languageName: node + linkType: hard + "pirates@npm:^3.0.2": version: 3.0.2 resolution: "pirates@npm:3.0.2" @@ -30230,6 +30670,22 @@ __metadata: languageName: node linkType: hard +"quick-format-unescaped@npm:^1.1.2": + version: 1.1.2 + resolution: "quick-format-unescaped@npm:1.1.2" + dependencies: + fast-safe-stringify: "npm:^1.0.8" + checksum: 10/132a25975ab4e3bd65177d8d89376162ecd9c097ddfc1a0626b7fa3a07e68a000cff7ccbc7b2e29c349079cf81e3ea58ee3339779985224ba0a8f39cad1d96b7 + languageName: node + linkType: hard + +"quick-lru@npm:^4.0.1": + version: 4.0.1 + resolution: "quick-lru@npm:4.0.1" + checksum: 10/5c7c75f1c696750f619b165cc9957382f919e4207dabf04597a64f0298861391cdc5ee91a1dde1a5d460ecf7ee1af7fc36fef6d155bef2be66f05d43fd63d4f0 + languageName: node + linkType: hard + "quick-lru@npm:^5.1.1": version: 5.1.1 resolution: "quick-lru@npm:5.1.1" @@ -31077,6 +31533,17 @@ __metadata: languageName: node linkType: hard +"read-pkg-up@npm:^7.0.1": + version: 7.0.1 + resolution: "read-pkg-up@npm:7.0.1" + dependencies: + find-up: "npm:^4.1.0" + read-pkg: "npm:^5.2.0" + type-fest: "npm:^0.8.1" + checksum: 10/e4e93ce70e5905b490ca8f883eb9e48b5d3cebc6cd4527c25a0d8f3ae2903bd4121c5ab9c5a3e217ada0141098eeb661313c86fa008524b089b8ed0b7f165e44 + languageName: node + linkType: hard + "read-pkg@npm:^3.0.0": version: 3.0.0 resolution: "read-pkg@npm:3.0.0" @@ -31088,6 +31555,18 @@ __metadata: languageName: node linkType: hard +"read-pkg@npm:^5.2.0": + version: 5.2.0 + resolution: "read-pkg@npm:5.2.0" + dependencies: + "@types/normalize-package-data": "npm:^2.4.0" + normalize-package-data: "npm:^2.5.0" + parse-json: "npm:^5.0.0" + type-fest: "npm:^0.6.0" + checksum: 10/eb696e60528b29aebe10e499ba93f44991908c57d70f2d26f369e46b8b9afc208ef11b4ba64f67630f31df8b6872129e0a8933c8c53b7b4daf0eace536901222 + languageName: node + linkType: hard + "read-yaml-file@npm:^1.1.0": version: 1.1.0 resolution: "read-yaml-file@npm:1.1.0" @@ -31112,7 +31591,7 @@ __metadata: languageName: node linkType: hard -"readable-stream@npm:^2.0.1, readable-stream@npm:^2.3.8, readable-stream@npm:~2.3.6": +"readable-stream@npm:^2.0.1, readable-stream@npm:^2.2.2, readable-stream@npm:^2.3.8, readable-stream@npm:~2.3.6": version: 2.3.8 resolution: "readable-stream@npm:2.3.8" dependencies: @@ -31203,6 +31682,16 @@ __metadata: languageName: node linkType: hard +"redent@npm:^3.0.0": + version: 3.0.0 + resolution: "redent@npm:3.0.0" + dependencies: + indent-string: "npm:^4.0.0" + strip-indent: "npm:^3.0.0" + checksum: 10/fa1ef20404a2d399235e83cc80bd55a956642e37dd197b4b612ba7327bf87fa32745aeb4a1634b2bab25467164ab4ed9c15be2c307923dd08b0fe7c52431ae6b + languageName: node + linkType: hard + "redeyed@npm:~2.1.0": version: 2.1.1 resolution: "redeyed@npm:2.1.1" @@ -31228,6 +31717,13 @@ __metadata: languageName: node linkType: hard +"reduce-flatten@npm:^2.0.0": + version: 2.0.0 + resolution: "reduce-flatten@npm:2.0.0" + checksum: 10/64393ef99a16b20692acfd60982d7fdbd7ff8d9f8f185c6023466444c6dd2abb929d67717a83cec7f7f8fb5f46a25d515b3b2bf2238fdbfcdbfd01d2a9e73cb8 + languageName: node + linkType: hard + "redux-persist@npm:^6.0.0": version: 6.0.0 resolution: "redux-persist@npm:6.0.0" @@ -31973,7 +32469,7 @@ __metadata: languageName: node linkType: hard -"run-parallel@npm:^1.1.9": +"run-parallel@npm:^1.1.6, run-parallel@npm:^1.1.9": version: 1.2.0 resolution: "run-parallel@npm:1.2.0" dependencies: @@ -33125,6 +33621,15 @@ __metadata: languageName: node linkType: hard +"split2@npm:^2.2.0": + version: 2.2.0 + resolution: "split2@npm:2.2.0" + dependencies: + through2: "npm:^2.0.2" + checksum: 10/5799dcd2ae5d2f905c4f3e14942d8efa98c4c5ea13e5e5e978f4693e9596393174cdab59ad2d046ec1799c081d82b8e75c627d2911c034a8b5827623e719ccc8 + languageName: node + linkType: hard + "split@npm:^1.0.1": version: 1.0.1 resolution: "split@npm:1.0.1" @@ -33201,6 +33706,15 @@ __metadata: languageName: node linkType: hard +"stack-generator@npm:^2.0.3": + version: 2.0.10 + resolution: "stack-generator@npm:2.0.10" + dependencies: + stackframe: "npm:^1.3.4" + checksum: 10/4fc3978a934424218a0aa9f398034e1f78153d5ff4f4ff9c62478c672debb47dd58de05b09fc3900530cbb526d72c93a6e6c9353bacc698e3b1c00ca3dda0c47 + languageName: node + linkType: hard + "stack-utils@npm:^2.0.3": version: 2.0.6 resolution: "stack-utils@npm:2.0.6" @@ -33609,6 +34123,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: "npm:^1.0.0" + checksum: 10/18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + languageName: node + linkType: hard + "strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -33936,6 +34459,18 @@ __metadata: languageName: node linkType: hard +"table-layout@npm:^1.0.2": + version: 1.0.2 + resolution: "table-layout@npm:1.0.2" + dependencies: + array-back: "npm:^4.0.1" + deep-extend: "npm:~0.6.0" + typical: "npm:^5.2.0" + wordwrapjs: "npm:^4.0.0" + checksum: 10/5dd12bc64ddf246f774fc51b45398dd8da900b7bb246595c84007ea292c15936264701660b80704be17da5d4066a9a250549418c40a2b635a0916c9294b103af + languageName: node + linkType: hard + "table@npm:^6.8.1": version: 6.8.2 resolution: "table@npm:6.8.2" @@ -34274,7 +34809,7 @@ __metadata: languageName: node linkType: hard -"through2@npm:^2.0.1": +"through2@npm:^2.0.1, through2@npm:^2.0.2": version: 2.0.5 resolution: "through2@npm:2.0.5" dependencies: @@ -34544,6 +35079,13 @@ __metadata: languageName: node linkType: hard +"trim-newlines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-newlines@npm:3.0.1" + checksum: 10/b530f3fadf78e570cf3c761fb74fef655beff6b0f84b29209bac6c9622db75ad1417f4a7b5d54c96605dcd72734ad44526fef9f396807b90839449eb543c6206 + languageName: node + linkType: hard + "trpc-client-devtools-link@npm:^0.2.1-next": version: 0.2.1-next resolution: "trpc-client-devtools-link@npm:0.2.1-next" @@ -34893,6 +35435,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.13.1": + version: 0.13.1 + resolution: "type-fest@npm:0.13.1" + checksum: 10/11e9476dc85bf97a71f6844fb67ba8e64a4c7e445724c0f3bd37eb2ddf4bc97c1dc9337bd880b28bce158de1c0cb275c2d03259815a5bf64986727197126ab56 + languageName: node + linkType: hard + "type-fest@npm:^0.16.0": version: 0.16.0 resolution: "type-fest@npm:0.16.0" @@ -34921,6 +35470,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.6.0": + version: 0.6.0 + resolution: "type-fest@npm:0.6.0" + checksum: 10/9ecbf4ba279402b14c1a0614b6761bbe95626fab11377291fecd7e32b196109551e0350dcec6af74d97ced1b000ba8060a23eca33157091e642b409c2054ba82 + languageName: node + linkType: hard + "type-fest@npm:^0.7.1": version: 0.7.1 resolution: "type-fest@npm:0.7.1" @@ -34928,6 +35484,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.8.1": + version: 0.8.1 + resolution: "type-fest@npm:0.8.1" + checksum: 10/fd4a91bfb706aeeb0d326ebd2e9a8ea5263979e5dec8d16c3e469a5bd3a946e014a062ef76c02e3086d3d1c7209a56a20a4caafd0e9f9a5c2ab975084ea3d388 + languageName: node + linkType: hard + "type-fest@npm:^1.0.2": version: 1.4.0 resolution: "type-fest@npm:1.4.0" @@ -35099,6 +35662,27 @@ __metadata: languageName: node linkType: hard +"typical@npm:^4.0.0": + version: 4.0.0 + resolution: "typical@npm:4.0.0" + checksum: 10/aefe2c24b025cda22534ae2594df4a1df5db05b5fe3692890fd51db741ca4f18937a149f968b8d56d9a7b0756e7cd8843b1907bea21987ff4a06619c54d5a575 + languageName: node + linkType: hard + +"typical@npm:^5.2.0": + version: 5.2.0 + resolution: "typical@npm:5.2.0" + checksum: 10/fd8e4197cb2e021ca6d11fea0018ee219c29bf4160ab613492f74c0e21806003d1cd92a15088b111778a7b5c6432e4e28321899785a86980b390b87c4010efe5 + languageName: node + linkType: hard + +"ua-parser-js@npm:^0.7.33": + version: 0.7.38 + resolution: "ua-parser-js@npm:0.7.38" + checksum: 10/011609d0176952abc60b7a20e0af266a899b34f4c49a6f5097d6af763da27eacaa3752b710ae4d930d7b99508bb8c0b34ebe8042e1d9fdc4056d051b209b0842 + languageName: node + linkType: hard + "ua-parser-js@npm:^1.0.35": version: 1.0.37 resolution: "ua-parser-js@npm:1.0.37" @@ -36479,6 +37063,16 @@ __metadata: languageName: node linkType: hard +"wordwrapjs@npm:^4.0.0": + version: 4.0.1 + resolution: "wordwrapjs@npm:4.0.1" + dependencies: + reduce-flatten: "npm:^2.0.0" + typical: "npm:^5.2.0" + checksum: 10/4182c48c9d3eab0932fb9f9f202e3f1d4d28ff6db3fd2e1654ec8606677d8e0ab80110f0f8e2e236ee2b52631cbc5fccf3097e9287e3ace20cbc1613a784befc + languageName: node + linkType: hard + "workerd@npm:1.20240405.0": version: 1.20240405.0 resolution: "workerd@npm:1.20240405.0" @@ -36922,7 +37516,7 @@ __metadata: languageName: node linkType: hard -"yargs-parser@npm:^18.1.2": +"yargs-parser@npm:^18.1.2, yargs-parser@npm:^18.1.3": version: 18.1.3 resolution: "yargs-parser@npm:18.1.3" dependencies: From 932e06c7e082929e68934fbf7108614745d2bd89 Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Thu, 25 Jul 2024 11:45:42 +0530 Subject: [PATCH 2/6] Move bugsnag key to env --- apps/expo/Bugsnag.ts | 2 +- apps/expo/app.json | 9 ++------- apps/expo/env.example | 1 + packages/config/src/index.js | 2 ++ 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/apps/expo/Bugsnag.ts b/apps/expo/Bugsnag.ts index 75a41ecec..8ce7f2dba 100644 --- a/apps/expo/Bugsnag.ts +++ b/apps/expo/Bugsnag.ts @@ -4,7 +4,7 @@ import BugsnagPluginExpoApp from '@bugsnag/plugin-expo-app'; import BugsnagPluginExpoDevice from '@bugsnag/plugin-expo-device'; Bugsnag.start({ - apiKey: 'd92cb1ab6783c77d1c4b2404641ffdfc', + apiKey: process.env.BUGSNAG_API_KEY, plugins: [BugsnagPluginReact, BugsnagPluginExpoApp, BugsnagPluginExpoDevice], }); diff --git a/apps/expo/app.json b/apps/expo/app.json index 621a99e00..1cf034965 100644 --- a/apps/expo/app.json +++ b/apps/expo/app.json @@ -7,9 +7,7 @@ "icon": "./assets/packrat-app-icon.png", "userInterfaceStyle": "automatic", "scheme": "packrat", - "assetBundlePatterns": [ - "**/*" - ], + "assetBundlePatterns": ["**/*"], "ios": { "supportsTablet": true, "bundleIdentifier": "com.andrewbierman.packrat" @@ -56,11 +54,8 @@ "extra": { "eas": { "projectId": "267945b1-d9ac-4621-8541-826a2c70576d" - }, - "bugsnag": { - "apiKey": "d92cb1ab6783c77d1c4b2404641ffdfc" } }, "owner": "packrat" } -} \ No newline at end of file +} diff --git a/apps/expo/env.example b/apps/expo/env.example index 515b847f0..781add7d6 100644 --- a/apps/expo/env.example +++ b/apps/expo/env.example @@ -6,4 +6,5 @@ EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN="Your api key, starts with pk..." EXPO_PUBLIC_ANDROID_CLIENT_ID="962352557394-........................apps.googleusercontent.com" EXPO_PUBLIC_IOS_CLIENT_ID="962352557394-........................apps.googleusercontent.com" MAPBOX_DOWNLOADS_TOKEN="Your api key, starts with sk..." +EXPO_PUBLIC_BUGSNAG_API_KEY="Bugsnag api key" diff --git a/packages/config/src/index.js b/packages/config/src/index.js index 03a554dde..817c87829 100644 --- a/packages/config/src/index.js +++ b/packages/config/src/index.js @@ -26,6 +26,7 @@ const MAPBOX_ACCESS_TOKEN = viteSource.VITE_PUBLIC_MAPBOX_ACCESS_TOKEN || process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN || process.env.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN; +const BUGSNAG_API_KEY = process.env.EXPO_PUBLIC_BUGSNAG_API_KEY; const APP = viteSource.VITE_PUBLIC_APP || process.env.NEXT_PUBLIC_APP || @@ -42,6 +43,7 @@ export { IOS_CLIENT_ID, ANDROID_CLIENT_ID, MAPBOX_ACCESS_TOKEN, + BUGSNAG_API_KEY, APP, CLIENT_URL, NODE_ENV, From f3be54efbf609ffba9468d658436dbd8418d3c7e Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Thu, 8 Aug 2024 15:54:22 +0530 Subject: [PATCH 3/6] Move error boundary to provider --- .env.example | 2 + apps/expo/app/_layout.tsx | 19 +- apps/vite/env.example | 2 + apps/vite/src/routeTree.gen.ts | 177 +----------------- .../feedPreview/FeedPreviewCard.tsx | 8 +- .../expo => packages/app/provider}/Bugsnag.ts | 3 +- packages/app/provider/CombinedProvider.tsx | 19 +- packages/config/src/index.js | 6 +- yarn.lock | 11 ++ 9 files changed, 47 insertions(+), 200 deletions(-) rename {apps/expo => packages/app/provider}/Bugsnag.ts (81%) diff --git a/.env.example b/.env.example index 0b010e807..a7958d2a4 100644 --- a/.env.example +++ b/.env.example @@ -21,6 +21,8 @@ PUBLIC_X_RAPIDAPI_KEY="Your api key" PUBLIC_MAPBOX_ACCESS_TOKEN="Your api key, starts with pk..." PUBLIC_MAPBOX_DOWNLOADS_TOKEN="Your api key, starts with sk..." PUBLIC_MAPBOX_DOWNLOADS_TOKEN2="Your api key, starts with sk..." +PUBLIC_BUGSNAG_API_KEY="Bugsnag api key" + # Google OAuth PUBLIC_WEB_CLIENT_ID="Your Google OAuth web client ID" diff --git a/apps/expo/app/_layout.tsx b/apps/expo/app/_layout.tsx index 45543ad3f..203fa20bb 100644 --- a/apps/expo/app/_layout.tsx +++ b/apps/expo/app/_layout.tsx @@ -1,20 +1,15 @@ import React from 'react'; import { Provider } from 'app/provider'; import { Stack } from 'expo-router'; -import Bugsnag from '../Bugsnag'; - -const ErrorBoundary = Bugsnag.getPlugin('react')?.createErrorBoundary(React); export default function HomeLayout() { return ( - - - - - + + + ); } diff --git a/apps/vite/env.example b/apps/vite/env.example index 033203ad2..e59dfd7ab 100644 --- a/apps/vite/env.example +++ b/apps/vite/env.example @@ -5,4 +5,6 @@ VITE_PUBLIC_CLIENT_URL="Your client url" VITE_PUBLIC_API_URL="Your api url" VITE_PUBLIC_MAPBOX_ACCESS_TOKEN="Your api key, starts with pk..." VITE_PUBLIC_WEB_CLIENT_ID="962352557394-..................apps.googleusercontent.com" +VITE_PUBLIC_BUGSNAG_API_KEY="Bugsnag api key" + diff --git a/apps/vite/src/routeTree.gen.ts b/apps/vite/src/routeTree.gen.ts index 8e9dfcd1e..968fb50c5 100644 --- a/apps/vite/src/routeTree.gen.ts +++ b/apps/vite/src/routeTree.gen.ts @@ -174,163 +174,94 @@ const ProfileSettingsIndexLazyRoute = ProfileSettingsIndexLazyImport.update({ declare module '@tanstack/react-router' { interface FileRoutesByPath { '/': { - id: '/' - path: '/' - fullPath: '/' preLoaderRoute: typeof IndexImport parentRoute: typeof rootRoute } '/destination/query': { - id: '/destination/query' - path: '/destination/query' - fullPath: '/destination/query' preLoaderRoute: typeof DestinationQueryLazyImport parentRoute: typeof rootRoute } '/item/$itemId': { - id: '/item/$itemId' - path: '/item/$itemId' - fullPath: '/item/$itemId' preLoaderRoute: typeof ItemItemIdLazyImport parentRoute: typeof rootRoute } '/pack/$id': { - id: '/pack/$id' - path: '/pack/$id' - fullPath: '/pack/$id' preLoaderRoute: typeof PackIdLazyImport parentRoute: typeof rootRoute } '/pack/create': { - id: '/pack/create' - path: '/pack/create' - fullPath: '/pack/create' preLoaderRoute: typeof PackCreateLazyImport parentRoute: typeof rootRoute } '/profile/$id': { - id: '/profile/$id' - path: '/profile/$id' - fullPath: '/profile/$id' preLoaderRoute: typeof ProfileIdLazyImport parentRoute: typeof rootRoute } '/trip/$tripId': { - id: '/trip/$tripId' - path: '/trip/$tripId' - fullPath: '/trip/$tripId' preLoaderRoute: typeof TripTripIdLazyImport parentRoute: typeof rootRoute } '/trip/create': { - id: '/trip/create' - path: '/trip/create' - fullPath: '/trip/create' preLoaderRoute: typeof TripCreateLazyImport parentRoute: typeof rootRoute } '/about/': { - id: '/about/' - path: '/about' - fullPath: '/about' preLoaderRoute: typeof AboutIndexLazyImport parentRoute: typeof rootRoute } '/appearance/': { - id: '/appearance/' - path: '/appearance' - fullPath: '/appearance' preLoaderRoute: typeof AppearanceIndexLazyImport parentRoute: typeof rootRoute } '/dashboard/': { - id: '/dashboard/' - path: '/dashboard' - fullPath: '/dashboard' preLoaderRoute: typeof DashboardIndexLazyImport parentRoute: typeof rootRoute } '/feed/': { - id: '/feed/' - path: '/feed' - fullPath: '/feed' preLoaderRoute: typeof FeedIndexLazyImport parentRoute: typeof rootRoute } '/items/': { - id: '/items/' - path: '/items' - fullPath: '/items' preLoaderRoute: typeof ItemsIndexLazyImport parentRoute: typeof rootRoute } '/map/': { - id: '/map/' - path: '/map' - fullPath: '/map' preLoaderRoute: typeof MapIndexLazyImport parentRoute: typeof rootRoute } '/maps/': { - id: '/maps/' - path: '/maps' - fullPath: '/maps' preLoaderRoute: typeof MapsIndexLazyImport parentRoute: typeof rootRoute } '/packs/': { - id: '/packs/' - path: '/packs' - fullPath: '/packs' preLoaderRoute: typeof PacksIndexLazyImport parentRoute: typeof rootRoute } '/password-reset/': { - id: '/password-reset/' - path: '/password-reset' - fullPath: '/password-reset' preLoaderRoute: typeof PasswordResetIndexLazyImport parentRoute: typeof rootRoute } '/privacy/': { - id: '/privacy/' - path: '/privacy' - fullPath: '/privacy' preLoaderRoute: typeof PrivacyIndexLazyImport parentRoute: typeof rootRoute } '/profile/': { - id: '/profile/' - path: '/profile' - fullPath: '/profile' preLoaderRoute: typeof ProfileIndexLazyImport parentRoute: typeof rootRoute } '/register/': { - id: '/register/' - path: '/register' - fullPath: '/register' preLoaderRoute: typeof RegisterIndexLazyImport parentRoute: typeof rootRoute } '/sign-in/': { - id: '/sign-in/' - path: '/sign-in' - fullPath: '/sign-in' preLoaderRoute: typeof SignInIndexLazyImport parentRoute: typeof rootRoute } '/trips/': { - id: '/trips/' - path: '/trips' - fullPath: '/trips' preLoaderRoute: typeof TripsIndexLazyImport parentRoute: typeof rootRoute } '/profile/settings/': { - id: '/profile/settings/' - path: '/profile/settings' - fullPath: '/profile/settings' preLoaderRoute: typeof ProfileSettingsIndexLazyImport parentRoute: typeof rootRoute } @@ -339,7 +270,7 @@ declare module '@tanstack/react-router' { // Create and export the route tree -export const routeTree = rootRoute.addChildren({ +export const routeTree = rootRoute.addChildren([ IndexRoute, DestinationQueryLazyRoute, ItemItemIdLazyRoute, @@ -363,110 +294,6 @@ export const routeTree = rootRoute.addChildren({ SignInIndexLazyRoute, TripsIndexLazyRoute, ProfileSettingsIndexLazyRoute, -}) +]) /* prettier-ignore-end */ - -/* ROUTE_MANIFEST_START -{ - "routes": { - "__root__": { - "filePath": "__root.tsx", - "children": [ - "/", - "/destination/query", - "/item/$itemId", - "/pack/$id", - "/pack/create", - "/profile/$id", - "/trip/$tripId", - "/trip/create", - "/about/", - "/appearance/", - "/dashboard/", - "/feed/", - "/items/", - "/map/", - "/maps/", - "/packs/", - "/password-reset/", - "/privacy/", - "/profile/", - "/register/", - "/sign-in/", - "/trips/", - "/profile/settings/" - ] - }, - "/": { - "filePath": "index.tsx" - }, - "/destination/query": { - "filePath": "destination/query.lazy.tsx" - }, - "/item/$itemId": { - "filePath": "item/$itemId.lazy.tsx" - }, - "/pack/$id": { - "filePath": "pack/$id.lazy.tsx" - }, - "/pack/create": { - "filePath": "pack/create.lazy.tsx" - }, - "/profile/$id": { - "filePath": "profile/$id.lazy.tsx" - }, - "/trip/$tripId": { - "filePath": "trip/$tripId.lazy.tsx" - }, - "/trip/create": { - "filePath": "trip/create.lazy.tsx" - }, - "/about/": { - "filePath": "about/index.lazy.tsx" - }, - "/appearance/": { - "filePath": "appearance/index.lazy.tsx" - }, - "/dashboard/": { - "filePath": "dashboard/index.lazy.tsx" - }, - "/feed/": { - "filePath": "feed/index.lazy.tsx" - }, - "/items/": { - "filePath": "items/index.lazy.tsx" - }, - "/map/": { - "filePath": "map/index.lazy.tsx" - }, - "/maps/": { - "filePath": "maps/index.lazy.tsx" - }, - "/packs/": { - "filePath": "packs/index.lazy.tsx" - }, - "/password-reset/": { - "filePath": "password-reset/index.lazy.tsx" - }, - "/privacy/": { - "filePath": "privacy/index.lazy.tsx" - }, - "/profile/": { - "filePath": "profile/index.lazy.tsx" - }, - "/register/": { - "filePath": "register/index.lazy.tsx" - }, - "/sign-in/": { - "filePath": "sign-in/index.lazy.tsx" - }, - "/trips/": { - "filePath": "trips/index.lazy.tsx" - }, - "/profile/settings/": { - "filePath": "profile/settings/index.lazy.tsx" - } - } -} -ROUTE_MANIFEST_END */ diff --git a/packages/app/components/feedPreview/FeedPreviewCard.tsx b/packages/app/components/feedPreview/FeedPreviewCard.tsx index 49b976c71..975e9e86c 100644 --- a/packages/app/components/feedPreview/FeedPreviewCard.tsx +++ b/packages/app/components/feedPreview/FeedPreviewCard.tsx @@ -76,7 +76,7 @@ const FeedPreviewCard: React.FC = ({ linkStr, item }) => { > {formatNumber(formattedWeight)} {weightUnit} @@ -95,7 +95,7 @@ const FeedPreviewCard: React.FC = ({ linkStr, item }) => { /> {item.favorites_count} @@ -114,7 +114,7 @@ const FeedPreviewCard: React.FC = ({ linkStr, item }) => { /> {new Date(item.createdAt).toLocaleString('en-US', { month: 'short', @@ -128,7 +128,7 @@ const FeedPreviewCard: React.FC = ({ linkStr, item }) => { Ttl Score: {item.total_score} diff --git a/apps/expo/Bugsnag.ts b/packages/app/provider/Bugsnag.ts similarity index 81% rename from apps/expo/Bugsnag.ts rename to packages/app/provider/Bugsnag.ts index 8ce7f2dba..6dd4b19fa 100644 --- a/apps/expo/Bugsnag.ts +++ b/packages/app/provider/Bugsnag.ts @@ -2,9 +2,10 @@ import Bugsnag from '@bugsnag/expo'; import BugsnagPluginReact from '@bugsnag/plugin-react'; import BugsnagPluginExpoApp from '@bugsnag/plugin-expo-app'; import BugsnagPluginExpoDevice from '@bugsnag/plugin-expo-device'; +import { BUGSNAG_API_KEY } from '@packrat/config'; Bugsnag.start({ - apiKey: process.env.BUGSNAG_API_KEY, + apiKey: BUGSNAG_API_KEY, plugins: [BugsnagPluginReact, BugsnagPluginExpoApp, BugsnagPluginExpoDevice], }); diff --git a/packages/app/provider/CombinedProvider.tsx b/packages/app/provider/CombinedProvider.tsx index 7e89b8c55..f1b665bdb 100644 --- a/packages/app/provider/CombinedProvider.tsx +++ b/packages/app/provider/CombinedProvider.tsx @@ -4,17 +4,22 @@ import { ThemeProvider } from '../context/theme'; import { TrpcTanstackProvider } from './TrpcTanstackProvider'; import { JotaiProvider } from './JotaiProvider'; import { useAttachListeners } from './useAttachListeners'; +import Bugsnag from './Bugsnag'; + +const ErrorBoundary = Bugsnag.getPlugin('react')?.createErrorBoundary(React); export function CombinedProvider({ children }: { children: React.ReactNode }) { useAttachListeners(); return ( - - - - {children} - - - + + + + + {children} + + + + ); } diff --git a/packages/config/src/index.js b/packages/config/src/index.js index 817c87829..03c7bd319 100644 --- a/packages/config/src/index.js +++ b/packages/config/src/index.js @@ -6,6 +6,7 @@ import { viteSource } from './sources/vite'; */ // Simplifying environment variable access using logical OR + const API_URL = viteSource.VITE_PUBLIC_API_URL || process.env.NEXT_PUBLIC_API_URL || @@ -26,7 +27,10 @@ const MAPBOX_ACCESS_TOKEN = viteSource.VITE_PUBLIC_MAPBOX_ACCESS_TOKEN || process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN || process.env.EXPO_PUBLIC_MAPBOX_ACCESS_TOKEN; -const BUGSNAG_API_KEY = process.env.EXPO_PUBLIC_BUGSNAG_API_KEY; +const BUGSNAG_API_KEY = + viteSource.VITE_PUBLIC_BUGSNAG_API_KEY || + process.env.NEXT_PUBLIC_BUGSNAG_API_KEY || + process.env.EXPO_PUBLIC_BUGSNAG_API_KEY; const APP = viteSource.VITE_PUBLIC_APP || process.env.NEXT_PUBLIC_APP || diff --git a/yarn.lock b/yarn.lock index 0d979ce18..02d4e5f46 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20144,6 +20144,17 @@ __metadata: languageName: node linkType: hard +"expo-device@npm:~5.9.4": + version: 5.9.4 + resolution: "expo-device@npm:5.9.4" + dependencies: + ua-parser-js: "npm:^0.7.33" + peerDependencies: + expo: "*" + checksum: 10/2b163985f1d3bfb81ef5c0c566a586f107ca747e20ad52f6e42349bca7f96daf7f3903e9b6c92084eb9291671515b59438c5db2cdc783b161d20c6c7edeb95ac + languageName: node + linkType: hard + "expo-document-picker@npm:^12.0.2": version: 12.0.2 resolution: "expo-document-picker@npm:12.0.2" From 1efe6c8ce050dff46bf2c4124cff9a8f87b43342 Mon Sep 17 00:00:00 2001 From: Andrew Bierman <94939237+andrew-bierman@users.noreply.github.com> Date: Thu, 22 Aug 2024 21:51:58 -0400 Subject: [PATCH 4/6] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20regen=20lock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yarn.lock | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/yarn.lock b/yarn.lock index 907b5df02..a1c4021eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15997,7 +15997,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^2.0.1, chalk@npm:^2.1.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": +"chalk@npm:^2.0.1, chalk@npm:^2.1.0, chalk@npm:^2.3.0, chalk@npm:^2.4.1, chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" dependencies: @@ -22755,7 +22755,7 @@ __metadata: languageName: node linkType: hard -"glob@npm:7.2.3, glob@npm:^7.0.3, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.7, glob@npm:^7.2.3": +"glob@npm:7.2.3, glob@npm:^7.0.3, glob@npm:^7.1.1, glob@npm:^7.1.3, glob@npm:^7.1.4, glob@npm:^7.1.6, glob@npm:^7.1.7, glob@npm:^7.2.3": version: 7.2.3 resolution: "glob@npm:7.2.3" dependencies: @@ -35158,6 +35158,15 @@ __metadata: languageName: node linkType: hard +"strip-indent@npm:^3.0.0": + version: 3.0.0 + resolution: "strip-indent@npm:3.0.0" + dependencies: + min-indent: "npm:^1.0.0" + checksum: 10/18f045d57d9d0d90cd16f72b2313d6364fd2cb4bf85b9f593523ad431c8720011a4d5f08b6591c9d580f446e78855c5334a30fb91aa1560f5d9f95ed1b4a0530 + languageName: node + linkType: hard + "strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" @@ -36478,6 +36487,13 @@ __metadata: languageName: node linkType: hard +"type-fest@npm:^0.13.1": + version: 0.13.1 + resolution: "type-fest@npm:0.13.1" + checksum: 10/11e9476dc85bf97a71f6844fb67ba8e64a4c7e445724c0f3bd37eb2ddf4bc97c1dc9337bd880b28bce158de1c0cb275c2d03259815a5bf64986727197126ab56 + languageName: node + linkType: hard + "type-fest@npm:^0.16.0": version: 0.16.0 resolution: "type-fest@npm:0.16.0" From 027329d8ea87ef8327f15901678bd8e49cbed5b2 Mon Sep 17 00:00:00 2001 From: Andrew Bierman <94939237+andrew-bierman@users.noreply.github.com> Date: Thu, 22 Aug 2024 22:02:46 -0400 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=90=9B=20cleanup=20bugsnag=20provider?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/app/provider/{ => BugsnagProvider}/Bugsnag.ts | 0 packages/app/provider/BugsnagProvider/index.ts | 5 +++++ packages/app/provider/CombinedProvider.tsx | 10 ++++------ 3 files changed, 9 insertions(+), 6 deletions(-) rename packages/app/provider/{ => BugsnagProvider}/Bugsnag.ts (100%) create mode 100644 packages/app/provider/BugsnagProvider/index.ts diff --git a/packages/app/provider/Bugsnag.ts b/packages/app/provider/BugsnagProvider/Bugsnag.ts similarity index 100% rename from packages/app/provider/Bugsnag.ts rename to packages/app/provider/BugsnagProvider/Bugsnag.ts diff --git a/packages/app/provider/BugsnagProvider/index.ts b/packages/app/provider/BugsnagProvider/index.ts new file mode 100644 index 000000000..18462674d --- /dev/null +++ b/packages/app/provider/BugsnagProvider/index.ts @@ -0,0 +1,5 @@ +import React from 'react'; +import Bugsnag from './Bugsnag'; + +export const BugsnagErrorBoundary = + Bugsnag.getPlugin('react')?.createErrorBoundary(React); diff --git a/packages/app/provider/CombinedProvider.tsx b/packages/app/provider/CombinedProvider.tsx index f1b665bdb..b1cf36354 100644 --- a/packages/app/provider/CombinedProvider.tsx +++ b/packages/app/provider/CombinedProvider.tsx @@ -1,18 +1,16 @@ import React from 'react'; import { SessionProvider } from '../context/Auth/SessionProvider'; import { ThemeProvider } from '../context/theme'; -import { TrpcTanstackProvider } from './TrpcTanstackProvider'; +import { BugsnagErrorBoundary } from './BugsnagProvider'; import { JotaiProvider } from './JotaiProvider'; +import { TrpcTanstackProvider } from './TrpcTanstackProvider'; import { useAttachListeners } from './useAttachListeners'; -import Bugsnag from './Bugsnag'; - -const ErrorBoundary = Bugsnag.getPlugin('react')?.createErrorBoundary(React); export function CombinedProvider({ children }: { children: React.ReactNode }) { useAttachListeners(); return ( - + @@ -20,6 +18,6 @@ export function CombinedProvider({ children }: { children: React.ReactNode }) { - + ); } From 509cee51a755cb48a9eba848afb0f74d8f30089a Mon Sep 17 00:00:00 2001 From: Anmol Verma Date: Mon, 26 Aug 2024 17:27:24 +0530 Subject: [PATCH 6/6] Add condition for no key --- apps/vite/src/routeTree.gen.ts | 177 +++++++++++++++++- .../app/provider/BugsnagProvider/Bugsnag.ts | 14 +- .../app/provider/BugsnagProvider/index.ts | 6 +- yarn.lock | 14 ++ 4 files changed, 203 insertions(+), 8 deletions(-) diff --git a/apps/vite/src/routeTree.gen.ts b/apps/vite/src/routeTree.gen.ts index 968fb50c5..8e9dfcd1e 100644 --- a/apps/vite/src/routeTree.gen.ts +++ b/apps/vite/src/routeTree.gen.ts @@ -174,94 +174,163 @@ const ProfileSettingsIndexLazyRoute = ProfileSettingsIndexLazyImport.update({ declare module '@tanstack/react-router' { interface FileRoutesByPath { '/': { + id: '/' + path: '/' + fullPath: '/' preLoaderRoute: typeof IndexImport parentRoute: typeof rootRoute } '/destination/query': { + id: '/destination/query' + path: '/destination/query' + fullPath: '/destination/query' preLoaderRoute: typeof DestinationQueryLazyImport parentRoute: typeof rootRoute } '/item/$itemId': { + id: '/item/$itemId' + path: '/item/$itemId' + fullPath: '/item/$itemId' preLoaderRoute: typeof ItemItemIdLazyImport parentRoute: typeof rootRoute } '/pack/$id': { + id: '/pack/$id' + path: '/pack/$id' + fullPath: '/pack/$id' preLoaderRoute: typeof PackIdLazyImport parentRoute: typeof rootRoute } '/pack/create': { + id: '/pack/create' + path: '/pack/create' + fullPath: '/pack/create' preLoaderRoute: typeof PackCreateLazyImport parentRoute: typeof rootRoute } '/profile/$id': { + id: '/profile/$id' + path: '/profile/$id' + fullPath: '/profile/$id' preLoaderRoute: typeof ProfileIdLazyImport parentRoute: typeof rootRoute } '/trip/$tripId': { + id: '/trip/$tripId' + path: '/trip/$tripId' + fullPath: '/trip/$tripId' preLoaderRoute: typeof TripTripIdLazyImport parentRoute: typeof rootRoute } '/trip/create': { + id: '/trip/create' + path: '/trip/create' + fullPath: '/trip/create' preLoaderRoute: typeof TripCreateLazyImport parentRoute: typeof rootRoute } '/about/': { + id: '/about/' + path: '/about' + fullPath: '/about' preLoaderRoute: typeof AboutIndexLazyImport parentRoute: typeof rootRoute } '/appearance/': { + id: '/appearance/' + path: '/appearance' + fullPath: '/appearance' preLoaderRoute: typeof AppearanceIndexLazyImport parentRoute: typeof rootRoute } '/dashboard/': { + id: '/dashboard/' + path: '/dashboard' + fullPath: '/dashboard' preLoaderRoute: typeof DashboardIndexLazyImport parentRoute: typeof rootRoute } '/feed/': { + id: '/feed/' + path: '/feed' + fullPath: '/feed' preLoaderRoute: typeof FeedIndexLazyImport parentRoute: typeof rootRoute } '/items/': { + id: '/items/' + path: '/items' + fullPath: '/items' preLoaderRoute: typeof ItemsIndexLazyImport parentRoute: typeof rootRoute } '/map/': { + id: '/map/' + path: '/map' + fullPath: '/map' preLoaderRoute: typeof MapIndexLazyImport parentRoute: typeof rootRoute } '/maps/': { + id: '/maps/' + path: '/maps' + fullPath: '/maps' preLoaderRoute: typeof MapsIndexLazyImport parentRoute: typeof rootRoute } '/packs/': { + id: '/packs/' + path: '/packs' + fullPath: '/packs' preLoaderRoute: typeof PacksIndexLazyImport parentRoute: typeof rootRoute } '/password-reset/': { + id: '/password-reset/' + path: '/password-reset' + fullPath: '/password-reset' preLoaderRoute: typeof PasswordResetIndexLazyImport parentRoute: typeof rootRoute } '/privacy/': { + id: '/privacy/' + path: '/privacy' + fullPath: '/privacy' preLoaderRoute: typeof PrivacyIndexLazyImport parentRoute: typeof rootRoute } '/profile/': { + id: '/profile/' + path: '/profile' + fullPath: '/profile' preLoaderRoute: typeof ProfileIndexLazyImport parentRoute: typeof rootRoute } '/register/': { + id: '/register/' + path: '/register' + fullPath: '/register' preLoaderRoute: typeof RegisterIndexLazyImport parentRoute: typeof rootRoute } '/sign-in/': { + id: '/sign-in/' + path: '/sign-in' + fullPath: '/sign-in' preLoaderRoute: typeof SignInIndexLazyImport parentRoute: typeof rootRoute } '/trips/': { + id: '/trips/' + path: '/trips' + fullPath: '/trips' preLoaderRoute: typeof TripsIndexLazyImport parentRoute: typeof rootRoute } '/profile/settings/': { + id: '/profile/settings/' + path: '/profile/settings' + fullPath: '/profile/settings' preLoaderRoute: typeof ProfileSettingsIndexLazyImport parentRoute: typeof rootRoute } @@ -270,7 +339,7 @@ declare module '@tanstack/react-router' { // Create and export the route tree -export const routeTree = rootRoute.addChildren([ +export const routeTree = rootRoute.addChildren({ IndexRoute, DestinationQueryLazyRoute, ItemItemIdLazyRoute, @@ -294,6 +363,110 @@ export const routeTree = rootRoute.addChildren([ SignInIndexLazyRoute, TripsIndexLazyRoute, ProfileSettingsIndexLazyRoute, -]) +}) /* prettier-ignore-end */ + +/* ROUTE_MANIFEST_START +{ + "routes": { + "__root__": { + "filePath": "__root.tsx", + "children": [ + "/", + "/destination/query", + "/item/$itemId", + "/pack/$id", + "/pack/create", + "/profile/$id", + "/trip/$tripId", + "/trip/create", + "/about/", + "/appearance/", + "/dashboard/", + "/feed/", + "/items/", + "/map/", + "/maps/", + "/packs/", + "/password-reset/", + "/privacy/", + "/profile/", + "/register/", + "/sign-in/", + "/trips/", + "/profile/settings/" + ] + }, + "/": { + "filePath": "index.tsx" + }, + "/destination/query": { + "filePath": "destination/query.lazy.tsx" + }, + "/item/$itemId": { + "filePath": "item/$itemId.lazy.tsx" + }, + "/pack/$id": { + "filePath": "pack/$id.lazy.tsx" + }, + "/pack/create": { + "filePath": "pack/create.lazy.tsx" + }, + "/profile/$id": { + "filePath": "profile/$id.lazy.tsx" + }, + "/trip/$tripId": { + "filePath": "trip/$tripId.lazy.tsx" + }, + "/trip/create": { + "filePath": "trip/create.lazy.tsx" + }, + "/about/": { + "filePath": "about/index.lazy.tsx" + }, + "/appearance/": { + "filePath": "appearance/index.lazy.tsx" + }, + "/dashboard/": { + "filePath": "dashboard/index.lazy.tsx" + }, + "/feed/": { + "filePath": "feed/index.lazy.tsx" + }, + "/items/": { + "filePath": "items/index.lazy.tsx" + }, + "/map/": { + "filePath": "map/index.lazy.tsx" + }, + "/maps/": { + "filePath": "maps/index.lazy.tsx" + }, + "/packs/": { + "filePath": "packs/index.lazy.tsx" + }, + "/password-reset/": { + "filePath": "password-reset/index.lazy.tsx" + }, + "/privacy/": { + "filePath": "privacy/index.lazy.tsx" + }, + "/profile/": { + "filePath": "profile/index.lazy.tsx" + }, + "/register/": { + "filePath": "register/index.lazy.tsx" + }, + "/sign-in/": { + "filePath": "sign-in/index.lazy.tsx" + }, + "/trips/": { + "filePath": "trips/index.lazy.tsx" + }, + "/profile/settings/": { + "filePath": "profile/settings/index.lazy.tsx" + } + } +} +ROUTE_MANIFEST_END */ diff --git a/packages/app/provider/BugsnagProvider/Bugsnag.ts b/packages/app/provider/BugsnagProvider/Bugsnag.ts index 6dd4b19fa..890ad333a 100644 --- a/packages/app/provider/BugsnagProvider/Bugsnag.ts +++ b/packages/app/provider/BugsnagProvider/Bugsnag.ts @@ -4,9 +4,15 @@ import BugsnagPluginExpoApp from '@bugsnag/plugin-expo-app'; import BugsnagPluginExpoDevice from '@bugsnag/plugin-expo-device'; import { BUGSNAG_API_KEY } from '@packrat/config'; -Bugsnag.start({ - apiKey: BUGSNAG_API_KEY, - plugins: [BugsnagPluginReact, BugsnagPluginExpoApp, BugsnagPluginExpoDevice], -}); +if (BUGSNAG_API_KEY) { + Bugsnag.start({ + apiKey: BUGSNAG_API_KEY, + plugins: [ + BugsnagPluginReact, + BugsnagPluginExpoApp, + BugsnagPluginExpoDevice, + ], + }); +} export default Bugsnag; diff --git a/packages/app/provider/BugsnagProvider/index.ts b/packages/app/provider/BugsnagProvider/index.ts index 18462674d..def98e67f 100644 --- a/packages/app/provider/BugsnagProvider/index.ts +++ b/packages/app/provider/BugsnagProvider/index.ts @@ -1,5 +1,7 @@ import React from 'react'; import Bugsnag from './Bugsnag'; +import { BUGSNAG_API_KEY } from '@packrat/config'; -export const BugsnagErrorBoundary = - Bugsnag.getPlugin('react')?.createErrorBoundary(React); +export const BugsnagErrorBoundary = BUGSNAG_API_KEY + ? Bugsnag.getPlugin('react')?.createErrorBoundary(React) + : React.Fragment; diff --git a/yarn.lock b/yarn.lock index fc2c4ae98..e6c794964 100644 --- a/yarn.lock +++ b/yarn.lock @@ -36731,6 +36731,20 @@ __metadata: languageName: node linkType: hard +"typical@npm:^4.0.0": + version: 4.0.0 + resolution: "typical@npm:4.0.0" + checksum: 10/aefe2c24b025cda22534ae2594df4a1df5db05b5fe3692890fd51db741ca4f18937a149f968b8d56d9a7b0756e7cd8843b1907bea21987ff4a06619c54d5a575 + languageName: node + linkType: hard + +"typical@npm:^5.2.0": + version: 5.2.0 + resolution: "typical@npm:5.2.0" + checksum: 10/fd8e4197cb2e021ca6d11fea0018ee219c29bf4160ab613492f74c0e21806003d1cd92a15088b111778a7b5c6432e4e28321899785a86980b390b87c4010efe5 + languageName: node + linkType: hard + "ua-parser-js@npm:^0.7.33": version: 0.7.38 resolution: "ua-parser-js@npm:0.7.38"