diff --git a/.env.production b/.env.production index 29c851a..d0310e8 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ -REACT_APP_BROKER_URL=https://stage.owlbear.rodeo -REACT_APP_ICE_SERVERS_URL=https://stage.owlbear.rodeo/iceservers +REACT_APP_BROKER_URL=https://rocket.owlbear.rodeo +REACT_APP_ICE_SERVERS_URL=https://rocket.owlbear.rodeo/iceservers REACT_APP_STRIPE_API_KEY=pk_live_MJjzi5djj524Y7h3fL5PNh4e00a852XD51 REACT_APP_STRIPE_URL=https://payment.owlbear.rodeo REACT_APP_VERSION=$npm_package_version diff --git a/package.json b/package.json index 11dfeb3..ff85667 100644 --- a/package.json +++ b/package.json @@ -8,16 +8,14 @@ "@dnd-kit/core": "^3.1.1", "@dnd-kit/sortable": "^4.0.0", "@mitchemmc/dexie-export-import": "^1.0.1", - "@msgpack/msgpack": "^2.7.2", + "@msgpack/msgpack": "^2.8.0", "@react-spring/konva": "9.4.4", - "@sentry/integrations": "^6.19.3", - "@sentry/react": "^6.19.3", - "@stripe/stripe-js": "^1.26.0", + "@stripe/stripe-js": "^1.44.1", "@tensorflow/tfjs": "^3.15.0", "@testing-library/jest-dom": "^5.16.3", "@testing-library/react": "^13.0.0", - "@testing-library/user-event": "^14.0.3", - "ajv": "^8.6.2", + "@testing-library/user-event": "^14.4.3", + "ajv": "^8.11.2", "ammo.js": "kripken/ammo.js#85c0614cd5338aa0843814fe7bbd2df48164ece7", "case": "^1.6.3", "color": "^3.2.1", @@ -28,9 +26,9 @@ "err-code": "^3.0.1", "fake-indexeddb": "^3.1.7", "file-saver": "^2.0.5", - "fuse.js": "^6.5.3", + "fuse.js": "^6.6.2", "image-outline": "^0.1.0", - "intersection-observer": "^0.12.0", + "intersection-observer": "^0.12.2", "konva": "8.3.5", "lodash.chunk": "^4.2.0", "lodash.clonedeep": "^4.5.0", @@ -63,17 +61,14 @@ "simple-peer": "^9.11.1", "simplebar-react": "^2.3.6", "simplify-js": "^1.2.4", - "socket.io-client": "^4.4.1", - "socket.io-msgpack-parser": "^3.0.1", - "source-map-explorer": "^2.5.2", + "socket.io-client": "^4.5.4", + "socket.io-msgpack-parser": "^3.0.2", + "source-map-explorer": "^2.5.3", "theme-ui": "^0.10.0", "tiny-typed-emitter": "^2.1.0", "use-image": "1.0.10", "uuid": "^8.3.2", - "webrtc-adapter": "^8.1.1" - }, - "resolutions": { - "simple-peer/get-browser-rtc": "substack/get-browser-rtc#4/head" + "webrtc-adapter": "^8.2.0" }, "scripts": { "analyze": "source-map-explorer 'build/static/js/*.js'", @@ -98,23 +93,23 @@ ] }, "devDependencies": { - "@types/color": "^3.0.1", + "@types/color": "^3.0.3", "@types/deep-diff": "^1.0.0", "@types/file-saver": "^2.0.5", "@types/jest": "^27.4.1", - "@types/lodash.chunk": "^4.2.6", - "@types/lodash.clonedeep": "^4.5.6", - "@types/lodash.get": "^4.4.6", - "@types/lodash.set": "^4.3.6", + "@types/lodash.chunk": "^4.2.7", + "@types/lodash.clonedeep": "^4.5.7", + "@types/lodash.get": "^4.4.7", + "@types/lodash.set": "^4.3.7", "@types/node": "^15.6.0", - "@types/normalize-wheel": "^1.0.0", + "@types/normalize-wheel": "^1.0.1", "@types/react": "^17.0.6", "@types/react-dom": "^17.0.5", "@types/react-modal": "^3.13.1", "@types/react-router-dom": "^5.1.7", "@types/react-select": "^5.0.1", "@types/shortid": "^0.0.29", - "@types/simple-peer": "^9.11.4", + "@types/simple-peer": "^9.11.5", "@types/uuid": "^8.3.4", "typescript": "^4.2.4", "worker-loader": "^3.0.8" diff --git a/src/helpers/grid.ts b/src/helpers/grid.ts index 7e7a8e6..f928e76 100644 --- a/src/helpers/grid.ts +++ b/src/helpers/grid.ts @@ -3,7 +3,6 @@ import Vector3 from "./Vector3"; import Vector2 from "./Vector2"; import Size from "./Size"; -import { logError } from "./logging"; import { Grid, GridInset, GridScale } from "../types/Grid"; const SQRT3 = 1.73205; @@ -562,8 +561,8 @@ export async function getGridSizeFromImage(image: HTMLImageElement) { try { prediction = await gridSizeML(image, candidates); } catch (error) { - if (error instanceof Error) { - logError(error); + if (error instanceof Error) { + console.error(error); } } diff --git a/src/helpers/logging.ts b/src/helpers/logging.ts deleted file mode 100644 index b7c9a75..0000000 --- a/src/helpers/logging.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { captureException } from "@sentry/react"; - -export function logError(error: Error): void { - console.error(error); - if (process.env.REACT_APP_LOGGING === "true") { - captureException(error); - } -} diff --git a/src/helpers/shared.ts b/src/helpers/shared.ts index b938893..8b8da31 100644 --- a/src/helpers/shared.ts +++ b/src/helpers/shared.ts @@ -86,7 +86,9 @@ export function groupBy(array: Record[], key: string) { export const isMacLike = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform); -export const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); +export const isSafari = /^((?!chrome|android).)*safari/i.test( + navigator.userAgent +); export function shuffle(array: Type[]) { let temp = [...array]; @@ -116,13 +118,16 @@ export function shuffle(array: Type[]) { * and writing to the clipboard e.g. for Safari or Firefox */ export async function clipboardSupported(): Promise { + // Reason: we're already handling the case where clipboard-read is not supported // @ts-ignore if (navigator.clipboard?.readText && navigator.clipboard?.writeText) { if (navigator.permissions) { + // @ts-ignore let query = await navigator.permissions.query({ name: "clipboard-read" }); if (query.state === "prompt") { try { await navigator.clipboard.readText(); + // @ts-ignore query = await navigator.permissions.query({ name: "clipboard-read" }); // Wait 300ms before returning when permission has been accepted to prevent immediate calls // to the clipboard api to fail with a document not focused error diff --git a/src/icons/SocialPatreonIcon.tsx b/src/icons/SocialPatreonIcon.tsx index aa92de6..be57f0d 100644 --- a/src/icons/SocialPatreonIcon.tsx +++ b/src/icons/SocialPatreonIcon.tsx @@ -2,14 +2,12 @@ function SocialPatreonIcon() { return ( - - + ); } diff --git a/src/index.tsx b/src/index.tsx index 8c865ae..13b71fe 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,6 +1,4 @@ import ReactDOM from "react-dom"; -import * as Sentry from "@sentry/react"; -import { Dedupe } from "@sentry/integrations"; import App from "./App"; import Modal from "react-modal"; @@ -21,73 +19,6 @@ if (!("IntersectionObserver" in window)) { import("intersection-observer"); } -if (process.env.REACT_APP_LOGGING === "true") { - Sentry.init({ - dsn: process.env.REACT_APP_SENTRY_DSN, - release: "owlbear-rodeo@" + process.env.REACT_APP_VERSION, - integrations: [new Dedupe()], - // Ignore resize error as it is triggered by going fullscreen on slower computers - // Ignore quota error - // Ignore XDR encoding failure bug in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1678243 - // Ignore LastPass extension text error - // Ignore chrome extension error - // Ignore dexie error todo: fix - ignoreErrors: [ - "ResizeObserver loop limit exceeded", - "ResizeObserver loop completed with undelivered notifications", - // Konva error with FireFox 78 - "CanvasPattern.setTransform: Argument 1 does not implement interface SVGMatrix", - "QuotaExceededError", - "DatabaseClosedError", - "XDR encoding failure", - "Assertion failed: Input argument is not an HTMLInputElement", - "Extension context invalidated", - new RegExp( - "([InvalidStateError:\\s]*Failed to execute 'transaction' on 'IDBDatabase': The database connection is closing([.]*[\\s]*))+" - ), - "Browser is shutting down", - "An internal error was encountered in the Indexed Database server", - // Random plugins/extensions - "top.GLOBALS", - // See: http://blog.errorception.com/2012/03/tale-of-unfindable-js-error.html - "originalCreateNotification", - "canvas.contentDocument", - "MyApp_RemoveAllHighlights", - "http://tt.epicplay.com", - "Can't find variable: ZiteReader", - "jigsaw is not defined", - "ComboSearch is not defined", - "http://loading.retry.widdit.com/", - "atomicFindClose", - // Facebook borked - "fb_xd_fragment", - // ISP "optimizing" proxy - `Cache-Control: no-transform` seems to - // reduce this. (thanks @acdha) - // See http://stackoverflow.com/questions/4113268 - "bmi_SafeAddOnload", - "EBCallBackMessageReceived", - // See http://toolbar.conduit.com/Developer/HtmlAndGadget/Methods/JSInjection.aspx - "conduitPage", - ], - denyUrls: [ - // Facebook flakiness - /graph\.facebook\.com/i, - // Facebook blocked - /connect\.facebook\.net\/en_US\/all\.js/i, - // Woopra flakiness - /eatdifferent\.com\.woopra-ns\.com/i, - /static\.woopra\.com\/js\/woopra\.js/i, - // Chrome extensions - /extensions\//i, - /^chrome:\/\//i, - // Other plugins - /127\.0\.0\.1:4001\/isrunning/i, // Cacaoweb - /webappstoolbarba\.texthelp\.com\//i, - /metrics\.itunes\.apple\.com\.edgesuite\.net\//i, - ], - }); -} - Modal.setAppElement("#root"); ReactDOM.render(, document.getElementById("root")); diff --git a/src/network/Session.ts b/src/network/Session.ts index 6011dbb..c112df5 100644 --- a/src/network/Session.ts +++ b/src/network/Session.ts @@ -5,7 +5,6 @@ import { EventEmitter } from "events"; import Connection, { DataProgressEvent } from "./Connection"; import { omit } from "../helpers/shared"; -import { logError } from "../helpers/logging"; import { SignalData } from "simple-peer"; /** @@ -95,7 +94,6 @@ class Session extends EventEmitter { this.emit("status", "ready"); } catch (error: any) { - logError(error); this.emit("status", "offline"); } } @@ -309,7 +307,6 @@ class Session extends EventEmitter { return true; } catch (error: any) { - logError(error); this.emit("peerError", { error }); for (let peer of Object.values(this.peers)) { peer.connection && peer.connection.destroy(); diff --git a/src/routes/About.tsx b/src/routes/About.tsx index 5b62508..52d7474 100644 --- a/src/routes/About.tsx +++ b/src/routes/About.tsx @@ -49,8 +49,8 @@ function About() { For questions or feedback email{" "} - - contact@owlbear.rodeo + + support@owlbear.rodeo diff --git a/src/routes/Donate.tsx b/src/routes/Donate.tsx index 718a1a0..2470764 100644 --- a/src/routes/Donate.tsx +++ b/src/routes/Donate.tsx @@ -15,7 +15,6 @@ import Footer from "../components/Footer"; import ErrorBanner from "../components/banner/ErrorBanner"; import LoadingOverlay from "../components/LoadingOverlay"; -import { logError } from "../helpers/logging"; import { Stripe } from "@stripe/stripe-js"; type Price = { price?: string; name: string; value: number }; @@ -45,7 +44,6 @@ function Donate() { } }) .catch((error) => { - logError(error); // TODO: check setError -> cannot work with value as a string setError(error.message); setLoading(false); diff --git a/src/routes/Home.tsx b/src/routes/Home.tsx index 3fd516f..08e27a0 100644 --- a/src/routes/Home.tsx +++ b/src/routes/Home.tsx @@ -23,7 +23,7 @@ import { useAuth } from "../contexts/AuthContext"; import RedditIcon from "../icons/SocialRedditIcon"; import TwitterIcon from "../icons/SocialTwitterIcon"; import YouTubeIcon from "../icons/SocialYouTubeIcon"; -import PatreonIcon from "../icons/SocialPatreonIcon"; +import SocialPatreonIcon from "../icons/SocialPatreonIcon"; import owlington from "../images/Owlington.png"; @@ -69,9 +69,8 @@ function Home() { "system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',sans-serif", }} > - Check out our new{" "} - blog for all the - news on the next version of Owlbear Rodeo + Check out our blog{" "} + for all the news on the next version of Owlbear Rodeo @@ -126,6 +125,11 @@ function Home() { + + + + + =1.10.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== -tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -14060,10 +13933,10 @@ webpack@4.44.2: watchpack "^1.7.4" webpack-sources "^1.4.1" -webrtc-adapter@^8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-8.1.1.tgz#e4a4dfd1b5085d119da40c4efc0147f7d0961cba" - integrity sha512-1yXevP7TeZGmklEXkvQVrZp3fOSJlLeXNGCA7NovQokxgP3/e2T3EVGL0eKU87S9vKppWjvRWqnJeSANEspOBg== +webrtc-adapter@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/webrtc-adapter/-/webrtc-adapter-8.2.0.tgz#566220c95d707017bbefbb555d6e2467dd1b691e" + integrity sha512-umxCMgedPAVq4Pe/jl3xmelLXLn4XZWFEMR5Iipb5wJ+k1xMX0yC4ZY9CueZUU1MjapFxai1tFGE7R/kotH6Ww== dependencies: sdp "^3.0.2" @@ -14502,8 +14375,3 @@ yargs@^16.0.3, yargs@^16.2.0: string-width "^4.2.0" y18n "^5.0.5" yargs-parser "^20.2.2" - -yeast@0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/yeast/-/yeast-0.1.2.tgz#008e06d8094320c372dbc2f8ed76a0ca6c8ac419" - integrity sha1-AI4G2AlDIMNy28L47XagymyKxBk=