diff --git a/apps/vite/package.json b/apps/vite/package.json index 34cb8b0c0..21cc31286 100644 --- a/apps/vite/package.json +++ b/apps/vite/package.json @@ -2,6 +2,7 @@ "name": "vite-app", "private": true, "version": "1.1.1", + "type": "module", "scripts": { "dev": "vite", "build": "yarn run build:tsc && yarn run build:vite", diff --git a/apps/vite/src/routeTree.gen.ts b/apps/vite/src/routeTree.gen.ts index 0606f589a..65099a5eb 100644 --- a/apps/vite/src/routeTree.gen.ts +++ b/apps/vite/src/routeTree.gen.ts @@ -1,12 +1,12 @@ +/* prettier-ignore-start */ + /* eslint-disable */ // @ts-nocheck // noinspection JSUnusedGlobalSymbols -// This file was automatically generated by TanStack Router. -// You should NOT make any changes in this file as it will be overwritten. -// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. +// This file is auto-generated by TanStack Router import { createFileRoute } from '@tanstack/react-router' @@ -46,25 +46,21 @@ const ProfileSettingsIndexLazyImport = createFileRoute('/profile/settings/')() // Create/Update Routes const IndexRoute = IndexImport.update({ - id: '/', path: '/', getParentRoute: () => rootRoute, } as any) const TripsIndexLazyRoute = TripsIndexLazyImport.update({ - id: '/trips/', path: '/trips/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/trips/index.lazy').then((d) => d.Route)) const SignInIndexLazyRoute = SignInIndexLazyImport.update({ - id: '/sign-in/', path: '/sign-in/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/sign-in/index.lazy').then((d) => d.Route)) const RegisterIndexLazyRoute = RegisterIndexLazyImport.update({ - id: '/register/', path: '/register/', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -72,13 +68,11 @@ const RegisterIndexLazyRoute = RegisterIndexLazyImport.update({ ) const ProfileIndexLazyRoute = ProfileIndexLazyImport.update({ - id: '/profile/', path: '/profile/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/profile/index.lazy').then((d) => d.Route)) const ProductsIndexLazyRoute = ProductsIndexLazyImport.update({ - id: '/products/', path: '/products/', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -86,13 +80,11 @@ const ProductsIndexLazyRoute = ProductsIndexLazyImport.update({ ) const PrivacyIndexLazyRoute = PrivacyIndexLazyImport.update({ - id: '/privacy/', path: '/privacy/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/privacy/index.lazy').then((d) => d.Route)) const PasswordResetIndexLazyRoute = PasswordResetIndexLazyImport.update({ - id: '/password-reset/', path: '/password-reset/', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -100,13 +92,11 @@ const PasswordResetIndexLazyRoute = PasswordResetIndexLazyImport.update({ ) const PacksIndexLazyRoute = PacksIndexLazyImport.update({ - id: '/packs/', path: '/packs/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/packs/index.lazy').then((d) => d.Route)) const PackTemplatesIndexLazyRoute = PackTemplatesIndexLazyImport.update({ - id: '/pack-templates/', path: '/pack-templates/', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -114,31 +104,26 @@ const PackTemplatesIndexLazyRoute = PackTemplatesIndexLazyImport.update({ ) const MapsIndexLazyRoute = MapsIndexLazyImport.update({ - id: '/maps/', path: '/maps/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/maps/index.lazy').then((d) => d.Route)) const MapIndexLazyRoute = MapIndexLazyImport.update({ - id: '/map/', path: '/map/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/map/index.lazy').then((d) => d.Route)) const ItemsIndexLazyRoute = ItemsIndexLazyImport.update({ - id: '/items/', path: '/items/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/items/index.lazy').then((d) => d.Route)) const FeedIndexLazyRoute = FeedIndexLazyImport.update({ - id: '/feed/', path: '/feed/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/feed/index.lazy').then((d) => d.Route)) const DashboardIndexLazyRoute = DashboardIndexLazyImport.update({ - id: '/dashboard/', path: '/dashboard/', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -146,7 +131,6 @@ const DashboardIndexLazyRoute = DashboardIndexLazyImport.update({ ) const AppearanceIndexLazyRoute = AppearanceIndexLazyImport.update({ - id: '/appearance/', path: '/appearance/', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -154,43 +138,36 @@ const AppearanceIndexLazyRoute = AppearanceIndexLazyImport.update({ ) const AboutIndexLazyRoute = AboutIndexLazyImport.update({ - id: '/about/', path: '/about/', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/about/index.lazy').then((d) => d.Route)) const TripCreateLazyRoute = TripCreateLazyImport.update({ - id: '/trip/create', path: '/trip/create', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/trip/create.lazy').then((d) => d.Route)) const TripTripIdLazyRoute = TripTripIdLazyImport.update({ - id: '/trip/$tripId', path: '/trip/$tripId', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/trip/$tripId.lazy').then((d) => d.Route)) const ProfileIdLazyRoute = ProfileIdLazyImport.update({ - id: '/profile/$id', path: '/profile/$id', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/profile/$id.lazy').then((d) => d.Route)) const PackCreateLazyRoute = PackCreateLazyImport.update({ - id: '/pack/create', path: '/pack/create', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/pack/create.lazy').then((d) => d.Route)) const PackIdLazyRoute = PackIdLazyImport.update({ - id: '/pack/$id', path: '/pack/$id', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/pack/$id.lazy').then((d) => d.Route)) const PackTemplatesIdLazyRoute = PackTemplatesIdLazyImport.update({ - id: '/pack-templates/$id', path: '/pack-templates/$id', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -198,13 +175,11 @@ const PackTemplatesIdLazyRoute = PackTemplatesIdLazyImport.update({ ) const ItemItemIdLazyRoute = ItemItemIdLazyImport.update({ - id: '/item/$itemId', path: '/item/$itemId', getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/item/$itemId.lazy').then((d) => d.Route)) const DestinationQueryLazyRoute = DestinationQueryLazyImport.update({ - id: '/destination/query', path: '/destination/query', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -212,7 +187,6 @@ const DestinationQueryLazyRoute = DestinationQueryLazyImport.update({ ) const ProfileSettingsIndexLazyRoute = ProfileSettingsIndexLazyImport.update({ - id: '/profile/settings/', path: '/profile/settings/', getParentRoute: () => rootRoute, } as any).lazy(() => @@ -648,6 +622,8 @@ export const routeTree = rootRoute ._addFileChildren(rootRouteChildren) ._addFileTypes() +/* prettier-ignore-end */ + /* ROUTE_MANIFEST_START { "routes": { diff --git a/packages/app/components/details/index.tsx b/packages/app/components/details/index.tsx index 66bf351f8..e4e50cc0b 100644 --- a/packages/app/components/details/index.tsx +++ b/packages/app/components/details/index.tsx @@ -3,7 +3,7 @@ import { Text } from 'react-native'; import { CustomCard } from '../card'; import { RStack } from '@packrat/ui'; -interface DetailsComponent { +interface DetailsComponentProps { type: string; data: any; // Need type for this isLoading: boolean; @@ -19,7 +19,7 @@ export const DetailsComponent = ({ error, additionalComps, link, -}: DetailsComponent) => { +}: DetailsComponentProps) => { const renderDetails = () => { switch (type) { case 'pack': diff --git a/packages/app/package.json b/packages/app/package.json index f22b74bb4..f807416bc 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -24,6 +24,7 @@ }, "dependencies": { "@babel/runtime": "^7.21.0", + "@bugsnag/js": "^8.1.2", "@expo/match-media": "^0.4.0", "@expo/vector-icons": "^14.0.0", "@expo/webpack-config": "^19.0.0", diff --git a/packages/app/provider/BugsnagProvider/Bugsnag.web.ts b/packages/app/provider/BugsnagProvider/Bugsnag.web.ts new file mode 100644 index 000000000..8c2ce0cc7 --- /dev/null +++ b/packages/app/provider/BugsnagProvider/Bugsnag.web.ts @@ -0,0 +1,12 @@ +import Bugsnag from '@bugsnag/js'; +import BugsnagPluginReact from '@bugsnag/plugin-react'; +import { BUGSNAG_API_KEY } from '@packrat/config'; + +if (BUGSNAG_API_KEY) { + Bugsnag.start({ + apiKey: BUGSNAG_API_KEY, + plugins: [new BugsnagPluginReact()], + }); +} + +export default Bugsnag; diff --git a/yarn.lock b/yarn.lock index ffb024987..389754d8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2022,6 +2022,15 @@ __metadata: languageName: node linkType: hard +"@bugsnag/browser@npm:^8.1.2": + version: 8.1.2 + resolution: "@bugsnag/browser@npm:8.1.2" + dependencies: + "@bugsnag/core": "npm:^8.1.1" + checksum: 10/e15189eef5800f1d4c730355d9c097431d3538ce85f1df9eaf16121231a3e35f477695ec2924f2085afa5c25182c51c1f66f120eca7eccf7682d89b16b8ea04d + languageName: node + linkType: hard + "@bugsnag/core@npm:^7.19.0": version: 7.25.0 resolution: "@bugsnag/core@npm:7.25.0" @@ -2035,6 +2044,19 @@ __metadata: languageName: node linkType: hard +"@bugsnag/core@npm:^8.1.1": + version: 8.1.1 + resolution: "@bugsnag/core@npm:8.1.1" + 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/07d18d9eddcb975a57f192eebc44d28f7c512b00072930fcd74dd61b3d0b60a164d6e0c3b51fbb031781c9a46bc81b5cc0efb6e1147ea54b0e21d6fdfb6c7181 + languageName: node + linkType: hard + "@bugsnag/cuid@npm:^3.0.0": version: 3.1.1 resolution: "@bugsnag/cuid@npm:3.1.1" @@ -2082,6 +2104,30 @@ __metadata: languageName: node linkType: hard +"@bugsnag/js@npm:^8.1.2": + version: 8.1.2 + resolution: "@bugsnag/js@npm:8.1.2" + dependencies: + "@bugsnag/browser": "npm:^8.1.2" + "@bugsnag/node": "npm:^8.1.1" + checksum: 10/4885e71768cf5d46ce9996f6e2b991c035dec9ae4946494fb507779c6bdea9c3eff3d4fa657e53bb57abdd26535361c2ac7deacff29c4d2369932b567b1abaf2 + languageName: node + linkType: hard + +"@bugsnag/node@npm:^8.1.1": + version: 8.1.1 + resolution: "@bugsnag/node@npm:8.1.1" + dependencies: + "@bugsnag/core": "npm:^8.1.1" + byline: "npm:^5.0.0" + error-stack-parser: "npm:^2.0.3" + iserror: "npm:^0.0.2" + pump: "npm:^3.0.0" + stack-generator: "npm:^2.0.3" + checksum: 10/877209db102fab59df2c3f77d8dc67e53b456d5c6f752331caf90777bfa09b80384e7972685c2294cde85a26437e839075d821ce6302c787afc402de138c9516 + 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" @@ -14747,6 +14793,7 @@ __metadata: "@babel/core": "npm:^7.23.7" "@babel/preset-typescript": "npm:^7.22.5" "@babel/runtime": "npm:^7.21.0" + "@bugsnag/js": "npm:^8.1.2" "@expo/match-media": "npm:^0.4.0" "@expo/vector-icons": "npm:^14.0.0" "@expo/webpack-config": "npm:^19.0.0" @@ -16854,6 +16901,13 @@ __metadata: languageName: node linkType: hard +"byline@npm:^5.0.0": + version: 5.0.0 + resolution: "byline@npm:5.0.0" + checksum: 10/737ca83e8eda2976728dae62e68bc733aea095fab08db4c6f12d3cee3cf45b6f97dce45d1f6b6ff9c2c947736d10074985b4425b31ce04afa1985a4ef3d334a7 + languageName: node + linkType: hard + "bytes@npm:3.0.0": version: 3.0.0 resolution: "bytes@npm:3.0.0" @@ -26160,7 +26214,7 @@ __metadata: languageName: node linkType: hard -"iserror@npm:0.0.2": +"iserror@npm:0.0.2, iserror@npm:^0.0.2": version: 0.0.2 resolution: "iserror@npm:0.0.2" checksum: 10/6ca5e50d779471dbb69455ce6853a8284a2a077ff9b7130133a1d09f071830653274884a1e5271b55a422a33e128790a3a7c3e73b2648cf5398d3cbdeb5ca889